1"use strict";(self.webpackChunkweb_client=self.webpackChunkweb_client||[]).push([[1708,9797,7009,3916,7183,137,6793,3713,840],{41708:(Ye,he,r)=>{r.r(he),r.d(he,{LoggedInRootPageModule:()=>tr});var B=r(9983),D=r(89979),_=r(55853),g=r(54520),ne=r(50460),O=r(32249),V=r(84388),L=r(42866),be=r(48727),p=r(74434),w=r(13395),q=r(53464),lt=r(42128),z=r(41655);const Ce={sidePeekStateChanged:(0,g.PH)("LayoutOrchestratorActions.sidePeekStateChanged",(0,g.Ky)()),temporarilyCollapseOrgSidebar:(0,g.PH)("LayoutOrchestratorActions.temporarilyCollapseOrgSidebar"),restoreOrgSidebarFromTemporaryCollapse:(0,g.PH)("LayoutOrchestratorActions.restoreOrgSidebarFromTemporaryCollapse"),closeSidePeekForSpace:(0,g.PH)("LayoutOrchestratorActions.closeSidePeekForSpace"),userCollapsedOrgSidebar:(0,g.PH)("LayoutOrchestratorActions.userCollapsedOrgSidebar"),userExpandedOrgSidebar:(0,g.PH)("LayoutOrchestratorActions.userExpandedOrgSidebar"),initializeFromOrgSidebarConfig:(0,g.PH)("LayoutOrchestratorActions.initializeFromOrgSidebarConfig",(0,g.Ky)())},Q="layoutOrchestrator",N=(0,g.Lq)({orgSidebarTemporarilyCollapsed:!1,userExplicitlyCollapsedSidebar:!1,initialized:!1},(0,g.on)(Ce.initializeFromOrgSidebarConfig,(a,{isCollapsed:n})=>({...a,userExplicitlyCollapsedSidebar:n,initialized:!0})),(0,g.on)(Ce.temporarilyCollapseOrgSidebar,a=>({...a,orgSidebarTemporarilyCollapsed:!0})),(0,g.on)(Ce.restoreOrgSidebarFromTemporaryCollapse,a=>({...a,orgSidebarTemporarilyCollapsed:!1})),(0,g.on)(Ce.userCollapsedOrgSidebar,a=>({...a,userExplicitlyCollapsedSidebar:!0})),(0,g.on)(Ce.userExpandedOrgSidebar,a=>({...a,userExplicitlyCollapsedSidebar:!1,orgSidebarTemporarilyCollapsed:!1}))),re=(0,g.ZF)(Q),W=(0,g.P1)(re,a=>a.orgSidebarTemporarilyCollapsed);(0,g.P1)(re,a=>a.userExplicitlyCollapsedSidebar),(0,g.P1)(re,a=>a.initialized);var e=r(91052),Yt=r(26083),Yi=r(70229);class Kt{constructor(n,t,i,o){this.actions$=n,this.store$=t,this.sidePeekState$=i,this.viewportDimensions$=o,this.initialize$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)("[LayoutOrchestrator] Init"),(0,L.w)(()=>this.store$.select(O.Bg).pipe((0,be.q)(1),(0,p.U)(s=>Ce.initializeFromOrgSidebarConfig({isCollapsed:s})))))),this.onSidePeekStateChanged$=(0,_.GW)(()=>this.sidePeekState$.pipe((0,w.x)((s,l)=>s.isOpen===l.isOpen&&s.widthPx===l.widthPx&&s.isAnimating===l.isAnimating),(0,p.U)(({isOpen:s,widthPx:l,isAnimating:d})=>Ce.sidePeekStateChanged({isOpen:s,widthPx:l,isAnimating:d})))),this.orchestrateOrgSidebarCollapse$=(0,_.GW)(()=>(0,V.aj)([this.viewportDimensions$,this.sidePeekState$,this.store$.select(O.L4),this.store$.select(re)]).pipe((0,q.h)(([,,,s])=>s.initialized),(0,lt.b)(50),(0,p.U)(([s,l,d,h])=>{const{viewportWidth:m}=s,{isOpen:C,widthPx:S}=l,{isCollapsed:f,sidebarWidth:E}=d,{orgSidebarTemporarilyCollapsed:Z,userExplicitlyCollapsedSidebar:R}=h,F=C?S:0,xe=.4*m;return m-(f||Z?0:E??318)-F<xe&&!f&&!Z&&!R?Ce.temporarilyCollapseOrgSidebar():Z&&!R&&m-(E??318)-F>=xe?Ce.restoreOrgSidebarFromTemporaryCollapse():null}),(0,z.M3)())),this.executeTemporaryCollapse$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ce.temporarilyCollapseOrgSidebar),(0,p.U)(()=>O.Eg.partiallyUpdateConfig({config:{isCollapsed:!0}})))),this.executeRestoreFromTemporaryCollapse$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ce.restoreOrgSidebarFromTemporaryCollapse),(0,p.U)(()=>O.Eg.partiallyUpdateConfig({config:{isCollapsed:!1}})))),this.trackUserExplicitCollapseExpand$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(O.Eg.partiallyUpdateConfig),(0,q.h)(({config:s})=>void 0!==s.isCollapsed),(0,_.IC)(()=>this.store$.select(W)),(0,q.h)(([,s])=>!s),(0,p.U)(([{config:s}])=>s.isCollapsed?Ce.userCollapsedOrgSidebar():Ce.userExpandedOrgSidebar()))),this.closeSidePeekOnOrgSidebarExpand$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ce.userExpandedOrgSidebar),(0,_.IC)(()=>[this.viewportDimensions$,this.sidePeekState$,this.store$.select(O.L4)]),(0,q.h)(([,s,l,d])=>{const{viewportWidth:h}=s,{isOpen:m,widthPx:C}=l,{sidebarWidth:S}=d;return!!m&&h-(S??318)-C<.4*h}),(0,p.U)(()=>Ce.closeSidePeekForSpace()))),this.executeCloseSidePeek$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ce.closeSidePeekForSpace),(0,p.U)(()=>ne.ru.closeModal())))}ngrxOnInitEffects(){return{type:"[LayoutOrchestrator] Init"}}static#e=this.\u0275fac=function(t){return new(t||Kt)(e.LFG(_.eX),e.LFG(g.yh),e.LFG(Yt.p),e.LFG(Yi.N7))};static#t=this.\u0275prov=e.Yz7({token:Kt,factory:Kt.\u0275fac})}class an{static#e=this.\u0275fac=function(t){return new(t||an)};static#t=this.\u0275mod=e.oAB({type:an});
1static#n=this.\u0275inj=e.cJS({imports:[g.Aw.forFeature(Q,N),_.sQ.forFeature([Kt])]})}var tt=r(93125),Ne=r(27502),ve=r(31156),ie=r(70609),te=r(61011),ke=r(57642),ct=r(79056),nt=r(37779),Re=r(25157),kn=r(53885),$=r(46725),H=r(88006),A=r(3683),jt=r(45503);const Te=new jt.U({[A.SQ0.EN]:{search:{openPrefix:"Open",openPostfix:"Open",inputPlaceholder:"Search {{ organizationName }}\u2026",noResultPlaceholder:{headline:"No results",subline:"Try a different search term."}},sort:{BEST_MATCH:{label:"Best match",selectedLabel:"Sort"},LAST_MODIFIED_AT_DESC:"Last modified: newest first",LAST_MODIFIED_AT_ASC:"Last modified: oldest first",CREATED_AT_DESC:"Created: newest first",CREATED_AT_ASC:"Created: oldest first"},filter:{createdBy:{label:"Created by",selectedLabel:"Created by: {{ selected }}",searchPlaceholder:"Search people\u2026",noResultPlaceholder:"No results"},workspaces:{label:"Workspace",selectedLabel:"Workspace: {{ selected }}",searchPlaceholder:"Search workspaces\u2026",noResultPlaceholder:"No results"},blabDefs:{label:"App",selectedLabel:"App: {{ selected }}",searchPlaceholder:"Search apps\u2026",noResultPlaceholder:"No results"},date:{label:"Date",createdAt:"Created",lastModifiedAt:"Last modified",today:"Today",last7Days:"Last 7 days",last30Days:"Last 30 days",delete:"Delete",createdAtSelected:{today:"Created: today",last7Days:"Created: last 7 days",last30Days:"Created: last 30 days"},lastModifiedAtSelected:{today:"Last modified: today",last7Days:"Last modified: last 7 days",last30Days:"Last modified: last 30 days"}}},category:{today:"Today",yesterday:"Yesterday",lastWeek:"Last week",last30Days:"Last 30 days",older:"Older",jumpBack:"Jump back",topResults:"Top results",moreResults:"More results",oneResult:"{{ numResults }} result",manyResults:"{{ numResults }} results"},tooltip:{createdBy:"Created by",lastModifiedBy:"Last edited by"},breadcrumb:{blabDef:{database:"Database",dashboard:"Dashboard",form:"Form"},blabItem:"{{ itemName }}"},archived:"Archived",footer:{choose:"Choose",open:"Open",openInNewTab:"Open in new tab"}},[A.SQ0.DE]:{search:{openPrefix:"\xd6ffne",openPostfix:"\xd6ffnen",inputPlaceholder:"{{ organizationName }} durchsuchen\u2026",noResultPlaceholder:{headline:"Keine Ergebnisse",subline:"Versuche einen anderen Suchbegriff."}},sort:{BEST_MATCH:{label:"Beste \xdcbereinstimmung",selectedLabel:"Sortieren"},LAST_MODIFIED_AT_DESC:"Zuletzt ge\xe4ndert: neueste zuerst",LAST_MODIFIED_AT_ASC:"Zuletzt ge\xe4ndert: \xe4lteste zuerst",CREATED_AT_DESC:"Erstellt: neueste zuerst",CREATED_AT_ASC:"Erstellt: \xe4lteste zuerst"},filter:{createdBy:{label:"Erstellt von",selectedLabel:"Erstellt von: {{ selected }}",searchPlaceholder:"Personen suchen\u2026",noResultPlaceholder:"Keine Ergebnisse"},workspaces:{label:"Workspace",selectedLabel:"Workspace: {{ selected }}",searchPlaceholder:"Workspaces suchen\u2026",noResultPlaceholder:"Keine Ergebnisse"},blabDefs:{label:"App",selectedLabel:"App: {{ selected }}",searchPlaceholder:"Apps suchen\u2026",noResultPlaceholder:"Keine Ergebnisse"},date:{label:"Datum",createdAt:"Erstellt",lastModifiedAt:"Zuletzt bearbeitet",today:"Heute",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",delete:"L\xf6schen",createdAtSelected:{today:"Erstellt: Heute",last7Days:"Erstellt: Letzte 7 Tage",last30Days:"Erstellt: Letzte 30 Tage"},lastModifiedAtSelected:{today:"Zuletzt bearbeitet: Heute",last7Days:"Zuletzt bearbeitet: Letzte 7 Tage",last30Days:"Zuletzt bearbeitet: Letzte 30 Tage"}}},category:{today:"Heute",yesterday:"Gestern",lastWeek:"Letzte Woche",last30Days:"Letzte 30 Tage",older:"\xc4lter",jumpBack:"Zur\xfcck",topResults:"Beste Ergebnisse",moreResults:"Mehr Ergebnisse",oneResult:"{{ numResults }} Ergebnis",manyResults:"{{ numResults }} Ergebnisse"},tooltip:{createdBy:"Erstellt von",lastModifiedBy:"Bearbeitet von"},breadcrumb:{blabDef:{database:"Datenbank",dashboard:"Dashboard",form:"Formular"},blabItem:"{{ itemName }}"},archived:"Archiviert",footer:{choose:"Ausw\xe4hlen",open:"\xd6ffnen",openInNewTab:"In neuem Tab \xf6ffnen"}},[A.SQ0.PT_BR]:{search:{openPrefix:"Abrir",openPostfix:"Abrir",inputPlaceholder:"Pesquisar {{ organizationName }}\u2026",noResultPlaceholder:{headline:"Sem resultados",subline:"Tente um termo de pesquisa diferente."}},sort:{BEST_MATCH:{label:"Melhor correspond\xeancia",selectedLabel:"Ordenar"},LAST_MODIFIED_AT_DESC:"\xdaltima modifica\xe7\xe3o: mais recente primeiro",LAST_MODIFIED_AT_ASC:"\xdaltima modifica\xe7\xe3o: mais antigo primeiro",CREATED_AT_DESC:"Criado: mais recente primeiro",CREATED_AT_ASC:"Criado: mais antigo primeiro"},filter:{createdBy:{label:"Criado por",selectedLabel:"Criado por: {{ selected }}",searchPlaceholder:"Pesquisar pessoas\u2026",noResultPlaceholder:"Sem resultados"},workspaces:{label:"\xc1rea de trabalho",selectedLabel:"\xc1rea de trabalho: {{ selected }}",searchPlaceholder:"Pesquisar \xe1reas de trabalho\u2026",noResultPlaceholder:"Sem resultados"},blabDefs:{label:"Aplicativo",selectedLabel:"Aplicativo: {{ selected }}",searchPlaceholder:"Pesquisar aplicativos\u2026",noResultPlaceholder:"Sem resultados"},date:{label:"Data",createdAt:"Criado",lastModifiedAt:"\xdaltima modifica\xe7\xe3o",today:"Hoje",last7Days:"\xdaltimos 7 dias",last30Days:"\xdaltimos 30 dias",delete:"Excluir",createdAtSelected:{today:"Criado: hoje",last7Days:"Criado: \xfaltimos 7 dias",last30Days:"Criado: \xfaltimos 30 dias"},lastModifiedAtSelected:{today:"\xdaltima modifica\xe7\xe3o: hoje",last7Days:"\xdaltima modifica\xe7\xe3o: \xfaltimos 7 dias",last30Days:"\xdaltima modifica\xe7\xe3o: \xfaltimos 30 dias"}}}
1,category:{today:"Hoje",yesterday:"Ontem",lastWeek:"Semana passada",last30Days:"\xdaltimos 30 dias",older:"Mais antigo",jumpBack:"Voltar",topResults:"Principais resultados",moreResults:"Mais resultados",oneResult:"{{ numResults }} resultado",manyResults:"{{ numResults }} resultados"},tooltip:{createdBy:"Criado por",lastModifiedBy:"\xdaltima edi\xe7\xe3o por"},breadcrumb:{blabDef:{database:"Banco de dados",dashboard:"Dashboard",form:"Formul\xe1rio"},blabItem:"{{ itemName }}"},archived:"Arquivado",footer:{choose:"Escolher",open:"Abrir",openInNewTab:"Abrir em nova aba"}}});var y=r(233),_e=r(10224),Y=r(28579),ge=r(34320),ee=r(11282),v=r(44813),pt=r(88928),u=(r(96918),r(63866)),oe=r(23554),sn=r(37749),rn=r(21039),le=r(13043),we=r(35532);const or=["dropdownOverlayTrigger"];function ar(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",7),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.selectedIdChange.emit({selectedId:s.id}))}),e._uU(2),e._UZ(3,"t5s-svg",3),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(2).ngIf,o=e.oxw();e.xp6(1),e.Udp("justify-content","space-between")("user-select","none")("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 10px 0px 12px"),e.Q6J("t5sDropdownItem",t.id),e.xp6(1),e.hij(" ",t.label," "),e.xp6(1),e.Udp("visibility",t.id===i.selectedId?"visible":"hidden")("margin-left",10,"px"),e.Q6J("icon",o.IconCheck)("size",18)("fgColor",o.rgba(o.Color.black,1))}}function lp(a,n){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ar,4,25,"ng-container",6),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("padding","6px 0px")("min-width",180,"px"),e.xp6(1),e.Q6J("ngForOf",t.options)("ngForTrackBy",i.trackById)}}const cp=function(a,n,t){return{default:a,hover:n,active:t}};function pp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",1,2),e.NdJ("overlayOpenChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.menuOpenChange.emit({menuOpen:o.overlayOpen}))}),e.ALo(4,"push"),e._UZ(5,"t5s-svg",3),e.TgZ(6,"span",4),e._uU(7),e.qZA(),e._UZ(8,"t5s-svg",3),e.qZA(),e.YNc(9,lp,2,6,"ng-template",null,5,e.W1O),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(10),o=e.oxw();e.xp6(1),e.Udp("max-width",100,"%")("width","fit-content")("display","flex")("flex-direction","row")("align-items","center")("justify-content","center")("border-radius",32,"px")("font-size",14,"px")("line-height",24,"px")("height",24,"px")("white-space","nowrap")("padding","0px 8px")("border","1px solid "+(t.isActive?o.Color.blueBright1:o.rgba(o.Color.black,.16)))("color",t.isActive?o.Color.blueBright1:o.rgba(o.Color.black,.65))("user-select","none"),e.Q6J("t5sClickableElement",e.kEZ(63,cp,t.isActive?o.rgba(o.Color.blueBright1,.03):o.rgba(o.Color.black,0),t.isActive?o.rgba(o.Color.blueBright1,.07):o.rgba(o.Color.black,.06),t.isActive?o.rgba(o.Color.blueBright1,.14):o.rgba(o.Color.black,.16)))("t5sDropdownOverlay",e.lcZ(4,61,o.overlayComponent$)||i)("dropdownOverlaySelectedItemId",t.selectedId)("dropdownOverlayBgColor",t.isActive?o.rgba(o.Color.blueBright1,.07):o.rgba(o.Color.black,.06))("dropdownOverlayPosition","bottom-right"),e.xp6(4),e.Udp("margin-right",5,"px"),e.Q6J("icon",t.icon)("size",16)("fgColor",t.isActive?o.Color.blueBright1:o.rgba(o.Color.black,.65)),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("max-width",220,"px"),e.Q6J("title",t.selectedLabel),e.xp6(1),e.Oqu(t.selectedLabel),e.xp6(1),e.Udp("margin-left",4,"px")("margin-top",1,"px"),e.Q6J("icon",o.IconChevronDown)("size",18)("fgColor",t.isActive?o.Color.blueBright1:o.rgba(o.Color.black,.35))}}class xt extends _e.A{constructor(){super(),this.IconCheck=y.NOm,this.IconChevronDown=y.C26,this.selectedIdChange=new e.vpe,this.menuOpenChange=new e.vpe,this.context$=this.select((0,v.Cc)(["icon","options","selectedId"]),(0,p.U)(n=>{const{icon:t,options:i,selectedId:o}=n;return{icon:t,options:i,selectedId:o,isActive:this.isActive(n),selectedLabel:this.getSelectedLabel(n)}})),this.overlayComponent$=this.select((0,v.Cc)(["overlayComponent"]),(0,p.U)(({overlayComponent:n})=>n),(0,pt.O)(!1)),this.set({options:[]})}set icon(n){this.setProperty("icon",n)}set selectedId(n){this.setProperty("selectedId",n)}set options(n){this.setProperty("options",n)}set overlayComponent(n){this.setProperty("overlayComponent",n)}isActive(n){return n.selectedId!==(n.options??[])[0]?.id}getSelectedLabel(n){const t=n.options?.find(i=>i.id===n.selectedId);return t?.selectedLabel??t?.label}closeOverlay(){this.dropdownOverlayTrigger?.closeOverlay()}static#e=this.\u0275fac=function(t){return new(t||xt)};static#t=this.\u0275cmp=e.Xpm({type:xt,selectors:[["t5s-global-search-filter"]],viewQuery:function(t,i){if(1&t&&e.Gf(or,5),2&t){let o;e.iGM(o=e.CRH())&&(i.dropdownOverlayTrigger=o.first)}},inputs:{icon:"icon",selectedId:"selectedId",options:"options",overlayComponent:"overlayComponent"},outputs:{selectedIdChange:"selectedIdChange",menuOpenChange:"menuOpenChange"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"t5sClickableElement","t5sDropdownOverlay","dropdownOverlaySelectedItemId","dropdownOverlayBgColor","dropdownOverlayPosition","overlayOpenChange"],["dropdownEl","","dropdownOverlayTrigger","t5sDropdownOverlay"],[3,"icon","size","fgColor"],[3,"title"],["filterOverlay",""],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"t5sDropdownItem","click"]],template:function(t,i){1&t&&(e.YNc(0,pp,11,67,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.context$))},dependencies:[u.sg,u.O5,oe.v,sn.H,rn.H,le.H,we.f],encapsulation:2,changeDetection:0})}var sr=r(9306),zn=r(78047),Ki=r(34586),wn=r(93933),Qn=r(80515),pa=r(94331),da=r(14880);const dp=["searchInput"],_p=function(a){return{id:!1,label:a}},up=function(a){return{id:!0,label:a}},hp=function(a,n){return[a,n]};function gp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-global-search-filter",2,3),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw();return s.set({searchQuery:"",activeIndex:0}),e.KtG(s.menuOpenChange.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw(),o=e.MAs(3);e.xp6(1),e.Q6J("overlayComponent",o)("icon",i.IconApp)("selectedId",t.selectedId)("options",e.WLB(8,hp,e.VKq(4,_p,i.I18n.translate(i.i18n,i.I18n.key.filter.blabDefs.label)),e.VKq(6,up,t.label)))}}const mp=function(a,n){return{blabDef:a,i18n:n}};function fp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",11),e.NdJ("mousedown",function(o){return o.preventDefault()}),e.TgZ(2,"div",12)(3,"div",13),e._UZ(4,"t5s-blab-def-icon",14),e.qZA(),e.TgZ(5,"div",15),e._uU(6),e.qZA()(),e._UZ(7,"div",15),e.TgZ(8,"button",16),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.removeBlabDef({blabDefId:s.id}))}),e._UZ(9,"t5s-svg",17),e.qZA()(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(3);e.xp6(4),e.Q6J("size",18)("blabDef",t),e.xp6(2),e.hij(" ",i.getBlabDefDisplayName(e.WLB(6,mp,t,i.i18n))," "),e.xp6(3),e.Q6J("size",16)("icon",i.IconCloseSmall)("fgColor",i.rgba(i.Color.black,.35))}}function xp(a,n){if(1&a&&(e.ynx(0),e.YNc(1,fp,10,9,"ng-container",10),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById)}}function bp(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("mousedown",function(o){return o.preventDefault()})("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleClear())}),e._UZ(1,"t5s-svg",17),e.qZA()}if(2&a){const t=e.oxw(2);e.Udp("border-radius",9999,"px")("margin-top",2,"px"),e.xp6(1),e.Q6J("size",14)("icon",t.IconClearInput)("fgColor",t.rgba(t.Color.black,.35))}}function Cp(a,n){if(1&a&&(e.TgZ(0,"div",21)(1,"div",22)(2,"div",23)(3,"div",24)(4,"span"),e._uU(5),e.qZA()()()()()),2&a){const t=e.oxw(4);e.xp6(4),e.Udp("color",t.rgba(t.Color.black,.65)),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.filter.blabDefs.noResultPlaceholder))}}function vp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",27),e.NdJ("mousemove",function(){const s=e.CHM(t).index,l=e.oxw(5);return e.KtG(l.set({activeIndex:s}))})("click",function(){e.CHM(t);const o=e.oxw(5);return e.KtG(o.confirmActiveIndex())}),e.TgZ(2,"div"),e._UZ(3,"t5s-blab-def-icon",14),e.qZA(),e.TgZ(4,"div")(5,"div"),e._uU(6),e.qZA()()(),e.BQk()}if(2&a){const t=n.$implicit,i=n.index,o=e.oxw(3).ngIf;e.xp6(1),e.Udp("width","calc(100% - 8px)")("display","flex")("align-items","center")("line-height","120%")("blab-def-select","none")("min-height","28px")("font-size","14px")("cursor","pointer")("margin-left","4px")("margin-right","4px")("border-radius","6px"),e.Q6J("disableHover",!0)("isActive",o.activeIndex===i),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("margin-left","10px")("margin-right","4px"),e.xp6(1),e.Q6J("size",18)("blabDef",t),e.xp6(1),e.Udp("margin-left","6px")("margin-right","12px")("min-width","0px")("flex","1 1 auto"),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",t.displayName," ")}}function Ip(a,n){if(1&a&&(e.TgZ(0,"cdk-virtual-scroll-viewport",25),e._UZ(1,"div"),e.YNc(2,vp,7,51,"ng-container",26),e._UZ(3,"div"),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw(3);e.Udp("overflow-x","hidden")("height",28*t.length+6+6,"px")("max-height","min(35vh, 322px)"),e.Q6J("itemSize",28),e.xp6(1),e.Udp("height",6,"px"),e.xp6(1),e.Q6J("cdkVirtualForOf",t)("cdkVirtualForTrackBy",i.trackById),e.xp6(1),e.Udp("height",6,"px")}}function yp(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Cp,6,3,"div",19),e.YNc(2,Ip,4,13,"cdk-virtual-scroll-viewport",20),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",0===t.length),e.xp6(1),e.Q6J("ngIf",t.length>0)}}function kp(a,n){if(1&a&&(e.ynx(0),e.YNc(1,yp,3,2,"ng-container",0),e.ALo(2,"push"),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t.listItems$))}}function wp(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"div")(2,"div",4)(3,"div"),e.YNc(4,xp,2,2,"ng-container",0),e.ALo(5,"push"),e.TgZ(6,"div",5)(7,"input",6,7),e.NdJ("valueChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.searchQueryChange({searchQuery:o.value}))})("keydown.escape",function(o){e.CHM(t);const s=e.oxw();return o.preventDefault(),o.stopPropagation(),e.KtG(null==s.blabDefsFilter?null:s.blabDefsFilter.closeOverlay())})("keydown.arrowdown",function(o){e.CHM(t);const s=e.oxw();
1return e.KtG(s.moveActiveIndex(o,1))})("keydown.arrowup",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,-1))})("keydown.enter",function(o){e.CHM(t);const s=e.oxw();return o.preventDefault(),e.KtG(s.confirmActiveIndex())})("keydown.tab",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,1))})("keydown.shift.tab",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,-1))})("t5sDistinctBackspace",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removeLast())})("keydown.space",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleInputSpaceKeydown(o))})("keyup.space",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleInputSpaceKeyup(o))})("t5sElementRendered",function(o){return o.element.focus()}),e.ALo(9,"push"),e.qZA()()(),e.TgZ(10,"div"),e.YNc(11,bp,2,7,"button",8),e.ALo(12,"push"),e.qZA()()(),e.TgZ(13,"div",9),e.NdJ("mousedown",function(o){return o.preventDefault()}),e.YNc(14,kp,3,3,"ng-container",0),e.ALo(15,"push"),e.qZA()()}if(2&a){const t=e.oxw();e.Udp("height",100,"%")("width",250,"px")("min-width",180,"px")("max-width","calc(100vw - 24px)"),e.xp6(1),e.Udp("width",100,"%")("padding","6px 8px 2px 8px"),e.xp6(1),e.Udp("display","flex")("flex-wrap","nowrap")("align-items","flex-start")("background",t.rgba(t.Color.grey1,.6))("cursor","text")("overflow","auto")("padding","6px 6px 1px")("min-height","30px")("font-size","14px")("border-radius","6px")("max-height","20vh")("z-index","1"),e.xp6(1),e.Udp("display","flex")("flex-wrap","wrap")("flex-grow","1")("min-width","0px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,56,t.selectedBlabDefs$)),e.xp6(3),e.Udp("width",100,"%")("background-color","transparent"),e.Q6J("placeholder",e.lcZ(9,58,t.showClearBtn$)?"":t.I18n.translate(t.i18n,t.I18n.key.filter.blabDefs.searchPlaceholder)),e.xp6(3),e.Udp("flex-shrink",0),e.xp6(1),e.Q6J("ngIf",e.lcZ(12,60,t.showClearBtn$)),e.xp6(2),e.Udp("width",100,"%"),e.xp6(1),e.Q6J("ngIf",e.lcZ(15,62,t.activeIndexWrapper$))}}class ji extends _e.A{constructor(){super(),this.I18n=Te,this.IconApp=y.X43,this.IconClearInput=y.YvQ,this.IconCloseSmall=y.$kn,this.getBlabDefDisplayName=H.fM,this.menuOpenChange=new e.vpe,this.selectedBlabDefIdsChange=new e.vpe,this.showClearBtn$=this.select((0,$.Cc)(["searchQuery","selectedBlabDefIds"]),(0,p.U)(({searchQuery:n,selectedBlabDefIds:t})=>!!n||t.length>0),(0,w.x)(),(0,Y.d)({bufferSize:1,refCount:!0})),this.blabDefs$=this.select((0,$.Cc)(["blabDefs"]),(0,p.U)(({blabDefs:n})=>n.map(t=>({...t,displayName:(0,H.fM)({blabDef:t,i18n:this.i18n})})))),this.filterBadge$=this.select((0,$.Cc)(["blabDefs","selectedBlabDefIds"]),(0,p.U)(({blabDefs:n,selectedBlabDefIds:t})=>{const i=t.map(o=>(0,H.Kz)({blabDefs:n,blabDefId:o})).filter(ee.lm);return 0===i.length?{selectedId:!1,label:""}:{selectedId:!0,label:this.I18n.translate(this.i18n,{key:this.I18n.key.filter.blabDefs.selectedLabel,params:{selected:i.map(o=>(0,H.fM)({blabDef:o,i18n:this.i18n})).join(", ")}})}})),this.selectedBlabDefs$=this.select((0,$.Cc)(["blabDefs","selectedBlabDefIds"]),(0,p.U)(({blabDefs:n,selectedBlabDefIds:t})=>t.map(i=>(0,H.Kz)({blabDefs:n,blabDefId:i})).filter(ee.lm))),this.listItems$=(0,V.aj)([this.blabDefs$,this.select((0,$.Cc)(["searchQuery","selectedBlabDefIds"]))]).pipe((0,p.U)(([n,{searchQuery:t,selectedBlabDefIds:i}])=>{const o=ge.T.filter(t,n,{extract:s=>`${s.displayName}`}).map(({original:s})=>s).filter(s=>!i.includes(s.id));return this.set({listItems:o}),o})),this.activeIndexWrapper$=this.select((0,$.Cc)(["activeIndex"])),this.set({searchQuery:"",activeIndex:0,blabDefs:[],listItems:[],selectedBlabDefIds:[]})}set blabDefs(n){this.setProperty("blabDefs",n)}set selectedBlabDefIds(n){this.setProperty("selectedBlabDefIds",n)}confirmActiveIndex(){const{activeIndex:n,listItems:t,selectedBlabDefIds:i}=this.get(),o=t[n]?.id;if(o){if(i.includes(o)){const l=i.filter(d=>d!==o);this.selectedBlabDefIdsChange.emit({selectedBlabDefIds:l})}else{const l=[...i,o];this.selectedBlabDefIdsChange.emit({selectedBlabDefIds:l})}this.clearInput()}}moveActiveIndex(n,t){n.preventDefault(),n.stopPropagation();const{activeIndex:i,listItems:o}=this.get();let s=(i+t)%o.length;s=s<0?o.length+s:s,this.set({activeIndex:s}),this.scrollToIndex(s)}removeLast(){const{listItems:n,selectedBlabDefIds:t}=this.get();n.length>0&&this.selectedBlabDefIdsChange.emit({selectedBlabDefIds:[...t].slice(0,-1)})}removeBlabDef({blabDefId:n}){const{selectedBlabDefIds:t}=this.get(),i=t.filter(o=>o!==n);this.selectedBlabDefIdsChange.emit({selectedBlabDefIds:i})}handleClear(){this.set({searchQuery:""}),this.selectedBlabDefIdsChange.emit({selectedBlabDefIds:[]});const n=this.searchInputRef?.nativeElement;!n||(n.value="",n.focus())}searchQueryChange({searchQuery:n}){this.set({searchQuery:n,activeIndex:0}),this.scrollToIndex(0)}clearInput(){const n=this.searchInputRef?.nativeElement;!n||(n.value="")}scrollToIndex(n){const i=Math.max(0,28*n-161);this.cdkViewport?.scrollTo({behavior:"auto",top:i}
1)}handleInputSpaceKeydown(n){(n.target.value??"").trim()||n.preventDefault()}handleInputSpaceKeyup(n){(n.target.value??"").trim()||(n.preventDefault(),this.confirmActiveIndex())}static#e=this.\u0275fac=function(t){return new(t||ji)};static#t=this.\u0275cmp=e.Xpm({type:ji,selectors:[["t5s-global-search-blab-defs-filter"]],viewQuery:function(t,i){if(1&t&&(e.Gf(dp,5),e.Gf(ve.N7,5),e.Gf(xt,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.searchInputRef=o.first),e.iGM(o=e.CRH())&&(i.cdkViewport=o.first),e.iGM(o=e.CRH())&&(i.blabDefsFilter=o.first)}},inputs:{blabDefs:"blabDefs",selectedBlabDefIds:"selectedBlabDefIds"},outputs:{menuOpenChange:"menuOpenChange",selectedBlabDefIdsChange:"selectedBlabDefIdsChange"},features:[e.qOj],decls:4,vars:3,consts:[[4,"ngIf"],["blabDefsFilterOverlay",""],[3,"overlayComponent","icon","selectedId","options","menuOpenChange"],["blabDefsFilter",""],["t5sInputElementBorder",""],[2,"display","flex","align-items","center","border","none","padding","0px","width","auto","background","transparent","font-size","inherit","line-height","20px","flex","1 1 60px","min-width","60px","margin","0px 6px 4px 0px"],["t5sInputElement","","type","text","size","1",2,"font-size","inherit","line-height","inherit","border","none","background","none","width","100%","display","block","resize","none","padding","0px","height","18px",3,"placeholder","valueChange","keydown.escape","keydown.arrowdown","keydown.arrowup","keydown.enter","keydown.tab","keydown.shift.tab","t5sDistinctBackspace","keydown.space","keyup.space","t5sElementRendered"],["searchInput",""],["t5sClickableElement","",3,"border-radius","margin-top","mousedown","click",4,"ngIf"],[3,"mousedown"],[4,"ngFor","ngForOf","ngForTrackBy"],[2,"display","flex","align-items","center","flex-shrink","1","min-width","0px","height","18px","border-radius","6px","font-size","12px","line-height","120%","margin","0px 6px 6px 0px","background","transparent",3,"mousedown"],[2,"display","flex","align-items","center","min-width","0px"],[2,"margin-right","6px","align-self","center"],[3,"size","blabDef"],[1,"notranslate",2,"white-space","nowrap","overflow","hidden","text-overflow","ellipsis"],["t5sClickableElement","",2,"blab-def-select","none","transition","background 20ms ease-in 0s","cursor","pointer","display","flex","align-items","center","justify-content","center","width","18px","height","18px","margin-left","2px","margin-right","2px","flex-grow","0","flex-shrink","0","border-radius","6px",3,"click"],[3,"size","icon","fgColor"],["t5sClickableElement","",3,"mousedown","click"],["style","padding-top: 6px; padding-bottom: 6px;",4,"ngIf"],["t5sVerticalVirtualScrollViewport","","t5sDynamicHeightVirtualScrollViewport","",3,"overflowX","height","max-height","itemSize",4,"ngIf"],[2,"padding-top","6px","padding-bottom","6px"],[2,"display","flex","align-items","center","line-height","120%","width","100%","blab-def-select","none","min-height","28px","font-size","14px"],[2,"margin-left","12px","margin-right","12px","min-width","0px","flex","1 1 auto"],[2,"white-space","nowrap","overflow","hidden","text-overflow","ellipsis"],["t5sVerticalVirtualScrollViewport","","t5sDynamicHeightVirtualScrollViewport","",3,"itemSize"],[4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],["t5sClickableElement","",3,"disableHover","isActive","mousemove","click"]],template:function(t,i){1&t&&(e.YNc(0,gp,3,11,"ng-container",0),e.ALo(1,"push"),e.YNc(2,wp,16,64,"ng-template",null,1,e.W1O)),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.filterBadge$))},dependencies:[u.sg,u.O5,sr.s,zn.y,Ki.E,oe.v,wn.v,le.H,ve.xd,ve.x0,ve.N7,Qn.p,pa.R,da.H,xt,we.f],encapsulation:2,changeDetection:0})}var $e=r(82091),_a=r(8689);const Sp=["searchInput"],Tp=function(a){return{id:!1,label:a}},Ap=function(a){return{id:!0,label:a}},Up=function(a,n){return[a,n]};function Op(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-global-search-filter",2,3),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw();return s.set({searchQuery:"",activeIndex:0}),e.KtG(s.menuOpenChange.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw(),o=e.MAs(3);e.xp6(1),e.Q6J("overlayComponent",o)("icon",i.IconPersonOutline)("selectedId",t.selectedId)("options",e.WLB(8,Up,e.VKq(4,Tp,i.I18n.translate(i.i18n,i.I18n.key.filter.createdBy.label)),e.VKq(6,Ap,t.label)))}}const Ep=function(a,n){return{user:a,i18n:n}};function Dp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",11),e.NdJ("mousedown",function(o){return o.preventDefault()}),e.TgZ(2,"div",12)(3,"div",13),e._UZ(4,"t5s-user-profile-picture",14),e.qZA(),e.TgZ(5,"div",15),e._uU(6),e.qZA()(),e._UZ(7,"div",15),e.TgZ(8,"button",16),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.removeUser({userId:s.id}))}),e._UZ(9,"t5s-svg",17),e.qZA()(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(3);e.xp6(4),e.Q6J("size",20)("user",t),e.xp6(2),e.hij(" ",i.getUserDisplayName(e.WLB(6,Ep,t,i.i18n))," "),e.xp6(3),e.Q6J("size",16)("icon",i.IconCloseSmall)("fgColor",i.rgba(i.Color.black,.35))}}function Bp(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Dp,10,9,"ng-container",10),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById)}}function Mp(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("mousedown",function(o){return o.preventDefault()})("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleClear())}),e._UZ(1,"t5s-svg",17),e.qZA()}if(2&a){const t=e.oxw(2);e.Udp("border-radius",9999,"px")("margin-top",2,"px"),e.xp6(1),e.Q6J("size",14)("icon",t.IconClearInput)("fgColor",t.rgba(t.Color.black,.35))}}function Zp(a,n){if(1&a&&(e.TgZ(0,"div",21)(1,"div",22)(2,"div",23)(3,"div",24)(4,"span"),e._uU(5),e.qZA()()()()()),2&a){const t=e.oxw(4);e.xp6(4),e.Udp("color",t.rgba(t.Color.black,.65)),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.filter.createdBy.noResultPlaceholder))}}function Lp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",27),e.NdJ("mousemove",function(){const s=e.CHM(t).index,l=e.oxw(5);return e.KtG(l.set({activeIndex:s}))})("click",function(){e.CHM(t);const o=e.oxw(5);return e.KtG(o.confirmActiveIndex())}),e.TgZ(2,"div"),e._UZ(3,"t5s-user-profile-picture",14),e.qZA(),e.TgZ(4,"div")(5,"div"),e._uU(6),e.qZA()()(),e.BQk()}if(2&a){const t=n.$implicit,i=n.index,o=e.oxw(3).ngIf;e.xp6(1),e.Udp("width","calc(100% - 8px)")("display","flex")("align-items","center")("line-height","120%")("user-select","none")("min-height","28px")("font-size","14px")("cursor","pointer")("margin-left","4px")("margin-right","4px")("border-radius","6px"),e.Q6J("disableHover",!0)("isActive",o.activeIndex===i),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("margin-left","10px")("margin-right","4px"),e.xp6(1),e.Q6J("size",20)("user",t),e.xp6(1),e.Udp("margin-left","6px")("margin-right","12px")("min-width","0px")("flex","1 1 auto"),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",t.displayName," ")}}function Np(a,n){if(1&a&&(e.TgZ(0,"cdk-virtual-scroll-viewport",25),e._UZ(1,"div"),e.YNc(2,Lp,7,51,"ng-container",26),e._UZ(3,"div"),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw(3);e.Udp("overflow-x","hidden")("height",28*t.length+6+6,"px")("max-height","min(35vh, 322px)"),e.Q6J("itemSize",28),e.xp6(1),e.Udp("height",6,"px"),e.xp6(1),e.Q6J("cdkVirtualForOf",t)("cdkVirtualForTrackBy",i.trackById),e.xp6(1),e.Udp("height",6,"px")}}function Rp(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Zp,6,3,"div",19),e.YNc(2,Np,4,13,"cdk-virtual-scroll-viewport",20),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",0===t.length),e.xp6(1),e.Q6J("ngIf",t.length>0)}}function Pp(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Rp,3,2,"ng-container",0),e.ALo(2,"push"),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t.listItems$))}}function $p(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"div")(2,"div",4)(3,"div"),e.YNc(4,Bp,2,2,"ng-container",0),e.ALo(5,"push"),e.TgZ(6,"div",5)(7,"input",6,7),e.NdJ("valueChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.searchQueryChange({searchQuery:o.value}))})("keydown.escape",function(o){e.CHM(t);const s=e.oxw();return o.preventDefault(),o.stopPropagation(),e.KtG(null==s.createdByFilter?null:s.createdByFilter.closeOverlay())})("keydown.arrowdown",function(o){e.CHM(t);const s=e.oxw();
1return e.KtG(s.moveActiveIndex(o,1))})("keydown.arrowup",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,-1))})("keydown.enter",function(o){e.CHM(t);const s=e.oxw();return o.preventDefault(),e.KtG(s.confirmActiveIndex())})("keydown.tab",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,1))})("keydown.shift.tab",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,-1))})("t5sDistinctBackspace",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removeLast())})("keydown.space",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleInputSpaceKeydown(o))})("keyup.space",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleInputSpaceKeyup(o))})("t5sElementRendered",function(o){return o.element.focus()}),e.ALo(9,"push"),e.qZA()()(),e.TgZ(10,"div"),e.YNc(11,Mp,2,7,"button",8),e.ALo(12,"push"),e.qZA()()(),e.TgZ(13,"div",9),e.NdJ("mousedown",function(o){return o.preventDefault()}),e.YNc(14,Pp,3,3,"ng-container",0),e.ALo(15,"push"),e.qZA()()}if(2&a){const t=e.oxw();e.Udp("height",100,"%")("width",250,"px")("min-width",180,"px")("max-width","calc(100vw - 24px)"),e.xp6(1),e.Udp("width",100,"%")("padding","6px 8px 2px 8px"),e.xp6(1),e.Udp("display","flex")("flex-wrap","nowrap")("align-items","flex-start")("background",t.rgba(t.Color.grey1,.6))("cursor","text")("overflow","auto")("padding","6px 6px 1px")("min-height","30px")("font-size","14px")("border-radius","6px")("max-height","20vh")("z-index","1"),e.xp6(1),e.Udp("display","flex")("flex-wrap","wrap")("flex-grow","1")("min-width","0px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,56,t.selectedUsers$)),e.xp6(3),e.Udp("width",100,"%")("background-color","transparent"),e.Q6J("placeholder",e.lcZ(9,58,t.showClearBtn$)?"":t.I18n.translate(t.i18n,t.I18n.key.filter.createdBy.searchPlaceholder)),e.xp6(3),e.Udp("flex-shrink",0),e.xp6(1),e.Q6J("ngIf",e.lcZ(12,60,t.showClearBtn$)),e.xp6(2),e.Udp("width",100,"%"),e.xp6(1),e.Q6J("ngIf",e.lcZ(15,62,t.activeIndexWrapper$))}}class qi extends _e.A{constructor(){super(),this.I18n=Te,this.IconPersonOutline=y.aS5,this.IconClearInput=y.YvQ,this.IconCloseSmall=y.$kn,this.getUserDisplayName=$e.b3,this.menuOpenChange=new e.vpe,this.selectedUserIdsChange=new e.vpe,this.showClearBtn$=this.select((0,$.Cc)(["searchQuery","selectedUserIds"]),(0,p.U)(({searchQuery:n,selectedUserIds:t})=>!!n||t.length>0),(0,w.x)()),this.users$=this.select((0,$.Cc)(["users"]),(0,p.U)(({users:n})=>n.map(t=>({...t,displayName:(0,$e.b3)({user:t,i18n:this.i18n})})))),this.filterBadge$=this.select((0,$.Cc)(["users","selectedUserIds"]),(0,p.U)(({users:n,selectedUserIds:t})=>{const i=t.map(o=>(0,$e.tj)({users:n,userId:o})).filter(ee.lm);return 0===i.length?{selectedId:!1,label:""}:{selectedId:!0,label:this.I18n.translate(this.i18n,{key:this.I18n.key.filter.createdBy.selectedLabel,params:{selected:i.map(o=>(0,$e.b3)({user:o,i18n:this.i18n})).join(", ")}})}})),this.selectedUsers$=this.select((0,$.Cc)(["users","selectedUserIds"]),(0,p.U)(({users:n,selectedUserIds:t})=>t.map(i=>(0,$e.tj)({users:n,userId:i})).filter(ee.lm))),this.listItems$=(0,V.aj)([this.users$,this.select((0,$.Cc)(["searchQuery","selectedUserIds"]))]).pipe((0,p.U)(([n,{searchQuery:t,selectedUserIds:i}])=>{const o=ge.T.filter(t,n,{extract:s=>`${s.displayName} ${s.info.email}`}).map(({original:s})=>s).filter(s=>!i.includes(s.id));return this.set({listItems:o}),o})),this.activeIndexWrapper$=this.select((0,$.Cc)(["activeIndex"])),this.set({searchQuery:"",activeIndex:0,users:[],listItems:[],selectedUserIds:[]})}set users(n){this.setProperty("users",n)}set selectedUserIds(n){this.setProperty("selectedUserIds",n)}confirmActiveIndex(){const{activeIndex:n,listItems:t,selectedUserIds:i}=this.get(),o=t[n]?.id;if(o){if(i.includes(o)){const l=i.filter(d=>d!==o);this.selectedUserIdsChange.emit({selectedUserIds:l})}else{const l=[...i,o];this.selectedUserIdsChange.emit({selectedUserIds:l})}this.clearInput()}}moveActiveIndex(n,t){n.preventDefault(),n.stopPropagation();const{activeIndex:i,listItems:o}=this.get();let s=(i+t)%o.length;s=s<0?o.length+s:s,this.set({activeIndex:s}),this.scrollToIndex(s)}removeLast(){const{listItems:n,selectedUserIds:t}=this.get();n.length>0&&this.selectedUserIdsChange.emit({selectedUserIds:[...t].slice(0,-1)})}removeUser({userId:n}){const{selectedUserIds:t}=this.get(),i=t.filter(o=>o!==n);this.selectedUserIdsChange.emit({selectedUserIds:i})}handleClear(){this.set({searchQuery:""}),this.selectedUserIdsChange.emit({selectedUserIds:[]});const n=this.searchInputRef?.nativeElement;!n||(n.value="",n.focus())}searchQueryChange({searchQuery:n}){this.set({searchQuery:n,activeIndex:0}),this.scrollToIndex(0)}clearInput(){const n=this.searchInputRef?.nativeElement;!n||(n.value="")}scrollToIndex(n){const i=Math.max(0,28*n-161);this.cdkViewport?.scrollTo({behavior:"auto",top:i}
1)}handleInputSpaceKeydown(n){(n.target.value??"").trim()||n.preventDefault()}handleInputSpaceKeyup(n){(n.target.value??"").trim()||(n.preventDefault(),this.confirmActiveIndex())}static#e=this.\u0275fac=function(t){return new(t||qi)};static#t=this.\u0275cmp=e.Xpm({type:qi,selectors:[["t5s-global-search-created-by-filter"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Sp,5),e.Gf(ve.N7,5),e.Gf(xt,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.searchInputRef=o.first),e.iGM(o=e.CRH())&&(i.cdkViewport=o.first),e.iGM(o=e.CRH())&&(i.createdByFilter=o.first)}},inputs:{users:"users",selectedUserIds:"selectedUserIds"},outputs:{menuOpenChange:"menuOpenChange",selectedUserIdsChange:"selectedUserIdsChange"},features:[e.qOj],decls:4,vars:3,consts:[[4,"ngIf"],["createdByFilterOverlay",""],[3,"overlayComponent","icon","selectedId","options","menuOpenChange"],["createdByFilter",""],["t5sInputElementBorder",""],[2,"display","flex","align-items","center","border","none","padding","0px","width","auto","background","transparent","font-size","inherit","line-height","20px","flex","1 1 60px","min-width","60px","margin","0px 6px 4px 0px"],["t5sInputElement","","type","text","size","1",2,"font-size","inherit","line-height","inherit","border","none","background","none","width","100%","display","block","resize","none","padding","0px","height","18px",3,"placeholder","valueChange","keydown.escape","keydown.arrowdown","keydown.arrowup","keydown.enter","keydown.tab","keydown.shift.tab","t5sDistinctBackspace","keydown.space","keyup.space","t5sElementRendered"],["searchInput",""],["t5sClickableElement","",3,"border-radius","margin-top","mousedown","click",4,"ngIf"],[3,"mousedown"],[4,"ngFor","ngForOf","ngForTrackBy"],[2,"display","flex","align-items","center","flex-shrink","1","min-width","0px","height","18px","border-radius","6px","font-size","12px","line-height","120%","margin","0px 6px 6px 0px","background","transparent",3,"mousedown"],[2,"display","flex","align-items","center","min-width","0px"],[2,"margin-right","6px","align-self","center"],[3,"size","user"],[1,"notranslate",2,"white-space","nowrap","overflow","hidden","text-overflow","ellipsis"],["t5sClickableElement","",2,"user-select","none","transition","background 20ms ease-in 0s","cursor","pointer","display","flex","align-items","center","justify-content","center","width","18px","height","18px","margin-left","2px","margin-right","2px","flex-grow","0","flex-shrink","0","border-radius","6px",3,"click"],[3,"size","icon","fgColor"],["t5sClickableElement","",3,"mousedown","click"],["style","padding-top: 6px; padding-bottom: 6px;",4,"ngIf"],["t5sVerticalVirtualScrollViewport","","t5sDynamicHeightVirtualScrollViewport","",3,"overflowX","height","max-height","itemSize",4,"ngIf"],[2,"padding-top","6px","padding-bottom","6px"],[2,"display","flex","align-items","center","line-height","120%","width","100%","user-select","none","min-height","28px","font-size","14px"],[2,"margin-left","12px","margin-right","12px","min-width","0px","flex","1 1 auto"],[2,"white-space","nowrap","overflow","hidden","text-overflow","ellipsis"],["t5sVerticalVirtualScrollViewport","","t5sDynamicHeightVirtualScrollViewport","",3,"itemSize"],[4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],["t5sClickableElement","",3,"disableHover","isActive","mousemove","click"]],template:function(t,i){1&t&&(e.YNc(0,Op,3,11,"ng-container",0),e.ALo(1,"push"),e.YNc(2,$p,16,64,"ng-template",null,1,e.W1O)),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.filterBadge$))},dependencies:[u.sg,u.O5,sr.s,zn.y,Ki.E,oe.v,wn.v,le.H,ve.xd,ve.x0,ve.N7,_a.p,pa.R,da.H,xt,we.f],encapsulation:2,changeDetection:0})}var se=r(22133),Fn=r(98810);const zp=function(a){return{id:!1,label:a}},Qp=function(a){return{id:!0,label:a}},Fp=function(a,n){return[a,n]};function Gp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-global-search-filter",2,3),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.menuOpenChange.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw(),o=e.MAs(3);e.xp6(1),e.Q6J("overlayComponent",o)("icon",i.IconCalendar)("selectedId",t.selectedId)("options",e.WLB(8,Fp,e.VKq(4,zp,i.I18n.translate(i.i18n,i.I18n.key.filter.date.label)),e.VKq(6,Qp,t.label)))}}function Jp(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.set({selectedDateType:"createdAt"}))}),e._uU(2),e.qZA(),e.TgZ(3,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.set({selectedDateType:"lastModifiedAt"}))}),e._uU(4),e.qZA()()}if(2&a){const t=e.oxw(3);e.Udp("padding","6px 0px"),e.xp6(1),e.Q6J("t5sDropdownItem","createdAt"),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.filter.date.createdAt),""),e.xp6(1),e.Q6J("t5sDropdownItem","lastModifiedAt"),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.filter.date.lastModifiedAt),"")}}function Hp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div")(3,"button",4)(4,"div"),e._uU(5),e.qZA(),e._UZ(6,"t5s-svg",5),e.qZA(),e.YNc(7,Jp,5,6,"ng-template",null,6,e.W1O),e.TgZ(9,"button",7),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleDeleteClick())}),e._uU(10),e.qZA()(),e.TgZ(11,"div")(12,"button",8),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleTodayClick())}),e._UZ(13,"t5s-svg",9),e.TgZ(14,"div"),e._uU(15),e.qZA()(),e.TgZ(16,"button",8),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleLast7DaysClick())}),e._UZ(17,"t5s-svg",9),e.TgZ(18,"div"),e._uU(19),e.qZA()(),e.TgZ(20,"button",8),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleLast30DaysClick())}),e._UZ(21,"t5s-svg",9),e.TgZ(22,"div"),e._uU(23),e.qZA()()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(8),o=e.oxw(2);e.xp6(1),e.Udp("height",100,"%")("max-height",40,"vh")("width",256,"px")("min-width",180,"px")("max-width","calc(100vw - 24px)")("padding","12px 0px 8px 0px"),e.xp6(1),e.Udp("width",100,"%")("display","flex")("flex-direction","row")("align-items","center")("justify-content","space-between")("padding","0p
1x 12px"),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("user-select","none")("border-radius",4,"px")("padding","2px 2px 2px 2px"),e.Q6J("t5sDropdownOverlay",i)("dropdownOverlaySelectedItemId",t.selectedDateType),e.xp6(1),e.Udp("font-weight",500)("font-size",13,"px")("line-height",17,"px")("color",o.rgba(o.Color.black,.65)),e.xp6(1),e.hij(" ",t.dateTypePickerLabel," "),e.xp6(1),e.Q6J("size",17)("icon",o.IconChevronDown)("fgColor",o.rgba(o.Color.black,.35)),e.xp6(3),e.Udp("border-radius",4,"px")("font-weight",500)("font-size",13,"px")("line-height",17,"px")("padding","2px 2px")("user-select","none")("color",o.rgba(o.Color.black,.65)),e.xp6(1),e.hij(" ",o.I18n.translate(o.i18n,o.I18n.key.filter.date.delete)," "),e.xp6(1),e.Udp("width",100,"%")("padding","12px 0px 0px 0px"),e.xp6(2),e.Udp("margin-right",10,"px"),e.Q6J("size",18)("fgColor",o.rgba(o.Color.black,1))("icon",o.IconCalendar),e.xp6(2),e.Oqu(o.I18n.translate(o.i18n,o.I18n.key.filter.date.today)),e.xp6(2),e.Udp("margin-right",10,"px"),e.Q6J("size",18)("fgColor",o.rgba(o.Color.black,1))("icon",o.IconCalendar),e.xp6(2),e.Oqu(o.I18n.translate(o.i18n,o.I18n.key.filter.date.last7Days)),e.xp6(2),e.Udp("margin-right",10,"px"),e.Q6J("size",18)("fgColor",o.rgba(o.Color.black,1))("icon",o.IconCalendar),e.xp6(2),e.Oqu(o.I18n.translate(o.i18n,o.I18n.key.filter.date.last30Days))}}function Vp(a,n){if(1&a&&(e.YNc(0,Hp,24,87,"ng-container",0),e.ALo(1,"push")),2&a){const t=e.oxw();e.Q6J("ngIf",e.lcZ(1,1,t.overlayContext$))}}class Xi extends _e.A{constructor(){super(),this.I18n=Te,this.IconCalendar=y.jt6,this.IconChevronDown=y.C26,this.menuOpenChange=new e.vpe,this.dateFilterChange=new e.vpe,this.filterBadge$=this.select((0,$.Cc)(["filterCreatedAt","filterLastModifiedAt"]),(0,p.U)(({filterCreatedAt:n,filterLastModifiedAt:t})=>{if(n)switch(n){case se.lE.LAST_24_HOURS:return{selectedId:!0,label:this.I18n.translate(this.i18n,this.I18n.key.filter.date.createdAtSelected.today)};case se.lE.LAST_7_DAYS:return{selectedId:!0,label:this.I18n.translate(this.i18n,this.I18n.key.filter.date.createdAtSelected.last7Days)};case se.lE.LAST_30_DAYS:return{selectedId:!0,label:this.I18n.translate(this.i18n,this.I18n.key.filter.date.createdAtSelected.last30Days)}}if(t)switch(t){case se.w4.LAST_24_HOURS:return{selectedId:!0,label:this.I18n.translate(this.i18n,this.I18n.key.filter.date.lastModifiedAtSelected.today)};case se.w4.LAST_7_DAYS:return{selectedId:!0,label:this.I18n.translate(this.i18n,this.I18n.key.filter.date.lastModifiedAtSelected.last7Days)};case se.w4.LAST_30_DAYS:return{selectedId:!0,label:this.I18n.translate(this.i18n,this.I18n.key.filter.date.lastModifiedAtSelected.last30Days)}}return{selectedId:!1,label:""}})),this.overlayContext$=this.select((0,$.Cc)(["selectedDateType"]),(0,p.U)(({selectedDateType:n})=>{let t=this.I18n.translate(this.i18n,this.I18n.key.filter.date.createdAt);return"lastModifiedAt"===n&&(t=this.I18n.translate(this.i18n,this.I18n.key.filter.date.lastModifiedAt)),{selectedDateType:n,dateTypePickerLabel:t}})),this.set({selectedDateType:"createdAt"})}set filterCreatedAt(n){this.setProperty("filterCreatedAt",n)}set filterLastModifiedAt(n){this.setProperty("filterLastModifiedAt",n)}handleTodayClick(){const{selectedDateType:n}=this.get();this.dateFilter?.closeOverlay(),this.dateFilterChange.emit("createdAt"===n?{filterCreatedAt:se.lE.LAST_24_HOURS,filterLastModifiedAt:null}:{filterCreatedAt:null,filterLastModifiedAt:se.w4.LAST_24_HOURS})}handleLast7DaysClick(){const{selectedDateType:n}=this.get();this.dateFilter?.closeOverlay(),this.dateFilterChange.emit("createdAt"===n?{filterCreatedAt:se.lE.LAST_7_DAYS,filterLastModifiedAt:null}:{filterCreatedAt:null,filterLastModifiedAt:se.w4.LAST_7_DAYS})}handleLast30DaysClick(){const{selectedDateType:n}=this.get();this.dateFilter?.closeOverlay(),this.dateFilterChange.emit("createdAt"===n?{filterCreatedAt:se.lE.LAST_30_DAYS,filterLastModifiedAt:null}:{filterCreatedAt:null,filterLastModifiedAt:se.w4.LAST_30_DAYS})}handleDeleteClick(){this.dateFilter?.closeOverlay(),this.dateFilterChange.emit({filterCreatedAt:null,filterLastModifiedAt:null})}static#e=this.\u0275fac=function(t){return new(t||Xi)};static#t=this.\u0275cmp=e.Xpm({type:Xi,selectors:[["t5s-global-search-date-filter"]],viewQuery:function(t,i){if(1&t&&e.Gf(xt,5),2&t){let o;e.iGM(o=e.CRH())&&(i.dateFilter=o.first)}},inputs:{filterCreatedAt:"filterCreatedAt",filterLastModifiedAt:"filterLastModifiedAt"},outputs:{menuOpenChange:"menuOpenChange",dateFilterChange:"dateFilterChange"},features:[e.qOj],decls:4,vars:3,consts:[[4,"ngIf"],["dateFilterOverlay",""],[3,"overlayComponent","icon","selectedId","options","menuOpenChange"],["dateFilter",""],["t5sClickableElement","",3,"t5sDropdownOverlay","dropdownOverlaySelectedItemId"],[3,"size","icon","fgColor"],["dateTypePickerOverlay",""],["t5sClickableElement","",3,"click"],["t5sMenuItem","",3,"click"],[3,"size","fgColor","icon"],[3,"t5sDropdownItem","click"]],template:function(t,i){1&t&&(e.YNc(0,Gp,3,11,"ng-container",0),e.ALo(1,"push"),e.YNc(2,Vp,2,3,"ng-template",null,1,e.W1O)),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.filterBadge$))},dependencies:[u.O5,oe.v,Fn.e,sn.H,rn.H,le.H,xt,we.f],encapsulation:2,changeDetection:0})}var Ge=r(81793),Cl=r(32321);const Wp=["searchInput"],Yp=function(a){return{id:!1,label:a}},Kp=function(a){return{id:!0,label:a}},jp=function(a,n){return[a,n]};function qp(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-global-search-filter",2,3),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw();return s.set({searchQuery:"",activeIndex:0}),e.KtG(s.menuOpenChange.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw(),o=e.MAs(3);e.xp6(1),e.Q6J("overlayComponent",o)("icon",i.IconOpenWorkspace)("selectedId",t.selectedId)("options",e.WLB(8,jp,e.VKq(4,Yp,i.I18n.translate(i.i18n,i.I18n.key.filter.workspaces.label)),e.VKq(6,Kp,t.label)))}}const Xp=function(a,n){return{workspace:a,i18n:n}};function ed(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",11),e.NdJ("mousedown",function(o){return o.preventDefault()}),e.TgZ(2,"div",12)(3,"div",13),e._UZ(4,"t5s-workspace-icon",14),e.qZA(),e.TgZ(5,"div",15),e._uU(6),e.qZA()(),e._UZ(7,"div",15),e.TgZ(8,"button",16),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.removeWorkspace({workspaceId:s.id}))}),e._UZ(9,"t5s-svg",17),e.qZA()(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(3);e.xp6(4),e.Udp("border-radius",.25,"em")("overflow","hidden"),e.Q6J("size",20)("workspace",t),e.xp6(2),e.hij(" ",i.getWorkspaceDisplayName(e.WLB(10,Xp,t,i.i18n))," "),e.xp6(3),e.Q6J("size",16)("icon",i.IconCloseSmall)("fgColor",i.rgba(i.Color.black,.35))}}function td(a,n){if(1&a&&(e.ynx(0),e.YNc(1,ed,10,13,"ng-container",10),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById)}}
1function nd(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("mousedown",function(o){return o.preventDefault()})("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleClear())}),e._UZ(1,"t5s-svg",17),e.qZA()}if(2&a){const t=e.oxw(2);e.Udp("border-radius",9999,"px")("margin-top",2,"px"),e.xp6(1),e.Q6J("size",14)("icon",t.IconClearInput)("fgColor",t.rgba(t.Color.black,.35))}}function id(a,n){if(1&a&&(e.TgZ(0,"div",21)(1,"div",22)(2,"div",23)(3,"div",24)(4,"span"),e._uU(5),e.qZA()()()()()),2&a){const t=e.oxw(4);e.xp6(4),e.Udp("color",t.rgba(t.Color.black,.65)),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.filter.workspaces.noResultPlaceholder))}}function od(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",27),e.NdJ("mousemove",function(){const s=e.CHM(t).index,l=e.oxw(5);return e.KtG(l.set({activeIndex:s}))})("click",function(){e.CHM(t);const o=e.oxw(5);return e.KtG(o.confirmActiveIndex())}),e.TgZ(2,"div"),e._UZ(3,"t5s-workspace-icon",14),e.qZA(),e.TgZ(4,"div")(5,"div"),e._uU(6),e.qZA()()(),e.BQk()}if(2&a){const t=n.$implicit,i=n.index,o=e.oxw(3).ngIf;e.xp6(1),e.Udp("width","calc(100% - 8px)")("display","flex")("align-items","center")("line-height","120%")("workspace-select","none")("min-height","28px")("font-size","14px")("cursor","pointer")("margin-left","4px")("margin-right","4px")("border-radius","6px"),e.Q6J("disableHover",!0)("isActive",o.activeIndex===i),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("margin-left","10px")("margin-right","4px"),e.xp6(1),e.Udp("border-radius",.25,"em")("overflow","hidden"),e.Q6J("size",20)("workspace",t),e.xp6(1),e.Udp("margin-left","6px")("margin-right","12px")("min-width","0px")("flex","1 1 auto"),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",t.displayName," ")}}function ad(a,n){if(1&a&&(e.TgZ(0,"cdk-virtual-scroll-viewport",25),e._UZ(1,"div"),e.YNc(2,od,7,55,"ng-container",26),e._UZ(3,"div"),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw(3);e.Udp("overflow-x","hidden")("height",28*t.length+6+6,"px")("max-height","min(35vh, 322px)"),e.Q6J("itemSize",28),e.xp6(1),e.Udp("height",6,"px"),e.xp6(1),e.Q6J("cdkVirtualForOf",t)("cdkVirtualForTrackBy",i.trackById),e.xp6(1),e.Udp("height",6,"px")}}function sd(a,n){if(1&a&&(e.ynx(0),e.YNc(1,id,6,3,"div",19),e.YNc(2,ad,4,13,"cdk-virtual-scroll-viewport",20),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",0===t.length),e.xp6(1),e.Q6J("ngIf",t.length>0)}}function rd(a,n){if(1&a&&(e.ynx(0),e.YNc(1,sd,3,2,"ng-container",0),e.ALo(2,"push"),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t.listItems$))}}function ld(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"div")(2,"div",4)(3,"div"),e.YNc(4,td,2,2,"ng-container",0),e.ALo(5,"push"),e.TgZ(6,"div",5)(7,"input",6,7),e.NdJ("valueChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.searchQueryChange({searchQuery:o.value}))})("keydown.escape",function(o){e.CHM(t);const s=e.oxw();return o.preventDefault(),o.stopPropagation(),e.KtG(null==s.workspacesFilter?null:s.workspacesFilter.closeOverlay())})("keydown.arrowdown",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,1))})("keydown.arrowup",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,-1))})("keydown.enter",function(o){e.CHM(t);const s=e.oxw();return o.preventDefault(),e.KtG(s.confirmActiveIndex())})("keydown.tab",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,1))})("keydown.shift.tab",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.moveActiveIndex(o,-1))})("t5sDistinctBackspace",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removeLast())})("keydown.space",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleInputSpaceKeydown(o))})("keyup.space",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleInputSpaceKeyup(o))})("t5sElementRendered",function(o){return o.element.focus()}),e.ALo(9,"push"),e.qZA()()(),e.TgZ(10,"div"),e.YNc(11,nd,2,7,"button",8),e.ALo(12,"push"),e.qZA()()(),e.TgZ(13,"div",9),e.NdJ("mousedown",function(o){return o.preventDefault()}),e.YNc(14,rd,3,3,"ng-container",0),e.ALo(15,"push"),e.qZA()()}if(2&a){const t=e.oxw();e.Udp("height",100,"%")("width",250,"px")("min-width",180,"px")("max-width","calc(100vw - 24px)"),e.xp6(1),e.Udp("width",100,"%")("padding","6px 8px 2px 8px"),e.xp6(1),e.Udp("display","flex")("flex-wrap","nowrap")("align-items","flex-start")("background",t.rgba(t.Color.grey1,.6))("cursor","text")("overflow","auto")("padding","6px 6px 1px")("min-height","30px")("font-size","14px")("border-radius","6px")("max-height","20vh")("z-index","1"),e.xp6(1),e.Udp("display","flex")("flex-wrap","wrap")("flex-grow","1")("min-width","0px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,56,t.selectedWorkspaces$)),e.xp6(3),e.Udp("width",100,"%")("background-color","transparent"),e.Q6J("placeholder",e.lcZ(9,58,t.showClearBtn$)?"":t.I18n.translate(t.i18n,t.I18n.key.filter.workspaces.searchPlaceholder)),e.xp6(3),e.Udp("flex-shrink",0),e.xp6(1),e.Q6J("ngIf",e.lcZ(12,60,t.showClearBtn$)),e.xp6(2),e.Udp("width",100,"%"),e.xp6(1),e.Q6J("ngIf",e.lcZ(15,62,t.activeIndexWrapper$))}}class eo extends _e.A{constructor(){super(),this.I18n=Te,this.IconOpenWorkspace=y.m3_,this.IconClearInput=y.YvQ,this.IconCloseSmall=y.$kn,this.getWorkspaceDisplayName=Ge.c8,this.menuOpenChange=new e.vpe,this.selectedWorkspaceIdsChange=new e.vpe,this.showClearBtn$=this.select((0,$.Cc)(["searchQuery","selectedWorkspaceIds"]),(0,p.U)(({searchQuery:n,selectedWorkspaceIds:t})=>!!n||t.length>0),(0,w.x)(),(0,Y.d)({bufferSize:1,refCount:!0})),this.workspaces$=this.select((0,$.Cc)(["workspaces"]),(0,p.U)(({workspaces:n})=>n.map(t=>
1({...t,displayName:(0,Ge.c8)({workspace:t,i18n:this.i18n})})))),this.filterBadge$=this.select((0,$.Cc)(["workspaces","selectedWorkspaceIds"]),(0,p.U)(({workspaces:n,selectedWorkspaceIds:t})=>{const i=t.map(o=>(0,Ge.fN)({workspaces:n,workspaceId:o})).filter(ee.lm);return 0===i.length?{selectedId:!1,label:""}:{selectedId:!0,label:this.I18n.translate(this.i18n,{key:this.I18n.key.filter.workspaces.selectedLabel,params:{selected:i.map(o=>(0,Ge.c8)({workspace:o,i18n:this.i18n})).join(", ")}})}})),this.selectedWorkspaces$=this.select((0,$.Cc)(["workspaces","selectedWorkspaceIds"]),(0,p.U)(({workspaces:n,selectedWorkspaceIds:t})=>t.map(i=>(0,Ge.fN)({workspaces:n,workspaceId:i})).filter(ee.lm))),this.listItems$=(0,V.aj)([this.workspaces$,this.select((0,$.Cc)(["searchQuery","selectedWorkspaceIds"]))]).pipe((0,p.U)(([n,{searchQuery:t,selectedWorkspaceIds:i}])=>{const o=ge.T.filter(t,n,{extract:s=>`${s.displayName}`}).map(({original:s})=>s).filter(s=>!i.includes(s.id));return this.set({listItems:o}),o})),this.activeIndexWrapper$=this.select((0,$.Cc)(["activeIndex"])),this.set({searchQuery:"",activeIndex:0,workspaces:[],listItems:[],selectedWorkspaceIds:[]})}set workspaces(n){this.setProperty("workspaces",n)}set selectedWorkspaceIds(n){this.setProperty("selectedWorkspaceIds",
1n)}confirmActiveIndex(){const{activeIndex:n,listItems:t,selectedWorkspaceIds:i}=this.get(),o=t[n]?.id;if(o){if(i.includes(o)){const l=i.filter(d=>d!==o);this.selectedWorkspaceIdsChange.emit({selectedWorkspaceIds:l})}else{const l=[...i,o];this.selectedWorkspaceIdsChange.emit({selectedWorkspaceIds:l})}this.clearInput()}}moveActiveIndex(n,t){n.preventDefault(),n.stopPropagation();const{activeIndex:i,listItems:o}=this.get();let s=(i+t)%o.length;s=s<0?o.length+s:s,this.set({activeIndex:s}),this.scrollToIndex(s)}removeLast(){const{listItems:n,selectedWorkspaceIds:t}=this.get();n.length>0&&this.selectedWorkspaceIdsChange.emit({selectedWorkspaceIds:[...t].slice(0,-1)})}removeWorkspace({workspaceId:n}){const{selectedWorkspaceIds:t}=this.get(),i=t.filter(o=>o!==n);this.selectedWorkspaceIdsChange.emit({selectedWorkspaceIds:i})}handleClear(){this.set({searchQuery:""}),this.selectedWorkspaceIdsChange.emit({selectedWorkspaceIds:[]});const n=this.searchInputRef?.nativeElement;!n||(n.value="",n.focus())}searchQueryChange({searchQuery:n}){this.set({searchQuery:n,activeIndex:0}),this.scrollToIndex(0)}clearInput(){this.set({searchQuery:""});const n=this.searchInputRef?.nativeElement;!n||(n.value="")}scrollToIndex(n){const i=Math.max(0,28*n-161);this.cdkViewport?.scrollTo({behavior:"auto",top:i})}handleInputSpaceKeydown(n){(n.target.value??"").trim()||n.preventDefault()}handleInputSpaceKeyup(n){(n.target.value??"").trim()||(n.preventDefault(),this.confirmActiveIndex())}static#e=this.\u0275fac=function(t){return new(t||eo)};static#t=this.\u0275cmp=e.Xpm({type:eo,selectors:[["t5s-global-search-workspaces-filter"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Wp,5),e.Gf(ve.N7,5),e.Gf(xt,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.searchInputRef=o.first),e.iGM(o=e.CRH())&&(i.cdkViewport=o.first),e.iGM(o=e.CRH())&&(i.workspacesFilter=o.first)}},inputs:{workspaces:"workspaces",selectedWorkspaceIds:"selectedWorkspaceIds"},outputs:{menuOpenChange:"menuOpenChange",selectedWorkspaceIdsChange:"selectedWorkspaceIdsChange"},features:[e.qOj],decls:4,vars:3,consts:[[4,"ngIf"],["workspacesFilterOverlay",""],[3,"overlayComponent","icon","selectedId","options","menuOpenChange"],["workspacesFilter",""],["t5sInputElementBorder",""],[2,"display","flex","align-items","center","border","none","padding","0px","width","auto","background","transparent","font-size","inherit","line-height","20px","flex","1 1 60px","min-width","60px","margin","0px 6px 4px 0px"],["t5sInputElement","","type","text","size","1",2,"font-size","inherit","line-height","inherit","border","none","background","none","width","100%","display","block","resize","none","padding","0px","height","18px",3,"placeholder","valueChange","keydown.escape","keydown.arrowdown","keydown.arrowup","keydown.enter","keydown.tab","keydown.shift.tab","t5sDistinctBackspace","keydown.space","keyup.space","t5sElementRendered"],["searchInput",""],["t5sClickableElement","",3,"border-radius","margin-top","mousedown","click",4,"ngIf"],[3,"mousedown"],[4,"ngFor","ngForOf","ngForTrackBy"],[2,"display","flex","align-items","center","flex-shrink","1","min-width","0px","height","18px","border-radius","6px","font-size","12px","line-height","120%","margin","0px 6px 6px 0px","background","transparent",3,"mousedown"],[2,"display","flex","align-items","center","min-width","0px"],[2,"margin-right","6px","align-self","center"],[3,"size","workspace"],[1,"notranslate",2,"white-space","nowrap","overflow","hidden","text-overflow","ellipsis"],["t5sClickableElement","",2,"workspace-select","none","transition","background 20ms ease-in 0s","cursor","pointer","display","flex","align-items","center","justify-content","center","width","18px","height","18px","margin-left","2px","margin-right","2px","flex-grow","0","flex-shrink","0","border-radius","6px",3,"click"],[3,"size","icon","fgColor"],["t5sClickableElement","",3,"mousedown","click"],["style","padding-top: 6px; padding-bottom: 6px;",4,"ngIf"],["t5sVerticalVirtualScrollViewport","","t5sDynamicHeightVirtualScrollViewport","",3,"overflowX","height","max-height","itemSize",4,"ngIf"],[2,"padding-top","6px","padding-bottom","6px"],[2,"display","flex","align-items","center","line-height","120%","width","100%","workspace-select","none","min-height","28px","font-size","14px"],[2,"margin-left","12px","margin-right","12px","min-width","0px","flex","1 1 auto"],[2,"white-space","nowrap","overflow","hidden","text-overflow","ellipsis"],["t5sVerticalVirtualScrollViewport","","t5sDynamicHeightVirtualScrollViewport","",3,"itemSize"],[4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],["t5sClickableElement","",3,"disableHover","isActive","mousemove","click"]],template:function(t,i){1&t&&(e.YNc(0,qp,3,11,"ng-container",0),e.ALo(1,"push"),e.YNc(2,ld,16,64,"ng-template",null,1,e.W1O)),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.filterBadge$))},dependencies:[u.sg,u.O5,sr.s,zn.y,Ki.E,oe.v,wn.v,le.H,ve.xd,ve.x0,ve.N7,Cl.p,pa.R,da.H,xt,we.f],encapsulation:2,changeDetection:0})}var Sn=r(1741),ua=r(58625),to=r(8477),Ie=(()=>{return(a=Ie||(Ie={})).CATEGORY_HEADLINE="CATEGORY_HEADLINE",a.BLAB_ITEM_SEARCH_RESULT="BLAB_ITEM_SEARCH_RESULT",a.BLAB_DEF_SEARCH_RESULT="BLAB_DEF_SEARCH_RESULT",a.BLAB_ITEM_RECENTLY_VISITED="BLAB_ITEM_RECENTLY_VISITED",a.BLAB_DEF_RECENTLY_VISITED="BLAB_DEF_RECENTLY_VISITED",Ie;var a})(),ln=r(63995),bt=r(47883),rr=r(75641),ha=r(72588),lr=r(910),St=(()=>{return(a=St||(St={})).BEST_MATCH="BEST_MATCH",a.LAST_MODIFIED_AT_DESC="LAST_MODIFIED_AT_DESC",a.LAST_MODIFIED_AT_ASC="LAST_MODIFIED_AT_ASC",a.CREATED_AT_DESC="CREATED_AT_DESC",a.CREATED_AT_ASC="CREATED_AT_ASC",St;var a})(),Bt=(()=>{return(a=Bt||(Bt={})).BLAB_DEF="BLAB_DEF",a.BLAB_ITEM="BLAB_ITEM",Bt;var a})();function no({displayOptions:a,searchQuery:n}){return n||a.filterBlabDefIds.length>0||null!==a.filterCreatedAt||a.filterCreatedByUserIds.length>0||null!==a.filterLastModifiedAt||a.filterWorkspaceIds.length>0?ln.n.SEARCH:ln.n.RECENTLY_VISITED}function cd({searchQuery:a,displayOptions:n}){let t=se.RV.RANKING_SCORE,i=se.X_.DESC;switch(n.sort){case St.BEST_MATCH:t=se.RV.RANKING_SCORE,i=se.X_.DESC;break;case St.CREATED_AT_ASC:t=se.RV.CREATED_AT,i=se.X_.ASC;break;case St.CREATED_AT_DESC:t=se.RV.CREATED_AT,i=se.X_.DESC;break;case St.LAST_MODIFIED_AT_ASC:t=se.RV.LAST_MODIFIED_AT,i=se.X_.ASC;break;case St.LAST_MODIFIED_AT_DESC:t=se.RV.LAST_MODIFIED_AT,i=se.X_.DESC}return{limit:50,query:a,includeHighlights:!0,sorting:{direction:i,sortBy:t},filtering:{createdByUserIds:n.filterCreatedByUserIds,workspaceIds:n.filterWorkspaceIds,blabDefIds:n.filterBlabDefIds,createdAtWithinRange:n.filterCreatedAt??void 0,lastModifiedAtWithinRange:n.filterLastModifiedAt??void 0}}}function cr(a){return a.filter(({type:n})=>n!==Ie.CATEGORY_HEADLINE)}function cn(a){switch(a?.type){case Ie.BLAB_ITEM_RECENTLY_VISITED:case Ie.BLAB_DEF_RECENTLY_VISITED:return a.visitedAt??0}return 0}function vl(a){return(0,rr.X)(a.highlight??"").replace(/wpEBIPuRVhgA(.*?)FBlqASVYPclq/g,(n,t)=>`<mark>${t}</mark>`)}function Gn(a){if(!a.searchQuery.trim())return(0,rr.X)(a.text??"");const n=new RegExp(a.searchQuery,"gi");return(0,rr.X)(a.text??"").replace(n,t=>`<mark>${t}</mark>`)}var ga=r(84197),ma=r(80127),it=r(90748),io=r(73227),dd=r(76726);function _d(a,n){1&a&&e._UZ(0,"div"),2&a&&e.Udp("width",100,"%")("height",12,"px")}function ud(a,n){if(1&a&&(e.ynx(0),e.YNc(1,_d,1,4,"div",3),e.TgZ(2,"div")(3,"div"),e._uU(4),e.qZA()(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngIf",t.index>
10),e.xp6(1),e.Udp("display","flex")("padding-left","14px")("padding-right","14px")("margin-top","6px")("margin-bottom","8px")("color",i.rgba(i.Color.black,.65))("fill",i.rgba(i.Color.black,.45))("font-size","12px")("font-weight",500)("line-height","120%")("user-select","none"),e.xp6(1),e.Udp("align-self","center")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",t.label," ")}}function hd(a,n){if(1&a&&(e.TgZ(0,"div",12)(1,"div",13),e._uU(2),e.qZA()()),2&a){const t=e.oxw(3);e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.archived))}}function gd(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2,"\u2014"),e.qZA(),e.BQk()),2&a){const t=e.oxw(3);e.xp6(1),e.Udp("padding","0px 4px")("color",t.rgba(t.Color.black,.35))}}const fa=function(a,n){return{workspace:a,i18n:n}};function md(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3);e.xp6(2),e.Oqu(i.getWorkspaceDisplayName(e.WLB(1,fa,t,i.i18n)))}}function fd(a,n){1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2,"/"),e.qZA(),e.BQk()),2&a&&(e.xp6(1),e.Udp("padding","0px 4px"))}const xa=function(a,n){return{blabDef:a,i18n:n}};function xd(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3);e.xp6(2),e.Oqu(i.getBlabDefDisplayName(e.WLB(1,xa,t,i.i18n)))}}function bd(a,n){if(1&a&&e._UZ(0,"div",6),2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.Udp("width",100,"%")("padding-top",4,"px")("font-size",12,"px")("padding-left",10,"px")("color",i.rgba(i.Color.black,.65))("overflow-wrap","break-word"),e.Q6J("innerHTML",t.highlight,e.oJD)}}function Cd(a,n){if(1&a&&e._UZ(0,"t5s-entity-created-last-modified-tooltip",14),2&a){const t=e.oxw(2).ngIf;e.Q6J("metadata",t.metadata)}}function vd(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"a",4),e.NdJ("mousemove",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("mouseenter",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index,mouseenter:!0}))})("mousedown",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("focus",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("click",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.handleBlabItemClick(o,s.blabItem))})("keydown.space",function(o){return o.preventDefault()})("keyup.space",function(o){return null==o.target?null:o.target.click()})("keydown.enter",function(o){return null==o.target?null:o.target.click()}),e.TgZ(2,"div")(3,"div"),e._UZ(4,"t5s-blab-item-icon",5),e.qZA()(),e.TgZ(5,"div")(6,"div"),e._UZ(7,"div",6),e.YNc(8,hd,3,1,"div",7),e.qZA(),e.TgZ(9,"div")(10,"div"),e._uU(11),e.qZA(),e.YNc(12,gd,3,4,"ng-container",0),e.YNc(13,md,3,4,"ng-container",0),e.YNc(14,fd,3,2,"ng-container",0),e.YNc(15,xd,3,4,"ng-container",0),e.qZA(),e.YNc(16,bd,1,13,"div",8),e.qZA(),e.TgZ(17,"div",9),e._UZ(18,"t5s-svg",10),e.qZA()(),e.YNc(19,Cd,1,1,"ng-template",null,11,e.W1O),e.BQk()}if(2&a){const t=e.MAs(20),i=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Udp("width","calc(100% - 8px)")("padding","8px 2px")("margin","0px 4px")("border-radius","6px")("display","flex")("flex-direction","row")("min-height","36px")("font-size","14px")("line-height","20px")("user-select","none")("cursor","pointer"),e.Q6J("disableHover",!0)("isActive",i.isActive)("hoverVisibleAnimationDuration",0)("t5sTooltipV3",t)("tooltipMaxWidth","calc(100vw - 24px)")("tooltipPosition","right")("tooltipOffset",18)("t5sHoverVisibleContainer","t5s-global-search-list-item"),e.uIk("href",i.url,e.LSH),e.xp6(1),e.Udp("padding","1px 4px 0px 10px"),e.xp6(1),e.Udp("display","flex")("height",20,"px")("width",20,"px")("align-items","center")("justify-content","center"),e.xp6(1),e.Q6J("size",18)("blabDef",i.blabDef),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("display","flex")("flex-direction","column"),e.xp6(1),e.Udp("padding-left",10,"px")("font-weight",500)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("display","flex")("flex-direction","row")("align-items","center")("color",o.rgba(o.Color.black,i.isActive?1:.65)),e.xp6(1),e.Q6J("innerHTML",i.titleHighlight,e.oJD),e.xp6(1),e.Q6J("ngIf",i.isArchived),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("padding-top",1,"px")("padding-left",10,"px")("color",o.rgba(o.Color.black,.5))("font-size","12px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(2),e.Oqu(o.getBlabDefBlabItemDisplayName(e.WLB(103,xa,i.blabDef,o.i18n))),e.xp6(1),e.Q6J("ngIf",i.blabDef||i.workspace),e.xp6(1),e.Q6J("ngIf",i.workspace),e.xp6(1),e.Q6J("ngIf",i.blabDef&&i.workspace),e.xp6(1),e.Q6J("ngIf",i.blabDef),e.xp6(1),e.Q6J("ngIf",!!i.highlight),e.xp6(1),e.Udp("margin-right",12,"px"),e.Q6J("t5sHoverVisibleElement","t5s-global-search-list-item"),e.xp6(1),e.Q6J("size",18)("icon",o.IconEnter)("fgColor",o.rgba(o.Color.black,.45))}}function Id(a,n){if(1&a&&(e.TgZ(0,"div",12)(1,"div",13),e._uU(2),e.qZA()()),2&a){const t=e.oxw(3);e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.archived))}}function yd(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3);e.xp6(2),e.Oqu(i.getWorkspaceDisplayName(e.WLB(1,fa,t,i.i18n)))}}function kd(a,n){1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2,"/"),e.qZA(),e.BQk()),2&a&&(e.xp6(1),e.Udp("padding","0p
1x 4px"))}function wd(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3);e.xp6(2),e.Oqu(i.getBlabDefDisplayName(e.WLB(1,xa,t,i.i18n)))}}function Sd(a,n){if(1&a&&(e.TgZ(0,"div"),e._UZ(1,"t5s-svg",10),e.qZA()),2&a){const t=e.oxw(3);e.Udp("position","absolute")("padding","0px 12px")("top",0,"px")("left",0,"px")("width",100,"%")("height",100,"%")("display","flex")("align-items","center"),e.xp6(1),e.Udp("margin-left","auto"),e.Q6J("size",18)("icon",t.IconEnter)("fgColor",t.rgba(t.Color.black,.45))}}function Td(a,n){if(1&a&&e._UZ(0,"t5s-entity-created-last-modified-tooltip",14),2&a){const t=e.oxw(2).ngIf;e.Q6J("metadata",t.metadata)}}function Ad(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"a",15),e.NdJ("mousemove",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("mouseenter",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index,mouseenter:!0}))})("mousedown",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("focus",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("click",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.handleBlabItemClick(o,s.blabItem))})("keydown.space",function(o){return o.preventDefault()})("keyup.space",function(o){return null==o.target?null:o.target.click()})("keydown.enter",function(o){return null==o.target?null:o.target.click()}),e.TgZ(2,"div")(3,"div"),e._UZ(4,"t5s-blab-item-icon",5),e.qZA()(),e.TgZ(5,"div")(6,"div"),e._UZ(7,"div",6),e.YNc(8,Id,3,1,"div",7),e.qZA(),e.TgZ(9,"div")(10,"div"),e._uU(11,"\xb7"),e.qZA(),e.TgZ(12,"div"),e._uU(13),e.qZA(),e.TgZ(14,"div"),e._uU(15,"\u2014"),e.qZA(),e.YNc(16,yd,3,4,"ng-container",0),e.YNc(17,kd,3,2,"ng-container",0),e.YNc(18,wd,3,4,"ng-container",0),e.qZA()(),e.TgZ(19,"div")(20,"div"),e._uU(21),e.qZA(),e.YNc(22,Sd,2,21,"div",16),e.qZA()(),e.YNc(23,Td,1,1,"ng-template",null,11,e.W1O),e.BQk()}if(2&a){const t=e.MAs(24),i=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Udp("width","calc(100% - 8px)")("padding","8px 2px")("margin","0px 4px")("border-radius","6px")("display","flex")("flex-direction","row")("min-height","36px")("font-size","14px")("line-height","20px")("user-select","none")("cursor","pointer"),e.Q6J("disableHover",!0)("isActive",i.isActive)("hoverVisibleAnimationDuration",0)("t5sTooltipV3",t)("tooltipPosition","right")("tooltipOffset",18)("tooltipMaxWidth","calc(100vw - 24px)")("t5sHoverVisibleContainer","t5s-global-search-list-item"),e.uIk("href",i.url,e.LSH),e.xp6(1),e.Udp("padding","1px 4px 0px 10px"),e.xp6(1),e.Udp("display","flex")("height",20,"px")("width",20,"px")("align-items","center")("justify-content","center"),e.xp6(1),e.Q6J("size",18)("blabDef",i.blabDef),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("display","flex")("flex-direction","row"),e.xp6(1),e.Udp("padding-left",10,"px")("font-weight",500)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("display","flex")("flex-direction","row")("align-items","center")("color",o.rgba(o.Color.black,i.isActive||i.searchMode===o.SearchMode.RECENTLY_VISITED?1:.65)),e.xp6(1),e.Q6J("innerHTML",i.titleHighlight,e.oJD),e.xp6(1),e.Q6J("ngIf",i.isArchived),e.xp6(1),e.Udp("flex",1)("display","flex")("flex-direction","row")("padding-top",1,"px")("color",o.rgba(o.Color.black,.5))("font-size","12px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Udp("padding","0px 6px"),e.xp6(3),e.Oqu(o.getBlabDefBlabItemDisplayName(e.WLB(125,xa,i.blabDef,o.i18n))),e.xp6(1),e.Udp("padding","0px 4px")("color",o.rgba(o.Color.black,.35)),e.xp6(2),e.Q6J("ngIf",i.workspace),e.xp6(1),e.Q6J("ngIf",i.blabDef&&i.workspace),e.xp6(1),e.Q6J("ngIf",i.blabDef),e.xp6(1),e.Udp("position","relative")("padding","0px 12px")("display","flex")("align-items","center")("min-width",42,"px"),e.xp6(1),e.Udp("visibility",i.isActive?"hidden":"visible")("font-size",12,"px")("line-height",16,"px")("color",o.rgba(o.Color.black,.5))("text-align","right")("vertical-align","middle"),e.xp6(1),e.hij(" ",o.formatListItemVisitedAt(i)," "),e.xp6(1),e.Q6J("ngIf",i.isActive)}}function Ud(a,n){if(1&a&&(e.TgZ(0,"div",12)(1,"div",13),e._uU(2),e.qZA()()),2&a){const t=e.oxw(3);e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.archived))}}function Od(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2,"\u2014"),e.qZA(),e.TgZ(3,"div"),e._uU(4),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3);
1e.xp6(1),e.Udp("padding","0px 4px")("color",i.rgba(i.Color.black,.35)),e.xp6(3),e.Oqu(i.getWorkspaceDisplayName(e.WLB(5,fa,t,i.i18n)))}}function Ed(a,n){if(1&a&&e._UZ(0,"div",6),2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.Udp("width",100,"%")("padding-top",4,"px")("font-size",12,"px")("padding-left",10,"px")("color",i.rgba(i.Color.black,.65))("overflow-wrap","break-word"),e.Q6J("innerHTML",t.highlight,e.oJD)}}function Dd(a,n){if(1&a&&e._UZ(0,"t5s-entity-created-last-modified-tooltip",14),2&a){const t=e.oxw(2).ngIf;e.Q6J("metadata",t.metadata)}}function Bd(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"a",15),e.NdJ("mousemove",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("mouseenter",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index,mouseenter:!0}))})("mousedown",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("focus",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("click",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.handleBlabDefClick(o,s.blabDef))})("keydown.space",function(o){return o.preventDefault()})("keyup.space",function(o){return null==o.target?null:o.target.click()})("keydown.enter",function(o){return null==o.target?null:o.target.click()}),e.TgZ(2,"div")(3,"div"),e._UZ(4,"t5s-blab-def-icon",5),e.qZA()(),e.TgZ(5,"div")(6,"div"),e._UZ(7,"div",6),e.YNc(8,Ud,3,1,"div",7),e.qZA(),e.TgZ(9,"div")(10,"div"),e._uU(11),e.qZA(),e.YNc(12,Od,5,8,"ng-container",0),e.qZA(),e.YNc(13,Ed,1,13,"div",8),e.qZA(),e.TgZ(14,"div",9),e._UZ(15,"t5s-svg",10),e.qZA()(),e.YNc(16,Dd,1,1,"ng-template",null,17,e.W1O),e.BQk()}if(2&a){const t=e.MAs(17),i=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Udp("width","calc(100% - 8px)")("padding","8px 2px")("margin","0px 4px")("border-radius","6px")("display","flex")("flex-direction","row")("min-height","36px")("font-size","14px")("line-height","20px")("user-select","none")("cursor","pointer"),e.Q6J("disableHover",!0)("isActive",i.isActive)("hoverVisibleAnimationDuration",0)("t5sTooltipV3",t)("tooltipPosition","right")("tooltipOffset",18)("tooltipMaxWidth","calc(100vw - 24px)")("t5sHoverVisibleContainer","t5s-global-search-list-item"),e.uIk("href",i.url,e.LSH),e.xp6(1),e.Udp("padding","1px 4px 0px 10px"),e.xp6(1),e.Udp("display","flex")("height",20,"px")("width",20,"px")("align-items","center")("justify-content","center"),e.xp6(1),e.Q6J("size",18)("blabDef",i.blabDef),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("display","flex")("flex-direction","column"),e.xp6(1),e.Udp("padding-left",10,"px")("font-weight",500)("color",o.rgba(o.Color.black,i.isActive?1:.65))("display","flex")("flex-direction","row")("align-items","center")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Q6J("innerHTML",i.titleHighlight,e.oJD),e.xp6(1),e.Q6J("ngIf",i.isArchived),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("padding-top",1,"px")("padding-left",10,"px")("color",o.rgba(o.Color.black,.5))("font-size","12px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(2),e.hij(" ",o.getListItemBreadcrumbLabel(i)," "),e.xp6(1),e.Q6J("ngIf",i.workspace),e.xp6(1),e.Q6J("ngIf",!1),e.xp6(1),e.Udp("margin-right",12,"px"),e.Q6J("t5sHoverVisibleElement","t5s-global-search-list-item"),e.xp6(1),e.Q6J("size",18)("icon",o.IconEnter)("fgColor",o.rgba(o.Color.black,.45))}}function Md(a,n){if(1&a&&(e.TgZ(0,"div",12)(1,"div",13),e._uU(2),e.qZA()()),2&a){const t=e.oxw(3);e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.archived))}}function Zd(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2,"\u2014"),e.qZA(),e.TgZ(3,"div"),e._uU(4),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3);e.xp6(1),e.Udp("padding","0px 4px")("color",i.rgba(i.Color.black,.35)),e.xp6(3),e.Oqu(i.getWorkspaceDisplayName(e.WLB(5,fa,t,i.i18n)))}}function Ld(a,n){if(1&a&&(e.TgZ(0,"div"),e._UZ(1,"t5s-svg",10),e.qZA()),2&a){const t=e.oxw(3);
1e.Udp("position","absolute")("padding","0px 12px")("top",0,"px")("left",0,"px")("width",100,"%")("height",100,"%")("display","flex")("align-items","center"),e.xp6(1),e.Udp("margin-left","auto"),e.Q6J("size",18)("icon",t.IconEnter)("fgColor",t.rgba(t.Color.black,.45))}}function Nd(a,n){if(1&a&&e._UZ(0,"t5s-entity-created-last-modified-tooltip",14),2&a){const t=e.oxw(2).ngIf;e.Q6J("metadata",t.metadata)}}function Rd(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"a",15),e.NdJ("mousemove",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("mouseenter",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index,mouseenter:!0}))})("mousedown",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("focus",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.activeIndexChange.emit({activeIndex:o.index}))})("click",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.handleBlabDefClick(o,s.blabDef))})("keydown.space",function(o){return o.preventDefault()})("keyup.space",function(o){return null==o.target?null:o.target.click()})("keydown.enter",function(o){return null==o.target?null:o.target.click()}),e.TgZ(2,"div")(3,"div"),e._UZ(4,"t5s-blab-def-icon",5),e.qZA()(),e.TgZ(5,"div")(6,"div"),e._UZ(7,"div",6),e.YNc(8,Md,3,1,"div",7),e.qZA(),e.TgZ(9,"div")(10,"div"),e._uU(11,"\xb7"),e.qZA(),e.TgZ(12,"div"),e._uU(13),e.qZA(),e.YNc(14,Zd,5,8,"ng-container",0),e.qZA()(),e.TgZ(15,"div")(16,"div"),e._uU(17),e.qZA(),e.YNc(18,Ld,2,21,"div",16),e.qZA()(),e.YNc(19,Nd,1,1,"ng-template",null,17,e.W1O),e.BQk()}if(2&a){const t=e.MAs(20),i=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Udp("width","calc(100% - 8px)")("padding","8px 2px")("margin","0px 4px")("border-radius","6px")("display","flex")("flex-direction","row")("min-height","36px")("font-size","14px")("line-height","20px")("user-select","none")("cursor","pointer"),e.Q6J("disableHover",!0)("isActive",i.isActive)("hoverVisibleAnimationDuration",0)("t5sTooltipV3",t)("tooltipPosition","right")("tooltipOffset",18)("tooltipMaxWidth","calc(100vw - 24px)")("t5sHoverVisibleContainer","t5s-global-search-list-item"),e.uIk("href",i.url,e.LSH),e.xp6(1),e.Udp("padding","1px 4px 0px 10px"),e.xp6(1),e.Udp("display","flex")("height",20,"px")("width",20,"px")("align-items","center")("justify-content","center"),e.xp6(1),e.Q6J("size",18)("blabDef",i.blabDef),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("display","flex")("flex-direction","row"),e.xp6(1),e.Udp("padding-left",10,"px")("font-weight",500)("color",o.rgba(o.Color.black,i.isActive||i.searchMode===o.SearchMode.RECENTLY_VISITED?1:.65))("display","flex")("flex-direction","row")("align-items","center")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Q6J("innerHTML",i.titleHighlight,e.oJD),e.xp6(1),e.Q6J("ngIf",i.isArchived),e.xp6(1),e.Udp("flex",1)("display","flex")("flex-direction","row")("padding-top",1,"px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("color",o.rgba(o.Color.black,.5))("font-size","12px"),e.xp6(1),e.Udp("padding","0px 6px"),e.xp6(3),e.hij(" ",o.getListItemBreadcrumbLabel(i)," "),e.xp6(1),e.Q6J("ngIf",i.workspace),e.xp6(1),e.Udp("position","relative")("padding","0px 12px")("display","flex")("align-items","center")("min-width",42,"px"),e.xp6(1),e.Udp("visibility",i.isActive?"hidden":"visible")("font-size",12,"px")("line-height",16,"px")("color",o.rgba(o.Color.black,.5))("text-align","right")("vertical-align","middle"),e.xp6(1),e.hij(" ",o.formatListItemVisitedAt(i)," "),e.xp6(1),e.Q6J("ngIf",i.isActive)}}function Pd(a,n){if(1&a&&(e.ynx(0)(1,1),e.YNc(2,ud,5,32,"ng-container",2),e.YNc(3,vd,21,106,"ng-container",2),e.YNc(4,Ad,25,128,"ng-container",2),e.YNc(5,Bd,18,100,"ng-container",2),e.YNc(6,Rd,21,119,"ng-container",2),e.BQk()()),2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngSwitch",t.type),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.CATEGORY_HEADLINE),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_ITEM_SEARCH_RESULT),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_ITEM_RECENTLY_VISITED),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_DEF_SEARCH_RESULT),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_DEF_RECENTLY_VISITED)}}class Jn extends _e.A{constructor(){super(...arguments),this.ListItemType=Ie,this.BlabDefType=to.a,this.IconEnter=y.Fz0,this.I18n=Te,this.getBlabDefDisplayName=H.fM,this.getBlabDefBlabItemDisplayName=H.Oq,this.getWorkspaceDisplayName=Ge.c8,this.SearchMode=ln.n,this.openBlabDef=new e.vpe,this.openBlabItem=new e.vpe,this.activeIndexChange=new e.vpe,this.listItem$=this.select((0,$.Cc)(["listItem","isActive"]),(0,p.U)(({listItem:n,isActive:t})=>({...n,isActive:t})))}set listItem(n){this.setProperty("listItem",n)}set isActive(n){this.setProperty("isActive",n)}handleBlabItemClick(n,t){return!(0,Sn.i0)(n)||(this.openBlabItem.emit({blabItem:t}),!1)}formatListItemVisitedAt(n){const t=cn(n),i=new Date;return i.setDate(i.getDate()-1),i.setHours(0,0,0,0),n.searchMode===ln.n.RECENTLY_VISITED&&t>i.getTime()?"":ua.L.formatDeltaDateTime(this.i18n,t)??""}getListItemBreadcrumbLabel(n){if(n.type===Ie.CATEGORY_HEADLINE)return"";switch(n.blabDef?.info?.type){case this.BlabDefType.DASHBOARD:return this.I18n.translate(this.i18n,this.I18n.key.breadcrumb.blabDef.dashboard);case this.BlabDefType.FORM:return this.I18n.translate(this.i18n,this.I18n.key.breadcrumb.blabDef.form);default:return this.I18n.translate(this.i18n,this.I18n.key.breadcrumb.blabDef.database)}}handleBlabDefClick(n,t){return!(0,Sn.i0)(n)||(this.openBlabDef.emit({blabDef:t}),!1)}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Jn)))(i||Jn)}}();static#t=this.\u0275cmp=e.Xpm({type:Jn,selectors:[["t5s-global-search-list-item"]],inputs:{listItem:"listItem",isActive:"isActive"},outputs:{openBlabDef:"openBlabDef",openBlabItem:"openBlabItem",activeIndexChange:"activeIndexChange"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"width","height",4,"ngIf"],["t5sClickableElement","",3,"disableHover","isActive","hoverVisibleAnimationDuration","t5sTooltipV3","tooltipMaxWidth","tooltipPosition","tooltipOffset","t5sHoverVisibleContainer","mousemove","mouseenter","mousedown","focus","click","keydown.space","keyup.space","keydown.enter"],[3,"size","blabDef"],[3,"innerHTML"],["style","align-self: center; margin-left: 6px; padding: 2px 4px; background: rgba(227, 226, 224, 0.5); color: rgb(120, 119, 116); border-radius: 4px; font-size: 11px; font-weight: 500; line-height: 1.3;",4,"ngIf"],[3,"width","padding-top","font-size","padding-left","color","overflow-wrap","innerHTML",4,"ngIf"],[3,"t5sHoverVisibleElement"],[3,"size","icon","fgColor"],["blabItemSearchResultTooltip",""],[2,"align-self","center","margin-left","6px","padding","2px 4px","background","rgba(227, 226, 224, 0.5)","color","rgb(120, 119, 116)","border-radius","4px","font-size","11px","font-weight","500","line-height","1.3"],[2,"margin-left","1px"],[3,"metadata"],["t5sClickableElement","",3,"disableHover","isActive","hoverVisibleAnimationDuration","t5sTooltipV3","tooltipPosition","tooltipOffset","tooltipMaxWidth","t5sHoverVisibleContainer","mousemove","mouseenter","mousedown","focus","click","keydown.space","keyup.space","keydown.enter"],[3,"position","padding","top","left","width","height","display","align-items",4,"ngIf"],["blabDefSearchResultTooltip",""]],template:function(t,i){1&t&&(e.YNc(0,Pd,7,6,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.listItem$))},dependencies:[u.O5,u.RF,u.n9,oe.v,ga.P,ma.a,it.i,le.H,Qn.p,io.n,dd.P,we.f],encapsulation:2,changeDetection:0})}var pn=r(21552),oo=r(12782),Rt=r(90222),Il=r(53252),zd=r(20893),Hn=r(18),Ve=r(10540),yl=r(29638),Tt=r(35281),ba=r(3872),Qd=r(11421),Fd=r(1130);const Gd=["searchInput"];function Jd(a,n){1&a&&e._UZ(0,"img",13),2&a&&e.Udp("width",16,"px")("height",16,"px")}
1function Hd(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-blab-item-icon",18),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("blabDef",t.blabDef)("size",20)}}function Vd(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-blab-def-icon",18),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("blabDef",t.blabDef)("size",20)}}function Wd(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-blab-item-icon",18),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("blabDef",t.blabDef)("size",20)}}function Yd(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-blab-def-icon",18),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("blabDef",t.blabDef)("size",20)}}function Kd(a,n){if(1&a&&(e.TgZ(0,"div"),e.ynx(1,16),e.YNc(2,Hd,2,2,"ng-container",17),e.YNc(3,Vd,2,2,"ng-container",17),e.YNc(4,Wd,2,2,"ng-container",17),e.YNc(5,Yd,2,2,"ng-container",17),e.BQk(),e.qZA()),2&a){const t=n.ngIf,i=e.oxw(6);e.xp6(1),e.Q6J("ngSwitch",t.type),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_ITEM_SEARCH_RESULT),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_DEF_SEARCH_RESULT),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_ITEM_RECENTLY_VISITED),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_DEF_RECENTLY_VISITED)}}function jd(a,n){if(1&a&&e._UZ(0,"t5s-svg",19),2&a){const t=e.oxw(6);e.Q6J("size",20)("icon",t.IconSearch)("fgColor",t.rgba(t.Color.black,.45))}}const kl=function(a,n){return{listItems:a,activeIndex:n}};function qd(a,n){if(1&a&&(e.YNc(0,Kd,6,5,"div",14),e.YNc(1,jd,1,3,"ng-template",null,15,e.W1O)),2&a){const t=e.MAs(2),i=e.oxw().ngIf,o=e.oxw().ngIf,s=e.oxw().ngIf,l=e.oxw(2);e.Q6J("ngIf",i.hasSearchQuery&&l.getActiveListItem(e.WLB(2,kl,o.listItems,s.activeIndex)))("ngIfElse",t)}}const Xd=function(a,n){return{activeListItem:a,searchQuery:n}};function e_(a,n){if(1&a&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&a){const t=n.ngIf,i=e.oxw().ngIf,o=e.oxw(4);e.xp6(2),e.Oqu(i.searchQuery),e.xp6(1),e.Udp("background",o.rgba(227,226,224,.5)),e.xp6(1),e.Oqu(o.getInputActiveListItemPreview(e.WLB(4,Xd,t,i.searchQuery)))}}function t_(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",20),e.NdJ("mousedown",function(o){return o.preventDefault()})("click",function(){e.CHM(t);const o=e.oxw(5);return e.KtG(o.handleClear())}),e._UZ(1,"t5s-svg",19),e.qZA()}if(2&a){const t=e.oxw(5);e.Udp("border-radius",9999,"px")("margin-left",4,"px"),e.xp6(1),e.Q6J("size",16)("icon",t.IconClearInput)("fgColor",t.rgba(t.Color.black,.35))}}const n_=function(a){return{organizationName:a}},i_=function(a,n){return{key:a,params:n}};function o_(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div")(3,"div"),e.YNc(4,Jd,1,4,"img",8),e.YNc(5,qd,3,5,"ng-template",null,9,e.W1O),e.qZA()(),e.TgZ(7,"div")(8,"input",10,11),e.NdJ("t5sElementRendered",function(o){e.CHM(t);const s=e.oxw(4);return o.element.value=s.get().searchQuery,o.element.focus(),e.KtG(o.element.select())})("valueChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleSearchQueryChange(o))})("keydown.enter",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.handleSearchInputEnter())})("keydown.shift.enter",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.handleSearchInputEnter({meta:!0}))})("keydown.meta.enter",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.handleSearchInputEnter({meta:!0}))})("keydown.control.enter",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.handleSearchInputEnter({meta:!0}))}),e.qZA(),e.TgZ(10,"div"),e.YNc(11,e_,5,7,"div",2),e.qZA()(),e.YNc(12,t_,2,7,"button",12),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(6),o=e.oxw().ngIf,s=e.oxw().ngIf,l=e.oxw(2);e.xp6(1),e.Udp("width",100,"%")("display","flex")("flex-direction","row")("align-items","center"),e.xp6(1),e.Udp("margin-right",6,"px"),e.xp6(1),e.Udp("width",24,"px")("height",24,"px")("display","flex")("align-items","center")("justify-content","center"),e.xp6(1),e.Q6J("ngIf",t.isLoading)("ngIfElse",i),e.xp6(3),e.Udp("position","relative")("width",100,"%"),e.xp6(1),e.Udp("width",100,"%")("font-size",18,"px")("line-height",27,"px"),e.Q6J("placeholder",l.I18n.translate(l.i18n,e.WLB(58,i_,l.I18n.key.search.inputPlaceholder,e.VKq(56,n_,t.organizationName)))),e.uIk("maxLength",l.GLOBAL_SEARCH_QUERY_MAX_LENGTH),e.xp6(2),e.Udp("top",0,"px")("width",100,"%")("white-space","pre")("overflow","hidden")("position","absolute")("pointer-events","none")("text-overflow","ellipsis")("color",l.rgba(l.Color.black,.65))("font-size",18,"px")("line-height",27,"px"),e.xp6(1),e.Q6J("ngIf",t.hasSearchQuery&&l.getActiveListItem(e.WLB(61,kl,o.listItems,s.activeIndex))),e.xp6(1),e.Q6J("ngIf",t.hasSearchQuery)}}const a_=function(a,n,t){return{id:a,label:n,selectedLabel:t}},Ca=function(a,n){return{id:a,label:n}},s_=function(a,n,t,i,o){return[a,n,t,i,o]};function r_(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div")(3,"t5s-global-search-filter",21),e.NdJ("selectedIdChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleSortChange({sort:o.selectedId}))})("menuOpenChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(o.menuOpen?null:s.focusInput())}),e.qZA(),e._UZ(4,"div"),e.TgZ(5,"t5s-global-search-created-by-filter",22),e.NdJ("selectedUserIdsChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleCreatedByFilterChange({filterCreatedByUserIds:o.selectedUserIds}))})("menuOpenChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(o.menuOpen?null:s.focusInput())}),e.qZA(),e.TgZ(6,"t5s-global-search-workspaces-filter",23),e.NdJ("selectedWorkspaceIdsChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleWorkspacesFilterChange({filterWorkspaceIds:o.selectedWorkspaceIds}))})("menuOpenChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(o.menuOpen?null:s.focusInput())}),e.qZA(),e.TgZ(7,"t5s-global-search-blab-defs-filter",24),e.NdJ("selectedBlabDefIdsChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleBlabDefsFilterChange({filterBlabDefIds:o.selectedBlabDefIds}))})("menuOpenChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(o.menuOpen?null:s.focusInput())}),e.qZA(),e.TgZ(8,"t5s-global-search-date-filter",25),e.NdJ("dateFilterChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleDateFilterChange(o))})("menuOpenChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(o.menuOpen?null:s.focusInput())}),e.qZA()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw(4);e.xp6(1),e.Udp("flex-grow",0)("position","relative")("overflow","hidden"),e.xp6(1),e.Udp("z-index",1)("display","flex")("margin-right",0,"px")("margin-bottom",0,"px")("padding","10px 12px")("align-items","center")("overflow","auto hidden"),e.xp6(1),e.Udp("flex-shrink",1)("margin-right",6,"px"),e.Q6J("icon",i.IconArrowUpD
1ownWebClient)("selectedId",t.sort)("options",e.qbA(67,s_,e.kEZ(51,a_,i.SortType.BEST_MATCH,i.I18n.translate(i.i18n,i.I18n.key.sort.BEST_MATCH.label),i.I18n.translate(i.i18n,i.I18n.key.sort.BEST_MATCH.selectedLabel)),e.WLB(55,Ca,i.SortType.LAST_MODIFIED_AT_DESC,i.I18n.translate(i.i18n,i.I18n.key.sort.LAST_MODIFIED_AT_DESC)),e.WLB(58,Ca,i.SortType.LAST_MODIFIED_AT_ASC,i.I18n.translate(i.i18n,i.I18n.key.sort.LAST_MODIFIED_AT_ASC)),e.WLB(61,Ca,i.SortType.CREATED_AT_DESC,i.I18n.translate(i.i18n,i.I18n.key.sort.CREATED_AT_DESC)),e.WLB(64,Ca,i.SortType.CREATED_AT_ASC,i.I18n.translate(i.i18n,i.I18n.key.sort.CREATED_AT_ASC)))),e.xp6(1),e.Udp("height",16,"px")("width",1,"px")("border-radius",1,"px")("margin-right",6,"px")("background-color",i.rgba(227,226,224,.5)),e.xp6(1),e.Udp("margin-right",6,"px"),e.Q6J("users",i.users$)("selectedUserIds",t.filterCreatedByUserIds),e.xp6(1),e.Udp("margin-right",6,"px"),e.Q6J("workspaces",i.workspaces$)("selectedWorkspaceIds",t.filterWorkspaceIds),e.xp6(1),e.Udp("margin-right",6,"px"),e.Q6J("blabDefs",i.blabDefs$)("selectedBlabDefIds",t.filterBlabDefIds),e.xp6(1),e.Q6J("filterCreatedAt",t.filterCreatedAt||null)("filterLastModifiedAt",t.filterLastModifiedAt||null)}}function l_(a,n){if(1&a&&(e.TgZ(0,"div")(1,"div")(2,"div")(3,"div"),e._uU(4),e.qZA()(),e.TgZ(5,"div")(6,"div"),e._uU(7),e.qZA()()()()),2&a){const t=e.oxw(4);e.Udp("display","flex")("align-items","center")("line-height","120%")("width",100,"%")("user-select","none")("font-size",14,"px")("padding-top",32,"px")("padding-bottom",32,"px")("margin-top","auto")("margin-bottom","auto"),e.xp6(1),e.Udp("margin-left",12,"px")("margin-right",12,"px")("min-width",0,"px")("flex","1 1 auto")("text-align","center"),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Udp("margin",0,"px")("font-weight",500)("font-size",14,"px")("line-height",20,"px")("color",t.rgba(t.Color.black,.65)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.search.noResultPlaceholder.headline)," "),e.xp6(1),e.Udp("white-space","normal")("overflow","hidden")("text-overflow","ellipsis")("color",t.rgba(t.Color.black,.65))("margin-top","auto")("font-size",14,"px"),e.xp6(1),e.Udp("font-size",14,"px")("margin-top","auto")("color",t.rgba(t.Color.black,.5)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.search.noResultPlaceholder.subline)," ")}}function c_(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-global-search-list-item",26),e.NdJ("openBlabDef",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.openBlabDef.emit(o))})("openBlabItem",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.openBlabItem.emit(o))})("activeIndexChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleActiveIndexChange(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(2).ngIf;e.xp6(1),e.Q6J("listItem",t)("isActive",t.index===i.activeIndex),e.uIk("data-global-search-list-item-index",t.index)}}function p_(a,n){if(1&a&&(e.ynx(0),e._uU(1),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Oqu(t.shortKey.symbol)}}function d_(a,n){if(1&a&&(e.TgZ(0,"footer",3),e.NdJ("mousedown",function(i){return i.preventDefault()}),e.TgZ(1,"div")(2,"div")(3,"div"),e._UZ(4,"div"),e.TgZ(5,"ul")(6,"li"),e._UZ(7,"t5s-svg",27),e._uU(8),e.qZA(),e.TgZ(9,"li"),e._UZ(10,"t5s-svg",27),e._uU(11),e.qZA(),e.TgZ(12,"li")(13,"span"),e.YNc(14,p_,2,1,"ng-container",2),e.ALo(15,"push"),e.qZA(),e._UZ(16,"t5s-svg",27),e._uU(17),e.qZA()()()()()()),2&a){const t=e.oxw(4);e.Udp("flex-shrink",0),e.xp6(1),e.Udp("box-shadow",t.rgba(t.Color.black,.09)+" 0px -1px 0px")("margin-top",1,"px")("display","flex")("flex-direction","row")("justify-content","space-between")("align-items","center")("font-size",14,"px"),e.xp6(1),e.Udp("display","flex")("align-items","center")("line-height","120%")("width",100,"%")("user-select","none")("min-height",28,"px")("font-size",12,"px")("color",t.rgba(t.Color.black,.5))("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Udp("margin-left",12,"px")("margin-right",12,"px")("min-width",0,"px")("flex","1 1 auto"),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Udp("list-style-type","none")("padding","0p
1x")("margin","0px")("font-size",12,"px")("color",t.rgba(t.Color.black,.5))("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("display","flex")("flex-direction","row"),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("margin-right",16,"px"),e.xp6(1),e.Udp("margin-right",4,"px")("margin-top",2,"px"),e.Q6J("size",12)("fgColor",t.rgba(t.Color.black,.45))("icon",t.IconArrowUpDownWebClient),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.footer.choose)," "),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("margin-right",16,"px"),e.xp6(1),e.Udp("margin-right",4,"px")("margin-top",2,"px"),e.Q6J("size",12)("fgColor",t.rgba(t.Color.black,.45))("icon",t.IconEnter),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.footer.open)," "),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("margin-right",16,"px"),e.xp6(1),e.Udp("font-size",10.5,"px")("padding-right",1,"px")("color",t.rgba(t.Color.black,.5)),e.xp6(1),e.Q6J("ngIf",e.lcZ(15,121,t.shortcut$)),e.xp6(2),e.Udp("margin-right",4,"px")("margin-top",2,"px"),e.Q6J("size",12)("fgColor",t.rgba(t.Color.black,.45))("icon",t.IconEnter),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.footer.openInNewTab)," ")}}function __(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div"),e.YNc(2,o_,13,64,"ng-container",2),e.ALo(3,"push"),e.qZA(),e.TgZ(4,"div",3),e.NdJ("mousedown",function(o){return o.preventDefault()}),e.YNc(5,r_,9,73,"ng-container",2),e.ALo(6,"push"),e.qZA(),e.TgZ(7,"div",4),e.NdJ("t5sElementRendered",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.initializeScrollPosition(o.element))})("mousedown",function(o){return o.preventDefault()}),e.YNc(8,l_,8,66,"div",5),e.YNc(9,c_,2,3,"ng-container",6),e._UZ(10,"div"),e.qZA(),e.YNc(11,d_,18,123,"footer",7),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw(3);e.xp6(1),e.Udp("height",48,"px")("width",100,"%")("flex-grow",0)("flex-shrink",0)("display","flex")("flex-direction","row")("align-items","center")("padding","0px 16px 0px 12px")("box-shadow",i.rgba(i.Color.black,.09)+" 0px 1px 0px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(3,44,i.header$)),e.xp6(2),e.Udp("width",100,"%")("display","flex")("flex-direction","row")("align-items","center"),e.xp6(1),e.Q6J("ngIf",e.lcZ(6,46,i.displayOptions$)),e.xp6(2),e.Udp("width",100,"%")("height",100,"%")("overflow-x","hidden")("overflow-y","auto"),e.xp6(1),e.Q6J("ngIf",t.showPlaceholder),e.xp6(1),e.Q6J("ngForOf",t.listItems)("ngForTrackBy",i.trackById),e.xp6(1),e.Udp("height",4,"px")("width",100,"%"),e.xp6(1),e.Q6J("ngIf",t.listItems.length>0)}}function u_(a,n){if(1&a&&(e.ynx(0),e.YNc(1,__,12,48,"ng-container",2),e.ALo(2,"push"),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t.listItemsWrapper$))}}const wl=function(){return{openDuration:0,closeDuration:0}};function h_(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-modal",1),e.NdJ("closeClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.closeClick.emit())})("keydown.arrowdown",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleIndexChange(o,1))})("keydown.arrowup",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleIndexChange(o,-1))}),e.TgZ(1,"div"),e.YNc(2,u_,3,3,"ng-container",2),e.ALo(3,"push"),e.qZA()()}if(2&a){const t=e.oxw();e.Udp("pointer-events","initial"),e.Q6J("width",660)("minWidth",660)("maxWidth",660)("minHeight",50)("height","fit-content")("maxHeight","80vh")("borderRadius",12)("verticalAlign","top")("padding","90px 0px 0px 0px")("modalTransitionAnimationConfig",e.DdM(28,wl))("backdropTransitionAnimationConfig",e.DdM(29,wl)),e.xp6(1),e.Udp("display","flex")("flex-direction","column")("flex","1 1 0%")("width",100,"%")("height",100,"%")("overflow","hidden"),e.xp6(1),e.Q6J("ngIf",e.lcZ(3,26,t.activeIndexWrapper$))}}class Vn extends Re.ez{constructor(n,t,i,o){super(),this.shortcut$=o,this.I18n=Te,this.IconEnter=y.Fz0,this.IconSearch=y.jVj,this.IconClearInput=y.YvQ,this.IconArrowUpDownWebClient=y.BcO,this.SortType=St,this.ListItemType=Ie,this.lastScrollPosition=0,this.scrolledAt=0,this.GLOBAL_SEARCH_QUERY_MAX_LENGTH=100,this.closeClick=new e.vpe,this.loadMore=new e.vpe,this.openBlabDef=new e.vpe,this.openBlabItem=new e.vpe,this.openModalChange=new e.vpe,this.searchInputChange=new e.vpe,this.modalOpenChange=this.select((0,v.Cc)(["modalOpen"]),(0,p.U)(({modalOpen:s})=>({modalOpen:s}))),this.header$=this.select((0,v.Cc)(["lookup","searchQuery","loadingState"]),(0,p.U)(({lookup:s,searchQuery:l,loadingState:d})=>({searchQuery:l,hasSearchQuery:!!l,isLoading:[Hn.k.LOADING,Hn.k.LOAD_MORE].includes(d),organizationName:(0,oo.vz)({organization:s.organization,i18n:this.i18n})})),(0,Rt.K)()),this.displayOptions$=this.select((0,v.Cc)(["displayOptions"]),(0,p.U)(({displayOptions:s})=>s)),this.modalOpen$=this.select((0,v.Cc)(["modalOpen"]),(0,p.U)(({modalOpen:s})=>s)),this.users$=this.select((0,v.Cc)(["lookup"]),(0,p.U)(({lookup:s})=>s.users)),this.workspaces$=this.select((0,v.Cc)(["lookup"]),(0,p.U)(({lookup:s})=>s.workspaces)),this.blabDefs$=this.select((0,v.Cc)(["lookup","activeUserId"]),(0,p.U)(({lookup:s,activeUserId:l})=>s.blabDefs.filter(d=>{const h=(0,H.O9)({blabDefId:d.id,lookup:s,userId:l,traceId:"global-search"});return(0,H.k8)(h,Il.N.CAN_VIEW)}))),this.activeIndexWrapper$=this.select((0,v.Cc)(["activeIndex"]),(0,p.U)(({activeIndex:s})=>({activeIndex:s}))),this.listItemsWrapper$=this.select((0,v.Cc)(["lookup","searchResults","searchQuery","runtimeUrl","displayOptions","loadingState","userRecentlyVisitedEdges"]),(0,p.U)(({lookup:s,searchResults:l,runtimeUrl:d,searchQuery:h,displayOptions:m,loadingState:C,userRecentlyVisitedEdges:S})=>{const f=function pd({i18n:a,lookup:n,runtimeUrl:t,searchQuery:i,searchResults:o,displayOptions:s,userRecentlyVisitedEdges:l}){const d=no({searchQuery:i,displayOptions:s}),h=i.trim().toLowerCase();if(d===ln.n.SEARCH){const b=[],k=[];[...n.blabDefs.filter(H.Ch).map(P=>{const T=l.find(Ue=>Ue.type===ha._.BLAB_DEF&&Ue.blabDefId===P.id);return{type:Bt.BLAB_DEF,displayName:(0,H.fM)({blabDef:P,i18n:a}),lastVisitedAt:T?.lastVisitedAt,blabDefId:P.id,blabDef:P}}),...l.map(P=>{if(P.type===ha._.BLAB_ITEM){const T=(0,bt.Vf)({blabItemId:P.blabItemId,blabItems:n});return T?{type:Bt.BLAB_ITEM,displayName:(0,bt.iG)({lookup:n,blabItemId:P.blabItemId,i18n:a}),lastVisitedAt:P.lastVisitedAt,blabItemId:P.blabItemId,blabItem:T}:void 0}}
1).filter(ee.lm)].forEach(P=>{switch(P.type){case Bt.BLAB_ITEM:{const T=P.blabItem;if(h&&!P.displayName.toLowerCase().includes(h)||s.filterCreatedByUserIds.length>0&&!s.filterCreatedByUserIds.includes(T?.info?.createdByUserId??-1))return;if(s.filterCreatedAt){if(!T?.info?.createdAt)return;switch(s.filterCreatedAt){case se.lE.LAST_24_HOURS:if(T.info.createdAt<Date.now()-864e5)return;break;case se.lE.LAST_7_DAYS:if(T.info.createdAt<Date.now()-6048e5)return;break;case se.lE.LAST_30_DAYS:if(T.info.createdAt<Date.now()-2592e6)return}}if(s.filterLastModifiedAt){if(!T?.info?.lastModifiedAt)return;switch(s.filterLastModifiedAt){case se.w4.LAST_24_HOURS:if(T.info.lastModifiedAt<Date.now()-864e5)return;break;case se.w4.LAST_7_DAYS:if(T.info.lastModifiedAt<Date.now()-6048e5)return;break;case se.w4.LAST_30_DAYS:if(T.info.lastModifiedAt<Date.now()-2592e6)return}}if(s.filterBlabDefIds.length>0&&!s.filterBlabDefIds.includes(T?.blabDefId??-1))return;if(s.filterWorkspaceIds.length>0){const Ue=(0,H.Kz)({blabDefId:T?.blabDefId,blabDefs:n});if(!s.filterWorkspaceIds.includes(Ue?.workspaceId??-1))return}break}case Bt.BLAB_DEF:{const T=P.blabDef;if(h&&!P.displayName.toLowerCase().includes(h)||s.filterCreatedByUserIds.length>0&&!s.filterCreatedByUserIds.includes(T?.info?.createdByUserId??-1))return;if(s.filterCreatedAt){if(!T?.info?.createdAt)return;switch(s.filterCreatedAt){case se.lE.LAST_24_HOURS:if(T.info.createdAt<Date.now()-864e5)return;break;case se.lE.LAST_7_DAYS:if(T.info.createdAt<Date.now()-6048e5)return;break;case se.lE.LAST_30_DAYS:if(T.info.createdAt<Date.now()-2592e6)return}}if(s.filterLastModifiedAt){if(!T?.info?.lastModifiedAt)return;switch(s.filterLastModifiedAt){case se.w4.LAST_24_HOURS:if(T.info.lastModifiedAt<Date.now()-864e5)return;break;case se.w4.LAST_7_DAYS:if(T.info.lastModifiedAt<Date.now()-6048e5)return;break;case se.w4.LAST_30_DAYS:if(T.info.lastModifiedAt<Date.now()-2592e6)return}}if(s.filterBlabDefIds.length>0&&!s.filterBlabDefIds.includes(T.id??-1)||s.filterWorkspaceIds.length>0&&!s.filterWorkspaceIds.includes(T.workspaceId??-1))return;break}}k.push(P)});const M=ge.T.filter(h,k,{extract:P=>P.displayName}).sort(({score:P,original:{lastVisitedAt:T}},{score:Ue,original:{lastVisitedAt:wt}})=>(Ue=wt?1.2*Ue:Ue)-(T?1.2*P:P)).map(P=>P.original);M.length>0&&b.push({id:"category-headline-recently-visited",type:Ie.CATEGORY_HEADLINE,label:Te.translate(a,Te.key.category.topResults)}),M.slice(0,3).forEach(P=>{switch(P.type){case Bt.BLAB_ITEM:{const T=P.blabItem,Ue=(0,H.Kz)({blabDefId:T?.blabDefId,blabDefs:n}),wt=(0,Ge.fN)({workspaceId:Ue?.workspaceId,workspaces:n});if(!T)return;const Wt=P.displayName,$n=Gn({searchQuery:i,text:Wt});b.push({id:`blab-item-recently-visited-${P.blabItemId}`,type:Ie.BLAB_ITEM_RECENTLY_VISITED,blabItem:T,blabDef:Ue,workspace:wt,searchMode:d,metadata:{createdAt:T?.info?.createdAt,createdByUser:(0,$e.tj)({users:n,userId:T.info?.createdByUserId}),createdByUserId:T.info?.createdByUserId,createdByWorkflowDefId:T.info?.createdByWorkflowDefId,createdVia:T.info?.createdVia,createdViaFormBlabDefId:T.info?.createdViaFormBlabDefId,lastModifiedAt:T?.info?.lastModifiedAt,lastModifiedByUser:(0,$e.tj)({users:n,userId:T.info?.lastModifiedByUserId}),lastModifiedByUserId:T.info?.lastModifiedByUserId,lastModifiedByWorkflowDefId:T.info?.lastModifiedByWorkflowDefId,lastModifiedByShareSessionId:T.info?.lastModifiedByShareSessionId,lastModifiedByShareSession:(0,lr.D)(T.info?.lastModifiedByShareSessionId),lastModifiedVia:T.info?.lastModifiedVia},visitedAt:P.lastVisitedAt,url:(0,bt.aj)({lookup:n,runtimeUrl:t,blabItemId:P.blabItemId}),title:Wt,titleHighlight:$n,isArchived:!!wt?.info?.archivedAt});break}case Bt.BLAB_DEF:{const T=P.blabDef,Ue=(0,Ge.fN)({workspaceId:T?.workspaceId,workspaces:n}),wt=P.displayName,Wt=Gn({searchQuery:i,text:wt});b.push({id:`blab-def-recently-visited-${P.blabDefId}`,type:Ie.BLAB_DEF_RECENTLY_VISITED,blabDef:T,workspace:Ue,searchMode:d,metadata:{createdAt:T?.info?.createdAt,createdByUser:(0,$e.tj)({users:n,userId:T.info?.createdByUserId}),createdByUserId:T.info?.createdByUserId,createdByWorkflowDefId:T.info?.createdByWorkflowDefId,createdVia:T.info?.createdVia,createdViaFormBlabDefId:void 0,lastModifiedAt:T?.info?.lastModifiedAt,lastModifiedByUser:(0,$e.tj)({users:n,userId:T.info?.lastModifiedByUserId}),lastModifiedByUserId:T.info?.lastModifiedByUserId,lastModifiedByWorkflowDefId:T.info?.lastModifiedByWorkflowDefId,lastModifiedByShareSession:void 0,lastModifiedVia:T.info?.lastModifiedVia},visitedAt:P.lastVisitedAt,title:wt,titleHighlight:Wt,isArchived:!!Ue?.info?.archivedAt,url:(0,H.pb)({lookup:n,runtimeUrl:t,blabDefId:T.id})});break}}});const K=o.filter(P=>{switch(P.type){case se.Yy.BLAB_ITEM:return!M.some(T=>T.type===Bt.BLAB_ITEM&&T.blabItemId===P.blabItemId);case se.Yy.BLAB_DEF:return!M.some(T=>T.type===Bt.BLAB_DEF&&T.blabDefId===P.blabDefId)}});K.length>0&&b.push({id:"category-headline-more-results",type:Ie.CATEGORY_HEADLINE,label:Te.translate(a,{key:1===K.length?Te.key.category.oneResult:Te.key.category.manyResults,params:{numResults:K.length}})}
1),K.forEach(P=>{switch(P.type){case se.Yy.BLAB_ITEM:{const T=(0,bt.Kn)({blabItemId:P.blabItemId,blabItems:n}),Ue=(0,H.Kz)({blabDefId:T?.blabDefId,blabDefs:n}),wt=(0,Ge.fN)({workspaceId:Ue?.workspaceId,workspaces:n});if(!T)return;const Wt=vl({searchQuery:i,highlight:P.highlight}),$n=(0,bt.iG)({lookup:n,blabItemId:T.id,i18n:a}),hl=Gn({searchQuery:i,text:$n});b.push({id:`blab-item-search-result-${P.blabItemId}`,type:Ie.BLAB_ITEM_SEARCH_RESULT,blabItem:T,blabDef:Ue,searchMode:d,workspace:wt,highlight:Wt,metadata:{createdAt:P.createdAt,createdByUser:(0,$e.tj)({users:n,userId:T.info?.createdByUserId}),createdByUserId:T.info?.createdByUserId,createdByWorkflowDefId:T.info?.createdByWorkflowDefId,createdVia:T.info?.createdVia,createdViaFormBlabDefId:T.info?.createdViaFormBlabDefId,lastModifiedAt:P.lastModifiedAt,lastModifiedByUser:(0,$e.tj)({users:n,userId:T.info?.lastModifiedByUserId}),lastModifiedByUserId:T.info?.lastModifiedByUserId,lastModifiedByWorkflowDefId:T.info?.lastModifiedByWorkflowDefId,lastModifiedByShareSessionId:T.info?.lastModifiedByShareSessionId,lastModifiedByShareSession:(0,lr.D)(T.info?.lastModifiedByShareSessionId),lastModifiedVia:T.info?.lastModifiedVia},url:(0,bt.aj)({lookup:n,runtimeUrl:t,blabItemId:T?.id}),title:$n,titleHighlight:hl,isArchived:!!wt?.info?.archivedAt});break}case se.Yy.BLAB_DEF:{const T=(0,H.Kz)({blabDefId:P.blabDefId,blabDefs:n}),Ue=(0,Ge.fN)({workspaceId:T?.workspaceId,workspaces:n});if(!T)return;const wt=vl({searchQuery:i,highlight:P.highlight}),Wt=(0,H.fM)({blabDef:T,i18n:a}),$n=Gn({searchQuery:i,text:Wt});b.push({id:`blab-def-search-result-${P.blabDefId}`,type:Ie.BLAB_DEF_SEARCH_RESULT,blabDef:T,workspace:Ue,highlight:wt,searchMode:d,metadata:{createdAt:P.createdAt,createdByUser:(0,$e.tj)({users:n,userId:T.info?.createdByUserId}),createdByUserId:T.info?.createdByUserId,createdByWorkflowDefId:T.info?.createdByWorkflowDefId,createdVia:T.info?.createdVia,createdViaFormBlabDefId:void 0,lastModifiedAt:P.lastModifiedAt,lastModifiedByUser:(0,$e.tj)({users:n,userId:T.info?.lastModifiedByUserId}),lastModifiedByUserId:T.info?.lastModifiedByUserId,lastModifiedByWorkflowDefId:T.info?.lastModifiedByWorkflowDefId,lastModifiedByShareSession:void 0,lastModifiedVia:T.info?.lastModifiedVia},title:Wt,titleHighlight:$n,url:(0,H.pb)({lookup:n,runtimeUrl:t,blabDefId:T.id}),isArchived:!!Ue?.info?.archivedAt});break}}});let Oe=-1,We=-1;return b.map(P=>P.type===Ie.CATEGORY_HEADLINE?(We++,{...P,index:We}):(Oe++,{...P,index:Oe}))}const m=[];l.forEach(b=>{switch(b.type){case ha._.BLAB_ITEM:{const k=(0,bt.Kn)({blabItemId:b.blabItemId,blabItems:n}),M=(0,H.Kz)({blabDefId:k?.blabDefId,blabDefs:n}),K=(0,Ge.fN)({workspaceId:M?.workspaceId,workspaces:n});if(!k)return;const Oe=(0,bt.iG)({lookup:n,blabItemId:b.blabItemId,i18n:a}),We=Gn({searchQuery:i,text:Oe});m.push({id:`blab-item-recently-visited-${b.blabItemId}`,type:Ie.BLAB_ITEM_RECENTLY_VISITED,blabItem:k,blabDef:M,workspace:K,searchMode:d,metadata:{createdAt:k?.info?.createdAt,createdByUser:(0,$e.tj)({users:n,userId:k.info?.createdByUserId}),lastModifiedAt:k?.info?.lastModifiedAt,lastModifiedByUser:(0,$e.tj)({users:n,userId:k.info?.lastModifiedByUserId}),createdByUserId:k.info?.createdByUserId,createdByWorkflowDefId:k.info?.createdByWorkflowDefId,createdVia:k.info?.createdVia,createdViaFormBlabDefId:k.info?.createdViaFormBlabDefId,lastModifiedByUserId:k.info?.lastModifiedByUserId,lastModifiedByWorkflowDefId:k.info?.lastModifiedByWorkflowDefId,lastModifiedByShareSessionId:k.info?.lastModifiedByShareSessionId,lastModifiedByShareSession:(0,lr.D)(k.info?.lastModifiedByShareSessionId),lastModifiedVia:k.info?.lastModifiedVia},visitedAt:b.lastVisitedAt,url:(0,bt.aj)({lookup:n,runtimeUrl:t,blabItemId:b.blabItemId}),title:Oe,titleHighlight:We,isArchived:!!K?.info?.archivedAt});break}case ha._.BLAB_DEF:{const k=(0,H.Kz)({blabDefId:b?.blabDefId,blabDefs:n}),M=(0,Ge.fN)({workspaceId:k?.workspaceId,workspaces:n});if(!k)return;const K=(0,H.fM)({blabDef:k,i18n:a}),Oe=Gn({searchQuery:i,text:K});m.push({id:`blab-def-recently-visited-${b.blabDefId}`,type:Ie.BLAB_DEF_RECENTLY_VISITED,blabDef:k,workspace:M,searchMode:d,metadata:{createdAt:k?.info?.createdAt,createdByUser:(0,$e.tj)({users:n,userId:k.info?.createdByUserId}),createdByUserId:k.info?.createdByUserId,createdByWorkflowDefId:k.info?.createdByWorkflowDefId,createdVia:k.info?.createdVia,createdViaFormBlabDefId:void 0,lastModifiedAt:k?.info?.lastModifiedAt,lastModifiedByUser:(0,$e.tj)({users:n,userId:k.info?.lastModifiedByUserId}),lastModifiedByUserId:k.info?.lastModifiedByUserId,lastModifiedByWorkflowDefId:k.info?.lastModifiedByWorkflowDefId,lastModifiedByShareSession:void 0,lastModifiedVia:k.info?.lastModifiedVia},visitedAt:b.lastVisitedAt,url:(0,H.pb)({lookup:n,runtimeUrl:t,blabDefId:k.id}),title:K,titleHighlight:Oe,isArchived:!!M?.info?.archivedAt});break}}}),m.sort((b,k)=>{const M=cn(b);return cn(k)-M});const C=new Date;C.setHours(0,0,0,0);const S=m.findIndex(b=>cn(b)>=C.getTime());S>-1&&m.splice(S,0,{id:"category-headline-today",type:Ie.CATEGORY_HEADLINE,label:Te.translate(a,Te.key.category.today),searchMode:d});const f=new Date;f.setDate(f.getDate()-1),f.setHours(0,0,0,0);const E=m.findIndex(b=>{const k=cn(b);return k>=f.getTime()&&k<C.getTime()});E>-1&&m.splice(E,0,{id:"category-headline-yesterday",type:Ie.CATEGORY_HEADLINE,label:Te.translate(a,Te.key.category.yesterday),searchMode:d});const Z=new Date;Z.setDate(Z.getDate()-Z.getDay()),Z.setHours(0,0,0,0);const R=m.findIndex(b=>{const k=cn(b);return k>=Z.getTime()&&k<f.getTime()});R>-1&&m.splice(R,0,{id:"category-headline-this-week",type:Ie.CATEGORY_HEADLINE,label:Te.translate(a,Te.key.category.lastWeek),searchMode:d});const G=new Date;G.setDate(G.getDate()-30),G.setHours(0,0,0,0);const F=m.findIndex(b=>{const k=cn(b);return k>=G.getTime()&&k<Z.getTime()});F>-1&&m.splice(F,0,{id:"category-headline-last-30-days",type:Ie.CATEGORY_HEADLINE,label:Te.translate(a,Te.key.category.last30Days),searchMode:d});const ae=m.findIndex(b=>{const k=cn(b);return k>0&&k<G.getTime()});ae>-1&&m.splice(ae,0,{id:"category-headline-older",type:Ie.CATEGORY_HEADLINE,label:Te.translate(a,Te.key.category.older),searchMode:d});let xe=-1,Fe=-1;return m.map(b=>b.type===Ie.CATEGORY_HEADLINE?(Fe++,{...b,index:Fe}):(xe++,{...b,index:xe}))}
1({lookup:s,runtimeUrl:d,searchQuery:h,searchResults:l,displayOptions:m,i18n:this.i18n,userRecentlyVisitedEdges:S}),E=no({searchQuery:h,displayOptions:m}),Z=0===f.length&&C===Hn.k.LOADED&&E===ln.n.SEARCH;return this.listItems=f,{listItems:f,showPlaceholder:Z}})),this.set({activeIndex:0,searchQuery:"",modalOpen:!1,searchResults:[],loadingState:Hn.k.INITIAL,displayOptions:{sort:St.BEST_MATCH,filterCreatedByUserIds:[],filterWorkspaceIds:[],filterBlabDefIds:[],filterCreatedAt:null,filterLastModifiedAt:null}}),this.connect(t),this.connect(i),this.hold(n.addKeyBinding({key:"p",modifier:pn.AK.SHORT,handler:()=>{this.get().modalOpen?this.closeModal():this.openModalChange.emit({openModal:!0})}})),this.hold(this.select((0,v.Cc)(["scrollContainer"])).pipe((0,L.w)(({scrollContainer:s})=>(0,Ve.R)(s,"wheel",{passive:!0}))),()=>{this.scrolledAt=Date.now()}),this.hold(this.select((0,v.Cc)(["scrollContainer"])).pipe((0,L.w)(({scrollContainer:s})=>(0,Ve.R)(s,"scroll",{passive:!0}).pipe((0,lt.b)(120)))),s=>{const l=s.target;if(!l)return;const d=l.scrollTop;if(d+l.clientHeight>.85*l.scrollHeight){const h=no(this.get());this.get().loadingState===Hn.k.LOADED&&h===ln.n.SEARCH&&this.loadMore.emit()}this.lastScrollPosition=d})}set lookup(n){this.setProperty("lookup",n)}set searchResults(n){this.setProperty("searchResults",n)}set loadingState(n){this.setProperty("loadingState",n)}set userRecentlyVisitedEdges(n){this.setProperty("userRecentlyVisitedEdges",n)}getActiveListItem({listItems:n,activeIndex:t}){return cr(n)[t]}handleClear(){this.resetSearchModeState();const n=this.searchInputRef?.nativeElement;!n||(n.value="",n.focus())}handleSearchQueryChange({value:n}){setTimeout(()=>{this.set({searchQuery:n??""}),this.handleSearchInputChange()})}handleSortChange({sort:n}){const{displayOptions:t}=this.get();this.set({displayOptions:{...t,sort:n}}),this.handleSearchInputChange()}handleCreatedByFilterChange({filterCreatedByUserIds:n}){const{displayOptions:t}=this.get();this.set({displayOptions:{...t,filterCreatedByUserIds:n}}),this.handleSearchInputChange()}handleWorkspacesFilterChange({filterWorkspaceIds:n}){const{displayOptions:t}=this.get();this.set({displayOptions:{...t,filterWorkspaceIds:n}}),this.handleSearchInputChange()}handleBlabDefsFilterChange({filterBlabDefIds:n}){const{displayOptions:t}=this.get();this.set({displayOptions:{...t,filterBlabDefIds:n}}),this.handleSearchInputChange()}handleSearchInputChange(){const{searchQuery:n,displayOptions:t}=this.get();this.setActiveIndex({activeIndex:0});const i=no({searchQuery:n,displayOptions:t});this.searchInputChange.emit({mode:i,input:cd({searchQuery:n,displayOptions:t})})}handleIndexChange(n,t){n.preventDefault(),n.stopPropagation();const{activeIndex:i}=this.get(),s=cr(this.listItems??[]);if(0===s.length)return;const l=i+t;l<0||l>=s.length||this.setActiveIndex({activeIndex:l})}setActiveIndex({activeIndex:n,scroll:t}){if(this.set({activeIndex:n}),"none"===t)return;const i=document.querySelector(`[data-global-search-list-item-index="${n}"]`);"function"==typeof i?.scrollIntoView&&i.scrollIntoView({behavior:"auto",block:t??"nearest"})}handleActiveIndexChange({activeIndex:n,mouseenter:t}){const i=Date.now();t&&(!this.scrolledAt||i-this.scrolledAt>250)||this.setActiveIndex({activeIndex:n,scroll:"none"})}handleDateFilterChange({filterCreatedAt:n,filterLastModifiedAt:t}){const{displayOptions:i}=this.get();this.set({displayOptions:{...i,filterCreatedAt:n,filterLastModifiedAt:t}}),this.handleSearchInputChange()}handleSearchInputEnter({meta:n}={}){const{activeIndex:t}=this.get(),s=cr(this.listItems??[])[t];if(s)switch(s.type){case Ie.CATEGORY_HEADLINE:break;case Ie.BLAB_DEF_SEARCH_RESULT:case Ie.BLAB_DEF_RECENTLY_VISITED:this.openBlabDef.emit({blabDef:s.blabDef,newTab:!!n});break;case Ie.BLAB_ITEM_SEARCH_RESULT:case Ie.BLAB_ITEM_RECENTLY_VISITED:this.openBlabItem.emit({blabItem:s.blabItem,newTab:!!n})}}openModal(){this.set({modalOpen:!0})}resetSearchModeState(){this.set({searchQuery:"",displayOptions:{filterBlabDefIds:[],filterCreatedAt:null,filterCreatedByUserIds:[],filterLastModifiedAt:null,filterWorkspaceIds:[],sort:St.BEST_MATCH}}),this.lastScrollPosition=0,this.setActiveIndex({activeIndex:0})}resetState(){this.set({activeIndex:0,searchQuery:"",modalOpen:!1,searchResults:[],loadingState:Hn.k.INITIAL,displayOptions:{sort:St.BEST_MATCH,filterCreatedByUserIds:[],filterWorkspaceIds:[],filterBlabDefIds:[],filterCreatedAt:null,filterLastModifiedAt:null}}),this.lastScrollPosition=0,this.setActiveIndex({activeIndex:0})}closeModal(){return this.listItems=void 0,this.modal?.performCloseAnimation().then(()=>{this.set({modalOpen:!1})})}
1initializeScrollPosition(n){if(this.set({scrollContainer:n}),no(this.get())===ln.n.RECENTLY_VISITED)return n.scrollTop=0,this.lastScrollPosition=0,void this.set({activeIndex:0});const{activeIndex:i}=this.get();i>0&&n&&(n.scrollTop=this.lastScrollPosition)}getInputActiveListItemPreview({activeListItem:n,searchQuery:t}){switch(n.type){case Ie.BLAB_DEF_SEARCH_RESULT:case Ie.BLAB_DEF_RECENTLY_VISITED:case Ie.BLAB_ITEM_SEARCH_RESULT:case Ie.BLAB_ITEM_RECENTLY_VISITED:{const i=n.title;return i.toLowerCase().startsWith(t.toLowerCase())?i.slice(t.length)+" \u2014 "+this.I18n.translate(this.i18n,this.I18n.key.search.openPostfix):" \u2014 "+this.I18n.translate(this.i18n,this.I18n.key.search.openPrefix)+" "+i}}return""}focusInput(){const n=this.searchInputRef?.nativeElement;setTimeout(()=>n?.focus())}static#e=this.\u0275fac=function(t){return new(t||Vn)(e.Y36(pn.r2),e.Y36(yl.i),e.Y36(Tt.z),e.Y36(ba.K))};static#t=this.\u0275cmp=e.Xpm({type:Vn,selectors:[["t5s-global-search-view"]],viewQuery:function(t,i){if(1&t&&(e.Gf(zd.zS,5),e.Gf(Gd,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.modal=o.first),e.iGM(o=e.CRH())&&(i.searchInputRef=o.first)}},inputs:{lookup:"lookup",searchResults:"searchResults",loadingState:"loadingState",userRecentlyVisitedEdges:"userRecentlyVisitedEdges"},outputs:{closeClick:"closeClick",loadMore:"loadMore",openBlabDef:"openBlabDef",openBlabItem:"openBlabItem",openModalChange:"openModalChange",searchInputChange:"searchInputChange",modalOpenChange:"modalOpenChange"},features:[e.qOj],decls:2,vars:3,consts:[[3,"width","minWidth","maxWidth","minHeight","height","maxHeight","borderRadius","verticalAlign","padding","pointer-events","modalTransitionAnimationConfig","backdropTransitionAnimationConfig","closeClick","keydown.arrowdown","keydown.arrowup",4,"ngIf"],[3,"width","minWidth","maxWidth","minHeight","height","maxHeight","borderRadius","verticalAlign","padding","modalTransitionAnimationConfig","backdropTransitionAnimationConfig","closeClick","keydown.arrowdown","keydown.arrowup"],[4,"ngIf"],[3,"mousedown"],[3,"t5sElementRendered","mousedown"],[3,"display","align-items","line-height","width","user-select","font-size","padding-top","padding-bottom","margin-top","margin-bottom",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"flex-shrink","mousedown",4,"ngIf"],["t5sLoadingSpinner","",3,"width","height",4,"ngIf","ngIfElse"],["notLoading",""],["type","text","data-cy","t5s-wc-global-search-view-search-input","spellcheck","true","t5sInputElement","",3,"placeholder","t5sElementRendered","valueChange","keydown.enter","keydown.shift.enter","keydown.meta.enter","keydown.control.enter"],["searchInput",""],["t5sClickableElement","",3,"border-radius","margin-left","mousedown","click",4,"ngIf"],["t5sLoadingSpinner",""],[4,"ngIf","ngIfElse"],["noActiveListItem",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"blabDef","size"],[3,"size","icon","fgColor"],["t5sClickableElement","",3,"mousedown","click"],[3,"icon","selectedId","options","selectedIdChange","menuOpenChange"],[3,"users","selectedUserIds","selectedUserIdsChange","menuOpenChange"],[3,"workspaces","selectedWorkspaceIds","selectedWorkspaceIdsChange","menuOpenChange"],[3,"blabDefs","selectedBlabDefIds","selectedBlabDefIdsChange","menuOpenChange"],[3,"filterCreatedAt","filterLastModifiedAt","dateFilterChange","menuOpenChange"],[3,"listItem","isActive","openBlabDef","openBlabItem","activeIndexChange"],[3,"size","fgColor","icon"]],template:function(t,i){1&t&&(e.YNc(0,h_,4,30,"t5s-modal",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.modalOpen$))},dependencies:[u.sg,u.O5,u.RF,u.n9,zn.y,Qd.m,oe.v,wn.v,Fd.z,le.H,Qn.p,io.n,Jn,xt,qi,eo,ji,Xi,we.f],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}class va{static#e=this.\u0275fac=function(t){return new(t||va)};static#t=this.\u0275mod=e.oAB({type:va});static#n=this.\u0275inj=e.cJS({imports:[Re.jQ,ve.Cl,nt.g,te.U,ke.Z,ct.KV,kn.M,ie.m0]})}class Ia{static#e=this.\u0275fac=function(t){return new(t||Ia)};static#t=this.\u0275mod=e.oAB({type:Ia});static#n=this.\u0275inj=e.cJS({imports:[tt.J,va,Ne.tM]})}var dt=r(93591);const _t={requestUpdateOrganizationNewRecordExperienceSettings:(0,g.PH)("OrganizationNewRecordExperienceUpdateActions.requestUpdateOrganizationNewRecordExperienceSettings",(0,g.Ky)()),updateOrganizationNewRecordExperienceSettingsCancelled:(0,g.PH)("OrganizationNewRecordExperienceUpdateActions.updateOrganizationNewRecordExperienceSettingsCancelled"),updateOrganizationNewRecordExperienceSettings:(0,g.PH)("OrganizationNewRecordExperienceUpdateActions.updateOrganizationNewRecordExperienceSettings",(0,g.Ky)()),updateOrganizationNewRecordExperienceSettingsSuccess:(0,g.PH)("OrganizationNewRecordExperienceUpdateActions.updateOrganizationNewRecordExperienceSettingsSuccess",(0,g.Ky)()),updateOrganizationNewRecordExperienceSettingsError:(0,dt.bR)("OrganizationNewRecordExperienceUpdateActions.updateOrganizationNewRecordExperienceSettingsError",(0,g.Ky)())};var g_=r(52678),pr=r(89493),m_=r(36680),gt=r(71755);class ao{constructor(n,t){this.actions$=n,this.intercom=t,this.updateOrganizationNewRecordExperienceSettingsEnableActiveUser$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(_t.updateOrganizationNewRecordExperienceSettings),(0,q.h)(({update:i})=>!!i.enableForActiveUser),(0,gt.b)(()=>this.intercom.trackEvent("new-record-org-switch-enable-active-user"))),{dispatch:!1}),this.updateOrganizationNewRecordExperienceSettingsEnableAllUsers$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(_t.updateOrganizationNewRecordExperienceSettings),(0,q.h)(({update:i})=>!!i.enableForAllUsers),(0,gt.b)(()=>this.intercom.trackEvent("new-record-org-switch-enable-all-users"))),{dispatch:!1}),this.updateOrganizationNewRecordExperienceSettingsDisable$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(_t.updateOrganizationNewRecordExperienceSettings),(0,q.h)(({update:i})=>!1===i.enableForAllUsers&&!1===i.enableForActiveUser),(0,gt.b)(()=>this.intercom.trackEvent("new-record-org-switch-disable"))),{dispatch:!1})}static#e=this.\u0275fac=function(t){return new(t||ao)(e.LFG(_.eX),e.LFG(m_.f4))};static#t=this.\u0275prov=e.Yz7({token:ao,factory:ao.\u0275fac})}var f_=r(70717),Sl=r(6839),Pt=r(19122),dr=r(90832),qt=r(66233);class so{constructor(n,t,i,o){this.store$=n,this.actions$=t,this.organizationSettingsApiService=i,this.databaseTransaction=o,this.requestUpdateOrganizationNewRecordExperienceSettings$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(_t.requestUpdateOrganizationNewRecordExperienceSettings),(0,p.U)(({commit:s,update:l})=>_t.updateOrganizationNewRecordExperienceSettings({update:l,commit:s,transactionId:this.databaseTransaction.generateDatabaseTransactionId()})))),this.updateOrganizationNewRecordExperienceSettingsOptimistic$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(_t.updateOrganizationNewRecordExperienceSettings),(0,_.IC)(()=>this.store$.select(Sl.S)),(0,qt.zg)(([{update:s,transactionId:l},d])=>d?[dr.s9.setOrganizationDatabaseTransaction({organizationId:d,transactionId:l}
1),Pt.GF.partiallyUpdateOrganization({organizationUpdate:{id:d,settings:{newRecordExperienceSettings:{enableForAllUsers:s.enableForAllUsers,enableForUserIds:s.enableForUserIds}}},traceId:"OrganizationNewRecordExperienceUpdateEffects.updateOrganizationNewRecordExperienceSettingsOptimistic"})]:[]))),this.updateOrganizationNewRecordExperienceSettings$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(_t.updateOrganizationNewRecordExperienceSettings),(0,q.h)(({commit:s})=>s),(0,qt.zg)(({update:s,transactionId:l})=>this.organizationSettingsApiService.updateOrganizationNewRecordExperienceSettings({enableForActiveUser:s.enableForActiveUser,enableForAllUsers:s.enableForAllUsers,transactionId:l}).pipe((0,p.U)(d=>_t.updateOrganizationNewRecordExperienceSettingsSuccess({result:d,transactionId:l})),(0,dt.Mr)(d=>_t.updateOrganizationNewRecordExperienceSettingsError({error:d,transactionId:l})))))),this.updateOrganizationNewRecordExperienceSettingsSuccess$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(_t.updateOrganizationNewRecordExperienceSettingsSuccess),(0,_.IC)(()=>this.store$.select(dr.Xb)),(0,q.h)(([{result:{organization:s}},l])=>!l.includes(s.id)),(0,p.U)(([{result:{organization:s}}])=>Pt.GF.setOrganization({organization:s,traceId:"OrganizationNewRecordExperienceUpdateEffects.updateOrganizationNewRecordExperienceSettingsSuccess"})))),this.updateOrganizationNewRecordExperienceSettingsTransactionFinished$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(_t.updateOrganizationNewRecordExperienceSettingsSuccess,_t.updateOrganizationNewRecordExperienceSettingsError),(0,p.U)(({transactionId:s})=>dr.s9.deleteDatabaseTransaction({transactionId:s}))))}static#e=this.\u0275fac=function(t){return new(t||so)(e.LFG(g.yh),e.LFG(_.eX),e.LFG(pr.qC),e.LFG(f_.L))};static#t=this.\u0275prov=e.Yz7({token:so,factory:so.\u0275fac})}class ya{static#e=this.\u0275fac=function(t){return new(t||ya)};static#t=this.\u0275mod=e.oAB({type:ya});static#n=this.\u0275inj=e.cJS({providers:[{provide:pr.qC,useFactory:n=>new pr.qC(n),deps:[g_.s]}],imports:[_.sQ.forFeature([so,ao])]})}var Je=r(94871),$t=r(3277),Tl=r(76888),ce=r(36659),x=r(61316),mt=r(40988);const b_=(0,x.I)({opacity:0});class Wn{constructor(n,t){this.overlay=n,this.ngZone=t,this.settleTimeouts=[],this.closing=!1,this.backdropClickSubject=ne
1w mt.xQ,this.backdropClick$=this.backdropClickSubject.asObservable()}isOpen(){return!!this.overlayRef?.hasAttached()&&!this.closing}open(n){this.isOpen()||(this.overlayRef&&this.teardownRef(),this.ngZone.run(()=>{const t=this.overlay.position().flexibleConnectedTo(n.anchorEl).withPositions([{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:6},{originX:"end",originY:"top",overlayX:"start",overlayY:"top",offsetX:6},{originX:"start",originY:"center",overlayX:"end",overlayY:"center",offsetX:-6}]).withPush(!0).withFlexibleDimensions(!1).withViewportMargin(12),i=this.overlay.create({positionStrategy:t,hasBackdrop:!0,backdropClass:b_,scrollStrategy:this.overlay.scrollStrategies.noop(),disposeOnNavigation:!1});this.overlayRef=i;const o=i.overlayElement;o.style.setProperty("opacity","0"),o.style.setProperty("transition","opacity 200ms ease"),this.backdropSub=i.backdropClick().subscribe(()=>{i.backdropElement?.style.setProperty("pointer-events","none"),this.fadeOutAndTeardown(),this.backdropClickSubject.next()}),i.attach(new Tl.UE(n.content,n.viewContainerRef)),this.settleTimeouts.push(window.setTimeout(()=>{this.overlayRef!==i||!i.hasAttached()||(i.updatePosition(),this.settleTimeouts.push(window.setTimeout(()=>{this.overlayRef!==i||!i.hasAttached()||(i.updatePosition(),i.overlayElement.style.setProperty("opacity","1"))})))}))}))}close(){!this.overlayRef||this.ngZone.run(()=>this.fadeOutAndTeardown())}fadeOutAndTeardown(){const n=this.overlayRef;if(n){if(this.clearTimeouts(),!n.hasAttached())return void this.teardownRef();this.closing=!0,n.overlayElement.style.setProperty("opacity","0"),this.settleTimeouts.push(window.setTimeout(()=>{this.overlayRef===n&&this.teardownRef()},200))}}teardownRef(){this.clearTimeouts(),this.closing=!1,this.backdropSub?.unsubscribe(),this.backdropSub=void 0,this.overlayRef?.dispose(),this.overlayRef=void 0}clearTimeouts(){this.settleTimeouts.forEach(n=>window.clearTimeout(n)),this.settleTimeouts=[]}ngOnDestroy(){this.teardownRef(),this.backdropClickSubject.complete()}static#e=this.\u0275fac=function(t){return new(t||Wn)(e.LFG(ce.F0),e.LFG(e.R0b))};static#t=this.\u0275prov=e.Yz7({token:Wn,factory:Wn.\u0275fac})}class Yn extends ce.Ax{constructor(){super(...arguments),this.layer=ce.mh.POP_OVER}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Yn)))(i||Yn)}}();static#t=this.\u0275prov=e.Yz7({token:Yn,factory:Yn.\u0275fac})}const C_=[{provide:$t.Xj,useClass:Yn},$t.aV,ce.F0,Wn];function v_(a,n){if(1&a&&(e.TgZ(0,"div")(1,"div"),e.Hsn(2),e.qZA()()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("position","absolute")("top","50%")("inset-inline-start",t.percentage,"%")("transform",i.riderTransform)("transition","inset-inline-start 0.4s")("pointer-events","none")("z-index",1)("width",i.characterSlotPx,"px")("height",i.characterSlotPx,"px")("display","flex")("align-items","center")("justify-content","center"),e.xp6(1),e.Udp("width",i.characterCirclePx,"px")("height",i.characterCirclePx,"px")("border-radius","100%")("background",i.Color.white)("box-shadow",i.riderBoxShadow)("overflow","hidden")("user-select","none")("display","flex")("align-items","center")("justify-content","center")}}function I_(a,n){if(1&a&&(e.TgZ(0,"div",1)(1,"div"),e._UZ(2,"div"),e.YNc(3,v_,3,44,"div",2),e.qZA()()),2&a){const t=n.ngIf,i=e.oxw();e.Udp("display","flex")("align-items","center")("margin-inline-end",t.riderReservePx,"px"),e.uIk("aria-label",t.ariaLabel)("aria-valuetext",t.ariaValueText)("aria-valuenow",t.ariaValueNow)("aria-valuemin",0)("aria-valuemax",100),e.xp6(1),e.Udp("position","relative")("border-radius",i.pillRadiusPx,"px")("background",i.trackColor)("width","100%")("height",i.heightPx,"px")("min-height",i.heightPx,"px")("overflow",t.showCharacter?"visible":"hidden"),e.xp6(1),e.Udp("position","absolute")("inset-inline-start","0")("top","0")("height","100%")("width",t.percentage,"%")("border-radius",i.pillRadiusPx,"px")("background",i.Color.blue)("transition","width 0.4s"),e.xp6(1),e.Q6J("ngIf",t.showCharacter)}}const y_=[[["","character",""]]],k_=["[character]"];class ka extends _e.A{constructor(){super(),this.pillRadiusPx=1e3,this.characterSlotPx=25,this.characterCir
1clePx=24,this.heightPx=4,this.riderTransform="translate(-25%, -50%)",this.trackColor=this.rgba(this.Color.black,.07),this.riderBoxShadow=[`0 20px 24px 0 ${this.rgba(this.Color.blackGlossy,.05)}`,`0 5px 8px 0 ${this.rgba(this.Color.blackGlossy,.027)}`,`0 0 0 1px ${this.rgba(this.Color.black,.07)}`].join(", "),this.vm$=this.select((0,$.Cc)(["percentage","ariaLabel","ariaValueText","showCharacter"]),(0,p.U)(({percentage:n,ariaLabel:t,ariaValueText:i,showCharacter:o})=>{const s=Number.isFinite(n)?Math.min(100,Math.max(0,n)):0;return{percentage:s,ariaValueNow:Math.round(100*s)/100,ariaLabel:t,ariaValueText:i,showCharacter:o,riderReservePx:o&&s>=100?16.25:0}})),this.set({percentage:0,ariaLabel:"",ariaValueText:"",showCharacter:!1})}set percentage(n){this.setProperty("percentage",n??0)}set ariaLabel(n){this.setProperty("ariaLabel",n??"")}set ariaValueText(n){this.setProperty("ariaValueText",n??"")}set showCharacter(n){this.setProperty("showCharacter",n??!1)}static#e=this.\u0275fac=function(t){return new(t||ka)};static#t=this.\u0275cmp=e.Xpm({type:ka,selectors:[["t5s-sidebar-explore-checklist-progress-bar"]],inputs:{percentage:"percentage",ariaLabel:"ariaLabel",ariaValueText:"ariaValueText",showCharacter:"showCharacter"},features:[e.qOj],ngContentSelectors:k_,decls:2,vars:3,consts:[["role","progressbar",3,"display","align-items","margin-inline-end",4,"ngIf"],["role","progressbar"],[3,"position","top","inset-inline-start","transform","transition","pointer-events","z-index","width","height","display","align-items","justify-content",4,"ngIf"]],template:function(t,i){1&t&&(e.F$t(y_),e.YNc(0,I_,4,42,"div",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.vm$))},dependencies:[u.O5,u.Ov],encapsulation:2,changeDetection:0})}const A_=["card"];function U_(a,n){if(1&a&&e._UZ(0,"t5s-user-profile-picture",10),2&a){const t=n.ngIf,i=e.oxw(2);e.Q6J("user",t)("size",i.avatarSizePx)("hasShadow",!1)("hasBorder",!1)("hostSizing",!1)}}function O_(a,n){if(1&a&&e._UZ(0,"t5s-svg",5),2&a){const t=e.oxw(2);e.Udp("display","block")("flex-shrink",0),e.Q6J("icon",t.giftIcon)("size",t.giftIconSizePx)("fgColor",t.Color.blue)}}function E_(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"div",1,2),e.NdJ("keydown.space",function(o){return o.preventDefault()})("keyup.space",function(o){return null==o.target?null:o.target.click()})("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.badgeClick.emit())}),e.TgZ(3,"div",3)(4,"span"),e._uU(5),e.qZA(),e.TgZ(6,"div")(7,"button",4),e.NdJ("click",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.onDismissClick(o))})("keydown",function(o){return o.stopPropagation()})("keyup",function(o){return o.stopPropagation()}),e.ALo(8,"async"),e._UZ(9,"t5s-svg",5),e.qZA()()(),e.TgZ(10,"div",6)(11,"t5s-sidebar-explore-checklist-progress-bar",7),e.YNc(12,U_,1,5,"t5s-user-profile-picture",8),e.qZA(),e.YNc(13,O_,1,7,"t5s-svg",9),e.qZA()()()}if(2&a){const t=n.ngIf,i=e.oxw();e.Udp("padding-inline",i.gutterInlinePx,"px"),e.xp6(1),e.Udp("background",i.Color.white)("box-sizing","border-box")("cursor","pointer")("user-select","none")("margin-inline",i.cardMarginInlinePx,"px")("margin-block-end",8,"px")("border-radius",i.cardRadiusPx,"px")("padding-block","6px 20px")("box-shadow",i.cardBoxShadow)("font-weight",500)("color",i.Color.black),e.Q6J("t5sTooltipV3",i.tooltip$),e.uIk("aria-label",t.ariaLabel),e.xp6(2),e.Udp("display","flex")("align-items","center")("width","100%")("font-size",14,"px")("min-height",27,"px")("height",30,"px")("padding-block",4,"px")("padding-inline","16px 7px"),e.xp6(1),e.Udp("flex","1 1 auto")("min-width",0,"px")("line-height",i.titleLineHeightPx,"px")("white-space","nowrap")("overflow","hidden")("text-overflow","clip")("mask-image",i.titleFadeMask)("-webkit-mask-image",i.titleFadeMask),e.xp6(1),e.Oqu(t.title),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("flex-shrink",0)("flex-grow",0)("height","100%"),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("flex-shrink",0)("padding",4,"px")("border-radius",6,"px")("margin-inline-start",10,"px")("transition","background 20ms ease-in"),e.uIk("aria-label",e.lcZ(8,115,i.dismissAriaLabel$)),e.xp6(2),e.Udp("display","block"),e.Q6J("icon",i.xmarkIcon)("size",i.xmarkIconSizePx)("fgColor",i.secondaryIconColor),e.xp6(1),e.Udp("display","flex")("align-items","center")("gap",8,"px")("width","100%")("height",i.progressRowHeightPx,"px")("margin-block-start",16,"px")("padding-inline","16px 9px"),e.xp6(1),e.Udp("flex",1)("min-width",0,"px"),e.Q6J("percentage",t.percentage)("showCharacter",!!t.user),e.xp6(1),e.Q6J("ngIf",t.user),e.xp6(1),e.Q6J("ngIf",!t.allComplete)}}class wa extends _e.A{constructor(){super(),this.xmarkIcon=y.k9U,this.giftIcon=y.Lmt,this.giftIconSizePx=20,this.xmarkIconSizePx=16,this.avatarSizePx=24,this.cardRadiusPx=12,this.titleFadeMask="linear-gradient(to right, black calc(100% - 16px), transparent)",this.gutterInlinePx=8,this.cardMarginInlinePx=2,this.progressRowHeightPx=4,this.titleLineHeightPx=21,this.secondaryIconColor=this.Color.greyAvatar,this.cardBoxShadow=`0 0 0 1px #E6E5E3, 0 8px 12px 0 ${this.rgba(this.Color.blackGlossy,.027)}, 0 2px 6px 0 ${this.rgba(this.Color.blackGlossy,.027)}`,this.badgeClick=new e.vpe,this.dismissClick=new e.vpe,this.dismissAriaLabel$=this.select((0,$.Cc)(["dismissAriaLabel"]),(0,p.U)(({dismissAriaLabel:n})=>n)),this.tooltip$=this.select((0,$.Cc)(["tooltip"]),(0,p.U)(({tooltip:n})=>n)),this.vm$=this.select((0,$.Cc)(["title","completedCount","totalCount","progressAriaValueText","user"]),(0,p.U)(({title:n,completedCount:t,totalCount:i,progressAriaValueText:o,user:s})=>{const l=this.resolve(n);if(l)return{title:l,ariaLabel:o?`${l}, ${o}`:l,percentage:i>0?t/i*100:0,allComplete:i>0&&t>=i,user:s}})),this.set({completedCount:0,totalCount:0,progressAriaValueText:"",dismissAriaLabel:"",tooltip:"",user:null})}set title(n){this.setProperty("title",n)}set completedCount(n){this.setProperty("completedCount",n??0)}set totalCount(n){this.setProperty("totalCount",n??0)}set progressAriaValueText(n){this.setProperty("progressAriaValueText",n??"")}
1set dismissAriaLabel(n){this.setProperty("dismissAriaLabel",n??"")}set tooltip(n){this.setProperty("tooltip",n??"")}set user(n){this.setProperty("user",n??null)}onDismissClick(n){n.stopPropagation(),this.dismissClick.emit()}resolve(n){return n&&n.i18n.translate(this.i18n,{key:n.key,params:n.params})||null}static#e=this.\u0275fac=function(t){return new(t||wa)};static#t=this.\u0275cmp=e.Xpm({type:wa,selectors:[["t5s-sidebar-explore-checklist-badge"]],viewQuery:function(t,i){if(1&t&&e.Gf(A_,5),2&t){let o;e.iGM(o=e.CRH())&&(i.cardRef=o.first)}},inputs:{title:"title",completedCount:"completedCount",totalCount:"totalCount",progressAriaValueText:"progressAriaValueText",dismissAriaLabel:"dismissAriaLabel",tooltip:"tooltip",user:"user"},outputs:{badgeClick:"badgeClick",dismissClick:"dismissClick"},features:[e.qOj],decls:2,vars:3,consts:[[3,"padding-inline",4,"ngIf"],["role","button","tabindex","0","tooltipPosition","right",3,"t5sTooltipV3","keydown.space","keyup.space","click"],["card",""],["dir","ltr"],["type","button","t5sClickableElement","",3,"click","keydown","keyup"],[3,"icon","size","fgColor"],["aria-hidden","true"],[3,"percentage","showCharacter"],["character","",3,"user","size","hasShadow","hasBorder","hostSizing",4,"ngIf"],[3,"icon","size","fgColor","display","flex-shrink",4,"ngIf"],["character","",3,"user","size","hasShadow","hasBorder","hostSizing"]],template:function(t,i){1&t&&(e.YNc(0,E_,14,117,"div",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.vm$))},dependencies:[u.O5,le.H,oe.v,it.i,_a.p,ka,u.Ov],encapsulation:2,changeDetection:0})}function R_(a,n){if(1&a&&(e.TgZ(0,"div",3),e._UZ(1,"t5s-svg",4),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("box-sizing","border-box")("display","flex")("align-items","center")("justify-content","center")("height",i.lockedHeightPx,"px")("border-radius",i.cardRadiusPx,"px")("box-shadow","0 0 0 1px "+i.subtleBorderColor)("background",i.Color.white)("padding","8px 16px"),e.Q6J("t5sTooltipV3",t.lockedTooltip),e.uIk("aria-label",t.lockedTooltip),e.xp6(1),e.Udp("display","block"),e.Q6J("icon",i.lockIcon)("size",i.lockIconSizePx)("fgColor",i.tertiaryIconColor)}}function P_(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.claimClick.emit())}),e.TgZ(1,"span")(2,"div"),e._UZ(3,"t5s-svg",4),e.qZA(),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.TgZ(6,"span"),e._uU(7),e.qZA()()()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("box-sizing","border-box")("width","100%")("display","flex")("align-items","center")("justify-content","space-between")("gap",12,"px")("text-align","start")("height",i.unlockedHeightPx,"px")("border-radius",i.cardRadiusPx,"px")("box-shadow","0 0 0 1px "+i.borderColor)("padding","8px 16px")("transition","background 20ms ease-in"),e.Q6J("t5sClickableElement",i.surfaceClickable)("t5sTooltipV3",t.footnote),e.xp6(1),e.Udp("display","flex")("flex-direction","column")("align-items","flex-start")("justify-content","center")("gap",2,"px")("min-width",0,"px"),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("flex-shrink",0)("width",i.heroIconBoxSizePx,"px")("height",i.heroIconBoxSizePx,"px"),e.xp6(1),e.Q6J("icon",i.heroIcon)("size",i.heroIconSizePx)("fgColor",i.secondaryIconColor),e.xp6(1),e.Udp("font-size",14,"px")("line-height",20,"px")("font-weight",500),e.xp6(1),e.Oqu(t.title),e.xp6(1),e.Udp("font-size",13,"px")("line-height",18,"px")("font-weight",500)("color",i.secondaryTextColor),e.xp6(1),e.Oqu(t.subtitle)}}function $_(a,n){if(1&a&&(e.ynx(0),e.YNc(1,R_,2,25,"div",1),e.YNc(2,P_,8,69,"button",2),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",!t.unlocked),e.xp6(1),e.Q6J("ngIf",t.unlocked)}}class Sa extends _e.A{constructor(){super(),this.lockIcon=y.Wal,this.heroIcon=y.md5,this.cardRadiusPx=16,this.lockedHeightPx=60,this.unlockedHeightPx=96,this.heroIconSizePx=28,this.heroIconBoxSizePx=36,this.lockIconSizePx=28,this.borderColor="#E6E5E3",this.subtleBorderColor=this.Color.greyAvatarBorder,this.tertiaryIconColor=this.Color.greyCalloutTextSecondary,this.secondaryIconColor=this.Color.greyAvatar,this.secondaryTextColor="#7D7A75",this.surfaceClickable={default:this.Color.white,hover:this.rgba(this.Color.black,.06),active:this.rgba(this.Color.black,.16)},this.claimClick=new e.vpe,this.vm$=this.select((0,$.Cc)(["reward","unlocked"]),(0,p.U)(({reward:n,unlocked:t})=>null===n?void 0:{unlocked:t,lockedTooltip:this.resolve(n.lockedTooltip)??"",title:this.resolve(n.unlockedTitle)??"",subtitle:this.resolve(n.unlockedSubtitle)??"",footnote:this.resolve(n.footnote)??void 0})),this.set({reward:null,unlocked:!1})}set reward(n){this.setProperty("reward",n??null)}set unlocked(n){this.setProperty("unlocked",n??!1)}resolve(n){return n&&n.i18n.translate(this.i18n,{key:n.key,params:n.params})||null}static#e=this.\u0275fac=function(t){return new(t||Sa)};static#t=this.\u0275cmp=e.Xpm({type:Sa,selectors:[["t5s-sidebar-explore-checklist-reward"]],inputs:{reward:"reward",unlocked:"unlocked"},outputs:{claimClick:"claimClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["role","img","tooltipPosition","top",3,"t5sTooltipV3","box-sizing","display","align-items","justify-content","height","border-radius","box-shadow","background","padding",4,"ngIf"],["type","button","tooltipPosition","top","tooltipWhiteSpace","pre-line","tooltipTextAlign","center",3,"t5sClickableElement","box-sizing","width","display","align-items","justify-content","gap","text-align","height","border-radius","box-shadow","padding","transition","t5sTooltipV3","click",4,"ngIf"],["role","img","tooltipPosition","top",3,"t5sTooltipV3"],[3,"icon","size","fgColor"],["type","button","tooltipPosition","top","tooltipWhiteSpace","pre-line","tooltipTextAlign","center",3,"t5sClickableElement","t5sTooltipV3","click"]],template:function(t,i){1&t&&(e.YNc(0,$_,3,2,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.vm$))},dependencies:[u.O5,le.H,oe.v,it.i,u.Ov],encapsulation:2,changeDetection:0})}function V_(a,n){if(1&a&&e._UZ(0,"span"),2&a){const t=e.oxw(2);e.Udp("display","block")("box-sizing","border-box")("width",t.uncheckedCircleSizePx,"px")("height",t.uncheckedCircleSizePx,"px")("border-radius","50%")("background",t.Color.white)("box-shadow",t.uncheckedRingShadow)("pointer-events","none")}}function W_(a,n){if(1&a&&(e.TgZ(0,"span"),e._UZ(1,"t5s-svg",5),e.qZA()),2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("justify-content","center")("width",t.markerSizePx,"px")("height",t.markerSizePx,"px")("border-radius","50%")("background",t.completedMarkerColor),e.xp6(1),e.Udp("display","block"),e.Q6J("icon",t.checkIcon)("size",t.checkIconSizePx)("fgColor",t.Color.white)}}function Y_(a,n){if(1&a&&(e.TgZ(0,"span"),e._UZ(1,"img",6),e.qZA()),2&a){const t=n.ngIf,i=e.oxw().ngIf,o=e.oxw();e.Udp("display","flex")("align-items","center")("justify-content","center")("flex-shrink",0)("width",o.illustrationWidthPx,"px")("margin-inline-end",o.illustrationBleedPx,"px")("margin-block",o.illustrationBlockBleedPx+"px"),e.xp6(1),e.Udp("flex-shrink",0)("max-width",o.illustrationMaxWidthPx,"px")("max-height",o.illustrationMaxHeightPx,"px"),e.Q6J("src",t,e.LSH)("alt",i.illustrationAlt)}}function K_(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",1),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.stepClick.emit())}),e.TgZ(1,"span")(2,"span")(3,"span"),e.YNc(4,V_,1,16,"span",2),e.YNc(5,W_,2,19,"span",3),e.qZA(),e.TgZ(6,"span"),e._uU(7),e.qZA()()(),e.YNc(8,Y_,2,22,"span",4),e.qZA()}if(2&a){const t=n.ngIf,i=e.oxw();e.Udp("box-sizing","border-box")("width","100%")("display","flex")("align-items","center")("text-align","start")("border-radius",i.rowRadiusPx,"px")("min-height",i.rowMinHeightPx,"px")("padding","8px 4px 8px 16px")("overflow","hidden")("box-shadow","0 0 0 1px "+(t.completed?i.completedRingColor:i.ringColor))("transition","background 20ms ease-in"),e.Q6J("t5sClickableElement",t.completed?i.completedClickable:i.incompleteClickable),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("display","flex")("align-items","center")("justify-content","space-between"),e.xp6(1),e.Udp("display","flex")("align-items","center")("gap",12,"px")("min-width",0,"px")("flex",1),e.xp6(1),e.Udp("position","relative")("display","inline-flex")("align-items","center")("justify-content","center")("flex-shrink",0)("width",i.markerSizePx,"px")("height",i.markerSizePx,"px"),e.xp6(1),e.Q6J("ngIf",!t.completed),e.xp6(1),e.Q6J("ngIf",t.completed),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("max-width",198,"px")("white-space",i.labelWhiteSpace)("overflow-wrap","break-word")("font-size",13,"px")("line-height",18,"px")("font-weight",500)("color",t.completed?i.str
1ikeColor:null)("text-decoration",t.completed?"line-through":null)("text-decoration-color",t.completed?i.strikeColor:null),e.xp6(1),e.Oqu(t.label),e.xp6(1),e.Q6J("ngIf",t.illustrationSrc)}}class Ta extends _e.A{constructor(){super(),this.checkIcon=y.NOm,this.rowRadiusPx=12,this.rowMinHeightPx=52,this.markerSizePx=18,this.labelWhiteSpace="pre-line",this.uncheckedCircleSizePx=15,this.uncheckedRingShadow="0 0 0 1.5px rgba(27, 21, 0, 0.19)",this.illustrationWidthPx=150,this.illustrationBleedPx=-16,this.illustrationBlockBleedPx=-8,this.illustrationMaxWidthPx=160,this.illustrationMaxHeightPx=52,this.checkIconSizePx=12,this.ringColor=this.Color.greyAvatarBorder,this.completedRingColor="#E6E5E3",this.completedMarkerColor=this.Color.greyAvatar,this.strikeColor="#A19E99",this.incompleteClickable={default:this.Color.white,hover:this.rgba(this.Color.black,.06),active:this.rgba(this.Color.black,.16)},this.completedClickable={...this.incompleteClickable,default:"transparent"},this.stepClick=new e.vpe,this.vm$=this.select((0,$.Cc)(["step","completed"]),(0,p.U)(({step:n,completed:t})=>{const i=n.illustration;return{label:this.resolve(t?n.completedLabel??n.label:n.label)??"",completed:t,illustrationSrc:i?.lightSrc??null,illustrationAlt:this.resolve(i?.altText)??""}})),this.set({completed:!1})}set step(n){this.setProperty("step",n)}set completed(n){this.setProperty("completed",n??!1)}resolve(n){return n&&n.i18n.translate(this.i18n,{key:n.key,params:n.params})||null}static#e=this.\u0275fac=function(t){return new(t||Ta)};static#t=this.\u0275cmp=e.Xpm({type:Ta,selectors:[["t5s-sidebar-explore-checklist-step"]],inputs:{step:"step",completed:"completed"},outputs:{stepClick:"stepClick"},features:[e.qOj],decls:2,vars:3,consts:[["type","button",3,"t5sClickableElement","box-sizing","width","display","align-items","text-align","border-radius","min-height","padding","overflow","box-shadow","transition","click",4,"ngIf"],["type","button",3,"t5sClickableElement","click"],[3,"display","box-sizing","width","height","border-radius","background","box-shadow","pointer-events",4,"ngIf"],[3,"display","align-items","justify-content","width","height","border-radius","background",4,"ngIf"],[3,"display","align-items","justify-content","flex-shrink","width","margin-inline-end","margin-block",4,"ngIf"],[3,"icon","size","fgColor"],[3,"src","alt"]],template:function(t,i){1&t&&(e.YNc(0,K_,9,83,"button",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.vm$))},dependencies:[u.O5,le.H,oe.v,u.Ov],encapsulation:2,changeDetection:0})}function lu(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"br"),e._uU(2),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(2),e.Oqu(t.subtitleSecondLine)}}function cu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-sidebar-explore-checklist-step",5),e.NdJ("stepClick",function(){const s=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.stepClick.emit(s.def.id))}),e.qZA()}if(2&a){const t=n.$implicit;e.Q6J("step",t.def)("completed",t.completed)}}function pu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-sidebar-explore-checklist-reward",6),e.NdJ("claimClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.rewardClaimClick.emit())}),e.qZA()}if(2&a){const t=n.ngIf,i=e.oxw().ngIf;e.Q6J("reward",t)("unlocked",i.allComplete)}}function du(a,n){if(1&a&&(e.TgZ(0,"div",1)(1,"div")(2,"span"),e._uU(3),e.qZA(),e.TgZ(4,"span"),e._uU(5),e.YNc(6,lu,3,1,"ng-container",2),e.qZA()(),e.TgZ(7,"div"),e.YNc(8,cu,1,2,"t5s-sidebar-explore-checklist-step",3),e.YNc(9,pu,1,2,"t5s-sidebar-explore-checklist-reward",4),e.qZA()()),2&a){const t=n.ngIf,i=e.oxw();e.Udp("box-sizing","border-box")("width",i.panelWidthPx,"px")("display","flex")("flex-direction","column")("gap",i.panelGapPx,"px")("padding",i.panelPaddingPx,"px")("border-radius",12,"px")("background",i.panelBackground)("color",i.primaryTextColor)("box-shadow",i.panelBoxShadow),e.uIk("aria-label",t.title),e.xp6(1),e.Udp("display","flex")("flex-direction","column")("gap",2,"px"),e.xp6(1),e.Udp("font-size",16,"px")("line-height",24,"px")("font-weight",600),e.xp6(1),e.Oqu(t.title),e.xp6(1),e.Udp("font-size",13,"px")("line-height",18,"px")("color",i.secondaryTextColor),e.xp6(1),e.hij(" ",t.subtitle," "),e.xp6(1),e.Q6J("ngIf",t.subtitleSecondLine),e.xp6(1),e.Udp("display","flex")("flex-direction","column")("gap",
1i.bodyGapPx,"px"),e.xp6(1),e.Q6J("ngForOf",t.steps)("ngForTrackBy",i.trackByStepId),e.xp6(1),e.Q6J("ngIf",t.reward)}}class Aa extends _e.A{constructor(){super(),this.panelWidthPx=380,this.panelPaddingPx=16,this.panelGapPx=20,this.bodyGapPx=10,this.panelBackground=this.Color.grey9,this.primaryTextColor=this.Color.black,this.secondaryTextColor="#7D7A75",this.panelBoxShadow=[`0 20px 24px 0 ${this.rgba(this.Color.blackGlossy,.05)}`,`0 5px 8px 0 ${this.rgba(this.Color.blackGlossy,.027)}`,`0 0 0 1px ${this.rgba(this.Color.black,.07)}`].join(", "),this.stepClick=new e.vpe,this.rewardClaimClick=new e.vpe,this.vm$=this.select((0,$.Cc)(["title","subtitle","subtitleSecondLine","steps","completedStepIds","reward"]),(0,q.h)(({steps:n})=>n.length>0),(0,p.U)(({title:n,subtitle:t,subtitleSecondLine:i,steps:o,completedStepIds:s,reward:l})=>{const d=new Set(s),h=o.map(m=>({def:m,completed:d.has(m.id)}));return{title:this.resolve(n)??"",subtitle:this.resolve(t)??"",subtitleSecondLine:this.resolve(i)??"",steps:h,reward:l,allComplete:h.length>0&&h.every(m=>m.completed)}}),(0,be.q)(1)),this.trackByStepId=(n,t)=>t.def.id}set title(n){this.setProperty("title",n??null)}set subtitle(n){this.setProperty("subtitle",n??null)}set subtitleSecondLine(n){this.setProperty("subtitleSecondLine",n??null)}set steps(n){this.setProperty("steps",n??[])}set completedStepIds(n){this.setProperty("completedStepIds",n??[])}set reward(n){this.setProperty("reward",n??null)}resolve(n){return n&&n.i18n.translate(this.i18n,{key:n.key,params:n.params})||null}static#e=this.\u0275fac=function(t){return new(t||Aa)};static#t=this.\u0275cmp=e.Xpm({type:Aa,selectors:[["t5s-sidebar-explore-checklist-overlay"]],inputs:{title:"title",subtitle:"subtitle",subtitleSecondLine:"subtitleSecondLine",steps:"steps",completedStepIds:"completedStepIds",reward:"reward"},outputs:{stepClick:"stepClick",rewardClaimClick:"rewardClaimClick"},features:[e.qOj],decls:2,vars:3,consts:[["role","dialog","data-cy","t5s-sidebar-explore-checklist-overlay",3,"box-sizing","width","display","flex-direction","gap","padding","border-radius","background","color","box-shadow",4,"ngIf"],["role","dialog","data-cy","t5s-sidebar-explore-checklist-overlay"],[4,"ngIf"],[3,"step","completed","stepClick",4,"ngFor","ngForOf","ngForTrackBy"],[3,"reward","unlocked","claimClick",4,"ngIf"],[3,"step","completed","stepClick"],[3,"reward","unlocked","claimClick"]],template:function(t,i){1&t&&(e.YNc(0,du,10,51,"div",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.vm$))},dependencies:[u.sg,u.O5,Sa,Ta,u.Ov],encapsulation:2,changeDetection:0})}const mu=["anchor"],fu=["panelTpl"],xu=["badge"];function bu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-sidebar-explore-checklist-overlay",4),e.NdJ("stepClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.stepClick.emit(o))})("rewardClaimClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.rewardClaimClick.emit())}),e.ALo(1,"async"),e.ALo(2,"async"),e.ALo(3,"async"),e.ALo(4,"async"),e.ALo(5,"async"),e.ALo(6,"async"),e.qZA()}if(2&a){const t=e.oxw();e.Q6J("title",e.lcZ(1,6,t.overlayTitle$))("subtitle",e.lcZ(2,8,t.overlaySubtitle$))("subtitleSecondLine",e.lcZ(3,10,t.overlaySubtitleSecondLine$))("steps",e.lcZ(4,12,t.steps$))("completedStepIds",e.lcZ(5,14,t.completedStepIds$))("reward",e.lcZ(6,16,t.reward$))}}class Ua extends _e.A{constructor(n,t){super(),this.overlayService=n,this.viewContainerRef=t,this.badgeClick=new e.vpe,this.dismissClick=new e.vpe,this.stepClick=new e.vpe,this.rewardClaimClick=new e.vpe,this.overlayDismiss=new e.vpe,this.overlaySeen=new e.vpe,this.badgeTitle$=this.select((0,$.Cc)(["badgeTitle"]),(0,p.U)(({badgeTitle:i})=>i)),this.overlayTitle$=this.select((0,$.Cc)(["overlayTitle"]),(0,p.U)(({overlayTitle:i})=>i)),this.overlaySubtitle$=this.select((0,$.Cc)(["overlaySubtitle"]),(0,p.U)(({overlaySubtitle:i})=>i)),this.overlaySubtitleSecondLine$=this.select((0,$.Cc)(["overlaySubtitleSecondLine"]),(0,p.U)(({overlaySubtitleSecondLine:i})=>i)),this.steps$=this.select((0,$.Cc)(["steps"]),(0,p.U)(({steps:i})=>i)),this.completedStepIds$=this.select((0,$.Cc)(["completedStepIds"]),(0,p.U)(({completedStepIds:i})=>i)),this.reward$=this.select((0,$.Cc)(["reward"]),(0,p.U)(({reward:i})=>i)),this.open$=this.select((0,$.Cc)(["open"]),(0,p.U)(({open:i})=>i)),this.progressAriaValueText$=this.select((0,$.Cc)(["progressAriaValueText"]),(0,p.U)(({progressAriaValueText:i})=>i)),this.dismissAriaLabel$=this.select((0,$.Cc)(["dismissAriaLabel"]),(0,p.U)(({dismissAriaLabel:i})=>i)),this.badgeTooltip$=this.select((0,$.Cc)(["badgeTooltip"]),(0,p.U)(({badgeTooltip:i})=>i)),this.user$=this.select((0,$.Cc)(["user"]),(0,p.U)(({user:i})=>i)),this.completedCount$=this.select((0,$.Cc)(["steps","completedStepIds"]),(0,p.U)(({steps:i,completedStepIds:o})=>{const s=new Set(o);return i.filter(l=>s.has(l.id)).length})),this.totalCount$=this.select((0,$.Cc)(["steps"]),(0,p.U)(({steps:i})=>i.length)),this.set({badgeTitle:null,overlayTitle:null,overlaySubtitle:null,overlaySubtitleSecondLine:null,steps:[],completedStepIds:[],reward:null,open:!1,progressAriaValueText:"",dismissAriaLabel:"",badgeTooltip:"",user:null}),this.hold(this.open$,i=>this.syncOverlay(i)),this.hold(this.overlayService.backdropClick$,()=>this.overlayDismiss.emit())}set badgeTitle(n){this.setProperty("badgeTitle",n??null)}set overlayTitle(n){this.setProperty("overlayTitle",n??null)}set overlaySubtitle(n){this.setProperty("overlaySubtitle",n??null)}set overlaySubtitleSecondLine(n){this.setProperty("overlaySubtitleSecondLine",n??null)}set steps(n){this.setProperty("steps",n??[])}set completedStepIds(n){this.setProperty("completedStepIds",n??[])}set reward(n){this.setProperty("reward",n??null)}set open(n){this.setProperty("open",n??!1)}set progressAriaValueText(n){this.setProperty("progressAriaValueText",n??"")}
1set dismissAriaLabel(n){this.setProperty("dismissAriaLabel",n??"")}set badgeTooltip(n){this.setProperty("badgeTooltip",n??"")}set user(n){this.setProperty("user",n??null)}syncOverlay(n){const t=this.badgeRef?.cardRef?.nativeElement??this.anchorRef?.nativeElement,i=this.panelTplRef;if(t&&i)if(n){if(this.overlayService.isOpen())return;this.overlayService.open({content:i,viewContainerRef:this.viewContainerRef,anchorEl:t}),this.overlaySeen.emit()}else this.overlayService.close()}static#e=this.\u0275fac=function(t){return new(t||Ua)(e.Y36(Wn),e.Y36(e.s_b))};static#t=this.\u0275cmp=e.Xpm({type:Ua,selectors:[["t5s-sidebar-explore-checklist-host"]],viewQuery:function(t,i){if(1&t&&(e.Gf(mu,7),e.Gf(fu,7),e.Gf(xu,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.anchorRef=o.first),e.iGM(o=e.CRH())&&(i.panelTplRef=o.first),e.iGM(o=e.CRH())&&(i.badgeRef=o.first)}},inputs:{badgeTitle:"badgeTitle",overlayTitle:"overlayTitle",overlaySubtitle:"overlaySubtitle",overlaySubtitleSecondLine:"overlaySubtitleSecondLine",steps:"steps",completedStepIds:"completedStepIds",reward:"reward",open:"open",progressAriaValueText:"progressAriaValueText",dismissAriaLabel:"dismissAriaLabel",badgeTooltip:"badgeTooltip",user:"user"},outputs:{badgeClick:"badgeClick",dismissClick:"dismissClick",stepClick:"stepClick",rewardClaimClick:"rewardClaimClick",overlayDismiss:"overlayDismiss",overlaySeen:"overlaySeen"},features:[e._Bn([...C_]),e.qOj],decls:13,vars:23,consts:[["anchor",""],[3,"title","completedCount","totalCount","progressAriaValueText","dismissAriaLabel","tooltip","user","badgeClick","dismissClick"],["badge",""],["panelTpl",""],[3,"title","subtitle","subtitleSecondLine","steps","completedStepIds","reward","stepClick","rewardClaimClick"]],template:function(t,i){1&t&&(e.TgZ(0,"div",null,0)(2,"t5s-sidebar-explore-checklist-badge",1,2),e.NdJ("badgeClick",function(){return i.badgeClick.emit()})("dismissClick",function(){return i.dismissClick.emit()}),e.ALo(4,"async"),e.ALo(5,"async"),e.ALo(6,"async"),e.ALo(7,"async"),e.ALo(8,"async"),e.ALo(9,"async"),e.ALo(10,"async"),e.qZA()(),e.YNc(11,bu,7,18,"ng-template",null,3,e.W1O)),2&t&&(e.Udp("width","100%"),e.xp6(2),e.Q6J("title",e.lcZ(4,9,i.badgeTitle$))("completedCount",e.lcZ(5,11,i.completedCount$))("totalCount",e.lcZ(6,13,i.totalCount$))("progressAriaValueText",e.lcZ(7,15,i.progressAriaValueText$))("dismissAriaLabel",e.lcZ(8,17,i.dismissAriaLabel$))("tooltip",e.lcZ(9,19,i.badgeTooltip$))("user",e.lcZ(10,21,i.user$)))},dependencies:[wa,Aa,u.Ov],encapsulation:2,changeDetection:0})}var ur=r(54876),hr=r(92225),Ol=r(70939);class Oa{static#e=this.\u0275fac=function(t){return new(t||Oa)};static#t=this.\u0275mod=e.oAB({type:Oa});static#n=this.\u0275inj=e.cJS({imports:[u.ez,hr.n,ur.BV,ce.df,Ol.c7,ct.KV]})}var gr=r(42845),Cu=r(17443),vu=r(29091),Ea=r(65192),Iu=r(81991),yu=r(37860),Mt=r(8356),At=r(90568);class mr extends mt.xQ{}class Tn extends At.y{}var Ke=r(99927);class Kn extends Ke.X{}class dn extends At.y{}class fr extends Ke.X{}class Da extends At.y{}class xr extends mt.xQ{}class An extends At.y{}class br extends mt.xQ{}class El extends At.y{}class ro extends Ke.X{}class Ut extends At.y{}class Cr extends mt.xQ{}class Ba extends At.y{}class vr extends mt.xQ{}class Dl extends At.y{}class Bl extends At.y{}class He extends mt.xQ{}var me=r(57921),ku=r(38730),wu=r(99797),Su=r(96046),_n=r(52406),un=r(47477),ue=r(56142),fe=r(57355),I=(()=>{return(a=I||(I={})).OPEN_HOME="OPEN_HOME",a.OPEN_HOME_V2="OPEN_HOME_V2",a.OPEN_FOCUS="OPEN_FOCUS",a.OPEN_GLOBAL_SEARCH="OPEN_GLOBAL_SEARCH",a.OPEN_SETTINGS="OPEN_SETTINGS",a.OPEN_WORKFLOW_CENTER="OPEN_WORKFLOW_CENTER",a.OPEN_WORKSPACE_TEMPLATE_MARKET="OPEN_WORKSPACE_TEMPLATE_MARKET",a.OPEN_ORGANIZATION_INVITE="OPEN_ORGANIZATION_INVITE",a.OPEN_ORGANIZATION_CREATE="OPEN_ORGANIZATION_CREATE",a.OPEN_ORGANIZATION_UPGRADE="OPEN_ORGANIZATION_UPGRADE",a.CONFIG_CHANGE="CONFIG_CHANGE",a.USER_SETTINGS_CHANGE="USER_SETTINGS_CHANGE",a.OPEN_TRY_NEW_RECORD_DIALOG="OPEN_TRY_NEW_RECORD_DIALOG",a.CONTEXT_CHANGE="CONTEXT_CHANGE",a.OPEN_WORKSPACE="OPEN_WORKSPACE",a.OPEN_WORKSPACE_CREATION="OPEN_WORKSPACE_CREATION",a.OPEN_WORKSPACE_SETTINGS="OPEN_WORKSPACE_SETTINGS",a.OP
1EN_WORKSPACE_MEMBER_INVITE="OPEN_WORKSPACE_MEMBER_INVITE",a.COPY_WORKSPACE_LINK="COPY_WORKSPACE_LINK",a.DUPLICATE_WORKSPACE="DUPLICATE_WORKSPACE",a.ARCHIVE_WORKSPACE="ARCHIVE_WORKSPACE",a.UNARCHIVE_WORKSPACE="UNARCHIVE_WORKSPACE",a.DELETE_WORKSPACE="DELETE_WORKSPACE",a.JOIN_WORKSPACE="JOIN_WORKSPACE",a.LEAVE_WORKSPACE="LEAVE_WORKSPACE",a.GET_WORKSPACES="GET_WORKSPACES",a.OPEN_BLAB_DEF="OPEN_BLAB_DEF",a.CREATE_BLAB_DEF="CREATE_BLAB_DEF",a.MOVE_BLAB_DEF="MOVE_BLAB_DEF",a.DELETE_BLAB_DEF="DELETE_BLAB_DEF",a.DUPLICATE_BLAB_DEF="DUPLICATE_BLAB_DEF",a.BOOKMARK_BLAB_DEF="BOOKMARK_BLAB_DEF",a.UNBOOKMARK_BLAB_DEF="UNBOOKMARK_BLAB_DEF",a.COPY_BLAB_DEF_LINK="COPY_BLAB_DEF_LINK",a.UPDATE_BLAB_DEF_INFO="UPDATE_BLAB_DEF_INFO",a.CREATE_BLAB_ITEM="CREATE_BLAB_ITEM",a.OPEN_BLAB_ITEM="OPEN_BLAB_ITEM",a.DUPLICATE_BLAB_ITEM="DUPLICATE_BLAB_ITEM",a.COPY_BLAB_ITEM_LINK="COPY_BLAB_ITEM_LINK",a.DELETE_BLAB_ITEM="DELETE_BLAB_ITEM",a.USER_SESSION_RETRIEVE="USER_SESSION_RETRIEVE",a.USER_SESSION_SELECT="USER_SESSION_SELECT",a.USER_SESSION_CREATE="USER_SESSION_CREATE",a.USER_SESSION_UPDATES="USER_SESSION_UPDATES",a.USER_SESSIONS_REMOVE="USER_SESSIONS_REMOVE",a.SHARED_CONTENT_RETRIEVE="SHARED_CONTENT_RETRIEVE",a.ORG_SHARE_DUPLICATE="ORG_SHARE_DUPLICATE",a.EXPLORE_CHECKLIST_TOGGLE="EXPLORE_CHECKLIST_TOGGLE",a.EXPLORE_CHECKLIST_CLOSE="EXPLORE_CHECKLIST_CLOSE",a.EXPLORE_CHECKLIST_DISMISS="EXPLORE_CHECKLIST_DISMISS",a.EXPLORE_CHECKLIST_SEEN="EXPLORE_CHECKLIST_SEEN",a.EXPLORE_CHECKLIST_STEP_CLICK="EXPLORE_CHECKLIST_STEP_CLICK",a.EXPLORE_CHECKLIST_REWARD_CLAIM="EXPLORE_CHECKLIST_REWARD_CLAIM",I;var a})(),ze=(()=>{return(a=ze||(ze={})).WORKSPACE="WORKSPACE",a.BOOKMARK="BOOKMARK",a.SHARED="SHARED",ze;var a})(),zt=r(21281);function Tu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.leaveBlabDef())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconLogout)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.leave.label))}}function Au(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.unpinBlabDef())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconPinStrikeThrough)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.unpin.label))}}function Uu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.bookmarkBlabDef())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconStarWebClient)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.bookmark.label))}}function Ou(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.unbookmarkBlabDef())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconUnstarWebClient)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.unbookmark.label))}}function Eu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);
1return e.KtG(o.duplicateBlabDef())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconDuplicate)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.duplicate.label))}}function Du(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.renameBlabDef())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconRename)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.rename.label))}}const Ml=function(a,n,t){return{default:a,hover:n,active:t}},Bu=function(a,n,t,i){return{hover:a,active:n,color:t,svg:i}};function Mu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.deleteBlabDef())}),e._UZ(1,"t5s-svg",6),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.Q6J("t5sMenuItem",e.l5B(26,Bu,t.rgba(t.Color.black,.06),t.rgba(t.Color.black,.16),e.kEZ(18,Ml,t.Color.black,t.Color.red,t.Color.red),e.kEZ(22,Ml,t.rgba(t.Color.black,.85),t.Color.red,t.Color.red))),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconTrash),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.delete.label))}}function Zu(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.YNc(1,Tu,4,18,"button",1),e.YNc(2,Au,4,18,"button",1),e.YNc(3,Uu,4,18,"button",1),e.YNc(4,Ou,4,18,"button",1),e.YNc(5,Eu,4,18,"button",1),e.TgZ(6,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.copyBlabDefLink())}),e._UZ(7,"t5s-svg",3),e.TgZ(8,"span"),e._uU(9),e.qZA()(),e.YNc(10,Du,4,18,"button",1),e.YNc(11,Mu,4,31,"button",4),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.canLeaveBlabDef(t)),e.xp6(1),e.Q6J("ngIf",i.isPinned(t)),e.xp6(1),e.Q6J("ngIf",!i.isPinned(t)&&!i.isBookmarked(t)&&!i.isOrgShareActorContext(t)),e.xp6(1),e.Q6J("ngIf",!i.isPinned(t)&&i.isBookmarked(t)),e.xp6(1),e.Q6J("ngIf",i.showDuplicateBlabDefOption(t)),e.xp6(1),e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",i.IconLink)("fgColor",i.rgba(i.Color.black,.85)),e.xp6(2),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.settings.copyLink.label)),e.xp6(1),e.Q6J("ngIf",i.canRenameBlabDef(t)),e.xp6(1),e.Q6J("ngIf",i.showDeleteBlabDefOption(t))}}class lo extends _e.A{constructor(n,t,i,o,s,l){super(),this.actor$=t,this.lookup$=i,this.settings$=o,this.elRef=s,this.output$$=l,this.I18n=fe.jK,this.IconStarWebClient=y.mrV,this.IconLink=y.JHz,this.IconTrash=y.IT9,this.IconLogout=y.gtU,this.IconUnstarWebClient=y.kDH,this.IconRename=y.ydd,this.IconDuplicate=y.MMl,this.IconPinStrikeThrough=y.AtG,this.openRenameOverlay=new e.vpe,this.set({hideDestructiveActions:!1}),this.connect(n),this.connect(t),this.connect(i),this.connect(o)}set blabDef(n){this.setProperty("blabDef",n)}set hideDestructiveActions(n){this.setProperty("hideDestructiveActions",n)}isBookmarked({settings:n,blabDef:t}){return[...n.bookmarks??[]].some(o=>o.type===ue.lq.BOOKMARK_BLAB_DEF&&o.blabDefId===t.id)}isOrgShareActorContext({actor:n}){return n.type===un.g.ORGANIZATION_SHARELINK}bookmarkBlabDef(){const{blabDef:n,activeUserId:t,settings:i}=this.get(),o=[...i.bookmarks??[]];!t||o.some(s=>s.type===ue.lq.BOOKMARK_BLAB_DEF&&s.blabDefId===n.id)||this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:t,bookmarks:[{type:ue.lq.BOOKMARK_BLAB_DEF,blabDefId:n.id},...o]}})}unbookmarkBlabDef(){const{blabDef:n,settings:t,activeUserId:i}=this.get(),o=[...t.bookmarks??[]];!i||!o.some(s=>s.type===ue.lq.BOOKMARK_BLAB_DEF&&s.blabDefId===n.id)||this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:i,bookmarks:o.filter(s=>
1s.type!==ue.lq.BOOKMARK_BLAB_DEF||s.blabDefId!==n.id)}})}isPinned({settings:n,blabDef:t}){const i=[...n.pinnedSharedContent??[]];return t.section===ze.SHARED&&i.some(o=>o.type===ue.om.BLAB_DEF&&o.blabDefId===t.id)}unpinBlabDef(){const{blabDef:n,settings:t,activeUserId:i}=this.get(),o=[...t.pinnedSharedContent??[]];!i||!o.some(s=>s.type===ue.om.BLAB_DEF&&s.blabDefId===n.id)||this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:i,pinnedSharedContent:o.filter(s=>s.type!==ue.om.BLAB_DEF||s.blabDefId!==n.id)}})}copyBlabDefLink(){const{blabDef:n}=this.get();this.output$$.next({type:I.COPY_BLAB_DEF_LINK,url:n.url??""})}canLeaveBlabDef({}){return!1}leaveBlabDef(){}canRenameBlabDef(n){const{blabDef:{id:t},activeUserId:i,lookup:o}=n;return(0,H.FC)({blabDefId:t,userId:i,lookup:o})}renameBlabDef(){this.openRenameOverlay.emit()}showDuplicateBlabDefOption(n){const{blabDef:{id:t},activeUserId:i,lookup:o,hideDestructiveActions:s}=n;return!s&&(0,H.Zk)({blabDefId:t,userId:i,lookup:o})}duplicateBlabDef(){const{blabDef:n}=this.get();this.output$$.next({type:I.DUPLICATE_BLAB_DEF,blabDefId:n.id})}showDeleteBlabDefOption(n){const{hideDestructiveActions:t,blabDef:{id:i},activeUserId:o,lookup:s}=n;return!t&&(0,H.f2)({blabDefId:i,userId:o,lookup:s})}deleteBlabDef(){const{blabDef:n}=this.get();this.output$$.next({type:I.DELETE_BLAB_DEF,blabDefId:n.id})}static#e=this.\u0275fac=function(t){return new(t||lo)(e.Y36(Tt.z),e.Y36(zt.h),e.Y36(Ut),e.Y36(dn),e.Y36(e.SBq),e.Y36(He))};static#t=this.\u0275cmp=e.Xpm({type:lo,selectors:[["t5s-organization-sidebar-blab-def-settings"]],inputs:{blabDef:"blabDef",hideDestructiveActions:"hideDestructiveActions"},outputs:{openRenameOverlay:"openRenameOverlay"},features:[e.qOj],decls:3,vars:9,consts:[[4,"ngIf"],["t5sMenuItem","",3,"display","align-items","min-height","font-size","line-height","padding","click",4,"ngIf"],["t5sMenuItem","",3,"click"],[3,"size","icon","fgColor"],[3,"t5sMenuItem","display","align-items","min-height","font-size","line-height","padding","click",4,"ngIf"],[3,"t5sMenuItem","click"],[3,"size","icon"]],template:function(t,i){1&t&&(e.TgZ(0,"div"),e.YNc(1,Zu,12,25,"ng-container",0),e.ALo(2,"push"),e.qZA()),2&t&&(e.Udp("min-width",180,"px")("max-width",400,"px")("padding","6px 0px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(2,7,i.state$)))},dependencies:[u.O5,Fn.e,le.H,we.f],encapsulation:2,changeDetection:0})}var Un=r(6081),Xt=r(55650),Lu=r(45758);const Nu=["clickableBackground"],Ru=["chevronVisible"],Pu=["buttonRowVisible"];function $u(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-blab-def-settings",15),e.NdJ("openRenameOverlay",function(){e.CHM(t),e.oxw();const o=e.MAs(14);return e.KtG(o.openOverlay())}),e.qZA()}if(2&a){const t=e.oxw(2);e.Q6J("blabDef",t.blabDef$)("hideDestructiveActions",t.hideDestructiveActions$)}}function zu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-blab-def-rename-overlay",16),e.NdJ("closeClick",function(){e.CHM(t),e.oxw();const o=e.MAs(14);return e.KtG(o.closeOverlay())})("blabDefChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleBlabDefInfoChange(o))}),e.qZA()}if(2&a){const t=e.oxw(2);e.Q6J("blabDef",t.blabDef$)}}function Qu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",17),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.output$$.next({type:s.OutputType.CREATE_BLAB_ITEM,blabDefId:o.id}))}),e._UZ(1,"t5s-svg",11),e.qZA()}if(2&a){const t=e.oxw(2);e.Udp("position","relative")("border-radius",4,"px")("padding","2px 2px")("transition","background 20ms ease-in"),e.Q6J("t5sTooltipV3",t.I18n.translate(t.i18n,t.I18n.key.add.tooltip)),e.xp6(1),e.Q6J("size",16)("icon",t.IconPlusThick)("fgColor",t.rgba(t.Color.black,.45))}}const Fu=function(){return{maxWidth:"0px",overflow:"hidden"}},Gu=function(){return{maxWidth:"fit-content"}},Ju=function(a,n){return{default:a,hover:n}},Hu=function(){return{graphic:1}},Vu=function(a,n){return{blabDef:a,i18n:n}},Wu=function(){return{animateScale:!1,animateOpacity:!1}};function Yu(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",1,2)(3,"a",3),e.NdJ("click",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleBlabDefClick(o))}),e.qZA(),e._UZ(4,"div"),e.TgZ(5,"div"),e._UZ(6,"t5s-blab-def-icon",4),e.qZA(),e.TgZ(7,"div")(8,"div"),e._uU(9),e.qZA()(),e.TgZ(10,"div",5,6),e._UZ(12,"div"),e.TgZ(13,"div",7,8),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.set({renameMenuOpen:o.menuOpen}))}),e.TgZ(15,"button",9,10),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.set({settingsMenuOpen:o.menuOpen}))}),e._UZ(17,"t5s-svg",11),e.qZA()(),e.YNc(18,$u,1,2,"ng-template",null,12,e.W1O),e.YNc(20,zu,1,1,"ng-template",null,13,e.W1O),e.YNc(22,Qu,2,12,"button",14),e.ALo(23,"push"),e.qZA()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(16),o=e.MAs(19),s=e.MAs(21),l=e.oxw();e.xp6(1),e.Udp("width","calc(100% - 16px)")("min-height",30,"px")("border-radius",6,"px")("margin","1px 8px")("padding","0p
1x 8px")("padding-left",t.section===l.SectionType.WORKSPACE?16:8,"px")("display","flex")("flex-direction","row")("align-items","center")("transition","background 150ms"),e.Q6J("t5sHoverVisibleContainer","organization-sidebar-blab-def-hover")("hoverVisibleAnimationDuration",150)("hoverVisibleAdditionalProperties",e.WLB(127,Ju,e.DdM(125,Fu),e.DdM(126,Gu))),e.xp6(2),e.Udp("border-radius",6,"px"),e.Q6J("href",t.url,e.LSH),e.uIk("data-cy","t5s-wc-org-sidebar-blab-def-row")("data-cy-blab-def-slug",null==t.info?null:t.info.slug),e.xp6(1),e.Udp("position","absolute")("top",0,"px")("left",0,"px")("width","100%")("height","100%")("pointer-events","none")("border-radius",6,"px")("background-color",t.isActive?l.rgba(l.Color.black,.04):void 0),e.xp6(1),e.Udp("display","flex")("height",22,"px")("width",22,"px")("align-items","center")("justify-content","center")("margin-right",4,"px"),e.xp6(1),e.Q6J("size",18)("blabDef",t)("ratio",e.DdM(130,Hu)),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("display","flex")("flex-direction","row")("align-items","center")("margin-bottom",1,"px"),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("color",t.isActive?l.Color.black:l.rgba(l.Color.black,.6))("font-weight",t.isActive?600:500)("font-size",14,"px")("line-height",20,"px")("max-width","fit-content")("overflow","hidden")("text-overflow","ellipsis")("white-space","nowrap")("user-select","none"),e.xp6(1),e.hij(" ",l.getBlabDefDisplayName(e.WLB(131,Vu,t,l.i18n))," "),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",4,"px"),e.Q6J("t5sHoverVisibleElement","organization-sidebar-blab-def-hover"),e.xp6(2),e.Udp("width",1,"px"),e.xp6(1),e.Q6J("t5sMenuOverlay",s)("menuOverlayAnimation",e.DdM(134,Wu))("menuOverlayImperative",!0)("menuOverlayRefocusEl",i),e.xp6(2),e.Udp("position","relative")("border-radius",4,"px")("padding","2px 2px")("transition","background 20ms ease-in"),e.Q6J("t5sMenuOverlay",o)("t5sTooltipV3",l.settingsButtonTooltip$),e.xp6(2),e.Q6J("size",16)("icon",l.IconDotsWebClient)("fgColor",l.rgba(l.Color.black,.45)),e.xp6(5),e.Q6J("ngIf",e.lcZ(23,123,l.showCreateBlabItemBtn$))}}class On extends _e.A{constructor(n,t){super(),this.activeActor$=n,this.output$$=t,this.I18n=fe.jK,this.SectionType=ze,this.OutputType=I,this.getBlabDefDisplayName=H.fM,this.IconChevronDownThick=y.P4P,this.IconDotsWebClient=y.$FW,this.IconPlusThick=y.NJo,this.IconSettings=y.iCC,this.IconAddPersonCircle=y.O_,this.IconLockFilled=y.nsc,this.blabDef$=this.select((0,v.Cc)(["blabDef"]),(0,p.U)(({blabDef:i})=>i)),this.showCreateBlabItemBtn$=this.select((0,v.Cc)(["blabDef"]),(0,p.U)(({blabDef:i})=>i.canCreateBlabItem&&i.info?.type===to.a.DATABASE)),this.hideDestructiveActions$=this.select((0,v.Cc)(["hideDestructiveActions"]),(0,p.U)(({hideDestructiveActions:i})=>i)),this.settingsButtonTooltip$=this.activeActor$.pipe((0,p.U)(({actor:i})=>this.I18n.translate(this.i18n,i?.type===un.g.ORGANIZATION_SHARELINK?this.I18n.key.settings.tooltipOrgShare:this.I18n.key.settings.tooltip))),this.set({settingsMenuOpen:!1,renameMenuOpen:!1,hideDestructiveActions:!1}),this.hold(this.select((0,v.Cc)(["settingsMenuOpen","renameMenuOpen"]),(0,p.U)(({settingsMenuOpen:i,renameMenuOpen:o})=>i||o),(0,w.x)()),i=>this.handleMenuOpenChange(i))}set blabDef(n){this.setProperty("blabDef",n)}set hideDestructiveActions(n){this.setProperty("hideDestructiveActions",n)}handleBlabDefClick(n){if(!(0,Sn.i0)(n))return!0;const{blabDef:t}=this.get();return this.output$$.next({type:I.OPEN_BLAB_DEF,blabDef:t}),!1}handleMenuOpenChange(n){this.clickableBackground?.setActive(n),this.chevronVisible?.setActive(n),this.buttonRowVisible?.setActive(n),this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:n}})}handleBlabDefInfoChange({blabDefUpdate:n,commit:t}){this.output$$.next({type:I.UPDATE_BLAB_DEF_INFO,blabDefUpdate:n,commit:t})}handleIsDraggingChange(n){this.chevronVisible?.setActive(n),this.buttonRowVisible?.setActive(n),this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:n}})}ngOnDestroy(){super.ngOnDestroy()}static#e=this.\u0275fac=function(t){return new(t||On)(e.Y36(zt.h),e.Y36(He))};static#t=this.\u0275cmp=e.Xpm({type:On,selectors:[["t5s-organization-sidebar-blab-def"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Nu,5),e.Gf(Ru,5),e.Gf(Pu,5)),2&t){let o;
1e.iGM(o=e.CRH())&&(i.clickableBackground=o.first),e.iGM(o=e.CRH())&&(i.chevronVisible=o.first),e.iGM(o=e.CRH())&&(i.buttonRowVisible=o.first)}},inputs:{blabDef:"blabDef",hideDestructiveActions:"hideDestructiveActions"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["t5sClickableBackgroundElement","",3,"t5sHoverVisibleContainer","hoverVisibleAnimationDuration","hoverVisibleAdditionalProperties"],["clickableBackground","t5sClickableBackgroundElement"],["draggable","false","target","_blank",3,"href","click"],[3,"size","blabDef","ratio"],[3,"t5sHoverVisibleElement"],["buttonRowVisible","t5sHoverVisibleElement"],[3,"t5sMenuOverlay","menuOverlayAnimation","menuOverlayImperative","menuOverlayRefocusEl","menuOpenChange"],["renameOverlayTrigger","t5sMenuOverlay"],["tabindex","-1","t5sClickableElement","",3,"t5sMenuOverlay","t5sTooltipV3","menuOpenChange"],["settingsBtn",""],[3,"size","icon","fgColor"],["settingsOverlay",""],["renameOverlay",""],["tabindex","-1","t5sClickableElement","",3,"t5sTooltipV3","position","border-radius","padding","transition","click",4,"ngIf"],[3,"blabDef","hideDestructiveActions","openRenameOverlay"],[3,"blabDef","closeClick","blabDefChange"],["tabindex","-1","t5sClickableElement","",3,"t5sTooltipV3","click"]],template:function(t,i){1&t&&(e.YNc(0,Yu,24,135,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.blabDef$))},dependencies:[u.O5,oe.v,Un.x,ga.P,ma.a,it.i,Xt.q,le.H,Qn.p,Lu.W,lo,we.f],encapsulation:2,changeDetection:0})}function Ku(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.leaveBlabItem())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconLogout)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.leave.label))}}function ju(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.unpinBlabItem())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconPinStrikeThrough)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.unpin.label))}}function qu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.bookmarkBlabItem())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconStarWebClient)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.bookmark.label))}}function Xu(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.unbookmarkBlabItem())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconUnstarWebClient)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.unbookmark.label))}}function eh(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.duplicateBlabItem())}),e._UZ(1,"t5s-svg",3),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0p
1x 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconDuplicate)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.duplicate.label))}}const Zl=function(a,n,t){return{default:a,hover:n,active:t}},th=function(a,n,t,i){return{hover:a,active:n,color:t,svg:i}};function nh(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.deleteBlabItem())}),e._UZ(1,"t5s-svg",6),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw(2);e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.Q6J("t5sMenuItem",e.l5B(26,th,t.rgba(t.Color.red,.1),t.rgba(t.Color.red,.2),e.kEZ(18,Zl,t.Color.black,t.Color.red,t.Color.red),e.kEZ(22,Zl,t.rgba(t.Color.black,.85),t.Color.red,t.Color.red))),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconTrash),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.settings.delete.label))}}function ih(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.YNc(1,Ku,4,18,"button",1),e.YNc(2,ju,4,18,"button",1),e.YNc(3,qu,4,18,"button",1),e.YNc(4,Xu,4,18,"button",1),e.YNc(5,eh,4,18,"button",1),e.TgZ(6,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.copyBlabItemLink())}),e._UZ(7,"t5s-svg",3),e.TgZ(8,"span"),e._uU(9),e.qZA()(),e.YNc(10,nh,4,31,"button",4),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.canLeaveBlabItem(t)),e.xp6(1),e.Q6J("ngIf",i.isPinned(t)),e.xp6(1),e.Q6J("ngIf",!i.isPinned(t)&&!i.isBookmarked(t)),e.xp6(1),e.Q6J("ngIf",!i.isPinned(t)&&i.isBookmarked(t)),e.xp6(1),e.Q6J("ngIf",i.canDuplicateBlabItem(t)),e.xp6(1),e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",i.IconLink)("fgColor",i.rgba(i.Color.black,.85)),e.xp6(2),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.settings.copyLink.label)),e.xp6(1),e.Q6J("ngIf",i.canDeleteBlabItem(t))}}class co extends _e.A{constructor(n,t,i,o,s,l){super(),this.lookup$=t,this.router$=i,this.settings$=o,this.elRef=s,this.output$$=l,this.I18n=fe.qJ,this.IconStarWebClient=y.mrV,this.IconLink=y.JHz,this.IconTrash=y.IT9,this.IconLogout=y.gtU,this.IconUnstarWebClient=y.kDH,this.IconRename=y.ydd,this.IconDuplicate=y.MMl,this.IconPinStrikeThrough=y.AtG,this.set({}),this.connect(n),this.connect(t),this.connect(i),this.connect(o)}set blabItem(n){this.setProperty("blabItem",n)}isBookmarked({settings:n,blabItem:t}){return[...n.bookmarks??[]].some(o=>o.type===ue.lq.BOOKMARK_BLAB_ITEM&&o.blabItemId===t.id)}bookmarkBlabItem(){const{blabItem:n,activeUserId:t,settings:i}=this.get(),o=[...i.bookmarks??[]];!t||o.some(s=>s.type===ue.lq.BOOKMARK_BLAB_ITEM&&s.blabItemId===n.id)||this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:t,bookmarks:[{type:ue.lq.BOOKMARK_BLAB_ITEM,blabItemId:n.id},...o]}})}unbookmarkBlabItem(){const{blabItem:n,settings:t,activeUserId:i}=this.get(),o=[...t.bookmarks??[]];!i||!o.some(s=>s.type===ue.lq.BOOKMARK_BLAB_ITEM&&s.blabItemId===n.id)||this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:i,bookmarks:o.filter(s=>s.type!==ue.lq.BOOKMARK_BLAB_ITEM||s.blabItemId!==n.id)}})}isPinned({settings:n,blabItem:t}){const i=[...n.pinnedSharedContent??[]];return t.section===ze.SHARED&&i.some(o=>o.type===ue.om.BLAB_ITEM&&o.blabItemId===t.id)}unpinBlabItem(){const{blabItem:n,settings:t,activeUserId:i}=this.get(),o=[...t.pinnedSharedContent??[]];!i||!o.some(s=>s.type===ue.om.BLAB_ITEM&&s.blabItemId===n.id)||this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:i,pinnedSharedContent:o.filter(s=>s.type!==ue.om.BLAB_ITEM||s.blabItemId!==n.id)}})}copyBlabItemLink(){const{blabItem:n,lookup:t,router:{runtimeUrl:i}}=this.get();this.output$$.next({type:I.COPY_BLAB_ITEM_LINK,url:(0,bt.aj)({blabItemId:n.id,lookup:t,runtimeUrl:i})||""})}canLeaveBlabItem({}){return!1}leaveBlabItem(){}canDuplicateBlabItem(n){return!1}duplicateBlabItem(){const{blabItem:n}=this.get();this.output$$.next({type:I.DUPLICATE_BLAB_ITEM,blabItem:n})}canDeleteBlabItem(n){return!1}deleteBlabItem(){const{blabItem:n}=this.get();this.output$$.next({type:I.DELETE_BLAB_ITEM,blabItemId:n.id})}static#e=this.\u0275fac=function(t){return new(t||co)(e.Y36(Tt.z),e.Y36(Ut),e.Y36(An),e.Y36(dn),e.Y36(e.SBq),e.Y36(He))};static#t=this.\u0275cmp=e.Xpm({type:co,selectors:[["t5s-organization-sidebar-blab-item-settings"]],inputs:{blabItem:"blabItem"},features:[e.qOj],decls:3,vars:9,consts:[[4,"ngIf"],["t5sMenuItem","",3,"display","align-items","min-height","font-size","line-height","padding","click",4,"ngIf"],["t5sMenuItem","",3,"click"],[3,"size","icon","fgColor"],[3,"t5sMenuItem","display","align-items","min-height","font-size","line-height","padding","click",4,"ngIf"],[3,"t5sMenuItem","click"],[3,"size","icon"]],template:function(t,i){1&t&&(e.TgZ(0,"div"),e.YNc(1,ih,11,24,"ng-container",0),e.ALo(2,"push"),e.qZA()),2&t&&(e.Udp("min-width",180,"px")("max-width",400,"px")("padding","6px 0px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(2,7,i.state$)))},dependencies:[u.O5,Fn.e,le.H,we.f],encapsulation:2,changeDetection:0})}var po=r(53193);
1const oh=["clickableBackground"],ah=["chevronVisible"],sh=["buttonRowVisible"];function rh(a,n){if(1&a&&e._UZ(0,"t5s-organization-sidebar-blab-item-settings",10),2&a){const t=e.oxw(3);e.Q6J("blabItem",t.blabItem$)}}const lh=function(){return{maxWidth:"0px",overflow:"hidden"}},ch=function(){return{maxWidth:"fit-content"}},ph=function(a,n){return{default:a,hover:n}},dh=function(){return{graphic:1}},_h=function(a,n,t){return{blabItemId:a,lookup:n,i18n:t}};function uh(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",1,2)(3,"a",3),e.NdJ("click",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleBlabItemClick(o))}),e.qZA(),e._UZ(4,"div"),e.TgZ(5,"div"),e._UZ(6,"t5s-blab-item-icon",4),e.qZA(),e.TgZ(7,"div")(8,"div"),e._uU(9),e.qZA()(),e.TgZ(10,"div",5,6),e._UZ(12,"div"),e.TgZ(13,"button",7),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleMenuOpenChange(o.menuOpen))}),e._UZ(14,"t5s-svg",8),e.qZA(),e.YNc(15,rh,1,1,"ng-template",null,9,e.W1O),e.qZA()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(16),o=e.oxw().ngIf,s=e.oxw();e.xp6(1),e.Udp("width","calc(100% - 16px)")("min-height",30,"px")("border-radius",6,"px")("margin","1px 8px")("padding","0px 8px")("display","flex")("flex-direction","row")("align-items","center")("transition","background 150ms"),e.Q6J("t5sHoverVisibleContainer","organization-sidebar-blab-item-hover")("hoverVisibleAnimationDuration",150)("hoverVisibleAdditionalProperties",e.WLB(116,ph,e.DdM(114,lh),e.DdM(115,ch))),e.xp6(2),e.Udp("border-radius",6,"px"),e.uIk("href",t.url,e.LSH),e.xp6(1),e.Udp("position","absolute")("top",0,"px")("left",0,"px")("width","100%")("height","100%")("pointer-events","none")("border-radius",6,"px")("background-color",t.isActive?s.rgba(s.Color.black,.04):void 0),e.xp6(1),e.Udp("display","flex")("height",22,"px")("width",22,"px")("align-items","center")("justify-content","center")("margin-right",4,"px"),e.xp6(1),e.Q6J("size",18)("blabDef",o.blabDef)("ratio",e.DdM(119,dh)),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("display","flex")("flex-direction","row")("align-items","center")("margin-bottom",1,"px"),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("color",t.isActive?s.Color.black:s.rgba(s.Color.black,.6))("font-weight",t.isActive?600:500)("font-size",14,"px")("line-height",20,"px")("max-width","fit-content")("overflow","hidden")("text-overflow","ellipsis")("white-space","nowrap")("user-select","none"),e.xp6(1),e.hij(" ",s.getBlabItemDisplayName(e.kEZ(120,_h,t.id,o.lookup,s.i18n))," "),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",4,"px"),e.Q6J("t5sHoverVisibleElement","organization-sidebar-blab-item-hover"),e.xp6(2),e.Udp("width",1,"px"),e.xp6(1),e.Udp("position","relative")("border-radius",4,"px")("padding","2px 2px")("transition","background 20ms ease-in"),e.Q6J("t5sMenuOverlay",i)("t5sTooltipV3",s.I18n.translate(s.i18n,s.I18n.key.settings.tooltip)),e.xp6(1),e.Q6J("size",16)("icon",s.IconDotsWebClient)("fgColor",s.rgba(s.Color.black,.45))}}function hh(a,n){if(1&a&&(e.ynx(0),e.YNc(1,uh,17,124,"ng-container",0),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",t.blabItem)}}class jn extends _e.A{constructor(n,t,i,o,s,l){super(),this.dnd=t,this.elRef=i,this.settings$=o,this.output$$=s,this.I18n=fe.qJ,this.SectionType=ze,this.OutputType=I,this.getBlabItemDisplayName=bt.iG,this.IconChevronDownThick=y.P4P,this.IconDotsWebClient=y.$FW,this.IconPlusThick=y.NJo,this.IconSettings=y.iCC,this.IconAddPersonCircle=y.O_,this.IconLockFilled=y.nsc,this.blabItem$=this.select((0,v.Cc)(["blabItem"]),(0,p.U)(({blabItem:d})=>d)),this.context$=this.select((0,v.Cc)(["lookup","blabItem"]),(0,p.U)(({lookup:d,blabItem:h})=>({lookup:d,blabItem:h,blabDef:(0,H.Kz)({blabDefId:h.blabDefId,blabDefs:d})}))),this.set({}),this.connect(n),this.connect(l)}set blabItem(n){this.setProperty("blabItem",n)}handleBlabItemClick(n){if(!(0,Sn.i0)(n))return!0;const{blabItem:t}=this.get();return this.output$$.next({type:I.OPEN_BLAB_ITEM,blabItem:t}),!1}handleMenuOpenChange(n){this.clickableBackground?.setActive(n),this.chevronVisible?.setActive(n),this.buttonRowVisible?.setActive(n),this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:n}})}handleIsDraggingChange(n){this.chevronVisible?.setActive(n),this.buttonRowVisible?.setActive(n),this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:n}})}ngOnDestroy(){super.ngOnDestroy()}static#e=this.\u0275fac=function(t){return new(t||jn)(e.Y36(Tt.z),e.Y36(po.cx),e.Y36(e.SBq),e.Y36(Kn),e.Y36(He),e.Y36(Ut))};static#t=this.\u0275cmp=e.Xpm({type:jn,selectors:[["t5s-organization-sidebar-blab-item"]],viewQuery:function(t,i){if(1&t&&(e.Gf(oh,5),e.Gf(ah,5),e.Gf(sh,5)),2&t){let o;
1e.iGM(o=e.CRH())&&(i.clickableBackground=o.first),e.iGM(o=e.CRH())&&(i.chevronVisible=o.first),e.iGM(o=e.CRH())&&(i.buttonRowVisible=o.first)}},inputs:{blabItem:"blabItem"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["t5sClickableBackgroundElement","",3,"t5sHoverVisibleContainer","hoverVisibleAnimationDuration","hoverVisibleAdditionalProperties"],["clickableBackground","t5sClickableBackgroundElement"],["draggable","false","target","_blank",3,"click"],[3,"size","blabDef","ratio"],[3,"t5sHoverVisibleElement"],["buttonRowVisible","t5sHoverVisibleElement"],["tabindex","-1","t5sClickableElement","",3,"t5sMenuOverlay","t5sTooltipV3","menuOpenChange"],[3,"size","icon","fgColor"],["settingsOverlay",""],[3,"blabItem"]],template:function(t,i){1&t&&(e.YNc(0,hh,2,1,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.context$))},dependencies:[u.O5,oe.v,Un.x,ga.P,ma.a,it.i,Xt.q,le.H,io.n,co,we.f],encapsulation:2,changeDetection:0})}var c=r(3982),hn=r(10607),en=r(5372);const Ir="--t5s-organization-sidebar-container-border-radius",Ma="--t5s-organization-sidebar-drag-indicator-color";var ye=r(46724);class _o extends hn.R{constructor(n,t,i,o,s){super(),this.dnd=t,this.elRef=i,this.output$$=o,this.settings$=s,this.connect(n)}set bookmark(n){this.setProperty("bookmark",n)}ngAfterViewInit(){this.source=this.dnd.dragSource(ze.BOOKMARK,{beginDrag:()=>this.get().bookmark,canDrag:()=>!0});const n=this.elRef.nativeElement;this.source?.connectDragPreview(n),this.source?.connectDragSource(n,{dropEffect:"move"}),this.target=this.dnd.dropTarget(ze.BOOKMARK,{drop:t=>{const i=t.getItem(),o=this.get().bookmark;if(!i)return;const l=function gh({operation:a,sourceBookmark:n,targetBookmark:t,settings:i,activeUserId:o}){if(!o||!n||!t)return;const s=(0,ye.xp)(n),l=i.bookmarks.findIndex(C=>(0,ye.xp)(C)===s),d=(0,ye.xp)(t),h=i.bookmarks.findIndex(C=>(0,ye.xp)(C)===d),m=[...i.bookmarks];if(l>h)(0,Je.bA)(m,l,"ABOVE"===a?h:h+1);else{if(!(l<h))return;(0,Je.bA)(m,l,"ABOVE"===a?h-1:h)}return{type:I.USER_SETTINGS_CHANGE,settings:{userId:o,bookmarks:m}}}({operation:this.getDraggingOperation(t),sourceBookmark:i,targetBookmark:o,activeUserId:this.get().activeUserId,settings:this.settings$.getValue()});l&&this.output$$.next(l)},hover:t=>{if(t.isOver({shallow:!0})){const i=(0,c.VD)(Ma);if("ABOVE"===this.getDraggingOperation(t))return void this.elRef.nativeElement?.style.setProperty("box-shadow",`0px -2.5px 0px 0px ${i}, inset 0px 1.5px 0px 0px ${i}`);"BELOW"===this.getDraggingOperation(t)&&this.elRef.nativeElement?.style.setProperty("box-shadow",`inset 0px -1.5px 0px 0px ${i}, 0px 2.5px 0px 0px ${i}`)}}}),this.hold(this.target.listen(t=>!t.isOver({shallow:!0})).pipe((0,w.x)(),(0,en.V)()),()=>{this.elRef.nativeElement?.style.removeProperty("box-shadow")}),this.target.connectDropTarget(this.elRef.nativeElement)}getDraggingOperation(n){const t=this.elRef.nativeElement.getBoundingClientRect(),i=.5*(t.bottom-t.top);return(n.getClientOffset()?.y??0)-t.top<i?"ABOVE":"BELOW"}ngOnDestroy(){super.ngOnDestroy(),this.source?.unsubscribe(),this.target?.unsubscribe()}static#e=this.\u0275fac=function(t){return new(t||_o)(e.Y36(Tt.z),e.Y36(po.cx),e.Y36(e.SBq),e.Y36(He),e.Y36(Kn))};static#t=this.\u0275dir=e.lG2({type:_o,selectors:[["","t5sOrganizationSidebarBookmarkDragDrop",""]],inputs:{bookmark:["t5sOrganizationSidebarBookmarkDragDrop","bookmark"]},exportAs:["t5sOrganizationSidebarBookmarkDragDrop"],features:[e.qOj]})}var Se=r(13678);function mh(a,n){if(1&a&&(e.TgZ(0,"div")(1,"div"),e._uU(2),e.qZA(),e.TgZ(3,"div"),e._uU(4),e.qZA()()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("min-width","fit-content"),e.xp6(2),e.Oqu(i.I18n.translate(i.i18n,t.isCollapsed?i.I18n.key.section.expandTooltip:i.I18n.key.section.collapseTooltip)),e.xp6(1),e.Udp("color",i.rgba(i.Color.white,.5)),e.xp6(1),e.Oqu(t.tooltip)}}function fh(a,n){1&a&&(e.TgZ(0,"div"),e.Hsn(1,1),e.qZA()),2&a&&e.Udp("width",100,"%")}const xh=function(a,n,t){return{default:a,hover:n,active:t}},bh=function(a,n,t){return{hover:a,active:n,color:t}};function Ch(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div")(3,"div")(4,"div")(5,"button",1),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.isCollapsedChange.emit({isCollapsed:!s.isCollapsed}))}),e.TgZ(6,"span"),e._uU(7),e.qZA()(),e.YNc(8,mh,5,6,"ng-template",null,2,e.W1O),e.qZA()(),e.TgZ(10,"div"),e.Hsn(11),e.qZA()(),e.YNc(12,fh,2,2,"div",3),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(9),o=e.oxw();e.xp6(1),e.Udp("width",100,"%")("margin-bottom",t.isCollapsed?void 0:18,"px"),e.xp6(1),e.Udp("display","flex")("align-items","center")("width",100,"%")("font-size",14,"px")("min-height",24,"px")("padding","0p
1x 16px")("margin-top",6,"px")("margin-bottom",2,"px"),e.xp6(1),e.Udp("flex",1)("min-width",0,"px"),e.xp6(1),e.Udp("display","flex")("align-items","center"),e.xp6(1),e.Udp("max-width",100,"%")("user-select","none")("transition","background 20ms ease-in 0s")("cursor","pointer")("border-radius",4,"px")("padding",2,"px")("margin-left",-4,"px")("display","flex")("align-items","center")("padding","2px 4px"),e.Q6J("t5sClickableElement",e.kEZ(80,bh,o.rgba(o.Color.black,.06),o.rgba(o.Color.black,.16),e.kEZ(76,xh,o.rgba(o.Color.black,.5),o.rgba(o.Color.black,.8),o.rgba(o.Color.black,.8))))("t5sTooltipV3",i)("tooltipPosition","top")("isDisabled",t.changeCollapseDisabled),e.xp6(1),e.Udp("text-transform","initial")("font-size",12,"px")("line-height",1)("font-weight",600)("transition","color 100ms ease-out 0s")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(t.label),e.xp6(3),e.Udp("opacity","var(--organization-sidebar-nested-hover-buttons-opacity)")("transition-property","opacity")("transition-duration","200ms"),e.xp6(2),e.Q6J("ngIf",!t.isCollapsed)}}const vh=[[["","organization-sidebar-section-buttons",""]],"*"],Ih=["[organization-sidebar-section-buttons]","*"];class gn extends _e.A{constructor(){super(),this.I18n=fe.nN,this.isCollapsedChange=new e.vpe}set label(n){this.setProperty("label",n)}set tooltip(n){this.setProperty("tooltip",n)}set isCollapsed(n){this.setProperty("isCollapsed",n)}set changeCollapseDisabled(n){this.setProperty("changeCollapseDisabled",n)}static#e=this.\u0275fac=function(t){return new(t||gn)};static#t=this.\u0275cmp=e.Xpm({type:gn,selectors:[["t5s-organization-sidebar-section"]],inputs:{label:"label",tooltip:"tooltip",isCollapsed:"isCollapsed",changeCollapseDisabled:"changeCollapseDisabled"},outputs:{isCollapsedChange:"isCollapsedChange"},features:[e.qOj],ngContentSelectors:Ih,decls:2,vars:3,consts:[[4,"ngIf"],[3,"t5sClickableElement","t5sTooltipV3","tooltipPosition","isDisabled","click"],["sectionTooltip",""],[3,"width",4,"ngIf"]],template:function(t,i){1&t&&(e.F$t(vh),e.YNc(0,Ch,13,84,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,oe.v,it.i,u.Ov],encapsulation:2,changeDetection:0})}function yh(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-organization-sidebar-blab-def",6),e.BQk()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("t5sOrganizationSidebarBookmarkDragDrop",t.bookmark)("blabDef",t.blabDef)("hideDestructiveActions",!0)}}function kh(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-organization-sidebar-blab-item",7),e.BQk()),2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("t5sOrganizationSidebarBookmarkDragDrop",t.bookmark)("blabItem",t.blabItem)}}function wh(a,n){if(1&a&&(e.ynx(0)(1,4),e.YNc(2,yh,2,3,"ng-container",5),e.YNc(3,kh,2,2,"ng-container",5),e.BQk()()),2&a){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.Q6J("ngSwitch",t.type),e.xp6(1),e.Q6J("ngSwitchCase",i.BookmarkType.BOOKMARK_BLAB_DEF),e.xp6(1),e.Q6J("ngSwitchCase",i.BookmarkType.BOOKMARK_BLAB_ITEM)}}function Sh(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-section",2),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleCollapsedChange(o))}),e.YNc(1,wh,4,3,"ng-container",3),e.qZA()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.Q6J("label",i.I18n.translate(i.i18n,i.I18n.key.sectionTitle))("tooltip",i.I18n.translate(i.i18n,i.I18n.key.sectionTitleTooltip))("isCollapsed",i.sectionCollapsed$),e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById)}}function Th(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Sh,2,5,"t5s-organization-sidebar-section",1),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",t.length>0)}}class uo extends _e.A{constructor(n,t,i,o,s,l){super(),this.output$$=t,this.I18n=fe.Sv,this.OutputType=I,this.BookmarkType=ue.lq,this.SectionType=ze,this.getBlabDefDisplayName=H.fM,this.listItems$=this.select((0,v.Cc)(["lookup","settings","router","actor"]),(0,p.U)(({lookup:d,settings:h,router:m,actor:C})=>(h.bookmarks??[]).map(S=>{switch(S.type){case ue.lq.BOOKMARK_BLAB_DEF:{const f=d.blabDefs.find(R=>R.id===S.blabDefId);if(!f||!(0,H.Ch)(f))return;const E=(0,Se.m0)(C);if(!E||!(0,H.k8)((0,H.O9)({blabDefId:f.id,userId:E,lookup:d,traceId:"sidebar-bookmarks"}),Il.N.CAN_VIEW))return;const Z=(0,ye.BK)({section:ze.BOOKMARK,blabDef:f,lookup:d,router:m,canCreateBlabItem:f.info?.type===to.a.DATABASE&&(0,H.Tp)({blabDefId:f.id,userId:E,lookup:d,traceId:"sidebar-bookmarks"})});return{id:"bookmark-blab-def-"+f.id,type:S.type,bookmark:S,blabDef:Z,blabItem:void 0}}case ue.lq.BOOKMARK_BLAB_ITEM:{const f=d.blabItems.find(R=>R.id===S.blabItemId);if(!f||!(0,bt.uP)(f)||!d.blabItemIdsTitleLoaded.includes(f.id))return;const Z=(0,ye.Um)({section:ze.BOOKMARK,blabItem:f,lookup:d,router:m});return{id:"bookmark-blab-item-"+f.id,type:S.type,bookmark:S,blabDef:void 0,blabItem:Z}}}}).filter(ee.lm).filter((S,f,E)=>E.findIndex(Z=>Z.id===S.id)===f))),this.sectionCollapsed$=this.select((0,v.Cc)(["config","actor"]),(0,p.U)(({config:d,actor:h})=>h&&(d.bookmarksSectionsCollapsed??[]).includes((0,Se.km)(h))),(0,w.x)()),this.set({actor:null}),this.connect(o),this.connect(i),this.connect(l),this.connect(s),this.connect(n)}handleCollapsedChange({isCollapsed:n}){const{config:t,actor:i}=this.get();if(!i)return;let o=[...t.bookmarksSectionsCollapsed??[]];n?o.push((0,Se.km)(i)):o=o.filter(s=>s!==(0,Se.km)(i)),this.output$$.next({type:I.CONFIG_CHANGE,config:{bookmarksSectionsCollapsed:o}})}static#e=this.\u0275fac=function(t){return new(t||uo)(e.Y36(zt.h),e.Y36(He),e.Y36(Tn),e.Y36(Ut),e.Y36(dn),e.Y36(An))};static#t=this.\u0275cmp=e.Xpm({type:uo,selectors:[["t5s-organization-sidebar-bookmarks-section"]],features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"label","tooltip","isCollapsed","isCollapsedChange",4,"ngIf"],[3,"label","tooltip","isCollapsed","isCollapsedChange"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"t5sOrganizationSidebarBookmarkDragDrop","blabDef","hideDestructiveActions"],[3,"t5sOrganizationSidebarBookmarkDragDrop","blabItem"]],template:function(t,i){1&t&&(e.YNc(0,Th,2,1,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.listItems$))},dependencies:[u.sg,u.O5,u.RF,u.n9,gn,On,jn,_o,u.Ov],encapsulation:2,changeDetection:0})}function Ah(a,n){if(1&a&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("display","inline-flex")("align-items","center")("justify-content","center")("flex-shrink",0)("width",16,"px")("height",16,"px")("letter-spacing",-.5,"px")("font-size",t>99?8:10,"px")("text-align","center")("font-weight",600)("border-radius",4,"px")("color",i.Color.white)("position","absolute")("margin-left",6,"px")("webkit-font-smoothing","auto")("top",-5,"px")("right",-5,"px")("background",i.Color.blue)("user-select","none")("pointer-events","none"),e.xp6(2),e.Oqu(t>99?"99+":t)}}function Uh(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Ah,3,41,"div",4),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",t>0)}}function Oh(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e._UZ(3,"br"),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2);e.xp6(2),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.openBtnTooltip)),e.xp6(2),e.Udp("opacity",.5),e.xp6(1),e.AsE("",t.shortKey.symbol,"+",t.layout.get("Backslash","\\"),"")}}function Eh(a,n){if(1&a&&(e.YNc(0,Oh,6,5,"ng-container",2),e.ALo(1,"push")),2&a){const t=e.oxw();e.Q6J("ngIf",e.lcZ(1,1,t.shortcut$))}}class ho extends _e.A{constructor(n){super(),this.shortcut$=n,this.I18n=fe.nN,this.IconHamburgerMenu=y.B1i,this.IconSidebarOpen=y.pbJ,this.btnClick=new e.vpe,this.numUnreadNotifications$=this.select((0,v.Cc)(["numUnreadNotifications"]),(0,p.U)(({numUnreadNotifications:t})=>t)),this.showHamburgerMenu$=this.select((0,v.Cc)(["sidebarVisible","isFocused"]),(0,p.U)(({sidebarVisible:t,isFocused:i})=>!t&&!i)),this.set({sidebarVisible:!1,numUnreadNotifications:0,isFocused:!1})}set sidebarVisible(n){this.setProperty("sidebarVisible",n)}set numUnreadNotifications(n){this.setProperty("numUnreadNotifications",n)}static#e=this.\u0275fac=function(t){return new(t||ho)(e.Y36(ba.K))};static#t=this.\u0275cmp=e.Xpm({type:ho,selectors:[["t5s-organization-sidebar-collapsed-indicator"]],inputs:{sidebarVisible:"sidebarVisible",numUnreadNotifications:"numUnreadNotifications"},outputs:{btnClick:"btnClick"}
1,features:[e.qOj],decls:11,vars:67,consts:[["t5sClickableElement","",3,"t5sTooltipV3","tooltipPosition","focus","blur","click"],[3,"size","icon","fgColor"],[4,"ngIf"],["tooltip",""],[3,"display","align-items","justify-content","flex-shrink","width","height","letter-spacing","font-size","text-align","font-weight","border-radius","color","position","margin-left","webkit-font-smoothing","top","right","background","user-select","pointer-events",4,"ngIf"]],template:function(t,i){if(1&t&&(e.TgZ(0,"button",0),e.NdJ("focus",function(){return i.set({isFocused:!0})})("blur",function(){return i.set({isFocused:!1})})("click",function(){return i.btnClick.emit()}),e.TgZ(1,"div"),e.ALo(2,"push"),e._UZ(3,"t5s-svg",1),e.YNc(4,Uh,2,1,"ng-container",2),e.ALo(5,"async"),e.qZA(),e.TgZ(6,"div"),e.ALo(7,"push"),e._UZ(8,"t5s-svg",1),e.qZA()(),e.YNc(9,Eh,2,3,"ng-template",null,3,e.W1O)),2&t){const o=e.MAs(10);e.Udp("width",24,"px")("height",24,"px")("border-radius",6,"px")("position","relative"),e.Q6J("t5sTooltipV3",o)("tooltipPosition","right"),e.xp6(1),e.Udp("position","absolute")("top",0,"px")("left",0,"px")("width",100,"%")("height",100,"%")("display","flex")("align-items","center")("justify-content","center")("opacity",!0===e.lcZ(2,61,i.showHamburgerMenu$)?1:0)("transition-property","opacity")("transition-duration",220,"ms"),e.xp6(2),e.Q6J("size",20)("icon",i.IconHamburgerMenu)("fgColor",i.rgba(i.Color.black,.85)),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,63,i.numUnreadNotifications$)),e.xp6(2),e.Udp("position","absolute")("top",0,"px")("left",0,"px")("width",100,"%")("height",100,"%")("display","flex")("align-items","center")("justify-content","center")("opacity",!1===e.lcZ(7,65,i.showHamburgerMenu$)?1:0)("transition-property","opacity")("transition-duration",220,"ms"),e.xp6(2),e.Q6J("size",20)("icon",i.IconSidebarOpen)("fgColor",i.rgba(i.Color.black,.85))}},dependencies:[u.O5,oe.v,it.i,le.H,u.Ov,we.f],encapsulation:2,changeDetection:0})}var Ll=r(36465),qn=r(72702),yr=r(5806),Ct=r(42962),Nl=r(82684),mn=r(82562),go=r(3378),mo=r(70174),ut=r(59812),Rl=r(3746),J=r(48335),Pl=r(43334),$l=r(4803),kr=r(81121),zl=r(80559),Dh=r(46204),En=r(89616),Bh=r(45781),Ql=r(50479),ot=(()=>{return(a=ot||(ot={}))[a.OFF=0]="OFF",a[a.ON_FOR_YOU=1]="ON_FOR_YOU",a[a.ON_FOR_EVERYONE=2]="ON_FOR_EVERYONE",ot;var a})(),wr=r(96027),Mh=r(40276);function Zh(a,n){if(1&a&&e._UZ(0,"t5s-label-badge",13),2&a){const t=e.oxw(2);e.Q6J("label",t.I18n.translate(t.i18n,t.I18n.key.guestBadgeLabel))("tone",t.LabelBadgeTone.GUEST)}}const Fl=function(){return{emoji:.9,emojiFont:.9,custom:1}},Gl=function(a,n){return{organization:a,i18n:n}};function Lh(a,n){if(1&a&&(e.TgZ(0,"div"),e._UZ(1,"t5s-organization-icon",11),e.TgZ(2,"div")(3,"div")(4,"div"),e._uU(5),e.qZA(),e.YNc(6,Zh,1,2,"t5s-label-badge",12),e.ALo(7,"async"),e.qZA(),e.TgZ(8,"div"),e._uU(9),e.qZA()()()),2&a){const t=n.ngIf,i=e.oxw();e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",10,"px")("min-width",0,"px"),e.xp6(1),e.Q6J("size",36)("organization",t)("hasBackground",!1)("ratio",e.DdM(61,Fl)),e.xp6(1),e.Udp("display","flex")("flex-direction","column")("min-width",0,"px")("flex",1),e.xp6(1),e.Udp("display","flex")("align-items","center")("gap",6,"px")("min-width",0,"px"),e.xp6(1),e.Udp("font-weight",500)("font-size",14,"px")("line-height",20,"px")("color",i.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(i.getOrganizationDisplayName(e.WLB(62,Gl,t,i.i18n))),e.xp6(1),e.Q6J("ngIf",e.lcZ(7,59,i.isActiveUserGuest$)),e.xp6(2),e.Udp("font-size",12,"px")("line-height",16,"px")("color",i.rgba(i.Color.black,.65))("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu("tapeapp.com/"+(null==t.info?null:t.info.slug))}}function Nh(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",14),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.output$$.next({type:o.OutputType.OPEN_ORGANIZATION_UPGRADE}))}),e._UZ(1,"t5s-svg",6),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw();e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",6,"px")("height",28,"px")("padding","0p
1x 8px 0px 6px")("margin-top",1,"px")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("flex-shrink",0),e.Q6J("size",18)("icon",t.IconCircleArrowUp)("fgColor",t.Color.blue),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",t.Color.blue)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(t.upgradeLabel)}}function Rh(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",15),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.output$$.next({type:o.OutputType.OPEN_SETTINGS}))}),e._UZ(1,"t5s-svg",6),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw();e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",6,"px")("height",28,"px")("padding","0px 8px 0px 6px")("margin-top",1,"px")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("flex-shrink",0),e.Q6J("size",18)("icon",t.IconSidebarSettings)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",t.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(t.settingsEntryLabel)}}function Ph(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",16),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.output$$.next({type:o.OutputType.OPEN_ORGANIZATION_INVITE}))}),e._UZ(1,"t5s-svg",6),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&a){const t=e.oxw();e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",6,"px")("height",28,"px")("padding","0px 8px 0px 6px")("margin-top",1,"px")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("flex-shrink",0),e.Q6J("size",18)("icon",t.IconMembers)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",t.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(t.organizationInviteLabel)}}function $h(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"button",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.handleLogOutEmail(o,s))}),e._UZ(2,"t5s-svg",6),e.TgZ(3,"span"),e._uU(4),e.qZA()()()}if(2&a){const t=e.oxw(3);e.Udp("width",100,"%")("min-width",180,"px")("padding","6px 0px"),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("padding-left",10,"px")("padding-right",12,"px")("height",28,"px")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconCircleCross)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",t.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.menuItem.logOutUser))}}function zh(a,n){if(1&a&&e._UZ(0,"t5s-label-badge",13),2&a){const t=e.oxw(4);e.Udp("margin-left",6,"px"),e.Q6J("label",t.I18n.translate(t.i18n,t.I18n.key.guestBadgeLabel))("tone",t.LabelBadgeTone.GUEST)}}function Qh(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-svg",35),e.BQk()),2&a){const t=e.oxw(4);e.xp6(1),e.Udp("margin-left",4,"px"),e.Q6J("icon",t.IconWarning)("size",18)("fgColor",t.rgba(215,129,58,1))}}function Fh(a,n){if(1&a&&e._UZ(0,"t5s-svg",6),2&a){const t=e.oxw(4);e.Q6J("size",18)("icon",t.IconCheck)("fgColor",t.Color.black)}}function Gh(a,n){if(1&a&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&a){const t=e.oxw().$implicit,i=e.oxw(3);e.Udp("display","inline-flex")("align-items","center")("justify-content","center")("flex-shrink",0)("width",16,"px")("height",16,"px")("font-size",t.numUnread>99?8:10,"px")("letter-spacing",-.5,"px")("text-align","center")("font-weight",600)("border-radius",4,"px")("color",i.Color.white)("background",i.Color.blue)("webkit-font-smoothing","auto")("user-select","none")("pointer-events","none"),e.xp6(2),e.Oqu(t.numUnread>99?"99+":t.numUnread)}}function Jh(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).$implicit,s=e.oxw(3);return e.KtG(s.window.open(s.getOrganizationSigninUrl(o.organization),"_blank"))}),e._UZ(2,"t5s-svg",6),e.TgZ(3,"span"),e._uU(4),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw(5);e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("padding-left",10,"px")("padding-right",12,"px")("height",28,"px")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconLeaveArrow)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",t.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.menuItem.reauthenticateUser))}}function Hh(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div"),e.YNc(1,Jh,5,32,"ng-container",9),e.TgZ(2,"button",36),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(2).ngIf,l=e.oxw();return e.KtG(l.handleLogoutSingleUser(o.userId,s))}),e._UZ(3,"t5s-svg",6),e.TgZ(4,"span"),e._uU(5),e.qZA()()()}if(2&a){const t=e.oxw().$implicit,i=e.oxw(3);e.Udp("width",100,"%")("min-width",180,"px")("padding","6px 0px"),e.xp6(1),e.Q6J("ngIf",t.isDisabled),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("padding-left",10,"px")("padding-right",12,"px")("height",28,"px")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",i.IconCircleCross)("fgColor",i.rgba(i.Color.black,.85)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",i.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(i.I18n.translate(i.i18n,t.isDisabled?
1i.I18n.key.menuItem.removeSession:i.I18n.key.menuItem.logOutUser))}}function Vh(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",22,23)(4,"button",24),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.MAs(22),d=e.oxw(3);return e.KtG(s.isDisabled?l.openOverlay():d.handleSessionSelect({organizationId:s.organization.id,userId:s.userId}))}),e.qZA(),e.TgZ(5,"div"),e._UZ(6,"t5s-organization-icon",11),e.qZA(),e.TgZ(7,"div")(8,"div")(9,"div"),e._uU(10),e.qZA(),e.YNc(11,zh,1,4,"t5s-label-badge",25),e.YNc(12,Qh,2,5,"ng-container",9),e.qZA()(),e.TgZ(13,"div")(14,"div",26,27),e.YNc(16,Fh,1,3,"t5s-svg",28),e.qZA(),e.TgZ(17,"div",29,30),e.YNc(19,Gh,3,33,"div",31),e.qZA(),e.TgZ(20,"button",32,33),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.MAs(3),l=e.MAs(21),d=e.MAs(15),h=e.MAs(18),m=e.oxw(3);return e.KtG(m.handleSessionSettingsMenuOpenChange(s,l,d,h,o))}),e._UZ(23,"t5s-svg",6),e.qZA(),e.YNc(24,Hh,6,39,"ng-template",null,34,e.W1O),e.qZA()(),e.BQk()}if(2&a){const t=n.$implicit,i=e.MAs(25),o=e.oxw().$implicit,s=e.oxw(2);e.xp6(1),e.Tol(s.userSessionClass),e.Udp("width","calc(100% - 8px)")("border-radius",6,"px")("margin","0px 4px")("height",32,"px")("display","flex")("flex-direction","row")("align-items","center")("padding","2px 8px 2px 8px")("transition","background 150ms"),e.Q6J("cdkDragDisabled",o.sessions.length<2)("cdkDragBoundary",".session-drag-boundary"),e.xp6(3),e.Udp("border-radius",6,"px"),e.uIk("t5sFocusable",1),e.xp6(1),e.Udp("margin-right",8,"px"),e.xp6(1),e.Q6J("size",20)("organization",t.organization)("hasBackground",!1)("ratio",e.DdM(95,Fl)),e.xp6(1),e.Udp("flex",1)("min-width",0,"px"),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("max-width",100,"%")("align-items","center"),e.xp6(1),e.Udp("font-size",14,"px")("line-height",20,"px")("color",s.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("max-width",100,"%"),e.xp6(1),e.hij("",s.getOrganizationDisplayName(e.WLB(96,Gl,t.organization,s.i18n))," "),e.xp6(1),e.Q6J("ngIf",t.role===s.OrganizationRole.ORG_GUEST),e.xp6(1),e.Q6J("ngIf",t.isDisabled),e.xp6(1),e.Udp("width",20,"px")("height",20,"px")("margin-left",12,"px")("display","flex")("align-items","center")("justify-content","center"),e.xp6(3),e.Q6J("ngIf",t.isSelected),e.xp6(3),e.Q6J("ngIf",t.numUnread>0&&!t.isSelected),e.xp6(1),e.Udp("position","relative")("width",20,"px")("height",20,"px")("align-items","center")("justify-content","center")("border-radius",4,"px")("transition","background 20ms ease-in"),e.Q6J("t5sMenuOverlay",i)("menuOverlayPosition","bottom-right")("menuOverlayOffsetX",-6)("menuOverlayOffsetY",4),e.xp6(3),e.Q6J("size",14)("icon",s.IconDotsWebClient)("fgColor",s.rgba(s.Color.black,.45))}}function Wh(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div"),e._uU(3),e.qZA(),e.TgZ(4,"button",18),e._UZ(5,"t5s-svg",6),e.qZA()(),e.YNc(6,$h,5,38,"ng-template",null,19,e.W1O),e.TgZ(8,"div",20),e.NdJ("cdkDropListDropped",function(o){const l=e.CHM(t).$implicit,d=e.oxw(2);return e.KtG(d.userSessionDropped(l.sessions,o))}),e.YNc(9,Vh,26,99,"ng-container",17),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit,i=n.last,o=e.MAs(7),s=e.oxw(2);e.xp6(1),e.Udp("width",100,"%")("padding","8px 12px 4px 12px")("display","flex")("flex-direction","row")("align-items","center"),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("font-weight",500)("font-size",12,"px")("line-height",16,"px")("color",s.rgba(s.Color.black,.65))("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(t.label),e.xp6(1),e.Udp("margin-left",8,"px")("width",20,"px")("height",20,"px")("display","flex")("align-items","center")("justify-content","center")("border-radius",4,"px")("transition","background 20ms ease-in"),e.Q6J("t5sMenuOverlay",o)("menuOverlayPosition","bottom-right")("menuOverlayOffsetX",-6)("menuOverlayOffsetY",4),e.xp6(1),e.Q6J("size",14)("icon",s.IconDotsWebClient)("fgColor",s.rgba(s.Color.black,.45)),e.xp6(3),e.Udp("width",100,"%")("padding-bottom",i?6:void 0,"px"),e.xp6(1),e.Q6J("ngForOf",t.sessions)("ngForTrackBy",s.trackById)}}function Yh(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Wh,10,58,"ng-container",17),e.BQk()),2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById)}}function Kh(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div",38),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.handleTryNewRecordClick())}),e.TgZ(3,"div")(4,"div")(5,"div")(6,"span"),e._uU(7),e.qZA(),e._UZ(8,"t5s-label-badge",13),e.qZA(),e.TgZ(9,"div"),e._uU(10),e.ALo(11,"push"),e.qZA()(),e.TgZ(12,"div"),e._UZ(13,"t5s-menu-toggle-switch-button",39),e.ALo(14,"push"),e.qZA()()()(),e.BQk()}if(2&a){const t=e.oxw();e.xp6(1),e.Udp("width",100,"%")("padding",8,"px")("background-color",t.Color.white),e.xp6(1),e.Udp("box-sizing","border-box")("padding",6,"px")("border","1p
1x solid "+t.rgba(t.Color.black,.09))("border-radius",6,"px")("transition","background 150ms")("user-select","none"),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("box-sizing","border-box")("width",100,"%")("padding","4px 8px")("gap",8,"px"),e.xp6(1),e.Udp("display","flex")("flex-direction","column")("flex","1 1 auto")("min-width",0,"px"),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",6,"px"),e.xp6(1),e.Udp("font-size",14,"px")("font-weight",500)("line-height",18,"px")("color",t.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("min-width",0,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.menuItem.tryNewRecordLabel)),e.xp6(1),e.Q6J("label",t.I18n.translate(t.i18n,t.I18n.key.menuItem.tryNewRecordBadge))("tone",t.LabelBadgeTone.INFO),e.xp6(1),e.Udp("margin-top",2,"px")("font-size",12,"px")("line-height",16,"px")("font-weight",500)("color",t.rgba(t.Color.black,.65)),e.xp6(1),e.Oqu(e.lcZ(11,87,t.tryNewRecordDescription$)),e.xp6(2),e.Udp("display","flex")("align-items","center")("justify-content","center")("flex-shrink",0),e.xp6(1),e.Q6J("isActive",e.lcZ(14,89,t.tryNewRecordEnabled$))}}const jh=(0,x.I)({".t5s-user-session-selected-indicator":{display:"block"},".t5s-user-session-notification-badge":{display:"inline-flex"},".t5s-user-session-settings":{display:"none"},".cdk-drag-placeholder":{opacity:0}
1,".cdk-drop-list-dragging":{cursor:"grabbing",...(0,c.XY)({pointerEvents:"none"})},".cdk-drop-list-dragging :not(.cdk-drag-placeholder)":{transition:"transform 220ms cubic-bezier(0, 0, 0.2, 1);"}}),qh=(0,x.I)({"~ .cdk-drag-preview":{background:(0,c.m4)(c.Il.black,.16),".t5s-user-session-selected-indicator":{display:"none"},".t5s-user-session-notification-badge":{display:"none"},".t5s-user-session-settings":{display:"flex"}},...(0,c.Mr)({".t5s-user-session-selected-indicator":{display:"none"},".t5s-user-session-notification-badge":{display:"none"},".t5s-user-session-settings":{display:"flex"}}),...(0,c.bB)({".t5s-user-session-selected-indicator":{display:"none"},".t5s-user-session-notification-badge":{display:"none"},".t5s-user-session-settings":{display:"flex"}})});class fo extends _e.A{constructor(n,t,i,o,s,l,d){super(),this.featureAccessLevel$=s,this.window=l,this.output$$=d,this.I18n=fe.EU,this.OutputType=I,this.OrganizationRole=ue.UD,this.LabelBadgeTone=Re.iH,this.IconDotsWebClient=y.$FW,this.IconCheck=y.NOm,this.IconAddPersonCircleOutline=y.r5X,this.IconCircleArrowUp=y.xV4,this.IconDragHandle=y.rUG,this.IconCircleCross=y.Kdz,this.IconMembers=y.hcn,this.IconSidebarSettings=y.pCy,this.IconWarning=y.FCX,this.IconLeaveArrow=y.f7i,this.getOrganizationDisplayName=oo.vz,this.settingsEntryLabel=fe.EU.translate(this.i18n,fe.EU.key.menuItem.settings),this.organizationInviteLabel=fe.EU.translate(this.i18n,fe.EU.key.menuItem.organizationInvite),this.upgradeLabel=fe.EU.translate(this.i18n,fe.EU.key.menuItem.upgrade),this.closeClick=new e.vpe,this.showSettingsEntry$=this.select("showSettingsEntry"),this.showOrganizationSettings$=this.select((0,v.Cc)(["sessions","activeUserId"]),(0,p.U)(({sessions:h,activeUserId:m})=>{const C=h.users.find(S=>S.id===m)?.info?.role;return(0,Ct.lp)(C,ue.UD.ORG_ADMIN)}),(0,w.x)()),this.isActiveUserGuest$=this.select((0,v.Cc)(["sessions","activeUserId"]),(0,p.U)(({sessions:h,activeUserId:m})=>(0,$e.Zq)({userId:m,users:h.users})),(0,w.x)()),this.activeOrganizationCreatedAt$=this.select((0,v.Cc)(["sessions","activeUserId"]),(0,p.U)(({sessions:h,activeUserId:m})=>{const C=h.users.find(f=>f.id===m);return(C?h.organizations.find(f=>f.id===C.organizationId):void 0)?.info?.createdAt}),(0,w.x)()),this.showTryNewRecordSection$=(0,V.aj)([this.showOrganizationSettings$,this.activeOrganizationCreatedAt$,this.featureAccessLevel$.pipe((0,pt.O)(void 0),(0,w.x)())]).pipe((0,p.U)(([h,m,C])=>h&&(0,Bh.Xe)({featureAccessLevel:C,organizationCreatedAt:m})),(0,w.x)()),this.tryNewRecordState$=this.select((0,v.Cc)(["sessions","activeUserId"]),(0,p.U)(({sessions:h,activeUserId:m})=>{if(!m)return ot.OFF;const C=h.users.find(E=>E.id===m),f=(C?h.organizations.find(E=>E.id===C.organizationId):void 0)?.settings?.newRecordExperienceSettings;return f?f.enableForAllUsers?ot.ON_FOR_EVERYONE:f.enableForUserIds?.includes(m)?ot.ON_FOR_YOU:ot.OFF:ot.OFF}),(0,w.x)()),this.tryNewRecordEnabled$=this.tryNewRecordState$.pipe((0,p.U)(h=>h!==ot.OFF),(0,w.x)()),this.tryNewRecordDescription$=this.tryNewRecordState$.pipe((0,p.U)(h=>{switch(h){case ot.ON_FOR_EVERYONE:return this.I18n.translate(this.i18n,this.I18n.key.menuItem.tryNewRecordDescriptionForAll);case ot.ON_FOR_YOU:return this.I18n.translate(this.i18n,this.I18n.key.menuItem.tryNewRecordDescriptionForYou);default:return this.I18n.translate(this.i18n,this.I18n.key.menuItem.tryNewRecordDescription)}}),(0,w.x)()),this.emails$=this.select((0,v.Cc)(["sessions","activeUserId"]),(0,p.U)(({sessions:h,activeUserId:m})=>(0,ye.rq)(h,{activeUserId:m}))),this.headerOrganization$=this.select((0,v.Cc)(["sessions","activeUserId"]),(0,p.U)(({sessions:h,activeUserId:m})=>{const C=h.users.find(S=>S.id===m);return C?h.organizations.find(S=>S.id===C.organizationId):void 0}),(0,w.x)()),this.showUpgradeEntry$=(0,V.aj)([this.showOrganizationSettings$,this.headerOrganization$.pipe((0,pt.O)(void 0))]).pipe((0,p.U)(([h,m])=>h&&void 0!==m&&!m.info?.plan),(0,w.x)()),this.numUserSessions$=this.select((0,v.Cc)(["sessions"]),(0,p.U)(({sessions:{userSessions:h}})=>h.length),(0,w.x)()),this.userSessionClass=qh,this.set({activeUserId:null,showSettingsEntry:!1}),this.connect(t),this.connect(i),this.connect(o),d.next({type:this.OutputType.USER_SESSION_RETRIEVE}),n.nativeElement.classList.add(jh)}set showSettingsEntry(n){this.setProperty("showSettingsEntry",n)}userSessionDropped(n,t){if(t.previousIndex===t.currentIndex)return;const i=n.map(({userSession:s})=>s);!i[t.previousIndex]||((0,Je.bA)(i,t.previousIndex,t.currentIndex),this.output$$.next({type:I.USER_SESSION_UPDATES,userSessionUpdates:(0,Ql.tT)(i)}))}handleSessionSettingsMenuOpenChange(n,t,i,o,{menuOpen:s}
1){n.setActive(s),s?(t.style.setProperty("display","flex"),i.style.setProperty("display","none"),o.style.setProperty("display","none")):(t.style.removeProperty("display"),i.style.removeProperty("display"),o.style.removeProperty("display"))}handleLogOutAll(){const{sessions:n}=this.get(),t=n.userSessions.map(({userId:i})=>i);this.output$$.next({type:this.OutputType.USER_SESSIONS_REMOVE,userIds:t,selectSessionUserId:void 0})}handleLogOutEmail(n,t){const{activeUserId:i}=this.get(),o=n.sessions.map(({userId:h})=>h),s=t.filter(h=>h!==n).map(h=>h.sessions).reduce((h,m)=>h.concat(m),[]);let d;!s.some(h=>h.userId===i)&&s.length>0&&(d=s[0].userId),this.output$$.next({type:this.OutputType.USER_SESSIONS_REMOVE,userIds:o,selectSessionUserId:d})}handleSessionSelect({organizationId:n,userId:t}){this.output$$.next({type:this.OutputType.USER_SESSION_SELECT,userId:t,organizationId:n}),this.closeClick.emit()}handleLogoutSingleUser(n,t){const{activeUserId:i}=this.get(),o=t.map(d=>d.sessions).reduce((d,h)=>d.concat(h),[]),{selectSessionUserId:s}=(0,ye.gK)(o,{activeUserId:i,userIdToremove:n});this.output$$.next({type:this.OutputType.USER_SESSIONS_REMOVE,userIds:[n],selectSessionUserId:s})}getOrganizationSigninUrl(n){const{runtimeUrl:t}=this.get();return(0,oo.LK)({runtimeUrl:t,organization:n})}handleTryNewRecordClick(){const{sessions:n,activeUserId:t}=this.get(),i=n.users.find(h=>h.id===t),o=i?n.organizations.find(h=>h.id===i.organizationId):void 0,s=o?(0,oo.vz)({organization:o,i18n:this.i18n}):"",l=o?.settings?.newRecordExperienceSettings;let d=ot.OFF;l?.enableForAllUsers?d=ot.ON_FOR_EVERYONE:t&&l?.enableForUserIds?.includes(t)&&(d=ot.ON_FOR_YOU),this.output$$.next({type:this.OutputType.OPEN_TRY_NEW_RECORD_DIALOG,organizationName:s,currentState:d})}static#e=this.\u0275fac=function(t){return new(t||fo)(e.Y36(e.SBq),e.Y36(Tt.z),e.Y36(Da),e.Y36(yl.i),e.Y36(En.H),e.Y36(Dh.m),e.Y36(He))};static#t=this.\u0275cmp=e.Xpm({type:fo,selectors:[["t5s-organization-sidebar-overlay"]],inputs:{showSettingsEntry:"showSettingsEntry"},outputs:{closeClick:"closeClick"},features:[e.qOj],decls:31,vars:129,consts:[[3,"display","flex-direction","align-items","gap","min-width",4,"ngIf"],["t5sMenuDivider",""],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-upgrade-btn",3,"display","flex-direction","align-items","gap","height","padding","margin-top","transition","click",4,"ngIf"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-settings-btn",3,"display","flex-direction","align-items","gap","height","padding","margin-top","transition","click",4,"ngIf"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-invite-members-btn",3,"display","flex-direction","align-items","gap","height","padding","margin-top","transition","click",4,"ngIf"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-add-account-btn",3,"click"],[3,"size","icon","fgColor"],["cdkScrollable","",3,"t5sScrollContainerMaskStyle","t5sScrollContainerMaskStyleContentEl"],["orgListContent",""],[4,"ngIf"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-log-out-all-accounts-btn",3,"click"],[3,"size","organization","hasBackground","ratio"],[3,"label","tone",4,"ngIf"],[3,"label","tone"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-upgrade-btn",3,"click"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-settings-btn",3,"click"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-invite-members-btn",3,"click"],[4,"ngFor","ngForOf","ngForTrackBy"],["t5sClickableElement","","tabindex","-1",3,"t5sMenuOverlay","menuOverlayPosition","menuOverlayOffsetX","menuOverlayOffsetY"],["settingsOverlay",""],["cdkDropList","","autoScrollDisabled","false","cdkDropListOrientation","vertical","cdkDropListLockAxis","y",1,"session-drag-boundary",3,"cdkDropListDropped"],["t5sMenuItem","",3,"click"],["cdkDrag","","cdkDragLockAxis","y","t5sClickableBackgroundElement","","data-cy","t5s-wc-org-sidebar-overlay-single-session-btn-wrapper",3,"cdkDragDisabled","cdkDragBoundary"],["userSessionEl","","backgroundEl","t5sClickableBackgroundElement"],["tabindex","0","data-cy","t5s-wc-org-sidebar-overlay-single-session-btn",3,"click"],[3,"margin-left","label","tone",4,"ngIf"],[1,"t5s-user-session-selected-indicator"],["selectedIconEl",""],[3,"size","icon","fgColor",4,"ngIf"],[1,"t5s-user-session-notification-badge"],["notificationBadgeEl",""],[3,"display","align-items","justify-content","flex-shrink","width","height","font-size","letter-spacing","text-align","font-weight","border-radius","color","background","webkit-font-smoothing","user-select","pointer-events",4,"ngIf"],["t5sClickableElement","","data-cy","t5s-wc-org-sidebar-overlay-single-session-settings-btn","tabindex","-1",1,"t5s-user-session-settings",3,"t5sMenuOverlay","menuOverlayPosition","menuOverlayOffsetX","menuOverlayOffsetY","menuOpenChange"],["sessionSettingsBtn","","sessionSettingsMenuTrigger","t5sMenuOverlay"],["sessionSettingsOverlay",""],[3,"icon","size","fgColor"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-single-session-remove-btn",3,"click"],["t5sMenuItem","","data-cy","t5s-wc-org-sidebar-overlay-single-session-reauthenticate-btn",3,"click"],["t5sClickableElement","","data-cy","t5s-wc-org-sidebar-overlay-try-new-record-btn",3,"click"],[3,"isActive"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div")(1,"div"),e.YNc(2,Lh,10,65,"div",0),e.ALo(3,"push"),e.qZA(),e.ynx(4),e.TgZ(5,"div"),e._UZ(6,"div",1),e.YNc(7,Nh,4,34,"button",2),e.ALo(8,"async"),e.YNc(9,Rh,4,34,"button",3),e.ALo(10,"async"),e.YNc(11,Ph,4,34,"button",4),e.ALo(12,"async"),e.TgZ(13,"button",5),e.NdJ("click",function(){return i.output$$.next({type:i.OutputType.USER_SESSION_CREATE})}),e._UZ(14,"t5s-svg",6),e.TgZ(15,"span"),e._uU(16),e.qZA()()(),e.BQk(),e._UZ(17,"div",1),e.TgZ(18,"div",7)(19,"div",null,8),e.YNc(21,Yh,2,2,"ng-container",9),e.ALo(22,"push"),e.qZA()(),e.TgZ(23,"div"),e._UZ(24,"div",1),e.TgZ(25,"button",10),e.NdJ("click",function(){return i.handleLogOutAll()}),e.TgZ(26,"span"),e._uU(27),e.ALo(28,"push"),e.qZA()()(),e.YNc(29,Kh,15,91,"ng-container",9),e.ALo(30,"async"),e.qZA()),2&t){const o=e.MAs(20);e.Udp("display","flex")("flex-direction","column")("width",300,"px")("max-height",70,"vh"),e.xp6(1),e.Udp("width",100,"%")("padding",12,"px")("background-color",i.Color.white)("display","flex")("flex-direction","column"),e.xp6(1),e.Q6J("ngIf",e.lcZ(3,115,i.headerOrganization$)),e.xp6(3),e.Udp("width",100,"%")("padding-bottom",6,"px")("background-color",i.Color.white),e.xp6(1),e.Udp("margin-top",0,"px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(8,117,i.showUpgradeEntry$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(10,119,i.showSettingsEntry$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(12,121,i.showOrganizationSettings$)),e.xp6(2),e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",6,"px")("height",28,"px")("padding","0p
1x 8px 0px 6px")("margin-top",1,"px")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("flex-shrink",0),e.Q6J("size",18)("icon",i.IconAddPersonCircleOutline)("fgColor",i.rgba(i.Color.black,.85)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",i.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.menuItem.addAccount)),e.xp6(1),e.Udp("margin-top",0,"px")("margin-bottom",0,"px"),e.xp6(1),e.Udp("width",100,"%")("max-height","min(60vh, 260px)")("overflow-x","hidden")("overflow-y","auto"),e.Q6J("t5sScrollContainerMaskStyle",!0)("t5sScrollContainerMaskStyleContentEl",o),e.xp6(3),e.Q6J("ngIf",e.lcZ(22,123,i.emails$)),e.xp6(2),e.Udp("width",100,"%")("padding-bottom",6,"px")("background-color",i.Color.white),e.xp6(1),e.Udp("margin-top",0,"px"),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("padding","6px 8px")("margin-top",1,"px")("transition","background 150ms"),e.xp6(1),e.Udp("font-weight",500)("font-size",12,"px")("line-height",16,"px")("color",i.rgba(i.Color.black,.65))("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(i.I18n.translate(i.i18n,1===e.lcZ(28,125,i.numUserSessions$)?i.I18n.key.menuItem.logOutUser:i.I18n.key.menuItem.logOutAllUsers)),e.xp6(2),e.Q6J("ngIf",e.lcZ(30,127,i.showTryNewRecordSection$))}},dependencies:[Pl.v,u.sg,u.O5,ve.PQ,Je.Wj,Je.Zt,oe.v,Un.x,Xt.q,Fn.e,wr.C,Mh.f,le.H,$l.V,kr.o,u.Ov,we.f],encapsulation:2,changeDetection:0})}function Xh(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"a",1),e.NdJ("keydown.space",function(o){return o.preventDefault()})("keyup.space",function(o){return null==o.target?null:o.target.click()})("click",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleMenuItemClick(o))}),e.TgZ(2,"div")(3,"div"),e._UZ(4,"t5s-svg",2),e.qZA(),e.TgZ(5,"div"),e._uU(6),e.qZA()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Udp("display","block")("user-select","none")("cursor","pointer")("padding","none")("border-radius",6,"px")("margin","0px 8px")("width","calc(100% - 16px)")("transition","background 150ms"),e.Q6J("t5sTooltipV3",t.tooltip)("tooltipPosition","right")("tooltipOffset",6),e.uIk("href",t.url,e.LSH),e.xp6(1),e.Udp("display","flex")("align-items","center")("width",100,"%")("font-size",14,"px")("line-height",21,"px")("min-height",30,"px")("padding-top",4,"px")("padding-bottom",4,"px")("padding-left",8,"px")("padding-right",8,"px")("margin-top",1,"px")("margin-bottom",1,"px")("border-radius",6,"px")("background-color",t.isActive?i.rgba(i.Color.black,.04):"transparent"),e.xp6(1),e.Udp("flex-shrink",0)("flex-grow",0)("width",22,"px")("height",22,"px")("display","flex")("align-items","center")("justify-content","center")("margin-right",8,"px"),e.xp6(1),e.Udp("flex-shrink",0)("flex-grow",0),e.Q6J("size",18)("icon",t.icon)("fgColor",i.rgba(i.Color.black,t.isActive?.85:.55)),e.xp6(1),e.Udp("flex","1 1 auto")("white-space","nowrap")("min-width",0,"px")("overflow","hidden")("text-overflow","ellipsis")("font-size",14,"px")("line-height",1.5)("color",t.isActive?i.Color.black:i.rgba(i.Color.blackSidebar,.6)),e.xp6(1),e.Oqu(t.label)}}class xo extends _e.A{constructor(){super(),this.menuItemClick=new e.vpe,this.icon$=this.select((0,v.Cc)(["icon"]),(0,p.U)(({icon:n})=>n))}set icon(n){this.setProperty("icon",n)}set label(n){this.setProperty("label",n)}set url(n){this.setProperty("url",n)}set tooltip(n){this.setProperty("tooltip",n)}set isActive(n){this.setProperty("isActive",n)}handleMenuItemClick(n){return!(!this.get().url||(0,Sn.i0)(n))||(this.menuItemClick.emit(),!1)}static#e=this.\u0275fac=function(t){return new(t||xo)};static#t=this.\u0275cmp=e.Xpm({type:xo,selectors:[["t5s-organization-sidebar-menu-item"]],inputs:{icon:"icon",label:"label",url:"url",tooltip:"tooltip",isActive:"isActive"},outputs:{menuItemClick:"menuItemClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["t5sClickableElement","","draggable","false","target","_blank","role","button","tabindex","0",3,"t5sTooltipV3","tooltipPosition","tooltipOffset","keydown.space","keyup.space","click"],[3,"size","icon","fgColor"]],template:function(t,i){1&t&&(e.YNc(0,Xh,7,88,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,oe.v,it.i,le.H,we.f],encapsulation:2,changeDetection:0})}function eg(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=e.oxw(3);e.Udp("font-size",14,"px")("line-height",18,"px")("padding","5px 14px")("color",t.rgba(t.Color.black,.65)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.noBlabDefsPinnedPlaceholder)," ")}}function tg(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",9),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.createBlabItem({blabDefId:s.id}))}),e._UZ(2,"t5s-blab-def-icon",12),e.TgZ(3,"div",13),e._uU(4),e.qZA()(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.Udp("height",28,"px")("min-width",0,"px")("display","flex")("padding","0p
1x 12px 0px 10px")("align-items","center"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("blabDef",t),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("font-size",14,"px")("line-height",18,"px")("color",i.rgba(i.Color.black,1)),e.Q6J("title",t.blabDefBlabItemDisplayName),e.xp6(1),e.hij(" ",t.blabDefBlabItemDisplayName," ")}}function ng(a,n){if(1&a&&(e.ynx(0),e.YNc(1,eg,2,9,"div",10),e.YNc(2,tg,5,32,"ng-container",11),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",0===t.length),e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById)}}function ig(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div"),e.YNc(1,ng,3,3,"ng-container",7),e.ALo(2,"push"),e._UZ(3,"div",8),e.TgZ(4,"button",9),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),s=e.MAs(1);return o.set({suggestedBlabDefsLimit:25}),e.KtG(null==s?null:s.openOverlay())}),e._UZ(5,"t5s-svg",4),e.TgZ(6,"span"),e._uU(7),e.qZA()()()}if(2&a){const t=e.oxw();e.Udp("padding","6px 0px")("min-width",208,"px")("max-width",300,"px")("max-height","min(500px, 70vh)")("overflow-x","hidden")("overflow-y","auto"),e.xp6(1),e.Q6J("ngIf",e.lcZ(2,35,t.pinnedBlabDefs$)),e.xp6(3),e.Udp("min-width","fit-content")("height",28,"px")("display","flex")("padding","0px 12px 0px 10px")("align-items","center"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",18)("icon",t.IconOptions)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",t.rgba(t.Color.black,1)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.customizeBlabDefs)," ")}}function og(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=e.oxw(3);e.Udp("width",100,"%")("font-size",12,"px")("line-height",16,"px")("padding","6px 14px")("color",t.rgba(t.Color.black,.5)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.noBlabDefsPinnedPlaceholder)," ")}}function ag(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=e.oxw().$implicit,i=e.oxw(4);e.xp6(1),e.Udp("font-size",12,"px")("line-height",16,"px")("color",i.rgba(i.Color.black,.5)),e.xp6(1),e.hij("\xa0\u2014\xa0",t.workspaceDisplayName,"")}}function sg(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",20)(2,"button",21),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.unpinBlabDef({blabDefId:s.id}))}),e.qZA(),e._UZ(3,"t5s-blab-def-icon",12),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA(),e.YNc(7,ag,3,7,"ng-container",7),e.qZA(),e.TgZ(8,"button",22),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.unpinBlabDef({blabDefId:s.id}))}),e._UZ(9,"t5s-svg",4),e.qZA()(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(4);e.xp6(1),e.Tol(i.pinnedBlabDefClass),e.Udp("width","calc(100% - 8px)")("margin","0px 4px")("border-radius",4,"px")("height",28,"px")("min-width",0,"px")("display","flex")("padding","2px 10px")("align-items","center"),e.Q6J("cdkDragBoundary",".pinned-quick-add-app-drag-boundary"),e.xp6(2),e.Udp("margin-right",6,"px"),e.Q6J("size",18)("blabDef",t),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("display","inline")("color",i.rgba(i.Color.black,.5)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",i.rgba(i.Color.black,1)),e.xp6(1),e.Oqu(t.blabDefDisplayName),e.xp6(1),e.Q6J("ngIf",t.workspace),e.xp6(1),e.Udp("position","relative")("width",24,"px")("height",24,"px")("border-radius",4,"px")("display","flex")("align-items","center")("justify-content","center")("margin-left",12,"px"),e.Q6J("t5sTooltipV3",i.I18n.translate(i.i18n,i.I18n.key.unpinTooltip))("tooltipPosition","right")("tooltipOffset",8),e.xp6(1),e.Q6J("size",16)("icon",i.IconPinFilled)("fgColor",i.rgba(i.Color.black,.45))}}function rg(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",19),e.NdJ("cdkDropListDropped",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw(2);return e.KtG(l.pinnedBlabDefDropped(s,o))}),e.YNc(1,sg,10,67,"ng-container",11),e.qZA()}if(2&a){const t=e.oxw().ngIf,i=e.oxw(2);e.Udp("width",100,"%")("padding-bottom",6,"px"),e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById)}}function lg(a,n){if(1&a&&(e.ynx(0),e.YNc(1,og,2,11,"div",17),e.YNc(2,rg,2,6,"div",18),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",0===t.length),e.xp6(1),e.Q6J("ngIf",t.length>0)}}function cg(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=e.oxw(4);e.Udp("width",100,"%")("font-size",12,"px")("line-height",16,"px")("padding","6px 14px")("color",t.rgba(t.Color.black,.5)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.noBlabDefsAvailablePlaceholder)," ")}}function pg(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=e.oxw().$implicit,i=e.oxw(5);e.xp6(1),e.Udp("font-size",12,"px")("line-height",16,"px")("color",i.rgba(i.Color.black,.5)),e.xp6(1),e.hij("\xa0\u2014\xa0",t.workspaceDisplayName,"")}}function dg(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",24)(2,"button",21),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(5);return e.KtG(l.pinBlabDef({blabDefId:s.id}))}),e.qZA(),e._UZ(3,"t5s-blab-def-icon",12),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA(),e.YNc(7,pg,3,7,"ng-container",7),e.qZA(),e.TgZ(8,"button",22),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(5);return e.KtG(l.pinBlabDef({blabDefId:s.id}))}),e._UZ(9,"t5s-svg",4),e.qZA()(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(5);e.xp6(1),e.Udp("width","calc(100% - 8px)")("margin","0px 4px")("border-radius",4,"px")("height",28,"px")("min-width",0,"px")("display","flex")("padding","2px 10px")("align-items","center"),e.xp6(2),e.Udp("margin-right",6,"px"),e.Q6J("size",18)("blabDef",t),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("display","inline")("color",i.rgba(i.Color.black,.5)),e.xp6(1),e.Udp("font-size",14,"px")("line-height",18,"px")("color",i.rgba(i.Color.black,1)),e.xp6(1),e.Oqu(t.blabDefDisplayName),e.xp6(1),e.Q6J("ngIf",t.workspace),e.xp6(1),e.Udp("width",24,"px")("height",24,"px")("display","flex")("border-radius",4,"px")("position","relative")("align-items","center")("justify-content","center")("margin-left",12,"px"),e.Q6J("t5sTooltipV3",i.I18n.translate(i.i18n,i.I18n.key.pinTooltip))("tooltipPosition","right")("tooltipOffset",8),e.xp6(1),e.Q6J("size",16)("icon",i.IconPin)("fgColor",i.rgba(i.Color.black,.45))}}function _g(a,n){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,dg,10,64,"ng-container",11),e.ALo(2,"slice"),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw().ngIf,o=e.oxw(2);e.Udp("width",100,"%"),e.xp6(1),e.Q6J("ngForOf",e.Dn7(2,4,t,0,i.limit))("ngForTrackBy",o.trackById)}}function ug(a,n){if(1&a&&(e.ynx(0),e.YNc(1,cg,2,11,"div",17),e.YNc(2,_g,3,8,"div",23),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",0===t.length),e.xp6(1),e.Q6J("ngIf",t.length>0)}}function hg(a,n){if(1&a&&(e.ynx(0),e.YNc(1,ug,3,2,"ng-container",7),e.ALo(2,"push"),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t.suggestedBlabDefs$))}}function gg(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"div",14),e.NdJ("scroll",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleScroll(o))}),e.TgZ(2,"div"),e._uU(3),e.qZA(),e.YNc(4,lg,3,2,"ng-container",7),e.ALo(5,"push"),e._UZ(6,"div",8),e.TgZ(7,"div"),e._uU(8),e.qZA(),e.YNc(9,hg,3,3,"ng-container",7),e.ALo(10,"push"),e.qZA(),e.TgZ(11,"div")(12,"a",15),e.NdJ("keydown.space",function(o){return o.preventDefault()})("keyup.space",function(o){return null==o.target?null:o.target.click()})("keydown.enter",function(o){return null==o.target?null:o.target.click()}),e._UZ(13,"t5s-svg",16),e.TgZ(14,"span"),e._uU(15),e.qZA()()()()}if(2&a){const t=e.oxw();e.Udp("min-width",320,"px")("max-width",320,"px"),e.xp6(1),e.Tol(t.dragContainerClass),e.Udp("padding","6px 0px")("overflow-x","hidden")("overflow-y","auto")("max-height","min(500px, 70vh)"),e.xp6(1),e.Udp("width",100,"%")("font-size",12,"px")("font-weight",500)("line-height",16,"px")("padding","6px 14px 8px 14px")("color",t.rgba(t.Color.black,.65)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.pinnedBlabDefs)," "),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,80,t.pinnedBlabDefs$)),e.xp6(3),e.Udp("width",100,"%")("font-size",12,"px")("font-weight",500)("line-height",16,"px")("padding","6px 14px 8px 14px")("color",t.rgba(t.Color.black,.65)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.suggestedBlabDefs)," "),e.xp6(1),e.Q6J("ngIf",e.lcZ(10,82,t.suggestBlabDefsPagination$)),e.xp6(2),e.Udp("padding","4px 4px")("width",100,"%")("border-top","1px solid "+t.rgba(t.Color.black,.09)),e.xp6(1),e.Udp("width",100,"%")("display","flex")("flex-direction","row")("align-items","center")("padding","4px 6px")("height","fit-content")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("border-radius",4,"px"),e.xp6(1),e.Q6J("icon",t.IconHelp)("size",16)("fgColor",t.rgba(t.Color.black,.35)),e.xp6(1),e.Udp("margin-left",4,"px")("font-size",12,"px")("line-height",16,"px")("color",t.rgba(t.Color.black,.5)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.helpLabel)," ")}}class bo extends _e.A{constructor(n,t,i,o){super(),this.output$$=o,this.I18n=fe.NM,this.IconHelp=y.T08,this.IconCreate=y.Rst,this.IconOptions=y.fUc,this.IconPin=y.DgX,this.IconPinFilled=y.YW7,this.suggestBlabDefsPagination$=this.select((0,$.Cc)(["suggestedBlabDefsLimit"]),(0,p.U)(({suggestedBlabDefsLimit:s})=>({limit:s}))),this.canCreateBlabDefIdSet$=this.select((0,$.Cc)(["lookup","actor"]),(0,p.U)(({lookup:s,actor:l})=>{const d=(0,Se.m0)(l),h=new Set;if(!d)return h;for(const m of s.blabDefs)(0,H.Tp)({userId:d,blabDefId:m.id,lookup:s,traceId:"sidebar-quick-add-bul
1k"})&&h.add(m.id);return h}),(0,Y.d)({bufferSize:1,refCount:!0})),this.quickAddState$=this.select((0,$.Cc)(["settings","lookup"])),this.pinnedBlabDefs$=(0,V.aj)([this.quickAddState$,this.canCreateBlabDefIdSet$]).pipe((0,p.U)(([{settings:s,lookup:l},d])=>(s.quickAddBlabDefIds??[]).map(m=>(0,H.Kz)({blabDefId:m,blabDefs:l})).filter(ee.lm).filter(m=>d.has(m.id)).map(m=>{const C=(0,Ge.Ft)({workspaceId:m.workspaceId,workspaces:l}),S=(0,H.fM)({blabDef:m,i18n:this.i18n}),f=(0,H.Oq)({blabDef:m,i18n:this.i18n}),E=C?(0,Ge.c8)({workspace:C,i18n:this.i18n}):void 0;return{...m,workspace:C,blabDefDisplayName:S,blabDefBlabItemDisplayName:f,workspaceDisplayName:E}})),(0,Y.d)({bufferSize:1,refCount:!0})),this.suggestedBlabDefs$=(0,V.aj)([this.quickAddState$,this.canCreateBlabDefIdSet$]).pipe((0,p.U)(([{settings:s,lookup:l},d])=>l.blabDefs.filter(h=>!(s.quickAddBlabDefIds??[]).includes(h.id)).filter(h=>d.has(h.id)).filter(h=>h.info?.type===to.a.DATABASE).map(h=>{const m=(0,Ge.Ft)({workspaceId:h.workspaceId,workspaces:l}),C=(0,H.fM)({blabDef:h,i18n:this.i18n}),S=m?(0,Ge.c8)({workspace:m,i18n:this.i18n}):void 0;return{...h,workspace:m,blabDefDisplayName:C,workspaceDisplayName:S}}))),this.dragContainerClass=(0,x.I)({".cdk-drag-placeholder":{opacity:0}
1,".cdk-drop-list-dragging":{cursor:"grabbing",...(0,c.XY)({pointerEvents:"none"})},".cdk-drop-list-dragging :not(.cdk-drag-placeholder)":{transition:"transform 220ms cubic-bezier(0, 0, 0.2, 1);"}}),this.pinnedBlabDefClass=(0,x.I)({"~ .cdk-drag-preview":{background:(0,c.m4)(this.Color.black,.16)}}),this.set({actor:null,suggestedBlabDefsLimit:25,quickAddOverlayOpen:!1,customizeBlabDefsOverlayOpen:!1}),this.connect(t),this.connect(i),this.connect(n),this.hold(this.select((0,$.Cc)(["quickAddOverlayOpen","customizeBlabDefsOverlayOpen"])),({customizeBlabDefsOverlayOpen:s,quickAddOverlayOpen:l})=>{this.emitIsActiveChange(s||l)})}emitIsActiveChange(n){n?this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:!0}}):setTimeout(()=>{this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:!1}})},200)}createBlabItem({blabDefId:n}){this.output$$.next({type:I.CREATE_BLAB_ITEM,blabDefId:n})}pinBlabDef({blabDefId:n}){const{actor:t,settings:i}=this.get(),o=(0,Se.m0)(t);!o||this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:o,quickAddBlabDefIds:[n,...i.quickAddBlabDefIds??[]].filter((s,l,d)=>d.indexOf(s)===l)}})}unpinBlabDef({blabDefId:n}){const{actor:t,settings:i}=this.get(),o=(0,Se.m0)(t);!o||this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:o,quickAddBlabDefIds:(i.quickAddBlabDefIds??[]).filter(s=>s!==n)}})}pinnedBlabDefDropped(n,t){if(t.previousIndex===t.currentIndex)return;const{actor:i}=this.get(),o=(0,Se.m0)(i);if(!o)return;const s=n.map(l=>l.id);(0,Je.bA)(s,t.previousIndex,t.currentIndex),this.set({settings:{...this.get().settings,quickAddBlabDefIds:s}}),this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:o,quickAddBlabDefIds:s}})}handleScroll(n){setTimeout(()=>{const{scrollTop:t,scrollHeight:i,clientHeight:o}=n.target;t/(i-o)>=.8&&this.set({suggestedBlabDefsLimit:this.get().suggestedBlabDefsLimit+20})})}static#e=this.\u0275fac=function(t){return new(t||bo)(e.Y36(zt.h),e.Y36(Ut),e.Y36(dn),e.Y36(He))};static#t=this.\u0275cmp=e.Xpm({type:bo,selectors:[["t5s-organization-sidebar-quick-add-button"]],features:[e.qOj],decls:9,vars:34,consts:[[3,"t5sTooltipV3","tooltipPosition","tooltipOffset","t5sMenuOverlay","menuOverlayRefocusEl","menuOverlayPosition","menuOverlayImperative","menuOverlayOffsetX","menuOverlayOffsetY","menuOpenChange"],["customizeBlabDefsTrigger","t5sMenuOverlay"],["t5sClickableElement","",3,"t5sMenuOverlay","menuOverlayPosition","menuOverlayOffsetX","menuOverlayOffsetY","menuOpenChange"],["btnEl",""],[3,"size","icon","fgColor"],["quickAddOverlay",""],["customizeBlabDefsOverlay",""],[4,"ngIf"],["t5sMenuDivider",""],["t5sMenuItem","",3,"click"],[3,"font-size","line-height","padding","color",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"size","blabDef"],[3,"title"],["cdkScrollable","",3,"scroll"],["t5sClickableElement","","href","https://help.tapeapp.com/en/articles/6424977-stay-efficient-with-the-quick-add-button","target","_blank","draggable","false",3,"keydown.space","keyup.space","keydown.enter"],[3,"icon","size","fgColor"],[3,"width","font-size","line-height","padding","color",4,"ngIf"],["cdkDropList","","cdkDropListLockAxis","y","cdkDropListOrientation","vertical","class","pinned-quick-add-app-drag-boundary",3,"width","padding-bottom","cdkDropListDropped",4,"ngIf"],["cdkDropList","","cdkDropListLockAxis","y","cdkDropListOrientation","vertical",1,"pinned-quick-add-app-drag-boundary",3,"cdkDropListDropped"],["cdkDrag","","t5sClickableBackgroundElement","","cdkDragLockAxis","y",3,"cdkDragBoundary"],[3,"click"],["t5sClickableElement","",3,"t5sTooltipV3","tooltipPosition","tooltipOffset","click"],[3,"width",4,"ngIf"],["t5sClickableBackgroundElement",""]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0,1),e.NdJ("menuOpenChange",function(s){return i.set({customizeBlabDefsOverlayOpen:s.menuOpen})}),e.TgZ(2,"button",2,3),e.NdJ("menuOpenChange",function(s){return i.set({quickAddOverlayOpen:s.menuOpen})}),e._UZ(4,"t5s-svg",4),e.qZA()(),e.YNc(5,ig,8,37,"ng-template",null,5,e.W1O),e.YNc(7,gg,16,84,"ng-template",null,6,e.W1O)),2&t){const o=e.MAs(3),s=e.MAs(6),l=e.MAs(8);e.Udp("border-radius",50,"%"),e.Q6J("t5sTooltipV3",i.I18n.translate(i.i18n,i.I18n.key.btnTooltip))("tooltipPosition","right")("tooltipOffset",4)("t5sMenuOverlay",l)("menuOverlayRefocusEl",o)("menuOverlayPosition","bottom-right")("menuOverlayImperative",!0)("menuOverlayOffsetX",4)("menuOverlayOffsetY",4),e.xp6(2),e.Udp("width",32,"px")("height",32,"px")("display","flex")("border-radius",50,"%")("align-items","center")("justify-content","center")("border","1p
1x solid "+i.rgba(i.Color.black,.09))("transition","background 20ms ease-in"),e.Q6J("t5sMenuOverlay",s)("menuOverlayPosition","bottom-right")("menuOverlayOffsetX",4)("menuOverlayOffsetY",4),e.xp6(2),e.Q6J("size",16)("icon",i.IconCreate)("fgColor",i.rgba(i.Color.black,.85))}},dependencies:[u.sg,u.O5,ve.PQ,Je.Wj,Je.Zt,oe.v,Un.x,it.i,Xt.q,Fn.e,wr.C,le.H,Qn.p,u.OU,we.f],encapsulation:2,changeDetection:0})}var mg=r(16075),Sr=r(18714),Za=r(17765),Tr=r(53468),Co=r(11360),Xn=r(19521);const fg=function(a){return{key:a}};function xg(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Udp("font-size",12,"px")("line-height",16,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,e.VKq(5,fg,t.I18n.key.workspace.membershipTooltip.placeholder)))}}function bg(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div")(2,"div"),e._UZ(3,"t5s-user-profile-picture",4),e.TgZ(4,"div"),e._uU(5),e.qZA()()(),e.BQk()),2&a){const t=n.$implicit;e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-content","flex-end")("min-width",140,"px")("width",100,"%")("margin-top",4,"px"),e.xp6(1),e.Udp("display","flex")("align-items","center")("min-width",0,"px")("flex-grow",1),e.xp6(1),e.Udp("margin-right",6,"px")("align-self","center"),e.Q6J("size",18)("user",t)("hasShadow",!1)("hostSizing",!1)("hasBorder",!1)("backgroundColor","transparent"),e.xp6(1),e.Udp("font-size",12,"px")("line-height",16,"px")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",null==t.info?null:t.info.name," ")}}const Cg=function(a){return{amount:a}},vg=function(a,n){return{key:a,params:n}};function Ig(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.xp6(1),e.Udp("margin-top",2,"px"),e.xp6(1),e.Oqu(i.I18n.translate(i.i18n,e.WLB(5,vg,i.I18n.key.workspace.membershipTooltip.numMore,e.VKq(3,Cg,t.numUsers-i.MAX_NUM_MEMBERSHIPS_PREVIEW))))}}function yg(a,n){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,bg,6,41,"ng-container",3),e.YNc(2,Ig,3,8,"ng-container",0),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("margin-bottom",4,"px"),e.xp6(1),e.Q6J("ngForOf",t.users)("ngForTrackBy",i.trackById),e.xp6(1),e.Q6J("ngIf",t.numUsers>i.MAX_NUM_MEMBERSHIPS_PREVIEW)}}function kg(a,n){if(1&a&&(e.ynx(0),e.YNc(1,xg,3,7,"ng-container",1),e.YNc(2,yg,3,5,"ng-template",null,2,e.W1O),e.BQk()),2&a){const t=n.ngIf,i=e.MAs(3);e.xp6(1),e.Q6J("ngIf",0===t.numUsers)("ngIfElse",i)}}class vo extends _e.A{constructor(){super(),this.I18n=fe.Y0,this.MAX_NUM_MEMBERSHIPS_PREVIEW=20,this.state$=this.select((0,v.Cc)(["users"]),(0,p.U)(({users:n})=>({users:n.slice(0,this.MAX_NUM_MEMBERSHIPS_PREVIEW),numUsers:n.length}))),this.set({users:[]})}set users(n){this.setProperty("users",n)}static#e=this.\u0275fac=function(t){return new(t||vo)};static#t=this.\u0275cmp=e.Xpm({type:vo,selectors:[["t5s-workspace-memberships-tooltip"]],inputs:{users:"users"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngIf","ngIfElse"],["userList",""],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"size","user","hasShadow","hostSizing","hasBorder","backgroundColor"]],template:function(t,i){1&t&&(e.YNc(0,kg,4,2,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,_a.p,we.f],encapsulation:2,changeDetection:0})}var wg=r(80300);class Io extends _e.A{constructor(n,t,i,o){super(),this.elRef=t,this.output$$=o,this.I18n=fe.Y0,this.IconLink=y.JHz,this.IconSettings=y.iCC,this.IconDuplicate=y.MMl,this.IconSettingsMembers=y.Az,this.IconAddPersonCircle=y.O_,this.workspaceId$=this.select((0,v.Cc)(["workspace"]),(0,p.U)(({workspace:s})=>s.id)),this.lookup$=this.select((0,v.Cc)(["lookup"]),(0,p.U)(({lookup:s})=>s)),this.connect(n),this.connect(i)}set workspace(n){this.setProperty("workspace",n)}copyWorkspaceLink({url:n}){this.output$$.next({type:I.COPY_WORKSPACE_LINK,url:n})}openWorkspaceSettings({workspaceId:n}){this.output$$.next({type:I.OPEN_WORKSPACE_SETTINGS,workspaceId:n})}openWorkspaceMemberInvite({workspaceId:n}){this.output$$.next({type:I.OPEN_WORKSPACE_MEMBER_INVITE,workspaceId:n})}duplicateWorkspace({workspaceId:n}){this.output$$.next({type:I.DUPLICATE_WORKSPACE,workspaceId:n})}archiveWorkspace({workspaceId:n}){this.output$$.next({type:I.ARCHIVE_WORKSPACE,workspaceId:n})}deleteWorkspace({workspaceId:n}){this.output$$.next({type:I.DELETE_WORKSPACE,workspaceId:n})}leaveWorkspace({workspaceId:n,userId:t}){this.output$$.next({type:I.LEAVE_WORKSPACE,workspaceId:n,userId:t})}static#e=this.\u0275fac=function(t){return new(t||Io)(e.Y36(Tt.z),e.Y36(e.SBq),e.Y36(Ut),e.Y36(He))};static#t=this.\u0275cmp=e.Xpm({type:Io,selectors:[["t5s-organization-sidebar-workspace-sett
1ings"]],inputs:{workspace:"workspace"},features:[e.qOj],decls:1,vars:2,consts:[[3,"lookup","workspaceId","openWorkspaceSettings","openWorkspaceMemberInvite","copyWorkspaceLink","duplicateWorkspace","archiveWorkspace","deleteWorkspace","leaveWorkspace"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-workspace-settings-menu",0),e.NdJ("openWorkspaceSettings",function(s){return i.openWorkspaceSettings(s)})("openWorkspaceMemberInvite",function(s){return i.openWorkspaceMemberInvite(s)})("copyWorkspaceLink",function(s){return i.copyWorkspaceLink(s)})("duplicateWorkspace",function(s){return i.duplicateWorkspace(s)})("archiveWorkspace",function(s){return i.archiveWorkspace(s)})("deleteWorkspace",function(s){return i.deleteWorkspace(s)})("leaveWorkspace",function(s){return i.leaveWorkspace(s)}),e.qZA()),2&t&&e.Q6J("lookup",i.lookup$)("workspaceId",i.workspaceId$)},dependencies:[wg.e],encapsulation:2,changeDetection:0})}var Zt=r(78667);function Jl(a){return{id:a.id,workspaceId:a.workspaceId}}class yo extends hn.R{constructor(n,t,i,o,s){super(),this.dnd=t,this.elRef=i,this.output$$=o,this.lookup$=s,this.i18n=(0,Zt.mu)(),this.connect(n)}set blabDef(n){this.setProperty("blabDef",n)}ngAfterViewInit(){this.source=this.dnd.dragSource(Tr.k,{beginDrag:()=>Jl(this.get().blabDef),canDrag:()=>!0,endDrag:t=>{const i=t.getDropResult();if(!i?.sourceBlabDef)return;const o=function Sg(a,{lookup:n,i18n:t}){if(a&&a.sourceBlabDef&&n?.blabDefs&&n?.workspaces){if(a.type===Co.r.DROP_ON_BLAB_DEF&&a.targetBlabDef){const i=n.blabDefs.find(f=>f.id===a.targetBlabDef?.id);if(!i)return;const o=n.blabDefs.filter(f=>f.workspaceId===i.workspaceId).filter(H.Ch).sort(H.KE),s=o.findIndex(f=>f.id===i.id);let l=(0,H.nM)();l=a.operation===Xn.e.ABOVE?(0,H.nM)(o[s-1],o[s]):(0,H.nM)(o[s],o[s+1]);const d=a.sourceBlabDef.id,h=(0,H.PT)({blabDefs:n,blabDefId:d}),m=i.workspaceId,C=(0,Ge.fN)({workspaces:n,workspaceId:m}),S=n.blabDefs.filter(ee.lm).filter(f=>f.workspaceId===m&&f.id!==d).map(f=>f.info?.slug);return{type:I.MOVE_BLAB_DEF,blabDefId:d,blabDef:h,targetWorkspaceId:m,targetWorkspace:C,targetPosition:l,newBlabDefSlug:h?(0,H.Q1)({...h,workspaceId:m},{existingSlugs:S,i18n:t}):void 0,confirmation:(0,Za.z)({blabDefId:d,targetWorkspaceId:m,lookup:n})}}if(a.type===Co.r.DROP_ON_WORKSPACE&&a.targetWorkspace){const i=n.workspaces.find(C=>C.id===a.targetWorkspace?.id);if(!i)return;const o=n.blabDefs.filter(C=>C.workspaceId===i.id).filter(H.Ch).sort(H.KE),s=(0,H.nM)(void 0,o[0]),l=a.sourceBlabDef.id,d=(0,H.PT)({blabDefs:n,blabDefId:l}),h=i.id,m=n.blabDefs.filter(ee.lm).filter(C=>C.workspaceId===h&&C.id!==l).map(C=>C.info?.slug);return{type:I.MOVE_BLAB_DEF,blabDefId:l,blabDef:d,targetWorkspaceId:h,targetWorkspace:i,targetPosition:s,newBlabDefSlug:d?(0,H.Q1)({...d,workspaceId:h},{existingSlugs:m,i18n:t}):void 0,confirmation:(0,Za.z)({blabDefId:l,targetWorkspaceId:h,lookup:n})}}}}(i,{lookup:this.lookup$.getValue(),i18n:this.i18n});!o||this.output$$.next(o)}});const n=this.elRef.nativeElement;this.source?.connectDragPreview(n),this.source?.connectDragSource(n,{dropEffect:"move"}),this.target=this.dnd.dropTarget(Tr.k,{drop:t=>{const i=t.getItem(),o=this.get().blabDef;if(!i||!this.canDropBlabDef(i,o))return;const s=this.getDraggingOperation(t);return{type:Co.r.DROP_ON_BLAB_DEF,sourceBlabDef:i,targetBlabDef:Jl(o),operation:s}},hover:t=>{if(t.isOver({shallow:!0})){const i=t.getItem(),o=this.get().blabDef;if(!this.canDropBlabDef(i,o))return;const s=(0,c.VD)(Ma);if(this.getDraggingOperation(t)===Xn.e.ABOVE)return void this.elRef.nativeElement?.style.setProperty("box-shadow",`0px -2.5px 0px 0px ${s}, inset 0px 1.5px 0px 0px ${s}`);this.getDraggingOperation(t)===Xn.e.BELOW&&this.elRef.nativeElement?.style.setProperty("box-shadow",`inset 0px -1.5px 0px 0px ${s}, 0px 2.5px 0px 0px ${s}`)}}}),this.hold(this.target.listen(t=>!t.isOver({shallow:!0})).pipe((0,w.x)(),(0,en.V)()),()=>{this.elRef.nativeElement?.style.removeProperty("box-shadow")}),this.target.connectDropTarget(this.elRef.nativeElement)}getDraggingOperation(n){const t=this.elRef.nativeElement.getBoundingClientRect(),i=.5*(t.bottom-t.top);return(n.getClientOffset()?.y??0)-t.top<i?Xn.e.ABOVE:Xn.e.BELOW}canDropBlabDef(n,t){if(!n||n.id===t.id)return!1;const{activeUserId:i}=this.get();return(0,Za.k)({activeUserId:i,blabDefId:n.id,lookup:this.lookup$.getValue(),targetWorkspaceId:t.
1workspaceId})}ngOnDestroy(){super.ngOnDestroy(),this.source?.unsubscribe(),this.target?.unsubscribe()}static#e=this.\u0275fac=function(t){return new(t||yo)(e.Y36(Tt.z),e.Y36(po.cx),e.Y36(e.SBq),e.Y36(He),e.Y36(ro))};static#t=this.\u0275dir=e.lG2({type:yo,selectors:[["","t5sOrganizationSidebarWorkspaceBlabDefDragDrop",""]],inputs:{blabDef:["t5sOrganizationSidebarWorkspaceBlabDefDragDrop","blabDef"]},exportAs:["t5sOrganizationSidebarWorkspaceBlabDefDragDrop"],features:[e.qOj]})}const Tg=["workspaceEl"],Ag=["clickableBackground"],Ug=["chevronVisible"],Og=["buttonRowVisible"];function Eg(a,n){if(1&a&&(e.TgZ(0,"div",8,17),e._UZ(2,"t5s-svg",11),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("padding","2px 2px")("pointer-events","none"),e.Q6J("t5sHoverVisibleElement","organization-sidebar-workspace-hover"),e.xp6(2),e.Udp("transform",t.isCollapsed?"rotate(-90deg)":"rotate(0deg)")("transition","transform 0.22s"),e.Q6J("size",16)("icon",i.IconChevronDownThick)("fgColor",i.rgba(i.Color.black,.35))}}const Dg=function(a){return{count:a}},Bg=function(a,n){return{key:a,params:n}};function Mg(a,n){if(1&a&&(e.TgZ(0,"span",23),e._uU(1),e.qZA()),2&a){e.oxw();const t=e.MAs(6),i=e.oxw().ngIf,o=e.oxw();e.Udp("position","relative"),e.Q6J("t5sTooltipV3",t),e.xp6(1),e.Oqu(o.I18n.translate(o.i18n,e.WLB(6,Bg,1===i.users.length?o.I18n.key.workspace.members.one:o.I18n.key.workspace.members.many,e.VKq(4,Dg,i.users.length))))}}function Zg(a,n){1&a&&(e.TgZ(0,"span"),e._uU(1,"\xa0\xb7\xa0"),e.qZA())}function Lg(a,n){if(1&a&&(e.TgZ(0,"span",24),e._uU(1),e.qZA()),2&a){const t=e.oxw(3);e.Udp("position","relative"),e.Q6J("tooltipMaxWidth",220)("t5sTooltipV3",t.I18n.translate(t.i18n,t.I18n.key.workspace.closed.tooltip)),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.closed.label))}}function Ng(a,n){if(1&a&&(e.TgZ(0,"span"),e._UZ(1,"t5s-svg",11),e._uU(2),e.qZA()),2&a){const t=e.oxw(3);e.Udp("color",t.rgba(t.Color.black,.8)),e.xp6(1),e.Udp("display","inline-block")("margin-bottom",-1.5,"px")("margin-right",2,"px"),e.Q6J("size",12)("icon",t.IconCircleCheck)("fgColor",t.rgba(t.Color.black,.8)),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.hasMembership))}}function Rg(a,n){if(1&a&&e._UZ(0,"t5s-workspace-memberships-tooltip",25),2&a){const t=e.oxw(2).ngIf;e.Q6J("users",t.users)}}function Pg(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",18),e.NdJ("click",function(){e.CHM(t),e.oxw();const o=e.MAs(5);return e.KtG(null==o?null:o.click())}),e.YNc(1,Mg,2,9,"span",19),e.YNc(2,Zg,2,0,"span",0),e.YNc(3,Lg,2,5,"span",20),e.YNc(4,Ng,3,12,"span",21),e.YNc(5,Rg,1,1,"ng-template",null,22,e.W1O),e.qZA()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("width",100,"%")("display","inline-block")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("color",i.rgba(i.Color.black,.5))("font-size",12,"px")("line-height",16,"px")("font-weight",400)("max-height",16,"px")("user-select","none"),e.xp6(1),e.Q6J("ngIf",t.users),e.xp6(1),e.Q6J("ngIf",t.users&&(t.hasMembership||t.canRequest)),e.xp6(1),e.Q6J("ngIf",t.canRequest),e.xp6(1),e.Q6J("ngIf",t.hasMembership)}}function $g(a,n){if(1&a&&e._UZ(0,"t5s-organization-sidebar-workspace-settings",26),2&a){const t=e.oxw().ngIf;e.Q6J("workspace",t)}}function zg(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleMenuOpenChange(o.menuOpen))}),e._UZ(1,"t5s-svg",11),e.qZA()}if(2&a){e.oxw();const t=e.MAs(24),i=e.oxw();e.Udp("position","relative")("border-radius",4,"px")("padding","2px 2px")("transition","background 20ms ease-in"),e.Q6J("t5sMenuOverlay",t)("menuOverlayPosition","bottom-right")("t5sTooltipV3",i.I18n.translate(i.i18n,i.I18n.key.workspace.add.tooltip)),e.xp6(1),e.Q6J("size",16)("icon",i.IconPlusThick)("fgColor",i.rgba(i.Color.black,.45))}}function Qg(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"button",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleAddButtonClick({viaTemplate:!0}))}),e._UZ(2,"t5s-svg",11),e.TgZ(3,"span"),e._uU(4),e.qZA()(),e.TgZ(5,"button",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleAddButtonClick({viaImport:!0}))}),e._UZ(6,"t5s-svg",11),e.TgZ(7,"div")(8,"div"),e._uU(9),e.qZA(),e.TgZ(10,"div"),e._uU(11),e.qZA()()(),e._UZ(12,"div",29),e.TgZ(13,"button",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleAddButtonClick({}))}),e._UZ(14,"t5s-svg",11),e.TgZ(15,"span"),e._uU(16),e.qZA()()()}if(2&a){const t=e.oxw(2);e.Udp("min-width",208,"px")("padding","6px 0px"),e.xp6(1),e.Udp("display","flex")("align-items","center")("min-height",28,"px")("padding","0p
1x 12px 0px 10px"),e.xp6(1),e.Q6J("size",18)("icon",t.IconSidebarTemplates)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("color",t.Color.black)("font-size",14,"px")("line-height",18,"px")("margin-left",8,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.add.template)),e.xp6(1),e.Udp("min-height",28,"px")("padding","4px 12px 4px 10px"),e.xp6(1),e.Q6J("size",18)("icon",t.IconAppImport)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("margin-left",8,"px"),e.xp6(1),e.Udp("color",t.Color.black)("font-size",14,"px")("line-height",18,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.add.import)),e.xp6(1),e.Udp("color",t.rgba(t.Color.black,.5))("font-size",12,"px")("line-height",16,"px")("margin-top",2,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.add.importDescription)),e.xp6(2),e.Udp("display","flex")("align-items","center")("min-height",28,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Q6J("size",18)("icon",t.IconPlus)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("color",t.Color.black)("font-size",14,"px")("line-height",18,"px")("margin-left",8,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.add.blank))}}function Fg(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.output$$.next({type:s.OutputType.JOIN_WORKSPACE,workspaceId:o.id}))}),e._uU(1),e.qZA()}if(2&a){const t=e.oxw(2);e.Udp("position","relative")("padding","0px 4px")("user-select","none")("display","inline-flex")("align-items","center")("white-space","nowrap")("height",22,"px")("border-radius",4,"px")("font-size",13,"px")("line-height",1.2)("min-width",0,"px")("color",t.rgba(t.Color.black,.65))("max-height",26,"px")("font-weight",600)("align-self","center"),e.Q6J("t5sTooltipV3",t.I18n.translate(t.i18n,t.I18n.key.workspace.join.tooltip)),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.workspace.join.label)," ")}}function Gg(a,n){if(1&a&&(e.TgZ(0,"button",34),e._UZ(1,"t5s-svg",11),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&a){e.oxw();const t=e.MAs(3),i=e.oxw(2);e.Udp("display","flex")("align-items","center")("width","calc(100% - 16px)")("padding","4px 8px 4px 9px")("margin","1px 8px")("font-size",14,"px")("line-height",16,"px")("min-height",30,"px")("color",i.rgba(i.Color.black,.65))("border-radius",6,"px")("user-select","none"),e.Q6J("t5sMenuOverlay",t)("menuOverlayPosition","bottom-right")("t5sTooltipV3",i.I18n.translate(i.i18n,i.I18n.key.workspace.addBtnOverlay.tooltip)),e.xp6(1),e.Udp("margin-right",10,"px"),e.Q6J("size",18)("icon",i.IconPlusThick)("fgColor",i.rgba(i.Color.black,.45)),e.xp6(2),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.workspace.emptyAddBtnLabel))}}function Jg(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"button",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.handleAddButtonClick({viaTemplate:!0}))}),e._UZ(2,"t5s-svg",11),e.TgZ(3,"span"),e._uU(4),e.qZA()(),e.TgZ(5,"button",35),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.handleAddButtonClick({viaImport:!0}))}),e._UZ(6,"t5s-svg",11),e.TgZ(7,"div")(8,"div"),e._uU(9),e.qZA(),e.TgZ(10,"div"),e._uU(11),e.qZA()()(),e._UZ(12,"div",29),e.TgZ(13,"button",36),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.handleAddButtonClick({}))}),e._UZ(14,"t5s-svg",11),e.TgZ(15,"span"),e._uU(16),e.qZA()()()}if(2&a){const t=e.oxw(3);e.Udp("min-width",208,"px")("padding","6px 0px"),e.xp6(1),e.Udp("display","flex")("align-items","center")("min-height",28,"px")("padding","0px 12px 0px 10px"),e.xp6(1),e.Q6J("size",18)("icon",t.IconSidebarTemplates)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("color",t.Color.black)("font-size",14,"px")("line-height",18,"px")("margin-left",8,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.addBtnOverlay.template)),e.xp6(1),e.Udp("min-height",28,"px")("padding","4px 12px 4px 10px"),e.xp6(1),e.Q6J("size",18)("icon",t.IconAppImport)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("margin-left",8,"px"),e.xp6(1),e.Udp("color",t.Color.black)("font-size",14,"px")("line-height",18,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.addBtnOverlay.import)),e.xp6(1),e.Udp("color",t.rgba(t.Color.black,.5))("font-size",12,"px")("line-height",16,"px")("margin-top",2,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.addBtnOverlay.importDescription)),e.xp6(2),e.Udp("display","flex")("align-items","center")("min-height",28,"px")("padding","0p
1x 12px 0px 10px"),e.xp6(1),e.Q6J("size",18)("icon",t.IconPlus)("fgColor",t.rgba(t.Color.black,.85)),e.xp6(1),e.Udp("color",t.Color.black)("font-size",14,"px")("line-height",18,"px")("margin-left",8,"px"),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.addBtnOverlay.blank))}}function Hg(a,n){if(1&a&&(e.TgZ(0,"div")(1,"div")(2,"span"),e._uU(3),e.qZA()()()),2&a){const t=e.oxw(3);e.Udp("display","flex")("align-items","center")("width","100%")("font-size",14,"px")("line-height",16,"px")("min-height",30,"px")("padding","2px 8px")("margin-top",1,"px")("margin-bottom",1,"px")("flex","1 1 auto")("white-space","nowrap")("min-width",0,"px")("overflow","hidden")("text-overflow","ellipsis")("user-select","none"),e.xp6(1),e.Udp("color",t.rgba(t.Color.black,.5))("padding-left",37,"px")("font-size",14,"px")("line-height",16,"px")("display","flex")("align-items","center"),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.workspace.emptyPlaceholder))}}function Vg(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-organization-sidebar-blab-def",37),e.BQk()),2&a){const t=n.$implicit;e.xp6(1),e.Q6J("t5sOrganizationSidebarWorkspaceBlabDefDragDrop",t)("blabDef",t)}}function Wg(a,n){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Gg,4,31,"button",31),e.YNc(2,Jg,17,69,"ng-template",null,14,e.W1O),e.YNc(4,Hg,4,43,"div",32),e.YNc(5,Vg,2,2,"ng-container",33),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("width",100,"%")("padding-bottom",t.isLast?void 0:14,"px"),e.xp6(1),e.Q6J("ngIf",0===t.blabDefs.length&&t.canCreateBlabDef),e.xp6(3),e.Q6J("ngIf",0===t.blabDefs.length&&!t.canCreateBlabDef),e.xp6(1),e.Q6J("ngForOf",t.blabDefs)("ngForTrackBy",i.trackById)}}const Yg=function(){return{maxWidth:"0px",overflow:"hidden"}},Kg=function(){return{maxWidth:"fit-content"}},jg=function(a,n){return{default:a,hover:n}},qg=function(a,n){return{workspace:a,i18n:n}};function Xg(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",1,2)(4,"a",3,4),e.NdJ("click",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleWorkspaceClick(o))}),e.Hsn(6),e.qZA(),e._UZ(7,"div")(8,"t5s-workspace-icon",5),e.TgZ(9,"div")(10,"div")(11,"div"),e._uU(12),e.qZA(),e.YNc(13,Eg,3,12,"div",6),e.qZA(),e.YNc(14,Pg,7,26,"div",7),e.qZA(),e.TgZ(15,"div",8,9),e._UZ(17,"div"),e.TgZ(18,"button",10),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleMenuOpenChange(o.menuOpen))}),e._UZ(19,"t5s-svg",11),e.qZA(),e.YNc(20,$g,1,1,"ng-template",null,12,e.W1O),e.YNc(22,zg,2,14,"button",13),e.YNc(23,Qg,17,69,"ng-template",null,14,e.W1O),e.YNc(25,Fg,2,32,"button",15),e.qZA()(),e.YNc(26,Wg,6,8,"div",16),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(21),o=e.oxw();e.xp6(1),e.Udp("width","calc(100% - 16px)")("min-height",30,"px")("border-radius",6,"px")("margin","0px 8px")("padding",o.hasSecondRow(t)?"6px 8px":"0px 8px")("display","flex")("flex-direction","row")("align-items","center")("transition","background 150ms"),e.Q6J("t5sHoverVisibleContainer","organization-sidebar-workspace-hover")("hoverVisibleAnimationDuration",150)("hoverVisibleAdditionalProperties",e.WLB(118,jg,e.DdM(116,Yg),e.DdM(117,Kg))),e.xp6(3),e.Udp("border-radius",6,"px"),e.Q6J("href",t.url,e.LSH),e.uIk("data-cy","t5s-wc-org-sidebar-workspace-row")("data-cy-workspace-slug",t.info.slug),e.xp6(3),e.Udp("position","absolute")("top",0,"px")("left",0,"px")("width","100%")("height","100%")("pointer-events","none")("border-radius",6,"px")("background-color",o.showActive(t)?o.rgba(o.Color.black,.04):void 0),e.xp6(1),e.Udp("overflow","hidden")("border-radius",.25,"em")("margin-right",9,"px"),e.Q6J("size",20)("workspace",t),e.xp6(1),e.Udp("flex",1)("min-width",0,"px"),e.xp6(1),e.Udp("width",100,"%")("display","flex")("flex-direction","row")("align-items","center")("margin-bottom",1,"px"),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("color",o.showActive(t)?o.Color.black:o.rgba(o.Color.black,.8))("font-weight",o.showActive(t)?600:500)("font-size",14,"px")("line-height",20,"px")("max-width","fit-content")("overflow","hidden")("text-overflow","ellipsis")("white-space","nowrap")("user-select","none"),e.xp6(1),e.hij(" ",o.getWorkspaceDisplayName(e.WLB(121,qg,t,o.i18n))," "),e.xp6(1),e.Q6J("ngIf",t.showBlabDefs),e.xp6(1),e.Q6J("ngIf",o.hasSecondRow(t)),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("gap",4,"px"),e.Q6J("t5sHoverVisibleElement","organization-sidebar-workspace-hover"),e.xp6(2),e.Udp("width",1,"px"),e.xp6(1),e.Udp("position","relative")("border-radius",4,"px")("padding","2px 2px")("transition","background 20ms ease-in"),e.Q6J("t5sMenuOverlay",i)("t5sTooltipV3",o.settingsButtonTooltip$),e.xp6(1),e.Q6J("size",16)("icon",o.IconDotsWebClient)("fgColor",o.rgba(o.Color.black,.45)),e.xp6(3),e.Q6J("ngIf",t.canCreateBlabDef),e.xp6(3),e.Q6J("ngIf",!t.hasMembership&&t.canJoin),e.xp6(1),e.Q6J("ngIf",!t.isCollapsed&&t.showBlabDefs)}}const em=[[["","organization-sidebar-workspace-drag-handle",""]]],tm=["[organization-sidebar-workspace-drag-handle]"];class ei extends _e.A{constructor(n,t,i,o,s,l){super(),this.activeActor$=t,this.dnd=i,this.elRef=o,this.lookup$=s,this.output$$=l,this.I18n=fe.Y0,this.getWorkspaceDisplayName=Ge.c8,this.WorkspaceType=A.EIb,this.SectionType=ze,this.OutputType=I,this.IconDotsWebClient=y.$FW,this.IconPlusThick=y.NJo,this.IconPlus=y.SC9,this.IconLockFilled=y.nsc,this.IconCircleCheck=y.RfK,this.IconAppImport=y.sUk,this.IconSidebarTemplates=y.qo3,this.IconChevronDownThick=y.P4P,this.isCollapsedChange=new e.vpe,this.workspace$=this.select((0,v.Cc)(["workspace"]),(0,p.U)(({workspace:d})=>d)),this.settingsButtonTooltip$=this.activeActor$.pipe((0,p.U)(({actor:d})=>this.I18n.translate(this.i18n,d?.type===un.g.ORGANIZATION_SHARELINK?this.I18n.key.workspace.settings.tooltipOrgShare:this.I18n.key.workspace.settings.tooltip))),this.connect(n),this.target=this.dnd.dropTarget(Tr.k,{drop:d=>{const h=d.getItem(),m=this.get().workspace;if(h&&d.getDropResult()?.type!==Co.r.DROP_ON_BLAB_DEF&&this.canDropBlabDef(h,m))return{type:Co.r.DROP_ON_WORKSPACE,sourceBlabDef:{...h},targetWorkspace:{id:m.id}
1,operation:Xn.e.INSIDE}},hover:d=>{if(d.isOver({shallow:!0})){const h=d.getItem(),m=this.get().workspace;if(!this.canDropBlabDef(h,m))return;this.workspaceElRef?.nativeElement?.style.setProperty("background-color",(0,c.m4)(c.Il.blueBright1,.14))}else this.workspaceElRef?.nativeElement?.style.removeProperty("background-color")}}),this.hold(this.target.listen(d=>!d.isOver()).pipe((0,w.x)(),(0,en.V)()),()=>{this.workspaceElRef?.nativeElement?.style.removeProperty("background-color")}),this.hold((0,Sr._O)(o.nativeElement,2e3).pipe((0,en.V)()),()=>{const{workspace:d}=this.get();d?.isCollapsed&&this.isCollapsedChange.emit({workspaceId:d.id,isCollapsed:!1})}),this.target.connectDropTarget(o.nativeElement)}set workspace(n){this.setProperty("workspace",n)}canDropBlabDef(n,t){if(!n||!t.isCollapsed&&t.blabDefs.length>0)return!1;const{activeUserId:i}=this.get();return(0,Za.k)({activeUserId:i,blabDefId:n.id,lookup:this.lookup$.getValue(),targetWorkspaceId:t.id})}handleWorkspaceClick(n){if(!(0,Sn.i0)(n))return!0;const{workspace:t}=this.get();return t.showBlabDefs?this.isCollapsedChange.emit({workspaceId:t.id,isCollapsed:!t.isCollapsed}):this.output$$.next({type:I.OPEN_WORKSPACE,workspace:t}),!1}showActive(n){return n?.isActive&&(!n?.showBlabDefs||n.isCollapsed||0===n.blabDefs.length)}hasSecondRow(n){return n.users||n.hasMembership||n.canRequest}handleMenuOpenChange(n){this.clickableBackground?.setActive(n),this.chevronVisible?.setActive(n),this.buttonRowVisible?.setActive(n),this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:n}})}handleAddButtonClick({viaImport:n,viaTemplate:t}){const i=this.get().workspace.id;if(!i)return;const{blabDefs:o}=this.lookup$.getValue(),s=o.filter(d=>d.workspaceId===i).filter(H.Ch).sort(H.kC)[0]?.info?.position,l=(0,Ql.bd)(s);this.output$$.next({type:I.CREATE_BLAB_DEF,workspaceId:i,viaImport:n,viaTemplate:t,position:l})}ngOnDestroy(){super.ngOnDestroy(),this.target?.unsubscribe()}static#e=this.\u0275fac=function(t){return new(t||ei)(e.Y36(Tt.z),e.Y36(zt.h),e.Y36(po.cx),e.Y36(e.SBq),e.Y36(ro),e.Y36(He))};static#t=this.\u0275cmp=e.Xpm({type:ei,selectors:[["t5s-organization-sidebar-workspace"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Tg,5),e.Gf(Ag,5),e.Gf(Ug,5),e.Gf(Og,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.workspaceElRef=o.first),e.iGM(o=e.CRH())&&(i.clickableBackground=o.first),e.iGM(o=e.CRH())&&(i.chevronVisible=o.first),e.iGM(o=e.CRH())&&(i.buttonRowVisible=o.first)}},inputs:{workspace:"workspace"},outputs:{isCollapsedChange:"isCollapsedChange"},features:[e.qOj],ngContentSelectors:tm,decls:2,vars:3,consts:[[4,"ngIf"],["t5sClickableBackgroundElement","",3,"t5sHoverVisibleContainer","hoverVisibleAnimationDuration","hoverVisibleAdditionalProperties"],["workspaceEl","","clickableBackground","t5sClickableBackgroundElement"],["draggable","false","target","_blank",3,"href","click"],["backgroundClickBtn",""],[3,"size","workspace"],[3,"t5sHoverVisibleElement","padding","pointer-events",4,"ngIf"],[3,"width","display","white-space","overflow","text-overflow","color","font-size","line-height","font-weight","max-height","user-select","click",4,"ngIf"],[3,"t5sHoverVisibleElement"],["buttonRowVisible","t5sHoverVisibleElement"],["tabindex","-1","t5sClickableElement","",3,"t5sMenuOverlay","t5sTooltipV3","menuOpenChange"],[3,"size","icon","fgColor"],["settingsOverlay",""],["tabindex","-1","t5sClickableElement","",3,"t5sMenuOverlay","menuOverlayPosition","t5sTooltipV3","position","border-radius","padding","transition","menuOpenChange",4,"ngIf"],["addButtonOverlay",""],["tabindex","-1","t5sClickableElement","",3,"t5sTooltipV3","position","padding","user-select","display","align-items","white-space","height","border-radius","font-size","line-height","min-width","color","max-height","font-weight","align-self","click",4,"ngIf"],[3,"width","padding-bottom",4,"ngIf"],["chevronVisible","t5sHoverVisibleElement"],[3,"click"],[3,"t5sTooltipV3","position",4,"ngIf"],[3,"position","tooltipMaxWidth","t5sTooltipV3",4,"ngIf"],[3,"color",4,"ngIf"],["workspaceMembershipsTooltip",""],[3,"t5sTooltipV3"],[3,"tooltipMaxWidth","t5sTooltipV3"],[3,"users"],[3,"workspace"],["tabindex","-1","t5sClickableElement","",3,"t5sMenuOverlay","menuOverlayPosition","t5sTooltipV3","menuOpenChange"],["t5sMenuItem","",3,"click"],["t5sMenuDivider",""],["tabindex","-1","t5sClickableElement","",3,"t5sTooltipV3","click"],["t5sClickableElement","",3,"t5sMenuOverlay","menuOverlayPosition","t5sTooltipV3","display","align-items","width","padding","margin","font-size","line-height","min-height","color","border-radius","user-select",4,"ngIf"],[3,"display","align-items","width","fontSize","line-height","min-height","padding","margin-top","margin-bottom","flex","white-space","min-width","overflow","text-overflow","user-select",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["t5sClickableElement","",3,"t5sMenuOverlay","menuOverlayPosition","t5sTooltipV3"],["t5sMenuItem","","data-cy","t5s-wc-create-blab-def-menu
1-import-btn",3,"click"],["data-cy","t5s-wc-create-blab-def-menu-blank-btn","t5sMenuItem","",3,"click"],[3,"t5sOrganizationSidebarWorkspaceBlabDefDragDrop","blabDef"]],template:function(t,i){1&t&&(e.F$t(em),e.YNc(0,Xg,27,124,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.workspace$))},dependencies:[u.sg,u.O5,oe.v,Un.x,ga.P,ma.a,it.i,Xt.q,Fn.e,wr.C,le.H,Cl.p,On,vo,Io,yo,we.f],encapsulation:2,changeDetection:0})}function nm(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-organization-sidebar-workspace",7),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.handleWorkspaceCollapsedChange(o))})("cdkDragStarted",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.emitActiveChange(!0))})("cdkDragReleased",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.emitActiveChange(!1))}),e._UZ(2,"div",8),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.Tol(i.workspaceClass),e.Udp("margin-top",1,"px"),e.Q6J("cdkDragBoundary",".workspace-drag-boundary")("workspace",t)("cdkVerticalDragScrollContainerSelector","#organizationSidebarScrollContainer"),e.xp6(1),e.Udp("width",100,"%")("height",100,"%")}}function im(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",9),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_WORKSPACE_CREATION}))}),e._UZ(1,"t5s-svg",10),e.qZA()}if(2&a){const t=e.oxw(3);e.Udp("position","relative")("border-radius",4,"px")("padding","2px 2px")("transition","background 20ms ease-in"),e.Q6J("t5sTooltipV3",t.I18n.translate(t.i18n,t.I18n.key.sectionAddTooltip)),e.xp6(1),e.Q6J("size",16)("icon",t.IconPlusThick)("fgColor",t.rgba(t.Color.black,.45))}}function om(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-section",2),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleCollapsedChange(o))})("cdkDropListDropped",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.workspaceDropped(s,o))}),e.ALo(1,"push"),e.TgZ(2,"div",3),e.YNc(3,nm,3,11,"ng-container",4),e.qZA(),e.ynx(4,5),e.YNc(5,im,2,12,"button",6),e.ALo(6,"push"),e.BQk(),e.qZA()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.Q6J("cdkDropListDisabled",e.lcZ(1,9,i.workspaceReorderDisabled$))("label",i.I18n.translate(i.i18n,i.I18n.key.sectionTitle))("tooltip",i.workspacesSectionHeaderTooltip$)("isCollapsed",i.sectionCollapsed$),e.xp6(2),e.Udp("width",100,"%"),e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById),e.xp6(2),e.Q6J("ngIf",e.lcZ(6,11,i.showWorkspaceCreate$))}}function am(a,n){if(1&a&&(e.ynx(0),e.YNc(1,om,7,13,"t5s-organization-sidebar-section",1),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",t.length>0)}}class ko extends _e.A{constructor(n,t,i,o,s,l,d){super(),this.output$$=n,this.actor$=l,this.I18n=fe.Y0,this.IconPlusThick=y.NJo,this.OutputType=I,this.sectionCollapsed$=this.select((0,v.Cc)(["config","actor"]),(0,p.U)(({config:h,actor:m})=>m&&(h.workspacesSectionsCollapsed??[]).includes((0,Se.km)(m))),(0,w.x)()),this.workspaceReorderDisabled$=this.select((0,v.Cc)(["actor"]),(0,p.U)(({actor:h})=>h?.type!==un.g.USER||(0,qn.b1)()&&(0,qn.s2)()),(0,w.x)()),this.workspaces$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:h,actor:m})=>(0,ye.ni)({lookup:h,actor:m}))),this.workspacesWithMetadata$=(0,V.aj)([this.workspaces$,this.select((0,v.Cc)(["config","actor","lookup","router","settings"]))]).pipe((0,p.U)(([h,{config:m,router:C,lookup:S,actor:f,settings:E}])=>h.map(Z=>(0,ye.IQ)({workspace:Z,lookup:S,router:C,actor:f,section:ze.WORKSPACE,workspaceIdsCollapsed:m.workspaceIdsCollapsed??[]})).sort((Z,R)=>(0,ye.WV)({workspace1:Z,workspace2:R,i18n:this.i18n,workspaceIdsPositioned:E.workspaceIdsPositioned,actor:f})))),this.showWorkspaceCreate$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:h,actor:m})=>{const C=h.users.find(E=>E.id===(0,Se.m0)(m));if(!C)return!1;const S=C?.info?.role,f=h?.organization?.settings?.minimumOrganizationRoleForWorkspaceCreation;return(0,Ct.lp)(S,f||ue.UD.ORG_ADMIN)}),(0,w.x)()),this.workspaceClass=(0,x.I)({"~ .cdk-drag-preview":{...(0,c.mU)({background:(0,c.m4)(this.Color.black,.16)}),".organization-sidebar-workspace-hover":{opacity:1,maxWidth:"fit-content"}}}),this.workspacesSectionHeaderTooltip$=this.actor$.pipe((0,p.U)(({actor:h})=>this.I18n.translate(this.i18n,h.type===un.g.ORGANIZATION_SHARELINK?this.I18n.key.sectionTitleTooltipOrgShare:this.I18n.key.sectionTitleTooltip))),this.set({actor:null}),this.connect(l),this.connect(t),this.connect(i),this.connect(s),this.connect(o),d.nativeElement.classList.add((0,x.I)({".cdk-drag-placeholder":{opacity:0}
1,".cdk-drop-list-dragging":{cursor:"grabbing",...(0,c.XY)({pointerEvents:"none"})},".cdk-drop-list-dragging :not(.cdk-drag-placeholder)":{transition:"transform 220ms cubic-bezier(0, 0, 0.2, 1);"}}))}handleCollapsedChange({isCollapsed:n}){const{config:t,actor:i}=this.get();if(!i)return;let o=[...t.workspacesSectionsCollapsed??[]];n?o.push((0,Se.km)(i)):o=o.filter(s=>s!==(0,Se.km)(i)),this.output$$.next({type:I.CONFIG_CHANGE,config:{workspacesSectionsCollapsed:o}})}handleWorkspaceCollapsedChange({isCollapsed:n,workspaceId:t}){const{config:i,actor:o}=this.get();if(!o)return;let s=[...i.workspaceIdsCollapsed??[]];n?s.push({workspaceId:t,actorId:(0,Se.km)(o)}):s=s.filter(l=>!(l.workspaceId===t&&l.actorId===(0,Se.km)(o))),this.emitConfigChange({workspaceIdsCollapsed:s})}workspaceDropped(n,t){if(t.previousIndex===t.currentIndex)return;const{actor:i}=this.get(),o=(0,Se.m0)(i);if(!o)return;const s=n.map(l=>l.id);(0,Je.bA)(s,t.previousIndex,t.currentIndex),this.set({settings:{...this.get().settings,workspaceIdsPositioned:s}}),this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:o,workspaceIdsPositioned:s}})}emitConfigChange(n){this.output$$.next({type:I.CONFIG_CHANGE,config:n})}emitActiveChange(n){this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:n}})}static#e=this.\u0275fac=function(t){return new(t||ko)(e.Y36(He),e.Y36(Ut),e.Y36(Tn),e.Y36(dn),e.Y36(An),e.Y36(zt.h),e.Y36(e.SBq))};static#t=this.\u0275cmp=e.Xpm({type:ko,selectors:[["t5s-organization-sidebar-workspaces-section"]],features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["cdkDropList","","cdkDropListOrientation","vertical","cdkDropListLockAxis","y",3,"cdkDropListDisabled","label","tooltip","isCollapsed","isCollapsedChange","cdkDropListDropped",4,"ngIf"],["cdkDropList","","cdkDropListOrientation","vertical","cdkDropListLockAxis","y",3,"cdkDropListDisabled","label","tooltip","isCollapsed","isCollapsedChange","cdkDropListDropped"],[1,"workspace-drag-boundary-disabled"],[4,"ngFor","ngForOf","ngForTrackBy"],["organization-sidebar-section-buttons",""],["tabindex","-1","t5sClickableElement","",3,"t5sTooltipV3","position","border-radius","padding","transition","click",4,"ngIf"],["cdkDrag","","cdkVerticalDragScroll","","cdkDragLockAxis","y",3,"cdkDragBoundary","workspace","cdkVerticalDragScrollContainerSelector","isCollapsedChange","cdkDragStarted","cdkDragReleased"],["organization-sidebar-workspace-drag-handle","","cdkDragHandle",""],["tabindex","-1","t5sClickableElement","",3,"t5sTooltipV3","click"],[3,"size","icon","fgColor"]],template:function(t,i){1&t&&(e.YNc(0,am,2,1,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.workspacesWithMetadata$))},dependencies:[u.sg,u.O5,Je.Wj,Je.Zt,Je.Bh,mg.J,oe.v,it.i,le.H,gn,ei,u.Ov,we.f],encapsulation:2,changeDetection:0})}var Ar=r(96897),Qt=(()=>{return(a=Qt||(Qt={})).BLAB_DEF="BLAB_DEF",a.BLAB_ITEM="BLAB_ITEM",a.SHOW_MORE="SHOW_MORE",Qt;var a})(),fn=r(54650);function Ur(a,{userId:n,lookup:t,router:i,canDrag:o}){if(a)switch(a.type){case fn.l.SHARED_BLAB_DEF:{const s=a.blabDef,l=(0,ye.BK)({section:ze.SHARED,blabDef:s,lookup:t,router:i,canCreateBlabItem:s.info?.type===to.a.DATABASE&&(0,H.Tp)({blabDefId:s.id,userId:n,lookup:t,traceId:"shared-section"})});return{id:"shared-blab-def-"+s.id,type:Qt.BLAB_DEF,blabDefId:s.id,blabDef:l,canDrag:o}}case fn.l.SHARED_BLAB_ITEM:{const s=a.blabItem,l=(0,ye.Um)({section:ze.SHARED,blabItem:s,lookup:t,router:i});return{id:"shared-blab-item-"+s.id,type:Qt.BLAB_ITEM,blabItemId:s.id,blabItem:l,canDrag:o}}}}class wo extends hn.R{constructor(n,t,i,o,s){super(),this.dnd=t,this.elRef=i,this.output$$=o,this.settings$=s,this.connect(n)}set sharedContent(n){this.setProperty("sharedContent",n)}ngAfterViewInit(){this.source=this.dnd.dragSource(ze.SHARED,{beginDrag:()=>this.get().sharedContent,canDrag:()=>this.get().sharedContent.canDrag});const n=this.elRef.nativeElement;this.source?.connectDragPreview(n),this.source?.connectDragSource(n,{dropEffect:"move"}),this.target=this.dnd.dropTarget(ze.SHARED,{drop:t=>{const i=t.getItem(),o=this.get().sharedContent;if(!i)return;const l=function rm({operation:a,sourceSharedContent:n,targetSharedContent:t,settings:i,activeUserId:o}){if(!o||!n||!t)return;const s=n.id,l=(i.pinnedSharedContent??[]).findIndex(C=>(0,ye.Y2)(C)===s),d=t.id,h=(i.pinnedSharedContent??[]).findIndex(C=>(0,ye.Y2)(C)===d),m=[...i.pinnedSharedContent??[]];if(l>h)(0,Je.bA)(m,l,"ABOVE"===a?h:h+1);else{if(!(l<h))return;(0,Je.bA)(m,l,"ABOVE"===a?h-1:h)}return{type:I.USER_SETTINGS_CHANGE,settings:{userId:o,pinnedSharedContent:m}}}({operation:this.getDraggingOperation(t),sourceSharedContent:i,targetSharedContent:o,activeUserId:this.get().activeUserId,settings:this.settings$.getValue()});l&&this.output$$.next(l)},hover:t=>{if(t.isOver({shallow:!0})){const i=(0,c.VD)(Ma);if("ABOVE"===this.getDraggingOperation(t))return void this.elRef.nativeElement?.style.setProperty("box-shadow",`0px -2.5px 0px 0px ${i}, inset 0px 1.5px 0px 0px ${i}`);"BELOW"===this.getDraggingOperation(t)&&this.elRef.nativeElement?.style.setProperty("box-shadow",`inset 0px -1.5px 0px 0px ${i}, 0px 2.5px 0px 0px ${i}`)}}}),this.hold(this.target.listen(t=>!t.isOver({shallow:!0})).pipe((0,w.x)(),(0,en.V)()),()=>{this.elRef.nativeElement?.style.removeProperty("box-shadow")}),this.target.connectDropTarget(this.elRef.nativeElement)}getDraggingOperation(n){const t=this.elRef.nativeElement.getBoundingClientRect(),i=.5*(t.bottom-t.top);return(n.getClientOffset()?.y??0)-t.top<i?"ABOVE":"BELOW"}ngOnDestroy(){super.ngOnDestroy(),this.source?.unsubscribe(),this.target?.unsubscribe()}static#e=this.\u0275fac=function(t){return new(t||wo)(e.Y36(Tt.z),e.Y36(po.cx),e.Y36(e.SBq),e.Y36(He),e.Y36(Kn))};static#t=this.\u0275dir=e.lG2({type:wo,selectors:[["","t5sOrganizationSidebarSharedDragDrop",""]],inputs:{sharedContent:["t5sOrganizationSidebarSharedDragDrop","sharedContent"]},exportAs:["t5sOrganizationSidebarSharedDragDrop"],features:[e.qOj]})}var je=(()=>{return(a=je||(je={})).SHARED_BLAB_DEF="SHARED_BLAB_DEF",a.SHARED_BLAB_ITEM="SHARED_BLAB_ITEM",a.CATEGORY_HEADLINE="CATEGORY_HEADLINE",je;var a})();function lm({blabDef:a,lookup:n}){const t=a.info?.permissionSettingsLastModifiedByUserId;return t?n.users.find(i=>i.id===t):void 0}function cm({blabItem:a,lookup:n}){const t=a.info?.permissionSettingsLastModifiedByUserId;return t?n.users.find(i=>i.id===t):void 0}function La(a,{lookup:n,i18n:t}){if(a)switch(a.type){case fn.l.SHARED_BLAB_DEF:{const i=a.blabDef;return{id:"shared-blab-def-"+i.id,type:je.SHARED_BLAB_DEF,displayName:(0,H.fM)({blabDef:i,i18n:t}),blabDef:i,sharedByUser:lm({blabDef:i,lookup:n})}}case fn.l.SHARED_BLAB_ITEM:{const i=a.blabItem;return{id:"shared-blab-item-"+i.id,type:je.SHARED_BLAB_ITEM,displayName:(0,bt.iG)({blabItemId:i.id,lookup:n,i18n:t}),blabItem:i,blabDef:(0,H.Kz)({blabDefs:n,blabDefId:i.blabDefId}),sharedByUser:cm({blabItem:i,lookup:n})}}}}const _m=["searchInput"];function um(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",8),e.NdJ("mousedown",function(o){return o.preventDefault()})("click",function(){e.CHM(t);const o=e.oxw(),s=e.MAs(4);return o.set({searchQuery:""}),s.value="",e.KtG(s.focus())}),e._UZ(1,"t5s-svg",2),e.qZA()}if(2&a){const t=e.oxw();e.Udp("border-radius",9999,"px")("position","absolute")("top",7,"px")("right",9,"px"),e.xp6(1),e.Q6J("size",14)("icon",t.IconClearInput)("fgColor",t.rgba(t.Color.black,.35))}}function hm(a,n){if(1&a&&(e.TgZ(0,"div")(1,"div"),e._UZ(2,"t5s-svg",2),e.qZA(),e.TgZ(3,"div"),e._uU(4),e.qZA()()),2&a){const t=e.oxw(3);
1e.Udp("text-align","center")("padding","0px 20px")("display","flex")("flex-direction","column")("align-items","center")("justify-content","center")("height",100,"%")("min-height",200,"px"),e.xp6(1),e.Udp("padding-bottom",12,"px"),e.xp6(1),e.Q6J("size",36)("icon",t.IconPaperAirplane)("fgColor",t.rgba(t.Color.black,.35)),e.xp6(1),e.Udp("font-size",14,"px")("color",t.rgba(t.Color.black,.65))("max-width",260,"px")("font-weight",500),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.overlay.sharedContentPlaceholder)," ")}}const Hl=function(a,n){return{user:a,i18n:n}};function gm(a,n){if(1&a&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e._UZ(3,"t5s-user-profile-picture",21),e.TgZ(4,"span"),e._uU(5),e.qZA(),e._UZ(6,"span"),e.qZA()),2&a){const t=e.oxw(2).$implicit,i=e.oxw(5);e.Udp("display","flex")("flex-direction","row")("align-items","center")("font-size",12,"px")("line-height",16,"px")("font-weight",500),e.xp6(1),e.Udp("color",i.rgba(i.Color.white,.5)),e.xp6(1),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.overlay.blabDefTooltip.sharedBy)),e.xp6(1),e.Udp("margin-left",4,"px")("align-self","center"),e.Q6J("size",16)("hasShadow",!1)("hostSizing",!1)("hasBorder",!1)("backgroundColor","transparent")("user",t.sharedByUser),e.xp6(1),e.Udp("margin-left",2,"px")("color",i.rgba(i.Color.white,.9)),e.xp6(1),e.hij(" ",i.getUserDisplayName(e.WLB(32,Hl,t.sharedByUser,i.i18n))," "),e.xp6(1),e.Udp("color",i.rgba(i.Color.white,.5))}}const Vl=function(a,n){return{pinnedSharedContent:a,blabDef:n}};function mm(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",15),e.NdJ("mousemove",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(5);return e.KtG(s.set({activeIndex:o.index}))}),e.TgZ(2,"button",16),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(6);return e.KtG(o.handleConfirmIndex())}),e.qZA(),e._UZ(3,"t5s-blab-def-icon",17),e.TgZ(4,"div")(5,"div",18),e._uU(6),e.qZA()(),e.TgZ(7,"button",19),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(4).ngIf,l=e.oxw();return e.KtG(l.handlePinButtonClick({listItem:o,pinnedSharedContent:s}))}),e._UZ(8,"t5s-svg",2),e.qZA()(),e.YNc(9,gm,7,35,"ng-template",null,20,e.W1O),e.BQk()}if(2&a){const t=e.MAs(10),i=e.oxw().$implicit,o=e.oxw(2).ngIf,s=e.oxw(2).ngIf,l=e.oxw();e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("padding","2px 10px")("height",28,"px")("border-radius",4,"px")("width","calc(100% - 8px)")("margin","0px 4px"),e.Q6J("t5sTooltipV3",t)("tooltipPosition","right")("isActive",o.activeIndex===i.index)("disableHover",!0),e.xp6(2),e.Udp("margin-top",1,"px")("margin-right",10,"px"),e.Q6J("size",18)("blabDef",i.blabDef),e.xp6(1),e.Udp("flex",1)("min-width",0,"px"),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("font-size",14,"px")("line-height",18,"px")("color",l.Color.black),e.Q6J("title",i.displayName),e.xp6(1),e.hij(" ",i.displayName,""),e.xp6(1),e.Udp("position","relative")("visibility",o.activeIndex===i.index||l.isBlabDefPinned(e.WLB(63,Vl,s,i.blabDef))?"visible":"hidden")("width",24,"px")("height",24,"px")("border-radius",4,"px")("display","flex")("align-items","center")("justify-content","center"),e.xp6(1),e.Q6J("size",16)("icon",l.isBlabDefPinned(e.WLB(66,Vl,s,i.blabDef))?l.IconPinFilled:l.IconPin)("fgColor",l.rgba(l.Color.black,.45))}}function fm(a,n){if(1&a&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e._UZ(3,"t5s-user-profile-picture",21),e.TgZ(4,"span"),e._uU(5),e.qZA(),e._UZ(6,"span"),e.qZA()),2&a){const t=e.oxw(2).$implicit,i=e.oxw(5);e.Udp("display","flex")("flex-direction","row")("align-items","center")("font-size",12,"px")("line-height",16,"px")("font-weight",500),e.xp6(1),e.Udp("color",i.rgba(i.Color.white,.5)),e.xp6(1),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.overlay.blabDefTooltip.sharedBy)),e.xp6(1),e.Udp("margin-left",4,"px")("align-self","center"),e.Q6J("size",16)("hasShadow",!1)("hostSizing",!1)("hasBorder",!1)("backgroundColor","transparent")("user",t.sharedByUser),e.xp6(1),e.Udp("margin-left",2,"px")("color",i.rgba(i.Color.white,.9)),e.xp6(1),e.hij(" ",i.getUserDisplayName(e.WLB(32,Hl,t.sharedByUser,i.i18n))," "),e.xp6(1),e.Udp("color",i.rgba(i.Color.white,.5))}}const Wl=function(a,n){return{pinnedSharedContent:a,blabItem:n}};function xm(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",15),e.NdJ("mousemove",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(5);return e.KtG(s.set({activeIndex:o.index}))}),e.TgZ(2,"button",16),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(6);return e.KtG(o.handleConfirmIndex())}),e.qZA(),e._UZ(3,"t5s-blab-item-icon",17),e.TgZ(4,"div")(5,"div",18),e._uU(6),e.qZA()(),e.TgZ(7,"button",19),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(4).ngIf,l=e.oxw();return e.KtG(l.handlePinButtonClick({listItem:o,pinnedSharedContent:s}))}),e._UZ(8,"t5s-svg",2),e.qZA()(),e.YNc(9,fm,7,35,"ng-template",null,22,e.W1O),e.BQk()}if(2&a){const t=e.MAs(10),i=e.oxw().$implicit,o=e.oxw(2).ngIf,s=e.oxw(2).ngIf,l=e.oxw();e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("padding","2px 10px")("height",28,"px")("border-radius",4,"px")("width","calc(100% - 8px)")("margin","0px 4px"),e.Q6J("t5sTooltipV3",t)("tooltipPosition","right")("isActive",o.activeIndex===i.index)("disableHover",!0),e.xp6(2),e.Udp("margin-top",1,"px")("margin-right",10,"px"),e.Q6J("size",18)("blabDef",i.blabDef),e.xp6(1),e.Udp("flex",1)("min-width",0,"px"),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("font-size",14,"px")("line-height",18,"px")("color",l.Color.black),e.Q6J("title",i.displayName),e.xp6(1),e.hij(" ",i.displayName,""),e.xp6(1),e.Udp("position","relative")("visibility",o.activeIndex===i.index||l.isBlabItemPinned(e.WLB(63,Wl,s,i.blabItem))?"visible":"hidden")("width",24,"px")("height",24,"px")("border-radius",4,"px")("display","flex")("align-items","center")("justify-content","center"),e.xp6(1),e.Q6J("size",16)("icon",l.isBlabItemPinned(e.WLB(66,Wl,s,i.blabItem))?l.IconPinFilled:l.IconPin)("fgColor",l.rgba(l.Color.black,.45))}}function bm(a,n){if(1&a&&e._UZ(0,"div"),2&a){const t=e.oxw(7);e.Udp("box-shadow",t.rgba(t.Color.black,.09)+" 0px -1px 0px")("height",1,"px")("padding-top",12,"px")("padding-bottom",6,"px")}}function Cm(a,n){if(1&a&&(e.ynx(0),e.YNc(1,bm,1,8,"div",23),e.TgZ(2,"div"),e._uU(3),e.qZA(),e.BQk()),2&a){const t=e.oxw(),i=t.first,o=t.$implicit,s=e.oxw(5);e.xp6(1),e.Q6J("ngIf",!i),e.xp6(1),e.Udp("width",100,"%")("padding","6px 14px 8px")("font-weight",500)("font-size",12,"px")("line-height",16,"px")("color",s.rgba(s.Color.black,.65))("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("user-select","none"),e.xp6(1),e.hij(" ",o.label," ")}}function vm(a,n){if(1&a&&(e.ynx(0)(1,13),e.YNc(2,mm,11,69,"ng-container",14),e.YNc(3,xm,11,69,"ng-container",14),e.YNc(4,Cm,4,22,"ng-container",5),e.BQk()()),2&a){const t=n.$implicit,i=e.oxw(5);e.xp6(1),e.Q6J("ngSwitch",t.type),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.SHARED_BLAB_DEF),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.SHARED_BLAB_ITEM),e.xp6(1),e.Q6J("ngIf",t.type===i.ListItemType.CATEGORY_HEADLINE)}}function Im(a,n){if(1&a&&(e.TgZ(0,"cdk-virtual-scroll-viewport",11),e._UZ(1,"div"),e.YNc(2,vm,5,4,"ng-container",12),e._UZ(3,"div"),e.qZA()),2&a){const t=e.oxw(2).ngIf,i=e.oxw(2);
1e.Udp("overflow-x","hidden")("height",t.scrollContainerHeight,"px")("max-height","min(40vh, 430px)"),e.Q6J("itemSize",t.itemSize),e.xp6(1),e.Udp("height",6,"px"),e.xp6(1),e.Q6J("cdkVirtualForOf",t.listItems)("cdkVirtualForTrackBy",i.trackById),e.xp6(1),e.Udp("height",6,"px")}}function ym(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Im,4,13,"cdk-virtual-scroll-viewport",10),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("ngIf",t.listItems.length>0)}}function km(a,n){if(1&a&&(e.ynx(0),e.YNc(1,hm,5,30,"div",9),e.YNc(2,ym,2,1,"ng-container",5),e.ALo(3,"push"),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",0===t.listItems.length),e.xp6(1),e.Q6J("ngIf",e.lcZ(3,2,i.activeIndexWrapper$))}}function wm(a,n){if(1&a&&(e.ynx(0),e.YNc(1,km,4,4,"ng-container",5),e.ALo(2,"push"),e.BQk()),2&a){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t.listItemsWrapper$))}}class So extends _e.A{constructor(n,t,i,o){super(),this.output$$=t,this.I18n=fe.Tg,this.ListItemType=je,this.IconHelp=y.T08,this.IconSearch=y.jVj,this.IconClearInput=y.YvQ,this.IconPin=y.DgX,this.IconPinFilled=y.YW7,this.IconPaperAirplane=y.Ga1,this.getUserDisplayName=$e.b3,this.getWorkspaceDisplayName=Ge.c8,this.closeClick=new e.vpe,this.hasSearchQuery$=this.select((0,v.Cc)(["searchQuery"]),(0,p.U)(({searchQuery:s})=>!!s)),this.listItemsWrapper$=this.select((0,v.Cc)(["lookup","activeUserId","searchQuery"]),(0,p.U)(({lookup:s,activeUserId:l,searchQuery:d})=>{const h=function dm({userId:a,lookup:n,searchQuery:t,i18n:i}){if(!a)return[];const o=(0,ye.i7)({userId:a,lookup:n});if(t?.trim())return function pm({listItems:a,searchQuery:n}){return n?.trim()?ge.T.filter(n.trim(),a,{extract:t=>t.displayName}).sort(({score:t},{score:i})=>i-t).map(({original:t})=>t):a}({listItems:o.map(m=>La(m,{lookup:n,i18n:i})).filter(ee.lm),searchQuery:t}).map((m,C)=>({...m,index:C}));const s=(0,ye.wo)(o.sort((m,C)=>(0,ye.Fx)(m,C))),l=s.today.map(m=>La(m,{lookup:n,i18n:i})).filter(ee.lm),d=s.pastWeek.map(m=>La(m,{lookup:n,i18n:i})).filter(ee.lm),h=s.earlier.map(m=>La(m,{lookup:n,i18n:i})).filter(ee.lm);return[...l,...d,...h].forEach((m,C)=>{m.index=C}),[...l.length>0?[{id:"shared-today-headline",type:je.CATEGORY_HEADLINE,label:fe.Tg.translate(i,fe.Tg.key.overlay.sharedAt.today)}]:[],...l,...d.length>0?[{id:"shared-past-week-headline",type:je.CATEGORY_HEADLINE,label:fe.Tg.translate(i,fe.Tg.key.overlay.sharedAt.pastWeek)}]:[],...d,...h.length>0?[{id:"shared-earlier-headline",type:je.CATEGORY_HEADLINE,label:fe.Tg.translate(i,fe.Tg.key.overlay.sharedAt.earlier)}]:[],...h]}({lookup:s,searchQuery:d,userId:l,i18n:this.i18n});return this.set({listItems:h}),{listItems:h,scrollContainerHeight:this.getScrollContainerHeight(h),itemSize:this.getAverageEntryHeight(h)}})),this.activeIndexWrapper$=this.select((0,v.Cc)(["activeIndex"])),this.pinnedSharedContent$=this.select((0,v.Cc)(["settings","lookup","activeUserId"]),(0,p.U)(({settings:s,lookup:l,activeUserId:d})=>s.pinnedSharedContent?s.pinnedSharedContent:(0,ye.i7)({userId:d,lookup:l}).sort((m,C)=>(0,ye.Fx)(m,C)).slice(0,7).map(m=>{switch(m.type){case fn.l.SHARED_BLAB_DEF:return{type:ue.om.BLAB_DEF,blabDefId:m.blabDef.id};case fn.l.SHARED_BLAB_ITEM:return{type:ue.om.BLAB_ITEM,blabItemId:m.blabItem.id}}})),(0,Rt.K)()),this.set({searchQuery:"",activeUserId:null,activeIndex:0,listItems:[]}),this.connect(n),this.connect(i),this.connect(o),setTimeout(()=>this.output$$.next({type:I.SHARED_CONTENT_RETRIEVE})),this.hold(this.select((0,v.Cc)(["searchQuery"]),(0,p.U)(({searchQuery:s})=>s),(0,w.x)(),(0,go.T)(1),(0,lt.b)(1e3)),s=>{this.output$$.next({type:I.SHARED_CONTENT_RETRIEVE,searchQuery:s})})}set lookup(n){this.setProperty("lookup",n)}getListItemHeight(n,t){switch(n.type){case je.SHARED_BLAB_DEF:case je.SHARED_BLAB_ITEM:return 28;case je.CATEGORY_HEADLINE:return 0===t?30:49}return 28}getScrollContainerHeight(n){return n.reduce((t,i,o)=>t+this.getListItemHeight(i,o),0)+6+6}getContentHeight(n){return n.reduce((t,i,o)=>t+this.getListItemHeight(i,o),0)}getAverageEntryHeight(n){return this.getScrollContainerHeight(n)/n.length}handleSearchQueryChange({searchQuery:n}){this.set({searchQuery:n,activeIndex:0}),this.cdkViewport?.scrollTo({top:0})}handleIndexChange(n,t){n.preventDefault(),n.stopPropagation();const{listItems:i,activeIndex:o}=this.get(),s=this.getSelectableListItems(i),l=(o+t+s.length)%s.length;this.set({activeIndex:l});const d=this.cdkViewport?.getElementRef()?.nativeElement?.getBoundingClientRect()?.height||430,h=this.getContentHeight(i.slice(0,l+1)),m=this.getListItemHeight(i[l],l),C=Math.max(0,h+m/2-d/2);this.cdkViewport?.scrollTo({behavior:"auto",top:C})}handleCloseOverlay(){this.closeClick.emit()}handleSpaceKeydown(n){(n.target.value??"").trim()||(n.preventDefault(),n.stopPropagation())}handleSpaceKeyup(n){(n.target.value??"").trim()||(n.preventDefault(),n.stopPropagation(),this.handleConfirmIndex())}handleConfirmIndex(){const{listItems:n,activeIndex:t}=this.get(),o=this.getSelectableListItems(n)[t];this.handleListItemClick(o),this.closeClick.emit()}handleListItemClick(n){switch(n?.type){case je.SHARED_BLAB_DEF:this.emitOpenBlabDef(n.blabDef);break;case je.SHARED_BLAB_ITEM:this.emitOpenBlabItem(n.blabItem)}}handlePinButtonClick({listItem:n,pinnedSharedContent:t}){const{activeUserId:i}=this.get();if(i)switch(n.type){case je.SHARED_BLAB_DEF:{const o=n.blabDef.id,s=t.findIndex(l=>l.type===ue.om.BLAB_DEF&&l.blabDefId===o);-1===s?t.unshift({type:ue.om.BLAB_DEF,blabDefId:o}):t.splice(s,1),this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:i,pinnedSharedContent:t}});break}case je.SHARED_BLAB_ITEM:{const o=n.blabItem.id,s=t.findIndex(l=>l.type===ue.om.BLAB_ITEM&&l.blabItemId===o);-1===s?t.unshift({type:ue.om.BLAB_ITEM,blabItemId:o}):t.splice(s,1),this.output$$.next({type:I.USER_SETTINGS_CHANGE,settings:{userId:i,pinnedSharedContent:t}});break}}}isBlabDefPinned({pinnedSharedContent:n,blabDef:t}){const i=t.id;return n?.some(o=>o.type===ue.om.BLAB_DEF&&o.blabDefId===i)}isBlabItemPinned({pinnedSharedContent:n,blabItem:t}){const i=t.id;return n?.some(o=>o.type===ue.om.BLAB_ITEM&&o.blabItemId===i)}emitOpenBlabDef(n){this.output$$.next({type:I.OPEN_BLAB_DEF,blabDef:n})}emitOpenBlabItem(n){this.output$$.next({type:I.OPEN_BLAB_ITEM,blabItem:n})}getSelectableListItems(n){return n.filter(t=>t.type!==je.CATEGORY_HEADLINE)}static#e=this.\u0275fac=function(t){return new(t||So)(e.Y36(Tt.z),e.Y36(He),e.Y36(Ut),e.Y36(dn))};static#t=this.\u0275cmp=e.Xpm({type:So,selectors:[["t5s-organization-sidebar-shared-content-overlay"]],viewQuery:function(t,i){if(1&t&&(e.Gf(_m,5),e.Gf(ve.N7,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.searchInput=o.first),e.iGM(o=e.CRH())&&(i.cdkViewport=o.first)}},inputs:{lookup:"lookup"},outputs:{closeClick:"closeClick"},features:[e.qOj],decls:16,vars:86,consts:[["t5sInputElement","","t5sInputElementBorder","",3,"placeholder","valueChange","t5sElementRendered","keydown.escape","keydown.arrowdown","keydown.arrowup","keydown.enter","keydown.tab","keydown.shift.tab","keydown.space","keyup.space"],["searchInput",""],[3,"size","icon","fgColor"],["t5sClickableElement","",3,"border-radius","position","top","right","mousedown","click",4,"ngIf"],[3,"mousedown"],[4,"ngIf"],["t5sClickableElement","","href","https://help.tapeapp.com/en/articles/6423664-sharing-permissions#h_1ee97bec64","target","_blank","draggable","false",3,"keydown.space","keyup.space","keydown.enter"],[3,"icon","size","fgColor"],["t5sClickableElement","",3,"mousedown","click"],[3,"text-align","padding","display","flex-direction","align-items","justify-content","height","min-height",4,"ngIf"],["t5sVerticalVirtualScrollViewport","","t5sDynamicHeightVirtualScrollViewport","",3,"overflowX","height","max-height","itemSize",4,"ngIf"],["t5sVerticalVirtualScrollViewport","","t5sDynamicHeightVirtualScrollViewport","",3,"itemSize"],[4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[3,"ngSwitch"],[4,"ngSwitchCase"],["t5sClickableBackgroun
1dElement","",3,"t5sTooltipV3","tooltipPosition","isActive","disableHover","mousemove"],[3,"click"],[3,"size","blabDef"],[3,"title"],["t5sClickableElement","",3,"click"],["blabDefTooltip",""],[3,"size","hasShadow","hostSizing","hasBorder","backgroundColor","user"],["blabItemTooltip",""],[3,"box-shadow","height","padding-top","padding-bottom",4,"ngIf"]],template:function(t,i){1&t&&(e.TgZ(0,"div")(1,"div")(2,"div")(3,"input",0,1),e.NdJ("valueChange",function(s){return i.set({searchQuery:s.value})})("t5sElementRendered",function(s){return s.element.focus({preventScroll:!0})})("valueChange",function(s){return i.handleSearchQueryChange({searchQuery:s.value})})("keydown.escape",function(s){return s.preventDefault(),s.stopPropagation(),i.closeClick.emit()})("keydown.arrowdown",function(s){return i.handleIndexChange(s,1)})("keydown.arrowup",function(s){return i.handleIndexChange(s,-1)})("keydown.enter",function(s){return s.preventDefault(),s.stopPropagation(),i.handleConfirmIndex()})("keydown.tab",function(s){return i.handleIndexChange(s,1)})("keydown.shift.tab",function(s){return i.handleIndexChange(s,-1)})("keydown.space",function(s){return i.handleSpaceKeydown(s)})("keyup.space",function(s){return i.handleSpaceKeyup(s)}),e.qZA(),e._UZ(5,"t5s-svg",2),e.YNc(6,um,2,11,"button",3),e.ALo(7,"push"),e.qZA()(),e.TgZ(8,"div",4),e.NdJ("mousedown",function(s){return s.preventDefault()}),e.YNc(9,wm,3,3,"ng-container",5),e.ALo(10,"push"),e.qZA(),e.TgZ(11,"div",4),e.NdJ("mousedown",function(s){return s.preventDefault()}),e.TgZ(12,"a",6),e.NdJ("keydown.space",function(s){return s.preventDefault()})("keyup.space",function(s){return null==s.target?null:s.target.click()})("keydown.enter",function(s){return null==s.target?null:s.target.click()}),e._UZ(13,"t5s-svg",7),e.TgZ(14,"span"),e._uU(15),e.qZA()()()()),2&t&&(e.Udp("width",320,"px")("display","flex")("flex-direction","column"),e.xp6(1),e.Udp("width",100,"%")("padding","12px 12px 6px 12px"),e.xp6(1),e.Udp("position","relative")("width",100,"%"),e.xp6(1),e.Udp("width",100,"%")("font-size",14,"px")("line-height",18,"px")("background-color",i.rgba(i.Color.grey1,.6))("padding","5px 31px 5px 31px")("border-radius",4,"px"),e.Q6J("placeholder",i.I18n.translate(i.i18n,i.I18n.key.overlay.searchInputPlaceholder)),e.xp6(2),e.Udp("position","absolute")("pointer-events","none")("top",5,"px")("left",7,"px"),e.Q6J("size",18)("icon",i.IconSearch)("fgColor",i.rgba(i.Color.black,.45)),e.xp6(1),e.Q6J("ngIf",e.lcZ(7,82,i.hasSearchQuery$)),e.xp6(2),e.Udp("flex",1)("width",100,"%"),e.xp6(1),e.Q6J("ngIf",e.lcZ(10,84,i.pinnedSharedContent$)),e.xp6(2),e.Udp("width",100,"%")("padding","4px 4px")("border-top","1px solid "+i.rgba(i.Color.black,.09)),e.xp6(1),e.Udp("display","flex")("width",100,"%")("flex-direction","row")("align-items","center")("padding","3px 6px")("height","fit-content")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("border-radius",4,"px"),e.xp6(1),e.Q6J("icon",i.IconHelp)("size",15)("fgColor",i.rgba(i.Color.black,.35)),e.xp6(1),e.Udp("margin-left",4,"px")("font-size",12,"px")("line-height",16,"px")("color",i.rgba(i.Color.black,.5)),e.xp6(1),e.hij(" ",i.I18n.translate(i.i18n,i.I18n.key.overlay.helpLinkLabel)," "))},dependencies:[u.O5,u.RF,u.n9,zn.y,Ki.E,oe.v,Un.x,wn.v,it.i,le.H,Qn.p,io.n,_a.p,ve.xd,ve.x0,ve.N7,pa.R,da.H,we.f],encapsulation:2,changeDetection:0})}const Sm=["menuTrigger"];function Tm(a,n){if(1&a&&e._UZ(0,"t5s-organization-sidebar-blab-def",9),2&a){const t=e.oxw().$implicit,i=e.oxw(3);e.Q6J("blabDef",i.getListItemBlabDef(t))("t5sOrganizationSidebarSharedDragDrop",t)}}function Am(a,n){if(1&a&&e._UZ(0,"t5s-organization-sidebar-blab-item",10),2&a){const t=e.oxw().$implicit,i=e.oxw(3);e.Q6J("blabItem",i.getListItemBlabItem(t))("t5sOrganizationSidebarSharedDragDrop",t)}}function Um(a,n){if(1&a&&(e.ynx(0)(1,6),e.YNc(2,Tm,1,2,"t5s-organization-sidebar-blab-def",7),e.YNc(3,Am,1,2,"t5s-organization-sidebar-blab-item",8),e.BQk()()),2&a){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.Q6J("ngSwitch",t.type),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_DEF),e.xp6(1),e.Q6J("ngSwitchCase",i.ListItemType.BLAB_ITEM)}}
1function Om(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",11,12),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.handleMenuOpenChange(o.menuOpen))}),e._uU(2),e.qZA()}if(2&a){e.oxw();const t=e.MAs(4),i=e.oxw().ngIf,o=e.oxw();e.Udp("width","calc(100% - 8px)")("margin","0px 4px")("padding","5.5px 15px")("border-radius",4,"px")("font-weight",500)("font-size",12,"px")("line-height",16,"px")("color",o.rgba(o.Color.black,.5))("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("user-select","none"),e.Q6J("t5sMenuOverlay",t)("menuOverlayPosition","center-right")("menuOverlayAutofocus",!1),e.xp6(2),e.hij(" ",i.showMore.label," ")}}function Em(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-shared-content-overlay",13),e.NdJ("closeClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(null==o.menuTrigger?null:o.menuTrigger.closeOverlay())}),e.qZA()}}function Dm(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-section",2),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleCollapsedChange(o))}),e.YNc(1,Um,4,3,"ng-container",3),e.YNc(2,Om,3,28,"button",4),e.YNc(3,Em,1,0,"ng-template",null,5,e.W1O),e.qZA()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.Q6J("label",i.I18n.translate(i.i18n,i.I18n.key.sectionTitle))("tooltip",i.I18n.translate(i.i18n,i.I18n.key.sectionTitleTooltip))("isCollapsed",i.sectionCollapsed$),e.xp6(1),e.Q6J("ngForOf",t.listItems)("ngForTrackBy",i.trackById),e.xp6(1),e.Q6J("ngIf",t.showMore)}}function Bm(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Dm,5,6,"t5s-organization-sidebar-section",1),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",t.listItems.length>0||t.showMore)}}class To extends _e.A{constructor(n,t,i,o,s,l){super(),this.output$$=t,this.I18n=fe.Tg,this.ListItemType=Qt,this.SectionType=ze,this.sectionCollapsed$=this.select((0,v.Cc)(["config","actor"]),(0,p.U)(({config:d,actor:h})=>h&&(d.sharedSectionsCollapsed??[]).includes((0,Se.km)(h))),(0,w.x)()),this.settings$=this.select((0,v.Cc)(["settings"]),(0,p.U)(({settings:d})=>d)),this.listItemsWrapper$=this.select((0,v.Cc)(["lookup","actor","router","settings"]),(0,Nl.Ah)(250),(0,p.U)(({lookup:d,actor:h,router:m,settings:C})=>function sm({userId:a,lookup:n,router:t,settings:i,i18n:o}){if(!a)return{listItems:[]};const s=(0,ye.i7)({userId:a,lookup:n});if(i.pinnedSharedContent){const h=i.pinnedSharedContent.map(C=>{switch(C.type){case ue.om.BLAB_DEF:return Ur(s.find(f=>f.type===fn.l.SHARED_BLAB_DEF&&f.blabDef.id===C.blabDefId),{userId:a,lookup:n,router:t,canDrag:!0});case ue.om.BLAB_ITEM:return Ur(s.find(f=>f.type===fn.l.SHARED_BLAB_ITEM&&f.blabItem.id===C.blabItemId),{userId:a,lookup:n,router:t,canDrag:!0})}}).filter(ee.lm);return 0===s.length?{listItems:h}:{listItems:h,showMore:{id:"show-more",type:Qt.SHOW_MORE,label:fe.Tg.translate(o,{key:fe.Tg.key.moreLabel,params:{count:s.length-h.length}})}}}const l=s.sort((h,m)=>(0,ye.Fx)(h,m)).slice(0,7).map(h=>Ur(h,{userId:a,lookup:n,router:t,canDrag:!1})).filter(ee.lm),d={id:"show-more",type:Qt.SHOW_MORE,label:fe.Tg.translate(o,{key:fe.Tg.key.moreLabel,params:{count:s.length-l.length}})};return{listItems:l,showMore:s.length>l.length?d:void 0}}({userId:(0,Se.m0)(h),lookup:d,router:m,settings:C,i18n:this.i18n}))),this.connect(n),this.connect(o),this.connect(i),this.connect(s),this.connect(l)}handleCollapsedChange({isCollapsed:n}){const{config:t,actor:i}=this.get();if(!i)return;let o=[...t.sharedSectionsCollapsed??[]];n?o.push((0,Se.km)(i)):o=o.filter(s=>s!==(0,Se.km)(i)),this.output$$.next({type:I.CONFIG_CHANGE,config:{sharedSectionsCollapsed:o}})}handleMenuOpenChange(n){this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:n}})}getListItemBlabDef(n){return n.type===Qt.BLAB_DEF?n.blabDef:void 0}getListItemBlabItem(n){return n.type===Qt.BLAB_ITEM?n.blabItem:void 0}static#e=this.\u0275fac=function(t){return new(t||To)(e.Y36(zt.h),e.Y36(He),e.Y36(Tn),e.Y36(Ut),e.Y36(An),e.Y36(dn))};static#t=this.\u0275cmp=e.Xpm({type:To,selectors:[["t5s-organization-sidebar-shared-section"]],viewQuery:function(t,i){if(1&t&&e.Gf(Sm,5),2&t){let o;e.iGM(o=e.CRH())&&(i.menuTrigger=o.first)}},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"label","tooltip","isCollapsed","isCollapsedChange",4,"ngIf"],[3,"label","tooltip","isCollapsed","isCollapsedChange"],[4,"ngFor","ngForOf","ngForTrackBy"],["t5sClickableElement","",3,"t5sMenuOverlay","menuOverlayPosition","menuOverlayAutofocus","width","margin","padding","border-radius","font-weight","font-size","line-height","color","white-space","overflow","text-overflow","user-select","menuOpenChange",4,"ngIf"],["sharedContentOverlay",""],[3,"ngSwitch"],[3,"blabDef","t5sOrganizationSidebarSharedDragDrop",4,"ngSwitchCase"],[3,"blabItem","t5sOrganizationSidebarSharedDragDrop",4,"ngSwitchCase"],[3,"blabDef","t5sOrganizationSidebarSharedDragDrop"],[3,"blabItem","t5sOrganizationSidebarSharedDragDrop"],["t5sClickableElement","",3,"t5sMenuOverlay","menuOverlayPosition","menuOverlayAutofocus","menuOpenChange"],["menuTrigger","t5sMenuOverlay"],[3,"closeClick"]],template:function(t,i){1&t&&(e.YNc(0,Bm,2,1,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.listItemsWrapper$))},dependencies:[u.sg,u.O5,u.RF,u.n9,oe.v,Xt.q,gn,On,jn,wo,So,u.Ov],encapsulation:2,changeDetection:0})}
1const Mm=["scrollContainer"];function Zm(a,n){if(1&a&&e._UZ(0,"t5s-label-badge",19),2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.Udp("margin-right",6,"px"),e.Q6J("label",i.I18n.translate(t,i.I18n.key.guestBadgeLabel))("tone",i.LabelBadgeTone.GUEST)}}function Lm(a,n){if(1&a&&e._UZ(0,"t5s-svg",20),2&a){const t=e.oxw(3);e.Udp("opacity","var(--organization-sidebar-nested-hover-buttons-opacity)")("transition","opacity 200ms ease 0s"),e.Q6J("size",16)("icon",t.IconSidebarExpand)("fgColor",t.rgba(t.Color.black,.55))}}function Nm(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.emitCloseSidebar())}),e._UZ(1,"t5s-svg",20),e.qZA()}if(2&a){e.oxw();const t=e.MAs(14),i=e.oxw(2);e.Udp("opacity","var(--organization-sidebar-nested-hover-buttons-opacity)")("position","relative")("transition","opacity 200ms ease 0s, background 20ms ease-in 0s")("border-radius",6,"px")("height",24,"px")("width",24,"px")("display","flex")("align-items","center")("justify-content","center")("padding","2px 2px")("margin-right",6,"px"),e.Q6J("t5sTooltipV3",t),e.xp6(1),e.Q6J("size",20)("icon",i.IconSidebarClose)("fgColor",i.rgba(i.Color.black,.45))}}function Rm(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e._UZ(3,"br"),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3).ngIf,o=e.oxw();e.xp6(2),e.Oqu(o.I18n.translate(i,o.I18n.key.closeBtnTooltip)),e.xp6(2),e.Udp("opacity",.5),e.xp6(1),e.AsE("",t.shortKey.symbol,"+",t.layout.get("Backslash","\\"),"")}}function Pm(a,n){if(1&a&&(e.YNc(0,Rm,6,5,"ng-container",0),e.ALo(1,"push")),2&a){const t=e.oxw(3);e.Q6J("ngIf",e.lcZ(1,1,t.shortcut$))}}function $m(a,n){if(1&a&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA()()),2&a){const t=e.oxw().ngIf,i=e.oxw(3);e.Udp("display","inline-flex")("align-items","center")("justify-content","center")("flex-shrink",0)("width",16,"px")("height",16,"px")("letter-spacing",-.5,"px")("font-size",t>99?8:10,"px")("text-align","center")("font-weight",600)("border-radius",4,"px")("color",i.Color.white)("margin-right",6,"px")("webkit-font-smoothing","auto")("background",i.Color.blue)("user-select","none")("pointer-events","none"),e.xp6(2),e.Oqu(t>99?"99+":t)}}function zm(a,n){if(1&a&&(e.ynx(0),e.YNc(1,$m,3,35,"div",22),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",t>0)}}function Qm(a,n){1&a&&e._UZ(0,"t5s-organization-sidebar-quick-add-button"),2&a&&e.Udp("position","relative")("margin-right",12,"px")}const Fm=function(){return{emoji:1,emojiFont:.7,custom:.888}},Gm=function(a,n){return{organization:a,i18n:n}};function Jm(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-organization-icon",12),e.TgZ(3,"div")(4,"div",13),e._uU(5),e.qZA(),e.YNc(6,Zm,1,4,"t5s-label-badge",14),e.ALo(7,"async"),e.YNc(8,Lm,1,7,"t5s-svg",15),e.ALo(9,"push"),e.qZA()(),e.TgZ(10,"div"),e.YNc(11,Nm,2,26,"button",16),e.ALo(12,"push"),e.YNc(13,Pm,2,3,"ng-template",null,17,e.W1O),e.YNc(15,zm,2,1,"ng-container",0),e.ALo(16,"async"),e.YNc(17,Qm,1,4,"t5s-organization-sidebar-quick-add-button",18),e.ALo(18,"push"),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("width",100,"%")("font-size",14,"px")("min-height",27,"px")("padding","2px 14px 2px 16px")("margin-top",1,"px")("margin-bottom",1,"px")("overflow","hidden")("margin-left",0,"px")("flex",1)("min-width",0,"px"),e.xp6(1),e.Udp("margin-right",8,"px"),e.Q6J("size",22)("organization",t)("hasBackground",!1)("ratio",e.DdM(90,Fm)),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("flex",1)("min-width",0,"px"),e.xp6(1),e.Udp("color",o.Color.black)("font-weight",500)("font-size",14,"px")("line-height",21,"px")("margin-right",6,"px")("flex",1)("min-width",0,"px")("max-width","fit-content")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.Oqu(o.getOrganizationDisplayName(e.WLB(91,Gm,t,i))),e.xp6(1),e.Q6J("ngIf",e.lcZ(7,80,o.isActiveUserGuest$)),e.xp6(2),e.Q6J("ngIf",!1===e.lcZ(9,82,o.organizationSidebarOverlayDisabled$)),e.xp6(2),e.Udp("display","flex")("flex-direction","row")("align-items","center")("height",100,"%")("margin-left","auto","px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(12,84,o.showCloseSidebarBtn$)),e.xp6(4),e.Q6J("ngIf",e.lcZ(16,86,o.numUnreadNotifications$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(18,88,o.showQuickAddBtn$))}}function Hm(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-overlay",23),e.NdJ("closeClick",function(){e.CHM(t),e.oxw();const o=e.MAs(6);return e.KtG(o.closeOverlay())}),e.qZA()}if(2&a){const t=e.oxw(2);e.Q6J("showSettingsEntry",t.showSettingsEntry$)}}function Vm(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e._UZ(3,"br"),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3).ngIf,o=e.oxw();e.xp6(2),e.Oqu(o.I18n.translate(i,o.I18n.key.menuItem.searchTooltip)),e.xp6(2),e.Udp("opacity",.5),e.xp6(1),e.AsE("",t.shortKey.symbol,"+",t.layout.get("KeyP","P"),"")}}function Wm(a,n){if(1&a&&(e.YNc(0,Vm,6,5,"ng-container",0),e.ALo(1,"push")),2&a){const t=e.oxw(3);e.Q6J("ngIf",e.lcZ(1,1,t.shortcut$))}}function Ym(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-menu-item",31),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.allWorkspacesClick.emit())}),e.qZA()}if(2&a){e.oxw();const t=e.MAs(9),i=e.oxw().ngIf,o=e.oxw();e.Udp("width",100,"%"),e.Q6J("label",o.I18n.translate(i,o.I18n.key.menuItem.workspaces))("icon",o.IconSidebarWorkspaces)("tooltip",t)}}function Km(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e._UZ(3,"br"),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(3).ngIf,o=e.oxw();e.xp6(2),e.Oqu(o.I18n.translate(i,o.I18n.key.menuItem.workspacesTooltip)),e.xp6(2),e.Udp("opacity",.5),e.xp6(1),e.lnq("",t.shortKey.symbol,"+",t.altKey.symbol,"+",t.layout.get("KeyA","A"),"")}}function jm(a,n){if(1&a&&(e.YNc(0,Km,6,6,"ng-container",0),e.ALo(1,"push")),2&a){const t=e.oxw(3);e.Q6J("ngIf",e.lcZ(1,1,t.shortcut$))}}
1const qm=function(a,n,t){return{bottom:a,left:n,right:t}};function Xm(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",24)(1,"t5s-organization-sidebar-menu-item",25),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_HOME}))}),e.qZA(),e.TgZ(2,"t5s-organization-sidebar-menu-item",26),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_FOCUS}))}),e.qZA(),e.TgZ(3,"t5s-organization-sidebar-menu-item",27),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_GLOBAL_SEARCH}))}),e.qZA(),e.YNc(4,Wm,2,3,"ng-template",null,28,e.W1O),e.YNc(6,Ym,1,5,"t5s-organization-sidebar-menu-item",29),e.ALo(7,"push"),e.YNc(8,jm,2,3,"ng-template",null,30,e.W1O),e.qZA()}if(2&a){const t=e.MAs(5),i=e.oxw().ngIf,o=e.oxw();e.Udp("width",100,"%")("padding-bottom",8,"px"),e.Q6J("t5sCalloutAnchor",o.CalloutAnchorId.OrgSidebarStaticMenuGroup)("calloutAnchorPlacement","RIGHT")("calloutAnchorRingOutsetPx",e.kEZ(25,qm,-7,-6,-6)),e.xp6(1),e.Udp("width",100,"%"),e.Q6J("label",o.I18n.translate(i,o.I18n.key.menuItem.home))("url",o.homeUrl$)("icon",o.IconSidebarHome)("isActive",o.homeActive$),e.xp6(1),e.Q6J("label",o.I18n.translate(i,o.I18n.key.menuItem.focus))("url",o.focusUrl$)("icon",o.IconSidebarFocus)("isActive",o.focusActive$),e.xp6(1),e.Udp("width",100,"%"),e.Q6J("label",o.I18n.translate(i,o.I18n.key.menuItem.search))("icon",o.IconSidebarSearch)("tooltip",t),e.xp6(3),e.Q6J("ngIf",e.lcZ(7,23,o.showAllWorksp
1aces$))}}function ef(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-sidebar-explore-checklist-host",33),e.NdJ("badgeClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onExploreChecklistToggle())})("overlayDismiss",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onExploreChecklistClose())})("dismissClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onExploreChecklistDismiss())})("overlaySeen",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onExploreChecklistSeen())})("stepClick",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.onExploreChecklistStepClick(o))})("rewardClaimClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onExploreChecklistRewardClaim())}),e.qZA()}if(2&a){const t=e.oxw().ngIf;e.Udp("width",100,"%"),e.Q6J("badgeTitle",t.badgeTitle)("overlayTitle",t.overlayTitle)("overlaySubtitle",t.overlaySubtitle)("overlaySubtitleSecondLine",t.overlaySubtitleSecondLine)("steps",t.steps)("completedStepIds",t.completedStepIds)("reward",t.reward)("open",t.open)("user",t.user)("dismissAriaLabel",t.dismissAriaLabel)("badgeTooltip",t.badgeTooltip)("progressAriaValueText",t.progressAriaValueText)}}function tf(a,n){if(1&a&&(e.ynx(0),e.YNc(1,ef,1,14,"t5s-sidebar-explore-checklist-host",32),e.ALo(2,"async"),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.visible&&e.lcZ(2,1,i.sidebarVisible$))}}function nf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-menu-item",39),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_WORKSPACE_CREATION}))}),e.qZA()}if(2&a){e.oxw();const t=e.MAs(8),i=e.oxw().ngIf,o=e.oxw();e.Udp("width",100,"%"),e.Q6J("icon",o.IconSidebarCreateWorkspace)("label",o.I18n.translate(i,o.I18n.key.menuItem.createWorkspace))("tooltip",t)}}function of(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.Udp("width",200,"px"),e.xp6(1),e.hij(" ",i.I18n.translate(t,i.I18n.key.menuItem.createWorkspaceTooltip)," ")}}const Or=function(a,n){return{left:a,right:n}};function af(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-menu-item",40),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_WORKSPACE_TEMPLATE_MARKET}))}),e.qZA()}if(2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.Udp("width",100,"%"),e.Q6J("t5sCalloutAnchor",i.CalloutAnchorId.OrgSidebarTemplatesMenuItem)("calloutAnchorPlacement","RIGHT")("calloutAnchorRadiusPx",6)("calloutAnchorRingOutsetPx",e.WLB(9,Or,-6,-6))("icon",i.IconSidebarTemplates)("label",i.I18n.translate(t,i.I18n.key.menuItem.templates))("tooltip",i.I18n.translate(t,i.I18n.key.menuItem.templatesTooltip))}}function sf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-menu-item",41),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_WORKFLOW_CENTER}))}),e.qZA()}if(2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.Udp("width",100,"%"),e.Q6J("t5sCalloutAnchor",i.CalloutAnchorId.OrgSidebarAutomationsMenuItem)("calloutAnchorPlacement","RIGHT")("calloutAnchorRadiusPx",6)("calloutAnchorRingOutsetPx",e.WLB(9,Or,-6,-6))("icon",i.IconSidebarAutomations)("label",i.I18n.translate(t,i.I18n.key.menuItem.automations))("tooltip",i.I18n.translate(t,i.I18n.key.menuItem.automationsTooltip))}}function rf(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-organization-sidebar-bookmarks-section")(2,"t5s-organization-sidebar-workspaces-section",34)(3,"t5s-organization-sidebar-shared-section"),e.TgZ(4,"div"),e.YNc(5,nf,1,5,"t5s-organization-sidebar-menu-item",35),e.ALo(6,"push"),e.YNc(7,of,2,3,"ng-template",null,36,e.W1O),e.YNc(9,af,1,12,"t5s-organization-sidebar-menu-item",37),e.ALo(10,"push"),e.YNc(11,sf,1,12,"t5s-organization-sidebar-menu-item",38),e.ALo(12,"push"),e.qZA(),e.BQk()),2&a){const t=e.oxw(2);e.xp6(2),e.Q6J("t5sCalloutAnchor",t.CalloutAnchorId.OrgSidebarWorkspacesSection)("calloutAnchorPlacement","RIGHT_START")("calloutAnchorRadiusPx",6)("calloutAnchorRingOutsetPx",e.WLB(18,Or,-6,-6))("calloutAnchorScrollAlign","start"),e.xp6(2),e.Udp("width",100,"%")("margin-top",18,"px"),e.xp6(1),e.Q6J("ngIf",e.lcZ(6,12,t.showCreateWorksp
1ace$)),e.xp6(4),e.Q6J("ngIf",e.lcZ(10,14,t.showWorkspaceTemplateMarket$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(12,16,t.showWorkflowCenter$))}}const lf=function(a,n,t){return{numActivitesUsed:a,numActivitesTotal:n,numActivitesUsedPercent:t}},cf=function(a,n){return{key:a,params:n}};function pf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",42),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.handleActivityLimitClick())}),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.TgZ(3,"div"),e._uU(4),e.qZA(),e.TgZ(5,"div"),e._UZ(6,"div")(7,"div"),e.qZA(),e.TgZ(8,"div"),e._uU(9),e.qZA()()}if(2&a){const t=n.ngIf,i=e.oxw().ngIf,o=e.oxw();e.Udp("width",100,"%")("box-shadow","inset 0px 1px 0px "+o.rgba(o.Color.black,.09))("padding","14px 14px")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("color",o.rgba(o.Color.black,.65))("font-weight",500)("font-size",12,"px")("line-height",24,"px"),e.xp6(1),e.hij(" ",o.I18n.translate(i,o.I18n.key.footer.activityLimit.title)," "),e.xp6(1),e.Udp("color",t.numActivitesUsedPercent>=90?o.Color.redSolid:o.rgba(o.Color.black,.6))("font-weight",400)("font-size",12,"px")("line-height",16,"px"),e.xp6(1),e.hij(" ",o.I18n.translate(i,e.WLB(83,cf,o.I18n.key.footer.activityLimit.description,e.kEZ(79,lf,t.numActivitesUsed,t.numActivitesTotal,t.numActivitesUsedPercent)))," "),e.xp6(1),e.Udp("position","relative")("min-width",30,"px")("height",5,"px")("border-radius",1,"px")("overflow","hidden")("margin-top",12,"px")("margin-bottom",12,"px"),e.xp6(1),e.Udp("position","absolute")("top",0,"px")("left",0,"px")("height",100,"%")("width",100,"%")("background-color",o.rgba(o.Color.black,.6))("opacity",.1),e.xp6(1),e.Udp("position","absolute")("top",0,"px")("left",0,"px")("height",100,"%")("width",t.numActivitesUsedPercent,"%")("background-color",o.rgba(o.Color.black,.6))("opacity",.6),e.xp6(1),e.Udp("color",o.rgba(o.Color.black,.6))("font-weight",500)("font-size",12,"px")("line-height",16,"px")("text-decoration","underline"),e.xp6(1),e.hij(" ",o.I18n.translate(i,o.I18n.key.footer.activityLimit.upgrade)," ")}}function df(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",43)(1,"div"),e._uU(2),e.qZA(),e.TgZ(3,"button",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_ORGANIZATION_CREATE}))}),e.TgZ(4,"div"),e._UZ(5,"t5s-svg",45),e.qZA(),e.TgZ(6,"div",46),e._uU(7),e.qZA()()()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("width",100,"%")("box-shadow","inset 0px 1px 0px "+i.rgba(i.Color.black,.09))("padding","14px 0px"),e.xp6(1),e.Udp("width",100,"%")("font-weight",500)("font-size",12,"px")("line-height",16,"px")("color",i.rgba(i.Color.black,.65))("white-space","normal")("padding","0px 14px"),e.xp6(1),e.hij(" ",i.I18n.translate(t,i.I18n.key.footer.organizationGuest.description)," "),e.xp6(1),e.Udp("width","calc(100% - 16px)")("margin","8px 8px 0px 8px")("padding","2px 8px")("display","flex")("flex-direction","row")("align-items","center")("border-radius",6,"px")("min-height",30,"px")("user-select","none")("transition","background 20ms ease-in"),e.xp6(1),e.Udp("padding","2.5px 2.5px")("margin","1px 4px 0px 0px"),e.xp6(1),e.Q6J("size",17)("fgColor",i.rgba(i.Color.black,.85))("icon",i.IconSidebarCreateWorkspace),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("font-weight",500)("font-size",14,"px")("line-height",21,"px")("color",i.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.Q6J("title",i.I18
1n.translate(t,i.I18n.key.footer.organizationGuest.createOrganizationBtnLabel)),e.xp6(1),e.hij(" ",i.I18n.translate(t,i.I18n.key.footer.organizationGuest.createOrganizationBtnLabel)," ")}}function _f(a,n){if(1&a&&(e.TgZ(0,"a",48)(1,"div"),e._UZ(2,"t5s-svg",45),e.qZA(),e.TgZ(3,"div",46),e._uU(4),e.qZA()()),2&a){const t=n.ngIf,i=e.oxw(2).ngIf,o=e.oxw();e.Udp("width","calc(100% - 16px)")("margin","8px 8px 0px 8px")("padding","2px 10px")("display","flex")("flex-direction","row")("align-items","center")("border-radius",6,"px")("min-height",30,"px")("user-select","none")("transition","background 20ms ease-in"),e.Q6J("href",t,e.LSH),e.xp6(1),e.Udp("padding","2.5px 2.5px")("margin","1px 4px 0px 0px"),e.xp6(1),e.Q6J("size",17)("fgColor",o.rgba(o.Color.black,.85))("icon",o.IconSidebarTemplates),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("font-weight",500)("font-size",14,"px")("line-height",21,"px")("color",o.Color.black)("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.Q6J("title",o.I18n.translate(i,o.I18n.key.footer.organizationShareLink.duplicateBtnLabel)),e.xp6(1),e.hij(" ",o.I18n.translate(i,o.I18n.key.footer.organizationShareLink.duplicateBtnLabel)," ")}}function uf(a,n){if(1&a&&(e.TgZ(0,"div",43)(1,"div"),e._uU(2),e.qZA(),e.YNc(3,_f,5,48,"a",47),e.ALo(4,"push"),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("width",100,"%")("box-shadow","inset 0px 1px 0px "+i.rgba(i.Color.black,.09))("padding","14px 0px"),e.xp6(1),e.Udp("width",100,"%")("font-weight",500)("font-size",12,"px")("line-height",16,"px")("color",i.rgba(i.Color.black,.65))("white-space","normal")("padding","0px 14px"),e.xp6(1),e.hij(" ",i.I18n.translate(t,i.I18n.key.footer.organizationShareLink.description)," "),e.xp6(1),e.Q6J("ngIf",e.lcZ(4,22,i.orgShareDuplicateLink$))}}const hf=function(a,n,t,i){return{top:a,right:n,bottom:t,left:i}};function gf(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",1)(2,"div")(3,"div",2),e.ALo(4,"push"),e.TgZ(5,"button",3,4),e.NdJ("menuOpenChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleOrganizationMenuOpenChange(o.menuOpen))}),e.qZA(),e.YNc(7,Jm,19,94,"ng-container",0),e.ALo(8,"push"),e.qZA()(),e.YNc(9,Hm,1,1,"ng-template",null,5,e.W1O),e.YNc(11,Xm,10,29,"div",6),e.ALo(12,"push"),e.YNc(13,tf,3,3,"ng-container",0),e.ALo(14,"async"),e.TgZ(15,"div",7,8),e.NdJ("scroll",function(){e.CHM(t);const o=e.MAs(16);return e.KtG(o.style.setProperty("box-shadow",o.scrollTop>0?"rgba(55, 53, 47, 0.09) 0px 1px 0px inset":"transparent 0px 0px 0px inset"))}),e.ALo(17,"push"),e.TgZ(18,"nav",null,9),e.YNc(20,rf,13,21,"ng-container",0),e.ALo(21,"push"),e.qZA()(),e.TgZ(22,"div"),e.YNc(23,pf,10,86,"button",10),e.ALo(24,"push"),e.YNc(25,df,8,68,"div",11),e.ALo(26,"push"),e.YNc(27,uf,5,24,"div",11),e.ALo(28,"push"),e.qZA()(),e.BQk()}if(2&a){const t=e.MAs(10),i=e.MAs(19),o=e.oxw();e.xp6(1),e.Udp("width",100,"%")("height",100,"%")("display","flex")("flex-direction","column")("max-height",100,"%")("height",100,"%"),e.Q6J("t5sCalloutAnchor",o.CalloutAnchorId.OrgSidebarRegion),e.xp6(1),e.Udp("width",100,"%")("flex-shrink",0)("flex-grow",0),e.xp6(1),e.Udp("user-select","none")("transition","background 150ms")("border-top-right-radius",o.BORDER_RADIUS_VAR)("cursor","pointer")("display","flex")("flex-direction","row")("align-items","center")("min-width",0,"px")("height",44,"px")("width",100,"%")("margin-bottom",e.lcZ(4,90,o.showStaticMenuOptions$)?8:0,"px")("padding",0),e.Q6J("isDisabled",o.organizationSidebarOverlayDisabled$),e.xp6(2),e.Udp("border-top-right-radius",o.BORDER_RADIUS_VAR),e.Q6J("t5sMenuOverlay",t)("menuOverlayPosition","bottom-right")("menuOverlayOffsetX",8)("menuOverlayOffsetY",4)("t5sCalloutAnchor",o.CalloutAnchorId.OrgSidebarActiveOrgButton)("calloutAnchorPlacement","RIGHT_START")("calloutAnchorRingOutsetPx",e.l5B(108,hf,-4,-6,-4,-6)),e.xp6(2),e.Q6J("ngIf",e.lcZ(8,92,o.organization$)),e.xp6(4),e.Q6J("ngIf",e.lcZ(12,94,o.showStaticMenuOptions$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(14,96,o.exploreChecklist$)),e.xp6(2),e.Udp("width",100,"%")("padding-top",6,"px")("padding-bottom",20,"px")("box-shadow","transparent 0px 0px 0px inset")("transition","box-shadow 300ms ease 0s")("z-index",1)("overflow-x","hidden")("overflow-y","auto")("margin-right",0,"px")("margin-bottom",0,"px")("flex",1)("min-height",0,"px")("opacity",e.lcZ(17,98,o.showScrollContainer$)?1:0),e.Q6J("t5sScrollContainerMaskStyle",!0)("t5sScrollContainerMaskStyleContentEl",i),e.xp6(
15),e.Q6J("ngIf",e.lcZ(21,100,o.config$)),e.xp6(2),e.Udp("width",100,"%"),e.xp6(1),e.Q6J("ngIf",e.lcZ(24,102,o.activityLimitInfoFooter$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(26,104,o.showGuestInfoFooter$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(28,106,o.showOrgShareFooter$))}}class ti extends Re.ez{constructor(n,t,i,o,s,l,d,h,m,C,S){super(),this.i18n$=n,this.elRef=t,this.shortcut$=d,this.output$$=h,this.actor$=m,this.sessions$=C,this.exploreChecklistObservable=S,this.I18n=fe.nN,this.LabelBadgeTone=Re.iH,this.BORDER_RADIUS_VAR=`var(${Ir}, 0px)`,this.OutputType=I,this.CalloutAnchorId=Rl.a,this.IconSidebarClose=y.OVP,this.IconSidebarExpand=y.Kbg,this.IconSidebarHome=y.zp6,this.IconSidebarFocus=y.NLA,this.IconSidebarAutomations=y.t0t,this.IconSidebarSearch=y.CPd,this.IconSidebarSettings=y.pCy,this.IconSidebarTemplates=y.qo3,this.IconSidebarWorkspaces=y.ZQz,this.IconSidebarCreateWorkspace=y.GHb,this.getOrganizationDisplayName=oo.vz,this.exploreChecklist$=this.exploreChecklistObservable.pipe((0,p.U)(({exploreChecklist:f})=>f),(0,Y.d)({bufferSize:1,refCount:!0})),this.exploreChecklistOpen$=this.exploreChecklist$.pipe((0,p.U)(({open:f})=>f),(0,w.x)()),this.sidebarVisible$=this.select((0,v.Cc)(["sidebarVisible"]),(0,p.U)(({sidebarVisible:f})=>f),(0,w.x)()),this.showSettingsEntry$=this.select("showSettingsEntry"),this.allWorkspacesClick=new e.vpe,this.organization$=this.select((0,v.Cc)(["lookup"]),(0,p.U)(({lookup:f})=>f.organization),(0,w.x)((f,E)=>f.id===E.id&&f.info?.name===E.info?.name&&f.info?.icon===E.info?.icon)),this.config$=this.select((0,v.Cc)(["config"]),(0,p.U)(({config:f})=>f)),this.organizationSidebarOverlayDisabled$=this.select((0,v.Cc)(["actor"]),(0,p.U)(({actor:f})=>!(0,Se.m0)(f)),(0,w.x)()),this.showCloseSidebarBtn$=this.select((0,v.Cc)(["config"]),(0,p.U)(({config:f})=>!f.isCollapsed),(0,w.x)()),this.homeActive$=this.select((0,v.Cc)(["router"]),(0,p.U)(({router:{homeActive:f}})=>!!f),(0,w.x)()),this.focusActive$=this.select((0,v.Cc)(["router"]),(0,p.U)(({router:{focusActive:f}})=>!!f),(0,w.x)()),this.homeUrl$=this.select((0,v.Cc)(["lookup","router"]),(0,p.U)(({lookup:{organization:f},router:{runtimeUrl:E}})=>[E,f.info?.slug||f.id,J.MP.fragment].join("/")),(0,w.x)()),this.focusUrl$=this.select((0,v.Cc)(["lookup","router"]),(0,p.U)(({lookup:{organization:f},router:{runtimeUrl:E}})=>[E,f.info?.slug||f.id,J.kh.fragment].join("/")),(0,w.x)()),this.numUnreadNotifications$=(0,V.aj)([this.sessions$,this.actor$]).pipe((0,p.U)(([{sessions:{notifications:f}},{actor:E}])=>f.filter(({userId:Z})=>Z!==(0,Se.m0)(E)).reduce((Z,{unreadChats:R,unreadNotifications:G})=>Z+R+G,0)),(0,w.x)()),this.showScrollContainer$=this.select((0,v.Cc)(["loadingState"]),(0,p.U)(({loadingState:f})=>!!(f.getActiveUserOrganizationsLoaded&&f.getActiveUserOrganizationLoaded&&f.getActiveUserSharedContentLoaded&&f.getOrganizationWithChildEntitiesLoaded)),(0,w.x)()),this.showStaticMenuOptions$=this.select((0,v.Cc)(["actor"]),(0,p.U)(({actor:f})=>
1!!(0,Se.m0)(f))),this.showAllWorkspaces$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:f,actor:E})=>{const Z=f.users.find(G=>G.id===(0,Se.m0)(E));if(!Z)return!1;const R=Z?.info?.role;return!!(0,Ct.lp)(R,ue.UD.ORG_MEMBER)}),(0,w.x)()),this.showCreateWorkspace$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:f,actor:E})=>{const Z=f.users.find(ae=>ae.id===(0,Se.m0)(E));if(!Z||(0,ye.ni)({lookup:f,actor:E}).length>0)return!1;const G=Z?.info?.role,F=f?.organization?.settings?.minimumOrganizationRoleForWorkspaceCreation;return(0,Ct.lp)(G,F||ue.UD.ORG_ADMIN)}),(0,w.x)()),this.showWorkspaceTemplateMarket$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:f,actor:E})=>{const Z=f.users.find(F=>F.id===(0,Se.m0)(E));if(!Z)return!1;const R=Z?.info?.role,G=f?.organization?.settings?.minimumOrganizationRoleForWorkspaceCreation;return(0,Ct.lp)(R,G||ue.UD.ORG_ADMIN)}),(0,w.x)()),this.showQuickAddBtn$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:f,actor:E})=>!!f.users.find(R=>R.id===(0,Se.m0)(E))),(0,w.x)()),this.showWorkflowCenter$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:f,actor:E})=>{const Z=f.users.find(G=>G.id===(0,Se.m0)(E));if(!Z||!f.workspaceMemberships.some(G=>{const F=(0,Ge.mH)(G);return F?.userId===Z.id&&(0,Ct.aq)(F.role,A.r3E.WS_ADMIN)}))return!1;const R=Z?.info?.role;return!!(0,Ct.lp)(R,ue.UD.ORG_ADMIN)}),(0,w.x)()),this.activityLimitInfoFooter$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:f,actor:E})=>{if((0,$e.Zq)({userId:(0,Se.m0)(E),users:f.users}))return!1;const R=f.organization;if(!R||R.info?.plan)return!1;const G=f.activityLimit?.numActivitesUsed??0,F=f.activityLimit?.numActivitesTotal??500,ae=Math.round(G/F*100);return!(ae<75)&&{numActivitesUsed:G,numActivitesTotal:F,numActivitesUsedPercent:ae}}),(0,w.x)()),this.isActiveUserGuest$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:f,actor:E})=>(0,$e.Zq)({userId:(0,Se.m0)(E),users:f.users})),(0,w.x)()),this.showGuestInfoFooter$=this.isActiveUserGuest$,this.showOrgShareFooter$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({actor:E})=>E?.type===un.g.ORGANIZATION_SHARELINK),(0,w.x)()),this.orgShareDuplicateLink$=this.select((0,v.Cc)(["lookup"]),(0,p.U)(({lookup:f})=>f.organizationShare?.duplicateLink),(0,w.x)()),this.set({actor:null,sidebarVisible:!1,showSettingsEntry:!1}),this.connect(l),this.connect(m),this.connect(i),this.connect(o),this.connect(s),this.hold(this.exploreChecklistOpen$,f=>this.handleExploreChecklistOpenChange(f))}set sidebarVisible(n){this.setProperty("sidebarVisible",n)}set showSettingsEntry(n){this.setProperty("showSettingsEntry",n)}handleOrganizationMenuOpenChange(n){n?this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:!0}}):setTimeout(()=>{this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:!1}})},200)}emitCloseSidebar(){this.output$$.next({type:I.CONFIG_CHANGE,config:{isCollapsed:!0}})}handleActivityLimitClick(){this.output$$.next({type:I.OPEN_ORGANIZATION_UPGRADE})}hasFooter(){return!!this.elRef.nativeElement.querySelector(".t5s-organization-sidebar-footer")}isScrollable(){const n=this.scrollContainerRef?.nativeElement;return!!n&&n.scrollHeight>n.clientHeight}handleExploreChecklistOpenChange(n){n?this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:!0}}):setTimeout(()=>{this.output$$.next({type:I.CONTEXT_CHANGE,context:{isActive:!1}})},200)}onExploreChecklistToggle(){this.output$$.next({type:I.EXPLORE_CHECKLIST_TOGGLE})}onExploreChecklistClose(){this.output$$.next({type:I.EXPLORE_CHECKLIST_CLOSE})}onExploreChecklistDismiss(){this.output$$.next({type:I.EXPLORE_CHECKLIST_DISMISS})}onExploreChecklistSeen(){this.output$$.next({type:I.EXPLORE_CHECKLIST_SEEN})}onExploreChecklistStepClick(n){this.output$$.next({type:I.EXPLORE_CHECKLIST_STEP_CLICK,stepId:n})}onExploreChecklistRewardClaim(){this.output$$.next({type:I.EXPLORE_CHECKLIST_REWARD_CLAIM})}static#e=this.\u0275fac=function(t){return new(t||ti)(e.Y36(ut.UG),e.Y36(e.SBq),e.Y36(Ut),e.Y36(Tn),e.Y36(An),e.Y36(Ba),e.Y36(ba.K),e.Y36(He),e.Y36(zt.h),e.Y36(Da),e.Y36(Dl))};static#t=this.\u0275cmp=e.Xpm({type:ti,selectors:[["t5s-organization-sidebar-view"]],viewQuery:function(t,i){if(1&t&&e.Gf(Mm,5),2&t){let o;
1e.iGM(o=e.CRH())&&(i.scrollContainerRef=o.first)}},inputs:{sidebarVisible:"sidebarVisible",showSettingsEntry:"showSettingsEntry"},outputs:{allWorkspacesClick:"allWorkspacesClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["data-t5s-callout-scrim-suppress-vars","--organization-sidebar-nested-hover-buttons-opacity",3,"t5sCalloutAnchor"],["t5sClickableBackgroundElement","",3,"isDisabled"],["data-cy","t5s-wc-org-sidebar-active-org-button",3,"t5sMenuOverlay","menuOverlayPosition","menuOverlayOffsetX","menuOverlayOffsetY","t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRingOutsetPx","menuOpenChange"],["organizationSidebarOverlayTrigger","t5sMenuOverlay"],["organizationSidebarOverlay",""],[3,"width","padding-bottom","t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRingOutsetPx",4,"ngIf"],["cdkScrollable","","id","organizationSidebarScrollContainer",3,"t5sScrollContainerMaskStyle","t5sScrollContainerMaskStyleContentEl","scroll"],["scrollContainer",""],["scrollContent",""],["t5sClickableElement","","class","t5s-organization-sidebar-footer",3,"width","box-shadow","padding","transition","click",4,"ngIf"],["class","t5s-organization-sidebar-footer",3,"width","box-shadow","padding",4,"ngIf"],[3,"size","organization","hasBackground","ratio"],["data-cy","t5s-wc-org-sidebar-org-name"],[3,"margin-right","label","tone",4,"ngIf"],[3,"opacity","transition","size","icon","fgColor",4,"ngIf"],["t5sClickableElement","",3,"t5sTooltipV3","opacity","position","transition","border-radius","height","width","display","align-items","justify-content","padding","margin-right","click",4,"ngIf"],["closeSidebarTooltip",""],[3,"position","margin-right",4,"ngIf"],[3,"label","tone"],[3,"size","icon","fgColor"],["t5sClickableElement","",3,"t5sTooltipV3","click"],[3,"display","align-items","justify-content","flex-shrink","width","height","letter-spacing","font-size","text-align","font-weight","border-radius","color","margin-right","webkit-font-smoothing","background","user-select","pointer-events",4,"ngIf"],[3,"showSettingsEntry","closeClick"],[3,"t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRingOutsetPx"],["data-cy","t5s-wc-org-sidebar-body-home-btn",3,"label","url","icon","isActive","menuItemClick"],["data-cy","t5s-wc-org-sidebar-body-focus-btn",3,"label","url","icon","isActive","menuItemClick"],["data-cy","t5s-wc-org-sidebar-search-btn",3,"label","icon","tooltip","menuItemClick"],["searchTooltip",""],[3,"width","label","icon","tooltip","menuItemClick",4,"ngIf"],["allWorkspacesTooltip",""],[3,"label","icon","tooltip","menuItemClick"],[3,"width","badgeTitle","overlayTitle","overlaySubtitle","overlaySubtitleSecondLine","steps","completedStepIds","reward","open","user","dismissAriaLabel","badgeTooltip","progressAriaValueText","badgeClick","overlayDismiss","dismissClick","overlaySeen","stepClick","rewardClaimClick",4,"ngIf"],[3,"badgeTitle","overlayTitle","overlaySubtitle","overlaySubtitleSecondLine","steps","completedStepIds","reward","open","user","dismissAriaLabel","badgeTooltip","progressAriaValueText","badgeClick","overlayDismiss","dismissClick","overlaySeen","stepClick","rewardClaimClick"],[3,"t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRadiusPx","calloutAnchorRingOutsetPx","calloutAnchorScrollAlign"],[3,"width","icon","label","tooltip","menuItemClick",4,"ngIf"],["createWorkspaceTooltip",""],[3,"width","t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRadiusPx","calloutAnchorRingOutsetPx","icon","label","tooltip","menuItemClick",4,"ngIf"],["data-cy","t5s-wc-org-sidebar-body-automations-btn",3,"width","t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRadiusPx","calloutAnchorRingOutsetPx","icon","label","tooltip","menuItemClick",4,"ngIf"],[3,"icon","label","tooltip","menuItemClick"],[3,"t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRadiusPx","calloutAnchorRingOutsetPx","icon","label","tooltip","menuItemClick"],["data-cy","t5s-wc-org-sidebar-body-automations-btn",3,"t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRadiusPx","calloutAnchorRingOutsetPx","icon","label","tooltip","menuItemClick"],["t5sClickableElement","",1,"t5s-organization-sidebar-footer",3,"click"],[1,"t5s-organization-sidebar-footer"],["t5sClickableElement","",3,"click"],[3,"size","fgColor","icon"],[3,"title"],["t5sClickableElement","",3,"href","width","margin","padding","display","flex-direction","align-items","border-radius","min-height","user-select","transition",4,"ngIf"],["t5sClickableElement","",3,"href"]],template:function(t,i){1&t&&(e.YNc(0,gf,29,113,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.i18n$))}
1,dependencies:[Pl.v,Ua,u.O5,ve.PQ,oe.v,Un.x,it.i,Xt.q,le.H,$l.V,kr.o,zl.v,fo,xo,bo,ko,uo,To,u.Ov,we.f],encapsulation:2,changeDetection:0})}const mf=["scrollContainer"],ff=["searchInput"];function xf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.emitCloseSidebar())}),e._UZ(1,"t5s-svg",2),e.qZA()}if(2&a){e.oxw();const t=e.MAs(10),i=e.oxw();e.Udp("opacity","var(--organization-sidebar-nested-hover-buttons-opacity)")("position","relative")("transition","opacity 200ms ease 0s")("border-radius",6,"px")("height",24,"px")("width",24,"px")("display","flex")("align-items","center")("justify-content","center")("padding","2px 2px")("margin-right",12,"px"),e.Q6J("t5sTooltipV3",t),e.xp6(1),e.Q6J("size",20)("icon",i.IconSidebarClose)("fgColor",i.rgba(i.Color.black,.45))}}function bf(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e._UZ(3,"br"),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2).ngIf,o=e.oxw();e.xp6(2),e.Oqu(o.I18n.translate(i,o.I18n.key.closeBtnTooltip)),e.xp6(2),e.Udp("opacity",.5),e.xp6(1),e.AsE("",t.shortKey.symbol,"+",t.layout.get("Backslash","\\"),"")}}function Cf(a,n){if(1&a&&(e.YNc(0,bf,6,5,"ng-container",0),e.ALo(1,"push")),2&a){const t=e.oxw(2);e.Q6J("ngIf",e.lcZ(1,1,t.shortcut$))}}function vf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",12),e.NdJ("mousedown",function(o){return o.preventDefault()})("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.clearSearchInput())}),e._UZ(1,"t5s-svg",2),e.qZA()}if(2&a){const t=e.oxw(2);e.Udp("border-radius",9999,"px")("position","absolute")("top",7,"px")("right",9,"px"),e.xp6(1),e.Q6J("size",14)("icon",t.IconClearInput)("fgColor",t.rgba(t.Color.black,.35))}}function If(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-organization-sidebar-workspace",19),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleWorkspaceCollapsedChange(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Udp("margin-top",1,"px"),e.Q6J("workspace",t)}}const Yl=function(a){return{count:a}},Kl=function(a,n){return{key:a,params:n}};function yf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",1),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.set({showMoreWorkspaces:!0}))}),e._uU(1),e.qZA()}if(2&a){const t=e.oxw(2).ngIf,i=e.oxw().ngIf,o=e.oxw();e.Udp("user-select","none")("border-radius",6,"px")("min-height",30,"px")("width","calc(100% - 16px)")("margin","1px 8px 0px 8px")("color",o.rgba(o.Color.black,.5))("font-weight",600)("font-size",12,"px")("line-height",20,"px")("white-space","nowrap")("text-overflow","ellipsis")("overflow","hidden")("padding","2px 8px"),e.xp6(1),e.hij(" ",o.I18n.translate(i,e.WLB(29,Kl,o.I18n.key.showMore,e.VKq(27,Yl,t.numMoreWorkspaces)))," ")}}function kf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-section",16),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.set({activeUserWorkspacesSectionCollapsed:o.isCollapsed}))}),e.YNc(1,If,2,3,"ng-container",17),e.YNc(2,yf,2,32,"button",18),e.qZA()}if(2&a){const t=e.oxw().ngIf,i=e.oxw().ngIf,o=e.oxw();e.Q6J("label",o.I18n.translate(i,o.I18n.key.section.activeUserWorkspaces))("tooltip",o.I18n.translate(i,o.I18n.key.section.activeUserWorkspacesTooltip))("isCollapsed",o.activeUserWorkspacesSectionCollapsed$)("changeCollapseDisabled",!1),e.xp6(1),e.Q6J("ngForOf",t.workspaces)("ngForTrackBy",o.trackById),e.xp6(1),e.Q6J("ngIf",t.numMoreWorkspaces>0)}}function wf(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-organization-sidebar-workspace",19),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleWorkspaceCollapsedChange(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Udp("margin-top",1,"px"),e.Q6J("workspace",t)}}function Sf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",1),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.set({showMoreOtherWorkspaces:!0}))}),e._uU(1),e.qZA()}if(2&a){const t=e.oxw(2).ngIf,i=e.oxw().ngIf,o=e.oxw();e.Udp("user-select","none")("border-radius",6,"px")("min-height",30,"px")("width","calc(100% - 16px)")("margin","1px 8px 0px 8px")("color",o.rgba(o.Color.black,.5))("font-weight",600)("font-size",12,"px")("line-height",20,"px")("white-space","nowrap")("text-overflow","ellipsis")("overflow","hidden")("padding","2px 8px"),e.xp6(1),e.hij(" ",o.I18n.translate(i,e.WLB(29,Kl,o.I18n.key.showMore,e.VKq(27,Yl,t.numMoreOtherWorkspaces)))," ")}}function Tf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",1),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(5);return e.KtG(o.output$$.next({type:o.OutputType.OPEN_WORKSPACE_CREATION}))}),e.TgZ(1,"div"),e._UZ(2,"t5s-svg",2),e.qZA(),e.TgZ(3,"div"),e._uU(4),e.qZA()()}if(2&a){const t=e.oxw(4).ngIf,i=e.oxw();e.Udp("user-select","none")("border-radius",6,"px")("min-height",30,"px")("width","calc(100% - 16px)")("margin","1px 8px 0px 8px")("padding","2px 8px")("display","flex")("flex-direction","row")("align-items","center"),e.xp6(1),e.Udp("width",22,"px")("height",22,"px")("display","flex")("justify-content","center")("align-items","center")("margin-right",4,"px"),e.xp6(1),e.Q6J("size",14)("icon",i.IconPlusThick)("fgColor",i.rgba(i.Color.black,.45)),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("font-size",14,"px")("line-height",18,"px")("white-space","nowrap")("text-overflow","ellipsis")("overflow","hidden")("c
1olor",i.rgba(i.Color.black,.65)),e.xp6(1),e.hij(" ",i.I18n.translate(t,i.I18n.key.createWorkspaceBtnLabel)," ")}}function Af(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=e.oxw(4).ngIf,i=e.oxw();e.Udp("min-height",30,"px")("font-size",14,"px")("line-height",18,"px")("white-space","nowrap")("text-overflow","ellipsis")("overflow","hidden")("padding","2px 8px")("margin","1px 8px 0px 8px")("color",i.rgba(i.Color.black,.5))("display","flex")("flex-direction","row")("align-items","center"),e.xp6(1),e.hij(" ",i.I18n.translate(t,i.I18n.key.noOtherWorkspacesPlaceholder)," ")}}function Uf(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Tf,5,50,"button",20),e.ALo(2,"push"),e.YNc(3,Af,2,25,"div",21),e.ALo(4,"push"),e.BQk()),2&a){const t=e.oxw(4);e.xp6(1),e.Q6J("ngIf",!0===e.lcZ(2,2,t.showWorkspaceCreate$)),e.xp6(2),e.Q6J("ngIf",!1===e.lcZ(4,4,t.showWorkspaceCreate$))}}function Of(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-section",16),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.set({otherWorkspacesSectionCollapsed:o.isCollapsed}))}),e.YNc(1,wf,2,3,"ng-container",17),e.YNc(2,Sf,2,32,"button",18),e.YNc(3,Uf,5,6,"ng-container",0),e.qZA()}if(2&a){const t=e.oxw().ngIf,i=e.oxw().ngIf,o=e.oxw();e.Q6J("label",o.I18n.translate(i,o.I18n.key.section.otherWorkspaces))("tooltip",o.I18n.translate(i,o.I18n.key.section.otherWorkspacesTooltip))("isCollapsed",o.otherWorkspacesSectionCollapsed$)("changeCollapseDisabled",!1),e.xp6(1),e.Q6J("ngForOf",t.otherWorkspaces)("ngForTrackBy",o.trackById),e.xp6(1),e.Q6J("ngIf",t.numMoreOtherWorkspaces>0),e.xp6(1),e.Q6J("ngIf",0===t.otherWorkspaces.length)}}function Ef(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-organization-sidebar-workspace",19),e.NdJ("isCollapsedChange",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.handleWorkspaceCollapsedChange(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Udp("margin-top",1,"px"),e.Q6J("workspace",t)}}function Df(a,n){if(1&a&&(e.TgZ(0,"t5s-organization-sidebar-section",22),e.YNc(1,Ef,2,3,"ng-container",17),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw().ngIf,o=e.oxw();e.Q6J("label",o.I18n.translate(i,o.I18n.key.section.searchedWorkspaces))("tooltip",o.I18n.translate(i,o.I18n.key.section.searchedWorkspacesTooltip))("isCollapsed",!1)("changeCollapseDisabled",!0),e.xp6(1),e.Q6J("ngForOf",t.searchedWorkspaces)("ngForTrackBy",o.trackById)}}function Bf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div"),e._UZ(1,"t5s-svg",2),e.TgZ(2,"div"),e._uU(3),e.qZA(),e.TgZ(4,"div"),e._uU(5),e.TgZ(6,"span",23),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.clearSearchInput())})("keydown.space",function(o){return o.preventDefault()})("keyup.space",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.clearSearchInput())})("keydown.enter",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.clearSearchInput())}),e._uU(7),e.qZA()()()}if(2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.Udp("display","flex")("flex-direction","column")("padding","15px")("flex",1)("align-items","center")("justify-content","center")("line-height",21,"px"),e.xp6(1),e.Udp("margin-bottom",10,"px"),e.Q6J("size",30)("icon",i.IconOpenWorkspace)("fgColor",i.rgba(i.Color.black,.65)),e.xp6(1),e.Udp("color",i.rgba(i.Color.black,.65))("font-size",14,"px"),e.xp6(1),e.Oqu(i.I18n.translate(t,i.I18n.key.noResults.title)),e.xp6(1),e.Udp("color",i.rgba(i.Color.black,.65))("font-size",14,"px")("font-weight",400),e.xp6(1),e.hij(" ",i.I18n.translate(t,i.I18n.key.noResults.tryAgain)," "),e.xp6(1),e.Udp("display","inline")("color","inherit")("padding","1px 2px")("border-radius",4,"px")("text-decoration","underline")("user-select","none")("cursor","pointer"),e.xp6(1),e.Oqu(i.I18n.translate(t,i.I18n.key.noResults.clearSearch))}}function Mf(a,n){if(1&a&&(e.ynx(0),e.YNc(1,kf,3,7,"t5s-organization-sidebar-section",13),e.YNc(2,Of,4,8,"t5s-organization-sidebar-section",13),e.YNc(3,Df,2,6,"t5s-organization-sidebar-section",14),e.YNc(4,Bf,8,46,"div",15),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",t.workspaces),e.xp6(1),e.Q6J("ngIf",t.otherWorkspaces),e.xp6(1),e.Q6J("ngIf",t.searchedWorkspaces&&t.searchedWorkspaces.length>0),e.xp6(1),e.Q6J("ngIf",t.searchedWorkspaces&&0===t.searchedWorkspaces.length)}}function Zf(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div")(3,"button",1),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.backClick.emit())}),e._UZ(4,"t5s-svg",2),e.qZA(),e.TgZ(5,"div"),e._uU(6),e.qZA(),e.YNc(7,xf,2,26,"button",3),e.ALo(8,"push"),e.YNc(9,Cf,2,3,"ng-template",null,4,e.W1O),e.qZA(),e.TgZ(11,"div")(12,"div")(13,"input",5,6),e.NdJ("valueChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.setSearchQuery(o.value))})("t5sElementRendered",function(o){return o.element.focus({preventScroll:!0})}),e.qZA(),e._UZ(15,"t5s-svg",2),e.YNc(16,vf,2,11,"button",7),e.ALo(17,"push"),e.qZA()()(),e.TgZ(18,"div",8,9),e.NdJ("scroll",function(){e.CHM(t);const o=e.MAs(19);return e.KtG(o.style.setProperty("box-shadow",o.scrollTop>0?"rgba(55, 53, 47, 0.09) 0px 1px 0px inset":"transparent 0px 0px 0px inset"))}),e.ALo(20,"push"),e.TgZ(21,"div",null,10),e.YNc(23,Mf,5,4,"ng-container",0),e.ALo(24,"push"),e.qZA()(),e._UZ(25,"div"),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(22),o=e.oxw();e.xp6(1),e.Udp("width",100,"%")("padding-bottom",8,"px"),e.xp6(1),e.Udp("width",100,"%")("display","flex")("flex-direction","row")("align-items","center")("height",45,"px"),e.xp6(1),e.Udp("user-select","none")("display","inline-flex")("align-items","center")("margin-left",14,"px")("margin-right",8,"px")("justify-content","center")("flex-shrink","0")("border-radius",6,"px")("height",24,"px")("width",24,"px"),e.xp6(1),e.Q6J("size",16)("icon",o.IconArrowLeft)("fgColor",o.rgba(o.Color.black,.35)),e.xp6(1),e.Udp("flex",1)("min-width",0,"px")("font-weight",600)("font-size",14,"px")("color",o.Color.black)("al
1ign-items","center")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis")("padding-right",7,"px"),e.xp6(1),e.hij(" ",o.I18n.translate(t,o.I18n.key.headerTitle)," "),e.xp6(1),e.Q6J("ngIf",e.lcZ(8,121,o.showCloseSidebarBtn$)),e.xp6(4),e.Udp("width",100,"%")("padding","0px 15px"),e.xp6(1),e.Udp("position","relative")("width",100,"%"),e.xp6(1),e.Udp("width",100,"%")("font-size",14,"px")("line-height",18,"px")("background-color",o.rgba(o.Color.grey1,.6))("padding","5px 31px 5px 31px")("border-radius",6,"px"),e.Q6J("placeholder",o.I18n.translate(t,o.I18n.key.searchInputPlaceholder)),e.xp6(2),e.Udp("position","absolute")("pointer-events","none")("top",5,"px")("left",7,"px"),e.Q6J("size",18)("icon",o.IconSearch)("fgColor",o.rgba(o.Color.black,.45)),e.xp6(1),e.Q6J("ngIf",e.lcZ(17,123,o.hasSearchQuery$)),e.xp6(2),e.Udp("width",100,"%")("flex",1)("min-height",0,"px")("overflow-y","auto")("overflow-x","hidden")("box-shadow","transparent 0px 0px 0px inset")("transition","box-shadow 300ms ease 0s")("padding","6px 0px 20px 0px")("opacity",e.lcZ(20,125,o.showScrollContainer$)?1:0),e.Q6J("t5sScrollContainerMaskStyle",!0)("t5sScrollContainerMaskStyleContentEl",i),e.xp6(3),e.Udp("display","flex")("flex-direction","column")("min-height",100,"%"),e.xp6(2),e.Q6J("ngIf",e.lcZ(24,127,o.sections$)),e.xp6(2),e.Udp("width",100,"%")}}class ni extends Re.ez{constructor(n,t,i,o,s,l,d,h,m){super(),this.i18n$=t,this.shortcut$=h,this.output$$=m,this.I18n=fe._q,this.OutputType=I,this.IconOpenWorkspace=y.m3_,this.IconSearch=y.jVj,this.IconPlusThick=y.NJo,this.IconArrowLeft=y.D6v,this.IconClearInput=y.YvQ,this.IconSidebarClose=y.OVP,this.backClick=new e.vpe,this.showCloseSidebarBtn$=this.select((0,v.Cc)(["config"]),(0,p.U)(({config:C})=>!C.isCollapsed),(0,w.x)()),this.hasSearchQuery$=this.select((0,v.Cc)(["searchQuery"]),(0,p.U)(({searchQuery:C})=>!!C?.trim())),this.activeUserWorkspacesSectionCollapsed$=this.select((0,v.Cc)(["activeUserWorkspacesSectionCollapsed"]),(0,p.U)(({activeUserWorkspacesSectionCollapsed:C})=>C)),this.otherWorkspacesSectionCollapsed$=this.select((0,v.Cc)(["otherWorkspacesSectionCollapsed"]),(0,p.U)(({otherWorkspacesSectionCollapsed:C})=>C)),this.showScrollContainer$=this.select((0,v.Cc)(["loadingState"]),(0,p.U)(({loadingState:C})=>!!(C.getActiveUserOrganizationsLoaded&&C.getActiveUserOrganizationLoaded&&C.getActiveUserSharedContentLoaded&&C.getOrganizationWithChildEntitiesLoaded)),(0,w.x)()),this.showWorkspaceCreate$=this.select((0,v.Cc)(["lookup","actor"]),(0,p.U)(({lookup:C,actor:S})=>{const f=S?.type===un.g.USER?S.activeUserId:void 0,E=C.users.find(G=>G.id===f);if(!E)return!1;const Z=E?.info?.role,R=C?.organization?.settings?.minimumOrganizationRoleForWorkspaceCreation;return(0,Ct.lp)(Z,R||A.UDU.ORG_ADMIN)}),(0,w.x)()),this.sections$=this.select((0,v.Cc)(["actor","lookup","router","searchQuery","workspaceIdsExpanded","showMoreWorkspaces","showMoreOtherWorkspaces"]),(0,p.U)(({actor:C,router:S,lookup:f,searchQuery:E,workspaceIdsExpanded:Z,showMoreWorkspaces:R,showMoreOtherWorkspaces:G})=>{let F=(0,ye.ni)({lookup:f,actor:C}),ae=(0,ye.ZN)({lookup:f,actor:C});if(E?.trim()){let b=[...F,...ae];return b=(0,ye.Oc)({workspaces:b,searchQuery:E,i18n:this.i18n}),b=b.map(k=>(0,ye.IQ)({section:ze.WORKSPACE,lookup:f,workspace:k,actor:C,router:S,workspaceIdsExpanded:Z,otherWorkspacesSection:!1,addMembershipInfos:!0})),{workspaces:void 0,otherWorkspaces:void 0,numMoreWorkspaces:0,numMoreOtherWorkspaces:0,searchedWorkspaces:b}}{let b=0;F=F.sort((M,K)=>(0,ye.WV)({workspace1:M,workspace2:K,i18n:this.i18n,actor:C})),R||(b=F.length-5,F=F.slice(0,5)),F=F.map(M=>(0,ye.IQ)({section:ze.WORKSPACE,lookup:f,workspace:M,actor:C,router:S,workspaceIdsExpanded:Z}));let k=0;return ae=ae.sort((M,K)=>(0,ye.WV)({workspace1:M,workspace2:K,i18n:this.i18n,actor:C})),G||(k=ae.length-5,ae=ae.slice(0,5)),ae=ae.map(M=>(0,ye.IQ)({section:ze.WORKSPACE,lookup:f,workspace:M,actor:C,router:S,workspaceIdsExpanded:Z,otherWorkspacesSection:!0,addMembershipInfos:!0})),{workspaces:F,otherWorkspaces:ae,numMoreWorkspaces:b,numMoreOtherWorkspaces:k,searchedWorkspaces:void 0}}})),this.set({actor:null,activeUserWorkspacesSectionCollapsed:!1,otherWorkspacesSectionCollapsed:!1,workspaceIdsExpanded:[],showMoreWorksp
1aces:!1,showMoreOtherWorkspaces:!1,fullyVisible:!1,searchQuery:""}),this.connect(i),this.connect(o),this.connect(s),this.connect(l),this.connect(d),this.hold(n.addKeyBinding({key:"s",modifier:pn.AK.SHORT,handler:()=>!this.get().fullyVisible||(this.searchInput?.nativeElement?.focus(),this.searchInput?.nativeElement?.select(),!1)}))}handleWorkspaceCollapsedChange({isCollapsed:n,workspaceId:t}){let i=[...this.get().workspaceIdsExpanded];n||i.includes(t)?n&&i.includes(t)&&(i=i.filter(o=>o!==t)):i.push(t),i.sort(),this.set({workspaceIdsExpanded:i})}emitCloseSidebar(){this.output$$.next({type:I.CONFIG_CHANGE,config:{isCollapsed:!0}})}setFullyVisible(n){this.set({fullyVisible:n})}clearSearchInput(){this.set({searchQuery:"",workspaceIdsExpanded:[]}),this.searchInput?.nativeElement&&(this.searchInput.nativeElement.value="",this.searchInput.nativeElement.focus())}setSearchQuery(n){const{searchQuery:t}=this.get(),i=(n||"").trim();t!==i&&this.set(!!t!=!!i?{searchQuery:i,workspaceIdsExpanded:[]}:{searchQuery:i})}focusSearchInput(){this.searchInput?.nativeElement.focus({preventScroll:!0})}blurSearchInput(){this.searchInput?.nativeElement.blur()}hasFooter(){return!1}isScrollable(){const n=this.scrollContainerRef?.nativeElement;return!!n&&n.scrollHeight>n.clientHeight}ngAfterViewInit(){this.output$$.next({type:I.GET_WORKSPACES})}static#e=this.\u0275fac=function(t){return new(t||ni)(e.Y36(pn.r2),e.Y36(ut.UG),e.Y36(zt.h),e.Y36(Ut),e.Y36(Tn),e.Y36(An),e.Y36(Ba),e.Y36(ba.K),e.Y36(He))};static#t=this.\u0275cmp=e.Xpm({type:ni,selectors:[["t5s-organization-sidebar-all-workspaces-view"]],viewQuery:function(t,i){if(1&t&&(e.Gf(mf,5),e.Gf(ff,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.scrollContainerRef=o.first),e.iGM(o=e.CRH())&&(i.searchInput=o.first)}},outputs:{backClick:"backClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["t5sClickableElement","",3,"click"],[3,"size","icon","fgColor"],["t5sClickableElement","",3,"opacity","t5sTooltipV3","position","transition","border-radius","height","width","display","align-items","justify-content","padding","margin-right","click",4,"ngIf"],["closeSidebarTooltip",""],["t5sInputElement","","t5sInputElementBorder","",3,"placeholder","valueChange","t5sElementRendered"],["searchInput",""],["t5sClickableElement","",3,"border-radius","position","top","right","mousedown","click",4,"ngIf"],["cdkScrollable","",3,"t5sScrollContainerMaskStyle","t5sScrollContainerMaskStyleContentEl","scroll"],["scrollContainer",""],["scrollContent",""],["t5sClickableElement","",3,"t5sTooltipV3","click"],["t5sClickableElement","",3,"mousedown","click"],[3,"label","tooltip","isCollapsed","changeCollapseDisabled","isCollapsedChange",4,"ngIf"],[3,"label","tooltip","isCollapsed","changeCollapseDisabled",4,"ngIf"],[3,"display","flex-direction","padding","flex","align-items","justify-content","line-height",4,"ngIf"],[3,"label","tooltip","isCollapsed","changeCollapseDisabled","isCollapsedChange"],[4,"ngFor","ngForOf","ngForTrackBy"],["t5sClickableElement","",3,"user-select","border-radius","min-height","width","margin","color","font-weight","font-size","line-height","white-space","text-overflow","overflow","padding","click",4,"ngIf"],[3,"workspace","isCollapsedChange"],["t5sClickableElement","",3,"user-select","border-radius","min-height","width","margin","padding","display","flex-direction","align-items","click",4,"ngIf"],[3,"min-height","font-size","line-height","white-space","text-overflow","overflow","padding","margin","color","display","flex-direction","align-items",4,"ngIf"],[3,"label","tooltip","isCollapsed","changeCollapseDisabled"],["t5sClickableElement","","tabindex","0",3,"click","keydown.space","keyup.space","keydown.enter"]],template:function(t,i){1&t&&(e.YNc(0,Zf,26,129,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.i18n$))},dependencies:[u.sg,u.O5,ve.PQ,zn.y,Ki.E,oe.v,wn.v,it.i,le.H,kr.o,gn,ei,we.f],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column}"],changeDetection:0})}var Lf=r(75019),jl=r(8710);function Nf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-organization-sidebar-collapsed-indicator",9),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.emitConfigChange({isCollapsed:!1}))}),e.qZA()}if(2&a){const t=e.oxw();e.Udp("position","absolute")("top",10.5,"px")("right",-36,"px")("user-select","none")("-webkit-user-select","none"),e.Q6J("sidebarVisible",t.isVisible$)("numUnreadNotifications",t.numUnreadNotifications$)}}function Rf(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"t5s-organization-sidebar-all-workspaces-view",10),e.NdJ("backClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.set({allWorkspacesActive:!1}))}),e.qZA()()}2&a&&e.Udp("display","flex")("flex-direction","column")("height",100,"%")("width",100,"%")}function Pf(a,n){if(1&a&&(e.TgZ(0,"div")(1,"div")(2,"span"),e._uU(3),e.qZA(),e._uU(4,"\xa0"),e.TgZ(5,"span"),e._uU(6),e.qZA()(),e.TgZ(7,"span"),e._uU(8),e.qZA(),e._uU(9,"\xa0"),e.TgZ(10,"span"),e._uU(11),e.ALo(12,"push"),e.qZA()()),2&a){const t=e.oxw();e.Udp("font-weight",500)("text-align","center"),e.xp6(3),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.resizeTooltip.drag)),e.xp6(2),e.Udp("color",t.rgba(t.Color.white,.5)),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.resizeTooltip.toResize)),e.xp6(2),e.Oqu(t.I18n.translate(t.i18n,t.I18n.key.resizeTooltip.click)),e.xp6(2),e.Udp("color",t.rgba(t.Color.white,.5)),e.xp6(1),e.Oqu(t.I18n.translate(t.i18n,e.lcZ(12,12,t.isCollapsed$)?t.I18n.key.resizeTooltip.toOpen:t.I18n.key.resizeTooltip.toClose))}}class Ao extends Re.ez{constructor(n,t,i,o,s,l,d,h,m,C,S,f,E,Z,R,G,F,ae,xe,Fe){super(),this.document=t,this.elRef=i,this.animationCtrl=o,this.activeUserId$=s,this.lookup$$=l,this.config$$=d,this.settings$$=h,this.sessions$$=m,this.router$$=C,this.context$$=S,this.output$=f,this.sessions$=E,this.loadingState$$=Z,this.exploreChecklist$$=R,this.optimisticGlobalWidthService=G,this.I18n=fe.nN,this.BORDER_RADIUS_VAR=`var(${Ir}, 0px)`,this.showSettingsEntry$=this.select("showSettingsEntry"),this.sidebarOutput=new e.vpe,this.resizeDragIndicatorMousedown$$=new mt.xQ,this.isCollapsed$=this.select((0,v.Cc)(["isCollapsed"]),(0,p.U)(({isCollapsed:b})=>b),(0,w.x)()),this.allWorkspacesVisible$=this.select((0,v.Cc)(["allWorkspacesVisible"]),(0,p.U)(({allWorkspacesVisible:b})=>b)),this.isVisibleWithoutMouseNearSidebar$=this.select((0,v.Cc)(["isCollapsed","isActive","
1isHovered","isResizing"]),(0,p.U)(({isCollapsed:b,isActive:k,isHovered:M,isResizing:K})=>!b||k||M||K),(0,w.x)()),this.isActive$=this.select((0,v.Cc)(["isActive"]),(0,p.U)(({isActive:b})=>b),(0,w.x)()),this.width$=this.select((0,v.Cc)(["width"]),(0,p.U)(({width:b})=>b),(0,w.x)()),this.showSidebarContent$=this.select((0,v.Cc)(["loadingState"]),(0,p.U)(({loadingState:b})=>!!b.getActiveUserOrganizationsLoaded),(0,pt.O)(!1)),this.isVisible$=this.select((0,v.Cc)(["isCollapsed","isActive","isHovered","isResizing","isMouseNearSidebar"]),(0,p.U)(({isCollapsed:b,isActive:k,isHovered:M,isResizing:K,isMouseNearSidebar:Oe})=>!b||k||M||K||Oe),(0,w.x)()),this.showNestedHoverButtons$=this.select((0,v.Cc)(["isActive","isHovered","isResizing"]),(0,p.U)(({isActive:b,isHovered:k,isResizing:M})=>b||k||M),(0,w.x)()),this.numUnreadNotifications$=(0,V.aj)([this.sessions$,this.activeUserId$]).pipe((0,p.U)(([{sessions:{notifications:b}},{activeUserId:k}])=>b.filter(({userId:M})=>M!==k).reduce((M,{unreadChats:K,unreadNotifications:Oe})=>M+K+Oe,0)),(0,w.x)()),this.set({loadingState:{},isActive:!1,isCollapsed:!1,isHovered:!1,isMouseNearSidebar:!1,isResizing:!1,allWorkspacesActive:!1,allWorkspacesVisible:!1,showSettingsEntry:!1,width:318,widthOptimistic:null}),this.connect(xe.pipe((0,p.U)(({context:b})=>({isActive:!!b.isActive})))),this.connect(n),this.connect(F),this.connect(ae.pipe((0,p.U)(({config:b})=>({isCollapsed:!!b.isCollapsed,width:b.sidebarWidth})))),this.elRef.nativeElement.style.setProperty("width","0px"),this.elRef.nativeElement.style.setProperty("height","100%"),this.elRef.nativeElement.style.setProperty("border-top-right-radius",this.BORDER_RADIUS_VAR),this.elRef.nativeElement.style.setProperty("border-bottom-right-radius",this.BORDER_RADIUS_VAR),this.elRef.nativeElement.style.setProperty("flex-grow","0"),this.elRef.nativeElement.style.setProperty("flex-shrink","0"),this.elRef.nativeElement.style.setProperty("pointer-events","none"),this.elRef.nativeElement.style.setProperty("position","relative"),this.elRef.nativeElement.style.setProperty("z-index","111"),this.elRef.nativeElement.style.setProperty("background","rgb(251, 251, 250)"),this.elRef.nativeElement.style.setProperty(Ma,(0,c.m4)(c.Il.blueBright1,.43)),this.hold(Fe.addKeyBinding({code:"Backslash",modifier:pn.AK.SHORT,handler:()=>{const{isActive:b,isResizing:k}=this.get();return!(!b&&!k&&(this.emitConfigChange({isCollapsed:!this.get().isCollapsed}),1))}})),this.hold(Fe.addKeyBinding({code:"KeyA",modifier:[pn.AK.SHORT,pn.AK.ALT],handler:()=>
1{if(!this.canShowAllWorkspaces())return!0;const{isActive:b,isResizing:k,allWorkspacesActive:M}=this.get();return!(!b&&!k&&(this.set({allWorkspacesActive:!M}),1))}})),this.hold(this.select((0,v.Cc)(["sidebarEl","isCollapsed","width","widthOptimistic"]),(0,p.U)(({sidebarEl:b,isCollapsed:k,width:M,widthOptimistic:K})=>({sidebarEl:b,isCollapsed:k,width:K??M})),(0,w.x)(({width:b},{width:k})=>b===k)),({sidebarEl:b,isCollapsed:k,width:M})=>{const K=b.getBoundingClientRect().width;if(0===K)return b.style.setProperty("width",`${M}px`),void(k||i.nativeElement.style.setProperty("width",`${M}px`));this.animationSidebarWidth&&this.animationSidebarWidth.destroy(),this.animationSidebarWidth=this.animationCtrl.create("t5s-organization-sidebar-width-parent-animation").duration(200).easing("ease").addAnimation([this.animationCtrl.create("t5s-organization-sidebar-width-animation").addElement(b).keyframes([{offset:0,width:`${K}px`},{offset:1,width:`${M}px`}])]),k||this.animationSidebarWidth.addAnimation([this.animationCtrl.create("t5s-organization-sidebar-container-width-animation").addElement(this.elRef.nativeElement).keyframes([{offset:0,width:`${K}px`},{offset:1,width:`${M}px`}])]),this.animationSidebarWidth.play()}),this.hold(this.select((0,v.Cc)(["isCollapsed"]),(0,p.U)(({isCollapsed:b})=>b),(0,w.x)(),(0,go.T)(1)),b=>{const k=this.elRef.nativeElement.getBoundingClientRect().width,M=b?0:this.get().width;Math.abs(k-M),this.get(),this.elRef.nativeElement.style.setProperty(Ir,b?"3px":"0px"),this.animationContainerWidth&&this.animationContainerWidth.destroy(),this.animationContainerWidth=this.animationCtrl.create("t5s-organization-sidebar-container-container-width-animation").addElement(i.nativeElement).duration(200).easing("ease").keyframes([{offset:0,width:`${k}px`},{offset:1,width:`${M}px`}]).onFinish(()=>{i.nativeElement.style.setProperty("width",`${M}px`),this.animationContainerWidth?.destroy(),this.animationContainerWidth=void 0}),this.animationContainerWidth.play()}),this.hold(this.select((0,v.Cc)(["resizeBorderEl","isResizing","isResizeHovered"]),(0,p.U)(({resizeBorderEl:b,isResizing:k,isResizeHovered:M})=>({resizeBorderEl:b,isResizeActive:k||M})),(0,w.x)(({isResizeActive:b},{isResizeActive:k})=>b===k)),({resizeBorderEl:b,isResizeActive:k})=>{b.style.setProperty("box-shadow",k?"rgba(0, 0, 0, 0.1) -2px 0px 0px 0px inset":"rgba(0, 0, 0, 0.024) -1px 0px 0px 0px inset")}),this.hold(this.select((0,v.Cc)(["resizeEl","isCollapsed","isActive","isHovered","isMouseNearSidebar","isResizing","isAnimatingTranslate"]),(0,p.U)(({resizeEl:b,isCollapsed:k,isResizing:M,isActive:K,isHovered:Oe,isMouseNearSidebar:We,isAnimatingTranslate:P})=>({canResize:!M&&!P&&(!k||K||Oe||We||M),resizeEl:b})),(0,w.x)(({canResize:b},{canResize:k})=>b===k)),({canResize:b,resizeEl:k})=>{k.style.setProperty("pointer-events",b?"auto":"none")}),this.hold(this.select((0,v.Cc)(["sidebarEl","shadowEl","isCollapsed","isActive","isHovered","isMouseNearSidebar","isResizing"]),(0,p.U)(({sidebarEl:b,shadowEl:k,isCollapsed:M,isActive:K,isHovered:Oe,isMouseNearSidebar:We,isResizing:P})=>({isVisible:!M||K||Oe||We||P,isCollapsed:M,isResizing:P,sidebarEl:b,shadowEl:k})),(0,w.x)(({isCollapsed:b,isVisible:k},{isCollapsed:M,isVisible:K})=>b===M&&k===K)),({sidebarEl:b,shadowEl:k,isCollapsed:M,isVisible:K})=>{const{width:Oe}=this.get(),We=(0,yr.p3)(window.getComputedStyle(b).opacity)??1,P=K?1:0,T=window.getComputedStyle(b).transform||"",[Ue,wt,Wt,$n,hl,ey]=T.replace(")",", ").split(", "),ty=Oe-20,ny=(0,yr.p3)(hl)||0,iy=K?0:-ty,oy=(0,yr.p3)(ey)||0,ay=M?60:0,ly=window.getComputedStyle(k).boxShadow||"",cy=M&&K?"rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px":"rgba(15, 15, 15, 0) 0px 0px 0px 1px, rgba(15, 15, 15, 0) 0px 3px 6px, rgba(15, 15, 15, 0) 0px 9px 24px",py=window.getComputedStyle(b).background||"",dy=M?this.Color.white:"rgb(251, 251, 250)";if(M&&K&&(b.style.setProperty("height","auto"),b.style.setProperty("max-height","calc(100% - 120px)")),!M){const{allWorkspacesActive:hy}=this.get();(hy?this.allWorkspacesView?.isScrollable()||this.allWorkspacesView?.hasFooter():this.mainContentView?.isScrollable()||this.mainContentView?.hasFooter())&&(b.style.setProperty("height","100%"),b.style.setProperty("max-height","100%"))}this.animationSidebarTranslate&&this.animationSidebarTranslate.destroy();const _y=[`translateX(${ny}px)`,`translateY(${oy}px)`,"translateZ(0px)"].join(" "),uy=[`translateX(${iy}px)`,`translateY(${ay}px)`,"translateZ(0px)"].join(" ");this.animationSidebarTranslate=this.animationCtrl.create("t5s-organization-sidebar-container-transform-animation").duration(200).easing("ease").addAnimation([this.animationCtrl.create("t5s-organization-sidebar-container-transform-main-animation").addElement(b).keyframes([{offset:0,opacity:We,transform:_y,background:py},{offset:1,opacity:P,transform:uy,background:dy}]),this.animationCtrl.create("t5s-organization-sidebar-container-transform-shadow-animation").addElement(k).keyframes([{offset:0,boxShadow:ly},{offset:1,boxShadow:cy}])]).onFinish(()=>{this.set({isAnimatingTranslate:!1}),M?K||(b.style.setProperty("height","calc(100% - 120px)"),b.style.setProperty("max-height","calc(100% - 120px)")):(b.style.setProperty("height","100%"),b.style.setProperty("max-height","100%"))}),this.set({isAnimatingTranslate:!0}),this.animationSidebarTranslate.play()}),this.hold(this.select((0,v.Cc)(["allWorkspacesActive","mainContentEl","allWorkspacesEl"]),(0,w.x)(({allWorkspacesActive:b},{allWorkspacesActive:k})=>b===k),(0,go.T)(1)),({allWorkspacesActive:b,mainContentEl:k,allWorkspacesEl:M})=>{this.allWorkspacesView?.setFullyVisible(!1),b&&this.set({allWorkspacesVisible:!0});const Oe=(window.getComputedStyle(k).transform||"").replace(")",", ").split(", ")[4],We=b?"-100%":"0%",T=(window.getComputedStyle(M).transform||"").replace(")",", ").split(", ")[4],Ue=b?"0%":"100%";this.animationMainContentTranslate&&this.animationMainContentTranslate.destroy(),k.style.setProperty("pointer-events","none"),M.style.setProperty("pointer-events","none"),b||this.allWorkspacesView?.blurSearchInput(),this.animationMainContentTranslate=this.animationCtrl.create("t5s-organization-main-content-transform-animation").addAnimation([this.animationCtrl.create("t5s-organization-main-content-transform-animation-1").addElement(k).keyframes([{offset:0,transform:`translateX(${Oe}px) translateY(0px) translateZ(0px)`},{offset:1,transform:`translateX(${We}) translateY(0px) translateZ(0px)`}]),this.animationCtrl.create("t5s-organization-main-content-transform-animation-2").addElement(M).keyframes([{offset:0,transform:`translateX(${T}px) translateY(0px) translateZ(0px)`},{offset:1,transform:`translateX(${Ue}) translateY(0px) translateZ(0px)`}])]).duration(500).easing("cubic-bezier(.18,.95,.59,.99)").onFinish(()=>{k.style.setProperty("pointer-events","auto"),M.style.setProperty("pointer-events","auto"),this.allWorkspacesView?.focusSearchInput(),this.allWorkspacesView?.setFullyVisible(b),this.set({allWorkspacesVisible:b})}),this.animationMainContentTranslate.play()}),this.hold(this.resizeDragIndicatorMousedown$$.pipe((0,p.U)(({element:b})=>({element:b,rect:b.getBoundingClientRect()})),(0,gt.b)(({element:b})=>{this.set({isResizing:!0}),b.style.setProperty("opacity","1")}),(0,L.w)(({element:b,rect:k})=>(0,mn.T)((0,Ve.R)(this.document,"mousemove",{passive:!0}).pipe((0,p.U)(M=>M.clientX)),(0,Ve.R)(this.document,"touchmove",{passive:!0}).pipe((0,p.U)(M=>M.touches[0].clientX))).pipe((0,Nl.Ah)(50),(0,gt.b)(M=>{const K=k.x-M,Oe=this.get().width,P=Math.max(220,Math.min(480,Oe-K)),Ue=(this.get().widthOptimistic??Oe)-P;
10!==Ue&&this.optimisticGlobalWidthService.applyMainContentWidthOptimistically(Ue),this.set({widthOptimistic:P})}),(0,mo.R)((0,mn.T)((0,Ve.R)(this.document,"mouseup",{passive:!0}),(0,Ve.R)(this.document,"touchend",{passive:!0})).pipe((0,be.q)(1),(0,gt.b)(()=>{this.set({isResizing:!1}),b.style.removeProperty("opacity");const M=this.get().widthOptimistic;M&&(this.emitConfigChange({sidebarWidth:Math.round(M)}),setTimeout(()=>this.set({widthOptimistic:null})))}))))))),this.hold(this.select((0,v.Cc)(["isResizing"])),({isResizing:b})=>{if(!b)return i.nativeElement.style.removeProperty("pointer-events"),void this.document.body.style.removeProperty("cursor");i.nativeElement.style.setProperty("pointer-events","none"),this.document.body.style.setProperty("cursor","col-resize")}),this.hold(this.resizeDragIndicatorMousedown$$.pipe((0,L.w)(()=>(0,Ve.R)(this.document,"mouseup",{passive:!0}).pipe((0,be.q)(1),(0,mo.R)((0,Ve.R)(this.document,"mousemove",{passive:!0}).pipe((0,be.q)(1)))))),()=>{const{isCollapsed:b}=this.get();this.set({isHovered:!1,isMouseNearSidebar:!1}),this.emitConfigChange({isCollapsed:!b})}),this.hold(this.output$,b=>{b.type===I.CONTEXT_CHANGE?this.context$$.next(b.context):this.sidebarOutput.emit(b)}),!(0,qn.b1)()&&!(0,qn.s2)()&&this.hold(this.isVisibleWithoutMouseNearSidebar$.pipe((0,q.h)(b=>!b),(0,L.w)(()=>(0,Ve.R)(this.document,"mousemove",{passive:!0}).pipe((0,p.U)(b=>b.clientX<20||b.clientY<60&&b.clientX<48),(0,pt.O)(!1),(0,w.x)(),(0,gt.b)(b=>this.set({isMouseNearSidebar:b})),(0,mo.R)(this.isVisibleWithoutMouseNearSidebar$.pipe((0,q.h)(b=>b),(0,gt.b)(()=>this.set({isMouseNearSidebar:!0})),(0,be.q)(1))))))),this.hold((0,V.aj)([this.isCollapsed$.pipe((0,w.x)())]).pipe((0,go.T)(1)),([b])=>{const k=this.get().width;this.optimisticGlobalWidthService.applyMainContentWidthOptimistically(b?k:-k)})}set lookup(n){this.hold(n,t=>{!t||this.lookup$$.next(t)})}set showSettingsEntry(n){this.setProperty("showSettingsEntry",n)}set config(n){this.hold(n,t=>{!t||this.config$$.next({...t,sidebarWidth:Math.min(480,Math.max(220,t.sidebarWidth||318))})})}set router(n){this.hold(n,t=>{!t||this.router$$.next(t)})}set settings(n){this.hold(n,t=>{!t||this.settings$$.next(t)})}set sessions(n){this.hold(n,t=>{!t||this.sessions$$.next(t)})}set loadingState(n){this.hold(n,t=>{!t||this.loadingState$$.next(t)})}set exploreChecklist(n){this.hold(n,t=>{!t||this.exploreChecklist$$.next(t)})}resizeDragIndicatorMousedown(n){const t=n.target;return n.preventDefault(),this.resizeDragIndicatorMousedown$$.next({element:t}),!1}
1canShowAllWorkspaces(){const{actor:n}=this.get(),i=this.lookup$$.getValue().users.find(s=>s.id===(0,Se.m0)(n));if(!i)return!1;const o=i?.info?.role;return!!(0,Ct.lp)(o,ue.UD.ORG_MEMBER)}setIsHovered({isHovered:n}){(0,qn.b1)()||(0,qn.s2)()||this.set({isHovered:n})}emitConfigChange(n){this.sidebarOutput.emit({type:I.CONFIG_CHANGE,config:n})}static#e=this.\u0275fac=function(t){return new(t||Ao)(e.Y36(zt.h),e.Y36(u.K0),e.Y36(e.SBq),e.Y36(Lf.vB),e.Y36(Tt.z),e.Y36(ro),e.Y36(mr),e.Y36(Kn),e.Y36(fr),e.Y36(xr),e.Y36(br),e.Y36(Bl),e.Y36(Da),e.Y36(Cr),e.Y36(vr),e.Y36(Ll.x),e.Y36(Ba),e.Y36(Tn),e.Y36(El),e.Y36(pn.r2))};static#t=this.\u0275cmp=e.Xpm({type:Ao,selectors:[["t5s-organization-sidebar-container-view"]],viewQuery:function(t,i){if(1&t&&(e.Gf(ti,5),e.Gf(ni,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.mainContentView=o.first),e.iGM(o=e.CRH())&&(i.allWorkspacesView=o.first)}},inputs:{lookup:"lookup",showSettingsEntry:"showSettingsEntry",config:"config",router:"router",settings:"settings",sessions:"sessions",loadingState:"loadingState",exploreChecklist:"exploreChecklist"},outputs:{sidebarOutput:"sidebarOutput"},features:[e.qOj],decls:19,vars:151,consts:[[3,"mouseenter","mouseleave"],[3,"position","top","right","sidebarVisible","user-select","-webkit-user-select","numUnreadNotifications","btnClick",4,"ngIf"],[1,"tape-sidebar",3,"t5sElementCreated"],[3,"t5sElementCreated"],[3,"sidebarVisible","showSettingsEntry","allWorkspacesClick"],[3,"display","flex-direction","height","width",4,"ngIf"],[3,"t5sTooltipV3","tooltipOpenAtCursor","tooltipPosition","t5sElementCreated"],[3,"mouseenter","mouseleave","mousedown","touchstart"],["resizeIndicatorTooltip",""],[3,"sidebarVisible","numUnreadNotifications","btnClick"],[3,"backClick"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.NdJ("mouseenter",function(){return i.setIsHovered({isHovered:!0})})("mouseleave",function(){return i.setIsHovered({isHovered:!1})}),e.ALo(1,"push"),e.YNc(2,Nf,1,12,"t5s-organization-sidebar-collapsed-indicator",1),e.ALo(3,"push"),e.TgZ(4,"div")(5,"div",2),e.NdJ("t5sElementCreated",function(s){return i.set({sidebarEl:s.element})}),e.TgZ(6,"div",3),e.NdJ("t5sElementCreated",function(s){return i.set({shadowEl:s.element})}),e.qZA(),e.TgZ(7,"div",3),e.NdJ("t5sElementCreated",function(s){return i.set({resizeBorderEl:s.element})}),e.qZA(),e.TgZ(8,"div"),e.ALo(9,"push"),e.TgZ(10,"div",3),e.NdJ("t5sElementCreated",function(s){return i.set({mainContentEl:s.element})}),e.TgZ(11,"t5s-organization-sidebar-view",4),e.NdJ("allWorkspacesClick",function(){return i.set({allWorkspacesActive:!0})}),e.qZA()(),e.TgZ(12,"div",3),e.NdJ("t5sElementCreated",function(s){return i.set({allWorkspacesEl:s.element})}),e.YNc(13,Rf,2,8,"div",5),e.ALo(14,"push"),e.qZA()(),e.TgZ(15,"div",6),e.NdJ("t5sElementCreated",function(s){return i.set({resizeEl:s.element})}),e.TgZ(16,"div",7),e.NdJ("mouseenter",function(){return i.set({isResizeHovered:!0})})("mouseleave",function(){return i.set({isResizeHovered:!1})})("mousedown",function(s){return i.resizeDragIndicatorMousedown(s)})("touchstart",function(s){return i.resizeDragIndicatorMousedown(s)}),e.qZA()(),e.YNc(17,Pf,13,14,"ng-template",null,8,e.W1O),e.qZA()()()),2&t){const o=e.MAs(18);e.Udp("height",100,"%")("color",i.rgba(i.Color.blackSidebar,.6))("font-weight",500)("--organization-sidebar-nested-hover-buttons-opacity",e.lcZ(1,143,i.showNestedHoverButtons$)?1:0),e.xp6(2),e.Q6J("ngIf",e.lcZ(3,145,i.isCollapsed$)),e.xp6(2),e.Udp("position","absolute")("top",0,"px")("left",0,"px")("bottom",0,"px")("display","flex")("flex-direction","column")("width",0,"px")("overflow","visible")("z-index",9)("pointer-events","none"),e.xp6(1),e.Udp("display","flex")("flex-direction","column")("position","relative")("pointer-events","auto")("visibility","visible")("max-height",100,"%")("height",100,"%")("width",0,"px")("opacity",1)("transition","box-shadow 300ms ease 0s")("border-top-right-radius",i.BORDER_RADIUS_VAR)("border-bottom-right-radius",i.BORDER_RADIUS_VAR),e.xp6(1),e.Udp("display","block")("position","absolute")("inset",0)("border-top-right-radius",i.BORDER_RADIUS_VAR)("border-bottom-right-radius",i.BORDER_RADIUS_VAR)("z-index",-1),e.xp6(1),e.Udp("position","absolute")("inset",0)("border-top-right-radius",i.BORDER_RADIUS_VAR)("border-bottom-right-radius",i.BORDER_RADIUS_VAR)("z-index",-1)("display","block")("transition","box-shadow 300ms ease 0s")("box-shadow",i.rgba(0,0,0,.024)+" -1px 0px 0px 0px inset"),e.xp6(1),e.Udp("opacity",e.lcZ(9,147,i.showSidebarContent$)?1:0)("display","flex")("flex-direction","column")("max-height",100,"%")("height",100,"%")("overflow","hidden")("position","relative")("border-bottom-right-radius",i.BORDER_RADIUS_VAR),e.xp6(2),e.Udp("max-height",100,"%")("height",100,"%")("transform","translateX(0%)"),e.xp6(1),e.Udp("width",100,"%")("height",100,"%"),e.Q6J("sidebarVisible",i.isVisible$)("showSettingsEntry",i.showSettingsEntry$),e.xp6(1),e.Udp("position","absolute")("height",100,"%")("width",100,"%")("pointer-events","none")("transform","translateX(100%)"),e.xp6(1),e.Q6J("ngIf",e.lcZ(14,149,i.allWorkspacesVisible$)),e.xp6(2),e.Udp("position","absolute")("right",0,"px")("width",0,"px")("flex-grow",0)("z-index",1)("top",0,"px")("bottom",0,"px"),e.Q6J("t5sTooltipV3",o)("tooltipOpenAtCursor",!0)("tooltipPosition","right"),e.xp6(1),e.Udp("cursor","col-resize")("height",100,"%")("width",12,"px")}},dependencies:[u.O5,jl.o,it.i,ti,ni,ho,we.f],styles:["[_nghost-%COMP%]{height:100%}"],changeDetection:0})}class Ra{static#e=this.\u0275fac=function(t){return new(t||Ra)};static#t=this.\u0275mod=e.oAB({type:Ra});static#n=this.\u0275inj=e.cJS({providers:[{provide:mr,useValue:new Ke.X({})},{provide:Tn,useFactory:n=>n.asObservable().pipe((0,z.M3)(),(0,p.U)(t=>({config:t}))),deps:[mr]},{provide:Kn,useValue:new Ke.X({})},{provide:dn,useFactory:n=>n.asObservable().pipe((0,z.M3)(),(0,p.U)(t=>({settings:t}))),deps:[Kn]},{provide:fr,useValue:new Ke.X({})},{provide:Da,useFactory:n=>n.asObservable().pipe((0,z.M3)(),(0,p.U)(t=>({sessions:t}))),deps:[fr]},{provide:xr,useValue:new Ke.X({})},{provide:An,useFactory:n=>n.asObservable().pipe((0,z.M3)(),(0,p.U)(t=>({router:t})),(0,Rt.K)()),deps:[xr]},{provide:br,useValue:new Ke.X({})},{provide:El,useFactory:n=>n.asObservable().pipe((0,z.M3)(),(0,p.U)(t=>({context:t}))),deps:[br]},{provide:ro,useValue:new Ke.X(void 0)},{provide:Ut,useFactory:n=>n.asObservable().pipe((0,z.M3)(),(0,p.U)(t=>({lookup:t}))),deps:[ro]},{provide:Cr,useValue:new Ke.X(void 0)},{provide:Ba,useFactory:n=>n.asObservable().pipe((0,z.M3)(),(0,p.U)(t=>({loadingState:t}))),deps:[Cr]},{provide:vr,useValue:new Ke.X(void 0)},{provide:Dl,useFactory:n=>n.asObservable().pipe((0,z.M3)(),(0,p.U)(t=>({exploreChecklist:t}))),deps:[vr]},{provide:He,useValue:new mt.xQ},{provide:Bl,useFactory:n=>n.asObservable(),deps:[He]}],imports:[Re.wW,Oa,u.ez,Je._t,Re.jQ,ve.ZD,Cu.$r,ku.v8,nt.g,Iu.wH,te.U,ke.Z,ct.KV,wu.X,ve.Cl,vu.y,ie.m0,gr.Ox,me.TI,_n.qF,me.FG,me.Xx,Su.p7,Ea.r,Mt.p,yu.D]})}class Pa{static#e=this.\u0275fac=function(t){return new(t||Pa)};static#t=this.\u0275mod=e.oAB({type:Pa});static#n=this.\u0275inj=e.cJS({imports:[Ra,O.x7,ya]})}var $a=r(33710),za=r(91184);const zf=[{provide:za.R,useFactory:()=>new za.R({optimisticWidthPx:null,isResizing:!1})},{provide:za.y,useFactory:a=>a.asObservable(),deps:[za.R]}],Qf=[{provide:Yt.t,useFactory:()=>new Yt.t({isOpen:!1,widthPx:0,isAnimating:!1})},{provide:Yt.p,useFactory:a=>a.asObservable(),deps:[Yt.t]}];var Qa=r(47665);const Ff=[{provide:Qa.f,useFactory:()=>new Qa.f(null)},{provide:Qa.j,useFactory:a=>a.asObservable(),deps:[Qa.f]}];var ii=r(31312);const Jf=new jt.U({[A.SQ0.DE]:{organizationSidebar:{dragResizeTooltip:'Ziehen <span class="tippy-keyboard-shortcut">um anzupassen</span> <br> Zum Schlie\xdfen <span class="tippy-keyboard-shortcut">klicken</span>'}},[A.SQ0.EN]:{organizationSidebar:{dragResizeTooltip:'Drag <span class="tippy-keyboard-shortcut">to resize</span> <br> Click <span class="tippy-keyboard-shortcut">to close</span>'}},[A.SQ0.PT_BR]:{organizationSidebar:{dragResizeTooltip:'Arraste <span class="tippy-keyboard-shortcut">para redimensionar</span> <br> Clique <span class="tippy-keyboard-shortcut">para fechar</span>'}}});var ec=r(96427);const Hf=["userSidebarContainer"],Vf=["userSidebarInnerContainer"],Wf=[[["","logged-in-root-organization-sidebar-new",""]],[["","logged-in-root-main-content",""]],[["","logged-in-root-main-modal",""]],[["","logged-in-root-elevated-main-modal",""]],[["","logged-in-root-main-toast-container",""]],[["","logged-in-root-user-toolbar",""]],[["","logged-in-root-user-sidebar",""]],[["","logged-in-root-user-sidebar-toast",""]],[["","logged-in-root-full-page-modal",""]],[["","logged-in-root-root-modal",""]],[["","logged-in-root-root-modal-overlay",""]],[["","logged-in-root-root-modal-secondary-overlay",""]],[["","logged-in-root-global-search-modal",""]],[["","logged-in-root-root-toast",""]],[["","logged-in-root-callout-host",""]]],Yf=["[logged-in-root-organization-sidebar-new]","[logged-in-root-main-content]","[logged-in-root-main-modal]","[logged-in-root-elevated-main-modal]","[logged-in-root-main-toast-container]","[logged-in-root-user-toolbar]","[logged-in-root-user-sidebar]","[logged-in-root-user-sidebar-toast]","[logged-in-root-full-page-modal]","[logged-in-root-root-modal]","[logged-in-root-root-modal-overlay]","[logged-in-root-root-modal-secondary-overlay]","[logged-in-root-global-search-modal]","[logged-in-root-root-toast]","[logged-in-root-callout-host]"];class Uo extends Re.Hr{constructor(n,t,i,o){super(n,t),this.optimisticGlobalWidthService=o,this.SIDEBAR_WIDTH_TRANSITION_DURATION=200,this.I18n=Jf,this.resizeDragIndicatorMousedown$$=new mt.xQ,this.organizationSidebarWidthChange=new e.vpe,this.collapseOrganizationSidebar=ne
1w e.vpe,this.organizationSidebarExpanded$=this.select((0,v.Cc)(["organizationSidebarExpanded"]),(0,p.U)(({organizationSidebarExpanded:s})=>s)),this.isResizingOrganizationSidebar$=this.select((0,v.Cc)(["isResizingOrganizationSidebar"]),(0,p.U)(({isResizingOrganizationSidebar:s})=>s)),this.mainContentClass=(0,x.I)({backgroundColor:ii._Z.lightest,...c.y6,...c.Mh}),this.mainModalClass$=this.state$.pipe((0,p.U)(s=>(0,x.I)({...c.hw,position:"absolute",display:s.mainModalActive?void 0:"none",zIndex:(0,ce.ur)(ce.mh.MAIN_MODAL),pointerEvents:s.mainModalBlabItemUpsertActive?"none":void 0}))),this.elevatedMainModalClass$=this.state$.pipe((0,p.U)(s=>(0,x.I)({...c.hw,position:"absolute",display:s.elevatedMainModalActive?void 0:"none",zIndex:(0,ce.ur)(ce.mh.MAIN_MODAL_POPOVER)}))),this.nestedCreateStackClass=(0,x.I)({...c.hw,position:"absolute",zIndex:(0,ce.ur)(ce.mh.NESTED_CREATE_STACK),pointerEvents:"none"}),this.globalSearchModalClass=(0,x.I)({...c.hw,position:"absolute",zIndex:(0,ce.ur)(ce.mh.GLOBAL_SEARCH_MODAL),pointerEvents:"none"}),this.orgSidebarContainerClass=(0,x.I)({backgroundColor:ii._Z.lightest,borderRight:(0,c.Cg)(1,"solid",ii._Z.light),...c.bf,...c.y6}),this.userToolbarClass=(0,x.I)({position:"relative",zIndex:(0,ce.ur)(ce.mh.USER_SIDEBAR),backgroundColor:ii._Z.lightest,width:(0,c.px)(61),...c.bf}),this.userSidebarOpen$=this.select((0,v.Cc)(["userSidebarActive"]),(0,p.U)(({userSidebarActive:s})=>s),(0,lt.b)(0),(0,w.x)()),this.userSidebarClass$=this.userSidebarOpen$.pipe((0,p.U)(s=>(0,x.I)({backgroundColor:ii._Z.lightest,position:"relative",zIndex:(0,ce.ur)(ce.mh.USER_SIDEBAR),transitionProperty:"width",transitionDuration:(0,c.ms)(200),transitionTimingFunction:"ease",borderLeft:(0,c.Cg)(1,"solid",ii._Z.light),...(0,ec.rh)({borderLeft:0,boxShadow:"0 1px 1px -3px rgba(0, 0, 0, 0.2), 0 3px 1px -1px rgba(0, 0, 0, 0.14), 0 1px 5px 2px rgba(0, 0, 0, 0.12)",...c.p4,position:"absolute",right:0})})),(0,w.x)()),this.fullPageModalContainerClass$=this.state$.pipe((0,p.U)(s=>(0,x.I)({...c.wc,display:s.fullPageModalActive?"block":"none",position:"absolute",zIndex:(0,ce.ur)(ce.mh.FULL_PAGE_MODAL)}))),this.rootModalContainerClass$=this.state$.pipe((0,p.U)(s=>(0,x.I)({...c.wc,display:s.rootModalActive?"block":"none",position:"absolute",zIndex:(0,ce.ur)(ce.mh.ROOT_MODAL)}))),this.rootModalOverlayClass$=this.state$.pipe((0,p.U)(s=>(0,x.I)({...c.wc,display:s.rootModalOverlayActive?"block":"none",position:"absolute",zIndex:(0,ce.ur)(ce.mh.ROOT_MODAL_OVERLAY)}))),this.rootModalSecondaryOverlayClass$=this.state$.pipe((0,p.U)(s=>(0,x.I)({...c.wc,display:s.rootModalSecondaryOverlayActive?"block":"none",position:"absolute",zIndex:(0,ce.ur)(ce.mh.ROOT_MODAL_SECONDARY_OVERLAY)}))),this.set({permissionsV2:!1,organizationSidebarExpanded:!0,organizationSidebarWidth:326,optimisticOrganizationSidebarWidth:null,isResizingOrganizationSidebar:!1}),this.hold(this.resizeDragIndicatorMousedown$$.pipe((0,p.U)(({element:s})=>({element:s,rect:s.getBoundingClientRect()})),(0,gt.b)(({element:s})=>{this.set({isResizingOrganizationSidebar:!0}),s.style.setProperty("opacity","1")}),(0,L.w)(({element:s,rect:l})=>(0,mn.T)((0,Ve.R)(document,"mousemove",{passive:!0}).pipe((0,p.U)(d=>d.clientX)),(0,Ve.R)(document,"touchmove",{passive:!0}).pipe((0,p.U)(d=>d.touches[0].clientX))).pipe((0,gt.b)(d=>{const h=-1*(l.x-d),m=this.get().organizationSidebarWidth,C=Math.max(190,Math.min(500,m+h));this.set({optimisticOrganizationSidebarWidth:C})}),(0,mo.R)((0,mn.T)((0,Ve.R)(document,"mouseup",{passive:!0}),(0,Ve.R)(document,"touchend",{passive:!0})).pipe((0,be.q)(1),(0,gt.b)(()=>{this.set({isResizingOrganizationSidebar:!1}),s.style.removeProperty("opacity");const d=this.get().optimisticOrganizationSidebarWidth;d&&(this.organizationSidebarWidthChange.emit({width:Math.round(d)}),setTimeout(()=>this.set({optimisticOrganizationSidebarWidth:null})))}))))))),this.hold(this.select((0,v.Cc)(["isResizingOrganizationSidebar"])),({isResizingOrganizationSidebar:s})=>{if(!s)return i.nativeElement.style.removeProperty("pointer-events"),void document.body.style.removeProperty("cursor");i.nativeElement.style.setProperty("pointer-events","none"),document.body.style.setProperty("cursor","col-resize")}),this.hold(this.resizeDragIndicatorMousedown$$.pipe((0,L.w)(()=>(0,Ve.R)(document,"mouseup",{passive:!0}).pipe((0,be.q)(1),(0,mo.R)((0,Ve.R)(document,"mousemove",{passive:!0}).pipe((0,be.q)(1)))))),()=>{this.collapseOrganizationSidebar.emit()}),this.hold(this.userSidebarOpen$,s=>{const l=this.userSidebarContainer.nativeElement,d=this.userSidebarInnerContainer.nativeElement;s?(l.style.setProperty("width","326px"),d.style.setProperty("min-width","326px")):(l.style.setProperty("width","0"),d.style.setProperty("min-width","0"))}),this.hold(this.userSidebarOpen$.pipe((0,go.T)(1)),s=>{window.innerWidth<ec.J2||this.optimisticGlobalWidthService.applyM
1ainContentWidthOptimistically(s?-325:325)})}set mainModalActive(n){this.setProperty("mainModalActive",n)}set mainModalBlabItemUpsertActive(n){this.setProperty("mainModalBlabItemUpsertActive",n)}set permissionsV2(n){this.setProperty("permissionsV2",n)}set elevatedMainModalActive(n){this.setProperty("elevatedMainModalActive",n)}set rootModalActive(n){this.setProperty("rootModalActive",n)}set fullPageModalActive(n){this.setProperty("fullPageModalActive",n)}set rootModalOverlayActive(n){this.setProperty("rootModalOverlayActive",n)}set rootModalSecondaryOverlayActive(n){this.setProperty("rootModalSecondaryOverlayActive",n)}set userSidebarActive(n){this.setProperty("userSidebarActive",n)}set organizationSidebarExpanded(n){this.setProperty("organizationSidebarExpanded",n)}set organizationSidebarWidth(n){this.setProperty("organizationSidebarWidth",n)}resizeDragIndicatorMousedown(n){const t=n.target;return n.preventDefault(),this.resizeDragIndicatorMousedown$$.next({element:t}),!1}ngAfterViewInit(){this.initializeUserSidebarContainerElements()}initializeUserSidebarContainerElements(){this.userSidebarContainer.nativeElement.style.setProperty("width","0"),this.userSidebarInnerContainer.nativeElement.style.setProperty("min-width","0")}static#e=this.\u0275fac=function(t){return new(t||Uo)(e.Y36(c.Q2),e.Y36(ut.UG),e.Y36(e.SBq),e.Y36(Ll.x))};static#t=this.\u0275cmp=e.Xpm({type:Uo,selectors:[["t5s-logged-in-root-view"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Hf,5),e.Gf(Vf,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.userSidebarContainer=o.first),e.iGM(o=e.CRH())&&(i.userSidebarInnerContainer=o.first)}},inputs:{mainModalActive:"mainModalActive",mainModalBlabItemUpsertActive:"mainModalBlabItemUpsertActive",permissionsV2:"permissionsV2",elevatedMainModalActive:"elevatedMainModalActive",rootModalActive:"rootModalActive",fullPageModalActive:"fullPageModalActive",rootModalOverlayActive:"rootModalOverlayActive",rootModalSecondaryOverlayActive:"rootModalSecondaryOverlayActive",userSidebarActive:"userSidebarActive",organizationSidebarExpanded:"organizationSidebarExpanded",organizationSidebarWidth:"organizationSidebarWidth"},outputs:{organizationSidebarWidthChange:"organizationSidebarWidthChange",collapseOrganizationSidebar:"collapseOrganizationSidebar"},features:[e.qOj],ngContentSelectors:Yf,decls:40,vars:74,consts:[["id","t5s-logged-in-root-main-content"],["id","t5s-logged-in-root-main-modal"],["id","t5s-logged-in-root-elevated-main-modal"],["id","t5s-logged-in-root-nested-create-stack"],["id","t5s-logged-in-root-user-toolbar","data-block-def-selection-clear","true"],["id","t5s-logged-in-root-user-sidebar","data-block-def-selection-clear","true",3,"t5sElementCreated"],["userSidebarContainer",""],["userSidebarInnerContainer",""],["id","t5s-logged-in-root-full-page-modal"],["id","t5s-logged-in-root-root-modal"],["id","t5s-logged-in-root-root-modal-overlay"],["id","t5s-logged-in-root-root-modal-secondary-overlay"],["id","t5s-logged-in-root-global-search-modal"]],template:function(t,i){1&t&&(e.F$t(Wf),e.TgZ(0,"div")(1,"div")(2,"div"),e.Hsn(3),e.qZA(),e.TgZ(4,"div")(5,"div",0),e.Hsn(6,1),e.qZA()(),e.TgZ(7,"div",1),e.ALo(8,"async"),e.Hsn(9,2),e.qZA(),e.TgZ(10,"div",2),e.ALo(11,"async"),e.Hsn(12,3),e.qZA(),e._UZ(13,"div",3),e.Hsn(14,4),e.qZA(),e.TgZ(15,"div",4),e.Hsn(16,5),e.qZA(),e.TgZ(17,"div",5,6),e.NdJ("t5sElementCreated",function(){return i.initializeUserSidebarContainerElements()}),e.ALo(19,"async"),e.TgZ(20,"div",null,7),e.Hsn(22,6),e.qZA()(),e.Hsn(23,7),e.TgZ(24,"div",8),e.ALo(25,"async"),e.Hsn(26,8),e.qZA(),e.TgZ(27,"div",9),e.ALo(28,"async"),e.Hsn(29,9),e.qZA(),e.TgZ(30,"div",10),e.ALo(31,"async"),e.Hsn(32,10),e.qZA(),e.TgZ(33,"div",11),e.ALo(34,"async"),e.Hsn(35,11),e.qZA(),e.TgZ(36,"div",12),e.Hsn(37,12),e.qZA(),e.Hsn(38,13),e.Hsn(39,14),e.qZA()),2&t&&(e.Udp("width",100,"%")("height",100,"%")("position","relative")("display","flex")("flex-direction","row"),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("position","relative")("flex",1)("min-width",0),e.xp6(1),e.Udp("position","relative")("z-index",1),e.xp6(2),e.Tol(i.mainContentClass),e.xp6(1),e.Udp("width",100,"%")("height",100,"%")("position","relative")("z-index",0),e.xp6(2),e.Tol(e.lcZ(8,60,i.mainModalClass$)),e.xp6(3),e.Tol(e.lcZ(11,62,i.elevatedMainModalClass$)),e.xp6(3),e.Tol(i.nestedCreateStackClass),e.xp6(2),e.Tol(i.userToolbarClass),e.xp6(2),e.Tol(e.lcZ(19,64,i.userSidebarClass$)),e.xp6(3),e.Udp("width",100,"%")("max-width",326,"px")("height",100,"%"),e.xp6(4),e.Tol(e.lcZ(25,66,i.fullPageModalContainerClass$)),e.xp6(3),e.Tol(e.lcZ(28,68,i.rootMod
1alContainerClass$)),e.xp6(3),e.Tol(e.lcZ(31,70,i.rootModalOverlayClass$)),e.xp6(3),e.Tol(e.lcZ(34,72,i.rootModalSecondaryOverlayClass$)),e.xp6(3),e.Tol(i.globalSearchModalClass))},dependencies:[jl.o,u.Ov],encapsulation:2,changeDetection:0})}class Fa{static#e=this.\u0275fac=function(t){return new(t||Fa)};static#t=this.\u0275mod=e.oAB({type:Fa});static#n=this.\u0275inj=e.cJS({imports:[Re.jQ]})}var Dn=r(38477),Oo=r(5567);const qf=[{outlet:J.P7,path:J.kH.fragment,loadChildren:()=>Promise.all([r.e(1864),r.e(2471),r.e(5513),r.e(5286),r.e(294),r.e(8424),r.e(316),r.e(9013),r.e(5679)]).then(r.bind(r,5679)).then(a=>a.BlabItemCustomizePageModule),data:{preload:!0}}];var Ot=r(80205),Ft=r(80257),oi=r(2565),ai=r(17526),Xf=r(73987),nc=r(3025),Ga=r(10415),Er=r(27242),e1=r(54904),t1=r(14068),ic=r(47660),n1=r(49370),Ja=r(1827),si=r(93511),ft=r(90546),i1=r(71112),oc=r(98725),Dr=r(84219),Ha=r(30769),o1=r(84926),a1=r(3575),s1=r(80560),Et=r(63132),vt=r(96656),r1=r(83772);const ac=i1.wb,It=ft.i.key,sc={i18n:ft.i,key:It.badge.title},l1={i18n:ft.i,key:It.badge.titleComplete},rc={i18n:ft.i,key:It.overlay.titleWelcome},c1={i18n:ft.i,key:It.overlay.titleKeepGoing},p1={i18n:ft.i,key:It.overlay.titleComplete},lc={i18n:ft.i,key:It.overlay.subtitle},cc={i18n:ft.i,key:It.overlay.subtitleSecondLine},d1={i18n:ft.i,key:It.overlay.subtitleComplete},u1={visible:!1,open:!1,steps:[],completedStepIds:[],reward:null,badgeTitle:sc,overlayTitle:rc,overlaySubtitle:lc,overlaySubtitleSecondLine:cc,progressAriaValueText:"",dismissAriaLabel:"",badgeTooltip:"",user:null};class Va extends tt.I{constructor(n,t,i,o){super(),this.store$=n,this.dialogService=t,this.i18n$=i,this.featureAccessLevel$=o,this.lookup$=this.store$.select(O.JH),this.config$=this.store$.select(O.L4),this.router$=this.store$.select(O.QV),this.settings$=this.store$.select(O.TL),this.sessions$=this.store$.select(O.XO),this.loadingState$=this.store$.select(O.oN),this.exploreChecklistEligible$=(0,V.aj)([this.store$.select(Et.pb),this.store$.select(Et.xD),this.featureAccessLevel$.pipe((0,pt.O)(void 0),(0,w.x)())]).pipe((0,p.U)(([s,l,d])=>s&&(0,oc.t4)({def:ac,...l,featureAccessLevel:d})),(0,w.x)()),this.exploreChecklistUserDef$=(0,V.aj)([this.store$.select(Et.pM),this.featureAccessLevel$.pipe((0,pt.O)(void 0),(0,w.x)())]).pipe((0,w.x)(([s,l],[d,h])=>s===d&&l===h),(0,p.U)(([s,l])=>
1(0,oc.Kd)({def:ac,isOrganizationCreator:s,featureAccessLevel:l}))),this.exploreChecklist$=this.exploreChecklistEligible$.pipe((0,L.w)(s=>s?(0,V.aj)([this.store$.select(Et.C$),this.store$.select(Et.bf),this.store$.select(Et.hW).pipe((0,Rt.K)()),this.i18n$,this.exploreChecklistUserDef$]).pipe((0,p.U)(([l,d,h,m,C])=>function _1(a,n,t,i,o){const s=new Set(n),l=o.steps.filter(m=>s.has(m.id)).length,d=o.steps.length>0&&l===o.steps.length,h=t?.info&&(0,$e.b3)({user:t,i18n:i}).trim()||void 0;return{visible:!0,open:a,steps:o.steps,completedStepIds:n,reward:void 0===o.reward?null:{...o.reward,unlockedTitle:void 0===h?{i18n:ft.i,key:It.reward.unlockedTitleAnonymous}:{i18n:ft.i,key:It.reward.unlockedTitle,params:{name:h}}},badgeTitle:d?l1:sc,overlayTitle:d?p1:0===l?rc:c1,overlaySubtitle:d?d1:lc,overlaySubtitleSecondLine:d?null:cc,progressAriaValueText:ft.i.translate(i,{key:It.badge.progressValueText,params:{completedCount:l,totalCount:o.steps.length}}),dismissAriaLabel:ft.i.translate(i,It.badge.dismiss),badgeTooltip:ft.i.translate(i,It.badge.tooltip),user:t??null}}(l,d,h,m,C))):(0,Ha.of)(u1))),this.I18n=fe.EU}sidebarOutput(n){switch(n.type){case I.EXPLORE_CHECKLIST_TOGGLE:this.store$.dispatch(Et.Zv.toggleOverlay());break;case I.EXPLORE_CHECKLIST_CLOSE:this.store$.dispatch(Et.Zv.closeOverlay());break;case I.EXPLORE_CHECKLIST_DISMISS:this.store$.dispatch(Et.Zv.dismissBadge());break;case I.EXPLORE_CHECKLIST_SEEN:this.store$.dispatch(Et.Zv.overlaySeen());break;case I.EXPLORE_CHECKLIST_STEP_CLICK:this.store$.dispatch(Et.Zv.stepClicked({stepId:n.stepId}));break;case I.EXPLORE_CHECKLIST_REWARD_CLAIM:this.store$.dispatch(Et.Zv.claimReward());break;case I.OPEN_HOME:this.store$.dispatch(O.Mi.openHome());break;case I.OPEN_FOCUS:this.store$.dispatch(O.Mi.openFocus());break;case I.OPEN_GLOBAL_SEARCH:this.store$.dispatch(Ne.xA.openModal());break;case I.OPEN_SETTINGS:this.store$.dispatch(O.Mi.openSettings());break;case I.OPEN_WORKFLOW_CENTER:this.store$.dispatch(O.Mi.openWorkflowCenter());break;case I.OPEN_WORKSPACE_TEMPLATE_MARKET:this.store$.dispatch(O.Mi.openWorkspaceTemplateMarket());break;case I.OPEN_ORGANIZATION_INVITE:this.store$.dispatch(O.Mi.openOrganizationInvite());break;case I.OPEN_ORGANIZATION_CREATE:this.store$.dispatch(O.Mi.openOrganizationCreate());break;case I.OPEN_ORGANIZATION_UPGRADE:this.store$.dispatch(O.Mi.openOrganizationUpgrade());break;case I.CONFIG_CHANGE:this.store$.dispatch(O.Eg.partiallyUpdateConfig({config:n.config}));break;case I.USER_SETTINGS_CHANGE:this.store$.dispatch(O.Eg.updateUserOrganizationSidebarSettings({update:n.settings}));break;case I.OPEN_TRY_NEW_RECORD_DIALOG:this.openTryNewRecordDialog(n.organizationName,n.currentState);break;case I.OPEN_WORKSPACE:this.store$.dispatch(O.VV.openWorkspace({workspace:n.workspace}));break;case I.OPEN_WORKSPACE_SETTINGS:this.store$.dispatch(O.VV.openWorkspaceSettings({workspaceId:n.workspaceId}));break;case I.OPEN_WORKSPACE_MEMBER_INVITE:this.store$.dispatch(O.VV.openWorkspaceMemberInvite({workspaceId:n.workspaceId}));break;case I.OPEN_WORKSPACE_CREATION:this.store$.dispatch(O.VV.openWorkspaceCreate());break;case I.JOIN_WORKSPACE:this.store$.dispatch(O.VV.joinWorkspace({workspaceId:n.workspaceId}));break;case I.LEAVE_WORKSPACE:this.store$.dispatch(O.VV.requestLeaveWorkspace({workspaceId:n.workspaceId,userId:n.userId}));break;case I.COPY_WORKSPACE_LINK:this.store$.dispatch(O.VV.copyWorkspaceLink({url:n.url}));break;case I.DUPLICATE_WORKSPACE:this.store$.dispatch(O.VV.duplicateWorkspace({workspaceId:n.workspaceId}));break;case I.ARCHIVE_WORKSPACE:this.store$.dispatch(O.VV.requestArchiveWorkspace({workspaceId:n.workspaceId}));break;case I.UNARCHIVE_WORKSPACE:this.store$.dispatch(O.VV.unarchiveWorkspace({workspaceId:n.workspaceId}));break;case I.DELETE_WORKSPACE:this.store$.dispatch(r1.Y.requestDeleteWorkspace({workspaceId:n.workspaceId}));break;case I.GET_WORKSPACES:this.store$.dispatch(Er.mD.getOrganization());break;case I.OPEN_BLAB_DEF:this.store$.dispatch(O.m1.openBlabDef({blabDef:n.blabDef}));break;case I.CREATE_BLAB_DEF:this.store$.dispatch(n.viaImport?a1.QQ.pickImportBlabDefDataFile({forWorkspaceId:n.workspaceId}):O.m1.createBlabDef({workspaceId:n.workspaceId,position:n.position,viaTemplate:n.viaTemplate,viaImport:n.viaImport}));break;
1case I.DUPLICATE_BLAB_DEF:this.store$.dispatch(O.m1.duplicateBlabDef({blabDefId:n.blabDefId}));break;case I.DELETE_BLAB_DEF:this.store$.dispatch(s1.Q.requestDeleteBlabDef({blabDefId:n.blabDefId}));break;case I.COPY_BLAB_DEF_LINK:this.store$.dispatch(O.m1.copyBlabDefLink({url:n.url}));break;case I.UPDATE_BLAB_DEF_INFO:this.store$.dispatch(o1.I.requestUpdateBlabDefInfo({blabDefUpdate:n.blabDefUpdate,commit:n.commit}));break;case I.MOVE_BLAB_DEF:this.store$.dispatch(O.m1.requestMoveBlabDef({input:n}));break;case I.OPEN_BLAB_ITEM:this.store$.dispatch(O.Ei.openBlabItem({blabItem:n.blabItem}));break;case I.CREATE_BLAB_ITEM:this.store$.dispatch(O.Ei.createBlabItem({blabDefId:n.blabDefId})),this.store$.dispatch(O._g.setBlabItemQuickCreationRecentBlabDef({blabDefId:n.blabDefId}));break;case I.COPY_BLAB_ITEM_LINK:this.store$.dispatch(O.Ei.copyBlabItemLink({url:n.url}));break;case I.USER_SESSION_RETRIEVE:this.store$.dispatch(O.wS.getUserSessions({input:{}}));break;case I.USER_SESSION_SELECT:{const{organizationId:i}=n;this.store$.dispatch(O.wS.selectUserSession({userId:n.userId})),this.store$.dispatch(Sl.Gt.setActiveActorContext({actor:{type:un.g.USER,activeUserId:n.userId,organizationId:i}})),this.store$.dispatch(vt.nF.switchToSession({userId:n.userId}));break}case I.USER_SESSION_CREATE:this.store$.dispatch(O.wS.createUserSession());break;case I.USER_SESSION_UPDATES:this.store$.dispatch(O.wS.updateUserSessions({userSessionUpdates:n.userSessionUpdates}));break;case I.USER_SESSIONS_REMOVE:{const{userIds:t,selectSessionUserId:i}=n;this.store$.dispatch(O.wS.removeUserSessions({input:{userIds:t},afterRemovalSelectSessionUserId:i}));break}case I.SHARED_CONTENT_RETRIEVE:this.store$.dispatch(Er.mD.getActiveUserSharedContent({input:{searchQuery:n.searchQuery}}))}}openTryNewRecordDialog(n,t){const i=(0,V.aj)([this.i18n$,this.store$.select(vt.Ux),this.store$.select(Pt.yf)]).pipe((0,be.q)(1));this.hold(i,([o,s,l])=>{const d={off:{id:"off",title:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.off.label),description:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.off.description),confirmButtonLabel:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.off.confirmButton)},"for-you":{id:"for-you",title:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.forYou.label),description:this.I18n.translate(o,{key:this.I18n.key.tryNewRecordDialog.forYou.description,params:{organizationName:n}}),confirmButtonLabel:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.forYou.confirmButton)},"for-all":{id:"for-all",title:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.forAll.label),description:this.I18n.translate(o,{key:this.I18n.key.tryNewRecordDialog.forAll.description,params:{organizationName:n}}),confirmButtonLabel:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.forAll.confirmButton),confirmInputWithText:n}},h=t===ot.OFF?["for-you","for-all"]:t===ot.ON_FOR_YOU?["off","for-all"]:["off","for-you"],m=h.map(f=>d[f]),C=h[0],{result$:S}=this.dialogService.chooseCardAction({title:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.title),headerIcon:y.Lmt,headerIconSize:32,headerIconColor:(0,c.m4)(c.Il.black,.45),align:"center",width:400,confirmColor:c.Il.blue,confirmStyle:"contained",confirmFontWeight:500,confirmDisableBoxShadow:!0,cancelStyle:"outlined",cancelFontWeight:500,autofocus:!1,disableMouseFocus:!0,textInputValidationErrorMessage:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.forAll.textInputValidationError),defaultSelectedCardId:C,cards:m,cancel:this.I18n.translate(o,this.I18n.key.tryNewRecordDialog.cancel)});this.hold(S.pipe((0,be.q)(1)),({confirmed:f,selectedCardId:E})=>{if(!f)return;const Z=l?.enableForUserIds??[];if("for-you"===E&&void 0!==s){const R=Z.includes(s)?Z:[...Z,s];this.store$.dispatch(_t.requestUpdateOrganizationNewRecordExperienceSettings({update:{enableForActiveUser:!0,enableForAllUsers:!1,enableForUserIds:R},commit:!0}))}else if("for-all"===E)this.store$.dispatch(_t.requestUpdateOrganizationNewRecordExperienceSettings({update:{enableForAllUsers:!0,enableForUserIds:Z},commit:!0}));else if("off"===E&&void 0!==s){const R=Z.filter(G=>G!==s);
1this.store$.dispatch(_t.requestUpdateOrganizationNewRecordExperienceSettings({update:{enableForActiveUser:!1,enableForAllUsers:!1,enableForUserIds:R},commit:!0}))}})})}static#e=this.\u0275fac=function(t){return new(t||Va)(e.Y36(g.yh),e.Y36(Dr.xA),e.Y36(ut.UG),e.Y36(En.H))};static#t=this.\u0275cmp=e.Xpm({type:Va,selectors:[["t5s-organization-sidebar-page"]],features:[e.qOj],decls:1,vars:8,consts:[[3,"lookup","config","router","settings","sessions","loadingState","exploreChecklist","showSettingsEntry","sidebarOutput"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-organization-sidebar-container-view",0),e.NdJ("sidebarOutput",function(s){return i.sidebarOutput(s)}),e.qZA()),2&t&&e.Q6J("lookup",i.lookup$)("config",i.config$)("router",i.router$)("settings",i.settings$)("sessions",i.sessions$)("loadingState",i.loadingState$)("exploreChecklist",i.exploreChecklist$)("showSettingsEntry",!0)},dependencies:[Ao],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var h1=r(65421);class Wa{static#e=this.\u0275fac=function(t){return new(t||Wa)};static#t=this.\u0275cmp=e.Xpm({type:Wa,selectors:[["t5s-main"]],decls:1,vars:4,template:function(t,i){1&t&&e._UZ(0,"t5s-main-content-container"),2&t&&e.Udp("width",100,"%")("height",100,"%")},dependencies:[h1.X],styles:["[_nghost-%COMP%]{height:100%;width:100%;position:relative}"],changeDetection:0})}var g1=r(60914);const m1=["toastContainer"];class Ya{constructor(n){this.toastOverlay=n,this.width=500,this.toastOverlayContainerClass=(0,x.I)({position:"absolute",width:(0,c.px)(this.width),bottom:(0,c.px)(32),left:(0,c.aQ)(50),marginLeft:(0,c.px)(-this.width/2),zIndex:(0,ce.ur)(ce.mh.ROOT_TOAST),maxWidth:(0,c.px)(500),...c._7,"> div":{...c.i3,...c._7}})}ngOnInit(){this.toastOverlay.registerOverlayContainerElement(this.toastContainer.nativeElement)}static#e=this.\u0275fac=function(t){return new(t||Ya)(e.Y36(g1.V))};static#t=this.\u0275cmp=e.Xpm({type:Ya,selectors:[["t5s-root-toast-container"]],viewQuery:function(t,i){if(1&t&&e.Gf(m1,7),2&t){let o;e.iGM(o=e.CRH())&&(i.toastContainer=o.first)}},decls:2,vars:2,consts:[["toastContainer",""]],template:function(t,i){1&t&&e._UZ(0,"div",null,0),2&t&&e.Tol(i.toastOverlayContainerClass)},encapsulation:2,changeDetection:0})}var pe=r(14805),qe=r(79710),Bn=r(67604),pc=r(73430),Lt=r(68942),tn=r(95036),Eo=r(20296),De=r(42989),Br=r(49471),dc=r(3121);class ri extends ce.Ax{constructor(){super(...arguments),this.layer=ce.mh.SEMI_GLOBAL_OVERLAY}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(ri)))(i||ri)}}();static#t=this.\u0275prov=e.Yz7({token:ri,factory:ri.\u0275fac})}const f1=(0,g.P1)(vt.Ux,ic.kb,(a,n)=>a?n[a]??{}:{});var x1=r(24056),Le=r(47506),_c=r(62641);function b1(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",1),e.NdJ("click",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.btnClick.emit({event:o}))}),e.qZA(),e._UZ(2,"t5s-avatar",2),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getBtnClass(t)),e.xp6(1),e.Q6J("state",i.avatarState$)("borderColor","rgba(227, 226, 224, 1)")}}class li extends v.Oo{constructor(){super(...arguments),this.btnClick=new e.vpe,this.avatarState$=this.state$.pipe((0,p.U)(n=>({size:34,user:n.activeUser,fullImgUrl:n.activeUser?.profilePicture?.small?n.activeUser?.profilePicture?.small+"?component=user-sidebar-avatar":void 0})))}set activeUser(n){this.set({activeUser:n})}getBtnClass(n){return(0,x.I)({...c.eP,position:"absolute",...(0,c.In)(42),margin:(0,c.px)(-4),cursor:"pointer",...(0,c.Mr)({boxShadow:(0,c.mZ)(4,(0,c.$n)(n.theme.color.darkest,.9))}),...(0,c.bB)({boxShadow:(0,c.mZ)(4,(0,c.$n)(n.theme.color.darkest,.8))})})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(li)))(i||li)}}();static#t=this.\u0275cmp=e.Xpm({type:li,selectors:[["t5s-user-sidebar-avatar-button"]],inputs:{activeUser:"activeUser"},outputs:{btnClick:"btnClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["data-cy","t5s-wc-active-user-menu-btn",3,"click"],[3,"state","borderColor"]],template:function(t,i){1&t&&(e.YNc(0,b1,3,4,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,_c.A,u.Ov],encapsulation:2,changeDetection:0})}const v1=new jt.U({[A.SQ0.DE]:{dnd:"Bitte nicht st\xf6ren",dndInfinite:"Pausiert bis Reaktivierung",dndUntil:"Pausiert bis {{until}}",editStatus:"Status bearbeiten",logout:"Abmelden",editProfile:"Profil bearbeiten",set_incognito_off:"Setze dich auf aktiv",set_incognito_on:"Setze dich auf abwesend",settings:"Pers\xf6nliche Einstellungen",status:"Status einstellen",trash:"Papierkorb",mobileAp
1p:"Hol dir die mobile App"},[A.SQ0.EN]:{dnd:"Do not disturb",dndInfinite:"Paused until reactivation",dndUntil:"Paused until {{until}}",editStatus:"Edit status",logout:"Log out",editProfile:"Edit profile",set_incognito_off:"Set yourself to active",set_incognito_on:"Set yourself to away",settings:"Preferences",status:"Set a status",trash:"Trash",mobileApp:"Get mobile app"},[A.SQ0.PT_BR]:{dnd:"N\xe3o perturbe",dndInfinite:"Pausado at\xe9 a reativa\xe7\xe3o",dndUntil:"Pausado at\xe9 {{until}}",editStatus:"Editar status",logout:"Sair",editProfile:"Editar perfil",set_incognito_off:"Definir-se como ativo",set_incognito_on:"Definir-se como ausente",settings:"Prefer\xeancias",status:"Definir um status",trash:"Lixeira",mobileApp:"Obter aplicativo m\xf3vel"}});var I1=r(10997),uc=r(25719),at=r(14240),y1=r(20213),k1=r(13662),w1=r(83097),hc=r(82027),Ka=r(52042),S1=r(39467),T1=r(83294),A1=r(64428),U1=r(60146),O1=r(94802);function E1(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"t5s-single-line-text-darker65-12px"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=e.oxw();e.xp6(2),e.Oqu(t.activeUser.secondaryName)}}function D1(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"t5s-user-feature-access-level-indicator"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Udp("margin-top",3,"px")("margin-right",4,"px"),e.xp6(1),e.Oqu(t)}}function B1(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"t5s-user-feature-access-level-indicator"),e._uU(2),e.qZA(),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Udp("margin-top",3,"px")("margin-right",4,"px"),e.xp6(1),e.Oqu(t)}}const M1=(0,x.I)({width:(0,c.px)(250)});class ja extends hn.R{constructor(n,t){super(),this.store$=n,this.featureAccessLevel$=t,this.i18n=(0,Zt.mu)(),this.I18n=v1,this.Language=A.SQ0,this.Icons=pe.PJ,this.closeMenu=new e.vpe,this.hostClass=M1,this.featureAccessBadgeLabel$=this.featureAccessLevel$.pipe((0,p.U)(o=>o===A.akF.DEV?"DEV":o===A.akF.INTERNAL?"Tape Team":o===A.akF.BETA?"Early Access":o===A.akF.EARLY_BETA?"Private Beta":void 0));const i=this.store$.select(O.XO);this.connect(i.pipe((0,p.U)(o=>({sessions:o}))))}get incognitoIcon(){return this.activeUser.status.incognito?pe.PJ.radioButtonUncheckedRounded.name:pe.PJ.radioButtonCheckedRounded.name}get incognitoText(){return this.I18n.translate(this.i18n,this.activeUser.status.incognito?this.I18n.key.set_incognito_off:this.I18n.key.set_incognito_on)}get statusIconBtn(){return this.activeUser.status.emoji?pe.PJ.closeRounded.name:void 0}get statusText(){const{emoji:n,note:t=""}=this.activeUser.status;return n?t:this.I18n.translate(this.i18n,this.I18n.key.status)}get statusIcon(){const{emoji:n}=this.activeUser.status;return n||pe.PJ.sentimentSatisfiedRounded.name}getActiveUserPartnerStatusLabel(n){if(!n)return;const{partnerStatus:t}=n;return t===A.yLB.PARTNER?"Tape Partner":void 0}navigateToEditProfile(){this.store$.dispatch(y1.v.openEditProfile()),this.closeMenu.emit()}logoutUser(){const n=this.activeUser.id,t=n,{sessions:i}=this.get(),s=(0,ye.rq)(i,{activeUserId:n}).map(d=>d.sessions).reduce((d,h)=>d.concat(h),[]),{selectSessionUserId:l}=(0,ye.gK)(s,{activeUserId:n,userIdToremove:t});this.store$.dispatch(O.wS.removeUserSessions({input:{userIds:[t]},afterRemovalSelectSessionUserId:l}))}openUserStatusModal(){this.store$.dispatch(uc.Xr.openSetUserStatusModal()),this.closeMenu.emit()}clearStatus(){this.store$.dispatch(I1.wW.clear())}openUserSettings(){this.store$.dispatch(at.tj.openSettings()),this.closeMenu.emit()}openUserTrash(){this.store$.dispatch(at.tj.openActiveUserTrash()),this.closeMenu.emit()}openMobileAppInfo(){this.store$.dispatch(at.tj.openMobileAppInfo()),this.closeMenu.emit()}toggleIncognito(){this.store$.dispatch(uc.Xr.toggleActiveUserIncognito())}static#e=this.\u0275fac=function(t){return new(t||ja)(e.Y36(g.yh),e.Y36(En.H))};static#t=this.\u0275cmp=e.Xpm({type:ja,selectors:[["t5s-active-user-menu"]],hostVars:2,hostBindings:function(t,i){2&t&&e.Tol(i.hostClass)},inputs:{activeUser:"activeUser"},outputs:{closeMenu:"closeMenu"},features:[e.qOj],decls:23,vars:47,consts:[[3,"user"],["data-cy","t5s-active-user-menu-status-indicator",3,"status","doNotDisturb"],[4,"ngIf"],["data-cy","t5s-profile-menu-profile-button",3,"leftIcon","text","menuItemClick"],["data-cy","t5s-profile-menu-set-status-button",3,"leftIcon","rightBtnIcon","text","menuItemClick","rightBtnClick"],["data-cy","t5s-active-user-menu-toggle-incognito-button",3,"leftIcon","text","menuItemClick"],["data-cy","t5s-active-user-menu-user-trash-button",3,"leftIcon","text","menuItemClick"],["data-cy","t5s-active-user-menu-mobile-app-btn",3,"leftIcon","text","menuItemClick"],["data-cy","t5s-active-user-menu-settings-btn",3,"leftIcon","text","menuItemClick"],["data-cy","t5s-profile-menu-logout-btn",3,"text","menuItemClick"]],template:function(t,i){1&t&&(e.TgZ(0,"div")(1,"div"),e._UZ(2,"t5s-avatar-34px",0),e.qZA(),e.TgZ(3,"div")(4,"div")(5,"t5s-single-line-text-14px"),e._uU(6),e.qZA(),e._UZ(7,"t5s-user-status-indicator-17px",1),e.qZA(),e.YNc(8,E1,3,1,"ng-container",2),e.TgZ(9,"div"),e.YNc(10,D1,3,5,"ng-container",2),e.YNc(11,B1,3,5,"ng-container",2),e.ALo(12,"push"),e.qZA()()(),e._UZ(13,"t5s-menu-divider"),e.TgZ(14,"t5s-icon-text-user-menu-item",3),e.NdJ("menuItemClick",function(){return i.navigateToEditProfile()}),e.qZA(),e.TgZ(15,"t5s-icon-text-btn-user-menu-item",4),e.NdJ("menuItemClick",function(){return i.openUserStatusModal()})("rightBtnClick",function(){return i.clearStatus()}),e.qZA(),e.TgZ(16,"t5s-icon-text-user-menu-item",5),e.NdJ("menuItemClick",function(){return i.toggleIncognito()}),e.qZA(),e.TgZ(17,"t5s-icon-text-user-menu-item",6),e.NdJ("menuItemClick",function(){return i.openUserTrash()}),e.qZA(),e._UZ(18,"t5s-menu-divider"),e.TgZ(19,"t5s-icon-text-user-menu-item",7),e.NdJ("menuItemClick",function(){return i.openMobileAppInfo()}),e.qZA(),e.TgZ(20,"t5s-icon-text-user-menu-item",8),e.NdJ("menuItemClick",function(){return i.openUserSettings()}),e.qZA(),e._UZ(21,"t5s-menu-divider"),e.TgZ(22,"t5s-text-user-menu-item",9),e.NdJ("menuItemClick",function(){return i.logoutUser()}),e.qZA()),2&t&&(e.Udp("padding-top",8,"px")("padding-left",14,"px")("padding-right",14,"px"),e.xp6(1),e.Udp("margin-bottom",8,"px"),e.xp6(1),e.Q6J("user",i.activeUser),e.xp6(1),e.Udp("margin-bottom-px",12),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center"),e.xp6(2),e.Oqu(i.activeUser.primaryName),e.xp6(1),e.Q6J("status",null==i.activeUser.status?null:i.activeUser.status.presence)("doNotDisturb",null==i.activeUser.status?null:i.activeUser.status.doNotDisturb),e.xp6(1),e.Q6J("ngIf",null==i.activeUser.secondaryName?null:i.activeUser.secondaryName.length),e.xp6(1),e.Udp("display","flex")("flex-direction","row")("align-items","center")("flex-wrap","wrap"),e.xp6(1),e.Q6J("ngIf",i.getActiveUserPartnerStatusLabel(i.activeUser)),e.xp6(1),e.Q6J("ngIf",e.lcZ(12,45,i.featureAccessBadgeLabel$)),e.xp6(3),e.Q6J("leftIcon",i.Icons.person.name)("text",i.I18
1n.translate(i.i18n,i.I18n.key.editProfile)),e.xp6(1),e.Q6J("leftIcon",i.statusIcon)("rightBtnIcon",i.statusIconBtn)("text",i.statusText),e.xp6(1),e.Q6J("leftIcon",i.incognitoIcon)("text",i.incognitoText),e.xp6(1),e.Q6J("leftIcon",i.Icons.deleteRounded.name)("text",i.I18n.translate(i.i18n,i.I18n.key.trash)),e.xp6(2),e.Q6J("leftIcon",i.Icons.phoneIphone.name)("text",i.I18n.translate(i.i18n,i.I18n.key.mobileApp)),e.xp6(1),e.Q6J("leftIcon",i.Icons.settingsOutline.name)("text",i.I18n.translate(i.i18n,i.I18n.key.settings)),e.xp6(2),e.Q6J("text",i.I18n.translate(i.i18n,i.I18n.key.logout)))},dependencies:[u.O5,k1.I,w1.Z,hc.g,Ka.n,S1.w,T1.N,A1.C,U1.h,O1.q,we.f],encapsulation:2,changeDetection:0})}function Z1(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"t5s-active-user-menu",4),e.NdJ("closeMenu",function(){e.CHM(t),e.oxw();const o=e.MAs(2);return e.KtG(o.closeOverlay())}),e.qZA()()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.Tol(i.menuContainerClass),e.xp6(1),e.Q6J("activeUser",t)}}function L1(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-avatar-button",1,2),e.NdJ("btnClick",function(){e.CHM(t);const o=e.MAs(2);return e.KtG(o.openOverlay())}),e.qZA(),e.YNc(3,Z1,2,3,"ng-template",null,3,e.W1O),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(4);e.xp6(1),e.Udp("position","relative"),e.Q6J("t5sTooltip",t.primaryName)("activeUser",t)("t5sMenuOverlay",i)("menuOverlayImperative",!0)("menuOverlayDisableActiveIndication",!0)}}class qa{constructor(n){this.store$=n,this.activeUserFlexContainerClass=(0,x.I)({...c._7,...c.hw}),this.activeUserButtonClass=(0,x.I)({...c.hw}),this.menuContainerClass=(0,x.I)({paddingTop:(0,c.px)(6),paddingBottom:(0,c.px)(6)}),this.activeUser$=n.select(dc.ZC)}static#e=this.\u0275fac=function(t){return new(t||qa)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:qa,selectors:[["t5s-active-user"]],decls:3,vars:5,consts:[[4,"ngIf"],[3,"t5sTooltip","activeUser","t5sMenuOverlay","menuOverlayImperative","menuOverlayDisableActiveIndication","btnClick"],["menuOverlay","t5sMenuOverlay"],["activeUserMenuTemplate",""],["data-cy","t5s-active-user-menu",3,"activeUser","closeMenu"]],template:function(t,i){1&t&&(e.TgZ(0,"div"),e.YNc(1,L1,5,7,"ng-container",0),e.ALo(2,"async"),e.qZA()),2&t&&(e.Tol(i.activeUserFlexContainerClass),e.xp6(1),e.Q6J("ngIf",e.lcZ(2,3,i.activeUser$)))},dependencies:[u.O5,Le.h,li,Xt.q,ja,u.Ov],encapsulation:2,changeDetection:0})}var Do=r(12645),Xa=r(95337),Mn=r(16070);function N1(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"button",1),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.btnClick$$.next(void 0))}),e.TgZ(3,"div"),e._UZ(4,"t5s-icon",2),e.qZA()(),e._UZ(5,"div"),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Tol(i.getBtnClass(t)),e.Q6J("t5sTooltip",i.translate(t,t.tooltip))("tooltipOffset",-6)("disabled",i.isDisabled(t)),e.xp6(1),e.Tol(i.getHoverContainerClass(t)),e.xp6(1),e.Q6J("state",i.iconState$),e.xp6(1),e.Tol(i.getActiveIndicatorClass(t))}}const Mr="--t5s-user-toolbar-btn-hover-col";class ci extends v.Y4{constructor(n,t,i){super(n,t),this.btnClick$$=new mt.xQ,this.iconState$=this.state$.pipe((0,p.U)(o=>({icon:this.isActive(o)?o.activeIcon:o.inactiveIcon,size:20,fgColor:this.isActive(o)?o.theme.color.blackGlossy:o.theme.color.darker,badge:{...me.Qe,badgePosRight:-5,badgePosTop:-9,count:o.numNotifications,bgColor:o.theme.color[o.badgeBgColor]}}))),this.openOnDrag$=(0,Sr._O)(i.nativeElement,1e3).pipe((0,q.h)(o=>!!o),(0,Do.M)(this.state$),(0,q.h)(([o,s])=>void 0===s.location),(0,Xa.h)(!0)),this.btnClick=(0,mn.T)(this.btnClick$$.asObservable().pipe((0,Xa.h)(!0)),this.openOnDrag$)}set state(n){this.setState(n)}getContainerClass(n){return(0,x.I)({...c._7,...c.hw,position:"relative",flexDirection:"row"})}getHoverContainerClass(n){return(0,x.I)({...c._7,borderRadius:(0,c.aQ)(50),...(0,c.In)(42),backgroundColor:(0,c.VD)(Mr,"transparent")})}getActiveIndicatorClass(n){return(0,x.I)({width:(0,c.px)(2),height:(0,c.px)(42),marginLeft:(0,c.px)(-2),right:(0,c.px)(0),position:"absolute"})}getBtnClass(n){return(0,x.I)({...c._7,width:(0,c.px)(42),height:(0,c.px)(52),pointerEvents:this.isDisabled(n)?"none":void 0,[c.F9]:{":hover":{[me.pO]:n.theme.color.blackGlossy,[Mr]:v.P6.bgHoverColor(n,n.theme.color.darkest)}},":active":{[me.pO]:n.theme.color.blackGlossy,[Mr]:v.P6.bgActiveColor(n,n.theme.color.darkest)}})}isActive(n){return void 0!==n.location}isDisabled(n){return"main"===n.location}static#e=this.\u0275fac=function(t){return new(t||ci)(e.Y36(c.Q2),e.Y36(ut.e7),e.Y36(e.SBq))};static#t=this.\u0275cmp=e.Xpm({type:ci,selectors:[["t5s-user-toolbar-button"]],inputs:{state:"state"},outputs:{btnClick:"btnClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"t5sTooltip","tooltipOffset","disabled","click"],[3,"state"]],template:function(t,i){1&t&&(e.YNc(0,N1,6,12,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,Mn.o,Le.h,u.Ov],encapsulation:2,changeDetection:0})}class es{constructor(){this.btnClick=new e.vpe}get state(){return{badgeBgColor:"primary",inactiveIcon:pe.PJ.notificationsNoneOutline.name,activeIcon:pe.PJ.notificationsRounded.name,numNotifications:this.numNotifications,location:this.opened,tooltip:qe.n.fm.userToolbar.buttonTooltips.notifications}}static#e=this.\u0275fac=function(t){return new(t||es)};static#t=this.\u0275cmp=e.Xpm({type:es,selectors:[["t5s-user-toolbar-notification-button"]],inputs:{opened:"opened",numNotifications:"numNotifications"},outputs:{btnClick:"btnClick"},decls:1,vars:1,consts:[[3,"state","btnClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-toolbar-button",0),e.NdJ("btnClick",function(s){return i.btnClick.emit(s)}),e.qZA()),2&t&&e.Q6J("state",i.state)},dependencies:[ci],encapsulation:2,changeDetection:0})}class ts{constructor(){this.btnClick=new e.vpe}get state(){return{badgeBgColor:"primary",inactiveIcon:pe.PJ.mailOutline.name,activeIcon:pe.PJ.mailRounded.name,numNotifications:this.numNotifications,location:this.opened,tooltip:qe.n.fm.userToolbar.buttonTooltips.chat}}
1static#e=this.\u0275fac=function(t){return new(t||ts)};static#t=this.\u0275cmp=e.Xpm({type:ts,selectors:[["t5s-user-toolbar-chat-button"]],inputs:{opened:"opened",numNotifications:"numNotifications"},outputs:{btnClick:"btnClick"},decls:1,vars:1,consts:[[3,"state","btnClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-toolbar-button",0),e.NdJ("btnClick",function(s){return i.btnClick.emit(s)}),e.qZA()),2&t&&e.Q6J("state",i.state)},dependencies:[ci],encapsulation:2,changeDetection:0})}class ns{constructor(){this.btnClick=new e.vpe}get state(){return{badgeBgColor:"primary",inactiveIcon:pe.PJ.calendarOutlined.name,activeIcon:pe.PJ.calendarFilled.name,numNotifications:this.numNotifications,location:this.opened,tooltip:qe.n.fm.userToolbar.buttonTooltips.calendar}}static#e=this.\u0275fac=function(t){return new(t||ns)};static#t=this.\u0275cmp=e.Xpm({type:ns,selectors:[["t5s-user-toolbar-calendar-button"]],inputs:{opened:"opened",numNotifications:"numNotifications"},outputs:{btnClick:"btnClick"},decls:1,vars:1,consts:[[3,"state","btnClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-toolbar-button",0),e.NdJ("btnClick",function(s){return i.btnClick.emit(s)}),e.qZA()),2&t&&e.Q6J("state",i.state)},dependencies:[ci],encapsulation:2,changeDetection:0})}var R1=r(38296),P1=r(20824),$1=r(22690),z1=r(34053);const Q1=["moreMenuOverlayDirective"];function F1(a,n){1&a&&e.GkF(0)}function G1(a,n){1&a&&e.GkF(0)}function J1(a,n){1&a&&e.GkF(0)}const Zr=function(a,n){return{icon:a,label:n}};function H1(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openBilling.emit())}),e.YNc(1,J1,1,0,"ng-container",6),e.qZA()}if(2&a){const t=e.oxw(2),i=e.MAs(3);e.Udp("width","calc(100% - 8px)")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.Q6J("t5sMenuItemCloseOnClick",!0),e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",e.WLB(11,Zr,t.IconBubbleRight,t.I18n.translate(t.i18n,t.I18n.key.billingSupport)))}}function V1(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=e.oxw(4);e.Udp("margin-right",4,"px")("padding","2px 4px")("background-color",t.rgba(t.Color.blue,.1))("color",t.Color.blue)("border-radius",4,"px")("font-size",11,"px")("font-weight",500)("line-height",1.3)("white-space","nowrap")("flex-shrink",0),e.xp6(1),e.hij(" ",t.I18n.translate(t.i18n,t.I18n.key.newBadge)," ")}}function W1(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"a",13),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.releaseClick.emit(s))}),e.TgZ(1,"div",14)(2,"div")(3,"div")(4,"span"),e._UZ(5,"span")(6,"t5s-svg",10),e.qZA()(),e.TgZ(7,"div"),e.YNc(8,V1,2,21,"div",15),e.TgZ(9,"div"),e._uU(10),e.qZA()()()()()}if(2&a){const t=n.$implicit,i=n.first,o=e.oxw(3);e.Udp("display","block")("text-decoration","none")("color","inherit"),e.Q6J("href",t.url,e.LSH),e.xp6(1),e.Udp("cursor","pointer")("display","block")("width","calc(100% - 8px)")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.Q6J("t5sMenuItemCloseOnClick",!0)("t5sTooltipV3",t.title)("tooltipPosition","left")("tooltipOffset",8)("tooltipMaxWidth",320),e.xp6(1),e.Udp("display","flex")("align-items","center")("min-height",32,"px")("font-size",14,"px")("line-height",18,"px")("width","100%"),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("margin-left",10,"px")("margin-right",4,"px")("width",18,"px")("flex-shrink",0),e.xp6(1),e.Udp("position","relative")("display","flex")("align-items","center")("justify-content","center")("width",6,"px")("height",32,"px"),e.xp6(1),e.Udp("position","absolute")("top",i?"50%":"0px")("bottom",0,"px")("left","50%")("transform","translateX(-50%)")("width",2,"px")("background-color",o.rgba(o.Color.black,.16)),e.xp6(1),e.Udp("position","relative")("display","block")("flex-shrink",0),e.Q6J("size",6)("icon",o.IconCircleFillSmall)("fgColor",t.isUnread?o.Color.blue:o.rgba(o.Color.black,.65)),e.xp6(1),e.Udp("display","flex")("align-items","center")("margin-left",6,"px")("margin-right",12,"px")("min-width",0,"px")("flex",1),e.xp6(1),e.Q6J("ngIf",t.isUnread),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",t.title," ")}}function Y1(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div")(3,"div"),e._uU(4),e.qZA()(),e.YNc(5,W1,11,105,"a",12),e.TgZ(6,"a",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.viewAllReleasesClick.emit())}),e.TgZ(7,"div",5)(8,"div")(9,"div")(10,"span"),e._UZ(11,"span")(12,"t5s-svg",10),e.qZA()(),e.TgZ(13,"div")(14,"div"),e._uU(15),e.qZA()()()()()(),e.BQk()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Udp("margin-top",7,"px")("padding-top",6,"px")("box-shadow",i.rgba(i.Color.black,.09)+" 0px -1px 0px"),e.xp6(1),e.Udp("display","flex")("flex-direction","column")("padding-left",14,"px")("padding-right",14,"px")("margin-top",6,"px")("margin-bottom",8,"px")("color",i.rgba(i.Color.black,.65))("font-size",12,"px")("font-weight",500)("line-height",16,"px")("user-select","none"),e.xp6(1),e.Udp("al
1ign-self","left")("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",i.I18n.translate(i.i18n,i.I18n.key.whatsNewSectionTitle)," "),e.xp6(1),e.Q6J("ngForOf",t.releases)("ngForTrackBy",i.trackById),e.xp6(1),e.Udp("display","block")("text-decoration","none")("color","inherit"),e.Q6J("href",i.viewAllReleasesUrl,e.LSH),e.xp6(1),e.Udp("cursor","pointer")("display","block")("width","calc(100% - 8px)")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.Q6J("t5sMenuItemCloseOnClick",!0),e.xp6(1),e.Udp("display","flex")("align-items","center")("min-height",32,"px")("font-size",14,"px")("line-height",18,"px")("width","100%"),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("margin-left",10,"px")("margin-right",4,"px")("width",18,"px")("flex-shrink",0),e.xp6(1),e.Udp("position","relative")("display","flex")("align-items","center")("justify-content","center")("width",18,"px")("height",32,"px"),e.xp6(1),e.Udp("position","absolute")("top",0,"px")("bottom","50%")("left","50%")("transform","translateX(-50%)")("width",2,"px")("background-color",i.rgba(i.Color.black,.16)),e.xp6(1),e.Udp("position","relative")("display","block")("flex-shrink",0),e.Q6J("size",16)("icon",i.IconGift)("fgColor",i.rgba(i.Color.black,.65)),e.xp6(1),e.Udp("margin-left",6,"px")("margin-right",12,"px")("min-width",0,"px")("flex",1),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",i.I18n.translate(i.i18n,i.I18n.key.viewAllReleases)," ")}}function K1(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",3),e.NdJ("mousemove",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.handleMousemove(o))}),e.TgZ(2,"a",4)(3,"div",5),e.YNc(4,F1,1,0,"ng-container",6),e.qZA()(),e.TgZ(5,"a",4)(6,"div",5),e.YNc(7,G1,1,0,"ng-container",6),e.qZA()(),e.YNc(8,H1,2,14,"button",7),e.TgZ(9,"button",8,9),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(10);return e.KtG(null==o?null:o.openOverlay())}),e.TgZ(11,"div")(12,"div"),e._UZ(13,"t5s-svg",10),e.qZA(),e.TgZ(14,"div")(15,"div"),e._uU(16),e.qZA()(),e.TgZ(17,"div"),e._UZ(18,"t5s-svg",10),e.qZA()()(),e.YNc(19,Y1,16,135,"ng-container",0),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw(),o=e.MAs(3),s=e.MAs(5);e.xp6(1),e.Udp("width",260,"px")("padding-top",6,"px")("padding-bottom",6,"px"),e.xp6(1),e.Udp("display","block")("text-decoration","none")("color","inherit"),e.Q6J("href",i.documentationUrl,e.LSH),e.xp6(1),e.Udp("cursor","pointer")("display","block")("width","calc(100% - 8px)")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.Q6J("t5sMenuItemCloseOnClick",!0),e.xp6(1),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",e.WLB(127,Zr,i.IconGuide,i.I18n.translate(i.i18n,i.I18n.key.documentation))),e.xp6(1),e.Udp("display","block")("text-decoration","none")("color","inherit"),e.Q6J("href",i.askCommunityUrl,e.LSH),e.xp6(1),e.Udp("cursor","pointer")("display","block")("width","calc(100% - 8px)")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.Q6J("t5sMenuItemCloseOnClick",!0),e.xp6(1),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",e.WLB(130,Zr,i.IconPersonOutline,i.I18n.translate(i.i18n,i.I18n.key.askCommunity))),e.xp6(1),e.Q6J("ngIf",!t.disableTracking),e.xp6(1),e.Udp("width","calc(100% - 8px)")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.Q6J("t5sNestedMenuOverlay",s)("nestedMenuOverlayAutofocus",!1),e.xp6(2),e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("width","100%"),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("margin-left",10,"px")("margin-right",4,"px")("width",18,"px")("flex-shrink",0),e.xp6(1),e.Udp("display","block")("flex-shrink",0),e.Q6J("size",16)("icon",i.IconDots)("fgColor",i.rgba(i.Color.black,.85)),e.xp6(1),e.Udp("margin-left",6,"px")("margin-right",6,"px")("min-width",0,"px")("flex",1),e.xp6(1),e.Udp("white-space","nowrap")("overflow","hidden")("text-overflow","ellipsis"),e.xp6(1),e.hij(" ",i.I18
1n.translate(i.i18n,i.I18n.key.more)," "),e.xp6(1),e.Udp("display","flex")("align-items","center")("width",16,"px")("margin-right",10,"px")("flex-shrink",0),e.xp6(1),e.Udp("display","block")("flex-shrink",0),e.Q6J("size",16)("icon",i.IconChevronRight)("fgColor",i.rgba(i.Color.black,.45)),e.xp6(1),e.Q6J("ngIf",t.releases.length)}}function j1(a,n){if(1&a&&(e.TgZ(0,"div")(1,"div"),e._UZ(2,"t5s-svg",10),e.qZA(),e.TgZ(3,"div")(4,"div"),e._uU(5),e.qZA()()()),2&a){const t=n.icon,i=n.label,o=n.contentWidth,s=e.oxw();e.Udp("display","flex")("align-items","center")("min-height",28,"px")("font-size",14,"px")("line-height",18,"px")("width","100%"),e.xp6(1),e.Udp("display","flex")("align-items","center")("justify-content","center")("margin-left",10,"px")("margin-right",4,"px")("width",18,"px")("flex-shrink",0),e.xp6(1),e.Udp("display","block")("flex-shrink",0),e.Q6J("size",18)("icon",t)("fgColor",s.rgba(s.Color.black,.85)),e.xp6(1),e.Udp("margin-left",6,"px")("margin-right",12,"px")("min-width",o?null:0,"px")("flex",o?null:1)("flex-shrink",o?0:null),e.xp6(1),e.Udp("white-space","nowrap")("overflow",o?null:"hidden")("text-overflow",o?null:"ellipsis"),e.xp6(1),e.hij(" ",i," ")}}function q1(a,n){1&a&&e.GkF(0)}function X1(a,n){1&a&&e.GkF(0)}function ex(a,n){1&a&&e.GkF(0)}function tx(a,n){1&a&&e.GkF(0)}const is=function(a,n){return{icon:a,label:n,contentWidth:!0}};function nx(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",19),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.resetTours.emit(),e.KtG(o.closeOverlay.emit())}),e.TgZ(2,"div",16),e.YNc(3,tx,1,0,"ng-container",6),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw(2),i=e.MAs(3);e.xp6(1),e.Udp("display","block")("width","100%")("padding",0)("border","none")("background","none")("color","inherit")("font","inherit")("text-align","inherit")("cursor","pointer"),e.xp6(1),e.Udp("cursor","pointer")("display","block")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",e.WLB(30,is,t.IconHandWave,t.I18n.translate(t.i18n,t.I18n.key.resetTours)))}}function ix(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=n.ngIf,i=e.oxw(3);e.Udp("font-size",12,"px")("line-height",16,"px")("white-space","nowrap")("color",i.rgba(i.Color.black,.5))("margin-bottom",4,"px"),e.xp6(1),e.hij(" ",t," ")}}function ox(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=n.ngIf,i=e.oxw(3);e.Udp("font-size",12,"px")("line-height",16,"px")("white-space","nowrap")("color",i.rgba(i.Color.black,.5)),e.xp6(1),e.hij(" ",t," ")}}function ax(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",20),e.NdJ("mousedown",function(o){return o.preventDefault()})("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.copyVersion())}),e.TgZ(1,"div")(2,"div"),e.YNc(3,ix,2,11,"div",21),e.YNc(4,ox,2,9,"div",22),e.qZA()()()}if(2&a){const t=n.ngIf,i=e.oxw(2);e.Udp("padding-top",8,"px")("padding-bottom",8,"px")("box-shadow",i.rgba(i.Color.black,.09)+" 0px -1px 0px")("margin-top",1,"px"),e.xp6(1),e.Udp("display","flex")("align-items","center")("line-height",16,"px")("width","100%")("user-select","none"),e.xp6(1),e.Udp("margin-left",12,"px")("margin-right",12,"px")("flex-shrink",0),e.xp6(1),e.Q6J("ngIf",t.versionLabel),e.xp6(1),e.Q6J("ngIf",t.updatedLabel)}}function sx(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"div")(2,"a",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.closeOverlay.emit())}),e.TgZ(3,"div",16),e.YNc(4,q1,1,0,"ng-container",6),e.qZA()(),e.TgZ(5,"a",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.closeOverlay.emit())}),e.TgZ(6,"div",16),e.YNc(7,X1,1,0,"ng-container",6),e.qZA()(),e.TgZ(8,"a",13),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.closeOverlay.emit())}),e.TgZ(9,"div",16),e.YNc(10,ex,1,0,"ng-container",6),e.qZA()(),e.YNc(11,nx,4,33,"ng-container",17),e.qZA(),e.YNc(12,ax,5,26,"div",18),e.ALo(13,"async"),e.qZA()}if(2&a){const t=e.oxw(),i=e.MAs(3);e.Udp("width","max-content")("min-width",204,"px")("max-width","calc(100vw - 24px)"),e.xp6(1),e.Udp("padding-top",6,"px")("padding-bottom",6,"px"),e.xp6(1),e.Udp("display","block")("text-decoration","none")("color","inherit"),e.Q6J("href",t.roadmapUrl,e.LSH),e.xp6(1),e.Udp("cursor","pointer")("display","block")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",e.WLB(70,is,t.IconFlag,t.I18n.translate(t.i18n,t.I18n.key.roadmap))),e.xp6(1),e.Udp("display","block")("text-decoration","none")("color","inherit"),e.Q6J("href",t.featureRequestUrl,e.LSH),e.xp6(1),e.Udp("cursor","pointer")("display","block")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",e.WLB(73,is,t.IconStar,t.I18n.translate(t.i18n,t.I18n.key.featureRequest))),e.xp6(1),e.Udp("display","block")("text-decoration","none")("color","inherit"),e.Q6J("href",t.bugReportUrl,e.LSH),e.xp6(1),e.Udp("cursor","pointer")("display","block")("margin-left",4,"px")("margin-right",4,"px")("border-radius",6,"px"),e.xp6(1),e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",e.WLB(76,is,t.IconInfoShield,t.I18n.translate(t.i18n,t.I18n.key.bugReport))),e.xp6(2),e.Q6J("ngIf",e.lcZ(13,68,t.footerLabels$))}}class os extends _e.A{constructor(){super(),this.I18n=Bn.O,this.IconGuide=y.fSx,this.IconPersonOutline=y.aS5,this.IconBubbleRight=y.RnY,this.IconDots=y.jgU,this.IconChevronRight=y.VG8,this.IconCircleFillSmall=y.Oux,this.IconGift=y.Lmt,this.IconStar=y.GK,this.IconFlag=y.GyD,this.IconHandWave=y._ss,this.IconInfoShield=y.t2y,this.documentationUrl="https://help.tapeapp.com",this.askCommunityUrl="https://community.tapeapp.com/c/ask/7",this.featureRequestUrl="https://community.tapeapp.com/c/requests/8",this.bugReportUrl="https://community.tapeapp.com/c/bugs/9",this.roadmapUrl="https://get.tapeapp.com/roadmap/",this.viewAllReleasesUrl=Eo.bk,this.updatedLabel$=this.select((0,$.Cc)(["lastUpdatedAt"]),(0,p.U)(({lastUpdatedAt:n})=>{const t=ua.L.formatDatetimeDistance(this.i18n,n);return t?this.I18n.translate(this.i18n,{key:this.I18n.key.updated,params:{distance:t}}):void 0})),this.versionLabel$=this.select((0,$.Cc)(["appVersion"]),(0,p.U)(({appVersion:n})=>n?this.I18n.translate(this.i18n,{key:this.I18n.key.tapeVersion,params:{version:n}}):void 0)),this.footerLabels$=(0,V.aj)([this.versionLabel$.pipe((0,pt.O)(void 0)),this.updatedLabel$.pipe((0,pt.O)(void 0))]).pipe((0,p.U)(([n,t])=>n||t?{versionLabel:n,updatedLabel:t}:void 0)),this.resetTours=new e.vpe,this.openBilling=new e.vpe,this.releaseClick=new e.vpe,this.viewAllReleasesClick=new e.vpe,this.closeOverlay=new e.vpe,this.copyVersionClick=new e.vpe,this.set({disableTracking:!1,releases:[],lastUpdatedAt:void 0,appVersion:void 0})}set disableTracking(n){this.setProperty("disableTracking",n)}set releases(n){const t=n instanceof At.y?n:(0,Ha.of)(n);this.setProperty("releases",t.pipe((0,q.h)(i=>i.length>0),(0,be.q)(1)))}set lastUpdatedAt(n){this.setProperty("lastUpdatedAt",n)}set appVersion(n){this.setProperty("appVersion",n)}copyVersion(){const{appVersion:n}=this.get();n&&this.copyVersionClick.emit(n)}handleMousemove(n){this.moreMenuOverlayDirective?.isMenuOpen()&&(((0,R1.A)(n)??[]).some(i=>i instanceof HTMLElement&&i.hasAttribute("data-more-menu-trigger"))||this.moreMenuOverlayDirective.closeOverlay())}static#e=this.\u0275fac=function(t){return new(t||os)};static#t=this.\u0275cmp=e.Xpm({type:os,selectors:[["t5s-user-toolbar-help-menu-overlay"]],viewQuery:function(t,i){if(1&t&&e.Gf(Q1,5),2&t){let o;e.iGM(o=e.CRH())&&(i.moreMenuOverlayDirective=o.first)}},inputs:{disableTracking:"disableTracking",releases:"releases",lastUpdatedAt:"lastUpdatedAt",appVersion:"appVersion"},outputs:{resetTours:"resetTours",openBilling:"openBilling",releaseClick:"releaseClick",viewAllReleasesClick:"viewAllReleasesClick",closeOverlay:"closeOverlay",copyVersionClick:"copyVersionClick"},features:[e.qOj],decls:6,vars:3,consts:[[4,"ngIf"],["rowInner",""],["moreMenuTpl",""],[3,"mousemove"],["target","_blank",3,"href"],["t5sClickableElement","",3,"t5sMenuItemCloseOnClick"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["t5sClickableElement","",3,"t5sMenuItemCloseOnClick","width","margin-left","margin-right","border-radius","click",4,"ngIf"],["data-more-menu-trigger","","t5sClickableElement","",3,"t5sNestedMenuOverlay","nestedMenuOverlayAutofocus","click"],["moreMenuOverlayDirective","t5sNestedMenuOverlay"],[3,"size","icon","fgColor"],["t5sClickableElement","",3,"t5sMenuItemCloseOnClick","click"],["target","_blank",3,"href","display","text-decoration","color","click",4,"ngFor","ngForOf","ngForTrackBy"],["target","_blank",3,"href","click"],["t5sClickableElement","",3,"t5sMenuItemCloseOnClick","t5sTooltipV3","tooltipPosition","tooltipOffset","tooltipMaxWidth"],[3,"margin-right","padding","background-color","color","border-radius","font-size","font-weight","line-height","white-space","flex-shrink",4,"ngIf"],["t5sClickableElement",""],[4,"featureAccessLevelDev"],[3,"padding-top","padding-bottom","box-shadow","margin-top","mousedown","click",4,"ngIf"],["type","button",3,"click"],[3,"mousedown","click"],[3,"font-size","line-height","white-space","color","margin-bottom",4,"ngIf"],[3,"font-size","line-height","white-space","color",4,"ngIf"]],template:function(t,i){1&t&&(e.YNc(0,K1,20,133,"ng-container",0),e.ALo(1,"async"),e.YNc(2,j1,
16,50,"ng-template",null,1,e.W1O),e.YNc(4,sx,14,79,"ng-template",null,2,e.W1O)),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,u.tP,le.H,oe.v,P1.w,$1.H,z1.u,it.i,u.Ov],encapsulation:2,changeDetection:0})}const rx=["helpMenuTrigger"];function lx(a,n){if(1&a&&e._UZ(0,"div"),2&a){const t=e.oxw(3);e.Udp("position","absolute")("top",0,"px")("right",-2,"px")("width",8,"px")("height",8,"px")("border-radius","50%")("background",t.Color.blue)("border","1px solid "+t.Color.white)("pointer-events","none")}}function cx(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-user-toolbar-help-menu-overlay",9),e.NdJ("resetTours",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.resetAllTours())})("openBilling",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.showIntercomMessenger())})("releaseClick",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.onWhatsNewReleaseClick(o))})("viewAllReleasesClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onWhatsNewViewAllReleasesClick())})("copyVersionClick",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.copyAppVersion(o))})("closeOverlay",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.closeHelpMenu())}),e.qZA()}if(2&a){const t=e.oxw(3);e.Q6J("disableTracking",t.disableTracking$)("releases",t.displayedReleases$)("appVersion",t.appVersionString$)("lastUpdatedAt",t.appVersionCommittedAt$)}}const px=function(a,n,t){return{top:48,right:a,bottom:n,left:t}},dx=function(){return{top:9,right:9,bottom:9,left:9}};function _x(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",1)(2,"t5s-user-toolbar-notification-button",2),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.accessSidebar(o.USER_SIDEBAR_URL.NOTIFICATIONS))}),e.ALo(3,"push"),e.qZA(),e.TgZ(4,"t5s-user-toolbar-chat-button",3),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.accessSidebar(o.USER_SIDEBAR_URL.CHAT))}),e.ALo(5,"push"),e.qZA(),e.TgZ(6,"t5s-user-toolbar-calendar-button",4),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.accessSidebar(o.USER_SIDEBAR_URL.CALENDAR))}),e.ALo(7,"push"),e.qZA()(),e.TgZ(8,"div")(9,"div",1),e._UZ(10,"t5s-icon-button-24px",5,6),e.YNc(12,lx,1,18,"div",7),e.ALo(13,"push"),e.qZA(),e.YNc(14,cx,1,4,"ng-template",null,8,e.W1O),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(15),o=e.oxw().ngIf,s=e.oxw();e.xp6(1),e.Udp("width",100,"%")("display","flex")("flex-direction","column"),e.Q6J("t5sCalloutAnchor",s.CalloutAnchorId.UserToolbarPersonalCluster)("calloutAnchorPlacement","LEFT")("calloutAnchorRingOutsetPx",e.kEZ(36,px,-7,-4,-7)),e.xp6(1),e.Q6J("opened",e.lcZ(3,28,s.notificationsBtnActivationStatus$))("numNotifications",t[s.UserClientAppBubbleType.NOTIFICATION]),e.xp6(2),e.Q6J("opened",e.lcZ(5,30,s.chatBtnActivationStatus$))("numNotifications",t[s.UserClientAppBubbleType.CHAT]),e.xp6(2),e.Q6J("opened",e.lcZ(7,32,s.calendarBtnActivationStatus$)),e.xp6(2),e.Tol(s.endClass),e.xp6(1),e.Udp("position","relative")("display","flex"),e.Q6J("t5sCalloutAnchor",s.CalloutAnchorId.UserToolbarHelpButton)("calloutAnchorPlacement","LEFT")("calloutAnchorRingOutsetPx",e.DdM(40,dx)),e.xp6(1),e.Q6J("t5sTooltip",s.translate(o,s.WebClientI18nKeys.fm.userToolbar.helpBtnTooltip))("icon",s.Icons.helpRounded.name)("t5sMenuOverlay",i)("menuOverlayDisableActiveIndication",!0),e.xp6(2),e.Q6J("ngIf",e.lcZ(13,34,s.hasUnread$))}}function ux(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-active-user"),e.TgZ(3,"div"),e.YNc(4,_x,16,41,"ng-container",0),e.ALo(5,"push"),e.qZA()(),e.BQk()),2&a){const t=e.oxw();e.xp6(1),e.Tol(t.userToolbarContainerClass),e.xp6(1),e.Tol(t.headerStyles),e.xp6(1),e.Tol(t.bodyStyles),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,7,t.activeUserBubbles$))}}class as extends Re.Hr{constructor(n,t,i,o,s){super(t,i),this.store$=n,this.theme=t,this.i18n$=i,this.userSidebarRouter=o,this.dialog=s,this.sidebarTab$=this.userSidebarRouter.route$.pipe((0,p.U)(S=>S?.tab??void 0)),this.USER_SIDEBAR_URL=J.v0,this.WebClientI18nKeys=qe.n,this.UserClientAppBubbleType=A.heB,this.Icons=pe.PJ,this.Color=c.Il,this.CalloutAnchorId=Rl.a,this.userToolbarContainerClass=(0,x.I)({...c.i3,...c.hw}),this.headerStyles=(0,x.I)({...c.yD,borderLeft:(0,c.Cg)(1,"solid",this.theme.color.light),height:Br.Mz}),this.bodyStyles=(0,x.I)({...c.yD,...c.i3,flex:1,paddingTop:(0,c.px)(3),borderLeft:(0,c.Cg)(1,"solid",this.theme.color.light)}),this.endClass=(0,x.I)({...c.i3,...c.QP,marginTop:"auto",marginBottom:(0,c.px)(13),overflow:"visible"}),this.activeUserBubbles$=n.select(f1),this.activeUser$=n.select(dc.ZC);const l=n.select(tn.Zf).pipe((0,Y.d)({bufferSize:1,refCount:!0})),d=n.select(pc.J5).pipe((0,Y.d)({bufferSize:1,refCount:!0})),h=d.pipe((0,p.U)(S=>S?.lastSeenPublishedAtMs??0),(0,w.x)(),(0,Y.d)({bufferSize:1,refCount:!0})),m=l.pipe((0,p.U)(S=>(0,Eo.Rr)(S)),(0,w.x)(),(0,Y.d)({bufferSize:1,refCount:!0}));this.hasUnread$=(0,V.aj)([d,m]).pipe((0,p.U)(([S,f])=>void 0!==S&&(0,Eo.xT)(f,S.lastSeenPublishedAtMs)),(0,w.x)()),this.disableTracking$=this.activeUser$.pipe((0,p.U)(S=>!!S?.organization?.disableTracking)),this.displayedReleases$=(0,V.aj)([l,h]).pipe((0,p.U)(([S,f])=>(0,Eo.GV)(S).map(E=>({...E,isUnread:(0,Eo.RR)(E,f)})))),this.connect(m.pipe((0,p.U)(S=>({whatsNewMaxPublishedAtMs:S})))),this.connect(n.select(vt.Ux).pipe((0,p.U)(S=>({activeUserId:S}))));const C=n.select(tn.q$);this.appVersionString$=C.pipe((0,p.U)(S=>S?.committedAt?S.version:void 0)),this.appVersionCommittedAt$=C.pipe((0,p.U)(S=>S?.committedAt)),n.dispatch(tn.vL.loadAppVersion()),this.notificationsBtnActivationStatus$=this.buttonActivationStatus$(J.v0.NOTIFICATIONS),this.chatBtnActivationStatus$=this.buttonActivationStatus$(J.v0.CHAT),this.calendarBtnActivationStatus$=this.buttonActivationStatus$(J.v0.CALENDAR),this.connect(this.userSidebarRouter.isRootRouteForTab$.pipe((0,p.U)(S=>({isRootRouteForTab:S}))))}
1closeSidebar(){this.store$.dispatch((0,De.lh)())}accessSidebar(n){const{isRootRouteForTab:t}=this.get();if(t!==n)switch(n){case J.v0.NOTIFICATIONS:this.userSidebarRouter.navigate({tab:J.v0.NOTIFICATIONS});break;case J.v0.CHAT:this.userSidebarRouter.navigate({tab:J.v0.CHAT,path:"conversations"});break;case J.v0.CALENDAR:this.userSidebarRouter.navigate({tab:J.v0.CALENDAR,path:"overview"});break;default:console.warn(`Attempted to access an invalid sidebar URL: ${n}`)}else this.closeSidebar()}buttonActivationStatus$(n){return(0,V.aj)([this.sidebarTab$]).pipe((0,p.U)(([i])=>this.getActivationStatus(n,i)),(0,w.x)())}getActivationStatus(n,t){if(n===t)return"sidebar"}resetAllTours(){const n=(0,Zt.mu)();this.hold(this.dialog.confirm({title:Bn.O.translate(n,Bn.O.key.resetToursDialog.title),message:Bn.O.translate(n,Bn.O.key.resetToursDialog.message),confirm:Bn.O.translate(n,Bn.O.key.resetToursDialog.confirm)}).pipe((0,be.q)(1)),({confirmed:t})=>{if(!t)return;const{activeUserId:i}=this.get();void 0!==i&&this.store$.dispatch(Lt.ki.clearCalloutProgress({activeUserId:i}))})}showIntercomMessenger(){this.store$.dispatch(tn.vL.openIntercomMessenger())}markReleasesRead(){const{whatsNewMaxPublishedAtMs:n,activeUserId:t}=this.get();!n||(void 0!==t&&this.store$.dispatch(pc.ri.upsertUserWhatsNewLastSeen({userId:t,lastSeenPublishedAtMs:n})),this.store$.dispatch(tn.vL.markWhatsNewReleasesRead({publishedAtMs:n})))}onWhatsNewReleaseClick(n){this.store$.dispatch(tn.vL.whatsNewReleaseClicked({release:n})),this.markReleasesRead()}onWhatsNewViewAllReleasesClick(){this.store$.dispatch(tn.vL.whatsNewViewAllReleasesClicked()),this.markReleasesRead()}copyAppVersion(n){this.store$.dispatch(tn.vL.copyAppVersion({version:n}))}closeHelpMenu(){this.helpMenuTrigger?.closeOverlay()}static#e=this.\u0275fac=function(t){return new(t||as)(e.Y36(g.yh),e.Y36(c.Q2),e.Y36(ut.e7),e.Y36(Ga.N),e.Y36(Dr.xA))};static#t=this.\u0275cmp=e.Xpm({type:as,selectors:[["t5s-user-toolbar"]],viewQuery:function(t,i){if(1&t&&e.Gf(rx,5),2&t){let o;e.iGM(o=e.CRH())&&(i.helpMenuTrigger=o.first)}},features:[e._Bn([{provide:$t.Xj,useClass:ri},$t.aV]),e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"t5sCalloutAnchor","calloutAnchorPlacement","calloutAnchorRingOutsetPx"],["data-intercom-target","User toolbar notifications button","data-cy","t5s-user-toolbar-notifications-btn",3,"opened","numNotifications","btnClick"],["data-cy","t5s-user-toolbar-chat-btn",3,"opened","numNotifications","btnClick"],["data-cy","t5s-user-toolbar-calendar-btn",3,"opened","btnClick"],["tooltipPosition","top",3,"t5sTooltip","icon","t5sMenuOverlay","menuOverlayDisableActiveIndication"],["helpMenuTrigger","t5sMenuOverlay"],[3,"position","top","right","width","height","border-radius","background","border","pointer-events",4,"ngIf"],["helpMenuTemplate",""],[3,"disableTracking","releases","appVersion","lastUpdatedAt","resetTours","openBilling","releaseClick","viewAllReleasesClick","copyVersionClick","closeOverlay"]],template:function(t,i){1&t&&(e.YNc(0,ux,6,9,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[zl.v,x1.d,u.O5,Le.h,qa,es,ts,ns,Xt.q,os,we.f],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var hx=r(40758),Be=r(85868),Zn=r(7394);const{CALENDAR:ss}=J.v0,xn_calendar=()=>(0,De.Q$)({route:{tab:ss,path:"overview"}});var Gt=r(72805),nn=r(65410);const gx=[[["","user-sidebar-header",""]],[["","user-sidebar-body",""]]],mx=["[user-sidebar-header]","[user-sidebar-body]"];class Xe{constructor(n){this.theme=n}static#e=this.\u0275fac=function(t){return new(t||Xe)(e.Y36(c.Q2))};static#t=this.\u0275cmp=e.Xpm({type:Xe,selectors:[["t5s-user-sidebar-content-template"]],ngContentSelectors:mx,decls:5,vars:24,template:function(t,i){1&t&&(e.F$t(gx),e.TgZ(0,"div")(1,"div"),e.Hsn(2),e.qZA(),e.TgZ(3,"div"),e.Hsn(4,1),e.qZA()()),2&t&&(e.Udp("width",100,"%")("height",100,"%")("display","flex")("flex-direction","column"),e.xp6(1),e.Udp("width",100,"%")("height",47,"px")("min-height",47,"px")("max-height",47,"px")("border-bottom","1px solid "+i.theme.color.light),e.xp6(2),e.Udp("width",100,"%")("flex",1)("min-height",0))},encapsulation:2,changeDetection:0})}const fx=[[["","header-start",""]],[["","header-end",""]]],xx=["[header-start]","[header-end]"];class et{constructor(){this.containerClass=(0,x.I)({...c.hw,...c.xI,justifyContent:"space-between",position:"relative"}
1),this.headerStartStyles=(0,x.I)({...c.xI,alignItems:"center",...c.p4,paddingLeft:(0,c.px)(13),flex:1}),this.headerEndStyles=(0,x.I)({...c.xI,alignItems:"center",...c.p4,padding:(0,c.o3)(0,13)})}static#e=this.\u0275fac=function(t){return new(t||et)};static#t=this.\u0275cmp=e.Xpm({type:et,selectors:[["t5s-user-sidebar-header-template"]],ngContentSelectors:xx,decls:5,vars:6,template:function(t,i){1&t&&(e.F$t(fx),e.TgZ(0,"div")(1,"div"),e.Hsn(2),e.qZA(),e.TgZ(3,"div"),e.Hsn(4,1),e.qZA()()),2&t&&(e.Tol(i.containerClass),e.xp6(1),e.Tol(i.headerStartStyles),e.xp6(2),e.Tol(i.headerEndStyles))},styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var bx=r(17655);function Cx(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-primary-icon-button-20px",9),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.completeReminder.emit({reminder:o.reminder}))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Q6J("icon",i.Icons.taskAltRounded.name)("t5sTooltip",i.translate(t,i.WebClientI18nKeys.fm.reminder.detail.completeBtnTooltip))}}function vx(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-primary-icon-button-20px",10),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.uncompleteReminder.emit({reminder:o.reminder}))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Q6J("t5sTooltip",i.translate(t,i.WebClientI18nKeys.fm.reminder.detail.incompleteBtnTooltip))("icon",i.Icons.incomplete.name)}}function Ix(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-content-template")(2,"t5s-user-sidebar-header-template",1),e.ynx(3,2),e.TgZ(4,"t5s-primary-icon-button-20px",3),e.NdJ("btnClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.backClick.emit(o))}),e.qZA(),e.BQk(),e.ynx(5,4),e.TgZ(6,"t5s-flex-row",5),e.YNc(7,Cx,2,2,"ng-container",0),e.YNc(8,vx,2,2,"ng-container",0),e.TgZ(9,"t5s-primary-icon-button-20px",6),e.NdJ("btnClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.removeReminder.emit({reminder:s.reminder}))}),e.qZA(),e.TgZ(10,"t5s-primary-icon-button-20px",7),e.NdJ("btnClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.closeClick.emit(o))}),e.qZA()(),e.BQk(),e.qZA(),e.TgZ(11,"t5s-reminder-detail-inputs",8),e.NdJ("editReminder",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.editReminder.emit(o))})("blabItemClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.blabItemClick.emit(o))})("focusSectionChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.focusSectionChange.emit(o))}),e.qZA()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("icon",i.Icons.arrowBackRounded.name)("t5sTooltip",i.translate(t,i.WebClientI18nKeys.fm.reminder.detail.backBtnTooltip)),e.xp6(3),e.Q6J("ngIf",i.getShowCompleteBtn(t)),e.xp6(1),e.Q6J("ngIf",i.getUncompleteRemoveBtn(t)),e.xp6(1),e.Q6J("t5sTooltip",i.translate(t,i.WebClientI18nKeys.fm.reminder.detail.removeBtnTooltip))("icon",i.Icons.deleteRounded.name),e.xp6(1),e.Q6J("t5sTooltip",i.translate(t,i.WebClientI18nKeys.fm.reminder.closeBtnTooltip))("icon",i.Icons.closeLarge.name),e.xp6(1),e.Q6J("reminder",t.reminder)("focusSectionPreviews",t.focusSectionPreviews)("focusSectionId",t.focusSectionId)("disabled",i.getIsReadonly(t))}}class pi extends v.Y4{constructor(){super(...arguments),this.titleClass=(0,x.I)({...c.i3}),this.subTitleClass=(0,x.I)({...c.xI}),this.WebClientI18nKeys=qe.n,this.closeClick=new e.vpe,this.backClick=new e.vpe,this.removeReminder=new e.vpe,this.completeReminder=new e.vpe,this.uncompleteReminder=new e.vpe,this.editReminder=new e.vpe,this.blabItemClick=new e.vpe,this.focusSectionChange=new e.vpe}set reminder(n){this.set({reminder:n})}set isLoading(n){this.set({isLoading:n})}set focusSectionPreviews(n){this.setProperty("focusSectionPreviews",n)}set focusSectionId(n){this.setProperty("focusSectionId",n)}getStatusFromState(n){const{reminder:t}=n;if(t)return t.status}getIsReadonly(n){return this.getStatusFromState(n)!==A.gHA.INCOMPLETE}
1getShowCompleteBtn(n){return this.getStatusFromState(n)===A.gHA.INCOMPLETE}getUncompleteRemoveBtn(n){return this.getStatusFromState(n)!==A.gHA.INCOMPLETE}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(pi)))(i||pi)}}();static#t=this.\u0275cmp=e.Xpm({type:pi,selectors:[["t5s-user-sidebar-reminder-detail-view"]],inputs:{reminder:"reminder",isLoading:"isLoading",focusSectionPreviews:"focusSectionPreviews",focusSectionId:"focusSectionId"},outputs:{closeClick:"closeClick",backClick:"backClick",removeReminder:"removeReminder",completeReminder:"completeReminder",uncompleteReminder:"uncompleteReminder",editReminder:"editReminder",blabItemClick:"blabItemClick",focusSectionChange:"focusSectionChange"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["user-sidebar-header",""],["header-start",""],["data-cy","t5s-usi-reminders-back-btn",3,"icon","t5sTooltip","btnClick"],["header-end",""],["gap","13","centered","true"],["data-cy","t5s-wc-usi-reminders-delete-btn",3,"t5sTooltip","icon","btnClick"],["data-cy","t5s-user-sidebar-reminder-detail-close-btn",3,"t5sTooltip","icon","btnClick"],["user-sidebar-body","",3,"reminder","focusSectionPreviews","focusSectionId","disabled","editReminder","blabItemClick","focusSectionChange"],["data-cy","t5s-wc-usi-reminders-detail-complete-btn",3,"icon","t5sTooltip","btnClick"],["data-cy","t5s-wc-usi-reminders-incomplete-btn",3,"t5sTooltip","icon","btnClick"]],template:function(t,i){1&t&&(e.YNc(0,Ix,12,16,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,Gt.Q,nn.D,Xe,et,bx.j,Le.h,u.Ov],encapsulation:2,changeDetection:0})}let Lr=class gl{constructor(n,t){this.store$=n,this.reminder$=n.select(Be.XN),this.focusSectionPreviews$=n.select(hx.zd),this.reminderDetailFocusSectionId$=n.select(Be.q$),t.pipe((0,_.l4)(Be.qn.markReminderCompleted),(0,q.h)(({reminder:o})=>function yx(a){return!a.title&&!a.description&&!a.dueAt}(o))).pipe((0,Ft.s)(this)).subscribe(()=>this.store$.dispatch(xn_calendar()))}backClick(){this.store$.dispatch(xn_calendar())}closeClick(){this.store$.dispatch((0,De.lh)())}removeReminder({reminder:n}){this.store$.dispatch(Be.qn.removeReminder({reminder:n})),this.store$.dispatch(xn_calendar())}uncompleteReminder({reminder:n}){this.store$.dispatch(Be.qn.markReminderIncomplete({reminder:n}))}completeReminder({reminder:n}){this.store$.dispatch(Be.qn.markReminderCompleted({reminder:n}))}editReminder(n){this.store$.dispatch(Be.qn.editReminder({input:n}))}blabItemClick(n){this.store$.dispatch(Zn.i.navigateToItemEdit(n.id))}focusSectionChange({reminderId:n,focusSectionId:t}){this.store$.dispatch(Be.qn.updateReminderFocusSection({reminderId:n,focusSectionId:t}))}static#e=this.\u0275fac=function(t){return new(t||gl)(e.Y36(g.yh),e.Y36(_.eX))};static#t=this.\u0275cmp=e.Xpm({type:gl,selectors:[["t5s-usi-calendar-reminder-edit"]],decls:2,vars:5,consts:[[3,"reminder","focusSectionPreviews","focusSectionId","closeClick","backClick","removeReminder","completeReminder","uncompleteReminder","blabItemClick","editReminder","focusSectionChange"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-reminder-detail-view",0),e.NdJ("closeClick",function(){return i.closeClick()})("backClick",function(){return i.backClick()})("removeReminder",function(s){return i.removeReminder(s)})("completeReminder",function(s){return i.completeReminder(s)})("uncompleteReminder",function(s){return i.uncompleteReminder(s)})("blabItemClick",function(s){return i.blabItemClick(s)})("editReminder",function(s){return i.editReminder(s)})("focusSectionChange",function(s){return i.focusSectionChange(s)}),e.ALo(1,"async"),e.qZA()),2&t&&e.Q6J("reminder",e.lcZ(1,3,i.reminder$))("focusSectionPreviews",i.focusSectionPreviews$)("focusSectionId",i.reminderDetailFocusSectionId$)},dependencies:[pi,u.Ov],encapsulation:2,changeDetection:0})};Lr=(0,Ot.gn)([(0,oi.c)(),(0,Ot.w6)("design:paramtypes",[g.yh,_.eX])],Lr);const Ae={getActiveUserCalendarStaticShares:(0,g.PH)("UserSidebarCalendarShareActions.getActiveUserCalendarStaticShares"),getActiveUserCalendarStaticSharesSuccess:(0,g.PH)("UserSidebarCalendarShareActions.getActiveUserCalendarStaticSharesSuccess",(0,g.Ky)()),getActiveUserCalendarStaticSharesError:(0,dt.bR)("UserSidebarCalendarShareActions.getActiveUserCalendarStaticSharesError"),resetPublicUrlShareUrl:(0,g.PH)("UserSidebarCalendarShareActions.resetPublicUrlShareUrl"),resetPublicUrlShareUrlSuccess:(0,g.PH)("UserSidebarCalendarShareActions.resetPublicUrlShareUrlSuccess",(0,g.Ky)()),resetPrivateUrlShareUrl:(0,g.PH)("UserSidebarCalendarShareActions.resetPrivateUrlShareUrl"),resetPrivateUrlShareUrlSuccess:(0,g.PH)("UserSidebarCalendarShareActions.resetPrivateUrlShareUrlSuccess",(0,g.Ky)()),updatePublicUrlShare:(0,g.PH)("UserSidebarCalendarShareActions.updatePublicUrlShare",(0,g.Ky)()),updatePublicUrlShareSuccess:(0,g.PH)("UserSidebarCalendarShareActions.updatePublicUrlShareSuccess",(0,g.Ky)()),updatePrivateUrlShare:(0,g.PH)("UserSidebarCalendarShareActions.updatePrivateUrlShare",(0,g.Ky)()),updatePrivateUrlShareSuccess:(0,g.PH)("UserSidebarCalendarShareActions.updatePrivateUrlShareSuccess",(0,g.Ky)()),loadActiveUserCalendarSubscriptions:(0,g.PH)("UserSidebarCalendarShareActions.loadActiveUserCalendarSubscriptions"),loadActiveUserCalendarSubscriptionsSuccess:(0,g.PH)("UserSidebarCalendarShareActions.loadActiveUserCalendarSubscriptionsSuccess",(0,g.Ky)()),loadActiveUserCalendarSubscriptionsError:(0,dt.bR)("UserSidebarCalendarShareActions.loadActiveUserCalendarSubscriptionsError")},wx=(0,g.Lq)({isLoading:!1,loadingError:!1,calendarSubscriptions:[]},(0,g.on)(Ae.getActiveUserCalendarStaticShares,a=>({...a,isLoading:!0})),(0,g.on)(Ae.getActiveUserCalendarStaticSharesSuccess,(a,{staticShares:n})=>({...a,isLoading:!1,staticShares:n})),(0,g.on)(Ae.updatePrivateUrlShareSuccess,Ae.updatePublicUrlShareSuccess,(a,{staticShares:n})=>({...a,staticShares:n})),(0,g.on)(Ae.resetPrivateUrlShareUrlSuccess,Ae.resetPublicUrlShareUrlSuccess,(a,{staticShares:n})=>({...a,staticShares:n})),(0,g.on)(Ae.loadActiveUserCalendarSubscriptionsSuccess,(a,{calendarSubscriptions:n})=>({...a,calendarSubscriptions:n}))),gc="webClientUserSidebarCalendarShare",Nr=(0,g.ZF)(gc),Ux=((0,g.P1)(Nr,a=>a.isLoading),(0,g.P1)(Nr,a=>a.staticShares)),Ox=(0,g.P1)(Nr,a=>a.calendarSubscriptions);var st=r(82372);class Bo{constructor(n,t,i){this.actions$=n,this.gqlCalendarShares=t,this.gqlCalendarSubscriptions=i,this.loadActiveUserCalendarShares$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ae.getActiveUserCalendarStaticShares),(0,L.w)(()=>this.gqlCalendarShares.getActiveUserCalendarStaticShares().pipe((0,p.U)(o=>Ae.getActiveUserCalendarStaticSharesSuccess({staticShares:o})),(0,dt.Mr)(Ae.getActiveUserCalendarStaticSharesError))))),this.resetPublicUrlShareUrl$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ae.resetPublicUrlShareUrl),(0,L.w)(()=>this.gqlCalendarShares.resetPublicUrlShareUrl().pipe((0,p.U)(o=>Ae.resetPublicUrlShareUrlSuccess({staticShares:o})),(0,dt.Mr)())))),this.resetPrivateUrlShareUrl$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ae.resetPrivateUrlShareUrl),(0,L.w)(()=>this.gqlCalendarShares.resetPrivateUrlShareUrl().pipe((0,p.U)(o=>Ae.resetPrivateUrlShareUrlSuccess({staticShares:o})),(0,dt.Mr)())))),this.updatePublicUrlShare$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ae.updatePublicUrlShare),(0,L.w)(({input:o})=>this.gqlCalendarShares.updatePublicUrlShare(o).pipe((0,p.U)(s=>Ae.updatePublicUrlShareSuccess({staticShares:s})),(0,dt.Mr)())))),this.updatePrivateUrlShare$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ae.updatePrivateUrlShare),(0,L.w)(({input:o})=>this.gqlCalendarShares.updatePrivateUrlShare(o).pipe((0,p.U)(s=>Ae.updatePrivateUrlShareSuccess({staticShares:s})),(0,dt.Mr)())))),this.loadActiveUserCalendarSubscriptions$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ae.loadActiveUserCalendarSubscriptions),(0,L.w)(()=>this.gqlCalendarSubscriptions.getActiveUserCalendarSubscriptions().pipe((0,p.U)(o=>Ae.loadActiveUserCalendarSubscriptionsSuccess({calendarSubscriptions:o})),(0,dt.Mr)(Ae.loadActiveUserCalendarSubscriptionsError)))))}static#e=this.\u0275fac=function(t){return new(t||Bo)(e.LFG(_.eX),e.LFG(st.kS),e.LFG(st.Wn))};static#t=this.\u0275prov=e.Yz7({token:Bo,factory:Bo.\u0275fac})}class rs{static#e=this.\u0275fac=function(t){return new(t||rs)};static#t=this.\u0275mod=e.oAB({type:rs});static#n=this.\u0275inj=e.cJS({providers:[{provide:st.kS,useFactory:n=>new st.kS(n),deps:[st.RZ]},{provide:st.Wn,useFactory:n=>new st.Wn(n),deps:[st.RZ]}
1],imports:[g.Aw.forFeature(gc,wx),_.sQ.forFeature([Bo])]})}const bn={copyPublicShareUrl:(0,g.PH)("UserSidebarCalendarShareManagePageAccessActions.copyPublicShareUrl",(0,g.Ky)()),copyPrivateShareUrl:(0,g.PH)("UserSidebarCalendarShareManagePageAccessActions.copyPrivateShareUrl",(0,g.Ky)()),confirmResetPublicShareUrl:(0,g.PH)("UserSidebarCalendarShareManagePageAccessActions.confirmResetPublicShareUrl"),confirmResetPrivateShareUrl:(0,g.PH)("UserSidebarCalendarShareManagePageAccessActions.confirmResetPrivateShareUrl")},Ee=new jt.U({[A.SQ0.DE]:{calendarTabTitle:"Kalender",closeBtnTooltip:"Schlie\xdfen",placeholderText:"Wir arbeiten derzeit hart daran, dir unser herausragendes Kalenderfeature bald zur Verf\xfcgung stellen zu k\xf6nnen.",placeholderTitle:"Kalender kommt bald!",sidebarTitleMenu:{selectCalendars:"Kalender ausw\xe4hlen",shareCalendars:"Kalender teilen",showCompletedReminders:"Erledigte Eintr\xe4ge anzeigen"},event:{titlePlaceholder:"Unbenannt"},calendarScheduleView:{noEventsPlaceholder:{title:"Nichts geplant!",text:"F\xfcr den ausgew\xe4hlten Tag sind keine Ereignisse vorhanden."}},calendarSubscription:{ALL_BLAB_ITEMS:"Alle Eintr\xe4ge",FOLLOWING_BLAB_ITEMS:"Eintr\xe4ge denen ich folge",REMINDER:"Erinnerungen",CHECKLIST_ENTRIES:"Zugewiesene Aufgaben"},calendarSubscriptionManageView:{backBtnTooltip:"Zur\xfcck",closeBtnTooltip:"Schlie\xdfen",title:"Kalender ausw\xe4hlen",myCalendarsSectionHeader:"Meine Kalender",selectColorBtnTooltip:"Kalenderfarbe ausw\xe4hlen"},calendarShareManageView:{backBtnTooltip:"Zur\xfcck",closeBtnTooltip:"Schlie\xdfen",title:"Kalender teilen",sharableLinksSectionTitle:"Teilbare Links",privateLinkLabel:"Privat",publicLinkLabel:"\xd6ffentlich",copyLink:"Kalenderlink kopieren",resetLink:"Kalenderlink zur\xfccksetzen",optionsBtnTooltip:"Optionen",permission:{notShared:"Nicht geteilt",onlyFreeBusy:"Nur Verf\xfcgbarkeit anzeigen",allEventDetails:"Alle Termindetails anzeigen"},linkCopiedToast:"In Zwischenablage kopiert",resetConfirmationModal:{title:"Kalenderlink zur\xfccksetzen?",message:"M\xf6chtest du diesen Kalenderlink wirklich zur\xfccksetzen? Der bestehende Kalenderlink wird dadurch ung\xfcltig.",confirmButtonLabel:"Zur\xfccksetzen"}},nextDayBtnTooltip:"N\xe4chster Tag",prevDayBtnTooltip:"Vorheriger Tag",nextMonthBtnTooltip:"N\xe4chster Monat",prevMonthBtnTooltip:"Vorheriger Monat",todayBtnTooltip:"Heute"},[A.SQ0.EN]:{calendarTabTitle:"Calendar",closeBtnTooltip:"Close",placeholderText:"We are currently working hard to deliver you our outstanding calendar feature soon.",placeholderTitle:"Calendar is coming soon!",sidebarTitleMenu:{selectCalendars:"Select calendars",shareCalendars:"Share calendars",showCompletedReminders:"Show completed entries"},event:{titlePlaceholder:"Untitled"},calendarScheduleView:{noEventsPlaceholder:{title:"Nothing planned!",text:"There are no events on the selected day."}},calendarSubscription:{ALL_BLAB_ITEMS:"All Records",FOLLOWING_BLAB_ITEMS:"Following records",REMINDER:"Reminders",CHECKLIST_ENTRIES:"Assigned tasks"},calendarSubscriptionManageView:{backBtnTooltip:"Back",closeBtnTooltip:"Close",title:"Select calendars",myCalendarsSectionHeader:"My calendars",selectColorBtnTooltip:"Select calendar color"},calendarShareManageView:{backBtnTooltip:"Back",closeBtnTooltip:"Close",title:"Share calendars",sharableLinksSectionTitle:"Sharable links",privateLinkLabel:"Private",publicLinkLabel:"Public",copyLink:"Copy calendar link",resetLink:"Reset calendar link",optionsBtnTooltip:"Options",permission:{notShared:"Not shared",onlyFreeBusy:"Show only free/busy",allEventDetails:"Show all event details"},linkCopiedToast:"Copied to clipboard",resetConfirmationModal:{title:"Reset calendar link?",message:"Are you sure you want to reset this calendar link? This will invalidate the existing calendar link.",confirmButtonLabel:"Reset"}},nextDayBtnTooltip:"Next day",prevDayBtnTooltip:"Previous day",nextMonthBtnTooltip:"Next month",prevMonthBtnTooltip:"Previous month",todayBtnTooltip:"Today"},[A.SQ0.PT_BR]:{calendarTabTitle:"Calend\xe1rio",closeBtnTooltip:"Fechar",placeholderText:"Estamos trabalhando para disponibilizar nosso excelente recurso de calend\xe1rio em breve.",placeholderTitle:"O calend\xe1rio est\xe1 chegando em breve!",sidebarTitleMenu:{selectCalendars:"Selecionar calend\xe1rios",shareCalendars:"Compartilhar calend\xe1rios",showCompletedReminders:"Mostrar entradas conclu\xeddas"},event:{titlePlaceholder:"Sem t\xedtulo"},calendarScheduleView:{noEventsPlaceholder:{title:"Nada planejado!",text:"N\xe3o h\xe1 eventos no dia selecionado."}},calendarSubscription:{ALL_BLAB_ITEMS:"Todos os registros",FOLLOWING_BLAB_ITEMS:"Registros que voc\xea segue",REMINDER:"Lembretes",CHECKLIST_ENTRIES:"Tarefas atribu\xeddas"},calendarSubscriptionManageView:{backBtnTooltip:"Voltar",closeBtnTooltip:"Fechar",title:"Selecionar calend\xe1rios",myCalendarsSectionHeader:"Meus calend\xe1rios",selectColorBtnTooltip:"Selecionar cor do calend\xe1rio"},calendarShareManageView:{backBtnTooltip:"Voltar",closeBtnTooltip:"Fechar",title:"Compartilhar calend\xe1rios",sharableLinksSectionTitle:"Links compartilh\xe1veis",privateLinkLabel:"Privado",publicLinkLabel:"P\xfablico",copyLink:"Copiar link do calend\xe1rio",resetLink:"Redefinir link do calend\xe1rio",optionsBtnTooltip:"Op\xe7\xf5es",permission:{notShared:"N\xe3o compartilhado",onlyFreeBusy:"Mostrar apen
1as disponibilidade",allEventDetails:"Mostrar todos os detalhes do evento"},linkCopiedToast:"Copiado para a \xe1rea de transfer\xeancia",resetConfirmationModal:{title:"Redefinir link do calend\xe1rio?",message:"Tem certeza que deseja redefinir este link do calend\xe1rio? O link atual ficar\xe1 inv\xe1lido.",confirmButtonLabel:"Redefinir"}},nextDayBtnTooltip:"Pr\xf3ximo dia",prevDayBtnTooltip:"Dia anterior",nextMonthBtnTooltip:"Pr\xf3ximo m\xeas",prevMonthBtnTooltip:"M\xeas anterior",todayBtnTooltip:"Hoje"}});var Rr=r(11177),di=r(14386),ls=r(84980),mc=r(34363),Pr=r(78417),fc=r(82636),xc=r(99536),$r=r(81581),bc=r(58126),_i=r(15121),ui=r(8352),Dx=r(14114),Bx=r(29962);function Mx(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div"),e.ALo(2,"async"),e.TgZ(3,"button",2),e.NdJ("click",function(){const s=e.CHM(t).$implicit,l=e.oxw().ngIf,d=e.oxw();return e.KtG(d.emitSelectedCalendarSubscriptionIdsChange(l,s))}),e.ALo(4,"async"),e.qZA(),e.TgZ(5,"t5s-single-line-text-13px"),e._uU(6),e.qZA(),e.TgZ(7,"t5s-toggle-switch",3),e.NdJ("selectedClick",function(){const s=e.CHM(t).$implicit,l=e.oxw().ngIf,d=e.oxw();return e.KtG(d.emitSelectedCalendarSubscriptionIdsChange(l,s))}),e.qZA()(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Tol(e.lcZ(2,6,o.subscriptionContainerClass$)),e.xp6(2),e.Tol(e.lcZ(4,8,o.btnClass$)),e.xp6(3),e.hij(" ",o.getCalendarSubscriptionLabel(i,t)," "),e.xp6(1),e.Q6J("state",o.getToggleSwitchState(i,t))}}function Zx(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Mx,8,10,"ng-container",1),e.BQk()),2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.calendarSubscriptions)("ngForTrackBy",i.trackById)}}class Ln extends v.Y4{constructor(){super(...arguments),this.I18n=Ee,this.selectedCalendarSubscriptionIdsChange=new e.vpe,this.subscriptionContainerClass$=this.state$.pipe((0,p.U)(n=>(0,x.I)({...c.xI,...c.QP,position:"relative",padding:(0,c.o3)(6,13),"> :nth-child(2)":{marginRight:(0,c.px)(9)},"> :last-child":{marginLeft:"auto"},...(0,c.Mr)({backgroundColor:this.bgHoverColor(n)}),...(0,c.bB)({backgroundColor:this.bgActiveColor(n)})}))),this.btnClass$=this.state$.pipe((0,p.U)(n=>(0,x.I)({position:"absolute",...c.hw,top:(0,c.px)(0),left:(0,c.px)(0)})))}set calendarSubscriptions(n){this.set({calendarSubscriptions:n})}set selectedCalendarSubscriptionIds(n){this.set({selectedCalendarSubscriptionIds:n})}getCalendarSubscriptionLabel(n,t){return this.I18n.translate(n,this.I18n.key.calendarSubscription[t.type])}getToggleSwitchState(n,t){return{fontSet:c.LZ["13px"],selected:n.selectedCalendarSubscriptionIds?.find(i=>i===t.id)}}emitSelectedCalendarSubscriptionIdsChange(n,t){(n.selectedCalendarSubscriptionIds??[]).includes(t.id)?this.selectedCalendarSubscriptionIdsChange.emit({selectedCalendarSubscriptionIds:(n.selectedCalendarSubscriptionIds??[]).filter(o=>o!==t.id)}):this.selectedCalendarSubscriptionIdsChange.emit({selectedCalendarSubscriptionIds:[...n.selectedCalendarSubscriptionIds??[],t.id]})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Ln)))(i||Ln)}}();static#t=this.\u0275cmp=e.Xpm({type:Ln,selectors:[["t5s-user-sidebar-calendar-share-subscription-selection"]],inputs:{calendarSubscriptions:"calendarSubscriptions",selectedCalendarSubscriptionIds:"selectedCalendarSubscriptionIds"},outputs:{selectedCalendarSubscriptionIdsChange:"selectedCalendarSubscriptionIdsChange"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","-1",3,"click"],[3,"state","selectedClick"]],template:function(t,i){1&t&&(e.YNc(0,Zx,2,2,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,Dx.j,Bx.M,u.Ov],encapsulation:2,changeDetection:0})}function Lx(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-calendar-share-subscription-selection",7),e.NdJ("selectedCalendarSubscriptionIdsChange",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.updatePrivateUrlShare.emit({input:{permissionType:null==s.privateUrlShare?null:s.privateUrlShare.permissionType,calendarSubscriptionIds:o.selectedCalendarSubscriptionIds}}))}),e.ALo(2,"async"),e.qZA(),e._UZ(3,"t5s-menu-divider"),e.BQk()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Q6J("calendarSubscriptions",t.calendarSubscriptions)("selectedCalendarSubscriptionIds",e.lcZ(2,2,i.selectedCalendarSubscriptionIds$))}}function Nx(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-icon-text-menu-item",6),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw(2),d=e.MAs(14);return l.copyPrivateUrlShareUrl.emit({url:s}),e.KtG(d.closeMenu())}),e.ALo(2,"async"),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("leftIcon",t.Icons.link.name)("text",e.lcZ(2,2,t.copyCalendarLinkLabel$))}}function Rx(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-icon-text-primary-icon-menu-item",5),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw(),d=e.MAs(14);return l.updatePrivateUrlShare.emit({input:{permissionType:l.permissionType.URL_SHARE_NOT_SHARED,calendarSubscriptionIds:s.privateUrlShare.calendarSubscriptionIds}}),e.KtG(d.closeMenu())}),e.ALo(2,"async"),e.qZA(),e.TgZ(3,"t5s-icon-text-primary-icon-menu-item",5),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw(),d=e.MAs(14);return l.updatePrivateUrlShare.emit({input:{permissionType:l.permissionType.URL_SHARE_ALL_EVENT_INFO,calendarSubscriptionIds:s.privateUrlShare.calendarSubscriptionIds}}),e.KtG(d.closeMenu())}),e.ALo(4,"async"),e.qZA(),e._UZ(5,"t5s-menu-divider"),e.YNc(6,Lx,4,4,"ng-container",4),e.YNc(7,Nx,3,4,"ng-container",4),e.ALo(8,"async"),e.TgZ(9,"t5s-danger-icon-text-menu-item",6),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(),s=e.MAs(14);return o.resetPrivateUrlShareUrl.emit(),e.KtG(s.closeMenu())}),e.ALo(10,"async"),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("leftIcon",i.Icons.blockOutlined.name)("text",e.lcZ(2,10,i.notSharedLabel$))("rightIcon",(null==t.privateUrlShare?null:t.privateUrlShare.permissionType)===i.permissionType.URL_SHARE_NOT_SHARED?i.Icons.checkRounded.name:void 0),e.xp6(2),e.Q6J("leftIcon",i.Icons.checkCircleOutline.name)("text",e.lcZ(4,12,i.allEventDetailsLabel$))("rightIcon",(null==t.privateUrlShare?null:t.privateUrlShare.permissionType)===i.permissionType.URL_SHARE_ALL_EVENT_INFO?i.Icons.checkRounded.name:void 0),e.xp6(3),e.Q6J("ngIf",t.calendarSubscriptions.length>0),e.xp6(1),e.Q6J("ngIf",e.lcZ(8,14,i.url$)),e.xp6(2),e.Q6J("leftIcon",i.Icons.resetOutlined.name)("text",e.lcZ(10,16,i.resetCalendarLinkLabel$))}}class hi extends v.Y4{constructor(){super(...arguments),this.I18n=Ee,this.permissionType=A.ojf,this.copyPrivateUrlShareUrl=new e.vpe,this.resetPrivateUrlShareUrl=new e.vpe,this.updatePrivateUrlShare=new e.vpe,this.selectedCalendarSubscriptionIds$=this.state$.pipe((0,p.U)(({privateUrlShare:n})=>n?.calendarSubscriptionIds)),this.containerClass$=this.state$.pipe((0,p.U)(n=>(0,x.I)({...c.xI,...c.QP,padding:(0,c.o3)(9,13),...(0,c.Mr)({backgroundColor:this.bgHoverColor(n)})}))),this.settingsBtnClass=(0,x.I)({marginLeft:"auto"}),this.shareUrlIconContainerClass$=this.state$.pipe((0,p.U)(n=>(0,x.I)({...c.eP,...c._7,...(0,c.In)(34),border:(0,c.Cg)(1,"solid",n.theme.color.dark),backgroundColor:n.theme.color.lighter,marginRight:(0,c.px)(9)}))),this.url$=this.state$.pipe((0,p.U)(n=>n.privateUrlShare?.url)),this.title$=this.state$.pipe((0,p.U)(n=>
1this.I18n.translate(n,this.I18n.key.calendarShareManageView.privateLinkLabel))),this.subtitle$=this.state$.pipe((0,p.U)(n=>{switch(n.privateUrlShare?.permissionType){case A.ojf.URL_SHARE_NOT_SHARED:return this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.notShared);case A.ojf.URL_SHARE_ALL_EVENT_INFO:return this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.allEventDetails)}})),this.copyCalendarLinkLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.copyLink))),this.resetCalendarLinkLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.resetLink))),this.notSharedLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.notShared))),this.allEventDetailsLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.allEventDetails)))}set privateUrlShare(n){this.set({privateUrlShare:n})}set calendarSubscriptions(n){this.set({calendarSubscriptions:n})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(hi)))(i||hi)}}();static#t=this.\u0275cmp=e.Xpm({type:hi,selectors:[["t5s-user-sidebar-calendar-private-url-share"]],inputs:{privateUrlShare:"privateUrlShare",calendarSubscriptions:"calendarSubscriptions"},outputs:{copyPrivateUrlShareUrl:"copyPrivateUrlShareUrl",resetPrivateUrlShareUrl:"resetPrivateUrlShareUrl",updatePrivateUrlShare:"updatePrivateUrlShare"},features:[e.qOj],decls:20,vars:25,consts:[[3,"icon"],[3,"icon","t5sImperativeMenuTriggerFor","t5sTooltip","btnClick"],["settingsTrigger","t5sImperativeMenuTrigger"],["settingsMenu","t5sMenu"],[4,"ngIf"],[3,"leftIcon","text","rightIcon","menuItemClick"],[3,"leftIcon","text","menuItemClick"],[3,"calendarSubscriptions","selectedCalendarSubscriptionIds","selectedCalendarSubscriptionIdsChange"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div"),e.ALo(1,"async"),e.TgZ(2,"div"),e.ALo(3,"async"),e._UZ(4,"t5s-darker-icon-20px",0),e.qZA(),e.TgZ(5,"div")(6,"t5s-single-line-bold-text-13px"),e._uU(7),e.ALo(8,"async"),e.qZA(),e.TgZ(9,"t5s-single-line-text-darker-13px"),e._uU(10),e.ALo(11,"async"),e.qZA()(),e.TgZ(12,"div")(13,"t5s-icon-button-17px",1,2),e.NdJ("btnClick",function(l){e.CHM(o);const d=e.MAs(14);return e.KtG(d.toggleMenu(l))}),e.ALo(15,"async"),e.qZA()(),e.TgZ(16,"t5s-menu-template",null,3),e.YNc(18,Rx,11,18,"ng-container",4),e.ALo(19,"async"),e.qZA()()}if(2&t){const o=e.MAs(17);e.Tol(e.lcZ(1,13,i.containerClass$)),e.xp6(2),e.Tol(e.lcZ(3,15,i.shareUrlIconContainerClass$)),e.xp6(2),e.Q6J("icon",i.Icons.link.name),e.xp6(3),e.hij(" ",e.lcZ(8,17,i.title$)," "),e.xp6(3),e.hij(" ",e.lcZ(11,19,i.subtitle$)," "),e.xp6(2),e.Tol(i.settingsBtnClass),e.xp6(1),e.Q6J("icon",i.Icons.moreHorizRounded.name)("t5sImperativeMenuTriggerFor",o)("t5sTooltip",i.I18n.translate(e.lcZ(15,21,i.state$),i.I18n.key.calendarShareManageView.optionsBtnTooltip)),e.xp6(5),e.Q6J("ngIf",e.lcZ(19,23,i.state$))}},dependencies:[u.O5,ls.T,mc.u,Pr.n,fc.x,Ka.n,xc.z,$r.f,bc.r,_i.E,ui.M,Le.h,Ln,u.Ov],encapsulation:2,changeDetection:0})}function Px(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-calendar-share-subscription-selection",7),e.NdJ("selectedCalendarSubscriptionIdsChange",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.updatePublicUrlShare.emit({input:{permissionType:null==s.publicUrlShare?null:s.publicUrlShare.permissionType,calendarSubscriptionIds:o.selectedCalendarSubscriptionIds}}))}),e.ALo(2,"async"),e.qZA(),e._UZ(3,"t5s-menu-divider"),e.BQk()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Q6J("calendarSubscriptions",t.calendarSubscriptions)("selectedCalendarSubscriptionIds",e.lcZ(2,2,i.selectedCalendarSubscriptionIds$))}}function $x(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-icon-text-menu-item",6),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw(2),d=e.MAs(14);return l.copyPublicUrlShareUrl.emit({url:s}),e.KtG(d.closeMenu())}),e.ALo(2,"async"),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("leftIcon",t.Icons.link.name)("text",e.lcZ(2,2,t.copyCalendarLinkLabel$))}}function zx(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-icon-text-primary-icon-menu-item",5),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw(),d=e.MAs(14);return l.updatePublicUrlShare.emit({input:{permissionType:l.permissionType.URL_SHARE_NOT_SHARED,calendarSubscriptionIds:s.publicUrlShare.calendarSubscriptionIds}}),e.KtG(d.closeMenu())}),e.ALo(2,"async"),e.qZA(),e.TgZ(3,"t5s-icon-text-primary-icon-menu-item",5),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw(),d=e.MAs(14);return l.updatePublicUrlShare.emit({input:{permissionType:l.permissionType.URL_SHARE_ONLY_FREE_OR_BUSY,calendarSubscriptionIds:s.publicUrlShare.calendarSubscriptionIds}}),e.KtG(d.closeMenu())}),e.ALo(4,"async"),e.qZA(),e.TgZ(5,"t5s-icon-text-primary-icon-menu-item",5),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw(),d=e.MAs(14);return l.updatePublicUrlShare.emit({input:{permissionType:l.permissionType.URL_SHARE_ALL_EVENT_INFO,calendarSubscriptionIds:s.publicUrlShare.calendarSubscriptionIds}}),e.KtG(d.closeMenu())}),e.ALo(6,"async"),e.qZA(),e._UZ(7,"t5s-menu-divider"),e.YNc(8,Px,4,4,"ng-container",4),e.YNc(9,$x,3,4,"ng-container",4),e.ALo(10,"async"),e.TgZ(11,"t5s-danger-icon-text-menu-item",6),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(),s=e.MAs(14);return o.resetPublicUrlShareUrl.emit(),e.KtG(s.closeMenu())}),e.ALo(12,"async"),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("leftIcon",i.Icons.blockOutlined.name)("text",e.lcZ(2,13,i.notSharedLabel$))("rightIcon",(null==t.publicUrlShare?null:t.publicUrlShare.permissionType)===i.permissionType.URL_SHARE_NOT_SHARED?i.Icons.checkRounded.name:void 0),e.xp6(2),e.Q6J("leftIcon",i.Icons.removeCircleOutlined.name)("text",e.lcZ(4,15,i.freeOrBusyLabel$))("rightIcon",(null==t.publicUrlShare?null:t.publicUrlShare.permissionType)===i.permissionType.URL_SHARE_ONLY_FREE_OR_BUSY?i.Icons.checkRounded.name:void 0),e.xp6(2),e.Q6J("leftIcon",i.Icons.checkCircleOutline.name)("text",e.lcZ(6,17,i.allEventDetailsLabel$))("rightIcon",(null==t.publicUrlShare?null:t.publicUrlShare.permissionType)===i.permissionType.URL_SHARE_ALL_EVENT_INFO?i.Icons.checkRounded.name:void 0),e.xp6(3),e.Q6J("ngIf",t.calendarSubscriptions.length>0),e.xp6(1),e.Q6J("ngIf",e.lcZ(10,19,i.url$)),e.xp6(2),e.Q6J("leftIcon",i.Icons.resetOutlined.name)("text",e.lcZ(12,21,i.resetCalendarLinkLabel$))}}class gi extends v.Y4{constructor(){super(...arguments),this.I18n=Ee,this.permissionType=A.kbO,this.copyPublicUrlShareUrl=new e.vpe,this.resetPublicUrlShareUrl=new e.vpe,this.updatePublicUrlShare=new e.vpe,this.selectedCalendarSubscriptionIds$=this.state$.pipe((0,p.U)(({publicUrlShare:n})=>n?.calendarSubscriptionIds)),this.containerClass$=this.state$.pipe((0,p.U)(n=>(0,x.I)({...c.xI,...c.QP,padding:(0,c.o3)(9,13),...(0,c.Mr)({backgroundColor:this.bgHoverColor(n)})}))),this.settingsBtnClass=(0,x.I)({marginLeft:"auto"}),this.shareUrlIconContainerClass$=this.state$.pipe((0,p.U)(n=>(0,x.I)({...c.eP,...c._7,...(0,c.In)(34),border:(0,c.Cg)(1,"solid",n.theme.color.dark),backgroundColor:n.theme.color.lighter,marginRight:(0,c.px)(9)}))),this.url$=this.state$.pipe((0,p.U)(n=>n.publicUrlShare?.url)),this.title$=this.state$.pipe((0,p.U)(n=>
1this.I18n.translate(n,this.I18n.key.calendarShareManageView.publicLinkLabel))),this.subtitle$=this.state$.pipe((0,p.U)(n=>{switch(n.publicUrlShare?.permissionType){case A.kbO.URL_SHARE_NOT_SHARED:return this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.notShared);case A.kbO.URL_SHARE_ONLY_FREE_OR_BUSY:return this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.onlyFreeBusy);case A.kbO.URL_SHARE_ALL_EVENT_INFO:return this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.allEventDetails)}})),this.copyCalendarLinkLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.copyLink))),this.resetCalendarLinkLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.resetLink))),this.notSharedLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.notShared))),this.freeOrBusyLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.onlyFreeBusy))),this.allEventDetailsLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.permission.allEventDetails)))}set publicUrlShare(n){this.set({publicUrlShare:n})}set calendarSubscriptions(n){this.set({calendarSubscriptions:n})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(gi)))(i||gi)}}();static#t=this.\u0275cmp=e.Xpm({type:gi,selectors:[["t5s-user-sidebar-calendar-public-url-share"]],inputs:{publicUrlShare:"publicUrlShare",calendarSubscriptions:"calendarSubscriptions"},outputs:{copyPublicUrlShareUrl:"copyPublicUrlShareUrl",resetPublicUrlShareUrl:"resetPublicUrlShareUrl",updatePublicUrlShare:"updatePublicUrlShare"},features:[e.qOj],decls:20,vars:25,consts:[[3,"icon"],[3,"t5sTooltip","icon","t5sImperativeMenuTriggerFor","btnClick"],["settingsTrigger","t5sImperativeMenuTrigger"],["settingsMenu","t5sMenu"],[4,"ngIf"],[3,"leftIcon","text","rightIcon","menuItemClick"],[3,"leftIcon","text","menuItemClick"],[3,"calendarSubscriptions","selectedCalendarSubscriptionIds","selectedCalendarSubscriptionIdsChange"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div"),e.ALo(1,"async"),e.TgZ(2,"div"),e.ALo(3,"async"),e._UZ(4,"t5s-darker-icon-20px",0),e.qZA(),e.TgZ(5,"div")(6,"t5s-single-line-bold-text-13px"),e._uU(7),e.ALo(8,"async"),e.qZA(),e.TgZ(9,"t5s-single-line-text-darker-13px"),e._uU(10),e.ALo(11,"async"),e.qZA()(),e.TgZ(12,"div")(13,"t5s-icon-button-17px",1,2),e.NdJ("btnClick",function(l){e.CHM(o);const d=e.MAs(14);return e.KtG(d.toggleMenu(l))}),e.ALo(15,"async"),e.qZA()(),e.TgZ(16,"t5s-menu-template",null,3),e.YNc(18,zx,13,23,"ng-container",4),e.ALo(19,"async"),e.qZA()()}if(2&t){const o=e.MAs(17);e.Tol(e.lcZ(1,13,i.containerClass$)),e.xp6(2),e.Tol(e.lcZ(3,15,i.shareUrlIconContainerClass$)),e.xp6(2),e.Q6J("icon",i.Icons.link.name),e.xp6(3),e.hij(" ",e.lcZ(8,17,i.title$)," "),e.xp6(3),e.hij(" ",e.lcZ(11,19,i.subtitle$)," "),e.xp6(2),e.Tol(i.settingsBtnClass),e.xp6(1),e.Q6J("t5sTooltip",i.I18n.translate(e.lcZ(15,21,i.state$),i.I18n.key.calendarShareManageView.optionsBtnTooltip))("icon",i.Icons.moreHorizRounded.name)("t5sImperativeMenuTriggerFor",o),e.xp6(5),e.Q6J("ngIf",e.lcZ(19,23,i.state$))}},dependencies:[u.O5,ls.T,mc.u,Pr.n,fc.x,Ka.n,xc.z,$r.f,bc.r,_i.E,ui.M,Le.h,Ln,u.Ov],encapsulation:2,changeDetection:0})}class mi extends Re.Hr{constructor(){super(...arguments),this.I18n=Ee,this.closeClick=new e.vpe,this.backClick=new e.vpe,this.copyPrivateUrlShareUrl=new e.vpe,this.resetPrivateUrlShareUrl=new e.vpe,this.updatePrivateUrlShare=new e.vpe,this.copyPublicUrlShareUrl=new e.vpe,this.resetPublicUrlShareUrl=new e.vpe,this.updatePublicUrlShare=new e.vpe,this.title$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarShareManageView.title))),this.calendarSubscriptions$=this.state$.pipe((0,p.U)(({calendarSubscriptions:n})=>n)),this.privateUrlShare$=this.state$.pipe((0,p.U)(({staticShares:n})=>n?.privateUrlShare)),this.publicUrlShare$=this.state$.pipe((0,p.U)(({staticShares:n})=>n?.publicUrlShare)),this.sharableLinksSectionTitle$=this.state$.pipe((0,p.U)(n=>
1this.I18n.translate(n,this.I18n.key.calendarShareManageView.sharableLinksSectionTitle))),this.entryClass=(0,x.I)({...c.xI,...c.QP,padding:(0,c.o3)(9,13)})}set staticShares(n){this.set({staticShares:n})}set calendarSubscriptions(n){this.set({calendarSubscriptions:n})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(mi)))(i||mi)}}();static#t=this.\u0275cmp=e.Xpm({type:mi,selectors:[["t5s-user-sidebar-calendar-share-manage-view"]],inputs:{staticShares:"staticShares",calendarSubscriptions:"calendarSubscriptions"},outputs:{closeClick:"closeClick",backClick:"backClick",copyPrivateUrlShareUrl:"copyPrivateUrlShareUrl",resetPrivateUrlShareUrl:"resetPrivateUrlShareUrl",updatePrivateUrlShare:"updatePrivateUrlShare",copyPublicUrlShareUrl:"copyPublicUrlShareUrl",resetPublicUrlShareUrl:"resetPublicUrlShareUrl",updatePublicUrlShare:"updatePublicUrlShare"},features:[e.qOj],decls:27,vars:36,consts:[["user-sidebar-header",""],["header-start",""],[3,"centered","gap"],["data-cy","t5s-wc-usi-calendar-share-manage-back-btn",3,"t5sTooltip","icon","btnClick"],["header-end",""],["data-cy","t5s-user-sidebar-calendar-close-btn",3,"icon","t5sTooltip","btnClick"],["user-sidebar-body",""],[3,"privateUrlShare","calendarSubscriptions","copyPrivateUrlShareUrl","resetPrivateUrlShareUrl","updatePrivateUrlShare"],[3,"publicUrlShare","calendarSubscriptions","copyPublicUrlShareUrl","resetPublicUrlShareUrl","updatePublicUrlShare"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"t5s-flex-row",2)(4,"t5s-primary-icon-button-20px",3),e.NdJ("btnClick",function(){return i.backClick.emit()}),e.ALo(5,"async"),e.qZA(),e.TgZ(6,"t5s-single-line-bold-text-16px"),e._uU(7),e.ALo(8,"async"),e.qZA()(),e.BQk(),e.ynx(9,4),e.TgZ(10,"t5s-flex-row",2)(11,"t5s-primary-icon-button-20px",5),e.NdJ("btnClick",function(){return i.closeClick.emit()}),e.ALo(12,"async"),e.qZA()(),e.BQk(),e.qZA(),e.ynx(13,6),e.TgZ(14,"div")(15,"t5s-single-line-bold-text-16px"),e._uU(16),e.ALo(17,"async"),e.qZA()(),e._UZ(18,"t5s-divider-light-1px"),e.TgZ(19,"t5s-user-sidebar-calendar-private-url-share",7),e.NdJ("copyPrivateUrlShareUrl",function(s){return i.copyPrivateUrlShareUrl.emit(s)})("resetPrivateUrlShareUrl",function(){return i.resetPrivateUrlShareUrl.emit()})("updatePrivateUrlShare",function(s){return i.updatePrivateUrlShare.emit(s)}),e.ALo(20,"async"),e.ALo(21,"async"),e.qZA(),e._UZ(22,"t5s-divider-light-1px"),e.TgZ(23,"t5s-user-sidebar-calendar-public-url-share",8),e.NdJ("copyPublicUrlShareUrl",function(s){return i.copyPublicUrlShareUrl.emit(s)})("resetPublicUrlShareUrl",function(){return i.resetPublicUrlShareUrl.emit()})("updatePublicUrlShare",function(s){return i.updatePublicUrlShare.emit(s)}),e.ALo(24,"async"),e.ALo(25,"async"),e.qZA(),e._UZ(26,"t5s-divider-light-1px"),e.BQk(),e.qZA()),2&t&&(e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("centered",!0)("gap",13),e.xp6(1),e.Q6J("t5sTooltip",i.I18n.translate(e.lcZ(5,20,i.state$),i.I18n.key.calendarShareManageView.backBtnTooltip))("icon",i.Icons.arrowBackRounded.name),e.xp6(3),e.Oqu(e.lcZ(8,22,i.title$)),e.xp6(3),e.Q6J("centered",!0)("gap",13),e.xp6(1),e.Q6J("icon",i.Icons.closeLarge.name)("t5sTooltip",i.I18n.translate(e.lcZ(12,24,i.state$),i.I18n.key.calendarShareManageView.closeBtnTooltip)),e.xp6(3),e.Tol(i.entryClass),e.xp6(2),e.Oqu(e.lcZ(17,26,i.sharableLinksSectionTitle$)),e.xp6(3),e.Q6J("privateUrlShare",e.lcZ(20,28,i.privateUrlShare$))("calendarSubscriptions",e.lcZ(21,30,i.calendarSubscriptions$)),e.xp6(4),e.Q6J("publicUrlShare",e.lcZ(24,32,i.publicUrlShare$))("calendarSubscriptions",e.lcZ(25,34,i.calendarSubscriptions$)))},dependencies:[Gt.Q,Rr.Z,di.o,nn.D,hi,gi,Xe,et,Le.h,u.Ov],encapsulation:2,changeDetection:0})}class cs{constructor(n){this.store$=n,this.staticShares$=n.select(Ux),this.calendarSubscriptions$=n.select(Ox),n.dispatch(Ae.getActiveUserCalendarStaticShares()),n.dispatch(Ae.loadActiveUserCalendarSubscriptions())}backClick(){this.store$.dispatch(xn_calendar())}closeClick(){this.store$.dispatch((0,De.lh)())}
1resetPublicUrlShareUrl(){this.store$.dispatch(bn.confirmResetPublicShareUrl())}resetPrivateUrlShareUrl(){this.store$.dispatch(bn.confirmResetPrivateShareUrl())}updatePublicUrlShare({input:n}){this.store$.dispatch(Ae.updatePublicUrlShare({input:n}))}updatePrivateUrlShare({input:n}){this.store$.dispatch(Ae.updatePrivateUrlShare({input:n}))}copyPrivateUrlShareUrl({url:n}){this.store$.dispatch(bn.copyPrivateShareUrl({url:n}))}copyPublicUrlShareUrl({url:n}){this.store$.dispatch(bn.copyPublicShareUrl({url:n}))}static#e=this.\u0275fac=function(t){return new(t||cs)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:cs,selectors:[["t5s-usi-calendar-share-manage"]],decls:3,vars:6,consts:[[3,"staticShares","calendarSubscriptions","closeClick","backClick","copyPrivateUrlShareUrl","resetPrivateUrlShareUrl","updatePrivateUrlShare","copyPublicUrlShareUrl","resetPublicUrlShareUrl","updatePublicUrlShare"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-calendar-share-manage-view",0),e.NdJ("closeClick",function(){return i.closeClick()})("backClick",function(){return i.backClick()})("copyPrivateUrlShareUrl",function(s){return i.copyPrivateUrlShareUrl(s)})("resetPrivateUrlShareUrl",function(){return i.resetPrivateUrlShareUrl()})("updatePrivateUrlShare",function(s){return i.updatePrivateUrlShare(s)})("copyPublicUrlShareUrl",function(s){return i.copyPublicUrlShareUrl(s)})("resetPublicUrlShareUrl",function(){return i.resetPublicUrlShareUrl()})("updatePublicUrlShare",function(s){return i.updatePublicUrlShare(s)}),e.ALo(1,"async"),e.ALo(2,"async"),e.qZA()),2&t&&e.Q6J("staticShares",e.lcZ(1,2,i.staticShares$))("calendarSubscriptions",e.lcZ(2,4,i.calendarSubscriptions$))},dependencies:[mi,u.Ov],encapsulation:2,changeDetection:0})}const Qe={loadActiveUserCalendarSubscriptions:(0,g.PH)("UserSidebarCalendarSubscriptionActions.loadActiveUserCalendarSubscriptions"),loadActiveUserCalendarSubscriptionsSuccess:(0,g.PH)("UserSidebarCalendarSubscriptionActions.loadActiveUserCalendarSubscriptionsSuccess",(0,g.Ky)()),loadActiveUserCalendarSubscriptionsError:(0,dt.bR)("UserSidebarCalendarSubscriptionActions.loadActiveUserCalendarSubscriptionsError"),activateActiveUserCalendarSubscription:(0,g.PH)("UserSidebarCalendarSubscriptionActions.activateActiveUserCalendarSubscription",(0,g.Ky)()),activateActiveUserCalendarSubscriptionSuccess:(0,g.PH)("UserSidebarCalendarSubscriptionActions.activateActiveUserCalendarSubscriptionSuccess",(0,g.Ky)()),deactivateActiveUserCalendarSubscription:(0,g.PH)("UserSidebarCalendarSubscriptionActions.deactivateActiveUserCalendarSubscription",(0,g.Ky)()),deactivateActiveUserCalendarSubscriptionSuccess:(0,g.PH)("UserSidebarCalendarSubscriptionActions.deactivateActiveUserCalendarSubscriptionSuccess",(0,g.Ky)()),updateActiveUserCalendarSubscription:(0,g.PH)("UserSidebarCalendarSubscriptionActions.updateActiveUserCalendarSubscription",(0,g.Ky)()),updateActiveUserCalendarSubscriptionSuccess:(0,g.PH)("UserSidebarCalendarSubscriptionActions.updateActiveUserCalendarSubscriptionSuccess",(0,g.Ky)())};class Mo{constructor(n,t){this.actions$=n,this.gqlCalendarSubscriptions=t,this.loadActiveUserCalendarSubscriptions$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Qe.loadActiveUserCalendarSubscriptions),(0,L.w)(()=>this.gqlCalendarSubscriptions.getActiveUserCalendarSubscriptions().pipe((0,p.U)(i=>Qe.loadActiveUserCalendarSubscriptionsSuccess({calendarSubscriptions:i})),(0,dt.Mr)(Qe.loadActiveUserCalendarSubscriptionsError))))),this.activateActiveUserCalendarSubscription$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Qe.activateActiveUserCalendarSubscription),(0,qt.zg)(({input:i})=>this.gqlCalendarSubscriptions.activateActiveUserCalendarSubscription(i).pipe((0,p.U)(()=>Qe.activateActiveUserCalendarSubscriptionSuccess(i)),(0,dt.Mr)())))),this.deactivateActiveUserCalendarSubscription$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Qe.deactivateActiveUserCalendarSubscription),(0,qt.zg)(({input:i})=>this.gqlCalendarSubscriptions.deactivateActiveUserCalendarSubscription(i).pipe((0,p.U)(()=>Qe.deactivateActiveUserCalendarSubscriptionSuccess(i)),(0,dt.Mr)())))),this.updateActiveUserCalendarSubscription$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Qe.updateActiveUserCalendarSubscription),(0,qt.zg)(({input:i})=>this.gqlCalendarSubscriptions.updateActiveUserCalendarSubscription(i).pipe((0,p.U)(o=>Qe.updateActiveUserCalendarSubscriptionSuccess({calendarSubscription:o})),(0,dt.Mr)()))))}static#e=this.\u0275fac=function(t){return new(t||Mo)(e.LFG(_.eX),e.LFG(st.Wn))};static#t=this.\u0275prov=e.Yz7({token:Mo,factory:Mo.\u0275fac})}const fi=(0,r(74849).H)(),{selectAll:Fx}=fi.getSelectors(),Gx=fi.getInitialState({isLoading:!1,loadingError:!1}),Jx=(0,g.Lq)(Gx,(0,g.on)(Qe.loadActiveUserCalendarSubscriptions,a=>({...a,isLoading:!0})),(0,g.on)(Qe.loadActiveUserCalendarSubscriptionsSuccess,(a,{calendarSubscriptions:n})=>fi.setAll(n,a)),(0,g.on)(Qe.activateActiveUserCalendarSubscription,(a,{input:{id:n}})=>fi.updateOne({id:n,changes:{active:!0}},a)),(0,g.on)(Qe.deactivateActiveUserCalendarSubscription,(a,{input:{id:n}})=>fi.updateOne({id:n,changes:{active:!1}},a)),(0,g.on)(Qe.updateActiveUserCalendarSubscription,(a,{input:{id:n,...t}})=>fi.updateOne({id:n,changes:t},a))),Vx=Fx,Cc="webClientUserSidebarCalendarSubscription";class ps{static#e=this.\u0275fac=function(t){return new(t||ps)};static#t=this.\u0275mod=e.oAB({type:ps});static#n=this.\u0275inj=e.cJS({providers:[{provide:st.Wn,useFactory:n=>new st.Wn(n),deps:[st.RZ]}
1],imports:[g.Aw.forFeature(Cc,Jx),_.sQ.forFeature([Mo])]})}const vc=(0,g.ZF)(Cc),Wx=((0,g.P1)(vc,a=>a.isLoading),(0,g.P1)(vc,Vx));var Yx=r(83247),Ic=r(35469),zr=r(70071),Kx=r(89938);let ds=class nr{constructor(n,t){this.store$=n,this.actions$=t;const i=this.actions$.pipe((0,_.l4)(Ic.Yy.upsertAndPersistFlimValSuccess,Yx.mg.createBlabItemSuccess,Kx.KX.deleteBlabItemSuccess,Ic.GQ.deleteBlabItemSuccess)),o=this.actions$.pipe((0,_.l4)(zr.wW.removeSuccess,zr.wW.markCompletedSuccess,zr.wW.editSuccess));(0,mn.T)(i,o).pipe((0,lt.b)(10),(0,Ft.s)(this)).subscribe(()=>{this.store$.dispatch(Be.qn.loadActiveDayCalendarEvents())})}static#e=this.\u0275fac=function(t){return new(t||nr)(e.LFG(g.yh),e.LFG(_.eX))};static#t=this.\u0275prov=e.Yz7({token:nr,factory:nr.\u0275fac})};ds=(0,Ot.gn)([(0,oi.c)(),(0,Ot.w6)("design:paramtypes",[g.yh,_.eX])],ds);var j=r(89986),jx=r(44323),yc=r(15079),kc=r(69302),qx=r(40886);function Xx(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div",5),e._uU(2),e.qZA(),e.BQk()),2&a){const t=n.$implicit;e.xp6(2),e.Oqu(t)}}class xi extends v.Y4{constructor(){super(...arguments),this.activeDateChange=new e.vpe,this.pickerDateChange=new e.vpe,this.activeDate$=this.select((0,v.Cc)(["activeDate"])).pipe((0,p.U)(({activeDate:n})=>n)),this.markedDates$=this.select((0,v.Cc)(["monthOverview"])).pipe((0,z.M3)(),(0,p.U)(({monthOverview:n})=>n)),this.weekNumbers$=this.select((0,v.Cc)(["firstWeekday","pickerDate"])).pipe((0,p.U)(n=>{let t;switch(n.firstWeekday){case A.FSl.SATURDAY:t=6;break;case A.FSl.SUNDAY:t=0;break;case A.FSl.MONDAY:t=1}const i=(0,j.YY)({date:n.pickerDate??new Date,weekStartsOn:t});for(;i.length<6;){const o=i[i.length-1];i.push(o>=53?1:o+1)}return i}))}set activeDate(n){this.setState({activeDate:n})}set pickerDate(n){this.set({pickerDate:n}),this.calendar&&this.calendar.setActiveMonth(n)}set monthOverview(n){this.setState({monthOverview:n})}setActiveMonth(n){this.calendar&&this.calendar.setActiveMonth(n)}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(xi)))(i||xi)}}();static#t=this.\u0275cmp=e.Xpm({type:xi,selectors:[["t5s-user-sidebar-calendar-datepicker"]],viewQuery:function(t,i){if(1&t&&e.Gf(kc.q,5),2&t){let o;e.iGM(o=e.CRH())&&(i.calendar=o.first)}},inputs:{activeDate:"activeDate",pickerDate:"pickerDate",monthOverview:"monthOverview"},outputs:{activeDateChange:"activeDateChange",pickerDateChange:"pickerDateChange"},features:[e.qOj],decls:8,vars:18,consts:[[1,"t5s-sidebar-datepicker-container"],[1,"t5s-sidebar-datepicker-shadow"],[1,"t5s-sidebar-datepicker-week-numbers"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"height","cellSize","cellContentSize","todaySize","cellFontSize","cellFontLineHeight","weekdayFontSize","weekdayLineHeight","selected","markedDates","selectedChange","activeChange"],[1,"t5s-sidebar-datepicker-week-number-cell"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e.YNc(3,Xx,3,1,"ng-container",3),e.ALo(4,"async"),e.qZA(),e.TgZ(5,"t5s-calendar-v2",4),e.NdJ("selectedChange",function(s){return i.activeDateChange.emit({activeDate:s.selected})})("activeChange",function(s){return i.pickerDateChange.emit({pickerDate:s.active})}),e.ALo(6,"async"),e.ALo(7,"async"),e.qZA()()()),2&t&&(e.xp6(3),e.Q6J("ngForOf",e.lcZ(4,12,i.weekNumbers$))("ngForTrackBy",i.trackById),e.xp6(2),e.Q6J("height",null)("cellSize",34)("cellContentSize",32)("todaySize",28)("cellFontSize",14)("cellFontLineHeight",18)("weekdayFontSize",12)("weekdayLineHeight",16)("selected",e.lcZ(6,14,i.activeDate$))("markedDates",e.lcZ(7,16,i.markedDates$)))},dependencies:[u.sg,qx.q,u.Ov],styles:[".t5s-sidebar-datepicker-container{padding-bottom:34px}.t5s-sidebar-datepicker-shadow{display:flex;flex-direction:row;justify-content:center;padding-left:12px;padding-bottom:6px;box-shadow:0 0 0 1px #0f0f0f0d,0 3px 6px #0f0f0f1a,0 9px 24px #0f0f0f33;border-bottom-right-radius:12px;border-bottom-left-radius:12px;background-color:#fff}.t5s-sidebar-datepicker-week-numbers{display:flex;flex-direction:column;align-items:center;width:38px;background-color:#37352f0f;border-radius:6px;margin-top:34px;margin-bottom:6px;font-size:12px;line-height:16px;font-weight:400;color:#37352fa6;user-select:none;-webkit-user-select:none}.t5s-sidebar-datepicker-week-number-cell{display:flex;align-items:center;justify-content:center;height:34px;flex:none}.t5s-sidebar-datepicker-shadow t5s-calendar-v2{flex:1;min-width:0}.t5s-sidebar-datepicker-shadow .t5s-calendar-v2-container{width:100%!important}.t5s-sidebar-datepicker-shadow .t5s-calendar-v2-container .mat-calendar-table{width:100%}\n"],encapsulation:2,changeDetection:0})}var Zo=r(54517);function eb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",1),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.pickerOpenChange.emit({pickerOpen:!s.pickerOpen}))}),e.TgZ(2,"div",2),e._UZ(3,"t5s-single-line-text",3)(4,"t5s-icon",3),e.qZA()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getBtnClass(t)),e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Q6J("state",i.labelState$),e.xp6(1),e.Q6J("state",i.iconState$)}}class bi extends v.Y4{constructor(){super(...arguments),this.pickerOpenChange=new e.vpe,this.labelState$=this.state$.pipe((0,p.U)(n=>({fontSet:c.LZ["medium-14px"],fgColor:n.theme.color.darker,text:this.getDateLabel(n)}))),this.iconState$=this.state$.pipe((0,p.U)(n=>({size:17,icon:pe.PJ.chevronLight13PxFont.name,fgColor:this.isActive(n)?n.theme.color.primary:n.theme.color.darker,noPointerEvents:!0})))}set activeDate(n){this.set({activeDate:n})}set pickerDate(n){this.set({pickerDate:n})}set pickerOpen(n){this.set({pickerOpen:n})}isActive(n){return!(n.pickerOpen||!n.activeDate||!(0,j.Xy)((0,j.oj)(n.activeDate),(0,j.cQ)()))}getDateLabel(n){const{formatCalendarDate:t,formatCalendarMonthDate:i}=ua.L;return n.pickerOpen?i(n,this.getPickerDate(n))??"":t(n,this.getActiveDate(n))??""}getActiveDate(n){return n.activeDate??(0,j.cQ)()}getPickerDate(n){return n.pickerDate??(0,j.cQ)()}getBtnClass(n){return(0,x.I)({overflow:"hidden",borderRadius:(0,c.px)(6),...(0,c.T_)({boxShadow:(0,c.Wn)(2,(0,c.uK)(n.theme.color.primary,25)),transitionProperty:"box-shadow",transitionDuration:(0,c.ms)(150)})})}getContainerClass(n){const t=this.isActive(n);return(0,x.I)({...c.xI,borderRadius:(0,c.px)(6),padding:"5px 6px 5px 8px",[me.TA]:t?n.theme.color.primary:void 0,...(0,c.Mr)({[me.TA]:t?n.theme.color.primary:void 0,backgroundColor:this.bgHoverColor(n,t?n.theme.color.primary:void 0)}),...(0,c.bB)({[me.TA]:t?n.theme.color.primary:void 0,backgroundColor:this.bgActiveColor(n,t?n.theme.color.primary:void 0)})})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(bi)))(i||bi)}}();static#t=this.\u0275cmp=e.Xpm({type:bi,selectors:[["t5s-user-sidebar-calendar-date-button"]],inputs:{activeDate:"activeDate",pickerDate:"pickerDate",pickerOpen:"pickerOpen"},outputs:{pickerOpenChange:"pickerOpenChange"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"click"],["tabindex","-1"],[3,"state"]],template:function(t,i){1&t&&(e.YNc(0,eb,5,6,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,Mn.o,Zo.i,u.Ov],styles:["[_nghost-%COMP%]{position:relative}"],changeDetection:0})}var wc=r(74784),tb=r(93496),nb=r(39570);r(91753);var sb=r(12396),rb=r(10320),lb=r(9569),Qr=r(36945);function cb(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"div")(3,"div"),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Tol(i.getCircleClass(t)),e.xp6(1),e.Tol(i.getLineClass(t))}}class Ci extends v.Oo{getContainerClass(n){return(0,x.I)({...c.xI,position:"relative"})}getCircleClass(n){return(0,x.I)({backgroundColor:n.theme.color.primary,...(0,c.In)(12),position:"absolute",...c.eP,top:(0,c.px)(-5)})}getLineClass(n){return(0,x.I)({...c.yD,...(0,c.e)(2),backgroundColor:n.theme.color.primary,paddingLeft:(0,c.px)(6)})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Ci)))(i||Ci)}}();static#t=this.\u0275cmp=e.Xpm({type:Ci,selectors:[["t5s-user-sidebar-calendar-current-time-marker"]],features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"]],template:function(t,i){1&t&&(e.YNc(0,cb,4,6,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,u.Ov],encapsulation:2,changeDetection:0})}var Cn=r(39778);function pb(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-single-line-text",3),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("state",t.subTitleState$)}}function db(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"button",1),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.reminderEventClick.emit({event:s.event}))}),e.qZA(),e.TgZ(3,"t5s-flex-row",2),e._UZ(4,"t5s-icon",3)(5,"t5s-single-line-text",3),e.qZA(),e.YNc(6,pb,2,1,"ng-container",0),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Tol(i.eventBtnClass),e.xp6(1),e.Q6J("gap",4),e.xp6(1),e.Q6J("state",i.iconState$),e.xp6(1),e.Q6J("state",i.titleState$),e.xp6(1),e.Q6J("ngIf",i.getEventSubtitle(t))}}class vi extends v.Y4{constructor(){super(...arguments),this.I18n=Ee,this.reminderEventClick=new e.vpe,this.eventBtnClass=(0,x.I)({position:"absolute",left:(0,c.px)(0),top:(0,c.px)(0),...c.hw}),this.iconState$=this.state$.pipe((0,p.U)(n=>({size:17,fgColor:n.theme.color.darkest,icon:pe.PJ.bookmarkOutline.name,noPointerEvents:!0}))),this.titleState$=this.state$.pipe((0,p.U)(n=>({fontSet:n.event?.completed?c.LZ["13px"]:c.LZ["medium-13px"],text:this.getEventTitle(n),textDecoration:n.event?.completed?"line-through":void 0,margin:(0,c.e6)(1,0,0,0)}))),this.subTitleState$=this.state$.pipe((0,p.U)(n=>({fontSet:c.LZ["13px"],text:this.getEventSubtitle(n),margin:(0,c.e6)(0,0,0,1)})))}set event(n){this.set({event:n})}getEventTitle(n){const t=n.event?.title;return t||this.I18n.translate(n,this.I18n.key.event.titlePlaceholder)}getEventSubtitle(n){if(n.event?.startDate&&n.event?.hasTime)return this.formatCalendarTime(n,n.event?.startDate)}getContainerClass(n){const{event:t}=n,i=(0,Cn.q_)(t?.calendarSubscription?.color)??n.theme.color.primary;return(0,x.I)({...c.i3,position:"relative",borderRadius:(0,c.px)(4),padding:(0,c.o3)(4,0,3,7),backgroundColor:(0,c.$n)(i,.9),...(0,c.Mr)({backgroundColor:(0,c.$n)(i,.8)}),...(0,c.bB)({backgroundColor:(0,c.$n)(i,.7)})})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(vi)))(i||vi)}}();static#t=this.\u0275cmp=e.Xpm({type:vi,selectors:[["t5s-user-sidebar-calendar-reminder-event"]],inputs:{event:"event"},outputs:{reminderEventClick:"reminderEventClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"click"],[3,"gap"],[3,"state"]],template:function(t,i){1&t&&(e.YNc(0,db,7,8,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,Mn.o,Zo.i,nn.D,u.Ov],encapsulation:2,changeDetection:0})}function _b(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-single-line-text",3),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("state",t.subTitleState$)}}function ub(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"button",1),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.checklistEntryEventClick.emit({event:s.event}))}),e.qZA(),e.TgZ(3,"t5s-flex-row",2),e._UZ(4,"t5s-icon",3)(5,"t5s-single-line-text",3),e.qZA(),e.YNc(6,_b,2,1,"ng-container",0),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Udp("position","absolute")("left",0)("top",0)("width",100,"%")("height",100,"%"),e.xp6(1),e.Q6J("gap",4),e.xp6(1),e.Q6J("state",i.iconState$),e.xp6(1),e.Q6J("state",i.titleState$),e.xp6(1),e.Q6J("ngIf",i.getEventSubtitle(t))}}class Ii extends v.Y4{constructor(){super(...arguments),this.I18n=Ee,this.checklistEntryEventClick=new e.vpe,this.iconState$=this.state$.pipe((0,p.U)(n=>({size:18,fgColor:n.theme.color.darkest,icon:pe.PJ.checklistItems.name,noPointerEvents:!0}))),this.titleState$=this.state$.pipe((0,p.U)(n=>({fontSet:n.event?.completed?c.LZ["14px"]:c.LZ["medium-14px"],text:this.getEventTitle(n),textDecoration:n.event?.completed?"line-through":void 0}))),this.subTitleState$=this.state$.pipe((0,p.U)(n=>({fontSet:c.LZ["14px"],text:this.getEventSubtitle(n),margin:(0,c.e6)(2,0,0,2)})))}set event(n){this.set({event:n})}getEventTitle(n){const t=n.event?.title;return t||this.I18n.translate(n,this.I18n.key.event.titlePlaceholder)}getEventSubtitle(n){if(n.event?.startDate&&n.event?.hasTime)return this.formatCalendarTime(n,n.event?.startDate)}getContainerClass(n){const{event:t}=n,i=(0,Cn.Mj)(t?.calendarSubscription?.color)??n.theme.color.primary;return(0,x.I)({...c.i3,position:"relative",borderRadius:(0,c.px)(6),padding:(0,c.o3)(4,0,4,8),backgroundColor:(0,c.$n)(i,.9),...(0,c.Mr)({backgroundColor:(0,c.$n)(i,.8)}),...(0,c.bB)({backgroundColor:(0,c.$n)(i,.7)})})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Ii)))(i||Ii)}}();static#t=this.\u0275cmp=e.Xpm({type:Ii,selectors:[["t5s-user-sidebar-calendar-checklist-entry-event"]],inputs:{event:"event"},outputs:{checklistEntryEventClick:"checklistEntryEventClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"click"],[3,"gap"],[3,"state"]],template:function(t,i){1&t&&(e.YNc(0,ub,7,16,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,Mn.o,Zo.i,nn.D,u.Ov],encapsulation:2,changeDetection:0})}var Fr=r(37446),_s=r(99964);const{formatCalendarTimeRange:hb,formatCalendarTime:Lo,formatCalendarPreviewDateTime:Sc}=ua.L,{dayIndex:gb}=Fr.ck.core.calendar;function Tc(a,n,t){const{languagesDict:i,language:o}=a;return o&&i?(0,_s.Iu)({key:gb,params:{index:`${n}`,duration:`${t}`}},i,o)??"":""}function xb(a,n,t){const{languagesDict:i,language:o}=a;if(!o||!i)return"";const s=Lo(a,n);return t?`${s} \u2192 ${Sc(a,t)}`:`${s}`}function bb(a,n,t){const{languagesDict:i,language:o}=a;return o&&i?`${Sc(a,n)} \u2192 ${Lo(a,t)}`:""}function Ac(a,n,t){t=(0,j.P9)(t);const{hasTime:i}=n,o=(0,j.P9)(n.startDate),s=n.endDate?(0,j.P9)(n.endDate):void 0,l={start:o,end:s??o},d=(0,j.b7)(t),m={start:d,end:(0,j.iX)(t)},C=(0,j.jc)(s??o,o),S=Math.floor((0,j.jc)(d,o))+1,f=(0,j.Dy)(l),E=f.length;if(i){const Z=(0,j.KC)(o,t),R=(0,j.KC)(s??o,t);if((0,j._w)(o,m)&&(0,j._w)(s??o,m))return s?{subline:hb(a,o,s)}:{subline:Lo(a,o)};if(C<1)return Z?{subline:xb(a,o,s)}:{subline:bb(a,o,s)};{const ae=Tc(a,f.findIndex(xe=>(0,j.KC)(xe,t))+1,E);if(Z){const xe=`(${ae})`,Fe=`${function mb(a,n){const{languagesDict:t,language:i}=a,{from:o}=Fr.ck.core.calendar;if(!i||!t)return"";const s=Lo(a,n);return(0,_s.Iu)({key:o,params:{time:s}},t,i)??""}(a,o)}`;return{headlineSuffix:xe,subline:Fe}}if(R){const xe=`(${ae})`,Fe=`${function fb(a,n){const{languagesDict:t,language:i}=a,{until:o}=Fr.ck.core.calendar;if(!i||!t)return"";const s=Lo(a,n);return(0,_s.Iu)({key:o,params:{time:s}},t,i)??""}(a,s)}`;return{headlineSuffix:xe,subline:Fe}}return{headlineSuffix:`(${ae})`}}}return s&&1!==C?{headlineSuffix:`(${Tc(a,S,C)})`}:{}}var Uc=r(13997);function Cb(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-single-line-text",4),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("state",t.subTitleState$)}}function vb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"a",1),e.NdJ("click",function(o){const l=e.CHM(t).ngIf,d=e.oxw();return e.KtG(d.blabItemEventClickHandler(l,o))}),e.qZA(),e.TgZ(3,"t5s-flex-row",2),e._UZ(4,"t5s-blab-item-icon",3)(5,"t5s-single-line-text",4),e.qZA(),e.YNc(6,Cb,2,1,"ng-container",0),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.uIk("data-cy-color",null==t.event||null==t.event.calendarSubscription?null:t.event.calendarSubscription.color),e.xp6(1),e.Tol(i.eventBtnClass),e.Q6J("href",i.getHref(t),e.LSH),e.xp6(1),e.Q6J("gap",4),e.xp6(1),e.Udp("pointer-events","none"),e.Q6J("size",18)("blabDef",null==t.event?null:t.event.blabDef),e.xp6(1),e.Q6J("state",i.titleState$),e.xp6(1),e.Q6J("ngIf",i.getEventSubtitle(t))}}class No extends v.Y4{constructor(n,t,i){super(n,t),this.I18n=Ee,this.blabItemEventClick=new e.vpe,this.eventBtnClass=(0,x.I)({position:"absolute",left:(0,c.px)(0),top:(0,c.px)(0),...c.hw}),this.titleState$=this.state$.pipe((0,p.U)(o=>({fontSet:c.LZ["medium-14px"],text:this.getEventTitle(o)}))),this.subTitleState$=this.state$.pipe((0,p.U)(o=>({fontSet:c.LZ["14px"],text:this.getEventSubtitle(o),margin:(0,c.e6)(2,0,0,2)}))),this.connect(i.pipe((0,p.U)(o=>({blabItemHrefFactory:o}))))}s
1et event(n){this.set({event:n})}set activeDate(n){this.set({activeDate:n})}blabItemEventClickHandler(n,t){return!(0,Sn.i0)(t)||(n.event&&this.blabItemEventClick.emit({event:n.event}),!1)}getEventTitle(n){const{event:t,activeDate:i}=n;let o=t?.title;if(!t||!i)return;o||(o=this.I18n.translate(n,this.I18n.key.event.titlePlaceholder));const{headlineSuffix:s=""}=Ac(n,t,i);return`${o} ${s}`}getEventSubtitle(n){const{event:t,activeDate:i}=n;if(!t||!i)return;const{subline:o}=Ac(n,t,i);return o}getContainerClass(n){const{event:t}=n,i=(0,Cn.Mj)(t?.calendarSubscription?.color)??n.theme.color.primary;return(0,x.I)({...c.i3,position:"relative",borderRadius:(0,c.px)(6),padding:(0,c.o3)(4,0,4,8),backgroundColor:(0,c.$n)(i,.9),...(0,c.Mr)({backgroundColor:(0,c.$n)(i,.8)}),...(0,c.bB)({backgroundColor:(0,c.$n)(i,.7)})})}getHref(n){const{event:t,blabItemHrefFactory:i}=n;if(!t)return;const{blabItemId:o}=t;return o&&i?i(o):void 0}static#e=this.\u0275fac=function(t){return new(t||No)(e.Y36(c.Q2),e.Y36(ut.e7),e.Y36(Uc.O))};static#t=this.\u0275cmp=e.Xpm({type:No,selectors:[["t5s-user-sidebar-calendar-blab-item-event"]],inputs:{event:"event",activeDate:"activeDate"},outputs:{blabItemEventClick:"blabItemEventClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"href","click"],[3,"gap"],[3,"size","blabDef"],[3,"state"]],template:function(t,i){1&t&&(e.YNc(0,vb,7,13,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,Zo.i,nn.D,io.n,u.Ov],encapsulation:2,changeDetection:0})}var Ro=r(73129),Gr=r(15181);function Ib(a,n){1&a&&(e.ynx(0),e._UZ(1,"t5s-loading-spinner-26px-top"),e.BQk())}function yb(a,n){1&a&&(e.ynx(0),e._UZ(1,"t5s-user-sidebar-calendar-current-time-marker"),e.BQk())}function kb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-calendar-reminder-event",5),e.NdJ("reminderEventClick",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(3);return e.KtG(s.reminderEventClick.emit({reminderEvent:o}))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("event",t)}}function wb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-calendar-checklist-entry-event",6),e.NdJ("checklistEntryEventClick",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(3);return e.KtG(s.checklistEntryEventClick.emit({checklistEntryEvent:o}))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("event",t)}}function Sb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-calendar-blab-item-event",7),e.NdJ("blabItemEventClick",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(3);return e.KtG(s.blabItemEventClick.emit({blabItemEvent:o}))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw().$implicit,i=e.oxw(2).ngIf;e.xp6(1),e.Q6J("event",t)("activeDate",i.activeDate)}}function Tb(a,n){if(1&a&&(e.ynx(0),e.YNc(1,yb,2,0,"ng-container",0),e.ynx(2,3),e.YNc(3,kb,2,1,"ng-container",4),e.YNc(4,wb,2,1,"ng-container",4),e.YNc(5,Sb,2,2,"ng-container",4),e.BQk()()),2&a){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.Q6J("ngIf","current-time-marker"===(null==t?null:t.type)),e.xp6(1),e.Q6J("ngSwitch",null==t?null:t.type),e.xp6(1),e.Q6J("ngSwitchCase",i.CalendarEventType.REMINDER_EVENT),e.xp6(1),e.Q6J("ngSwitchCase",i.CalendarEventType.CHECKLIST_ENTRY_EVENT),e.xp6(1),e.Q6J("ngSwitchCase",i.CalendarEventType.BLAB_ITEM_EVENT)}}function Ab(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div",1),e.YNc(2,Tb,6,5,"ng-container",2),e.qZA(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Q6J("ngForOf",i.getEvents(t))("ngForTrackBy",i.trackById)}}function Ub(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-placeholder-top-v2",8),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Udp("width",100,"%")("height",100,"%"),e.Q6J("title",i.I18
1n.translate(t,i.I18n.key.calendarScheduleView.noEventsPlaceholder.title))("subtitle",i.I18n.translate(t,i.I18n.key.calendarScheduleView.noEventsPlaceholder.text))}}function Ob(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Ib,2,0,"ng-container",0),e.YNc(2,Ab,3,4,"ng-container",0),e.YNc(3,Ub,2,6,"ng-container",0),e.BQk()),2&a){const t=n.ngIf,i=e.oxw();let o,s;e.xp6(1),e.Q6J("ngIf",t.isLoading),e.xp6(1),e.Q6J("ngIf",!t.isLoading&&(null==(o=i.getEvents(t))?null:o.length)),e.xp6(1),e.Q6J("ngIf",!t.isLoading&&0===(null==(s=i.getEvents(t))?null:s.length))}}class Po extends Re.Hr{constructor(n,t,i,o){super(n,t),this.theme=n,this.i18n$=t,this.CalendarEventType=A.oDm,this.I18n=Ee,this.blabItemEventClick=new e.vpe,this.reminderEventClick=new e.vpe,this.checklistEntryEventClick=new e.vpe;const s=i.stable$.pipe((0,si.P)(),(0,L.w)(()=>(0,rb.F)(1e3,(0,nb.i)(o,lb.z))));this.connect(s.pipe((0,p.U)(()=>(0,j.E3)(new Date)),(0,Rt.K)(),(0,p.U)(l=>({now:l}))))}set activeDate(n){this.set({activeDate:n})}set events(n){this.set({events:n})}set isLoading(n){this.set({isLoading:n})}getEvents(n){if(!n.activeDate||!n.events||0===n.events.length)return[];const t=n.now??(0,j.E3)(new Date),i=(0,j.zk)(n.activeDate)?[...n.events,{startDate:t,hasTime:!0,title:"",type:"current-time-marker"}]:n.events;return function ab(a,n){return(n=[...n]).sort((t,i)=>{const o=!t.hasTime||!(0,j.KC)(a,t.startDate)&&t.endDate&&!(0,j.KC)(a,t.endDate),s=!i.hasTime||!(0,j.KC)(a,i.startDate)&&i.endDate&&!(0,j.KC)(a,i.endDate),l=(0,j.KC)(a,t.startDate)?t.startDate:t.endDate,d=(0,j.KC)(a,i.startDate)?i.startDate:i.endDate,h=t.endDate,m=i.endDate;if(!o&&s)return 1;if(o&&!s)return-1;if(o&&s){const C=(0,j.jc)(t.endDate??t.startDate,t.startDate),S=(0,j.jc)(i.endDate??i.startDate,i.startDate);if(C>S)return-1;if(C<S)return 1}if((0,j.RR)(l,d))return-1;if((0,j.Ax)(l,d))return 1;if(!o&&!s){if(h&&!m)return 1;if(!h&&m)return-1;if(h&&m&&(0,j.Ax)(h,m))return 1;if(h&&m&&(0,j.RR)(h,m))return-1}return t.type===A.oDm.BLAB_ITEM_EVENT&&i.type===A.oDm.REMINDER_EVENT?-1:t.type===A.oDm.REMINDER_EVENT&&i.type===A.oDm.BLAB_ITEM_EVENT||(t.title??"")>(i.title??"")?1:(t.title??"")<(i.title??"")?-1:t.id>i.id?1:-1}),n}(n.activeDate,i)}getContainerClass(n){return(0,x.I)({...c.i3,padding:(0,c.o3)(9,13),"> :not(:last-child)":{marginBottom:(0,c.px)(8)}})}static#e=this.\u0275fac=function(t){return new(t||Po)(e.Y36(c.Q2),e.Y36(ut.e7),e.Y36(sb.Wn),e.Y36(e.R0b))};static#t=this.\u0275cmp=e.Xpm({type:Po,selectors:[["t5s-user-sidebar-calendar-schedule-view"]],inputs:{activeDate:"activeDate",events:"events",isLoading:"isLoading"},outputs:{blabItemEventClick:"blabItemEventClick",reminderEventClick:"reminderEventClick",checklistEntryEventClick:"checklistEntryEventClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["t5sVerticalScroll",""],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngSwitch"],[4,"ngSwitchCase"],["data-cy","t5s-wc-usi-calendar-schedule-reminder-event-badge",3,"event","reminderEventClick"],["data-cy","t5s-wc-usi-calendar-schedule-checklist-entry-event-badge",3,"event","checklistEntryEventClick"],["data-cy","t5s-wc-usi-calendar-schedule-blab-item-event-badge",3,"event","activeDate","blabItemEventClick"],[3,"title","subtitle"]],template:function(t,i){1&t&&(e.YNc(0,Ob,4,3,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,u.RF,u.n9,Qr.b,Ci,vi,Ii,No,Ro.$,Gr.L,u.Ov],encapsulation:2,changeDetection:0})}function Eb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e._UZ(1,"t5s-title-menu-indicator-button-medium-16px",10),e.TgZ(2,"t5s-menu-template",11,12)(4,"t5s-text-menu-item",13),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openCalendarSelection.emit())}),e.qZA(),e.TgZ(5,"t5s-text-menu-item",14),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openCalendarSharing.emit())}),e.qZA(),e._UZ(6,"t5s-menu-divider"),e.TgZ(7,"t5s-text-primary-icon-menu-item",15),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.showCompletedRemindersClick(s))}),e.qZA()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(3),o=e.oxw();
1e.xp6(1),e.Q6J("label",o.I18n.translate(t,o.I18n.key.calendarTabTitle))("t5sImperativeMenuTriggerFor",i),e.xp6(1),e.Q6J("closeOnClick",!0),e.xp6(2),e.Q6J("text",o.I18n.translate(t,o.I18n.key.sidebarTitleMenu.selectCalendars)),e.xp6(1),e.Q6J("text",o.I18n.translate(t,o.I18n.key.sidebarTitleMenu.shareCalendars)),e.xp6(2),e.Q6J("text",o.I18n.translate(t,o.I18n.key.sidebarTitleMenu.showCompletedReminders))("rightIcon",o.getShowCompletedRemindersIcon(t))}}function Db(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"button",2),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.closePicker())}),e.qZA(),e.TgZ(3,"t5s-user-sidebar-calendar-date-button",16),e.NdJ("pickerOpenChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.set({pickerOpen:o.pickerOpen}))}),e.qZA(),e.TgZ(4,"t5s-flex-row",17)(5,"t5s-icon-button-20px",18),e.NdJ("btnClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.emitTodayClick(s))}),e.ALo(6,"async"),e.qZA(),e.TgZ(7,"t5s-icon-button-20px",19),e.NdJ("btnClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.emitPrevClick(s))}),e.ALo(8,"async"),e.qZA(),e.TgZ(9,"t5s-icon-button-20px",20),e.NdJ("btnClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.emitNextClick(s))}),e.ALo(10,"async"),e.qZA()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.navigationHeaderClass),e.xp6(1),e.Tol(i.pickerBackdropClass),e.xp6(1),e.Q6J("pickerOpen",t.pickerOpen)("activeDate",t.activeDate)("pickerDate",t.pickerDate),e.xp6(1),e.Q6J("gap",13),e.xp6(1),e.Q6J("t5sTooltip",i.I18n.translate(e.lcZ(6,14,i.state$),i.I18n.key.todayBtnTooltip))("icon",i.Icons.today.name),e.xp6(2),e.Q6J("t5sTooltip",i.getPrevBtnTooltip(e.lcZ(8,16,i.state$)))("icon",i.Icons.arrowBack.name),e.xp6(2),e.Q6J("t5sTooltip",i.getNextBtnTooltip(e.lcZ(10,18,i.state$)))("icon",i.Icons.arrowForward.name)}}function Bb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",21),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.set({pickerOpen:!1}))}),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getOverlayBackdropClass(t))}}class yi extends v.Y4{constructor(){super(...arguments),this.I18n=Ee,this.activeDateChange=new e.vpe,this.pickerDateChange=new e.vpe,this.pickerOpenChange=new e.vpe,this.closeClick=new e.vpe,this.blabItemEventClick=new e.vpe,this.reminderEventClick=new e.vpe,this.checklistEntryEventClick=new e.vpe,this.openCalendarSelection=new e.vpe,this.openCalendarSharing=new e.vpe,this.showCompletedReminders=new e.vpe,this.hideCompletedReminders=new e.vpe,this.placeholderContainerClass=(0,x.I)({...c.i3,margin:"auto",alignItems:"center"}),this.bodyOverlayContainer=(0,x.I)({position:"relative",zIndex:10}),this.activeDate$=this.select((0,v.Cc)(["activeDate"])).pipe((0,p.U)(({activeDate:n})=>n),(0,Rt.K)()),this.pickerDate$=this.select((0,v.Cc)(["pickerDate"])).pipe((0,p.U)(({pickerDate:n})=>n),(0,Rt.K)()),this.monthOverview$=this.select((0,v.Cc)(["monthOverview"])).pipe((0,p.U)(({monthOverview:n})=>n),(0,Rt.K)()),this.events$=this.select((0,v.Cc)(["events"])).pipe((0,p.U)(({events:n})=>n),(0,Rt.K)(),(0,p.U)(n=>n?.map(t=>({...t,startDate:(0,j.md)(t.startDate),endDate:(0,j.md)(t.endDate)})))),this.bodyContainerClass=(0,x.I)({...c.hw,...c.i3}),this.navigationHeaderClass=(0,x.I)({position:"relative",...(0,c.e)(46),...c.xI,...c.QP,padding:(0,c.o3)(0,13,0,5),"> :last-child":{marginLeft:"auto"}}),this.datepickerOverlayContainerClass$=this.state$.pipe((0,p.U)(n=>(0,x.I)({...c.hw,...c.i3,position:"absolute",top:(0,c.px)(0),left:(0,c.px)(0),maxHeight:(0,c.px)(n.pickerOpen?300:0),transition:`${(0,c.ms)(150)} cubic-bezier(0, 0, 0.2, 1)`,height:"fit-content",overflow:"hidden"}))),this.scheduleViewContainer=(0,x.I)({flex:1,minHeight:0}),this.pickerBackdropClass=(0,x.I)({position:"absolute",cursor:"initial",...c.hw,top:(0,c.px)(0),left:(0,c.px)(0)})}set isLoading(n){this.set({isLoading:n})}set activeDate(n){const t=(0,j.md)(n)??(0,j.cQ)();this.set({activeDate:t,pickerDate:t})}set pickerDate(n){const t=(0,j.md)(n)??(0,j.cQ)();this.set({pickerDate:t})}set pickerOpen(n){this.set({pickerOpen:n})}set monthOverview(n){this.set({monthOverview:n})}set events(n){this.set({events:n})}set calendarSettings(n){this.set({calendarSettings:n})}handleKeyboardEvent(n){return"Escape"===n.key?(this.set({pickerOpen:!1}),n.stopPropagation(),!1):n}getOverlayBackdropClass(n){return(0,x.I)({position:"absolute",top:(0,c.px)(0),left:(0,c.px)(0),...c.hw,flex:1,flexGrow:1,minHeight:n.pickerOpen?(0,c.vh)(100):void 0})}closePicker(){this.set({pickerOpen:!1})}getActiveDate(n){return n.activeDate??(0,j.cQ)()}getPickerDate(n){return n.pickerDate??(0,j.cQ)()}getNextBtnTooltip(n){return this.I18n.translate(n,n?.pickerOpen?this.I18n.key.nextMonthBtnTooltip:this.I18n.key.nextDayBtnTooltip)}getPrevBtnTooltip(n){return this.I18n.translate(n,n?.pickerOpen?this.I18n.key.prevMonthBtnTooltip:this.I18n.key.prevDayBtnTooltip)}emitPrevClick(n){n.pickerOpen?this.pickerDateChange.emit({pickerDate:(0,j.W9)(this.getPickerDate(n),1)}):this.activeDateChange.emit({activeDate:(0,j.kw)(this.getActiveDate(n),1)})}emitNextClick(n){n.pickerOpen?this.pickerDateChange.emit({pickerDate:(0,j.zI)(this.getPickerDate(n),1)}):this.activeDateChange.emit({activeDate:(0,j.E4)(this.getActiveDate(n),1)})}emitTodayClick(n){n.pickerOpen&&this.set({pickerOpen:!1}),this.activeDateChange.emit({activeDate:(0,j.cQ)()})}showCompletedRemindersClick(n){const{calendarSettings:t}=n;t?.showCompletedReminders?this.hideCompletedReminders.emit():this.showCompletedReminders.emit()}getShowCompletedRemindersIcon({calendarSettings:n}){if(n?.showCompletedReminders)return this.Icons.checkRounded.name}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(yi)))(i||yi)}}();static#t=this.\u0275cmp=e.Xpm({type:yi,selectors:[["t5s-user-sidebar-calendar-view"]],hostBindings:function(t,i){1&t&&e.NdJ("keydown",function(s){return i.handleKeyboardEvent(s)})},inputs:{isLoading:"isLoading",activeDate:"activeDate",pickerDate:"pickerDate",pickerOpen:"pickerOpen",monthOverview:"monthOverview",events:"events",calendarSettings:"calendarSettings"},outputs:{activeDateChange:"activeDateChange",pickerDateChange:"pickerDateChange",pickerOpenChange:"pickerOpenChange",closeClick:"closeClick",blabItemEventClick:"blabItemEventClick",reminderEventClick:"reminderEventClick",checklistEntryEventClick:"checklistEntryEventClick",openCalendarSelection:"openCalendarSelection",openCalendarSharing:"openCalendarSharing",showCompletedReminders:"showCompletedReminders",hideCompletedReminders:"hideCompletedReminders"},features:[e.qOj],decls:28,vars:47,consts:[["user-sidebar-header",""],["header-start",""],["tabindex","-1",3,"click"],[4,"ngIf"],["header-end",""],["centered","true"],["data-cy","t5s-user-sidebar-calendar-close-btn",3,"icon","t5sTooltip","btnClick"],["user-sidebar-body",""],[3,"activeDate","pickerDate","monthOverview","activeDateChange","pickerDateChange"],[3,"activeDate","events","isLoading","blabItemEventClick","reminderEventClick","checklistEntryEventClick"],["data-cy","t5s-wc-usi-calendar-menu-btn",3,"label","t5sImperativeMenuTriggerFor"],[3,"closeOnClick"],["calendarMenu","t5sMenu"],["data-cy","t5s-wc-usi-calendar-menu-calendar-select-calendars",3,"text","menuItemClick"],["data-cy","t5s-wc-usi-calendar-menu-calendar-share-calendars",3,"text","menuItemClick"],["data-cy","t5s-wc-usi-calendar-menu-calendar-show-completed-calendars",3,"text","rightIcon","menuItemClick"],[3,"pickerOpen","activeDate","pickerDate","pickerOpenChange"],[3,"gap"],[3,"t5sTooltip","icon","btnClick"],["data-cy","t5s-wc-usi-calendar-prev-btn",3,"t5sTooltip","icon","btnClick"],["data-cy","t5s-wc-usi-calendar-next-btn",3,"t5sTooltip","icon","btnClick"],[3,"click"]],template:function(t,i){if(1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"button",2),e.NdJ("click",function(){return i.closePicker()}),e.qZA(),e.YNc(4,Eb,8,7,"ng-container",3),e.ALo(5,"async"),e.BQk(),e.ynx(6,4),e.TgZ(7,"t5s-flex-row",5)(8,"t5s-primary-icon-button-20px",6),e.NdJ("btnClick",function(s){return i.closeClick.emit(s)}),e.ALo(9,"async"),e.qZA()(),e.BQk(),e.qZA(),e.TgZ(10,"div",7),e.YNc(11,Db,11,20,"ng-container",3),e.ALo(12,"async"),e.TgZ(13,"div"),e._UZ(14,"t5s-divider-light-1px"),e.YNc(15,Bb,2,2,"ng-container",3),e.ALo(16,"async"),e.TgZ(17,"div"),e.ALo(18,"async"),e.TgZ(19,"t5s-user-sidebar-calendar-datepicker",8),e.NdJ("activeDateChange",function(s){return i.activeDateChange.emit({activeDate:s.activeDate}),i.set({pickerOpen:!1})})("pickerDateChange",function(s){return i.pickerDateChange.emit({pickerDate:s.pickerDate})}),e.ALo(20,"async"),e.ALo(21,"async"),e.ALo(22,"async"),e.qZA()()(),e.TgZ(23,"div")(24,"t5s-user-sidebar-calendar-schedule-view",9),e.NdJ("blabItemEventClick",function(s){return i.blabItemEventClick.emit(s)})("reminderEventClick",function(s){return i.reminderEventClick.emit(s)})("checklistEntryEventClick",function(s){return i.checklistEntryEventClick.emit(s)}),e.ALo(25,"async"),e.ALo(26,"async"),e.ALo(27,"async"),e.qZA()()()()),2&t){let o,s;e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Tol(i.pickerBackdropClass),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,25,i.state$)),e.xp6(4),e.Q6J("icon",i.Icons.closeLarge.name)("t5sTooltip",i.I18n.translate(e.lcZ(9,27,i.state$),i.I18n.key.closeBtnTooltip)),e.xp6(2),e.Tol(i.bodyContainerClass),e.xp6(1),e.Q6J("ngIf",e.lcZ(12,29,i.state$)),e.xp6(2),e.Tol(i.bodyOverlayContainer),e.xp6(2),e.Q6J("ngIf",e.lcZ(16,31,i.state$)),e.xp6(2),e.Tol(e.lcZ(18,33,i.datepickerOverlayContainerClass$)),e.xp6(2),e.Q6J("activeDate",e.lcZ(20,35,i.activeDate$))("pickerDate",e.lcZ(21,37,i.pickerDate$))("monthOverview",e.lcZ(22,39,i.monthOverview$)),e.xp6(4),e.Tol(i.scheduleViewContainer),e.xp6(1),e.Q6J("activeDate",null==(o=e.lcZ(25,41,i.state$))?null:o.activeDate)("events",e.lcZ(26,43,i.events$))("isLoading",null==(s=e.lcZ(27,45,i.state$))?null:s.isLoading)}},dependencies:[u.O5,jx.P,Gt.Q,di.o,yc.O,nn.D,_i.E,ui.M,xi,bi,Xe,et,Ka.n,wc.W,tb.G,Le.h,Po,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}class $o{constructor(n,t){this.store$=n,this.pageEffects=t,this.isBootstrapping$=n.select(Be.Ay),this.activeDate$=n.select(Be.cc),this.pickerDate$=n.select(Be.qE),this.monthOverview$=n.select(Be.Ht),this.activeDayEvents$=n.select(Be.iM),this.calendarSettings$=n.select(Be.gI),n.dispatch(Be.qn.loadCalendarSettings()),n.dispatch(Be.qn.changePickerDate({pickerDate:new Date})),n.dispatch(Qe.loadActiveUserCalendarSubscriptions())}activeDateChange({activeDate:n}
1){this.store$.dispatch(Be.qn.changeActiveDate({activeDate:n}))}pickerDateChange({pickerDate:n}){this.store$.dispatch(Be.qn.changePickerDate({pickerDate:n}))}blabItemEventClick({blabItemEvent:n}){const{blabItemId:t,blabDefId:i}=n;this.store$.dispatch(Zn.i.navigateToItemEdit(t,{blabDefId:i}))}reminderEventClick({reminderEvent:n}){const{reminderId:t}=n;this.store$.dispatch((0,De.Q$)({route:{tab:ss,path:"edit-reminder",params:{reminderId:t}}}))}checklistEntryEventClick({checklistEntryEvent:n}){const{blabItemId:t}=n;this.store$.dispatch(Zn.i.navigateToItemEdit(t,{}))}openCalendarSelection(){this.store$.dispatch((0,De.Q$)({route:{tab:ss,path:"subscription-manage"}}))}openCalendarSharing(){this.store$.dispatch((0,De.Q$)({route:{tab:ss,path:"share-manage"}}))}closeClick(){this.store$.dispatch((0,De.lh)())}showCompletedReminders(){this.store$.dispatch(Be.qn.updateCalendarSettings({input:{showCompletedReminders:!0,showCompletedChecklistEntries:!0,showCompletedBlabItems:!0}}))}hideCompletedReminders(){this.store$.dispatch(Be.qn.updateCalendarSettings({input:{showCompletedReminders:!1,showCompletedChecklistEntries:!1,showCompletedBlabItems:!1}}))}static#e=this.\u0275fac=function(t){return new(t||$o)(e.Y36(g.yh),e.Y36(ds))};static#t=this.\u0275cmp=e.Xpm({type:$o,selectors:[["t5s-sidebar-calendar-page"]],features:[e._Bn([ds])],decls:7,vars:18,consts:[[3,"activeDate","pickerDate","monthOverview","events","calendarSettings","isLoading","closeClick","activeDateChange","pickerDateChange","blabItemEventClick","reminderEventClick","checklistEntryEventClick","openCalendarSelection","openCalendarSharing","showCompletedReminders","hideCompletedReminders"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-calendar-view",0),e.NdJ("closeClick",function(){return i.closeClick()})("activeDateChange",function(s){return i.activeDateChange(s)})("pickerDateChange",function(s){return i.pickerDateChange(s)})("blabItemEventClick",function(s){return i.blabItemEventClick(s)})("reminderEventClick",function(s){return i.reminderEventClick(s)})("checklistEntryEventClick",function(s){return i.checklistEntryEventClick(s)})("openCalendarSelection",function(){return i.openCalendarSelection()})("openCalendarSharing",function(){return i.openCalendarSharing()})("showCompletedReminders",function(){return i.showCompletedReminders()})("hideCompletedReminders",function(){return i.hideCompletedReminders()}),e.ALo(1,"async"),e.ALo(2,"async"),e.ALo(3,"async"),e.ALo(4,"async"),e.ALo(5,"async"),e.ALo(6,"async"),e.qZA()),2&t&&e.Q6J("activeDate",e.lcZ(1,6,i.activeDate$))("pickerDate",e.lcZ(2,8,i.pickerDate$))("monthOverview",e.lcZ(3,10,i.monthOverview$))("events",e.lcZ(4,12,i.activeDayEvents$))("calendarSettings",e.lcZ(5,14,i.calendarSettings$))("isLoading",e.lcZ(6,16,i.isBootstrapping$))},dependencies:[yi,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var Mb=r(42125),zo=r(77989),Zb=r(7207);
1function Lb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-icon-button",2),e.NdJ("btnClick",function(){const s=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.colorClick.emit({color:s}))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Q6J("t5sTooltip",o.getTooltip(i,t))("state",o.getColorIconState(i,t)),e.uIk("data-cy-selectable-color",t)}}function Nb(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e.ALo(2,"async"),e.YNc(3,Lb,2,3,"ng-container",1),e.ALo(4,"async"),e.qZA(),e.BQk()),2&a){const t=e.oxw();e.xp6(1),e.Tol(e.lcZ(2,4,t.containerClass$)),e.xp6(2),e.Q6J("ngForOf",e.lcZ(4,6,t.colors$))("ngForTrackBy",t.trackById)}}class ki extends v.Y4{constructor(){super(...arguments),this.colorClick=new e.vpe,this.containerClass$=this.state$.pipe((0,p.U)(n=>(0,x.I)({display:"grid",width:(0,c.px)(121),gridTemplateColumns:(0,c.rx)("auto-fill",(0,c.px)(17)),gap:(0,c.px)(9),padding:(0,c.px)(13)}))),this.colors$=this.state$.pipe((0,p.U)(({colors:n})=>n??Zb.O))}set colors(n){this.set({colors:n})}getTooltip(n,t){return this.translate(n,qe.n.core.color[t])}getColorIconState(n,t){return{btnSize:26,iconSize:17,color:(0,Cn.vG)(t),activeColor:(0,Cn.Mj)(t),icon:pe.PJ.colorIndicatorMedium.name,noPointerEvents:!0}}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(ki)))(i||ki)}}();static#t=this.\u0275cmp=e.Xpm({type:ki,selectors:[["t5s-color-picker-grid"]],inputs:{colors:"colors"},outputs:{colorClick:"colorClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","t5s-wc-color-picker-grid-single-color",3,"t5sTooltip","state","btnClick"]],template:function(t,i){1&t&&(e.YNc(0,Nb,5,8,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,zo.r,Le.h,u.Ov],encapsulation:2,changeDetection:0})}const Rb=function(a){return[a,"settingsBtn"]};function Pb(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"button",1),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.emitActiveToggle(s))}),e.TgZ(3,"div",2)(4,"div"),e._UZ(5,"t5s-icon",3),e.qZA(),e._UZ(6,"t5s-single-line-text",3),e.qZA()(),e.TgZ(7,"div",4)(8,"t5s-icon-button",5,6),e.NdJ("btnClick",function(o){e.CHM(t);const s=e.MAs(9);return e.KtG(s.toggleMenu(o))}),e.ALo(10,"async"),e.qZA(),e.TgZ(11,"t5s-menu-template",7,8)(13,"t5s-color-picker-grid",9),e.NdJ("colorClick",function(o){const l=e.CHM(t).ngIf,d=e.oxw();return e.KtG(d.calendarSubscriptionChange.emit({calendarSubscription:{id:null==l.calendarSubscription?null:l.calendarSubscription.id,color:o.color}}))}),e.qZA()()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(12),o=e.oxw();e.xp6(1),e.Tol(o.getContainerClass(t)),e.xp6(1),e.Tol(o.getBtnClass(t)),e.xp6(1),e.Tol(o.getBtnContentClass(t)),e.xp6(1),e.Tol(o.getCheckBoxIconClass(t)),e.xp6(1),e.Q6J("state",o.checkboxIconState$),e.xp6(1),e.Q6J("state",o.labelState$),e.xp6(1),e.Q6J("ngClass",e.VKq(18,Rb,o.settingsBtnClass)),e.xp6(1),e.Q6J("state",o.settingsBtnState$)("t5sTooltip",o.I18n.translate(e.lcZ(10,16,o.state$),o.I18n.key.calendarSubscriptionManageView.selectColorBtnTooltip))("t5sImperativeMenuTriggerFor",i),e.xp6(3),e.Q6J("closeOnClick",!0),e.xp6(2),e.Q6J("colors",o.pickerColors)}}const Jr="--t5s-checkbox-hover-bg-color";class wi extends v.Y4{constructor(){super(...arguments),this.I18n=Ee,this.pickerColors=Object.values(A.zvB),this.calendarSubscriptionChange=new e.vpe,this.calendarSubscriptionActivate=new e.vpe,this.calendarSubscriptionDeactivate=new e.vpe,this.checkboxIconState$=this.state$.pipe((0,p.U)(n=>({size:17,icon:n.calendarSubscription?.active?pe.PJ.checkboxActive.name:pe.PJ.checkboxInactive.name,noPointerEvents:!0,fgColor:(0,Cn.vG)(n.calendarSubscription?.color)}))),this.settingsBtnState$=this.state$.pipe((0,p.U)(n=>({btnSize:26,iconSize:17,icon:pe.PJ.moreHorizRounded.name}))),this.labelState$=this.state$.pipe((0,p.U)(n=>n.calendarSubscription?.type?{fontSet:c.LZ["13px"],text:this.I18n.translate(n,this.I18n.key.calendarSubscription[n.calendarSubscription?.type])}:{})),this.settingsBtnClass=(0,x.I)({marginLeft:"auto",paddingRight:(0,c.px)(13),visibility:"hidden"})}set calendarSubscription(n){this.set({calendarSubscription:n})}getContainerClass(n){return(0,x.I)({...c.xI,...c.QP,...c.yD,...(0,c.e)(29),position:"relative",...(0,c.Mr)({backgroundColor:this.bgHoverColor(n),".settingsBtn":{visibility:"visible"}}),...(0,c.bB)({backgroundColor:this.bgHoverColor(n)})})}getBtnClass(n){return(0,x.I)({...c.hw,position:"absolute",left:(0,c.px)(0),top:(0,c.px)(0),...(0,c.Mr)({[Jr]:(0,c.uK)((0,Cn.Mj)(n.calendarSubscription?.color),25)}),...(0,c.bB)({backgroundColor:this.bgActiveColor(n),[Jr]:(0,c.uK)((0,Cn.Mj)(n.calendarSubscription?.color),50)}),...(0,c.T_)({backgroundColor:"transparent","> :first-child":{"> :first-child":{boxShadow:(0,c.Wn)(2,(0,c.uK)(n.theme.color.primary,25)),transitionProperty:"box-shadow",transitionDuration:(0,c.ms)(150)}}})})}getBtnContentClass(n){return(0,x.I)({...c.xI,...c.QP,...c.hw,paddingLeft:(0,c.px)(9)})}getCheckBoxIconClass(n){return(0,x.I)({...c._7,...c.eP,...(0,c.In)(26
1),backgroundColor:(0,c.VD)(Jr),marginRight:(0,c.px)(4.5)})}emitActiveToggle(n){!n.calendarSubscription||(n.calendarSubscription.active?this.calendarSubscriptionDeactivate.emit({calendarSubscriptionId:n.calendarSubscription.id}):this.calendarSubscriptionActivate.emit({calendarSubscriptionId:n.calendarSubscription.id}))}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(wi)))(i||wi)}}();static#t=this.\u0275cmp=e.Xpm({type:wi,selectors:[["t5s-active-user-calendar-subscription"]],inputs:{calendarSubscription:"calendarSubscription"},outputs:{calendarSubscriptionChange:"calendarSubscriptionChange",calendarSubscriptionActivate:"calendarSubscriptionActivate",calendarSubscriptionDeactivate:"calendarSubscriptionDeactivate"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"click"],["tabindex","-1"],[3,"state"],[3,"ngClass"],[3,"state","t5sTooltip","t5sImperativeMenuTriggerFor","btnClick"],["settingsTrigger","t5sImperativeMenuTrigger"],[3,"closeOnClick"],["settingsMenu","t5sMenu"],[3,"colors","colorClick"]],template:function(t,i){1&t&&(e.YNc(0,Pb,14,20,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.mk,u.O5,zo.r,Mn.o,Zo.i,_i.E,ui.M,ki,Le.h,u.Ov],encapsulation:2,changeDetection:0})}function $b(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-active-user-calendar-subscription",8),e.NdJ("calendarSubscriptionActivate",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.calendarSubscriptionActivate.emit(o))})("calendarSubscriptionDeactivate",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.calendarSubscriptionDeactivate.emit(o))})("calendarSubscriptionChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.calendarSubscriptionChange.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Q6J("calendarSubscription",t),e.uIk("data-cy-selected-color",t.color)}}class Si extends Re.Hr{constructor(){super(...arguments),this.I18n=Ee,this.calendarSubscriptionChange=new e.vpe,this.calendarSubscriptionActivate=new e.vpe,this.calendarSubscriptionDeactivate=new e.vpe,this.closeClick=new e.vpe,this.backClick=new e.vpe,this.calendarSubscriptions$=this.state$.pipe((0,p.U)(({calendarSubscriptions:n})=>n??[])),this.title$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarSubscriptionManageView.title))),this.myCalendarsSectionLabel$=this.state$.pipe((0,p.U)(n=>this.I18n.translate(n,this.I18n.key.calendarSubscriptionManageView.myCalendarsSectionHeader))),this.bodyClass=(0,x.I)({paddingTop:(0,c.px)(9),paddingBottom:(0,c.px)(9)}),this.sectionHeaderClass=(0,x.I)({padding:(0,c.o3)(6,13,5,13)})}set calendarSubscriptions(n){this.set({calendarSubscriptions:n})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Si)))(i||Si)}}();static#t=this.\u0275cmp=e.Xpm({type:Si,selectors:[["t5s-user-sidebar-calendar-subscription-manage-view"]],inputs:{calendarSubscriptions:"calendarSubscriptions"},outputs:{calendarSubscriptionChange:"calendarSubscriptionChange",calendarSubscriptionActivate:"calendarSubscriptionActivate",calendarSubscriptionDeactivate:"calendarSubscriptionDeactivate",closeClick:"closeClick",backClick:"backClick"},features:[e.qOj],decls:22,vars:30,consts:[["user-sidebar-header",""],["header-start",""],[3,"centered","gap"],["data-cy","t5s-wc-usi-calendar-subscription-manage-back-btn",3,"icon","t5sTooltip","btnClick"],["header-end",""],["data-cy","t5s-user-sidebar-calendar-close-btn",3,"t5sTooltip","icon","btnClick"],["user-sidebar-body",""],[4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","t5s-wc-usi-calendar-subscription-manage-view-single-subscription",3,"calendarSubscription","calendarSubscriptionActivate","calendarSubscriptionDeactivate","calendarSubscriptionChange"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"t5s-flex-row",2)(4,"t5s-primary-icon-button-20px",3),e.NdJ("btnClick",function(){return i.backClick.emit()}),e.ALo(5,"async"),e.qZA(),e.TgZ(6,"t5s-single-line-bold-text-16px"),e._uU(7),e.ALo(8,"async"),e.qZA()(),e.BQk(),e.ynx(9,4),e.TgZ(10,"t5s-flex-row",2)(11,"t5s-primary-icon-button-20px",5),e.NdJ("btnClick",function(){return i.closeClick.emit()}),e.ALo(12,"async"),e.qZA()(),e.BQk(),e.qZA(),e.ynx(13,6),e.TgZ(14,"div")(15,"div")(16,"t5s-single-line-bold-text-13px"),e._uU(17),e.ALo(18,"async"),e.qZA()(),e.YNc(19,$b,2,2,"ng-container",7),e.ALo(20,"async"),e._UZ(21,"t5s-divider-9px"),e.qZA(),e.BQk(),e.qZA()),2&t&&(e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("centered",!0)("gap",13),e.xp6(1),e.Q6J("icon",i.Icons.arrowBackRounded.name)("t5sTooltip",i.I18n.translate(e.lcZ(5,20,i.state$),i.I18n.key.c
1alendarSubscriptionManageView.backBtnTooltip)),e.xp6(3),e.Oqu(e.lcZ(8,22,i.title$)),e.xp6(3),e.Q6J("centered",!0)("gap",13),e.xp6(1),e.Q6J("t5sTooltip",i.I18n.translate(e.lcZ(12,24,i.state$),i.I18n.key.calendarSubscriptionManageView.closeBtnTooltip))("icon",i.Icons.closeLarge.name),e.xp6(3),e.Tol(i.bodyClass),e.xp6(1),e.Tol(i.sectionHeaderClass),e.xp6(2),e.Oqu(e.lcZ(18,26,i.myCalendarsSectionLabel$)),e.xp6(2),e.Q6J("ngForOf",e.lcZ(20,28,i.calendarSubscriptions$))("ngForTrackBy",i.trackById))},dependencies:[u.sg,Gt.Q,Pr.n,Rr.Z,Mb.x,nn.D,wi,Xe,et,Le.h,u.Ov],encapsulation:2,changeDetection:0})}let Hr=class ml{constructor(n,t){this.store$=n,this.calendarSubscriptions$=n.select(Wx)}backClick(){this.store$.dispatch(xn_calendar())}closeClick(){this.store$.dispatch((0,De.lh)())}calendarSubscriptionChange({calendarSubscription:n}){this.store$.dispatch(Qe.updateActiveUserCalendarSubscription({input:n}))}calendarSubscriptionActivate({calendarSubscriptionId:n}){this.store$.dispatch(Qe.activateActiveUserCalendarSubscription({input:{id:n}}))}calendarSubscriptionDeactivate({calendarSubscriptionId:n}){this.store$.dispatch(Qe.deactivateActiveUserCalendarSubscription({input:{id:n}}))}static#e=this.\u0275fac=function(t){return new(t||ml)(e.Y36(g.yh),e.Y36(_.eX))};static#t=this.\u0275cmp=e.Xpm({type:ml,selectors:[["t5s-usi-calendar-subscription-manage"]],decls:2,vars:3,consts:[[3,"calendarSubscriptions","calendarSubscriptionChange","calendarSubscriptionActivate","calendarSubscriptionDeactivate","closeClick","backClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-calendar-subscription-manage-view",0),e.NdJ("calendarSubscriptionChange",function(s){return i.calendarSubscriptionChange(s)})("calendarSubscriptionActivate",function(s){return i.calendarSubscriptionActivate(s)})("calendarSubscriptionDeactivate",function(s){return i.calendarSubscriptionDeactivate(s)})("closeClick",function(){return i.closeClick()})("backClick",function(){return i.backClick()}),e.ALo(1,"async"),e.qZA()),2&t&&e.Q6J("calendarSubscriptions",e.lcZ(1,1,i.calendarSubscriptions$))},dependencies:[Si,u.Ov],encapsulation:2,changeDetection:0})};Hr=(0,Ot.gn)([(0,oi.c)(),(0,Ot.w6)("design:paramtypes",[g.yh,_.eX])],Hr);var yt=r(11065);const Me=new jt.U({[A.SQ0.DE]:{confirmDeleteChatMessage:{confirmButtonLabel:"L\xf6schen",message:"M\xf6chtest du diese Nachricht wirklich l\xf6schen? Dies kann nicht r\xfcckg\xe4ngig gemacht werden.",title:"Nachricht l\xf6schen?"},conversation:{addReactionBtnTooltip:"Reaktion hinzuf\xfcgen",backBtnTooltip:"Zur\xfcck",callBtnTooltip:"Anruf starten",closeBtnTooltip:"Schlie\xdfen",conversationCreated:"Direktnachricht wurde erstellt.",groupNameChanged:"{{userName}} hat den Gruppennamen auf {{groupName}} ge\xe4ndert.",groupThumbnailChanged:"{{userName}} hat das Gruppenfoto ge\xe4ndert.",infoBtnTooltip:"Info",input:{placeholder:"Neue Nachricht beginnen"},messageOnlyAttachments:"{{userName}} hat einen Anhang gesendet.",messageOnlyLinkPreview:"{{userName}} hat einen Link gesendet.",moreMenuTooltip:"Weitere Aktionen",searchUser:"F\xfcge Personen zur Gruppe hinzu",userJoined:"{{userName}} hat {{targetUser}} hinzugef\xfcgt.",userLeft:"{{userName}} hat die Gruppe verlassen.",videoCallStarted:"{{userName}} hat einen Videoanruf gestartet."},conversationInfo:{addMember:"Person hinzuf\xfcgen",addMemberAria:"Person zu Gruppe hinzuf\xfcgen",confirmLeaveGroup:{confirmButton:"Verlassen",message:"Diese Gruppe wird aus deinem Posteingang gel\xf6scht. Andere Personen in der Gruppe k\xf6nnen sie nach wie vor sehen.",title:"Gruppe verlassen?"},leaveGroup:"Gruppe verlassen",memberHeader:"Personen",muteDialogConversation:"Direktnachricht stummschalten",muteGroupConversation:"Gruppe stummschalten",settingsHeader:"Einstellungen",unmuteDialogConversation:"Direktnachricht lautschalten",unmuteGroupConversation:"Gruppe lautschalten"},conversationPreviewButton:"\xd6ffne Nachricht",deletemessageMenuItem:"Nachricht l\xf6schen",dropzoneLabel:"Hochladen in Nachricht",groupImageUploadBtnTooltip:"Foto hinzuf\xfcgen",startANewMessage:"Neue Nachricht beginnen",videoActivity:{joinBtnLabel:"Beitreten",started:"Gestartet",title:"Anruf mit {{ primaryName }}"},videoCall:{confirmConnect:{confirmButtonLabel:"Verbinden",message:"Um Microsoft Teams Anrufe direkt aus Tape zu starten, musst du zuerst dein Microsoft-Konto verbinden.",title:"Microsoft-Konto verbinden?"},connectionFailedToast:"Verbindung mit Microsoft-Konto fehlgeschlagen, bitte erneut versuchen.",connectionSuccessToast:"Microsoft-Konto erfolgreich verbunden"},footer:{cancel:"Abbruch des aktuellen Prozesses",finish:"Prozess abschlie\xdfen",next:"Fortfahren mit aktuellem Prozess"},groupAddUsers:{addBtn:"Hinzuf\xfcgen",cancelBtn:"Abbrechen"},header:{backBtn:"Gehe zur\xfcck",closeRightSidebarAria:"Schlie\xdfe rechte Seitenleiste",newMessageAria:"Neue Nachricht beginnen",titles:{addMember:"Person hinzuf\xfcgen",conversationInfoAria:"Zeige Nachrichten Info an",directMessageInfo:"Direktnachricht Info",groupInfo:"Gruppen Info",main:"Nachrichten",newGroup:"Neue Gruppe",newMessage:"Neue Nachricht"}},inputAttachBtnTooltip:"Datei anh\xe4ngen",inputEmojiBtnTooltip:"Emojis",inputRemoveAttachmentBtnTooltip:"Datei entfernen",invali
1dFileSizeFileAddedToast:"Eine oder mehrere Dateien \xfcberschreiten das Limit von 100 MB.",invalidImageFileAddedToast:"Eine oder mehrere Dateien sind keine Bilder, und k\xf6nnen diesem Feld nicht hinzugef\xfcgt werden.",newDialog:{backBtnTooltip:"Zur\xfcck",closeBtnTooltip:"Schlie\xdfen",placeholderText:"Direktnachrichten sind private Unterhaltungen zwischen dir und anderen Personen auf Tape.",placeholderTitle:"Starte eine Direktnachricht mit {{name}}"},newGroup:{addUser:"F\xfcge Personen zur Gruppe hinzu",backBtnTooltip:"Zur\xfcck",closeBtnTooltip:"Schlie\xdfen",create:"Erstellen",groupNameDescription:"Gruppen Name",groupNamePlaceholder:"Gruppen Name eingeben",next:"Weiter",removeSelectedUser:"Entferne Personen von Gruppe",searchUserGroupInput:"F\xfcge Personen der neuen Gruppe hinzu"},newMessage:{backBtnTooltip:"Zur\xfcck",closeBtnTooltip:"Schlie\xdfen",createNewGroupBtn:"Neue Gruppe",newGroup:"Neue Gruppe",noOrgUsersPlaceholder:{buttonLabel:"Personen einladen",subtitle:"Wenn du ein paar einl\xe4dst, kannst du hier eine Unterhaltung starten.",title:"Du hast bisher noch keine Team-Mitglieder"},searchUserGroupInput:"Nach Personen und Gruppen suchen\u2026",searchUserGroupInputClearBtn:"Eingabe leeren",selectConversationDialog:"Direktnachricht mit Person starten",selectConversationGroup:"Nachricht mit Gruppe starten"},sendBtnTooltip:'Senden <span class="tippy-keyboard-shortcut">Enter</span> <br> Neue Zeile <span class="tippy-keyboard-shortcut">Shift + Enter</span>',tooManyFilesAttachedToast:"Du kannst nur 4 Dateien auf einmal hochladen.",userStatus:{offline:"abwesend",offline_snoozed:"Benachrichtigungen pausiert",online:"aktiv",online_snoozed:"Benachrichtigungen pausiert"},core:{cancel:"Abbrechen"}},[A.SQ0.EN]:{confirmDeleteChatMessage:{confirmButtonLabel:"Delete",message:"Are you sure you want to delete this message? This cannot be undone.",title:"Delete Message?"},conversation:{addReactionBtnTooltip:"Add reaction",backBtnTooltip:"Back",callBtnTooltip:"Start a call",closeBtnTooltip:"Close",conversationCreated:"Group was created.",groupNameChanged:"{{userName}} changed the group name to {{groupName}}.",groupThumbnailChanged:"{{userName}} changed the group photo.",infoBtnTooltip:"Info",input:{placeholder:"Start a new message"},messageOnlyAttachments:"{{userName}} added an attachment.",messageOnlyLinkPreview:"{{userName}} sent a link.",moreMenuTooltip:"More actions",searchUser:"Add people to new group",userJoined:"{{userName}} added {{targetUser}}.",userLeft:"{{userName}} left the group.",videoCallStarted:"{{userName}} started a video call."},conversationInfo:{addMember:"Add person",addMemberAria:"Add person to group",confirmLeaveGroup:{confirmButton:"Leave",message:"This group will be deleted from your inbox. Other people in the group will still be able to see it.",title:"Leave group?"},leaveGroup:"Leave group",memberHeader:"Member",muteDialogConversation:"Mute direct message",muteGroupConversation:"Mute group",settingsHeader:"Settings",unmuteDialogConversation:"Unmute direct message",unmuteGroupConversation:"Unmute group"},conversationPreviewButton:"Open group element",deletemessageMenuItem:"Delete message",dropzoneLabel:"Upload to Message",groupImageUploadBtnTooltip:"Add photo",startANewMessage:"Start a new message",videoActivity:{joinBtnLabel:"Join",started:"Started",title:"Call with {{ primaryName }}"},videoCall:{confirmConnect:{confirmButtonLabel:"Connect",message:"To start Microsoft Teams Calls directly from Tape, you need to first connect your Microsoft Account.",title:"Connect Microsoft account?"},connectionFailedToast:"Failed to connect with Microsoft account, please try again.",connectionSuccessToast:"Microsoft Account successfully connected"},footer:{cancel:"Cancel current operation",finish:"Finish process",next:"Continue with the next step"},groupAddUsers:{addBtn:"Add",cancelBtn:"Cancel"},header:{backBtn:"Go back to previous page",closeRightSidebarAria:"Close right sidebar",newMessageAria:"Create new message",titles:{addMember:"Add person",conversationInfoAria:"Enter group info",directMessageInfo:"Direct message info",groupInfo:"Group info",main:"Messages",newGroup:"New group",newMessage:"New message"}},inputAttachBtnTooltip:"Attach file",inputEmojiBtnTooltip:"Emoji",inputRemoveAttachmentBtnTooltip:"Remove file",invalidFileSizeFileAddedToast:"One or more files exceed the 100 MB limit.",invalidImageFileAddedToast:"One or more files are no images and cannot be added to this field.",newDialog:{backBtnTooltip:"Back",closeBtnTooltip:"
1Close",placeholderText:"Direct messages are private conversations between you and other people on Tape.",placeholderTitle:"Start a direct message with {{name}}"},newGroup:{addUser:"Add this person to group",backBtnTooltip:"Back",closeBtnTooltip:"Close",create:"Create",groupNameDescription:"Group name",groupNamePlaceholder:"Add group name",next:"Next",removeSelectedUser:"Remove this person from group",searchUserGroupInput:"Add people to new group"},newMessage:{backBtnTooltip:"Back",closeBtnTooltip:"Close",createNewGroupBtn:"New group",newGroup:"New Group",noOrgUsersPlaceholder:{buttonLabel:"Invite people",subtitle:"When you invite some, you can start a conversation here.",title:"You don't have any team members yet"},searchUserGroupInput:"Search for people and groups\u2026",searchUserGroupInputClearBtn:"Clear search input",selectConversationDialog:"Start direct message with person",selectConversationGroup:"Start group message"},sendBtnTooltip:'Send <span class="tippy-keyboard-shortcut">Enter</span> <br> New line <span class="tippy-keyboard-shortcut">Shift + Enter</span>',tooManyFilesAttachedToast:"You can only upload 4 files at a time.",userStatus:{offline:"away",offline_snoozed:"notifications paused",online:"active",online_snoozed:"notifications paused"},core:{cancel:"Cancel"}},[A.SQ0.PT_BR]:{confirmDeleteChatMessage:{confirmButtonLabel:"Excluir",message:"Tem certeza de que deseja excluir esta mensagem? Isso n\xe3o pode ser desfeito.",title:"Excluir mensagem?"},conversation:{addReactionBtnTooltip:"Adicionar rea\xe7\xe3o",backBtnTooltip:"Voltar",callBtnTooltip:"Iniciar uma chamada",closeBtnTooltip:"Fechar",conversationCreated:"Grupo foi criado.",groupNameChanged:"{{userName}} alterou o nome do grupo para {{groupName}}.",groupThumbnailChanged:"{{userName}} alterou a foto do grupo.",infoBtnTooltip:"Informa\xe7\xf5es",input:{placeholder:"Iniciar uma nova mensagem"},messageOnlyAttachments:"{{userName}} adicionou um anexo.",messageOnlyLinkPreview:"{{userName}} enviou um link.",moreMenuTooltip:"Mais a\xe7\xf5es",searchUser:"Adicionar pessoas ao novo grupo",userJoined:"{{userName}} adicionou {{targetUser}}.",userLeft:"{{userName}} saiu do grupo.",videoCallStarted:"{{userName}} iniciou uma videochamada."},conversationInfo:{addMember:"Adicionar pessoa",addMemberAria:"Adicionar pessoa ao grupo",confirmLeaveGroup:{confirmButton:"Sair",message:"Este grupo ser\xe1 removido da sua caixa de entrada. As outras pessoas no grupo ainda poder\xe3o v\xea-lo.",title:"Sair do grupo?"},leaveGroup:"Sair do grupo",memberHeader:"Membros",muteDialogConversation:"Silenciar mensagem direta",muteGroupConversation:"Silenciar grupo",settingsHeader:"Configura\xe7\xf5es",unmuteDialogConversation:"Ativar som da mensagem direta",unmuteGroupConversation:"Ativar som do grupo"},conversationPreviewButton:"Abrir elemento do grupo",deletemessageMenuItem:"Excluir mensagem",dropzoneLabel:"Enviar para mensagem",groupImageUploadBtnTooltip:"Adicionar foto",startANewMessage:"Iniciar uma nova mensagem",videoActivity:{joinBtnLabel:"Entrar",started:"Iniciado",title:"Chamada com {{ primaryName }}"},videoCall:{confirmConnect:{confirmButtonLabel:"Conectar",message:"Para iniciar chamadas do Microsoft Teams diretamente do Tape, voc\xea precisa primeiro conectar sua conta Microsoft.",title:"Conectar conta Microsoft?"},connectionFailedToast:"Falha ao conectar com a conta Microsoft, tente novamente.",connectionSuccessToast:"Conta Microsoft conectada com sucesso"},footer:{cancel:"Cancelar opera\xe7\xe3o atual",finish:"Concluir processo",next:"Continuar com a pr\xf3xima etapa"},groupAddUsers:{addBtn:"Adicionar",cancelBtn:"Cancelar"},header:{backBtn:"Voltar \xe0 p\xe1gina anterior",closeRightSidebarAria:"Fechar barra lateral direita",newMessageAria:"Criar nova mensagem",titles:{addMember:"Adicionar pessoa",conversationInfoAria:"Ver informa\xe7\xf5es do grupo",directMessageInfo:"Informa\xe7\xf5es da mensagem direta",groupInfo:"Informa\xe7\xf5es do grupo",main:"Mensagens",newGroup:"Novo grupo",newMessage:"Nova mensagem"}},inputAttachBtnTooltip:"Anexar arquivo",inputEmojiBtnTooltip:"Emoji",inputRemoveAttachmentBtnTooltip:"Remover arquivo",invali
1dFileSizeFileAddedToast:"Um ou mais arquivos excedem o limite de 100 MB.",invalidImageFileAddedToast:"Um ou mais arquivos n\xe3o s\xe3o imagens e n\xe3o podem ser adicionados a este campo.",newDialog:{backBtnTooltip:"Voltar",closeBtnTooltip:"Fechar",placeholderText:"Mensagens diretas s\xe3o conversas privadas entre voc\xea e outras pessoas no Tape.",placeholderTitle:"Iniciar uma mensagem direta com {{name}}"},newGroup:{addUser:"Adicionar esta pessoa ao grupo",backBtnTooltip:"Voltar",closeBtnTooltip:"Fechar",create:"Criar",groupNameDescription:"Nome do grupo",groupNamePlaceholder:"Adicionar nome do grupo",next:"Pr\xf3ximo",removeSelectedUser:"Remover esta pessoa do grupo",searchUserGroupInput:"Adicionar pessoas ao novo grupo"},newMessage:{backBtnTooltip:"Voltar",closeBtnTooltip:"Fechar",createNewGroupBtn:"Novo grupo",newGroup:"Novo grupo",noOrgUsersPlaceholder:{buttonLabel:"Convidar pessoas",subtitle:"Quando voc\xea convidar algumas, poder\xe1 iniciar uma conversa aqui.",title:"Voc\xea ainda n\xe3o tem membros na equipe"},searchUserGroupInput:"Pesquisar pessoas e grupos\u2026",searchUserGroupInputClearBtn:"Limpar busca",selectConversationDialog:"Iniciar mensagem direta com pessoa",selectConversationGroup:"Iniciar mensagem de grupo"},sendBtnTooltip:'Enviar <span class="tippy-keyboard-shortcut">Enter</span> <br> Nova linha <span class="tippy-keyboard-shortcut">Shift + Enter</span>',tooManyFilesAttachedToast:"Voc\xea s\xf3 pode enviar 4 arquivos por vez.",userStatus:{offline:"ausente",offline_snoozed:"notifica\xe7\xf5es pausadas",online:"ativo",online_snoozed:"notifica\xe7\xf5es pausadas"},core:{cancel:"Cancelar"}}});function Oc(a,n){if(n)switch(n.presence){case A.ghu.ONLINE:return Me.translate(a,!0===n.doNotDisturb?Me.key.userStatus.online_snoozed:Me.key.userStatus.online);case A.ghu.OFFLINE:return Me.translate(a,!0===n.doNotDisturb?Me.key.userStatus.offline_snoozed:Me.key.userStatus.offline)}}var U=r(11212),Dt=(()=>{return(a=Dt||(Dt={})).CHAT_CONVERSATION_ID="conversationId",a.CHAT_NEW_DIALOG_USER_ID="newDialogUserId",a.CALENDAR_REMINDER_ID="reminderId",Dt;var a})();const Ze={accessConversation:(0,g.PH)("WebClientSidebarChatActions.accessConversation",(0,g.Ky)()),accessConversationInfo:(0,g.PH)("WebClientSidebarChatActions.accessConversationInfo",(0,g.Ky)()),postMessageForCurrentConversation:(0,g.PH)("WebClientSidebarChatActions.postMessageForCurrentConversation",(0,g.Ky)()),confirmDeleteChatMessage:(0,g.PH)("WebClientSidebarChatActions.confirmDeleteChatMessage",(0,g.Ky)()),addMembersForCurrentGroup:(0,g.PH)("WebClientSidebarChatActions.addMembersForCurrentGroup"),confirmLeaveCurrentConversation:(0,g.PH)("WebClientSidebarChatActions.confirmLeaveCurrentConversation"),leaveCurrentConversation:(0,g.PH)("WebClientSidebarChatActions.leaveCurrentConversation"),loadMoreActivitiesForCurrentConversation:(0,g.PH)("WebClientSidebarChatActions.loadMoreActivitiesForCurrentConversation"),openBlabDef:(0,g.PH)("WebClientSidebarChatActions.openBlabDef",(0,g.Ky)()),openBlabItem:(0,g.PH)("WebClientSidebarChatActions.openBlabItem",(0,g.Ky)())},us=()=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"conversations"}}),Vr=({conversationId:a})=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"conversation",params:{[Dt.CHAT_CONVERSATION_ID]:a}}}),Ec=()=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"new-message"}}),Dc=({id:a})=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"new-message/dialog",params:{[Dt.CHAT_NEW_DIALOG_USER_ID]:a}}}),Bc=()=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"new-message/new-chat-group"}});var hs=r(30457),Wr=r(69934);function Jb(a,n){let t=-1;return t=n.id?n.id:n.activities[0]?.id,t}function Yb(a,n){return function Kb(a,n){const t=!!a.user&&a.user?.id!==n.user?.id,i=n.lastActivityDate?.getTime()-a.lastActivityDate?.getTime()>=3e5;return!t&&!i}(a,n)?(a.activities.push(n.activities[0]),a.lastActivityDate=n.lastActivityDate,[]):[n]}const vn=(0,g.P1)(Wr.Mg,a=>{if(a)return(0,hs.Lk)(a[Dt.CHAT_CONVERSATION_ID])??null}),Mc=(0,g.P1)(Wr.Mg,a=>{if(a)return(0,hs.Lk)(a[Dt.CHAT_NEW_DIALOG_USER_ID])??null}),Qo=(0,g.P1)(U.KO,vn,(a,n)=>n?a[n]:void 0),jb=(0,g.P1)(vn,U.az,(a,n)=>n.filter(({conversationId:t})=>t===a)),qb=(0,g.P1)(jb,function Wb(a){return a.map(t=>function Vb(a){return[A.Z$b.MESSAGE,A.Z$b.VIDEO_CALL].includes(a.type)}(t)?[{activities:[t],user:t.user,lastActivityDate:t.createdAt}]:[t]).reduce((t,[i])=>{const o=t[t.length-1];if(i.type){const s=i;return[...t,s]}if(o?.type)return[...t,i];{const s=i;return o&&o.lastActivityDate?[...t,...Yb(o,s)]:[...t,s]}},[])}),Xb=(0,g.P1)(U.B9,vt.Ux,(a,n)=>a.filter(t=>t.id!==n));var gs=r(83336),Yr=r(14979),Kr=r(39488),Nn=r(26013),Zc=r(24122);class Jt{constructor(n){this.store$=n,this.closeUserSidebar=()=>n.dispatch((0,De.lh)())}static#e=this.\u0275fac=function(t){return new(t||Jt)(e.Y36(g.yh))};static#t=this.\u0275dir=e.lG2({type:Jt,selectors:[["","t5sUserSidebarClose",""]],hostBindings:function(t,i){1&t&&e.NdJ("click",function(){return i.closeUserSidebar()})}})}class Ht{constructor(){this.Icons=pe.PJ,this.hostClass=(0,x.I)({...c._7,overflow:"visible",marginRight:(0,c.px)(13)})}static#e=this.\u0275fac=function(t){return new(t||Ht)};static#t=this.\u0275cmp=e.Xpm({type:Ht,selectors:[["t5s-user-sidebar-back-button"]],hostVars:2,hostBindings:function(t,i){2&t&&e.Tol(i.hostClass)},decls:1,vars:1,consts:[["data-cy","t5s-user-sidebar-back-btn",3,"icon"]],template:function(t,i){1&t&&e._UZ(0,"t5s-primary-icon-button-20px",0),2&t&&e.Q6J("icon",i.Icons.arrowBackRounded.name)},dependencies:[Gt.Q],encapsulation:2,changeDetection:0})}class Vt{constructor(){this.hostClass=(0,x.I)({...c._7,overflow:"visible",marginLeft:(0,c.px)(13)}),this.Icons=pe.PJ}static#e=this.\u0275fac=function(t){return new(t||Vt)};static#t=this.\u0275cmp=e.Xpm({type:Vt,selectors:[["t5s-user-sidebar-close-button"]],hostVars:2,hostBindings:function(t,i){2&t&&e.Tol(i.hostClass)},decls:1,vars:1,consts:[["data-cy","t5s-user-sidebar-close-btn",3,"icon"]],template:function(t,i){1&t&&e._UZ(0,"t5s-primary-icon-button-20px",0),2&t&&e.Q6J("icon",i.Icons.closeLarge.name)},dependencies:[Gt.Q],encapsulation:2,changeDetection:0})}var Lc=r(8711),Nc=r(19419);function eC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-selectable-chat-user",11),e.NdJ("chatUserClick",function(){const s=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.selectUser(s))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Q6J("user",t)("disabled",t.alreadyMember)("selected",t.alreadySelected||t.alreadyMember)}}class ms extends hn.R{constructor(n){super(),this.store$=n,this.currentConversation$=this.store$.select(Qo),this.trackById=yt.xn,this.i18n=(0,Zt.mu)(),this.I18n=Me,this.bodyContainer=(0,x.I)({...c.p4,...c.i3,justifyContent:"space-between"}),this.searchContainerClass=(0,x.I)({...c.yD}),this.scrollContainerClass=(0,x.I)({overflowY:"auto",flex:1}),this.footerButtonClass=(0,x.I)({...c.yD,height:(0,c.px)(46),...c.xI,padding:(0,c.o3)(10,13),justifyContent:"flex-end"}),this.finalButtonClass=(0,x.I)({marginLeft:(0,c.px)(9)}),this.availableUsers$=(0,V.aj)([n.select(U.S5).pipe((0,vt.Em)(n)),n.select(Qo)]).pipe((0,p.U)(([t,i])=>t.map(o=>({...o,alreadyMember:!!i?.members?.find(({id:s})=>s===o.id)}
1)))),this.selectedUsers$=n.select(U.Oq),this.store$.dispatch(U.nh.searchUsers({query:""})),this.store$.dispatch(U.nh.clearUserSelection()),this.connect(this.currentConversation$.pipe((0,p.U)(t=>({conversation:t}))))}searchUsers(n){this.store$.dispatch(U.nh.searchUsers({query:n}))}selectUser(n){this.store$.dispatch(U.nh.selectUserToAdd({user:n})),this.store$.dispatch(U.nh.searchUsers({query:""}))}addUsers(){this.store$.dispatch(Ze.addMembersForCurrentGroup())}handleBackClick(){const{conversation:n}=this.get();!n||this.store$.dispatch(Vr({conversationId:n.conversationId}))}static#e=this.\u0275fac=function(t){return new(t||ms)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:ms,selectors:[["t5s-chat-group-add-users"]],features:[e.qOj],decls:21,vars:27,consts:[["user-sidebar-header",""],["header-start",""],[3,"click"],["header-end",""],["t5sUserSidebarClose",""],["user-sidebar-body",""],["data-cy","t5s-chat-group-add-users-search-input","t5sAutofocus","",3,"valueChange"],[3,"users","userClick"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"label","click"],["data-cy","t5s-sidebar-chat-group-add-users-final-btn",3,"label","isDisabled","btnClick"],["data-cy","t5s-sidebar-chat-group-add-user-select-btn",3,"user","disabled","selected","chatUserClick"]],template:function(t,i){if(1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"t5s-user-sidebar-back-button",2),e.NdJ("click",function(){return i.handleBackClick()}),e.qZA(),e.TgZ(4,"t5s-bold-text-16px"),e._uU(5),e.qZA(),e.BQk(),e.ynx(6,3),e._UZ(7,"t5s-user-sidebar-close-button",4),e.BQk(),e.qZA(),e.TgZ(8,"div",5)(9,"div")(10,"t5s-selection-search",6),e.NdJ("valueChange",function(s){return i.searchUsers(s)}),e.qZA(),e.TgZ(11,"t5s-user-selection-grid",7),e.NdJ("userClick",function(s){return i.selectUser(s.user)}),e.ALo(12,"async"),e.qZA()(),e.TgZ(13,"div"),e.YNc(14,eC,2,3,"ng-container",8),e.ALo(15,"async"),e.qZA(),e._UZ(16,"t5s-divider-light-1px"),e.TgZ(17,"div")(18,"t5s-filled-text-button-26px",9),e.NdJ("click",function(){return i.handleBackClick()}),e.qZA(),e.TgZ(19,"t5s-filled-primary-text-button-26px",10),e.NdJ("btnClick",function(){return i.addUsers()}),e.ALo(20,"async"),e.qZA()()()()),2&t){let o;e.Udp("width",100,"%")("height",100,"%"),e.xp6(5),e.hij(" ",i.I18n.translate(i.i18n,i.I18n.key.header.titles.addMember)," "),e.xp6(3),e.Tol(i.bodyContainer),e.xp6(1),e.Tol(i.searchContainerClass),e.xp6(2),e.Q6J("users",e.lcZ(12,21,i.selectedUsers$)),e.xp6(2),e.Tol(i.scrollContainerClass),e.xp6(1),e.Q6J("ngForOf",e.lcZ(15,23,i.availableUsers$))("ngForTrackBy",i.trackById),e.xp6(3),e.Tol(i.footerButtonClass),e.xp6(1),e.Q6J("label",i.I18n.translate(i.i18n,i.I18n.key.groupAddUsers.cancelBtn)),e.xp6(1),e.Tol(i.finalButtonClass),e.Q6J("label",i.I18n.translate(i.i18n,i.I18n.key.groupAddUsers.addBtn))("isDisabled",!(null!=(o=e.lcZ(20,25,i.selectedUsers$))&&o.length))}},dependencies:[gs.U,Yr.h,Kr.L,u.sg,Nn.J,di.o,Zc._,Jt,Ht,Vt,Xe,et,Lc.q,Nc.S,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var tC=r(88774),nC=r(20697),iC=r(36598),oC=r(87100),Rc=r(42975),jr=r(34981),Pc=r(4194),aC=r(53188),sC=r(64825),rC=r(67250),lC=r(38768),$c=r(52605),cC=r(28563),fs=r(97150),Nt=r(18948),zc=r(45002),pC=r(20809),Qc=r(9016),dC=r(79798),_C=r(81778),uC=r(53309),Fc=r(87415),xs=r(9702),qr=r(57427),bs=r(65427),Xr=r(13598);function hC(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-thumbnail",5),e.TgZ(3,"div"),e._UZ(4,"t5s-icon",5),e.qZA()(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Udp("position","relative")("width",36,"px")("min-width",36,"px")("max-width",36,"px")("height",36,"px")("min-height",36,"px")("max-height",36,"px"),e.xp6(1),e.Q6J("state",i.thumbnailState$),e.xp6(1),e.Tol(i.getThumbnailHoverIconClass(t)),e.xp6(1),e.Q6J("state",i.hoverIconState$)}}function gC(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-graphic",6),e.qZA(),e.TgZ(3,"div"),e._UZ(4,"t5s-graphic",6),e.qZA(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.baseGraphicClass),e.xp6(1),e.Q6J("size",36)("graphic",i.getGraphic(t)),e.xp6(1),e.Tol(i.hoverGraphicClass),e.xp6(1),e.Q6J("size",36)("graphic",i.getHoverGraphic(t))}}function mC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"a",1)(2,"div",2),e.NdJ("click",function(o){const l=e.CHM(t).ngIf,d=e.oxw();return e.KtG(d.emitAttachmentClick(l,o))}),e.TgZ(3,"div"),e.ynx(4,3),e.YNc(5,hC,5,18,"ng-container",4),e.YNc(6,gC,5,8,"
1ng-container",4),e.BQk(),e.qZA(),e.TgZ(7,"div")(8,"div"),e._uU(9),e.qZA(),e.TgZ(10,"div"),e._uU(11),e.qZA()()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("href",null==t.attachment?null:t.attachment.downloadUrl,e.LSH),e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Udp("margin-right",12,"px")("width",36,"px")("min-width",36,"px")("max-width",36,"px")("height",36,"px")("min-height",36,"px")("max-height",36,"px"),e.xp6(1),e.Q6J("ngSwitch",i.getVisualType(t)),e.xp6(1),e.Q6J("ngSwitchCase","thumbnail"),e.xp6(1),e.Q6J("ngSwitchCase","graphic"),e.xp6(2),e.Tol(i.getNameClass(t)),e.xp6(1),e.hij(" ",null==t.attachment?null:t.attachment.name," "),e.xp6(1),e.Tol(i.getSublineClass(t)),e.xp6(1),e.hij(" ",i.getSubline(t)," ")}}const Cs="--t5s-chat-message-attachment-badge-display-hover-graphic",el="--t5s-chat-message-attachment-badge-display-base-graphic";class Ti extends v.Y4{constructor(){super(...arguments),this.attachmentClick=new e.vpe,this.thumbnailState$=this.state$.pipe((0,p.U)(n=>({size:34,fullImgUrl:n.attachment?.thumbnail?.medium,fallbackGraphic:pe.TC.fileImage.name,borderRadius:(0,c.px)(8)}))),this.baseGraphicClass=(0,x.I)({display:(0,c.VD)(el,"block")}),this.hoverGraphicClass=(0,x.I)({display:(0,c.VD)(Cs,"none")}),this.hoverIconState$=this.state$.pipe((0,p.U)(n=>({size:11,icon:pe.PJ.searchRoundedBlack.name,fgColor:n.theme.color.lightest})))}set attachment(n){this.set({attachment:n})}getContainerClass(n){return(0,x.I)({...(0,c.eo)(217),...c.xI,cursor:"pointer",padding:(0,c.o3)(12,12,12,12),borderRadius:(0,c.px)(12),border:(0,c.Cg)(1,"solid",n.theme.color.darker9),...(0,c.Mr)({backgroundColor:this.bgHoverColor(n),[el]:"none",[Cs]:"block"}),...(0,c.bB)({backgroundColor:this.bgActiveColor(n),[el]:"none",[Cs]:"block"})})}getNameClass(n){return(0,x.I)({...me.bY,...(0,c.pJ)(c.LZ["bold-13px"]),color:n.theme.color.darkest,paddingRight:(0,c.px)(4.5),overflow:"hidden",maxHeight:c.LZ["bold-13px"].lineHeight,wordBreak:"break-all"})}getSublineClass(n){return(0,x.I)({...me.bY,...(0,c.pJ)(c.LZ["13px"]),wordBreak:"break-all",paddingRight:(0,c.px)(4.5),overflow:"hidden",maxHeight:c.LZ["13px"].lineHeight,color:n.theme.color.darker})}getThumbnailHoverIconClass(n){return(0,x.I)({...c.j2,position:"absolute",right:(0,c.px)(0),bottom:(0,c.px)(0),...c.eP,overflow:"hidden",display:(0,c.VD)(Cs,"none"),backgroundColor:(0,c.m4)(0,0,0,.77),padding:(0,c.px)(2)})}getVisualType(n){return n.attachment?.thumbnail?.medium?"thumbnail":"graphic"}getGraphic(n){return(0,qr.RD)(n.attachment)}getHoverGraphic(n){return(0,qr.sB)(n.attachment)}getSubline(n){const t=n.attachment?.size??0,i=(0,Nt.KW)(n.attachment?.extension),o=xs.u.translate(n,xs.u.key[i])||n.attachment?.extension?.toUpperCase();return`${(0,Nt.fT)(t)} ${o}`}emitAttachmentClick(n,t){return!n.attachment||!(0,Nt.yl)((0,Nt.KW)(n.attachment?.extension))||(this.attachmentClick.emit({attachment:n.attachment}),t.preventDefault(),!1)}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Ti)))(i||Ti)}}();static#t=this.\u0275cmp=e.Xpm({type:Ti,selectors:[["t5s-chat-message-attachment-badge"]],inputs:{attachment:"attachment"},outputs:{attachmentClick:"attachmentClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"href"],[3,"click"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"state"],[3,"size","graphic"]],template:function(t,i){1&t&&(e.YNc(0,mC,12,26,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,u.RF,u.n9,bs.p,Mn.o,Xr.Z,u.Ov],encapsulation:2,changeDetection:0})}function fC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",1),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.attachmentClick.emit({attachment:s.attachment}))}),e._UZ(2,"img",2),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Udp("cursor","pointer"),e.xp6(1),e.Tol(i.getImageClass(t)),e.Q6J("src",null==t.attachment||null==t.attachment.thumbnail?null:t.attachment.thumbnail.large,e.LSH)}}class Ai extends v.Oo{constructor(){super(...arguments),this.attachmentClick=new e.vpe}set attachment(n){this.set({attachment:n})}getImageClass(n){return(0,x.I)({...c.hw,...c.ko,...(0,c.eo)(217),...(0,c.e)(196),borderRadius:(0,c.px)(16),objectFit:"cover",objectPosition:"0px 0px"})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Ai)))(i||Ai)}}();static#t=this.\u0275cmp=e.Xpm({type:Ai,selectors:[["t5s-chat-message-image-attachment"]],inputs:{attachment:"attachment"},outputs:{attachmentClick:"attachmentClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"click"],["loading","lazy","alt","",3,"src"]],template:function(t,i){1&t&&(e.YNc(0,fC,3,5,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,u.Ov],encapsulation:2,changeDetection:0})}
1function xC(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"video",1),e._UZ(2,"source",2),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getVideoClass(t)),e.xp6(1),e.Q6J("src",null==t.attachment?null:t.attachment.viewUrl,e.LSH)("type",null==t.attachment?null:t.attachment.mimetype)}}class Ui extends v.Oo{set attachment(n){this.set({attachment:n})}getVideoClass(n){return(0,x.I)({borderRadius:(0,c.px)(16),width:(0,c.aQ)(100),maxWidth:(0,c.px)(217),...(0,c.e)(128),backgroundColor:n.theme.color.darkest})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Ui)))(i||Ui)}}();static#t=this.\u0275cmp=e.Xpm({type:Ui,selectors:[["t5s-chat-message-video-attachment"]],inputs:{attachment:"attachment"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["controls","","muted","","preload","metadata"],[3,"src","type"]],template:function(t,i){1&t&&(e.YNc(0,xC,3,4,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,u.Ov],encapsulation:2,changeDetection:0})}const bC=["settingsTrigger"];function CC(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e.ALo(2,"async"),e._UZ(3,"t5s-text",8),e.qZA(),e.BQk()),2&a){const t=e.oxw();e.xp6(1),e.Tol(e.lcZ(2,3,t.headerTextClass$)),e.xp6(2),e.Q6J("state",t.headerTextState$)}}function vC(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-avatar-34px",9),e.ALo(2,"async"),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("user",e.lcZ(2,1,t.avatar$))}}function IC(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e.YNc(2,vC,3,3,"ng-container",0),e.ALo(3,"async"),e.qZA(),e.BQk()),2&a){const t=e.oxw();e.xp6(1),e.Tol(t.avatarClass),e.xp6(1),e.Q6J("ngIf",e.lcZ(3,3,t.showAvatar$))}}function yC(a,n){if(1&a&&(e._UZ(0,"t5s-rich-text-display",10),e.ALo(1,"async")),2&a){const t=e.oxw();let i;e.Q6J("value",null==(i=e.lcZ(1,1,t.state$))||null==i.activity?null:i.activity.content)}}function kC(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"async"),e.qZA()),2&a){const t=e.oxw();let i;e.Tol(t.emojiContainerClass),e.xp6(1),e.hij(" ",null==(i=e.lcZ(2,3,t.state$))||null==i.activity?null:i.activity.unformatted," ")}}function wC(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-chat-video-call-badge",11),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("activity",t)}}function SC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-link-preview-bookmark",12),e.NdJ("openBlabDef",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.openBlabDef.emit(o))})("openBlabItem",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.openBlabItem.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf;e.xp6(1),e.Udp("display","block")("margin-top",4,"px")("max-width",217,"px"),e.Q6J("hidePreviewImage",!0)("linkPreview",t)}}function TC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-chat-message-image-attachment",15),e.NdJ("dragstart",function(o){e.CHM(t);const s=e.oxw(2).ngIf,l=e.oxw();return e.KtG(l.onDragStart(null==s.activity?null:s.activity.attachments[0],o))})("attachmentClick",function(o){e.CHM(t);const s=e.oxw(2).ngIf,l=e.oxw();return e.KtG(l.attachmentClick.emit({attachments:null==s.activity?null:s.activity.attachments,selected:o.attachment}))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2).ngIf;e.xp6(1),e.Udp("margin-top",4,"px"),e.Q6J("attachment",null==t.activity?null:t.activity.attachments[0])}}function AC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-chat-message-video-attachment",16),e.NdJ("dragstart",function(o){e.CHM(t);const s=e.oxw(2).ngIf,l=e.oxw();return e.KtG(l.onDragStart(null==s.activity?null:s.activity.attachments[0],o))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2).ngIf;e.xp6(1),e.Q6J("attachment",null==t.activity?null:t.activity.attachments[0])}}function UC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-chat-message-attachment-badge",15),e.NdJ("dragstart",function(o){const l=e.CHM(t).$implicit,d=e.oxw(4);return e.KtG(d.onDragStart(l,o))})("attachmentClick",function(o){e.CHM(t);const s=e.oxw(3).ngIf,l=e.oxw();return e.KtG(l.attachmentClick.emit({attachments:null==s.activity?null:s.activity.attachments,selected:o.attachment}))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Q6J("attachment",t)}}function OC(a,n){if(1&a&&(e.ynx(0),e.YNc(1,UC,2,1,"ng-container",17),e.BQk()),2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngForOf",null==t.activity?null:t.activity.attachments)("ngForTrackBy",i.trackById)}}function EC(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e.ynx(2,13),e.YNc(3,TC,2,3,"ng-container",14),e.YNc(4,AC,2,1,"ng-container",14),e.YNc(5,OC,2,2,"ng-container",14),e.BQk(),e.qZA(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getAttachmentsContainerClass(t)),e.xp6(1),e.Q6J("ngSwitch",i.getAttachmentDisplayStyle(t)),e.xp6(1),e.Q6J("ngSwitchCase","image"),e.xp6(1),e.Q6J("ngSwitchCase","video"),e.xp6(1),e.Q6J("ngSwitchCase","badge")}}const DC=function(){return[]};function BC(a,n){if(1&a&&(e.ynx(0),e.YNc(1,EC,6,6,"ng-container",0),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",((null==t.activity?null:t.activity.attachments)||e.DdM(1,DC)).length>0)}}function MC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-icon-button-17px",18,19),e.NdJ("btnClick",function(o){e.CHM(t);const s=e.MAs(2);return e.KtG(s.toggleMenu(o))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(),i=e.MAs(31);e.xp6(1),e.Q6J("icon",t.Icons.moreHorizRounded.name)("t5sTooltip",t.moreMenuTooltip$)("t5sImperativeMenuTriggerFor",i)}}function ZC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",null,20),e.ALo(3,"async"),e.TgZ(4,"t5s-reaction-bar",21),e.NdJ("reactionClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.reactionClick.emit(o))})("pickerClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.pickerClick.emit(o))}),e.qZA()(),e.BQk()}if(2&a){const t=e.oxw();e.xp6(1),e.Tol(e.lcZ(3,3,t.reactionBarClass$)),e.xp6(3),e.Q6J("state",t.reactionBarState$)}}const LC=function(a){return[a,"showOnHover"]};class Fo extends v.Y4{constructor(n,t){super(n,t),this.WebClientI18n=jt.U,this.WebClientI18nKeys=qe.n,this.userAvatarClick=new e.vpe,this.deleteClick=new e.vpe,this.reactionClick=new e.vpe,this.pickerClick=new e.vpe,this.hoverPickerClick=new e.vpe,this.attachmentClick=new e.vpe,this.openBlabDef=new e.vpe,this.openBlabItem=new e.vpe,this.chatMsgColClass=(0,x.I)({...c.se,...c.hw,gridColumn:2,gridRow:2}),this.avatarClass=(0,x.I)({display:"block",minWidth:(0,c.px)(34),height:"fit-content",gridColumn:1,gridRow:2,paddingLeft:(0,c.px)(2)}),this.containerClass$=this.select((0,z.M3)(),(0,p.U)(i=>(0,x.I)({display:"grid",gridTemplateColumns:i.isActiveUser?void 0:(0,c.px)(47),gridTemplateRows:"auto",paddingBottom:i.paddingBottom,".showOnHover":{visibility:i.active||i.emojiPickerOpen?"visible":"hidden",overflow:"visible"}
1,[c.F9]:{":hover .showOnHover":{visibility:"visible"}}})),(0,w.x)()),this.hasHeaderText$=this.select((0,z.M3)(),(0,$.dQ)((0,p.U)(i=>i.headerText)),(0,w.x)()),this.isActiveUser$=this.select((0,z.M3)(),(0,$.dQ)((0,p.U)(i=>i.isActiveUser)),(0,w.x)()),this.showAvatar$=this.select((0,z.M3)(),(0,$.dQ)((0,p.U)(i=>i.showAvatar))),this.avatar$=this.select((0,z.M3)(),(0,$.dQ)((0,p.U)(i=>i.avatar))),this.isEmoji$=this.select((0,z.M3)(),(0,$.dQ)((0,p.U)(i=>this.isEmoji(i)))),this.videoActivity$=this.select((0,$.Cc)(["activity"])).pipe((0,q.h)(({activity:i})=>i.type===A.Z$b.VIDEO_CALL),(0,p.U)(({activity:i})=>i)),this.linkPreview$=this.select((0,$.Cc)(["activity"])).pipe((0,q.h)(({activity:i})=>!!i.linkPreview),(0,p.U)(({activity:i})=>i.linkPreview)),this.headerTextClass$=this.select((0,z.M3)(),(0,p.U)(i=>(0,x.I)({display:"flex",gridRow:1,gridColumn:2,cursor:"default",padding:i.isActiveUser?(0,c.o3)(0,13,2,0):(0,c.o3)(0,0,2,13),justifyContent:i.isActiveUser?"flex-end":"flex-start"}))),this.headerTextState$=this.select((0,z.M3)(),(0,p.U)(i=>({fontSet:c.LZ["11px"],fgColor:i.theme.color.darker,text:i.headerText,maxHeight:"single-line"})),(0,w.x)()),this.deleteMenu$=this.select((0,p.U)(i=>v.eM.translate(i,qe.n.fm.chat.deletemessageMenuItem)),(0,w.x)()),this.chatMsgRowClass$=this.select((0,z.M3)(),(0,p.U)(i=>(0,x.I)({...c.QP,flexDirection:i.isActiveUser?"row-reverse":"row"}))),this.chatMsgContentClass$=this.select((0,z.M3)(),(0,p.U)(i=>(0,x.I)({...c.i3,cursor:"default",marginRight:i.isActiveUser&&!this.isEmoji(i)?(0,c.px)(2):void 0,maxWidth:(0,c.px)(217),alignItems:i.isActiveUser?"flex-end":"flex-start"})),(0,w.x)()),this.chatMsgClass$=this.select((0,z.M3)(),(0,p.U)(i=>(0,x.I)({...c.E0,display:(i.activity?.unformatted??"").length>0?void 0:"none",padding:this.isEmoji(i)?(0,c.o3)(1,0,1,0):(0,c.o3)(9,13,9,13),backgroundColor:this.getBgColor(i),border:(0,c.Cg)(1,"solid",this.getBorderColor(i)),borderRadius:(0,c.px)(16)})),(0,w.x)()),this.iconState$=this.select((0,z.M3)(),(0,p.U)(i=>({icon:i.activity?.content,size:32}))),this.addReactionClass$=this.select((0,z.M3)(),(0,p.U)(i=>(0,x.I)({...c._7,margin:i.isActiveUser?(0,c.e6)(0,9,0,0):(0,c.e6)(0,0,0,9),"> :not(:last-child)":{marginRight:(0,c.px)(9)}})),(0,w.x)()),this.hasReactions$=this.select((0,z.M3)(),(0,$.dQ)((0,p.U)(i=>(i.activity?.reactions?.length||0)>0)),(0,w.x)()),this.reactionBarState$=this.select((0,z.M3)(),(0,p.U)(i=>({direction:i.isActiveUser?"row-reverse":"row",reactions:i.activity?.reactions,activeUserId:i.activeUserId}))),this.emojiContainerClass=(0,x.I)({fontSize:(0,c.px)(32),lineHeight:(0,c.px)(36),letterSpacing:(0,c.px)(4),wordBreak:"break-all",...c.ko}),this.reactionBarClass$=this.select((0,z.M3)(),(0,p.U)(i=>(0,x.I)({marginTop:(0,c.px)(4),marginRight:i.isActiveUser?(0,c.px)(2):void 0})),(0,w.x)()),this.reactionTooltip$=this.state$.pipe((0,p.U)(i=>this.translate(i,qe.n.fm.chat.conversation.addReactionBtnTooltip))),this.moreMenuTooltip$=this.state$.pipe((0,p.U)(i=>this.translate(i,qe.n.fm.chat.conversation.moreMenuTooltip))),this.set({isActiveUser:!1})}set state(n){this.setState(n)}getAttachmentsContainerClass(n){return(0,x.I)({maxWidth:(0,c.px)(217)})}getAttachmentDisplayStyle(n){const t=n.activity?.attachments??[];if(1===t.length){const i=t[0],o=(0,Nt.KW)(i.extension);if(o===fs.j.IMAGE&&i.thumbnail?.large)return"image";if(o===fs.j.VIDEO)return"video"}return"badge"}isEmoji(n){return pC.r.isEmojis((n.activity?.unformatted??"").replace(/\s/g,""),{min:1,max:3})}getBgColor(n){return this.isEmoji(n)?n.theme.color.lightest:n.isActiveUser?n.theme.color.light:n.theme.color.lightest}getBorderColor(n){return this.isEmoji(n)?"transparent":n.isActiveUser?n.theme.color.light:n.theme.color.dark}onDragStart(n,t){t&&t.dataTransfer&&n&&(0,zc.x)(t,{downloadUrl:n.downloadUrl,name:n.name,mimetype:n.mimetype,size:n.size})}ngAfterViewInit(){this.settingsTrigger&&this.connect(this.settingsTrigger.menuOpen$.pipe((0,p.U)(n=>({active:n}))))}static#e=this.\u0275fac=function(t){return new(t||Fo)(e.Y36(c.Q2),e.Y36(ut.e7))};static#t=this.\u0275cmp=e.Xpm({type:Fo,selectors:[["t5s-chat-message"]],viewQuery:function(t,i){if(1&t&&e.Gf(bC,5),2&t){let o;e.iGM(o=e.CRH())&&(i.settingsTrigger=o.first)}},inputs:{state:"state"},outputs:{userAvatarClick:"userAvatarClick",deleteClick:"deleteClick",reactionClick:"reactionClick",pickerClick:"pickerClick",hoverPickerClick:"hoverPickerClick",attachmentClick:"attachmentClick",openBlabDef:"openBlabDef",openBlabItem:"openBlabItem"},features:[e.qOj],decls:34,vars:58,consts:[[4,"ngIf"],[3,"value",4,"ngIf"],[3,"class",4,"ngIf"],[3,"ngClass"],[3,"icon","t5sTooltip","btnClick"],["xPosition","after",3,"closeOnClick","hasBackdrop"],["settingsMenu","t5sMenu"],["data-cy","t5s-wc-chat-message-delete-btn",3,"leftIcon","text","menuItemClick"],[3,"state"],["data-cy","t5s-chat-message-avatar-btn",3,"user"],[3,"value"],[3,"activity"],[3,"hidePreviewImage","linkPreview","openBlabDef","openBlabItem"],[3,"ngSwitch"],[4,"ngSwitchCase"],["draggable","true",3,"attachment","dragstart","attachmentClick"],["draggable","true",3,"attachment","dragstart"],[4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","t5s-wc-chat-message-menu-btn",3,"icon","t5sTooltip","t5sImperativeMenuTriggerFor","btnClick"],["settingsTrigger","t5sImperativeMenuTrigger"],["tmpid",""],[3,"state","reactionClick","pickerClick"]],template:function(t,i){1&t&&(e.TgZ(0,"div"),e.ALo(1,"async"),e.YNc(2,CC,4,5,"ng-container",0),e.ALo(3,"async"),e.YNc(4,IC,4,5,"ng-container",0),e.ALo(5,"async"),e.TgZ(6,"div")(7,"div"),e.ALo(8,"async"),e.TgZ(9,"div"),e.ALo(10,"async"),e.TgZ(11,"div"),e.ALo(12,"async"),e.YNc(13,yC,2,3,"t5s-rich-text-display",1),e.ALo(14,"async"),e.YNc(15,kC,3,5,"div",2),e.ALo(16,"async"),e.qZA(),e.YNc(17,wC,2,1,"ng-container",0),e.ALo(18,"async"),e.YNc(19,SC,2,8,"ng-container",0),e.ALo(20,"async"),e.YNc(21,BC,2,2,"ng-container",0),e.ALo(22,"async"),e.qZA(),e.TgZ(23,"div",3),e.ALo(24,"async"),e.YNc(25,MC,3,3,"ng-container",0),e.ALo(26,"async"),e.TgZ(27,"t5s-icon-button-17px",4),e.NdJ("btnClick",function(s){return i.hoverPickerClick.emit(s)}),e.qZA()()(),e.YNc(28,ZC,5,5,"ng-container",0),e.ALo(29,"async"),e.qZA()(),e.TgZ(30,"t5s-menu-template",5,6)(32,"t5s-danger-icon-text-menu-item",7),e.NdJ("menuItemClick",function(){return i.deleteClick.emit()}),e.ALo(33,"async"),e.qZA()()),2&t&&(e.Tol(e.lcZ(1,26,i.containerClass$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(3,28,i.hasHeaderText$)),e.xp6(2),e.Q6J("ngIf",!e.lcZ(5,30,i.isActiveUser$)),e.xp6(2),e.Tol(i.chatMsgColClass),e.xp6(1),e.Tol(e.lcZ(8,32,i.chatMsgRowClass$)),e.xp6(2),e.Tol(e.lcZ(10,34,i.chatMsgContentClass$)),e.xp6(2),e.Tol(e.lcZ(12,36,i.chatMsgClass$)),e.xp6(2),e.Q6J("ngIf",!e.lcZ(14,38,i.isEmoji$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(16,40,i.isEmoji$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(18,42,i.videoActivity$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(20,44,i.linkPreview$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(22,46,i.state$)),e.xp6(2),e.Q6J("ngClass",e.VKq(56,LC,e.lcZ(24,48,i.addReactionClass$))),e.xp6(2),e.Q6J("ngIf",e.lcZ(26,50,i.isActiveUser$)),e.xp6(2),e.Q6J("icon",i.Icons.addReaction.name)("t5sTooltip",i.reactionTooltip$),e.xp6(1),e.Q6J("ngIf",e.lcZ(29,52,i.hasReactions$)),e.xp6(2),e.Q6J("closeOnClick",!0)("hasBackdrop",!0),e.xp6(2),e.Q6J("leftIcon",i.Icons.deleteRounded.name)("text",e.lcZ(33,54,i.deleteMenu$)))},dependencies:[u.mk,u.sg,u.O5,u.RF,u.n9,ls.T,Qc.T,hc.g,dC.G,$r.f,_i.E,ui.M,_C.U,uC.b,Le.h,Fc.d,Ti,Ai,Ui,u.Ov],encapsulation:2,changeDetection:0})}function NC(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div")(1,"t5s-chat-message",2),e.NdJ("userAvatarClick",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.userAvatarClick.emit(o))})("deleteClick",function(){const s=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.deleteClick.emit({activityId:s.id}))})("reactionClick",function(o){const l=e.CHM(t).$implicit,d=e.oxw(2);return e.KtG(d.emitReaction(o,l.id))})("pickerClick",function(o){const l=e.CHM(t).$implicit,d=e.oxw(2);return e.KtG(d.emitPicker(o,l.id,!1))})("hoverPickerClick",function(o){const l=e.CHM(t).$implicit,d=e.oxw(2);return e.KtG(d.emitPicker(o,l.id,!0))})("attachmentClick",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.emitAttachmentClick(s,o))})("openBlabDef",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.openBlabDef.emit(o))})("openBlabItem",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.openBlabItem.emit(o))}),e.qZA()()}if(2&a){const t=n.$implicit,i=n.index,o=e.oxw().ngIf,s=e.oxw();e.xp6(1),e.Udp("width",100,"%"),e.Q6J("state",s.getMsgState(o,t,i))}}function RC(a,n){if(1&a&&(e.ynx(0),e.YNc(1,NC,2,3,"div",1),e.BQk()),2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.activities)("ngForTrackBy",i.trackById)}}class Oi extends v.Y4{constructor(){super(...arguments),this.trackById=yt.xn,this.userAvatarClick=new e.vpe,this.deleteClick=new e.vpe,this.reactionClick=new e.vpe,this.pickerClick=new e.vpe,this.openBlabDef=new e.vpe,this.openBlabItem=new e.vpe,this.attachmentClick=new e.vpe}set activeUserId(n){this.set({activeUserId:n})}set activities(n){this.set({activities:n})}set user(n){this.set({user:n})}set lastActivityDate(n){this.set({lastActivityDate:n})}set emojiPickerOpenActivityId(n){this.set({emojiPickerOpenActivityId:n})}set isInsideDialog(n){this.set({isInsideDialog:n})}getMsgState(n,t,i){return{activeUserId:n.activeUserId,isActiveUser:this.isAuthor(n),headerText:this.isFirstMsg(i)?this.getHeaderText(n):void 0,showAvatar:this.isFirstMsg(i),avatar:n.user,paddingBottom:this.isLastMsg(n,i)||(t?.reactions?.length||0)>0?(0,c.px)(17):(0,c.px)(4),emojiPickerOpen:void 0!==t?.id&&t.id===n.emojiPickerOpenActivityId,activity:t}}emitReaction(n,t){this.reactionClick.emit({...n,activityId:t})}
1emitPicker(n,t,i){this.pickerClick.emit({activityId:t,target:n.target,fromHoverBar:i})}isFirstMsg(n){return 0===n}isLastMsg(n,t){return t===n.activities.length-1}isAuthor(n){return!(!n.activeUserId||!n.user?.id)&&n.activeUserId===n.user?.id}getHeaderText(n){const t=this.formatReducedDateTime(n,n.lastActivityDate);return n.isInsideDialog||this.isAuthor(n)?t||"":`${n.user?.primaryName||""} \xb7 ${t||""}`}emitAttachmentClick(n,{attachments:t,selected:i}){this.attachmentClick.emit({selected:i,attachments:t.map(o=>({...o,createdAt:n.lastActivityDate,author:n.user}))})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Oi)))(i||Oi)}}();static#t=this.\u0275cmp=e.Xpm({type:Oi,selectors:[["t5s-chat-message-block"]],inputs:{activeUserId:"activeUserId",activities:"activities",user:"user",lastActivityDate:"lastActivityDate",emojiPickerOpenActivityId:"emojiPickerOpenActivityId",isInsideDialog:"isInsideDialog"},outputs:{userAvatarClick:"userAvatarClick",deleteClick:"deleteClick",reactionClick:"reactionClick",pickerClick:"pickerClick",openBlabDef:"openBlabDef",openBlabItem:"openBlabItem",attachmentClick:"attachmentClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"state","userAvatarClick","deleteClick","reactionClick","pickerClick","hoverPickerClick","attachmentClick","openBlabDef","openBlabItem"]],template:function(t,i){1&t&&(e.YNc(0,RC,2,2,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,Fo,u.Ov],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0})}var Gc=r(39955),PC=r(26404),vs=r(98576),$C=r(59975),zC=r(40052),tl=r(39301);function QC(a,n){1&a&&(e.ynx(0),e._UZ(1,"t5s-loading-spinner-26px"),e.BQk())}function FC(a,n){1&a&&(e.ynx(0),e._UZ(1,"t5s-loading-spinner-26px"),e.BQk())}function GC(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-thumbnail",4),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("state",t.thumbnailState$)}}function JC(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-graphic",5),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Q6J("size",34)("graphic",i.getGraphic(t))}}function HC(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div"),e.ynx(3,1),e.YNc(4,QC,2,0,"ng-container",2),e.YNc(5,FC,2,0,"ng-container",2),e.YNc(6,GC,2,1,"ng-container",2),e.YNc(7,JC,2,2,"ng-container",2),e.BQk(),e.qZA(),e.TgZ(8,"div")(9,"div"),e._uU(10),e.qZA(),e.TgZ(11,"div"),e._uU(12),e.qZA()(),e.TgZ(13,"div")(14,"t5s-icon-button-17px",3),e.NdJ("mousedown",function(o){return o.preventDefault()})("btnClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.removeAttachment.emit({attachment:s.attachment}))}),e.qZA()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Tol(i.getFirstColumnClass(t)),e.xp6(1),e.Q6J("ngSwitch",i.getVisualType(t)),e.xp6(1),e.Q6J("ngSwitchCase","loading-spinner"),e.xp6(1),e.Q6J("ngSwitchCase","progress-bar"),e.xp6(1),e.Q6J("ngSwitchCase","thumbnail"),e.xp6(1),e.Q6J("ngSwitchCase","graphic"),e.xp6(2),e.Tol(i.getNameClass(t)),e.xp6(1),e.hij(" ",null==t.attachment||null==t.attachment.file?null:t.attachment.file.name," "),e.xp6(1),e.Tol(i.getSublineClass(t)),e.xp6(1),e.hij(" ",i.getSubline(t)," "),e.xp6(1),e.Tol(i.thirdColumnClass),e.xp6(1),e.Q6J("icon",i.Icons.closeLarge.name)("t5sTooltip",i.translate(t,i.WebClientI18nKeys.fm.chat.inputRemoveAttachmentBtnTooltip))}}const nl="--t5s-chat-message-input-attachment-badge-show-remove-btn",il="--t5s-chat-message-input-attachment-badge-bg-hover-col";class Ei extends v.Y4{constructor(){super(...arguments),this.removeAttachment=new e.vpe,this.WebClientI18nKeys=qe.n,this.thirdColumnClass=(0,x.I)({visibility:(0,c.VD)(nl,"hidden"),marginLeft:"auto",marginTop:(0,c.px)(-6),marginRight:(0,c.px)(-6)}),this.thumbnailState$=this.state$.pipe((0,p.U)(n=>({size:34,fullImgUrl:n.attachment?.attachment?.thumbnail?.medium,fallbackGraphic:pe.TC.fileImage.name,borderRadius:(0,c.px)(8)})))}set attachment(n){this.set({attachment:n})}getContainerClass(n){return(0,x.I)({...c.xI,padding:(0,c.px)(12),borderRadius:(0,c.px)(12),border:(0,c.Cg)(1,"solid",n.theme.color.darker9),...(0,c.Mr)({backgroundColor:(0,c.VD)(il,(0,c.m4)(0,0,0,.03)),[nl]:"visible"}),...(0,c.bB)({backgroundColor:(0,c.VD)(il,(0,c.m4)(0,0,0,.03)),[nl]:"visible"})})}getFirstColumnClass(n){return(0,x.I)({...(0,c.In)(34),...c._7,marginRight:(0,c.px)(12)})}getNameClass(n){return(0,x.I)({...me.bY,...(0,c.pJ)(c.LZ["bold-13px"]),color:n.theme.color.darkest,paddingRight:(0,c.px)(4.5),overflow:"hidden",maxHeight:c.LZ["bold-13px"].lineHeight,wordBreak:"break-all"})}getSublineClass(n){return(0,x.I)({...me.bY,...(0,c.pJ)(c.LZ["13px"]),wordBreak:"break-all",paddingRight:(0,c.px)(4.5),overflow:"hidden",maxHeight:c.LZ["13px"].lineHeight,color:n.theme.color.darker})}getVisualType(n){return(n.attachment?.progress??0)<=0?"loading-spinner":(n.attachment?.progress??0)<100?"progress-bar":n.attachment?.attachment?.thumbnail?.medium?"thumbnail":"graphic"}getGraphic(n){return(0,qr.VR)(n.attachment?.file)}getSubline(n){const t=n.attachment?.attachment?.size??n.attachment?.file?.size??0,i=(0,Nt.fE)(n.attachment?.file),o=xs.u.translate(n,xs.u.key[i])||(0,Nt.cP)(n.attachment?.file)?.toUpperCase();return`${(0,Nt.fT)(t)} ${o}`}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Ei)))(i||Ei)}}();static#t=this.\u0275cmp=e.Xpm({type:Ei,selectors:[["t5s-chat-message-input-attachment-badge"]],inputs:{attachment:"attachment"},outputs:{removeAttachment:"removeAttachment"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"icon","t5sTooltip","mousedown","btnClick"],[3,"state"],[3,"size","graphic"]],template:function(t,i){1&t&&(e.YNc(0,HC,15,19,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,u.RF,u.n9,ls.T,bs.p,Xr.Z,tl.y,Le.h,u.Ov],encapsulation:2,changeDetection:0})}var VC=r(30568),WC=r(87658),YC=r(63174);function KC(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-loading-spinner-26px"),e.qZA(),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Tol(t.loadingClass)}}function jC(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-loading-spinner-26px"),e.qZA(),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Tol(t.loadingClass)}}function qC(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"img",4),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getImageClass(t)),e.Q6J("src",null==t.attachment||null==t.attachment.attachment||null==t.attachment.attachment.thumbnail?null:t.attachment.attachment.thumbnail.large,e.LSH)}}function XC(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-graphic",5),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("size",34)("graphic",t.Graphics.fileImage.name)}}function e0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div"),e.ynx(2,1),e.YNc(3,KC,3,2,"ng-container",2),e.YNc(4,jC,3,2,"ng-container",2),e.YNc(5,qC,2,3,"ng-container",2),e.YNc(6,XC,2,2,"ng-container",2),e.BQk(),e.TgZ(7,"div")(8,"t5s-icon-button",3),e.NdJ("mousedown",function(o){return o.preventDefault()})("btnClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.removeAttachment.emit({attachment:s.attachment}))}),e.qZA()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Q6J("ngSwitch",i.getVisualType(t)),e.xp6(1),e.Q6J("ngSwitchCase","loading-spinner"),e.xp6(1),e.Q6J("ngSwitchCase","progress-bar"),e.xp6(1),e.Q6J("ngSwitchCase","thumbnail"),e.xp6(1),e.Q6J("ngSwitchCase","graphic"),e.xp6(1),e.Tol(i.getRemoveBtnClass(t)),e.xp6(1),e.Q6J("state",i.removeBtnState$)}}class Di extends v.Oo{constructor(){super(...arguments),this.Graphics=pe.TC,this.removeAttachment=ne
1w e.vpe,this.removeBtnState$=this.state$.pipe((0,p.U)(n=>({icon:pe.PJ.closeLarge.name,iconSize:17,btnSize:26,color:n.theme.color.lightest,activeColor:n.theme.color.darkest,style:"filled"}))),this.loadingClass=(0,x.I)({...c._7,height:(0,c.px)(100)})}set attachment(n){this.set({attachment:n})}getRemoveBtnClass(n){return(0,x.I)({position:"absolute",top:(0,c.px)(4),right:(0,c.px)(4),[me.jr]:(0,c.m4)(0,0,0,.77)})}getContainerClass(n){return(0,x.I)({position:"relative",...c._7,borderRadius:(0,c.px)(16),...(0,c.e)(128),width:(0,c.aQ)(100),maxWidth:(0,c.aQ)(100)})}getImageClass(n){return(0,x.I)({borderRadius:(0,c.px)(16),...c.ko,width:(0,c.aQ)(100),maxWidth:(0,c.aQ)(100),...(0,c.e)(128),objectFit:"cover"})}getVisualType(n){return(n.attachment?.progress??0)<=0?"loading-spinner":(n.attachment?.progress??0)<100?"progress-bar":n.attachment?.attachment?.thumbnail?.large?"thumbnail":"graphic"}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Di)))(i||Di)}}();static#t=this.\u0275cmp=e.Xpm({type:Di,selectors:[["t5s-chat-message-input-image-attachment"]],inputs:{attachment:"attachment"},outputs:{removeAttachment:"removeAttachment"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"state","mousedown","btnClick"],["alt","",3,"src"],[3,"size","graphic"]],template:function(t,i){1&t&&(e.YNc(0,e0,9,10,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,u.RF,u.n9,zo.r,bs.p,tl.y,u.Ov],encapsulation:2,changeDetection:0})}function t0(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-loading-spinner-26px"),e.qZA(),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Tol(t.loadingClass)}}function n0(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-loading-spinner-26px"),e.qZA(),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Tol(t.loadingClass)}}function i0(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"video",4),e._UZ(2,"source",5),e.qZA(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getVideoClass(t)),e.xp6(1),e.Q6J("src",null==t.attachment||null==t.attachment.attachment?null:t.attachment.attachment.viewUrl,e.LSH)("type",null==t.attachment||null==t.attachment.attachment?null:t.attachment.attachment.mimetype)}}function o0(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-graphic",6),e.BQk()),2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("size",34)("graphic",t.Graphics.fileVideo.name)}}function a0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div"),e.ynx(2,1),e.YNc(3,t0,3,2,"ng-container",2),e.YNc(4,n0,3,2,"ng-container",2),e.YNc(5,i0,3,4,"ng-container",2),e.YNc(6,o0,2,2,"ng-container",2),e.BQk(),e.TgZ(7,"div")(8,"t5s-icon-button",3),e.NdJ("mousedown",function(o){return o.preventDefault()})("btnClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.removeAttachment.emit({attachment:s.attachment}))}),e.qZA()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getContainerClass(t)),e.xp6(1),e.Q6J("ngSwitch",i.getVisualType(t)),e.xp6(1),e.Q6J("ngSwitchCase","loading-spinner"),e.xp6(1),e.Q6J("ngSwitchCase","progress-bar"),e.xp6(1),e.Q6J("ngSwitchCase","video"),e.xp6(1),e.Q6J("ngSwitchCase","graphic"),e.xp6(1),e.Tol(i.getRemoveBtnClass(t)),e.xp6(1),e.Q6J("state",i.removeBtnState$)}}class Bi extends v.Oo{constructor(){super(...arguments),this.Graphics=pe.TC,this.removeAttachment=new e.vpe,this.removeBtnState$=this.state$.pipe((0,p.U)(n=>({icon:pe.PJ.closeLarge.name,iconSize:17,btnSize:26,color:n.theme.color.lightest,activeColor:n.theme.color.darkest,style:"filled"}))),this.loadingClass=(0,x.I)({...c._7,height:(0,c.px)(100)})}set attachment(n){this.set({attachment:n})}getRemoveBtnClass(n){return(0,x.I)({position:"absolute",top:(0,c.px)(4),right:(0,c.px)(4),[me.jr]:(0,c.m4)(0,0,0,.77)})}getContainerClass(n){return(0,x.I)({position:"relative",...c._7,borderRadius:(0,c.px)(16),...(0,c.e)(128),width:(0,c.aQ)(100),maxWidth:(0,c.aQ)(100)})}getVideoClass(n){return(0,x.I)({borderRadius:(0,c.px)(16),width:(0,c.aQ)(100),maxWidth:(0,c.aQ)(100),...(0,c.e)(128),backgroundColor:n.theme.color.darkest,objectFit:"cover"})}getVisualType(n){return(n.attachment?.progress??0)<=0?"loading-spinner":(n.attachment?.progress??0)<100?"progress-bar":n.attachment?.attachment?.viewUrl?"video":"graphic"}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Bi)))(i||Bi)}}();static#t=this.\u0275cmp=e.Xpm({type:Bi,selectors:[["t5s-chat-message-input-video-attachment"]],inputs:{attachment:"attachment"},outputs:{removeAttachment:"removeAttachment"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"state","mousedown","btnClick"],["preload","metadata"],[3,"src","type"],[3,"size","graphic"]],template:function(t,i){1&t&&(e.YNc(0,a0,9,10,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,u.RF,u.n9,zo.r,bs.p,tl.y,u.Ov],encapsulation:2,changeDetection:0})}function s0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-link-preview-bookmark",12),e.NdJ("removeClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.removeLinkPreview.emit())}),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw().ngIf,o=e.oxw();e.xp6(1),e.Udp("display","block")("max-width",217,"px")("padding",9,"px"),e.Q6J("hidePreviewImage",!0)("removable",!0)("removeLabel",o.LinkPreviewI18n.translate(i,o.LinkPreviewI18n.key.removeTooltip))("linkPreview",t)}}function r0(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-link-preview-bookmark",14),e.NdJ("removeClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.removeLinkPreview.emit())}),e.qZA()}if(2&a){const t=n.ngIf,i=e.oxw(2).ngIf,o=e.oxw();e.Udp("display","block")("max-width",217,"px")("padding",9,"px"),e.Q6J("hidePreviewImage",!0)("removable",!0)("removeLabel",o.LinkPreviewI18n.translate(i,o.LinkPreviewI18n.key.removeTooltip))("loadingUrl",t)}}function l0(a,n){if(1&a&&e.YNc(0,r0,1,10,"t5s-link-preview-bookmark",13),2&a){const t=e.oxw().ngIf;e.Q6J("ngIf",t.loadingLinkPreviewUrl)}}function c0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-chat-message-input-image-attachment",17),e.NdJ("dragstart",function(o){e.CHM(t);const s=e.oxw(2).ngIf,l=e.oxw();return e.KtG(l.onDragStart(s.attachments[0],o))})("removeAttachment",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.removeAttachment.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2).ngIf;e.xp6(1),e.Q6J("attachment",t.attachments[0])}}function p0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-chat-message-input-video-attachment",17),e.NdJ("dragstart",function(o){e.CHM(t);const s=e.oxw(2).ngIf,l=e.oxw();return e.KtG(l.onDragStart(s.attachments[0],o))})("removeAttachment",function(o){e.CHM(t);const s=e.oxw(3);return e.KtG(s.removeAttachment.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2).ngIf;e.xp6(1),e.Q6J("attachment",t.attachments[0])}}function d0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-chat-message-input-attachment-badge",17),e.NdJ("dragstart",function(o){const l=e.CHM(t).$implicit,d=e.oxw(4);return e.KtG(d.onDragStart(l,o))})("removeAttachment",function(o){e.CHM(t);const s=e.oxw(4);return e.KtG(s.removeAttachment.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Q6J("attachment",t)}}function _0(a,n){if(1&a&&(e.ynx(0),e.YNc(1,d0,2,1,"ng-container",18),e.BQk()),2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.attachments)("ngForTrackBy",i.trackById)}}function u0(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e.ynx(2,15),e.YNc(3,c0,2,1,"ng-container",16),e.YNc(4,p0,2,1,"ng-container",16),e.YNc(5,_0,2,2,"ng-container",16),e.BQk(),e.qZA(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.getAttachmentsContainerClass(t)),e.xp6(1),e.Q6J("ngSwitch",i.getAttachmentDisplayStyle(t)),e.xp6(1),e.Q6J("ngSwitchCase","image"),e.xp6(1),e.Q6J("ngSwitchCase","video"),e.xp6(1),e.Q6J("ngSwitchCase","badge")}}const h0=function(){return[]};function g0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"div")(3,"input",1,2),e.NdJ("change",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.fileInput(o))}),e.qZA(),e.TgZ(5,"t5s-icon-button",3),e.NdJ("btnClick",function(){e.CHM(t);const o=e.MAs(4);return e.KtG(o.click())}),e.qZA()(),e.TgZ(6,"div")(7,"div")(8,"div",4)(9,"t5s-rich-text-editor",5),e.NdJ("filePaste",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.addAttachments.emit({files:[o]}))})("paste",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.handlePaste())})("valueChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.setValue(o))}),e._UZ(10,"div",6),e.TgZ(11,"div",7),e.NdJ("mentionUserSearchQueryChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.mentionUserSearchQueryChange.emit({query:o}))}),e.qZA()()(),e.TgZ(12,"t5s-icon-button",8),e.NdJ("mousedown",function(o){return o.preventDefault()})("btnClick",function(o){const l=e.CHM(t).ngIf,d=e.oxw();return e.KtG(d.emitPickerClick(l,o))}),e.qZA()(),e.YNc(13,s0,2,10,"ng-container",9),e.YNc(14,l0,1,1,"ng-template",null,10,e.W1O),e.YNc(16,u0,6,6,"ng-container",0),e.qZA(),e.TgZ(17,"div")(18,"t5s-icon-button",11),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.handleSendBtnClick())}),e.qZA()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(15),o=e.oxw();e.xp6(1),e.Tol(o.getContainerClass(t)),e.xp6(1),e.Tol(o.getAttachmentBtnClass(t)),e.xp6(1),e.Udp("display","none"),e.xp6(2),e.Q6J("state",o.attachmentBtnState$)("t5sTooltip",o.translate(t,o.WebClientI18nKeys.fm.chat.inputAttachBtnTooltip)),e.xp6(1),e.Tol(o.getMessageInputClass(t)),e.xp6(1),e.Tol(o.getMessageRowClass(t)),e.xp6(1),e.Tol(o.textInputScrollC
1ontainerClass),e.xp6(1),e.Q6J("config",o.getRichTextEditorConfig(t))("value",t.value),e.xp6(2),e.Q6J("userSearchResults",t.userSearchResults),e.xp6(1),e.Q6J("t5sTooltip",o.translate(t,o.WebClientI18nKeys.fm.chat.inputEmojiBtnTooltip))("state",o.reactionBtnState$),e.xp6(1),e.Q6J("ngIf",t.linkPreview)("ngIfElse",i),e.xp6(3),e.Q6J("ngIf",(t.attachments||e.DdM(26,h0)).length>0),e.xp6(1),e.Tol(o.getSendBtnClass(t)),e.xp6(1),e.Q6J("t5sTooltip",o.translate(t,o.WebClientI18nKeys.fm.chat.sendBtnTooltip))("state",o.sendBtnState$)}}let Go=class fl extends v.Y4{constructor(n,t){super(n,t),this.LinkPreviewI18n=PC.Q,this.send$$=new mt.xQ,this.WebClientI18nKeys=qe.n,this.valueChange=this.state$.pipe((0,p.U)(({value:i})=>i),(0,w.x)()),this.pickerClick=new e.vpe,this.addAttachments=new e.vpe,this.removeAttachment=new e.vpe,this.removeLinkPreview=new e.vpe,this.contentPaste=new e.vpe,this.sendBtnClick=this.send$$.asObservable().pipe((0,Do.M)(this.state$),(0,q.h)(([,{disabled:i}])=>!i),(0,p.U)(([i,o])=>({value:this.getValue(o)}))),this.mentionUserSearchQueryChange=new e.vpe,this.attachmentBtnState$=this.state$.pipe((0,p.U)(i=>({btnSize:34,iconSize:20,color:i.theme.color.primary,icon:pe.PJ.attachFileRounded.name}))),this.reactionBtnState$=this.state$.pipe((0,p.U)(i=>({btnSize:26,iconSize:20,color:i.theme.color.primary,icon:pe.PJ.sentimentSatisfiedRounded.name}))),this.sendBtnState$=this.state$.pipe((0,p.U)(i=>({btnSize:34,iconSize:20,color:i.theme.color.primary,icon:pe.PJ.send.name,disabled:i.disabled})),(0,Rt.K)()),this.textInputScrollContainerClass=(0,x.I)({...c.tr,...c.fP,maxHeight:(0,c.px)(10*c.LZ["13px"].lineHeight)}),this.set({value:"",disabled:!1,loadingLinkPreviewUrl:void 0}),this.state$.pipe((0,p.U)(i=>(i.attachments??[]).length),(0,w.x)(),(0,zC.p)(100),(0,pt.O)(0),(0,Ft.s)(this)).subscribe(()=>this.focusInput())}set value(n){this.set({value:n})}set attachments(n){this.set({attachments:n})}set linkPreview(n){this.set({linkPreview:n})}set loadingLinkPreviewUrl(n){this.set({loadingLinkPreviewUrl:n})}set disabled(n){this.set({disabled:n})}set mentionUserSearchResults(n){this.set({userSearchResults:n})}fileInput(n){const t=(0,Nt.Bc)(n);t.length>0&&this.addAttachments.emit({files:t})}getRichTextEditorConfig(n){return{...$C.t,placeholder:v.eM.translate(n,qe.n.fm.chat.startANewMessage),placeholderFocusColor:n.theme.color.gray9197A3,formats:[vs.Pz.MENTION_USER],spellcheck:!0}}getValue(n){return n.value?(0,Gc._)(n.value):""}insertText(n){this.editorRef?.insertText(n)}focusInput(){this.editorRef?.focus()}getContainerClass(n){return(0,x.I)({display:"flex",alignItems:"flex-end",padding:(0,c.o3)(10,13,7,15),borderTop:(0,c.Cg)(1,"solid",n.theme.color.light)})}getMessageInputClass(n){return(0,x.I)({minHeight:(0,c.px)(28),backgroundColor:n.theme.color.light,borderRadius:(0,c.px)(14),border:(0,c.Cg)(1,"solid",n.theme.color.light),position:"relative",flexGrow:1,margin:(0,c.e6)(0,9,0,9),...(0,c.u_)({[il]:this.bgHoverColor(n),backgroundColor:n.theme.color.lightest,border:(0,c.Cg)(1,"solid",n.theme.color.primary)})})}getMessageRowClass(n){return(0,x.I)({...c.xI,"> :first-child":{padding:(0,c.o3)(5,4,4,9),flexGrow:1},">: nth-child(2)":{marginTop:"auto",marginBottom:(0,c.px)(3),marginRight:(0,c.px)(3)}})}getAttachmentsContainerClass(n){return(0,x.I)({padding:(0,c.o3)(9,9,9,9),"> :not(:first-child)":{marginTop:(0,c.px)(4)}})}getSendBtnClass(n){return(0,x.I)({marginBottom:(0,c.px)(4)})}getAttachmentBtnClass(n){return(0,x.I)({marginBottom:(0,c.px)(4)})}setValue({value:n}){this.set({value:n})}emitPickerClick(n,t){return this.pickerClick.emit(t),!1}triggerSend(){this.send$$.next(void 0)}handleSendBtnClick(){this.triggerSend(),this.focusInput()}handlePaste(){this.contentPaste.emit()}ngAfterViewInit(){this.editorRef?.registerKeyMiddleware("send-on-enter",{key:vs.vr.ENTER,active:!0,middleware:()=>{const{disabled:n}=this.get();return n||this.triggerSend(),!1}})}getAttachmentDisplayStyle(n){const t=n.attachments??[];if(1===t.length){const i=t[0].file,o=(0,Nt.fE)(i);if(o===fs.j.IMAGE&&(0,Nt.hD)(i))return"image";if(o===fs.j.VIDEO)return"video"}return"badge"}onDragStart(n,t){const i=n?.attachment;t&&t.dataTransfer&&i&&(0,zc.x)(t,{downloadUrl:i.downloadUrl,name:i.name,mimetype:i.mimetype,size:i.size})}static#e=this.\u0275fac=function(t){return new(t||fl)(e.Y36(c.Q2),e.Y36(ut.e7))};
1static#t=this.\u0275cmp=e.Xpm({type:fl,selectors:[["t5s-chat-message-input"]],viewQuery:function(t,i){if(1&t&&e.Gf(vs.YI,5),2&t){let o;e.iGM(o=e.CRH())&&(i.editorRef=o.first)}},inputs:{value:"value",attachments:"attachments",linkPreview:"linkPreview",loadingLinkPreviewUrl:"loadingLinkPreviewUrl",disabled:"disabled",mentionUserSearchResults:"mentionUserSearchResults"},outputs:{valueChange:"valueChange",pickerClick:"pickerClick",addAttachments:"addAttachments",removeAttachment:"removeAttachment",removeLinkPreview:"removeLinkPreview",contentPaste:"contentPaste",sendBtnClick:"sendBtnClick",mentionUserSearchQueryChange:"mentionUserSearchQueryChange"},exportAs:["chatMessageInput"],features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["data-cy","t5s-multi-attachment-flim-val-add-attachment-input","type","file","multiple","",3,"change"],["filePicker",""],["data-cy","t5s-chat-message-input-attachment-btn","tooltipPosition","top",3,"state","t5sTooltip","btnClick"],["cdkScrollable",""],[3,"config","value","filePaste","paste","valueChange"],["t5sRichTextEditorInsertEmoji",""],["t5sRichTextEditorMentionUser","",3,"userSearchResults","mentionUserSearchQueryChange"],["data-cy","t5s-chat-message-input-emoji-btn","tooltipPosition","top",3,"t5sTooltip","state","mousedown","btnClick"],[4,"ngIf","ngIfElse"],["linkPreviewStubTpl",""],["tooltipPosition","top","data-cy","t5s-chat-message-input-send-btn",3,"t5sTooltip","state","btnClick"],[3,"hidePreviewImage","removable","removeLabel","linkPreview","removeClick"],[3,"display","max-width","padding","hidePreviewImage","removable","removeLabel","loadingUrl","removeClick",4,"ngIf"],[3,"hidePreviewImage","removable","removeLabel","loadingUrl","removeClick"],[3,"ngSwitch"],[4,"ngSwitchCase"],["draggable","true",3,"attachment","dragstart","removeAttachment"],[4,"ngFor","ngForOf","ngForTrackBy"]],template:function(t,i){1&t&&(e.YNc(0,g0,19,27,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,u.RF,u.n9,ve.PQ,zo.r,VC.P,WC.Y,YC.Y,Le.h,Fc.d,Ei,Di,Bi,u.Ov],encapsulation:2,changeDetection:0})};Go=(0,Ot.gn)([(0,oi.c)(),(0,Ot.w6)("design:paramtypes",[c.Q2,At.y])],Go);var m0=r(305),Jc=r(67020);function f0(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-chat-meta-activity",7),e.BQk()),2&a){const t=e.oxw().$implicit,i=e.oxw();e.xp6(1),e.Q6J("text",i.getMetaActivityText(t))}}function x0(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-chat-message-block",8,9),e.NdJ("userAvatarClick",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw();return e.KtG(s.userClicked(o.user))})("reactionClick",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.reactionClick(o))})("deleteClick",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.deleteChatMessageClick(o))})("pickerClick",function(o){e.CHM(t);const s=e.MAs(1);return e.oxw(2).emojiPickerOpenActivityId=o.fromHoverBar?o.activityId:void 0,e.KtG(s.show(o))})("emojiPicked",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.addReaction(o))})("attachmentClick",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.attachmentClick(o))})("openBlabDef",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleOpenBlabDef(o))})("openBlabItem",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.handleOpenBlabItem(o))}),e.ALo(2,"async"),e.qZA()}if(2&a){const t=e.MAs(1),i=e.oxw().$implicit,o=e.oxw();e.Q6J("t5sBottomSheetOverlay",t.sheetContent)("bottomSheetOverlayDisableActiveIndication",!0)("emojiPickerOpenActivityId",e.lcZ(2,8,t.open$)?o.emojiPickerOpenActivityId:null)("activeUserId",o.activeUserId)("user",i.user)("activities",i.activities)("isInsideDialog",(null==o.conversation?null:o.conversation.type)===o.ConversationType.DIALOG)("lastActivityDate",i.lastActivityDate)}}function b0(a,n){if(1&a&&(e.ynx(0),e.YNc(1,f0,2,1,"ng-container",5),e.YNc(2,x0,3,10,"ng-template",null,6,e.W1O),e.BQk()),2&a){const t=n.$implicit,i=e.MAs(3);e.xp6(1),e.Q6J("ngIf",t.type)("ngIfElse",i)}}let ol=class xl{constructor(n,t){this.store$=n,this.dropzoneClass=(0,x.I)({...c.hw}),this.conversationBodyClass=(0,x.I)({...c.i3,...c.p4,justifyContent:"space-between"}),this.scrollContainerClass=(0,x.I)({flex:1,paddingLeft:(0,c.px)(13),paddingRight:(0,c.px)(13),paddingTop:(0,c.px)(17),...c.fP}),this.ConversationType=A.i1$,this.trackById=yt.xn,this.trackClusterItem=Jb,this.ChatActivityType=A.Z$b,this.i18n=(0,Zt.mu)(),this.I18n=Me,t.pipe((0,_.l4)(U.xx.postChatMessageSuccess),(0,Ft.s)(this)).subscribe(()=>this.scrollEndDirective?.scrollToEnd())}
1postChatMessage(n){this.store$.dispatch(Ze.postMessageForCurrentConversation({content:n}))}deleteChatMessageClick({activityId:n}){this.store$.dispatch(Ze.confirmDeleteChatMessage({activityId:n}))}handleOpenBlabDef(n){this.store$.dispatch(Ze.openBlabDef(n))}handleOpenBlabItem(n){this.store$.dispatch(Ze.openBlabItem(n))}reactionClick({action:n,activityId:t,emoji:i}){"add"===n?this.addReaction({activityId:t,emoji:i}):this.removeReaction({activityId:t,emoji:i})}addReaction(n){const{activityId:t,emoji:i}=n;this.store$.dispatch(U.Xo.addReaction({input:{activityId:t,emoji:i},activeUser:this.activeUser}))}removeReaction(n){const{activityId:t,emoji:i}=n;this.store$.dispatch(U.Xo.removeReaction({input:{activityId:t,emoji:i},activeUser:this.activeUser}))}userClicked(n){}loadMoreActivities(){this.store$.dispatch(Ze.loadMoreActivitiesForCurrentConversation())}newMessageContentChange(n){this.store$.dispatch(U.xx.upsertNewMessageContent({newMessageContent:n}))}mentionUserSearchQueryChange({query:n}){this.store$.dispatch(U.xx.mentionUserSearch({searchQuery:n}))}addAttachments({files:n}){this.store$.dispatch(U.xx.addAttachmentFiles({files:n}))}removeAttachment({attachment:n}){this.store$.dispatch(U.xx.removeAttachment({attachment:n}))}removeLinkPreview(){this.store$.dispatch(U.xx.removeLinkPreview())}contentPasted(){this.store$.dispatch(U.xx.contentPasted())}attachmentClick({attachments:n,selected:t}){this.store$.dispatch(aC.RJ.viewFiles({files:n,initiallySelectedId:t.id}))}getMetaActivityText(n){if(n)switch(n.type){case A.Z$b.CONVERSATION_CREATED:return this.I18n.translate(this.i18n,this.I18n.key.conversation.conversationCreated);case A.Z$b.USER_JOINED:{const{user:t,targetUser:i}=n;return this.I18n.translate(this.i18n,{key:this.I18n.key.conversation.userJoined,params:{userName:t?.primaryName??"User",targetUser:i?.primaryName??"targetUser"}})}case A.Z$b.USER_LEFT:return this.I18n.translate(this.i18n,{key:this.I18n.key.conversation.userLeft,params:{userName:n.user?.primaryName??"User"}});case A.Z$b.GROUP_NAME_CHANGED:{const{content:t,user:i}=n;return this.I18n.translate(this.i18n,{key:this.I18n.key.conversation.groupNameChanged,params:{userName:i?.primaryName??"User",groupName:t}})}case A.Z$b.GROUP_THUMBNAIL_CHANGED:{const{user:t}=n;return this.I18n.translate(this.i18n,{key:this.I18n.key.conversation.groupThumbnailChanged,params:{userName:t?.primaryName??"User"}})}case A.Z$b.VIDEO_CALL:{const{user:t}=n;return this.I18n.translate(this.i18n,{key:this.I18n.key.conversation.videoCallStarted,params:{userName:t?.primaryName??"User"}})}case A.Z$b.MESSAGE:throw new Error("ChatMessageDto should not be fed into ChatMetaActivityPipe pipe.")}}static#e=this.\u0275fac=function(t){return new(t||xl)(e.Y36(g.yh),e.Y36(_.eX))};static#t=this.\u0275cmp=e.Xpm({type:xl,selectors:[["t5s-sidebar-conversation-body"]],viewQuery:function(t,i){if(1&t&&e.Gf(Ea.s,5),2&t){let o;e.iGM(o=e.CRH())&&(i.scrollEndDirective=o.first)}},inputs:{chatActivityItems:"chatActivityItems",activeUserId:"activeUserId",activeUser:"activeUser",newMessageContent:"newMessageContent",newMessageCanSend:"newMessageCanSend",conversation:"conversation",mentionUserSearchResults:"mentionUserSearchResults",newMessageAttachments:"newMessageAttachments",newMessageLinkPreview:"newMessageLinkPreview",newMessageLoadingLinkPreviewUrl:"newMessageLoadingLinkPreviewUrl"},decls:8,vars:21,consts:[[3,"text","fileDrop"],["t5sVerticalAutoScrollEnd","","t5sVerticalScroll","","t5sVerticalScrollUpTrigger","","t5sVerticalScrollPosMaintain","","data-cy","t5s-chat-conversation-scroll-container",3,"scrollUpTrigger"],[4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","t5s-wc-usi-chat-message-input","t5sAutofocus","","t5sEmojiPicker","",3,"disabled","attachments","linkPreview","loadingLinkPreviewUrl","value","t5sBottomSheetOverlay","bottomSheetOverlayDisableActiveIndication","mentionUserSearchResults","valueChange","pickerClick","emojiPicked","sendBtnClick","mentionUserSearchQueryChange","addAttachments","removeAttachment","removeLinkPreview","contentPaste"],["chatMessageInput","chatMessageInput","chatMessageEmojiPicker","t5sEmojiPicker"],[4,"ngIf","ngIfElse"],["messageBlock",""],[3,"text"],["t5sEmojiPicker","",3,"t5sBottomSheetOverlay","bottomSheetOverlayDisableActiveIndication","emojiPickerOpenActivityId","activeUserId","user","activities","isInsideDialog","lastActivityDate","userAvatarClick","reactionClick","deleteClick","pickerClick","emojiPicked","attachmentClick","openBlabDef","openBlabItem"],["emojiPicker","t5sEmojiPicker"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"t5s-dropzone-template",0),e.NdJ("fileDrop",function(l){return i.addAttachments(l)}),e.TgZ(1,"div")(2,"div",1),e.NdJ("scrollUpTrigger",function(){return i.loadM
1oreActivities()}),e.YNc(3,b0,4,2,"ng-container",2),e.qZA(),e.TgZ(4,"div")(5,"t5s-chat-message-input",3,4),e.NdJ("valueChange",function(l){return i.newMessageContentChange(l)})("pickerClick",function(l){e.CHM(o);const d=e.MAs(7);return e.KtG(d.show(l))})("emojiPicked",function(l){e.CHM(o);const d=e.MAs(6);return e.KtG(d.insertText(l.emoji))})("sendBtnClick",function(l){return i.postChatMessage(l.value)})("mentionUserSearchQueryChange",function(l){return i.mentionUserSearchQueryChange(l)})("addAttachments",function(l){return i.addAttachments(l)})("removeAttachment",function(l){return i.removeAttachment(l)})("removeLinkPreview",function(){return i.removeLinkPreview()})("contentPaste",function(){return i.contentPasted()}),e.qZA()()()()}if(2&t){const o=e.MAs(7);e.Tol(i.dropzoneClass),e.Udp("width",100,"%")("height",100,"%"),e.Q6J("text",i.I18n.translate(i.i18n,i.I18n.key.dropzoneLabel)),e.xp6(1),e.Tol(i.conversationBodyClass),e.xp6(1),e.Tol(i.scrollContainerClass),e.xp6(1),e.Q6J("ngForOf",i.chatActivityItems)("ngForTrackBy",i.trackClusterItem),e.xp6(2),e.Q6J("disabled",!i.newMessageCanSend)("attachments",i.newMessageAttachments)("linkPreview",i.newMessageLinkPreview)("loadingLinkPreviewUrl",i.newMessageLoadingLinkPreviewUrl)("value",i.newMessageContent)("t5sBottomSheetOverlay",o.sheetContent)("bottomSheetOverlayDisableActiveIndication",!0)("mentionUserSearchResults",i.mentionUserSearchResults)}},dependencies:[gs.U,Gr.L,sC.s,rC.U,lC.S,u.sg,u.O5,$c.m,cC.Q,Oi,Go,m0.N,Jc.J,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})};function C0(a,n){if(1&a&&e._UZ(0,"t5s-icon-14px",8),2&a){const t=e.oxw(2).ngIf;e.Q6J("icon",null==t||null==t.user||null==t.user.status?null:t.user.status.emoji)}}function v0(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e._UZ(2,"t5s-user-status-indicator-15px",6),e.TgZ(3,"t5s-single-line-text-darker-11px"),e._uU(4),e.qZA(),e.YNc(5,C0,1,1,"t5s-icon-14px",7),e.TgZ(6,"t5s-single-line-text-darker-11px"),e._uU(7),e.qZA()(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.dialogPartnerInfoClass),e.xp6(1),e.Q6J("status",null==t||null==t.user||null==t.user.status?null:t.user.status.presence)("doNotDisturb",null==t||null==t.user||null==t.user.status?null:t.user.status.doNotDisturb),e.xp6(2),e.Oqu(i.getUserStatusLabel(null==t||null==t.user?null:t.user.status)),e.xp6(1),e.Q6J("ngIf",null==t||null==t.user||null==t.user.status?null:t.user.status.emoji),e.xp6(2),e.hij(" ",null==t||null==t.user||null==t.user.status?null:t.user.status.note," ")}}function I0(a,n){if(1&a&&(e.ynx(0),e.YNc(1,v0,8,7,"ng-container",3),e.BQk()),2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngIf",(null==t?null:t.type)===i.ConversationType.DIALOG)}}function y0(a,n){if(1&a){const t=e.EpF();e.ynx(0,9),e.TgZ(1,"t5s-primary-icon-button-20px",10),e.NdJ("btnClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.startVideoCall(s))}),e.qZA(),e.TgZ(2,"t5s-primary-icon-button-20px",11),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.handleInfoButtonClick(s))}),e.qZA(),e._UZ(3,"t5s-user-sidebar-close-button",12),e.BQk()}if(2&a){const t=e.oxw();e.xp6(1),e.Tol(t.callBtnClass),e.Q6J("icon",t.Icons.call.name)("t5sTooltip",t.I18n.translate(t.i18n,t.I18n.key.conversation.callBtnTooltip)),e.xp6(1),e.Q6J("icon",t.Icons.info.name)("t5sTooltip",t.I18n.translate(t.i18n,t.I18n.key.conversation.infoBtnTooltip)),e.xp6(1),e.Q6J("t5sTooltip",t.I18n.translate(t.i18n,t.I18n.key.conversation.closeBtnTooltip))}}ol=(0,Ot.gn)([(0,oi.c)(),(0,Ot.w6)("design:paramtypes",[g.yh,_.eX])],ol);class Is extends hn.R{constructor(n,t){super(),this.store$=n,this.activeUser$=t,this.ConversationType=A.i1$,this.Icons=pe.PJ,this.i18n=(0,Zt.mu)(),this.I18n=Me,this.infoContainerClass=(0,x.I)({...c.i3}),this.dialogPartnerInfoClass=(0,x.I)({...c.xI,...c.QP," > :nth-child(2)":{marginRight:(0,c.px)(9)}," > :nth-child(3)":{marginRight:(0,c.px)(3)}}),this.callBtnClass=(0,x.I)({paddingRight:(0,c.px)(13)}),this.chatActivityItems$=n.select(qb),this.conversation$=n.select(Qo),this.activeUserId$=n.select(vt.Ux),this.newMessageContent$=n.select(U.AE),this.newMessageCanSend$=n.select(U.Qe),this.newMessageAttachments$=n.select(U.Le),this.newMessageLinkPreview$=n.select(U.PO),this.newMessageLoadingLinkPreviewUrl$=n.select(U.OH),this.mentionUserSearchResults$=n.select(U.yN),this.conversationTitle$=this.conversation$.pipe((0,p.U)(i=>i?i.type===A.i1$.DIALOG?i.user?.primaryName:i.name:"")),this.hold(this.conversation$.pipe((0,z.M3)(),(0,p.U)(i=>i.conversationId),(0,z.M3)(),(0,w.x)()),i=>
1{i&&this.store$.dispatch(U.Xo.subscribe({conversationId:i}))})}startVideoCall({conversationId:n}){this.store$.dispatch(U.Ns.startChatVideoCall({conversationId:n}))}handleBackButtonClick(){this.store$.dispatch(us())}handleInfoButtonClick({conversationId:n}){this.store$.dispatch((({conversationId:a})=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"conversation-info",params:{[Dt.CHAT_CONVERSATION_ID]:a}}}))({conversationId:n}))}getUserStatusLabel(n){return Oc(this.i18n,n)}ngOnDestroy(){super.ngOnDestroy(),this.store$.dispatch(U.Xo.unsubscribe())}static#e=this.\u0275fac=function(t){return new(t||Is)(e.Y36(g.yh),e.Y36(oC.Z))};static#t=this.\u0275cmp=e.Xpm({type:Is,selectors:[["t5s-sidebar-conversation"]],features:[e._Bn([{provide:tC.G,useFactory:(n,t,i)=>(0,V.aj)([n.select(Pt.vg),n.select(Pt.mF),n.select(Pt.rP),n.select(Pt.iL),t,i]).pipe((0,p.U)(([{blabDefs:o,workspaces:s,organization:l,users:d},h,m,C,S,f])=>{const E=new Map(h.map(G=>[G.id,G])),Z=new Map(C.map(G=>[G.id,G])),R=new Map;for(const G of m){const F=R.get(G.blabItemId)??{};F[G.flimDefId]=G,R.set(G.blabItemId,F)}return{users:d,blabDefs:o,workspaces:s,blabItems:h,flimVals:m,flimDefs:C,blabItemsById:E,flimDefsById:Z,flimValsByBlabItemId:R,resolveBlabDefHref:l?(G,F)=>S((0,iC.Lx)(G,{workspaces:s,organization:l}),void 0,F):void 0,resolveBlabItemHref:f}}),(0,Y.d)({bufferSize:1,refCount:!0})),deps:[g.yh,nC.s,Uc.O]}]),e.qOj],decls:23,vars:46,consts:[["user-sidebar-header",""],["header-start",""],["data-cy","t5s-wc-usi-chat-conversation-back-btn",3,"t5sTooltip","click"],[4,"ngIf"],["header-end","",4,"ngIf"],["user-sidebar-body","",3,"chatActivityItems","activeUserId","activeUser","conversation","newMessageContent","newMessageCanSend","mentionUserSearchResults","newMessageAttachments","newMessageLinkPreview","newMessageLoadingLinkPreviewUrl"],[3,"status","doNotDisturb"],[3,"icon",4,"ngIf"],[3,"icon"],["header-end",""],[3,"icon","t5sTooltip","btnClick"],["data-cy","t5s-chat-conversation-info-btn",3,"icon","t5sTooltip","click"],["t5sUserSidebarClose","",3,"t5sTooltip"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"t5s-user-sidebar-back-button",2),e.NdJ("click",function(){return i.handleBackButtonClick()}),e.qZA(),e.TgZ(4,"div")(5,"t5s-single-line-bold-text-16px"),e._uU(6),e.ALo(7,"push"),e.qZA(),e.YNc(8,I0,2,1,"ng-container",3),e.ALo(9,"push"),e.qZA(),e.BQk(),e.YNc(10,y0,4,7,"ng-container",4),e.ALo(11,"push"),e.qZA(),e._UZ(12,"t5s-sidebar-conversation-body",5),e.ALo(13,"push"),e.ALo(14,"push"),e.ALo(15,"push"),e.ALo(16,"push"),e.ALo(17,"push"),e.ALo(18,"push"),e.ALo(19,"push"),e.ALo(20,"push"),e.ALo(21,"push"),e.ALo(22,"push"),e.qZA()),2&t&&(e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.conversation.backBtnTooltip)),e.xp6(1),e.Tol(i.infoContainerClass),e.xp6(2),e.Oqu(e.lcZ(7,20,i.conversationTitle$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(9,22,i.conversation$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(11,24,i.conversation$)),e.xp6(2),e.Q6J("chatActivityItems",e.lcZ(13,26,i.chatActivityItems$))("activeUserId",e.lcZ(14,28,i.activeUserId$))("activeUser",e.lcZ(15,30,i.activeUser$))("conversation",e.lcZ(16,32,i.conversation$))("newMessageContent",e.lcZ(17,34,i.newMessageContent$))("newMessageCanSend",e.lcZ(18,36,i.newMessageCanSend$))("mentionUserSearchResults",e.lcZ(19,38,i.mentionUserSearchResults$))("newMessageAttachments",e.lcZ(20,40,i.newMessageAttachments$))("newMessageLinkPreview",e.lcZ(21,42,i.newMessageLinkPreview$))("newMessageLoadingLinkPreviewUrl",e.lcZ(22,44,i.newMessageLoadingLinkPreviewUrl$)))},dependencies:[Gt.Q,u.O5,Rc.s,Rr.Z,jr.b,Le.h,Jt,Ht,Vt,Xe,et,Pc.c,ol,we.f],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var Hc=r(69156),Vc=r(86757),al=r(33079),k0=r(44571),w0=r(40606),ys=r(28093),Wc=r(24985);function S0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-back-button",6),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.handleBackClick(s))}),e.qZA(),e.TgZ(2,"t5s-bold-text-16px"),e._uU(3),e.qZA(),e.BQk()}if(2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.conversation.backBtnTooltip)),e.xp6(2),e.Oqu(i.getHeadline(t))}}function T0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"div")(2,"t5s-chat-group-thumbnail-upload",10),e.NdJ("filePick",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.filePicked(o.file,s))}),e.ALo(3,"async"),e.qZA(),e.TgZ(4,"t5s-input-31px",11),e.NdJ("inputBlur",function(o){e.CHM(t);const s=e.oxw().ngIf,l=e.oxw();return e.KtG(l.updateGroupName(o,s))}),e.qZA()(),e._UZ(5,"t5s-divider-light-9px"),e.TgZ(6,"t5s-single-line-black-text-16px"),e._uU(7),e.qZA(),e._UZ(8,"t5s-divider-light-1px"),e.BQk()}if(2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.groupDetailClass),e.xp6(1),e.Q6J("fullImgUrl",e.lcZ(3,15,i.groupLogo$)),e.xp6(2),e.Q6J("placeholder",i.I18n.translate(i.i18n,i.I18n.key.newGroup.groupNamePlaceholder))("textAlign","center")("value",null==t?null:t.name),e.xp6(2),e.Udp("padding-left",11,"px")("padding-right",13,"px")("padding-top",9,"px")("padding-bottom",9,"px"),e.xp6(1),e.hij(" ",i.I18
1n.translate(i.i18n,i.I18n.key.conversationInfo.memberHeader)," ")}}function A0(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-chat-user-profile",12,13),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(1),e.Udp("pointer-events","none")("cursor","default"),e.Q6J("user",null==t?null:t.user)}}function U0(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-chat-user-profile",12),e.BQk()),2&a){const t=n.$implicit;e.xp6(1),e.Udp("pointer-events","none")("cursor","default"),e.Q6J("user",t)}}function O0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-text-primary-menu-item",14),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw().ngIf,s=e.oxw();return e.KtG(s.handleAddUsersClick(o))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("text",t.I18n.translate(t.i18n,t.I18n.key.conversationInfo.addMember))("textAlign","center")}}function E0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-text-danger-menu-item",15),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.confirmLeaveCurrentConversation())}),e.qZA(),e._UZ(2,"t5s-divider-light-1px"),e.BQk()}if(2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("text",t.I18n.translate(t.i18n,t.I18n.key.conversationInfo.leaveGroup))("textAlign","center")}}function D0(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",7),e.YNc(1,T0,9,17,"ng-container",2),e.YNc(2,A0,3,5,"ng-container",2),e.TgZ(3,"div"),e.YNc(4,U0,2,5,"ng-container",8),e.YNc(5,O0,2,2,"ng-container",2),e._UZ(6,"t5s-divider-light-9px"),e.TgZ(7,"t5s-single-line-black-text-16px"),e._uU(8),e.qZA(),e._UZ(9,"t5s-divider-light-1px"),e.TgZ(10,"t5s-text-primary-menu-item",9),e.NdJ("menuItemClick",function(){const s=e.CHM(t).ngIf,l=e.oxw();return e.KtG(l.toggleMute(s))}),e.qZA(),e._UZ(11,"t5s-divider-light-1px"),e.YNc(12,E0,3,2,"ng-container",2),e.qZA()()}if(2&a){const t=n.ngIf,i=e.oxw();e.Tol(i.bodyContainerClass),e.xp6(1),e.Q6J("ngIf",(null==t?null:t.type)===i.ConversationType.GROUP),e.xp6(1),e.Q6J("ngIf",(null==t?null:t.type)===i.ConversationType.DIALOG),e.xp6(1),e.Tol(i.membersContainerClass),e.xp6(1),e.Q6J("ngForOf",null==t?null:t.members)("ngForTrackBy",i.trackById),e.xp6(1),e.Q6J("ngIf",(null==t?null:t.type)===i.ConversationType.GROUP),e.xp6(2),e.Udp("padding-left",11,"px")("padding-right",13,"px")("padding-top",9,"px")("padding-bottom",9,"px"),e.xp6(1),e.hij(" ",i.I18n.translate(i.i18n,i.I18n.key.conversationInfo.settingsHeader)," "),e.xp6(2),e.Q6J("text",i.getNotificationMuteString(null==t?null:t.type,null==t?null:t.mutedByUser))("textAlign","center")("hoverPrimary",!0),e.xp6(2),e.Q6J("ngIf",(null==t?null:t.type)===i.ConversationType.GROUP)}}class ks{constructor(n){this.store$=n,this.i18n=(0,Zt.mu)(),this.I18n=Me,this.ConversationType=A.i1$,this.Icons=pe.PJ,this.trackById=yt.xn,this.groupDetailClass=(0,x.I)({...c.yD,...c.i3,...c.QP,padding:(0,c.o3)(15,12,17,15),"> :not(:last-child)":{marginBottom:(0,c.px)(17)}}),this.bodyContainerClass=(0,x.I)({...c.i3,...c.p4}),this.membersContainerClass=(0,x.I)({overflowY:"auto",flex:1}),this.conversation$=n.select(Qo),this.groupLogo$=this.conversation$.pipe((0,z.M3)(),(0,p.U)(({thumbnail:t})=>t?.medium))}getHeadline(n){return this.I18n.translate(this.i18n,n?.type===A.i1$.GROUP?this.I18n.key.header.titles.groupInfo:this.I18n.key.header.titles.directMessageInfo)}confirmLeaveCurrentConversation(){this.store$.dispatch(Ze.confirmLeaveCurrentConversation())}closeRightSidebar(){this.store$.dispatch((0,De.lh)())}toggleMute({conversationId:n,mutedByUser:t}){this.store$.dispatch(t?U.qx.unmute({conversationId:n}):U.qx.mute({conversationId:n}))}filePicked(n,{conversationId:t}){this.store$.dispatch(U.nh.updateInfo({input:{conversationId:t},logo:n}))}updateGroupName(n,{conversationId:t}){this.store$.dispatch(U.nh.updateInfo({input:{conversationId:t,name:n}}))}getNotificationMuteString(n,t){switch(n){case A.i1$.GROUP:return this.I18n.translate(this.i18n,t?this.I18n.key.conversationInfo.unmuteGroupConversation:this.I18n.key.conversationInfo.muteGroupConversation);case A.i1$.DIALOG:return this.I18n.translate(this.i18n,t?this.I18n.key.conversationInfo.unmuteDialogConversation:this.I18n.key.conversationInfo.muteDialogConversation)}}
1handleAddUsersClick(n){this.store$.dispatch((({conversationId:a})=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"conversation/add-users",params:{[Dt.CHAT_CONVERSATION_ID]:a}}}))(n))}userClicked(n){}handleBackClick(n){this.store$.dispatch(Vr({conversationId:n.conversationId}))}static#e=this.\u0275fac=function(t){return new(t||ks)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:ks,selectors:[["t5s-conversation-info"]],decls:9,vars:11,consts:[["user-sidebar-header",""],["header-start",""],[4,"ngIf"],["header-end",""],["t5sUserSidebarClose","",3,"t5sTooltip"],["user-sidebar-body","",3,"class",4,"ngIf"],[3,"t5sTooltip","click"],["user-sidebar-body",""],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"text","textAlign","hoverPrimary","menuItemClick"],[3,"fullImgUrl","filePick"],["data-cy","t5s-sidebar-chat-group-name-input",3,"placeholder","textAlign","value","inputBlur"],["data-cy","t5s-chat-group-single-member-btn",3,"user"],["chatUserProfile","chatUserProfile"],["data-cy","t5s-chat-group-add-members-btn",3,"text","textAlign","menuItemClick"],["data-cy","t5s-chat-leave-conversation-btn",3,"text","textAlign","menuItemClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.YNc(3,S0,4,2,"ng-container",2),e.ALo(4,"async"),e.BQk(),e.ynx(5,3),e._UZ(6,"t5s-user-sidebar-close-button",4),e.BQk(),e.qZA(),e.YNc(7,D0,13,22,"div",5),e.ALo(8,"async"),e.qZA()),2&t&&(e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("ngIf",e.lcZ(4,7,i.conversation$)),e.xp6(3),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.conversation.closeBtnTooltip)),e.xp6(1),e.Q6J("ngIf",e.lcZ(8,9,i.conversation$)))},dependencies:[u.sg,u.O5,Hc.t,Vc.i,Nn.J,di.o,al.a,k0.O,w0.h,Le.h,Jt,Ht,Vt,Xe,et,ys.O,Wc.t,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}const M0=new jt.U({[A.SQ0.DE]:{chatTabTitle:"Chat",conversationsOverview:{noConversationsPlaceholder:{title:"Unterhalte dich privat mit anderen",text:"Chatnachrichten sind private Unterhaltungen zwischen dir und anderen Personen auf Tape."},closeBtnTooltip:"Schlie\xdfen",newMessageBtnTooltip:"Neue Nachricht"}},[A.SQ0.EN]:{chatTabTitle:"Chat",conversationsOverview:{noConversationsPlaceholder:{title:"Send a message, get a message",text:"Chat messages are private conversations between you and other people on Tape."},closeBtnTooltip:"Close",newMessageBtnTooltip:"New message"}},[A.SQ0.PT_BR]:{chatTabTitle:"Chat",conversationsOverview:{noConversationsPlaceholder:{title:"Envie uma mensagem, receba uma mensagem",text:"As mensagens do chat s\xe3o conversas privadas entre voc\xea e outras pessoas no Tape."},closeBtnTooltip:"Fechar",newMessageBtnTooltip:"Nova mensagem"}}}),rt=new _s.oc({[A.SQ0.DE]:{conversationCreated:"Gruppe wurde erstellt.",groupNameChanged:"{{userName}} hat den Gruppennamen auf {{groupName}} ge\xe4ndert.",groupThumbnailChanged:"{{userName}} hat das Gruppenfoto ge\xe4ndert.",messageOnlyAttachments:"{{userName}} hat einen Anhang gesendet.",messageOnlyLinkPreview:"{{userName}} hat einen Link geteilt.",userJoined:"{{userName}} hat {{targetUser}} hinzugef\xfcgt.",userLeft:"{{userName}} hat die Gruppe verlassen.",videoCallStarted:"{{userName}} hat einen Video-Anruf gestartet.",retrySendingLinkLabel:"Konnte nicht gesendet werden"},[A.SQ0.EN]:{conversationCreated:"Group was created.",groupNameChanged:"{{userName}} changed the group name to {{groupName}}.",groupThumbnailChanged:"{{userName}} changed the group photo.",messageOnlyAttachments:"{{userName}} added an attachment.",messageOnlyLinkPreview:"{{userName}} sent a link.",userJoined:"{{userName}} added {{targetUser}}.",userLeft:"{{userName}} left the group.",videoCallStarted:"{{userName}} started a video call.",retrySendingLinkLabel:"Couldn\u2019t send. Tap to try again"},[A.SQ0.PT_BR]:{conversationCreated:"Grupo foi criado.",groupNameChanged:"{{userName}} alterou o nome do grupo para {{groupName}}.",groupThumbnailChanged:"{{userName}} alterou a foto do grupo.",messageOnlyAttachments:"{{userName}} adicionou um anexo.",messageOnlyLinkPreview:"{{userName}} enviou um link.",userJoined:"{{userName}} adicionou {{targetUser}}.",userLeft:"{{userName}} saiu do grupo.",videoCallStarted:"{{userName}} iniciou uma videochamada.",retrySendingLinkLabel:"N\xe3o foi poss\xedvel enviar. Toque para tentar novamente"}});var N0=r(67983),R0=r(11831);function P0(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-avatar",4),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Q6J("state",i.getAvatarState(t))}}function $0(a,n){if(1&a&&e._UZ(0,"t5s-thumbnail",4),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Q6J("state",i.getThumbnailState(t))}}function z0(a,n){if(1&a&&e._UZ(0,"t5s-user-status-indicator",9),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Q6J("doNotDisturb",i.getDoNotDisturb(t))("status",i.getUserStatus(t))("size",t.statusIndicatorSize)}}function Q0(a,n){if(1&a&&e._UZ(0,"t5s-badge",4),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Q6J("state",i.getBadgeState(t))}}function F0(a,n){if(1&a&&e._UZ(0,"t5s-icon",4),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Q6J("state",i.getDndIconState(t))}}function G0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"a",1),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.conversationClick$$.next(!0))}),e.TgZ(2,"div"),e.YNc(3,P0,2,1,"ng-container",2),e.YNc(4,$0,1,1,"ng-template",null,3,e.W1O),e.qZA(),e.TgZ(6,"div")(7,"div"),e._UZ(8,"t5s-text",4),e.YNc(9,z0,1,3,"t5s-user-status-indicator",5),e.qZA(),e.TgZ(10,"div"),e._UZ(11,"div",6),e.qZA()(),e.TgZ(12,"div"),e._UZ(13,"t5s-text",7),e.TgZ(14,"div"),e.YNc(15,Q0,1,1,"t5s-badge",8),e.YNc(16,F0,1,1,"t5s-icon",8),e.qZA()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(5),o=e.oxw();e.xp6(1),e.Tol(o.getContainerClass(t)),e.xp6(1),e.Tol(o.thumbnailClass),e.xp6(1),e.Q6J("ngIf",t.conversation.type===o.ConversationType.DIALOG)("ngIfElse",i),e.xp6(3),e.Tol(o.mainClass),e.xp6(1),e.Tol(o.titleClass),e.xp6(1),e.Q6J("state",o.getTitleState(t)),e.xp6(1),e.Q6J("ngIf",o.isDialog(t)),e.xp6(2),e.Tol(o.getChatActivityPreviewTextClass(t)),e.Q6J("innerHTML",o.getChatActivityTextPreviewState(t).htmlContent,e.oJD),e.xp6(1),e.Tol(o.metaInfoContainerClass),e.xp6(1),e.Q6J("t5sTooltip",o.getDateTextTooltip(t))("tooltipOffset",-2)("state",o.getDateTextState(t)),e.xp6(1),e.Tol(o.symbolsContainerClass),e.xp6(1),e.Q6J("ngIf",o.isUnread(t)),e.xp6(1),e.Q6J("ngIf",o.isMuted(t))}}class Jo extends v.wB{constructor(n,t,i){super(),this.conversationClick$$=new mt.xQ,this.ConversationType=A.i1$,this.thumbnailClass=(0,x.I)({gridColumn:1}),this.mainClass=(0,x.I)({gridColumn:2}),this.metaInfoContainerClass=(0,x.I)({display:"flex",alignItems:"flex-end",flexDirection:"column",gridRow:1,gridColumn:3,minWidth:(0,c.px)(26)}),this.symbolsContainerClass=(0,x.I)({...c.QP,flexDirection:"row-reverse"}),this.numUnreadActivitiesClass=(0,x.I)({alignItems:"flex-end"}),this.titleClass=(0,x.I)({display:"flex",flexDirection:"row"}),this.set({theme:n}),this.connect(t),this.set({avatarSize:43,badgeSize:20,baseFont:c.LZ["14px"],baseBoldFont:c.LZ["medium-14px"],hPadding:13,vPadding:14,statusIndicatorSize:17,gridGap:8,dndIconSize:18}),this.conversationClick=(0,mn.T)((0,Sr._O)(i.nativeElement,1e3).pipe((0,q.h)(o=>!!o)),this.conversationClick$$.asObservable())}set state(n){this.setState(n)}getChatActivityPreviewTextClass(n){return(0,x.I)({...c.yD,pointerEvents:"none",...c.Th,color:n.theme.color.darker65,marginTop:(0,c.px)(2)})}
1getDndIconState(n){return{size:n.dndIconSize,fgColor:n.theme.color.darker50,icon:pe.PJ.notificationsOff.name}}isDialog(n){return n.conversation?.type===A.i1$.DIALOG}getDoNotDisturb(n){return n.conversation?.user?.status?.doNotDisturb}getUserStatus(n){return n.conversation?.user?.status?.presence}isGroup(n){return n.conversation?.type===A.i1$.GROUP}getBadgeState(n){return{...me.Ly,bgColor:n.theme.color.primary,fgColor:n.theme.color.lightest,count:this.getNumUnreadActivitiies(n),maxCount:999,margin:(0,c.e6)(0,0,0,4),fontSize:n.baseFont.fontSize,size:n.badgeSize}}getThumbnailState(n){return{size:n.avatarSize,fullImgUrl:this.getThumbnail(n),fallbackGraphic:this.getFallbackGraphic(n)}}getAvatarState(n){const t=n.conversation?.user;return{size:n.avatarSize,user:t,fullImgUrl:t?.profilePicture?.small?t?.profilePicture?.small+"?component=sidebar-conversation-preview":void 0}}getDateTextState(n){return{fgColor:n.theme.color.darker65,maxHeight:"single-line",fontSet:c.LZ["12px"],margin:(0,c.e6)(1,0,4,0),text:v.eM.formatDeltaDateTime(n,n.conversation?.lastChatActivity?.createdAt)}}getDateTextTooltip(n){return v.eM.formatFullDateTime(n,n.conversation?.lastChatActivity?.createdAt)}getChatActivityTextPreviewState(n){return{htmlContent:(0,Gc._)(this.getChatActivityTextPreview(n)||"")}}getChatActivityTextPreview(n){const{conversation:t}=n;return t?function L0(a,n){if(!n)return"";const{lastChatActivity:t}=n;if(!t?.type)return"";switch(t?.type){case A.Z$b.CONVERSATION_CREATED:return rt.translate(a,rt.key.conversationCreated);case A.Z$b.GROUP_NAME_CHANGED:return rt.translate(a,{key:rt.key.groupNameChanged,params:{userName:t?.user?.primaryName||"",groupName:t.content}});case A.Z$b.GROUP_THUMBNAIL_CHANGED:return rt.translate(a,{key:rt.key.groupThumbnailChanged,params:{userName:t?.user?.primaryName||""}});case A.Z$b.MESSAGE:{const i=t,o=i?.unformatted;return o||rt.translate(a,(i.attachments?.length??0)>0?{key:rt.key.messageOnlyAttachments,params:{userName:t?.user?.primaryName||""}}:{key:rt.key.messageOnlyLinkPreview,params:{userName:t?.user?.primaryName||""}})}case A.Z$b.USER_JOINED:return rt.translate(a,{key:rt.key.userJoined,params:{userName:t?.user?.primaryName||"",targetUser:t?.targetUser?.primaryName||""}});case A.Z$b.USER_LEFT:return rt.translate(a,{key:rt.key.userLeft,params:{userName:t?.user?.primaryName||""}});case A.Z$b.VIDEO_CALL:return rt.translate(a,{key:rt.key.videoCallStarted,params:{userName:t?.user?.primaryName||""}})}}(n,t):void 0}getThumbnail(n){return n.conversation?.user?.profilePicture?.medium||n.conversation?.thumbnail?.medium}getFallbackGraphic(n){switch(n.conversation?.type){case A.i1$.DIALOG:return pe.TC.userAvatar.name;case A.i1$.GROUP:return pe.TC.groupAvatar.name}}getTitleState(n){return{fontSet:n.baseBoldFont,text:n.conversation?.user?.primaryName||n.conversation?.name}}getContainerClass(n){return(0,x.I)({display:"grid",gridTemplateColumns:[(0,c.px)(n.avatarSize),(0,c.WF)("0",(0,c.fr)(1))].join(" "),fontSize:(0,c.px)(14),lineHeight:(0,c.px)(18),gridGap:(0,c.px)(n.gridGap),paddingTop:(0,c.px)(n.vPadding),paddingRight:(0,c.px)(n.hPadding),paddingBottom:(0,c.px)(n.vPadding),paddingLeft:(0,c.px)(n.hPadding),cursor:"pointer",color:n.theme.color.darkest,backgroundColor:this.isUnread(n)?(0,c.m4)(n.theme.color.primary,.07):n.theme.color.lightest,borderBottom:(0,c.Cg)(1,"solid",n.theme.color.darker9),...(0,c.Mr)({backgroundColor:n.theme.color.darker6}),...(0,c.bB)({backgroundColor:n.theme.color.darker16})})}getNumUnreadActivitiies(n){return n.conversation?.numUnreadActivities||0}isUnread(n){return this.getNumUnreadActivitiies(n)>0}isMuted(n){return n.conversation?.mutedByUser||!1}static#e=this.\u0275fac=function(t){return new(t||Jo)(e.Y36(c.Q2),e.Y36(ut.e7),e.Y36(e.SBq))};static#t=this.\u0275cmp=e.Xpm({type:Jo,selectors:[["t5s-conversation-preview"]],inputs:{state:"state"},outputs:{conversationClick:"conversationClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"click"],[4,"ngIf","ngIfElse"],["groupThumbnail",""],[3,"state"],[3,"doNotDisturb","status","size",4,"ngIf"],[3,"innerHTML"],[3,"t5sTooltip","tooltipOffset","state"],[3,"state",4,"ngIf"],[3,"doNotDisturb","status","size"]],template:function(t,i){1&t&&(e.YNc(0,G0,17,24,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.O5,N0.F,Mn.o,Qc.T,Xr.Z,_c.A,Le.h,R0.l,u.Ov],encapsulation:2,changeDetection:0})}class Ho{constructor(){this.conversationClick=new e.vpe}get state(){return{conversation:this.conversation}}static#e=this.\u0275fac=function(t){return new(t||Ho)};static#t=this.\u0275cmp=e.Xpm({type:Ho,selectors:[["t5s-wc-conversation-preview"]],inputs:{conversation:"conversation"},outputs:{conversationClick:"conversationClick"},decls:1,vars:1,consts:[[3,"state","conversationClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-conversation-preview",0),e.NdJ("conversationClick",function(s){return i.conversationClick.emit(s)}),e.qZA()),2&t&&e.Q6J("state",i.state)},dependencies:[Jo],encapsulation:2,changeDetection:0})}function J0(a,n){1&a&&(e.ynx(0),e._UZ(1,"t5s-loading-spinner-26px-top"),e.BQk())}function H0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-wc-conversation-preview",11),e.NdJ("conversationClick",function(){const s=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.conversationClick.emit({conversation:s}))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Q6J("conversation",t)}}function V0(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-placeholder-top-v2",12),e.BQk()),2&a){const t=e.oxw(2).ngIf,i=e.oxw();e.xp6(1),e.Udp("width",100,"%")("height",100,"%"),e.Q6J("title",i.I18
1n.translate(t,i.I18n.key.conversationsOverview.noConversationsPlaceholder.title))("subtitle",i.I18n.translate(t,i.I18n.key.conversationsOverview.noConversationsPlaceholder.text))}}function W0(a,n){if(1&a&&(e.YNc(0,H0,2,1,"ng-container",10),e.YNc(1,V0,2,6,"ng-container",0)),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Q6J("ngForOf",t.conversations)("ngForTrackBy",i.trackByConversationId),e.xp6(1),e.Q6J("ngIf",!(null!=t.conversations&&t.conversations.length))}}function Y0(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-content-template")(2,"t5s-user-sidebar-header-template",1),e.ynx(3,2),e.TgZ(4,"t5s-bold-text-16px"),e._uU(5),e.qZA(),e.BQk(),e.ynx(6,3),e.TgZ(7,"t5s-flex-row",4)(8,"t5s-primary-icon-button-20px",5),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.newMessageClick.emit())}),e.qZA(),e.TgZ(9,"t5s-primary-icon-button-20px",6),e.NdJ("btnClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.closeClick.emit(o))}),e.qZA()(),e.BQk(),e.qZA(),e.TgZ(10,"div",7),e.YNc(11,J0,2,0,"ng-container",8),e.YNc(12,W0,2,3,"ng-template",null,9,e.W1O),e.qZA()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(13),o=e.oxw();e.xp6(1),e.Udp("width",100,"%")("height",100,"%"),e.xp6(4),e.hij(" ",o.I18n.translate(t,o.I18n.key.chatTabTitle)," "),e.xp6(3),e.Q6J("t5sTooltip",o.I18n.translate(t,o.I18n.key.conversationsOverview.newMessageBtnTooltip))("icon",o.Icons.newMessage.name),e.xp6(1),e.Q6J("icon",o.Icons.closeLarge.name)("t5sTooltip",o.I18n.translate(t,o.I18n.key.conversationsOverview.closeBtnTooltip)),e.xp6(2),e.Q6J("ngIf",t.isLoading)("ngIfElse",i)}}class Mi extends v.Y4{constructor(){super(...arguments),this.I18n=M0,this.trackByConversationId=yt.p9,this.closeClick=new e.vpe,this.newMessageClick=new e.vpe,this.conversationClick=new e.vpe}set isLoading(n){this.set({isLoading:n})}set conversations(n){this.set({conversations:n})}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Mi)))(i||Mi)}}();static#t=this.\u0275cmp=e.Xpm({type:Mi,selectors:[["t5s-user-sidebar-chat-conversations-overview-view"]],inputs:{isLoading:"isLoading",conversations:"conversations"},outputs:{closeClick:"closeClick",newMessageClick:"newMessageClick",conversationClick:"conversationClick"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["user-sidebar-header",""],["header-start",""],["header-end",""],["gap","13","centered","true"],["data-cy","t5s-sidebar-chat-new-msg-btn",3,"t5sTooltip","icon","btnClick"],["data-cy","t5s-user-sidebar-chat-conversations-overview-close-btn",3,"icon","t5sTooltip","btnClick"],["user-sidebar-body","","t5sVerticalScroll",""],[4,"ngIf","ngIfElse"],["notLoading",""],[4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","t5s-conversation-list-single-preview-btn",3,"conversation","conversationClick"],[3,"title","subtitle"]],template:function(t,i){1&t&&(e.YNc(0,Y0,14,11,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,Gt.Q,Nn.J,nn.D,Ho,Qr.b,Xe,et,Ro.$,Gr.L,Le.h,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}class ws{constructor(n){this.store$=n,this.Icons=pe.PJ,this.trackByConversationId=yt.p9,this.conversations$=n.select(U.FS),this.conversationsLoading$=n.select(U.Jx),this.store$.dispatch(U.qx.loadConversations()),this.store$.dispatch(U.qx.subscribe())}conversationClick({conversation:{conversationId:n}}){this.store$.dispatch(Ze.accessConversation({conversationId:n}))}newMessageClick(){this.store$.dispatch(Ec())}closeClick(){this.store$.dispatch((0,De.lh)())}static#e=this.\u0275fac=function(t){return new(t||ws)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:ws,selectors:[["t5s-conversations-overview"]],decls:3,vars:6,consts:[[3,"conversations","isLoading","newMessageClick","closeClick","conversationClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-chat-conversations-overview-view",0),e.NdJ("newMessageClick",function(){return i.newMessageClick()})("closeClick",function(){return i.closeClick()})("conversationClick",function(s){return i.conversationClick(s)}),e.ALo(1,"async"),e.ALo(2,"async"),e.qZA()),2&t&&e.Q6J("conversations",e.lcZ(1,2,i.conversations$))("isLoading",e.lcZ(2,4,i.conversationsLoading$))},dependencies:[Mi,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var K0=r(54787);function j0(a,n){if(1&a&&e._UZ(0,"t5s-icon-14px",9),2&a){const t=e.oxw().ngIf;e.Q6J("icon",null==t||null==t.status?null:t.status.emoji)}}function q0(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div")(2,"t5s-single-line-black-text-16px"),e._uU(3),e.qZA(),e.TgZ(4,"div"),e._UZ(5,"t5s-user-status-indicator-15px",7),e.TgZ(6,"t5s-single-line-text-darker-11px"),e._uU(7),e.qZA(),e.YNc(8,j0,1,1,"t5s-icon-14px",8),e.TgZ(9,"t5s-single-line-text-darker-11px"),e._uU(10),e.qZA()()(),e.BQk()),2&a){const t=n.ngIf,i=e.oxw();e.xp6(1),e.Tol(i.infoContainerClass),e.xp6(2),e.hij(" ",null==t?null:t.primaryName," "),e.xp6(1),e.Tol(i.dialogPartnerInfoClass),e.xp6(1),e.Q6J("status",null==t||null==t.status?null:t.status.presence)("doNotDisturb",null==t||null==t.status?null:t.status.doNotDisturb),e.xp6(2),e.Oqu(i.getUserStatusLabel(null==t?null:t.status)),e.xp6(1),e.Q6J("ngIf",null==t||null==t.status?null:t.status.emoji),e.xp6(2),e.hij(" ",null==t||null==t.status?null:t.status.note," ")}}function X0(a,n){if(1&a){const t=e.EpF();e.ynx(0,10),e.TgZ(1,"div")(2,"div")(3,"div")(4,"t5s-bold-text-16px",11),e._uU(5),e.qZA(),e.TgZ(6,"t5s-text-darker-13px",11),e._uU(7),e.qZA()()(),e.TgZ(8,"t5s-chat-message-input",12,13),e.NdJ("pickerClick",function(o){e.CHM(t);const s=e.MAs(10);return e.KtG(s.show(o))})("emojiPicked",function(o){e.CHM(t);const s=e.MAs(9);return e.KtG(s.insertText(o.emoji))})("valueChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.newMessageContentChange(o))})("sendBtnClick",function(o){const l=e.CHM(t).ngIf,d=e.oxw();return e.KtG(d.startDialogAndSendMessage(o.value,l))})("mentionUserSearchQueryChange",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.mentionUserSearchQueryChange(o))})("addAttachments",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.addAttachments(o))})("removeAttachment",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.removeAttachment(o))})("removeLinkPreview",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.removeLinkPreview())}),e.ALo(11,"async"),e.ALo(12,"async"),e.ALo(13,"async"),e.ALo(14,"async"),e.qZA()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(10),o=e.oxw();e.xp6(1),e.Tol(o.mainContainerClass),e.xp6(1),e.Tol(o.placeContainerHolderClass),e.xp6(2),e.Tol(o.titleClass),e.Q6J("centered",!0),e.xp6(1),e.Oqu(o.getPlaceholderTitle(t.primaryName)),e.xp6(1),e.Q6J("centered",!0),e.xp6(1),e.Oqu(o.I18n.translate(o.i18n,o.I18n.key.newDialog.placeholderText)),e.xp6(1),e.Q6J("t5sBottomSheetOverlay",i.sheetContent)("bottomSheetOverlayDisableActiveIndication",!0)("value",e.lcZ(11,16,o.newMessageContent$))("disabled",!1===e.lcZ(12,18,o.newMessageCanSend$))("attachments",e.lcZ(13,20,o.newMessageAttachments$))("mentionUserSearchResults",e.lcZ(14,22,o.mentionUserSearchResults$))}}class Ss extends hn.R{constructor(n,t){super(),this.store$=n,this.actions$=t,this.i18n=(0,Zt.mu)(),this.I18n=Me,this.mainContainerClass=(0,x.I)({...c.hw,...c.i3,justifyContent:"flex-end"}),this.placeContainerHolderClass=(0,x.I)({flex:1,...c.yD,...c.i3,justifyContent:"center",padding:(0,c.px)(13)}),this.titleClass=(0,x.I)({paddingBottom:(0,c.px)(9)}),this.infoContainerClass=(0,x.I)({...c.i3}),this.dialogPartnerInfoClass=(0,x.I)({...c.xI,...c.QP," > :nth-child(2)":{marginRight:(0,c.px)(9)}," > :nth-child(3)":{marginRight:(0,c.px)(3)}}),this.user$=n.select(U.DS),this.newMessageContent$=n.select(U.AE),this.newMessageCanSend$=n.select(U.Qe),this.newMessageAttachments$=n.select(U.Le),this.mentionUserSearchResults$=n.select(U.yN),n.dispatch(U.xx.clear());const i=this.store$.select(Mc);this.hold(i.pipe((0,z.M3)(),(0,be.q)(1)),o=>
1{this.store$.dispatch(U.UH.checkDialogExistance({userId:o})),o&&this.hold(this.actions$.pipe((0,_.l4)(U.UH.checkDialogExistanceResult),(0,p.U)(({chatDialog:s})=>!s||(this.store$.dispatch(Ze.accessConversation({conversationId:s.conversationId})),!1))))})}startDialogAndSendMessage(n,{id:t}){this.store$.dispatch(U.xx.startOrContinue({input:{userId:t,content:n}}))}newMessageContentChange(n){this.store$.dispatch(U.xx.upsertNewMessageContent({newMessageContent:n}))}mentionUserSearchQueryChange({query:n}){this.store$.dispatch(U.xx.mentionUserSearch({searchQuery:n}))}addAttachments({files:n}){this.store$.dispatch(U.xx.addAttachmentFiles({files:n}))}removeAttachment({attachment:n}){this.store$.dispatch(U.xx.removeAttachment({attachment:n}))}removeLinkPreview(){this.store$.dispatch(U.xx.removeLinkPreview())}handleBackClick(){this.store$.dispatch(us())}getUserStatusLabel(n){return Oc(this.i18n,n)}getPlaceholderTitle(n){return this.I18n.translate(this.i18n,{key:this.I18n.key.newDialog.placeholderTitle,params:{name:n}})}static#e=this.\u0275fac=function(t){return new(t||Ss)(e.Y36(g.yh),e.Y36(_.eX))};static#t=this.\u0275cmp=e.Xpm({type:Ss,selectors:[["t5s-new-chat-dialog"]],features:[e.qOj],decls:10,vars:12,consts:[["user-sidebar-header",""],["header-start",""],[3,"t5sTooltip","click"],[4,"ngIf"],["header-end",""],["t5sUserSidebarClose","",3,"t5sTooltip"],["user-sidebar-body","",4,"ngIf"],[3,"status","doNotDisturb"],[3,"icon",4,"ngIf"],[3,"icon"],["user-sidebar-body",""],[3,"centered"],["data-cy","t5s-wc-usi-chat-new-dialog-message-input","t5sAutofocus","","t5sEmojiPicker","",3,"t5sBottomSheetOverlay","bottomSheetOverlayDisableActiveIndication","value","disabled","attachments","mentionUserSearchResults","pickerClick","emojiPicked","valueChange","sendBtnClick","mentionUserSearchQueryChange","addAttachments","removeAttachment","removeLinkPreview"],["chatMessageInput","chatMessageInput","chatMessageEmojiPicker","t5sEmojiPicker"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"t5s-user-sidebar-back-button",2),e.NdJ("click",function(){return i.handleBackClick()}),e.qZA(),e.YNc(4,q0,11,10,"ng-container",3),e.ALo(5,"async"),e.BQk(),e.ynx(6,4),e._UZ(7,"t5s-user-sidebar-close-button",5),e.BQk(),e.qZA(),e.YNc(8,X0,15,24,"ng-container",6),e.ALo(9,"async"),e.qZA()),2&t&&(e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newDialog.backBtnTooltip)),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,8,i.user$)),e.xp6(3),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newDialog.closeBtnTooltip)),e.xp6(1),e.Q6J("ngIf",e.lcZ(9,10,i.user$)))},dependencies:[gs.U,u.O5,Rc.s,K0.O,Vc.i,Nn.J,jr.b,$c.m,Le.h,Jt,Ht,Vt,Xe,et,Go,Pc.c,Jc.J,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var Yc=r(41596);function ev(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-selectable-chat-user",14),e.NdJ("chatUserClick",function(){const s=e.CHM(t).$implicit,l=e.oxw(3);return e.KtG(l.selectUser(s))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Q6J("user",t)("selected",t.alreadySelected)}}function tv(a,n){if(1&a&&(e.ynx(0),e.YNc(1,ev,2,2,"ng-container",13),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackById)}}function nv(a,n){1&a&&(e.ynx(0),e._UZ(1,"t5s-loading-spinner-26px-top"),e.BQk())}function iv(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-button-placeholder-top",16),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.invitePeople())}),e.qZA()}if(2&a){const t=e.oxw(3);e.Q6J("title",t.I18n.translate(t.i18n,t.I18n.key.newMessage.noOrgUsersPlaceholder.title))("subtitle",t.I18n.translate(t.i18n,t.I18n.key.newMessage.noOrgUsersPlaceholder.subtitle))("buttonLabel",t.I18n.translate(t.i18n,t.I18n.key.newMessage.noOrgUsersPlaceholder.buttonLabel))}}function ov(a,n){if(1&a&&(e.YNc(0,nv,2,0,"ng-container",11),e.ALo(1,"async"),e.YNc(2,iv,1,3,"ng-template",null,15,e.W1O)),2&a){const t=e.MAs(3),i=e.oxw(2);e.Q6J("ngIf",e.lcZ(1,2,i.organizationUsersLoading$))("ngIfElse",t)}}function av(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div"),e.YNc(2,tv,2,2,"ng-container",11),e.YNc(3,ov,4,4,"ng-template",null,12,e.W1O),e.qZA(),e.BQk()),2&a){const t=n.ngIf,i=e.MAs(4),o=e.oxw();e.xp6(1),e.Tol(o.scrollContainerClass),e.xp6(1),e.Q6J("ngIf",t.length>0)("ngIfElse",i)}}class Ts{constructor(n,t){this.store$=n,this.theme=t,this.trackById=yt.xn,this.i18n=(0,Zt.mu)(),this.I18n=Me,this.bodyContainer=(0,x.I)({...c.p4,...c.i3,justifyContent:"space-between"}),this.searchContainerClass=(0,x.I)({...c.yD}),this.scrollContainerClass=(0,x.I)({overflowY:"auto",flex:1}),this.footerButtonClass=(0,x.I)({height:Br.Mz,...c.xI,justifyContent:"flex-end",padding:(0,c.o3)(10,13),borderTop:(0,c.Cg)(1,"solid",this.theme.color.light)}),this.footerSpacer=(0,x.I)({width:(0,c.px)(9)}),this.searchResultUsers$=n.select(U.G$).pipe((0,vt.Em)(n)),this.organizationUsers$=n.select(U.p5).pipe((0,vt.Em)(n)),this.organizationUsersLoading$=n.select(U.Z),this.userSearchQuery$=n.select(U.w1),this.availableUsers$=this.userSearchQuery$.pipe((0,L.w)(i=>i?.length?this.searchResultUsers$:this.organizationUsers$)),this.selectedUsers$=n.select(U.$G),this.continueButtonDisabled$=this.selectedUsers$.pipe((0,p.U)(i=>
1i.length<1)),this.store$.dispatch(U.XB.loadUsers())}searchUsers(n){this.store$.dispatch(U.XB.searchUsers({query:n}))}selectUser(n){this.store$.dispatch(U.XB.selectUser({user:n})),this.store$.dispatch(U.XB.searchUsers({query:""}))}invitePeople(){}handleBackClick(){this.store$.dispatch(Ec())}handleContinueClick(){this.store$.dispatch((0,De.Q$)({route:{tab:J.v0.CHAT,path:"new-message/new-chat-group/info"}}))}static#e=this.\u0275fac=function(t){return new(t||Ts)(e.Y36(g.yh),e.Y36(c.Q2))};static#t=this.\u0275cmp=e.Xpm({type:Ts,selectors:[["t5s-new-chat-group-users"]],decls:20,vars:27,consts:[["user-sidebar-header",""],["header-start",""],[3,"t5sTooltip","click"],["header-end",""],["t5sUserSidebarClose","",3,"t5sTooltip"],["user-sidebar-body",""],["data-cy","t5s-chat-new-group-search-input","t5sAutofocus","",3,"placeholder","valueChange"],[3,"users","userClick"],[4,"ngIf"],["data-cy","t5s-sidebar-chat-create-group-cancel-btn",3,"label","btnClick"],["data-cy","t5s-sidebar-chat-create-group-continue-btn",3,"label","isDisabled","btnClick"],[4,"ngIf","ngIfElse"],["noAvailableUsers",""],[4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","t5s-sidebar-chat-create-group-select-user-btn",3,"user","selected","chatUserClick"],["placeholder",""],[3,"title","subtitle","buttonLabel","btnClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"t5s-user-sidebar-back-button",2),e.NdJ("click",function(){return i.handleBackClick()}),e.qZA(),e.TgZ(4,"t5s-bold-text-16px"),e._uU(5),e.qZA(),e.BQk(),e.ynx(6,3),e._UZ(7,"t5s-user-sidebar-close-button",4),e.BQk(),e.qZA(),e.TgZ(8,"div",5)(9,"div")(10,"t5s-selection-search",6),e.NdJ("valueChange",function(s){return i.searchUsers(s)}),e.qZA(),e.TgZ(11,"t5s-user-selection-grid",7),e.NdJ("userClick",function(s){return i.selectUser(s.user)}),e.ALo(12,"async"),e.qZA()(),e.YNc(13,av,5,4,"ng-container",8),e.ALo(14,"async"),e.TgZ(15,"div")(16,"t5s-filled-text-button-26px",9),e.NdJ("btnClick",function(){return i.handleBackClick()}),e.qZA(),e._UZ(17,"div"),e.TgZ(18,"t5s-filled-primary-text-button-26px",10),e.NdJ("btnClick",function(){return i.handleContinueClick()}),e.ALo(19,"async"),e.qZA()()()()),2&t&&(e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newGroup.backBtnTooltip)),e.xp6(2),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.header.titles.newGroup)),e.xp6(2),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newGroup.closeBtnTooltip)),e.xp6(1),e.Tol(i.bodyContainer),e.xp6(1),e.Tol(i.searchContainerClass),e.xp6(1),e.Q6J("placeholder",i.I18n.translate(i.i18n,i.I18n.key.newGroup.searchUserGroupInput)),e.xp6(1),e.Q6J("users",e.lcZ(12,21,i.selectedUsers$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(14,23,i.availableUsers$)),e.xp6(2),e.Tol(i.footerButtonClass),e.xp6(1),e.Q6J("label",i.I18n.translate(i.i18n,i.I18n.key.core.cancel)),e.xp6(1),e.Tol(i.footerSpacer),e.xp6(1),e.Q6J("label",i.I18n.translate(i.i18n,i.I18n.key.newGroup.next))("isDisabled",e.lcZ(19,25,i.continueButtonDisabled$)))},dependencies:[gs.U,Yr.h,Kr.L,u.sg,u.O5,Nn.J,Zc._,Ro.$,Le.h,Jt,Ht,Vt,Xe,et,Yc.x,Lc.q,Nc.S,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}function sv(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-chat-user-profile",11),e.BQk()),2&a){const t=n.$implicit;e.xp6(1),e.Q6J("user",t)}}class As{constructor(n){this.store$=n,this.i18n=(0,Zt.mu)(),this.I18n=Me,this.trackById=yt.xn,this.isCreating$=this.store$.select(U.hj),this.bodyContainer=(0,x.I)({...c.p4,...c.i3,justifyContent:"space-between"}),this.groupDetailClass=(0,x.I)({...c.yD,...c.i3,...c.QP,padding:(0,c.o3)(15,12,17,15),"> :not(:last-child)":{marginBottom:(0,c.px)(17)}}),this.scrollContainerClass=(0,x.I)({overflowY:"auto",flex:1}),this.footerButtonClass=(0,x.I)({...c.yD,height:Br.Mz,...c.xI,justifyContent:"flex-end",padding:(0,c.o3)(10,13)}),this.finalButtonClass=(0,x.I)({marginLeft:(0,c.px)(9)}),this.inputValid$=n.select(U.d$),this.selectedUsers$=n.select(U.$G),this.groupName$=n.select(U.PM).pipe((0,p.U)(({input:{name:t}})=>t)),this.groupLogo$=n.select(U.PM).pipe((0,p.U)(({logo:t})=>t),(0,q.h)(t=>!!t),(0,p.U)(t=>URL.createObjectURL(t))),this.createBtnDisabled$=(0,V.aj)([this.isCreating$,this.groupName$.pipe((0,p.U)(t=>t.length<1))]).pipe((0,p.U)(([t,i])=>t||i))}
1updateName(n){this.store$.dispatch(U.XB.setName({name:n}))}filePicked(n){this.store$.dispatch(U.XB.setLogoFile({logo:n}))}createGroup(){this.store$.dispatch(U.XB.executeCreation())}handleBackClick(){this.store$.dispatch(Bc())}handleCancelClick(){this.store$.dispatch(us())}static#e=this.\u0275fac=function(t){return new(t||As)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:As,selectors:[["t5s-new-chat-group"]],decls:21,vars:32,consts:[["user-sidebar-header",""],["header-start",""],[3,"t5sTooltip","click"],["header-end",""],["t5sUserSidebarClose","",3,"t5sTooltip"],["user-sidebar-body",""],["data-cy","t5s-wc-sidebar-chat-create-group-thumbnail-upload",3,"fullImgUrl","filePick"],["data-cy","t5s-sidebar-chat-group-name-input",3,"placeholder","textAlign","value","valueChange"],[4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","t5s-sidebar-chat-create-group-back-btn",3,"label","click"],["data-cy","t5s-sidebar-chat-create-group-create-btn",3,"label","isDisabled","btnClick"],["data-cy","t5s-sidebar-chat-create-group-select-user-btn",3,"user"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"t5s-user-sidebar-back-button",2),e.NdJ("click",function(){return i.handleBackClick()}),e.qZA(),e.TgZ(4,"t5s-bold-text-16px"),e._uU(5),e.qZA(),e.BQk(),e.ynx(6,3),e._UZ(7,"t5s-user-sidebar-close-button",4),e.BQk(),e.qZA(),e.TgZ(8,"div",5)(9,"div")(10,"t5s-chat-group-thumbnail-upload",6),e.NdJ("filePick",function(s){return i.filePicked(s.file)}),e.ALo(11,"async"),e.qZA(),e.TgZ(12,"t5s-input-31px",7),e.NdJ("valueChange",function(s){return i.updateName(s)}),e.ALo(13,"async"),e.qZA()(),e._UZ(14,"t5s-divider-light-9px"),e.TgZ(15,"div"),e.YNc(16,sv,2,1,"ng-container",8),e.ALo(17,"async"),e.qZA(),e.TgZ(18,"div")(19,"t5s-filled-text-button-26px",9),e.NdJ("click",function(){return i.handleCancelClick()}),e.qZA(),e.TgZ(20,"t5s-filled-primary-text-button-26px",10),e.NdJ("btnClick",function(){return i.createGroup()}),e.qZA()()()()),2&t&&(e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newGroup.backBtnTooltip)),e.xp6(2),e.Oqu(i.I18n.translate(i.i18n,i.I18n.key.header.titles.newGroup)),e.xp6(2),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newGroup.closeBtnTooltip)),e.xp6(1),e.Tol(i.bodyContainer),e.xp6(1),e.Tol(i.groupDetailClass),e.xp6(1),e.Q6J("fullImgUrl",e.lcZ(11,26,i.groupLogo$)),e.xp6(2),e.Q6J("placeholder",i.I18n.translate(i.i18n,i.I18n.key.newGroup.groupNamePlaceholder))("textAlign","center")("value",e.lcZ(13,28,i.groupName$)),e.xp6(3),e.Tol(i.scrollContainerClass),e.xp6(1),e.Q6J("ngForOf",e.lcZ(17,30,i.selectedUsers$))("ngForTrackBy",i.trackById),e.xp6(2),e.Tol(i.footerButtonClass),e.xp6(1),e.Q6J("label",i.I18n.translate(i.i18n,i.I18n.key.core.cancel)),e.xp6(1),e.Tol(i.finalButtonClass),e.Q6J("label",i.I18n.translate(i.i18n,i.I18n.key.newGroup.create))("isDisabled",i.createBtnDisabled$))},dependencies:[Yr.h,Kr.L,u.sg,Hc.t,Nn.J,al.a,Le.h,Jt,Ht,Vt,Xe,et,ys.O,Wc.t,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var rv=r(30748);function lv(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-chat-user-profile",1),e.NdJ("chatUserClick",function(){const s=e.CHM(t).$implicit,l=e.oxw();return e.KtG(l.startDialog(s))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit;e.xp6(1),e.Q6J("user",t)}}class Us{constructor(n){this.store$=n,this.trackById=yt.xn}startDialog(n){this.store$.dispatch(Dc(n))}static#e=this.\u0275fac=function(t){return new(t||Us)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:Us,selectors:[["t5s-new-message-org-users"]],inputs:{organizationUsers:"organizationUsers"},decls:1,vars:2,consts:[[4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","t5s-new-message-org-user-btn",3,"user","chatUserClick"]],template:function(t,i){1&t&&e.YNc(0,lv,2,1,"ng-container",0),2&t&&e.Q6J("ngForOf",i.organizationUsers)("ngForTrackBy",i.trackById)},dependencies:[u.sg,ys.O],encapsulation:2,changeDetection:0})}var cv=r(50276);class Vo{constructor(){this.chatGroupClick=new e.vpe}get state(){return{group:this.group}}static#e=this.\u0275fac=function(t){return new(t||Vo)};static#t=this.\u0275cmp=e.Xpm({type:Vo,selectors:[["t5s-wc-chat-group"]],inputs:{group:"group"},outputs:{chatGroupClick:"chatGroupClick"},decls:1,vars:1,consts:[[3,"state","chatGroupClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-chat-group",0),e.NdJ("chatGroupClick",function(s){return i.chatGroupClick.emit(s)}),e.qZA()),2&t&&e.Q6J("state",i.state)},dependencies:[cv.w],encapsulation:2,changeDetection:0})}function pv(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-chat-user-profile",2),e.NdJ("chatUserClick",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw();return e.KtG(s.handleConversationClick(o))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("user",t.user)}}function dv(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-wc-chat-group",3),e.NdJ("chatGroupClick",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw();return e.KtG(s.handleConversationClick(o))}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("group",t)}}function _v(a,n){if(1&a&&(e.ynx(0),e.YNc(1,pv,2,1,"ng-container",1),e.YNc(2,dv,2,1,"ng-container",1),e.BQk()),2&a){const t=n.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngIf",t.type===i.ConversationType.DIALOG),e.xp6(1),e.Q6J("ngIf",t.type===i.ConversationType.GROUP)}}class Os{constructor(n){this.store$=n,this.ConversationType=A.i1$,this.trackByConversationId=yt.p9}
1handleConversationClick(n){this.store$.dispatch(Vr({conversationId:n.conversationId}))}static#e=this.\u0275fac=function(t){return new(t||Os)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:Os,selectors:[["t5s-new-message-recent-conversations"]],inputs:{conversations:"conversations"},decls:1,vars:2,consts:[[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],["data-cy","t5s-new-message-recent-conversation-user-btn",3,"user","chatUserClick"],[3,"group","chatGroupClick"]],template:function(t,i){1&t&&e.YNc(0,_v,3,2,"ng-container",0),2&t&&e.Q6J("ngForOf",i.conversations)("ngForTrackBy",i.trackByConversationId)},dependencies:[u.sg,u.O5,ys.O,Vo],encapsulation:2,changeDetection:0})}const uv=["searchInput"];function hv(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-divider-light-9px")(2,"t5s-new-message-recent-conversations",9)(3,"t5s-divider-light-9px"),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(2),e.Q6J("conversations",t)}}function gv(a,n){if(1&a&&(e.ynx(0),e.YNc(1,hv,4,1,"ng-container",7),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngIf",(null==t?null:t.length)>0)}}function mv(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-new-message-org-users",11),e.BQk()),2&a){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("organizationUsers",t)}}function fv(a,n){1&a&&(e.ynx(0),e._UZ(1,"t5s-loading-spinner-26px-top"),e.BQk())}function xv(a,n){if(1&a&&(e.ynx(0),e.YNc(1,mv,2,1,"ng-container",10),e.YNc(2,fv,2,0,"ng-container",7),e.ALo(3,"async"),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(),o=e.MAs(17);e.xp6(1),e.Q6J("ngIf",(null==t?null:t.length)>0)("ngIfElse",o),e.xp6(1),e.Q6J("ngIf",!(null!=t&&t.length)&&e.lcZ(3,3,i.organizationUsersLoading$))}}function bv(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-button-placeholder-top",12),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.invitePeople())}),e.qZA(),e.BQk()}if(2&a){const t=e.oxw(2);e.xp6(1),e.Q6J("title",t.I18n.translate(t.i18n,t.I18n.key.newMessage.noOrgUsersPlaceholder.title))("subtitle",t.I18n.translate(t.i18n,t.I18n.key.newMessage.noOrgUsersPlaceholder.subtitle))("buttonLabel",t.I18n.translate(t.i18n,t.I18n.key.newMessage.noOrgUsersPlaceholder.buttonLabel))}}function Cv(a,n){if(1&a&&(e.YNc(0,bv,2,3,"ng-container",7),e.ALo(1,"async")),2&a){const t=e.oxw();e.Q6J("ngIf",!1===e.lcZ(1,1,t.organizationUsersLoading$))}}class Es{constructor(n){this.store$=n,this.trackById=yt.xn,this.trackSearchResultById=rv.Q,this.trackByConversationId=yt.p9,this.SearchResultType=A.Bk$,this.ConversationType=A.i1$,this.i18n=(0,Zt.mu)(),this.I18n=Me,this.Icons=pe.PJ,this.DEBOUNCE_TIME=200,this.searchInputClass=(0,x.I)({marginLeft:(0,c.px)(13),marginRight:(0,c.px)(13),marginTop:(0,c.px)(9),marginBottom:(0,c.px)(9)}),this.newMessageScrollContainer=(0,x.I)({overflowY:"auto",...c.p4}),this.conversations$=n.select(U.FS),this.organizationUsers$=n.select(Xb).pipe((0,vt.Em)(n)),this.organizationUsersLoading$=n.select(U.rW),this.searchQuery$=n.select(U.mj).pipe((0,lt.b)(this.DEBOUNCE_TIME),(0,pt.O)("")),this.searchResults$=n.select(U.NA).pipe((0,vt.hM)(n)),this.store$.dispatch(U.qx.loadConversations()),this.store$.dispatch(U.$c.loadUsers()),this.store$.dispatch(U.$c.searchConversations({query:""})),this.store$.dispatch(U.XB.clearState())}accessConversation(n){this.store$.dispatch(Ze.accessConversation({conversationId:n}))}searchConversations(n){this.store$.dispatch(U.$c.searchConversations({query:n}))}startDialog(n){this.store$.dispatch(Dc(n))}newChatGroup(){this.store$.dispatch(Bc())}invitePeople(){}clearSearchInput(){this.searchInput.nativeElement.value=""}handleBackClick(){this.store$.dispatch(us())}static#e=this.\u0275fac=function(t){return new(t||Es)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:Es,selectors:[["t5s-new-message"]],viewQuery:function(t,i){if(1&t&&e.Gf(uv,7),2&t){let o;e.iGM(o=e.CRH())&&(i.searchInput=o.first)}},decls:18,vars:17,consts:[["user-sidebar-header",""],["header-start",""],[3,"t5sTooltip","click"],["header-end",""],["data-cy","t5s-sidebar-chat-create-group-btn",3,"icon","t5sTooltip","btnClick"],["t5sUserSidebarClose","",3,"t5sTooltip"],["user-sidebar-body",""],[4,"ngIf"],["noOrgUsersPlaceholder",""],[3,"conversations"],[4,"ngIf","ngIfElse"],[3,"organizationUsers"],[3,"title","subtitle","buttonLabel","btnClick"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-content-template")(1,"t5s-user-sidebar-header-template",0),e.ynx(2,1),e.TgZ(3,"t5s-user-sidebar-back-button",2),e.NdJ("click",function(){return i.handleBackClick()}),e.qZA(),e.TgZ(4,"t5s-bold-text-16px"),e._uU(5),e.qZA(),e.BQk(),e.ynx(6,3),e.TgZ(7,"t5s-primary-icon-button-20px",4),e.NdJ("btnClick",function(){return i.newChatGroup()}),e.qZA(),e._UZ(8,"t5s-user-sidebar-close-button",5),e.BQk(),e.qZA(),e.ynx(9,6),e.TgZ(10,"div"),e._UZ(11,"t5s-divider-light-1px"),e.YNc(12,gv,2,1,"ng-container",7),e.ALo(13,"async"),e.YNc(14,xv,4,5,"ng-container",7),e.ALo(15,"async"),e.YNc(16,Cv,2,3,"ng-template",null,8,e.W1O),e.qZA(),e.BQk(),e.qZA()),2&t&&(e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newMessage.backBtnTooltip)),e.xp6(2),e.hij(" ",i.I18
1n.translate(i.i18n,i.I18n.key.header.titles.newMessage)," "),e.xp6(2),e.Q6J("icon",i.Icons.addGroup.name)("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newMessage.createNewGroupBtn)),e.xp6(1),e.Q6J("t5sTooltip",i.I18n.translate(i.i18n,i.I18n.key.newMessage.closeBtnTooltip)),e.xp6(2),e.Tol(i.newMessageScrollContainer),e.xp6(2),e.Q6J("ngIf",e.lcZ(13,13,i.conversations$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(15,15,i.organizationUsers$)))},dependencies:[Gt.Q,u.O5,Nn.J,di.o,al.a,Ro.$,Le.h,Jt,Ht,Vt,Xe,et,Yc.x,Us,Os,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}var Ds=r(90060),kt=r(90427),Bs=r(9619);const Kc={openBlabDef:(0,g.PH)("SidebarNotificationsBlabDefActions.openBlabDef",(0,g.Ky)())};var Iv=r(73817),yv=r(56476),kv=r(26438),wv=r(80043),Sv=r(23986),Tv=r(85750);function Av(a,n){if(1&a&&(e.ynx(0),e.TgZ(1,"div")(2,"t5s-single-line-text-darker-11px"),e._uU(3),e.qZA(),e.TgZ(4,"t5s-single-line-text-primary-11px"),e._uU(5),e.qZA()(),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Tol(i.subTitleClass),e.xp6(2),e.hij(" ",i.translate(t,i.WebClientI18nKeys.fm.notifications.filteredBy),":\xa0 "),e.xp6(2),e.hij(" ",i.translate(t,i.WebClientI18nKeys.fm.notifications.unreadFilter)," ")}}function Uv(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-notification",16),e.NdJ("notificationClick",function(){const s=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.notificationClick.emit({notification:s}))})("toggleReadClick",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.toggleReadClick.emit(o))}),e.qZA(),e.BQk()}if(2&a){const t=n.$implicit,i=e.oxw().ngIf;e.xp6(1),e.Q6J("notification",t)("activeUserId",i.activeUserId)}}function Ov(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"t5s-placeholder-top-v2",17),e.BQk()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.xp6(1),e.Udp("width",100,"%")("height",100,"%"),e.Q6J("title",i.getNotificationsPlaceholderTitle(t))("subtitle",i.getNotificationsPlaceholderSubtitle(t))}}function Ev(a,n){if(1&a){const t=e.EpF();e.ynx(0),e.TgZ(1,"t5s-user-sidebar-content-template")(2,"t5s-user-sidebar-header-template",1),e.ynx(3,2),e.TgZ(4,"div"),e._UZ(5,"t5s-title-menu-indicator-button-medium-16px",3),e.YNc(6,Av,6,4,"ng-container",0),e.qZA(),e.TgZ(7,"t5s-menu-template",4,5)(9,"t5s-text-menu-item",6),e.NdJ("menuItemClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.markAllAsReadClick.emit())}),e.qZA()(),e.BQk(),e.ynx(10,7),e.TgZ(11,"t5s-flex-row",8)(12,"t5s-notification-unread-filter-toggle",9),e.NdJ("btnClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.setFilterOnlyUnread(o))}),e.qZA(),e.TgZ(13,"t5s-primary-icon-button-20px",10),e.NdJ("btnClick",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.closeClick.emit(o))}),e.qZA()(),e.BQk(),e.qZA(),e.TgZ(14,"div",11)(15,"t5s-tab-list")(16,"t5s-tab-list-item",12),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeDisplaySetting.emit({displaySetting:o.NotificationDisplaySetting.ALL}))}),e.qZA(),e.TgZ(17,"t5s-tab-list-item",12),e.NdJ("btnClick",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.changeDisplaySetting.emit({displaySetting:o.NotificationDisplaySetting.YOU}))}),e.qZA()(),e._UZ(18,"t5s-divider-light-1px"),e.TgZ(19,"div")(20,"t5s-pagination-scroll-down-container-template",13),e.NdJ("loadMore",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.loadMore.emit())}),e.YNc(21,Uv,2,2,"ng-container",14),e.YNc(22,Ov,2,6,"ng-container",0),e.ynx(23,15),e._UZ(24,"t5s-loading-spinner-26px-top"),e.BQk(),e.qZA()()()(),e.BQk()}if(2&a){const t=n.ngIf,i=e.MAs(8),o=e.oxw();e.xp6(1),e.Udp("width",100,"%")("height",100,"%"),e.xp6(3),e.Tol(o.titleClass),e.xp6(1),e.Q6J("label",o.translate(t,o.WebClientI18nKeys.fm.notifications.notificationTabTitle))("t5sImperativeMenuTriggerFor",i),e.xp6(1),e.Q6J("ngIf",t.onlyUnread),e.xp6(1),e.Q6J("closeOnClick",!0),e.xp6(2),e.Q6J("text",o.translate(t,o.WebClientI18nKeys.fm.notifications.menu.markAllAsRead)),e.xp6(3),e.Q6J("t5sTooltip",o.translate(t,o.WebClientI18nKeys.fm.notifications.filterToggleBtnTooltip))("active",t.onlyUnread),e.xp6(1),e.Udp("margin-top",2,"px"),e.Q6J("t5sTooltip","Close")("icon",o.Icons.closeLarge.name),e.xp6(1),e.Tol(o.bodyContainerClass),e.xp6(2),e.Udp("flex-grow",1),e.Q6J("label",o.translate(t,o.WebClientI18nKeys.fm.notifications.tabs.all))("active",(null==t?null:t.displaySetting)===o.NotificationDisplaySetting.ALL),e.xp6(1),e.Udp("flex-grow",1),e.Q6J("label",o.translate(t,o.WebClientI18nKeys.fm.notifications.tabs.you))("active",(null==t?null:t.displaySetting)===o.NotificationDisplaySetting.YOU),e.xp6(2),e.Tol(o.notificationScrollContainerClass),e.xp6(1),e.Q6J("isLoading",t.isLoading),e.xp6(1),e.Q6J("ngForOf",t.n
1otifications)("ngForTrackBy",o.trackById),e.xp6(1),e.Q6J("ngIf",!(null!=t.notifications&&t.notifications.length||t.isLoading))}}class Zi extends v.Y4{constructor(){super(...arguments),this.WebClientI18nKeys=qe.n,this.font=c.LZ,this.NotificationDisplaySetting=Ds.D,this.titleClass=(0,x.I)({...c.i3}),this.subTitleClass=(0,x.I)({...c.xI}),this.bodyContainerClass=(0,x.I)({...c.hw,...c.i3}),this.notificationScrollContainerClass=(0,x.I)({minHeight:0,flex:1}),this.closeClick=new e.vpe,this.notificationClick=new e.vpe,this.toggleReadClick=new e.vpe,this.markAllAsReadClick=new e.vpe,this.changeOnlyUnreadClick=new e.vpe,this.changeDisplaySetting=new e.vpe,this.loadMore=new e.vpe}set notifications(n){this.set({notifications:n})}set isLoading(n){this.set({isLoading:n})}set onlyUnread(n){this.set({onlyUnread:n})}set displaySetting(n){this.set({displaySetting:n})}set activeUserId(n){this.set({activeUserId:n})}getWrapperClass(n){return(0,x.I)({...c.hw,...c.Kz,backgroundColor:n.theme.color.lightest})}setFilterOnlyUnread({action:n}){this.changeOnlyUnreadClick.emit({onlyUnread:"on"===n})}getNotificationsPlaceholderTitle(n){const{title:t}=this.getNotificationsPlaceholder(n);return t}getNotificationsPlaceholderSubtitle(n){const{subtitle:t}=this.getNotificationsPlaceholder(n);return t}getNotificationsPlaceholder({notifications:n,onlyUnread:t,displaySetting:i,...o}){if(t){const{noUnreadNotifications:s}=qe.n.fm.notifications.placeholder;return{title:this.translate(o,s.title),subtitle:this.translate(o,s.subtitle)}}if(i===Ds.D.YOU){const{noYouNotifications:s}=qe.n.fm.notifications.placeholder;return{title:this.translate(o,s.title),subtitle:this.translate(o,s.subtitle)}}{const{noNotifications:s}=qe.n.fm.notifications.placeholder;return{title:this.translate(o,s.title),subtitle:this.translate(o,s.subtitle)}}}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Zi)))(i||Zi)}}();static#t=this.\u0275cmp=e.Xpm({type:Zi,selectors:[["t5s-user-sidebar-notifications-view"]],inputs:{notifications:"notifications",isLoading:"isLoading",onlyUnread:"onlyUnread",displaySetting:"displaySetting",activeUserId:"activeUserId"},outputs:{closeClick:"closeClick",notificationClick:"notificationClick",toggleReadClick:"toggleReadClick",markAllAsReadClick:"markAllAsReadClick",changeOnlyUnreadClick:"changeOnlyUnreadClick",changeDisplaySetting:"changeDisplaySetting",loadMore:"loadMore"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngIf"],["user-sidebar-header",""],["header-start",""],["data-cy","t5s-wc-usi-notification-menu-btn",3,"label","t5sImperativeMenuTriggerFor"],[3,"closeOnClick"],["notificationMenu","t5sMenu"],["data-cy","t5s-wc-usi-notification-menu-mark-all-read-btn",3,"text","menuItemClick"],["header-end",""],["gap","13","centered","true"],[3,"t5sTooltip","active","btnClick"],["data-cy","t5s-user-sidebar-notifications-close-btn",3,"t5sTooltip","icon","btnClick"],["user-sidebar-body",""],[3,"label","active","btnClick"],[3,"isLoading","loadMore"],[4,"ngFor","ngForOf","ngForTrackBy"],["pagination-scroll-down-container-loading-area",""],[3,"notification","activeUserId","notificationClick","toggleReadClick"],[3,"title","subtitle"]],template:function(t,i){1&t&&(e.YNc(0,Ev,25,33,"ng-container",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.state$))},dependencies:[u.sg,u.O5,Gt.Q,Iv.r,yv.F,jr.b,kv.a,di.o,yc.O,nn.D,Qr.b,wc.W,_i.E,ui.M,Xe,et,Ro.$,wv.c,Sv.Z,Tv.j,Le.h,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}class Wo{constructor(n){this.store$=n,this.trackById=yt.xn,this.Icons=pe.PJ,this.notifications$=n.select(kt.WP),this.displaySetting$=n.select(kt.mB),this.onlyUnread$=n.select(kt.T8),this.isLoading$=n.select(kt.e5),this.activeUserId$=n.select(vt.Ux),this.displayAllActive$=this.displaySetting$.pipe((0,p.U)(t=>t===Ds.D.ALL)),this.displayYouActive$=this.displaySetting$.pipe((0,p.U)(t=>t===Ds.D.YOU)),this.store$.dispatch(kt.fX.loadSubscribeNotifications())}notificationClick({notification:n}){const t=function vv(a){switch(a.type){case A.k$E.BLAB_ITEM_NOTIFICATION:{const n=a,{activities:t,blabItem:i}=n,o=i?.blabDefId??i.blabDef?.id;if(!t)return Zn.i.navigateToItemEdit(n.blabItemId,{omitActivityFilter:!0,blabDefId:o});const[s]=t,{activity:l,activityReply:d}=s;return d&&l?Zn.i.navigateToBlabItemActivityThread(l,{omitActivityFilter:!0,blabDefId:o}):l?.type===A.Tav.BLAB_ITEM_DELETED?void 0:Zn.i.navigateToItemEdit(n.blabItemId,{omitActivityFilter:!0,blabDefId:o})}case A.k$E.USER_NOTIFICATION:{const n=a,{activities:i}=n,[o]=i,{activity:s}=o;if(!s)throw new Error("Cannot access user notification w/o activity");const{author:l}=s;if(!l)throw new Error("Cannot access user notification w/o activity author");return}case A.k$E.WORKSPACE_NOTIFICATION:{const n=a,{activities:t,workspace:i}=n,[o]=t,{activity:s}=o;if(!s)throw new Error("Cannot access user notification w/o activity");if(!i)throw new Error("Cannot access user notification w/o workspace");return Bs.Il.navigateToWorkspaceRoot(i)}case A.k$E.AUDIO_ROOM_NOTIFICATION:return;case A.k$E.WORKFLOW_DEF_NOTIFICATION:{const{workflowDefId:n,workflowDef:t}=a,i=t?.name,o=t?.blabDefId;return at.tj.openWorkflowCenterEditWorkflow({workflowId:n,sidebarExpanded:!0,workflowDefName:i,workflowDefBlabDefId:o})}case A.k$E.BLAB_DEF_NOTIFICATION:{const{blabDefId:n}=a;return Kc.openBlabDef({blabDefId:n})}case A.k$E.USER_GROUP_NOTIFICATION:return;default:throw new Error(`Not implemented: ${JSON.stringify(a)}`)}}(n);
1t&&this.store$.dispatch(t),n.read||this.store$.dispatch(kt.fX.markAsRead({input:{notificationId:n.id}}))}toggleReadClick({action:n,notificationId:t}){this.store$.dispatch("markAsRead"===n?kt.fX.markAsRead({input:{notificationId:t}}):kt.fX.markAsUnread({input:{notificationId:t}}))}changeDisplaySetting({displaySetting:n}){this.store$.dispatch(kt.fX.changeDisplaySetting({displaySetting:n}))}markAllAsRead(){this.store$.dispatch(kt.fX.markAllNotificationsAsRead())}changeOnlyUnreadClick({onlyUnread:n}){this.store$.dispatch(kt.fX.changeFilterOnlyUnread({onlyUnread:n}))}closeClick(){this.store$.dispatch((0,De.lh)())}loadMore(){this.store$.dispatch(kt.fX.loadMoreNotifications())}static#e=this.\u0275fac=function(t){return new(t||Wo)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:Wo,selectors:[["t5s-sidebar-notifications"]],decls:6,vars:15,consts:[[3,"notifications","isLoading","onlyUnread","displaySetting","activeUserId","notificationClick","toggleReadClick","markAllAsReadClick","changeOnlyUnreadClick","changeDisplaySetting","closeClick","loadMore"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-user-sidebar-notifications-view",0),e.NdJ("notificationClick",function(s){return i.notificationClick(s)})("toggleReadClick",function(s){return i.toggleReadClick(s)})("markAllAsReadClick",function(){return i.markAllAsRead()})("changeOnlyUnreadClick",function(s){return i.changeOnlyUnreadClick(s)})("changeDisplaySetting",function(s){return i.changeDisplaySetting(s)})("closeClick",function(){return i.closeClick()}
1)("loadMore",function(){return i.loadMore()}),e.ALo(1,"async"),e.ALo(2,"async"),e.ALo(3,"async"),e.ALo(4,"async"),e.ALo(5,"async"),e.qZA()),2&t&&e.Q6J("notifications",e.lcZ(1,5,i.notifications$))("isLoading",e.lcZ(2,7,i.isLoading$))("onlyUnread",e.lcZ(3,9,i.onlyUnread$))("displaySetting",e.lcZ(4,11,i.displaySetting$))("activeUserId",e.lcZ(5,13,i.activeUserId$))},dependencies:[Zi,u.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}function Dv(a,n){1&a&&e.GkF(0)}function Bv(a,n){if(1&a&&(e.ynx(0),e.YNc(1,Dv,1,0,"ng-container",1),e.BQk()),2&a){const t=n.ngIf;e.xp6(1),e.Q6J("ngComponentOutlet",t.cmp)("ngComponentOutletInjector",t.injector)}}function Mv(a){switch(a.tab){case J.v0.NOTIFICATIONS:return Wo;case J.v0.CHAT:switch(a.path){case"conversations":return ws;case"conversation":return Is;case"conversation-info":return ks;case"conversation/add-users":return ms;case"new-message":return Es;case"new-message/dialog":return Ss;case"new-message/new-chat-group":return Ts;case"new-message/new-chat-group/info":return As}break;case J.v0.CALENDAR:switch(a.path){case"overview":default:return $o;case"subscription-manage":return Hr;case"share-manage":return cs;case"edit-reminder":return Lr}}return Wo}class Ms{constructor(n){this.router=n,this.vm$=this.router.route$.pipe((0,p.U)(t=>t.tab?{cmp:Mv(t),injector:void 0,canBack:this.router.canGoBack()}:null))}static#e=this.\u0275fac=function(t){return new(t||Ms)(e.Y36(Ga.N))};static#t=this.\u0275cmp=e.Xpm({type:Ms,selectors:[["t5s-user-sidebar-outlet"]],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngComponentOutlet","ngComponentOutletInjector"]],template:function(t,i){1&t&&(e.YNc(0,Bv,2,2,"ng-container",0),e.ALo(1,"push")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.vm$))},dependencies:[u.$G,u.O5,we.f],encapsulation:2,changeDetection:0})}var Zs=r(81053),Rn=r(16433),jc=r(82835);class Yo{constructor(n){this.zone=n}track(n,t={}){const i=t.inflatePx??0,o=t.radiusCssOverride,s=t.outset;return new At.y(l=>this.zone.runOutsideAngular(()=>{let d,C,S,h=0,m=!1;const f=typeof ResizeObserver<"u"?new ResizeObserver(()=>R()):void 0,E=()=>{m=!1;const F=n();if(F!==C&&(f&&(C&&f.unobserve(C),F&&f.observe(F)),S?.(),S=F?function Zv(a,n){if(typeof IntersectionObserver>"u")return()=>{};let t,i;const o=()=>{void 0!==i&&clearTimeout(i),t?.disconnect(),t=void 0},s=(l,d)=>{o();const h=document.documentElement,{left:m,top:C,width:S,height:f}=a.getBoundingClientRect();if(l||n(),0===S||0===f)return;const F=`${-Math.floor(C)}px ${-Math.floor(h.clientWidth-(m+S))}px ${-Math.floor(h.clientHeight-(C+f))}px ${-Math.floor(m)}px`,ae=Math.max(0,Math.min(1,d))||1;let xe=!0;t=new IntersectionObserver(b=>{const k=b[0].intersectionRatio;k!==ae&&(xe?0===k?i=setTimeout(()=>s(!1,1e-7),1e3):s(!1,k):s(!1,1)),xe=!1},{rootMargin:F,threshold:ae}),t.observe(a)};return s(!0,1),o}(F,R):void 0,C=F),!F||!F.isConnected)return Z(void 0);const ae=F.getBoundingClientRect();if(0===ae.width&&0===ae.height)return Z(void 0);const xe=s?.left??0,Fe=s?.top??0;Z({x:ae.left-xe,y:ae.top-Fe,width:Math.max(0,ae.width+xe+(s?.right??0)),height:Math.max(0,ae.height+Fe+(s?.bottom??0)),radiusCss:o??Nv(F,ae,i)})},Z=F=>{(function Lv(a,n){return a===n||!(!a||!n)&&a.x===n.x&&a.y===n.y&&a.width===n.width&&a.height===n.height&&a.radiusCss===n.radiusCss})(d,F)||(d=F,l.next(F))},R=()=>{m||(m=!0,h=requestAnimationFrame(E))},G=window.visualViewport??void 0;return document.addEventListener("scroll",R,{capture:!0,passive:!0}),window.addEventListener("resize",R,{passive:!0}),G?.addEventListener("resize",R,{passive:!0}),G?.addEventListener("scroll",R,{passive:!0}),R(),()=>{h&&cancelAnimationFrame(h),f?.disconnect(),S?.(),document.removeEventListener("scroll",R,{capture:!0}),window.removeEventListener("resize",R),G?.removeEventListener("resize",R),G?.removeEventListener("scroll",R)}}))}static#e=this.\u0275fac=function(t){return new(t||Yo)(e.LFG(e.R0b))};static#t=this.\u0275prov=e.Yz7({token:Yo,factory:Yo.\u0275fac,providedIn:"root"})}function Nv(a,n,t){const i=getComputedStyle(a),s=(l,d)=>l.endsWith("%")?parseFloat(l)/100*d:parseFloat(l)||0;return[i.borderTopLeftRadius,i.borderTopRightRadius,i.borderBottomRightRadius,i.borderBottomLeftRadius].map(l
1=>{const[d,h=d]=l.split(" "),m=s(d,n.width),C=s(h,n.height),S=m>0?m+t:0,f=C>0?C+t:0;return S===f?`${S}px`:`${S}px ${f}px`}).join(" ")}function qc(a,n="center"){const t=function Pv(a){let n=a.parentElement;for(;n;){const{overflowY:t}=getComputedStyle(n);if(("auto"===t||"scroll"===t)&&n.scrollHeight>n.clientHeight)return n;n=n.parentElement}}(a);if(!t)return;const i=a.getBoundingClientRect(),o=t.getBoundingClientRect(),s=12;if(i.top>=o.top+s&&i.bottom<=o.bottom-s)return;const l=i.top-o.top+t.scrollTop,d=t.clientHeight;let h;switch(n){case"start":h=l-s;break;case"end":h=l-d+i.height+s;break;case"nearest":h=i.top<o.top?l-s:l-d+i.height+s;break;default:h=l-(d-i.height)/2}const C=Math.max(0,Math.min(h,t.scrollHeight-t.clientHeight));Math.abs(C-t.scrollTop)<1||t.scrollTo({top:C,behavior:"smooth"})}var zv=r(87184);function Li(a,n){return{originX:a,overlayX:a,originY:"bottom",overlayY:"top",offsetY:n}}function Ni(a,n){return{originX:a,overlayX:a,originY:"top",overlayY:"bottom",offsetY:-n}}function Ri(a,n){return{originX:"start",overlayX:"end",offsetX:-n,originY:a,overlayY:a}}function Pi(a,n){return{originX:"end",overlayX:"start",offsetX:n,originY:a,overlayY:a}}class $i{constructor(n,t,i){this.overlay=n,this.ngZone=t,this.overlayContainer=i,this.hasConnector=!1,this.appliedClampPx=0,this.endAlignmentCorrected=!1,this.currentResolvedSide="BOTTOM",this.resolvedSideSubject=new mt.xQ,this.resolvedSide$=this.resolvedSideSubject.asObservable()}isOpen(){return!!this.overlayRef?.hasAttached()}open(n){this.overlayRef?.hasAttached()||(this.overlayRef&&this.teardownRef(),this.ngZone.run(()=>{this.hasConnector=!!n.hasConnector,this.appliedClampPx=0,this.endAlignmentCorrected=!1,this.currentResolvedSide=n.placement;const t=this.overlay.position().flexibleConnectedTo(n.hostEl).withPositions(function Qv(a,n){switch(a){case"BOTTOM":return[Li("center",n),Ni("center",n)];case"BOTTOM_START":return[Li("start",n),Ni("start",n)];case"BOTTOM_END":return[Li("end",n),Ni("end",n)];case"TOP":return[Ni("center",n),Li("center",n)];case"TOP_START":return[Ni("start",n),Li("start",n)];case"TOP_END":return[Ni("end",n),Li("end",n)];case"LEFT":return[Ri("center",n),Pi("center",n)];case"LEFT_START":return[Ri("top",n),Pi("top",n)];case"LEFT_END":return[Ri("bottom",n),Pi("bottom",n)];case"RIGHT":return[Pi("center",n),Ri("center",n)];case"RIGHT_START":return[Pi("top",n),Ri("top",n)];case"RIGHT_END":return[Pi("bottom",n),Ri("bottom",n)]}}(n.placement,n.offsetY)).withPush(!0).withFlexibleDimensions(!!n.hasConnector).withViewportMargin(12);this.positionStrategy=t;const i=this.overlay.create({positionStrategy:t,hasBackdrop:!1,scrollStrategy:this.overlay.scrollStrategies.noop(),disposeOnNavigation:!1});this.overlayRef=i,null!=n.zIndex&&(this.overlayContainer.getContainerElement().style.zIndex=`${n.zIndex}`);const o=i.overlayElement;o.style.setProperty("pointer-events","none"),o.style.setProperty("opacity","0"),o.style.setProperty("transition","opacity 120ms ease"),this.placementSub=t.positionChanges.subscribe(({connectionPair:s})=>{const l=function Fv(a){const{originX:n,originY:t,overlayX:i,overlayY:o}=a;return"bottom"===t&&"top"===o?"start"===i?"BOTTOM_START":"end"===i?"BOTTOM_END":"BOTTOM":"top"===t&&"bottom"===o?"start"===i?"TOP_START":"end"===i?"TOP_END":"TOP":"start"===n&&"end"===i?"top"===o?"LEFT_START":"bottom"===o?"LEFT_END":"LEFT":"top"===o?"RIGHT_START":"bottom"===o?"RIGHT_END":"RIGHT"}(s);this.currentResolvedSide=l,this.resolvedSideSubject.next(l),this.correctEndAlignment()}),i.attach(new Tl.UE(n.content,n.viewContainerRef)),setTimeout(()=>{i.updatePosition(),setTimeout(()=>{i.updatePosition(),this.correctEndAlignment(),this.clampToViewport(),i.overlayElement.style.setProperty("opacity","1")})})}))}setOriginPoint(n){!this.overlayRef?.hasAttached()||!this.positionStrategy||(this.positionStrategy.setOrigin(n),this.overlayRef.updatePosition(),this.correctEndAlignment(),this.clampToViewport())}correctEndAlignment(){const n=this.overlayRef?.overlayElement;if(!n)return;const t=this.hasConnector&&this.currentResolvedSide.endsWith("_END");t!==this.endAlignmentCorrected&&(this.endAlignmentCorrected=t,t?n.style.marginRight="12px":n.style.removeProperty("margin-right"))}clampToViewport(){if(this.hasConnector)return;const n=this.overlayRef?.overlayElement;if(!n)return;const t=n.getBoundingClientRect(),o=t.top-this.appliedClampPx,s=window.innerHeight-t.height-12,d=Math.max(12,Math.min(o,s))-o;d!==this.appliedClampPx&&(this.appliedClampPx=d,0===d?n.style.removeProperty("margin-top"):n.style.marginTop=`${d}px`)}setOverlayVisibility(n){const t=this.overlayRef?.overlayElement;!t||(n?t.style.removeProperty("visibility"):t.style.setProperty("visibility","hidden"))}close(){!this.overlayRef||this.ngZone.run(()=>this.teardownRef())}teardownRef(){this.placementSub?.unsubscribe(),this.placementSub=void 0,this.positionStrategy=void 0,this.overlayRef?.dispose(),this.overlayRef=void 0}ngOnDestroy(){this.close()}static#e=this.\u0275fac=function(t){return new(t||$i)(e.LFG(ce.F0),e.LFG(e.R0b),e.LFG($t.Xj))};static#t=this.\u0275prov=e.Yz7({token:$i,factory:$i.\u0275fac})}class zi extends ce.Ax{constructor(){super(...arguments),this.layer=ce.mh.POP_OVER}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(zi)))(i||zi)}}();static#t=this.\u0275prov=e.Yz7({token:zi,factory:zi.\u0275fac})}const Gv=[{provide:$t.Xj,useClass:zi},$t.aV,ce.F0,$i];class Vv{constructor(n){this.getRegionElement=n,this.priorPosition=null,this.priorIsolation=null,this.priorPointerEvents=null,this.frozenVars=[],this.originalScrollTop=0}setVisible(n){n?(this.ensureAttached(),this.scrimEl&&(this.scrimEl.style.opacity="1")):this.scrimEl&&(this.scrimEl.style.opacity="0")}setAnchorRect(n){this.lastRect=n,this.positionCutout()}positionCutout(){const n=this.regionEl,t=this.cutoutEl,i=this.lastRect;if(!n||!t||!i)return;const o=n.getBoundingClientRect();t.style.left=i.x-o.left-8+"px",t.style.top=i.y-o.top-8+"px",t.style.width=`${Math.max(0,i.width+16)}px`,t.style.height=`${Math.max(0,i.height+16)}px`;const s=i.radiusCss?parseInt(i.radiusCss,10):NaN;t.style.borderRadius=`${(Number.isNaN(s)?6:s)+8}px`}destroy(){this.scrimEl?.remove(),this.scrimEl=void 0,this.cutoutEl=void 0,this.restoreRegion(),this.scrollContainer?.scrollTo({top:this.originalScrollTop,behavior:"smooth"}),this.scrollContainer=void 0}ensureAttached(){if(this.scrimEl)return;const n=this.getRegionElement();if(!n)return;this.regionEl=n,this.scrollContainer=function $v(a){for(const n of Array.from(a.querySelectorAll("*"))){const{overflowY:t}=getComputedStyle(n);if(("auto"===t||"scroll"===t)&&n.scrollHeight>n.clientHeight)return n}}(n),this.originalScrollTop=this.scrollContainer?.scrollTop??0,"static"===getComputedStyle(n).position&&(this.priorPosition=n.style.position,n.style.position="relative"),this.priorIsolation=n.style.isolation,n.style.isolation="isolate",this.priorPointerEvents=n.style.pointerEvents,n.style.pointerEvents="none";const t=n.getAttribute("data-t5s-callout-scrim-suppress-vars");if(t)for(const s of t.split(",").map(l=>
1l.trim()).filter(Boolean))this.frozenVars.push({name:s,prior:n.style.getPropertyValue(s)}),n.style.setProperty(s,"0");const i=document.createElement("div");i.style.position="absolute",i.style.inset="0",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.zIndex="9",i.style.opacity="0",i.style.transition="opacity 120ms ease";const o=document.createElement("div");o.style.position="absolute",o.style.boxShadow=`0 0 0 9999px ${function Wv(a){let n=a;for(;n;){const t=Yv(getComputedStyle(n).backgroundColor);if(t)return`rgba(${t[0]}, ${t[1]}, ${t[2]}, 0.5)`;n=n.parentElement}return"rgba(255, 255, 255, 0.5)"}(n)}`,i.appendChild(o),n.appendChild(i),this.scrimEl=i,this.cutoutEl=o,this.positionCutout()}restoreRegion(){const n=this.regionEl;if(n){rl(n,"position","position",this.priorPosition),rl(n,"isolation","isolation",this.priorIsolation),rl(n,"pointerEvents","pointer-events",this.priorPointerEvents);for(const{name:t,prior:i}of this.frozenVars)""===i?n.style.removeProperty(t):n.style.setProperty(t,i);this.frozenVars=[],this.regionEl=void 0,this.priorPosition=null,this.priorIsolation=null,this.priorPointerEvents=null}}}function rl(a,n,t,i){null!==i&&(""===i?a.style.removeProperty(t):a.style[n]=i)}function Yv(a){const n=a.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(n&&(void 0===n[4]||0!==parseFloat(n[4])))return[Number(n[1]),Number(n[2]),Number(n[3])]}var ep=r(53772);function Kv(a,n){if(1&a&&(e.ynx(0),e._UZ(1,"div")(2,"div"),e.BQk()),2&a){const t=n.ngIf,i=e.oxw(2);e.xp6(1),e.Udp("position","absolute")("top",t.line.top)("bottom",t.line.bottom)("inset-inline-start",t.line.insetStart)("inset-inline-end",t.line.insetEnd)("width",t.line.widthPx,"px")("height",t.line.heightPx,"px")("border-radius",t.line.radiusPx,"px")("background",i.Color.blackCalloutCard),e.xp6(1),e.Udp("position","absolute")("top",t.dot.top)("bottom",t.dot.bottom)("inset-inline-start",t.dot.insetStart)("inset-inline-end",t.dot.insetEnd)("width",t.dot.widthPx,"px")("height",t.dot.heightPx,"px")("border-radius",t.dot.radiusPx,"px")("background",i.Color.blackCalloutCard)}}function jv(a,n){if(1&a&&e._UZ(0,"t5s-svg",10),2&a){const t=n.$implicit,i=e.oxw().ngIf;e.Udp("display","block"),e.Q6J("icon",t)("size",20)("fgColor",i.color)}}function qv(a,n){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,jv,1,5,"t5s-svg",9),e.qZA()),2&a){const t=n.ngIf,i=e.oxw(3);e.Udp("display","flex")("gap",5,"px"),e.xp6(1),e.Q6J("ngForOf",t.icons)("ngForTrackBy",i.trackByIndex)}}function Xv(a,n){if(1&a&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&a){const t=n.ngIf;e.Udp("font-weight",500),e.xp6(1),e.Oqu(t)}}const eI=function(a,n,t){return{default:a,hover:n,active:t}};function tI(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",11),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onCloseClick())}),e._UZ(1,"t5s-svg",10),e.qZA()}if(2&a){const t=e.oxw(3);e.Udp("width",20,"px")("height",20,"px")("border-radius","100%")("display","flex")("align-items","center")("justify-content","center")("flex-shrink",0)("opacity",.8)("transition","background 20ms ease-in"),e.Q6J("t5sClickableElement",e.kEZ(25,eI,t.rgba(t.Color.white,.094),t.rgba(t.Color.white,.13),t.rgba(t.Color.white,.19))),e.uIk("aria-label",t.closeAriaLabel),e.xp6(1),e.Udp("display","block"),e.Q6J("icon",t.xmark)("size",14)("fgColor",t.Color.greyCalloutTextSecondary)}}function nI(a,n){if(1&a&&(e.TgZ(0,"div")(1,"div"),e.YNc(2,qv,2,6,"div",6),e.YNc(3,Xv,2,3,"span",7),e.qZA(),e.YNc(4,tI,2,29,"button",8),e.qZA()),2&a){const t=e.oxw().ngIf,i=e.oxw();e.Udp("display","flex")("justify-content","space-between")("margin-bottom",t.headerMarginBottomPx,"px"),e.xp6(1),e.Udp("display","flex")("flex-direction",t.hero?"column":"row")("align-items",t.hero?"flex-start":"center")("gap",t.hero?10:null,"px")("padding-inline-end",2,"px")("color",i.Color.greyCalloutTextPrimary),e.xp6(1),e.Q6J("ngIf",t.hero),e.xp6(1),e.Q6J("ngIf",t.headline),e.xp6(1),e.Q6J("ngIf",t.showClose)}}function iI(a,n){if(1&a&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&a){const t=n.ngIf,i=e.oxw(2);e.Udp("color",i.Color.greyCalloutTextPrimary)("line-height",1.4)("opacity",.8)("font-weight",400)("padding-inline-end",2,"px"),e.xp6(1),e.hij(" ",t," ")}}function oI(a,n){if(1&a&&(e.O4$(),e.TgZ(0,"svg",16),e._UZ(1,"path",17),e.qZA()),2&a){const t=n.$implicit,i=e.oxw(4);e.Udp("display","block")("width",4.38,"px")("height",14,"px")("fill",t.active?i.Color.greyCalloutTextPrimary:i.Color.greyCalloutTextSecondary)}}function aI(a,n){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,oI,2,8,"svg",15),e.qZA()),2&a){const t=n.ngIf,i=e.oxw(3);e.Udp("display","flex")("align-items","center")("gap",6,"px"),e.xp6(1),e.Q6J("ngForOf",t)("ngForTrackBy",i.trackByIndex)}}const tp=function(a,n){return{default:"transparent",hover:a,active:n}};function sI(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw(3);return e.KtG(l.onButtonClick(s.def))}),e._uU(1),e.qZA()}if(2&a){const t=n.ngIf,i=e.oxw(3);e.Udp("padding","4px 6px")("font","inherit")("border-radius",6,"px")("color",i.Color.greyCalloutTextPrimary)("opacity",.8)("user-select","none")("transition","background 20ms ease-in"),e.Q6J("t5sClickableElement",e.WLB(17,tp,i.rgba(i.Color.white,.055),i.rgba(i.Color.white,.115))),e.uIk("data-cy","t5s-callout-card-"+t.def.id+"-btn"),e.xp6(1),e.hij(" ",t.label," ")}}function rI(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"button",18),e.NdJ("click",function(){const s=e.CHM(t).ngIf,l=e.oxw(3);return e.KtG(l.onButtonClick(s.def))}),e._uU(1),e.qZA()}if(2&a){const t=n.ngIf,i=e.oxw(3);e.Udp("padding","4px 6px")("font","inherit")("border-radius",6,"px")("color",i.Color.greyCalloutTextPrimary)("user-select","none")("transition","background 20ms ease-in"),e.Q6J("t5sClickableElement",e.WLB(15,tp,i.rgba(i.Color.white,.055),i.rgba(i.Color.white,.115))),e.uIk("data-cy","t5s-callout-card-"+t.def.id+"-btn"),e.xp6(1),e.hij(" ",t.label," ")}}function lI(a,n){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,aI,2,8,"div",12),e.TgZ(2,"div"),e.YNc(3,sI,2,20,"button",13),e.YNc(4,rI,2,18,"button",14),e.qZA()()),2&a){const t=n.ngIf,i=e.oxw().ngIf;e.Udp("margin-top",8,"px")("display","flex")("align-items","center")("justify-content",t),e.xp6(1),e.Q6J("ngIf",i.dots),e.xp6(1),e.Udp("pointer-events","auto")("display","flex"),e.xp6(1),e.Q6J("ngIf",i.secondary),e.xp6(1),e.Q6J("ngIf",i.primary)}}function cI(a,n){if(1&a&&(e.TgZ(0,"div",1)(1,"div"),e.YNc(2,Kv,3,36,"ng-container",2),e.YNc(3,nI,5,21,"div",3),e.YNc(4,iI,2,11,"div",4),e.YNc(5,lI,5,15,"div",5),e.qZA()()),2&a){const t=n.ngIf,i=e.oxw();e.Udp("box-sizing","border-box")("max-width",280,"px")("width",t.widthPx,"px")("border-radius",12,"px")("outline","1px solid transparent")("padding-block",i.cardPaddingBlock)("padding-inline",i.cardPaddingInline)("font-size",12,"px")("line-height",1.4)("overflow","visible")("background",i.Color.blackCalloutCard)("color",i.Color.greyCalloutTextPrimary)("box-shadow",i.c
1ardBoxShadow)("margin-top",t.marginTopPx,"px")("margin-bottom",t.marginBottomPx,"px")("margin-left",t.marginLeftPx,"px")("margin-right",t.marginRightPx,"px"),e.xp6(1),e.Udp("position","relative"),e.xp6(1),e.Q6J("ngIf",t.connector),e.xp6(1),e.Q6J("ngIf",t.headline||t.hero||t.showClose),e.xp6(1),e.Q6J("ngIf",t.body),e.xp6(1),e.Q6J("ngIf",t.footerJustify)}}function np(a){if(null==a)return{off:null,cardShiftPx:0};const n=a/2,t=Math.max(12,n);return{off:t,cardShiftPx:t-n}}class Ls extends _e.A{constructor(){super(),this.xmark=y.k9U,this.cardBoxShadow="rgba(0, 0, 0, 0.08) 0px 4px 12px -2px, rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset",this.cardPaddingBlock="10px 12px",this.cardPaddingInline="12px 10px",this.closeAriaLabel=ep.y.translate(this.i18n,ep.y.key.closeButtonAriaLabel),this.action=new e.vpe,this.vm$=this.select((0,$.Cc)(["slots","connector","resolvedSide","anchorWidthPx","anchorHeightPx","stepDots","widthPx"]),(0,p.U)(({slots:n,connector:t,resolvedSide:i,anchorWidthPx:o,anchorHeightPx:s,stepDots:l,widthPx:d})=>this.buildVm(n,t,i,o,s,l,d))),this.set({connector:null,resolvedSide:"BOTTOM",anchorWidthPx:null,anchorHeightPx:null,stepDots:null,widthPx:null})}set slots(n){this.setProperty("slots",n)}set connector(n){this.setProperty("connector",n??null)}set resolvedSide(n){this.setProperty("resolvedSide",n??"BOTTOM")}set anchorWidthPx(n){this.setProperty("anchorWidthPx",n??null)}set anchorHeightPx(n){this.setProperty("anchorHeightPx",n??null)}set stepDots(n){this.setProperty("stepDots",n??null)}set widthPx(n){this.setProperty("widthPx",n??null)}onButtonClick(n){this.action.emit(n.action)}onCloseClick(){this.action.emit({type:jc.b.CALLOUT_DISMISS})}resolve(n){return n&&n.i18n.translate(this.i18n,{key:n.key,params:n.params})||null}buildVm(n,t,i,o,s,l,d){const h=n.heroIcons?.length?{icons:n.heroIcons,color:n.heroIconColor??""}:null,m=this.resolve(n.headline),C=this.resolve(n.subHeadline),S=!0===n.showCloseButton,f=!1!==n.showStepDots&&l&&l.count>1?Array.from({length:l.count},(M,K)=>({active:K===l.activeIndex})):null,E=n.secondaryButton?{def:n.secondaryButton,label:this.resolve(n.secondaryButton.label)??""}:null,Z=n.primaryButton?{def:n.primaryButton,label:this.resolve(n.primaryButton.label)??""}:null,R=!!f||!!E||!!Z,G=R?f?"space-between":"flex-end":null,F=C||R?4:null,{conn:ae,marginTopPx:xe,marginBottomPx:Fe,marginLeftPx:b,marginRightPx:k}=this.buildConnector(i,o,s,t);return{hero:h,headline:m,showClose:S,headerMarginBottomPx:F,body:C,dots:f,secondary:E,primary:Z,footerJustify:G,connector:ae,marginTopPx:xe,marginBottomPx:Fe,marginLeftPx:b,marginRightPx:k,widthPx:d}}buildConnector(n,t,i,o){if(!o)return{conn:null,marginTopPx:null,marginBottomPx:null,marginLeftPx:null,marginRightPx:null};const l=o.lengthPx??18,d=o.dotSizePx??6,h=o.thicknessPx??2,m=l-8,C=-l+"px",S=n.endsWith("_START")?"START":n.endsWith("_END")?"END":"CENTER";if(n.startsWith("BOTTOM")||n.startsWith("TOP")){const xe=n.startsWith("TOP"),Fe="END"===S?10:12,b=1,{off:k,cardShiftPx:M}=np(t),K=We=>"CENTER"===S||null==k?{insetStart:`calc(50% - ${We+b}px)`,insetEnd:null}:"START"===S?{insetStart:k-Fe-We+"px",insetEnd:null}:{insetStart:null,insetEnd:k-Fe-We+"px"},Oe=()=>xe?{top:null,bottom:C}:{top:C,bottom:null};return{conn:{line:{...Oe(),...K(h/2),widthPx:h,heightPx:l,radiusPx:0},dot:{...Oe(),...K(d/2),widthPx:d,heightPx:d,radiusPx:d}},marginTopPx:xe?null:m,marginBottomPx:xe?m:null,marginLeftPx:"START"===S&&M>0?-M:null,marginRightPx:"END"===S&&M>0?-M:null}}const f=n.startsWith("LEFT"),E="END"===S?12:10,{off:R,cardShiftPx:G}=np(i),F=xe=>"CENTER"===S||null==R?{top:`calc(50% - ${xe+-1}px)`,bottom:null}:"START"===S?{top:R-E-xe+"px",bottom:null}:{top:null,bottom:R-E-xe+"px"},ae=()=>f?{insetStart:null,insetEnd:C}:{insetStart:C,insetEnd:null};return{conn:{line:{...F(h/2),...ae(),widthPx:l,heightPx:h,radiusPx:0},dot:{...F(d/2),...ae(),widthPx:d,heightPx:d,radiusPx:d}},marginTopPx:"START"===S&&G>0?-G:null,marginBottomPx:"END"===S&&G>0?-G:null,marginLeftPx:f?null:m,marginRightPx:f?m:null}}static#e=this.\u0275fac=function(t){return new(t||Ls)};static#t=this.\u0275cmp=e.Xpm({type:Ls,selectors:[["t5s-callout-card"]],inputs:{slots:"slots",connector:"connector",resolvedSide:"resolvedSide",anchorWidthPx:"anchorWidthPx",anchorHeightPx:"anchorHeightPx",stepDots:"stepDots",widthPx:"widthPx"},outputs:{action:"action"},features:[e.qOj],decls:2,vars:3,consts:[["data-cy","t5s-callout-card",3,"box-sizing","max-width","width","border-radius","outline","padding-block","padding-inline","font-size","line-height","overflow","background","color","box-shadow","margin-top","margin-bottom","margin-left","margin-right",4,"ngIf"],["data-cy","t5s-callout-card"],[4,"ngIf"],[3,"display","justify-content","margin-bottom",4,"ngIf"],[3,"color","line-height","o
1pacity","font-weight","padding-inline-end",4,"ngIf"],[3,"margin-top","display","align-items","justify-content",4,"ngIf"],[3,"display","gap",4,"ngIf"],[3,"font-weight",4,"ngIf"],["type","button","data-cy","t5s-callout-card-close-btn",3,"t5sClickableElement","width","height","border-radius","display","align-items","justify-content","flex-shrink","opacity","transition","click",4,"ngIf"],[3,"icon","size","fgColor","display",4,"ngFor","ngForOf","ngForTrackBy"],[3,"icon","size","fgColor"],["type","button","data-cy","t5s-callout-card-close-btn",3,"t5sClickableElement","click"],[3,"display","align-items","gap",4,"ngIf"],["type","button",3,"t5sClickableElement","padding","font","border-radius","color","opacity","user-select","transition","click",4,"ngIf"],["type","button",3,"t5sClickableElement","padding","font","border-radius","color","user-select","transition","click",4,"ngIf"],["viewBox","5.5 0 5.01 16","aria-hidden","true",3,"display","width","height","fill",4,"ngFor","ngForOf","ngForTrackBy"],["viewBox","5.5 0 5.01 16","aria-hidden","true"],["d","M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"],["type","button",3,"t5sClickableElement","click"]],template:function(t,i){1&t&&(e.YNc(0,cI,6,40,"div",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.vm$))},dependencies:[u.sg,u.O5,le.H,oe.v,u.Ov],encapsulation:2,changeDetection:0})}const dI=["ghostAnchor"],_I=["cardTpl"];function uI(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"div",3)(1,"t5s-callout-card",4),e.NdJ("action",function(o){e.CHM(t);const s=e.oxw(2);return e.KtG(s.action.emit(o))}),e.qZA()()}if(2&a){const t=n.ngIf,i=e.oxw(2);e.Udp("pointer-events","auto"),e.uIk("aria-label",i.dialogAriaLabel),e.xp6(1),e.Q6J("slots",t.slots)("connector",t.connector)("resolvedSide",t.resolvedSide)("anchorWidthPx",t.anchorWidthPx)("anchorHeightPx",t.anchorHeightPx)("stepDots",t.stepDots)("widthPx",t.widthPx)}}function hI(a,n){if(1&a&&(e.YNc(0,uI,2,10,"div",2),e.ALo(1,"async")),2&a){const t=e.oxw();e.Q6J("ngIf",e.lcZ(1,1,t.vm$))}}function xI(a,n){if(!a)return;let t=0,i=a.parentElement;for(;i&&i!==document.body;){const o=getComputedStyle(i).zIndex;if("auto"!==o){const s=parseInt(o,10);Number.isNaN(s)||(t=s)}i=i.parentElement}return t+(n??100)}class Ns extends _e.A{constructor(n,t,i,o,s){super(),this.registry=n,this.tracker=t,this.overlay=i,this.viewContainerRef=o,this.ngZone=s,this.currentPlacement="BOTTOM",this.anchorRegistered=!1,this.action=new e.vpe,this.anchorTimeout=new e.vpe,this.vm$=this.select((0,$.Cc)(["slots","connector","resolvedSide","stepDots","widthPx","anchorWidthPx","anchorHeightPx"])),this.anchorId$=this.select((0,$.Cc)(["anchorId"]),(0,p.U)(({anchorId:l})=>l),(0,w.x)()),this.backdropRegion$=this.select((0,$.Cc)(["backdropRegion"]),(0,p.U)(({backdropRegion:l})=>l),(0,w.x)()),this.rect$=this.anchorId$.pipe((0,L.w)(l=>this.registry.anchor$(l).pipe((0,L.w)(d=>d?this.tracker.track(d.getElement,{radiusCssOverride:d.radiusCss,outset:d.ringOutset}):(0,Ha.of)(void 0)))),(0,Y.d)({bufferSize:1,refCount:!0})),this.reg$=this.anchorId$.pipe((0,L.w)(l=>this.registry.anchor$(l)),(0,Y.d)({bufferSize:1,refCount:!0})),this.set({connector:null,stepDots:null,widthPx:null,anchorGapPx:null,showRing:!0,anchorWaitMs:2e3,stepToken:null,resolvedSide:"BOTTOM",anchorWidthPx:null,anchorHeightPx:null,backdropRegion:null})}set anchorId(n){this.setProperty("anchorId",n)}set slots(n){this.setProperty("slots",n)}set connector(n){this.setProperty("connector",n??null)}set stepDots(n){this.setProperty("stepDots",n??null)}set widthPx(n){this.setProperty("widthPx",n??null)}set anchorGapPx(n){this.setProperty("anchorGapPx",n??null)}set showRing(n){this.setProperty("showRing",n??!0)}set anchorWaitMs(n){this.setProperty("anchorWaitMs",n??2e3)}set stepToken(n){this.setProperty("stepToken",n??null)}set backdropRegion(n){this.setProperty("backdropRegion",n??null)}ngAfterViewInit(){const n=this.ghostAnchorRef.nativeElement;this.hold(this.overlay.resolvedSide$,t=>this.setProperty("resolvedSide",t)),this.hold(this.rect$,t=>this.applyRect(n,t)),this.hold(this.reg$,t=>{const i=t?.ring;if(i!==this.currentRing&&(this.currentRing?.setVisible(!1),this.currentRing=i,i?.setRect(this.lastRect)),this.anchorRegistered=!!t,t){this.currentPlacement=t.placement??"BOTTOM",this.currentGetAnchorEl=t.getElement,this.currentZOffset=t.zOffset,this.currentGapPx=t.gapPx,this.currentScrollAlign=t.scrollAlign;const o=t.getElement();o&&qc(o,t.scrollAlign??"center")}this.lastRect=void 0,this.overlay.close(),this.reconcile()}),this.hold(this.select((0,$.Cc)(["stepToken"]),(0,p.U)(({stepToken:t})=>t),(0,w.x)()),()=>this.currentRing?.restartPulse()),this.hold(this.backdropRegion$.pipe((0,L.w)(t=>t?this.registry.anchor$(t).pipe((0,p.U)(i=>i?.getElement)):(0,Ha.of)(void 0)),(0,w.x)()),t=>{this.currentScrim?.destroy(),this.currentScrim=t?new Vv(t):void 0,this.lastRect&&(this.currentScrim?.setAnchorRect(this.lastRect),this.currentScrim?.setVisible(!0)),this.reconcile()}),this.hold((0,V.aj)([this.reg$,this.select((0,$.Cc)(["anchorWaitMs","stepToken"]))]).pipe((0,L.w)(([t,{anchorWaitMs:i}])=>t?Ja.E:(0,zv.H)(i))),()=>this.ngZone.run(()=>this.anchorTimeout.emit())),this.ngZone.runOutsideAngular(()=>
1{const t=window.visualViewport,i=t?(0,mn.T)((0,Ve.R)(window,"resize"),(0,Ve.R)(t,"resize")):(0,Ve.R)(window,"resize");this.hold(i.pipe((0,lt.b)(150)),()=>{const o=this.currentGetAnchorEl?.();o&&qc(o,this.currentScrollAlign??"center")})})}applyRect(n,t){if(this.lastRect=t,this.currentRing?.setRect(t),t){const{anchorWidthPx:i,anchorHeightPx:o}=this.get();if((t.width!==i||t.height!==o)&&this.ngZone.run(()=>this.set({anchorWidthPx:t.width,anchorHeightPx:t.height})),n.style.top=`${t.y}px`,n.style.left=`${t.x}px`,n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,this.overlay.isOpen())this.overlay.setOriginPoint({x:t.x,y:t.y,width:t.width,height:t.height});else{const{connector:s,anchorGapPx:l}=this.get();this.overlay.open({content:this.cardTpl,viewContainerRef:this.viewContainerRef,hostEl:n,placement:this.currentPlacement,offsetY:this.currentGapPx??l??(s?0:12),hasConnector:!!s,zIndex:xI(this.currentGetAnchorEl?.(),this.currentZOffset)})}}t&&(this.currentScrim?.setAnchorRect(t),this.currentScrim?.setVisible(!0)),this.reconcile()}reconcile(){const n=this.lastRect,{showRing:t}=this.get(),i=this.anchorRegistered&&!!n&&this.overlay.isOpen()&&function gI(a){return a.y+a.height>0&&a.y<window.innerHeight&&a.x+a.width>0&&a.x<window.innerWidth}(n);this.overlay.setOverlayVisibility(i),this.currentRing?.setVisible(i&&t)}ngOnDestroy(){this.currentRing?.setVisible(!1),this.currentScrim?.destroy(),super.ngOnDestroy()}static#e=this.\u0275fac=function(t){return new(t||Ns)(e.Y36(gr.ej),e.Y36(Yo),e.Y36($i),e.Y36(e.s_b),e.Y36(e.R0b))};static#t=this.\u0275cmp=e.Xpm({type:Ns,selectors:[["t5s-callout-anchored-host"]],viewQuery:function(t,i){if(1&t&&(e.Gf(dI,7),e.Gf(_I,7)),2&t){let o;e.iGM(o=e.CRH())&&(i.ghostAnchorRef=o.first),e.iGM(o=e.CRH())&&(i.cardTpl=o.first)}},inputs:{dialogAriaLabel:"dialogAriaLabel",anchorId:"anchorId",slots:"slots",connector:"connector",stepDots:"stepDots",widthPx:"widthPx",anchorGapPx:"anchorGapPx",showRing:"showRing",anchorWaitMs:"anchorWaitMs",stepToken:"stepToken",backdropRegion:"backdropRegion"},outputs:{action:"action",anchorTimeout:"anchorTimeout"},features:[e._Bn(Gv),e.qOj],decls:4,vars:6,consts:[["ghostAnchor",""],["cardTpl",""],["role","dialog",3,"pointer-events",4,"ngIf"],["role","dialog"],[3,"slots","connector","resolvedSide","anchorWidthPx","anchorHeightPx","stepDots","widthPx","action"]],template:function(t,i){1&t&&(e._UZ(0,"div",null,0),e.YNc(2,hI,2,3,"ng-template",null,1,e.W1O)),2&t&&e.Udp("position","fixed")("pointer-events","none")("opacity",0)},dependencies:[u.O5,Ls,u.Ov],encapsulation:2,changeDetection:0})}function bI(a,n){if(1&a){const t=e.EpF();e.TgZ(0,"t5s-callout-anchored-host",1),e.NdJ("action",function(o){e.CHM(t);const s=e.oxw();return e.KtG(s.onAction(o))})("anchorTimeout",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onAnchorTimeout())}),e.qZA()}if(2&a){const t=n.ngIf;e.Q6J("anchorId",t.anchorId)("slots",t.slots)("connector",t.connector)("stepDots",t.stepDots)("showRing",t.showRing)("backdropRegion",t.backdropRegion)("anchorWaitMs",t.anchorWaitMs)("stepToken",t.stepId)}}class Rs extends _e.A{constructor(n){super(),this.store$=n,this.view$=0===Zs.Py.length?Ja.E:this.store$.select(Lt.im),0!==Zs.Py.length&&(this.connect("runtime",this.store$.select(Lt.BC)),this.connect("contextScalars",this.store$.select(Lt.Kw)),this.connect("activeUserId",this.store$.select(vt.Ux)))}onAction(n){const{runtime:t,contextScalars:i}=this.get();if(!t||!i||void 0===t.activeCalloutKey||void 0===t.activeStepId)return;const o=Zs.Py.find(l=>l.key===t.activeCalloutKey);if(!o)return;const s=(0,Rn.Je)(n,o,t.activeStepId,(0,Rn.hK)(i));this.applyOutcome(s,o,t.activeStepId,t.runId,!0)}onAnchorTimeout(){const{runtime:n,contextScalars:t}=this.get();if(!n||!t||void 0===n.activeCalloutKey||void 0===n.activeStepId)return;const i=Zs.Py.find(s=>s.key===n.activeCalloutKey),o=i?.steps.find(s=>s.id===n.activeStepId);if(i&&o)if("SKIP"===(0,Rn.b6)(i,o)){const s=(0,Rn.Je)({type:jc.b.STEP_NEXT},i,n.activeStepId,(0,Rn.hK)(t));this.applyOutcome(s,i,n.activeStepId,n.runId,!1)}else this.store$.dispatch(Lt.ki.closeCallout({calloutKey:i.key,runId:n.runId,terminal:!0}))}applyOutcome(n,t,i,o,s){switch(n.kind){case"GO_TO_STEP":this.store$.dis
1patch(Lt.ki.goToStep({calloutKey:t.key,stepId:n.stepId,runId:o})),s&&(this.persist(t,"active",n.stepId),this.recordStepAnalytics(t,n.stepId));break;case"PERSIST_TERMINAL":this.store$.dispatch(Lt.ki.closeCallout({calloutKey:t.key,runId:o,terminal:!0})),s&&(this.persist(t,n.status,i),this.recordTerminalAnalytics(t,n.status,i));break;case"END_SESSION":this.store$.dispatch(Lt.ki.closeCallout({calloutKey:t.key,runId:o,terminal:!0}))}}persist(n,t,i){const o=this.get().activeUserId;void 0!==o&&this.store$.dispatch(Lt.ki.persistCalloutProgress({calloutKey:n.key,progress:{status:t,stepId:i,version:n.version,updatedAt:Date.now()},activeUserId:o}))}recordStepAnalytics(n,t){const{activeUserId:i}=this.get();void 0!==i&&this.store$.dispatch(Lt.ki.recordCalloutAnalytics({calloutKey:n.key,event:{kind:"STEP",stepId:t,stepIndex:this.stepIndexOf(n,t)},version:n.version,activeUserId:i}))}recordTerminalAnalytics(n,t,i){const{activeUserId:o}=this.get();if(void 0===o)return;const s=this.stepIndexOf(n,i);this.store$.dispatch(Lt.ki.recordCalloutAnalytics({calloutKey:n.key,event:{kind:"TERMINAL",outcome:"completed"===t?"completed":0===s?"cancelled":"dismissed",stepId:i,stepIndex:s},version:n.version,activeUserId:o}))}stepIndexOf(n,t){const{contextScalars:i}=this.get();if(!i)return 0;const o=(0,Rn.Bo)(n,(0,Rn.hK)(i)).findIndex(s=>s.id===t);return-1===o?0:o}static#e=this.\u0275fac=function(t){return new(t||Rs)(e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:Rs,selectors:[["t5s-callout-host"]],features:[e.qOj],decls:2,vars:3,consts:[[3,"anchorId","slots","connector","stepDots","showRing","backdropRegion","anchorWaitMs","stepToken","action","anchorTimeout",4,"ngIf"],[3,"anchorId","slots","connector","stepDots","showRing","backdropRegion","anchorWaitMs","stepToken","action","anchorTimeout"]],template:function(t,i){1&t&&(e.YNc(0,bI,1,8,"t5s-callout-anchored-host",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,i.view$))},dependencies:[u.O5,Ns,u.Ov],encapsulation:2,changeDetection:0})}class Qi extends ce.Ax{constructor(){super(...arguments),this.layer=ce.mh.GLOBAL_SEARCH_MODAL_POPOVER}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Qi)))(i||Qi)}}();static#t=this.\u0275prov=e.Yz7({token:Qi,factory:Qi.\u0275fac})}class Ps extends tt.I{constructor(n,t){super(),this.actions$=n,this.store$=t,this.lookup$=this.store$.select(Ne.dZ),this.loadingState$=this.store$.select(Ne.u$),this.searchResults$=this.store$.select(Ne.XC),this.userRecentlyVisitedEdges$=this.store$.select(Ne.Fx),this.hold(this.actions$.pipe((0,_.l4)(Ne.xA.openModal)),()=>this.view?.openModal()),this.hold(this.actions$.pipe((0,_.l4)(Ne.xA.reset)),()=>this.view?.resetState())}openBlabItem({blabItem:n,newTab:t}){this.store$.dispatch(Ne.xA.openBlabItem({blabItem:n,newTab:t})),t||this.view?.closeModal()}openModalChange({openModal:n}){n?this.store$.dispatch(Ne.xA.openModal()):this.view?.closeModal()}modalOpenChange({modalOpen:n}){this.store$.dispatch(Ne.xA.setModalOpenState({modalOpen:n}))}openBlabDef({blabDef:n,newTab:t}){this.store$.dispatch(Ne.xA.openBlabDef({blabDef:n,newTab:t})),t||this.view?.closeModal()}searchInputChange({input:n,mode:t}){this.store$.dispatch(Ne.xA.requestGetSearchResults({input:n,mode:t}))}loadMore(){this.store$.dispatch(Ne.xA.requestGetMoreSearchResults())}closeClick(){this.view?.closeModal()}static#e=this.\u0275fac=function(t){return new(t||Ps)(e.Y36(_.eX),e.Y36(g.yh))};static#t=this.\u0275cmp=e.Xpm({type:Ps,selectors:[["t5s-global-search-page"]],viewQuery:function(t,i){if(1&t&&e.Gf(Vn,5),2&t){let o;e.iGM(o=e.CRH())&&(i.view=o.first)}},features:[e._Bn([{provide:$t.Xj,useClass:Qi},$t.aV,ce.F0]),e.qOj],decls:1,vars:4,consts:[[3,"lookup","loadingState","searchResults","userRecentlyVisitedEdges","loadMore","closeClick","openBlabDef","openBlabItem","searchInputChange","openModalChange","modalOpenChange"]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-global-search-view",0),e.NdJ("loadMore",function(){return i.loadM
1ore()})("closeClick",function(){return i.closeClick()})("openBlabDef",function(s){return i.openBlabDef(s)})("openBlabItem",function(s){return i.openBlabItem(s)})("searchInputChange",function(s){return i.searchInputChange(s)})("openModalChange",function(s){return i.openModalChange(s)})("modalOpenChange",function(s){return i.modalOpenChange(s)}),e.qZA()),2&t&&e.Q6J("lookup",i.lookup$)("loadingState",i.loadingState$)("searchResults",i.searchResults$)("userRecentlyVisitedEdges",i.userRecentlyVisitedEdges$)},dependencies:[Vn],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}const CI=["modalOutlet"],vI=["elevatedModalOutlet"],II=["fullPageModalOutlet"],yI=["rootModalOutlet"],kI=["rootModalOverlayOutlet"],wI=["rootModalSecondaryOverlayOutlet"];let _l=class bl extends hn.R{constructor(n,t,i,o){super(),this.store$=n,this.splashScreenService=t,this.userSidebarRouter=i,this.loggedInRootMainContentWidth$$=o,this.fullPageModalOutletActivated$$=new Ke.X(!1),this.rootModalOutletActivated$$=new Ke.X(!1),this.rootModalOverlayOutletActivated$$=new Ke.X(!1),this.rootModalSecondaryOverlayOutletActivated$$=new Ke.X(!1),this.modalOutletActivated$$=new Ke.X(!1),this.elevatedModalOutletActivated$$=new Ke.X(!1),this.userSidebarOutletActivated$=this.userSidebarRouter.isActivated$,this.fullPageModalOutletActivated$=this.fullPageModalOutletActivated$$.asObservable(),this.rootModalOutletActivated$=this.rootModalOutletActivated$$.asObservable(),this.rootModalOverlayOutletActivated$=this.rootModalOverlayOutletActivated$$.asObservable(),this.rootModalSecondaryOverlayOutletActivated$=this.rootModalSecondaryOverlayOutletActivated$$.asObservable(),this.modalOutletActivated$=this.modalOutletActivated$$.asObservable(),this.elevatedModalOutletActivated$=this.elevatedModalOutletActivated$$.asObservable(),this.orgSidebarExpanded$=Ja.E,this.orgSidebarWidth$=Ja.E,this.mainModalBlabItemUpsertActive$=this.store$.select(t1.qp).pipe((0,p.U)(s=>s?.[J.pA]?.includes(J.xF.records)??!1)),setTimeout(()=>{n.dispatch(ic.Tw.loadSubscribeBubbles()),n.dispatch(n1.I.subscribeStatuses()),n.dispatch(e1.Y.subscribe()),n.dispatch(Xf.N.enableAnchorClickInterception())})}ngAfterViewInit(){this.initializeOutletObservables(),this.hold(this.store$.select(Er.kn).pipe((0,en.V)(),(0,si.P)()),()=>{requestAnimationFrame(()=>{this.splashScreenService.hide()})})}initializeOutletObservables(){if(!this.fullPageModalOutlet)throw new Error("Full page modal router outlet not found.");if((0,ai.ab)(this.fullPageModalOutlet).pipe((0,Ft.s)(this)).subscribe(this.fullPageModalOutletActivated$$),!this.rootModalOutlet)throw new Error("Root modal router outlet not found.");if((0,ai.ab)(this.rootModalOutlet).pipe((0,Ft.s)(this)).subscribe(this.rootModalOutletActivated$$),!this.rootModalOverlayOutlet)throw new Error("Root modal overlay router outlet not found.");if((0,ai.ab)(this.rootModalOverlayOutlet).pipe((0,Ft.s)(this)).subscribe(this.rootModalOverlayOutletActivated$$),(0,ai.ab)(this.rootModalSecondaryOverlayOutlet).pipe((0,Ft.s)(this)).subscribe(this.rootModalSecondaryOverlayOutletActivated$$),!this.modalOutlet)throw new Error("Main modal overlay router outlet not found.");if((0,ai.ab)(this.modalOutlet).pipe((0,Ft.s)(this)).subscribe(this.modalOutletActivated$$),!this.elevatedModalOutlet)throw new Error("Elevated main modal overlay router outlet not found.");(0,ai.ab)(this.elevatedModalOutlet).pipe((0,Ft.s)(this)).subscribe(this.elevatedModalOutletActivated$$)}handleMainContentRendered(n){this.loggedInRootMainContentWidth$$.next({width:n.width})}handleMainContentResize(n){this.loggedInRootMainContentWidth$$.next({width:n.width})}static#e=this.\u0275fac=function(t){return new(t||bl)(e.Y36(g.yh),e.Y36(nc.h),e.Y36(Ga.N),e.Y36($a.Z))};static#t=this.\u0275cmp=e.Xpm({type:bl,selectors:[["t5s-logged-in-root"]],viewQuery:function(t,i){if(1&t&&(e.Gf(CI,5),e.Gf(vI,5),e.Gf(II,7),e.Gf(yI,7),e.Gf(kI,7),e.Gf(wI,7)),2&t){let o;e.iGM(o=e.CRH())&&(i.modalOutlet=o.first),e.iGM(o=e.CRH())&&(i.elevatedModalOutlet=o.first),e.iGM(o=e.CRH())&&(i.fullPageModalOutlet=o.first),e.iGM(o=e.CRH())&&(i.rootModalOutlet=o.first),e.iGM(o=e.CRH())&&(i.rootMod
1alOverlayOutlet=o.first),e.iGM(o=e.CRH())&&(i.rootModalSecondaryOverlayOutlet=o.first)}},features:[e.qOj],decls:34,vars:24,consts:[[1,"t5s-web-client-block-mouse-interaction",3,"mainModalActive","elevatedMainModalActive","fullPageModalActive","rootModalActive","rootModalOverlayActive","rootModalSecondaryOverlayActive","userSidebarActive","mainModalBlabItemUpsertActive"],["logged-in-root-organization-sidebar-new",""],["logged-in-root-main-content",""],["data-intercom-target","Main area",3,"t5sElementRendered","t5sResizeObserver"],["logged-in-root-main-modal",""],["name","main-modal"],["modalOutlet","outlet"],["logged-in-root-elevated-main-modal",""],["name","elevated-main-modal"],["elevatedModalOutlet","outlet"],["logged-in-root-global-search-modal",""],["logged-in-root-main-toast-container",""],["logged-in-root-full-page-modal",""],["name","full-page-modal"],["fullPageModalOutlet","outlet"],["logged-in-root-root-modal",""],["name","root-modal"],["rootModalOutlet","outlet"],["logged-in-root-root-modal-overlay",""],["name","root-modal-overlay"],["rootModalOverlayOutlet","outlet"],["logged-in-root-root-modal-secondary-overlay",""],["name","root-modal-secondary-overlay"],["rootModalSecondaryOverlayOutlet","outlet"],["logged-in-root-user-toolbar",""],["data-intercom-target","User toolbar"],["logged-in-root-user-sidebar",""],["logged-in-root-root-toast",""],["logged-in-root-callout-host",""]],template:function(t,i){1&t&&(e.TgZ(0,"t5s-logged-in-root-view",0),e.ynx(1,1),e._UZ(2,"t5s-organization-sidebar-page"),e.BQk(),e.ynx(3,2),e.TgZ(4,"t5s-main",3),e.NdJ("t5sElementRendered",function(s){return i.handleMainContentRendered(s)})("t5sResizeObserver",function(s){return i.handleMainContentResize(s)}),e.qZA(),e.BQk(),e.ynx(5,4),e._UZ(6,"router-outlet",5,6),e.BQk(),e.ynx(8,7),e._UZ(9,"router-outlet",8,9),e.BQk(),e.ynx(11,10),e._UZ(12,"t5s-global-search-page"),e.BQk(),e.GkF(13,11),e.ynx(14,12),e._UZ(15,"router-outlet",13,14),e.BQk(),e.ynx(17,15),e._UZ(18,"router-outlet",16,17),e.BQk(),e.ynx(20,18),e._UZ(21,"router-outlet",19,20),e.BQk(),e.ynx(23,21),e._UZ(24,"router-outlet",22,23),e.BQk(),e.ynx(26,24),e._UZ(27,"t5s-user-toolbar",25),e.BQk(),e.ynx(28,26),e._UZ(29,"t5s-user-sidebar-outlet"),e.BQk(),e.ynx(30,27),e._UZ(31,"t5s-root-toast-container"),e.BQk(),e.ynx(32,28),e._UZ(33,"t5s-callout-host"),e.BQk(),e.qZA()),2&t&&(e.Udp("width","100%")("height","100%"),e.Q6J("mainModalActive",i.modalOutletActivated$)("elevatedMainModalActive",i.elevatedModalOutletActivated$)("fullPageModalActive",i.fullPageModalOutletActivated$)("rootModalActive",i.rootModalOutletActivated$)("rootModalOverlayActive",i.rootModalOverlayOutletActivated$)("rootModalSecondaryOverlayActive",i.rootModalSecondaryOverlayOutletActivated$)("userSidebarActive",i.userSidebarOutletActivated$)("mainModalBlabItemUpsertActive",i.mainModalBlabItemUpsertActive$),e.xp6(2),e.Udp("max-width","fit-content"),e.xp6(2),e.Udp("height","100%")("width","100%"),e.xp6(25),e.Udp("display","block")("width",100,"%")("height",100,"%"))},dependencies:[B.lC,Va,Wa,Ya,as,Ms,Rs,Uo,wn.v,Ps],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})};_l=(0,Ot.gn)([(0,oi.c)(),(0,Ot.w6)("design:paramtypes",[g.yh,nc.h,Ga.N,$a.Z])],_l);var SI=r(48902),UI=r(44631),OI=r(16358);class Fi{constructor(n,t,i){this.router=n,this.store$=t,this.runtimeUrl=i}canActivate({params:n,queryParams:t,fragment:i}){const o=n.blabItemId,s=n[J.F_.organizationSlug];if(!o||!s)return!1;const l=(0,hs.GJ)(o),d=(0,OI.kn)({blabItemId:l,runtimeUrl:"",orgSlug:s}),h=this.router.parseUrl(d);return h.queryParams=t,h.fragment=i,h}static#e=this.\u0275fac=function(t){return new(t||Fi)(e.LFG(B.F0),e.LFG(g.yh),e.LFG(UI.W))};static#t=this.\u0275prov=e.Yz7({token:Fi,factory:Fi.\u0275fac})}const EI=[{path:`:${J.F_.organizationSlug}/record/:blabItemId`,canActivate:[Fi],children:[]}];var on=r(16251),DI=r(92016);const ht=J.N6,{organizationUserManage:BI}=DI.R,LI=[{path:`:${J.F_.organizationSlug}`,loadChildren:()=>r.e(194).then(r.bind(r,80194)).then(a=>a.ContentNotFoundPageModule)},{path:`:${J.F_.organizationSlug}`,loadChildren:()=>Promise.all([r.e(2923),r.e(5386)]).then(r.bind(r,15386)).then(a=>a.SharelinkDuplicateLegacyPageModule),data:{preload:!0}},...EI,{path:`:${J.F_.organizationSlug}`,component:_l,canActivate:[Oo.E2,Oo.uM,Oo.cf],children:[...Bs.Ue,...Bs.RT,...SI.xz,...qf,...at.tf,{outlet:ht,path:J.QV.fragment,loadChildren:()=>Promise.all([r.e(485),r.e(6447)]).then(r.bind(r,82042)).then(a=>
1a.WorkspaceSettingsPageModule),data:{preload:!0}},{outlet:ht,path:J.qJ.fragment,loadChildren:()=>Promise.all([r.e(6926),r.e(1780)]).then(r.bind(r,71780)).then(a=>a.UserSettingsMultiFactorAuthenticationPageModule),data:{[on.e0.preloadWhenActive]:[at.aX]}},{outlet:ht,path:J.Av.fragment,loadChildren:()=>Promise.all([r.e(948),r.e(5533)]).then(r.bind(r,55533)).then(a=>a.PersonalAccessTokenCreatePageModule),data:{[on.e0.preloadWhenActive]:[at.GQ,at.Xt]}},{outlet:ht,path:J.Vj.fragment,loadChildren:()=>r.e(158).then(r.bind(r,20158)).then(a=>a.PersonalAccessTokenRenamePageModule),data:{[on.e0.preloadWhenActive]:[at.GQ,at.Xt]}},{outlet:ht,path:J.U6.fragment,data:{[on.e0.preloadWhenActive]:[at.x8]},loadChildren:()=>Promise.all([r.e(7943),r.e(7091),r.e(1409),r.e(913),r.e(3161),r.e(6327)]).then(r.bind(r,46327)).then(a=>a.SettingsIntegrationDetailPageModule)},{outlet:ht,path:J.bn.fragment,data:{[on.e0.preloadWhenActive]:[at.$A]},loadChildren:()=>Promise.all([r.e(7943),r.e(7091),r.e(1409),r.e(913),r.e(3161),r.e(7936)]).then(r.bind(r,57936)).then(a=>a.SettingsOrganizationSlugPageModule)},{outlet:ht,path:J.ir.fragment,loadChildren:()=>Promise.all([r.e(7943),r.e(7091),r.e(1409),r.e(913),r.e(3161),r.e(7928)]).then(r.bind(r,47928)).then(a=>a.SettingsChangeEmailPageModule),data:{[on.e0.preloadWhenActive]:[at.aX]}},{outlet:ht,path:J.Fd.fragment,loadChildren:()=>Promise.all([r.e(7943),r.e(7091),r.e(1409),r.e(913),r.e(3161),r.e(2408)]).then(r.bind(r,22408)).then(a=>a.SettingsEditProfilePageModule),data:{[on.e0.preloadWhenActive]:[at.aX]}},{outlet:ht,path:J.c5.fragment,loadChildren:()=>Promise.all([r.e(7943),r.e(7091),r.e(1409),r.e(913),r.e(3161),r.e(8592),r.e(1081)]).then(r.bind(r,71081)).then(a=>a.SettingsChangePasswordPageModule),data:{[on.e0.preloadWhenActive]:[at.aX]}},{outlet:ht,path:J.$b.fragment,data:{[on.e0.preloadWhenActive]:[at.zK]},loadChildren:()=>Promise.all([r.e(9125),r.e(1850)]).then(r.bind(r,11850)).then(a=>a.OrganizationInvitationPageModule)},{outlet:ht,path:J.zI.fragment,loadChildren:()=>Promise.all([r.e(2050),r.e(9125),r.e(7723)]).then(r.bind(r,37723)).then(a=>a.OrganizationShareWorkspacePublishPageModule)},{outlet:ht,path:BI.editUserInfo,loadChildren:()=>r.e(8640).then(r.bind(r,88640)).then(a=>a.EditUserInfoPageModule)},{outlet:ht,path:J.$L.fragment,loadChildren:()=>r.e(2632).then(r.bind(r,52632)).then(a=>a.WorkspaceCreatePageModule),data:{preload:!0}},{outlet:ht,path:J.Nj.fragment,loadChildren:()=>r.e(1389).then(r.bind(r,51389)).then(a=>a.WorkspaceDuplicatePageModule),data:{preload:!0}},{outlet:ht,path:J.mC.fragment,loadChildren:()=>r.e(1234).then(r.bind(r,51234)).then(a=>a.BlabDefDuplicatePageModule),data:{preload:!0}},{outlet:J.fy,path:J.V4.fragment,loadChildren:()=>r.e(8480).then(r.bind(r,8480)).then(a=>a.WorkspaceInvitationPageModule),data:{preload:!0}},{path:"**",redirectTo:`${J.Mw.home}`,pathMatch:"full"}]},{path:"",canActivate:[Oo.jt],children:[]}];class $s{static#e=this.\u0275fac=function(t){return new(t||$s)};static#t=this.\u0275mod=e.oAB({type:$s});static#n=this.\u0275inj=e.cJS({imports:[u.ez,hr.n,ur.BV,ce.df]})}class zs{static#e=this.\u0275fac=function(t){return new(t||zs)};static#t=this.\u0275mod=e.oAB({type:zs});static#n=this.\u0275inj=e.cJS({imports:[u.ez,$s]})}class Qs{static#e=this.\u0275fac=function(t){return new(t||Qs)};static#t=this.\u0275mod=e.oAB({type:Qs});static#n=this.\u0275inj=e.cJS({})}var Pn=r(95777),Fs=r(48915);class Gs{static#e=this.\u0275fac=function(t){return new(t||Gs)};static#t=this.\u0275mod=e.oAB({type:Gs});static#n=this.\u0275inj=e.cJS({imports:[u.ez,me.TI,Mt.p]})}class Js{static#e=this.\u0275fac=function(t){return new(t||Js)};static#t=this.\u0275mod=e.oAB({type:Js});static#n=this.\u0275inj=e.cJS({imports:[u.ez,me.TI,me.FG,te.U,_n.qF,kc.M,Gs,Mt.p,ke.Z]})}class In{static#e=this.\u0275fac=function(t){return new(t||In)};static#t=this.\u0275mod=e.oAB({type:In});static#n=this.\u0275inj=e.cJS({imports:[u.ez]})}class yn{static#e=this.\u0275fac=function(t){return new(t||yn)};static#t=this.\u0275mod=e.oAB({type:yn});static#n=this.\u0275inj=e.cJS({imports:[u.ez]})}class Gi{static#e=this.\u0275fac=function(t){return new(t||Gi)};static#t=this.\u0275mod=e.oAB({type:Gi});static#n=this.\u0275inj=e.cJS({imports:[me.TI,_n.qF,Fs.y,Js,En.z,In,yn,Pn.wO,Ea.r,_n.qF,me.FG,Mt.p]})}class Ji extends ce.Ax{constructor(){super(...arguments),this.layer=ce.mh.USER_SIDEBAR_POPOVER}static#e=this.\u0275fac=function(){let n;return function(i){return(n||(n=e.n5z(Ji)))(i||Ji)}}();static#t=this.\u0275prov=e.Yz7({token:Ji,factory:Ji.\u0275fac})}class Hi{static#e=this.\u0275fac=function(t){return new(t||Hi)};static#t=this.\u0275mod=e.oAB({type:Hi});static#n=this.\u0275inj=e.cJS({providers:[{provide:$t.Xj,useClass:Ji}],imports:[Dn.b,Dn.b,In,yn]})}var NI=r(9e3);class Hs{static#e=this.\u0275fac=function(t){return new(t||Hs)};static#t=this.\u0275mod=e.oAB({type:Hs});static#n=this.\u0275inj=e.cJS({imports:[me.TI,In,yn,Pn.wO,NI.U,Mt.p]})}const RI=(0,g.P1)(Wr.Mg,a=>
1{if(a)return(0,hs.Lk)(a[Dt.CALENDAR_REMINDER_ID])});class jo{constructor(n,t){this.actions$=n,this.store$=t,this.loadConversationActivities$=(0,_.GW)(()=>this.store$.select(RI).pipe((0,z.M3)(),(0,p.U)(i=>Be.qn.loadReminderDetail({reminderId:i}))))}static#e=this.\u0275fac=function(t){return new(t||jo)(e.LFG(_.eX),e.LFG(g.yh))};static#t=this.\u0275prov=e.Yz7({token:jo,factory:jo.\u0275fac})}class qo{static#e=this.\u0275fac=function(t){return new(t||qo)};static#t=this.\u0275mod=e.oAB({type:qo});static#n=this.\u0275inj=e.cJS({imports:[u.ez,Hs,_.sQ.forFeature([jo])]})}var PI=r(53386),$I=r(50936);class Xo{constructor(n,t,i,o,s){this.actions$=n,this.i18n$=t,this.clipboard=i,this.dialogService=o,this.toastService=s,this.copyUrl$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(bn.copyPublicShareUrl,bn.copyPrivateShareUrl),(0,gt.b)(({url:l})=>this.clipboard.writeText(l)),(0,_.IC)(()=>this.i18n$),(0,L.w)(([l,d])=>{const h=Ee.translate(d,Ee.key.calendarShareManageView.linkCopiedToast);return this.toastService.info({message:h})})),{dispatch:!1}),this.confirmResetPublicUrl$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(bn.confirmResetPublicShareUrl),(0,_.IC)(()=>this.i18n$),(0,L.w)(([l,d])=>{const{result$:h}=this.dialogService.confirmV2({title:Ee.translate(d,Ee.key.calendarShareManageView.resetConfirmationModal.title),message:Ee.translate(d,Ee.key.calendarShareManageView.resetConfirmationModal.message),confirm:Ee.translate(d,Ee.key.calendarShareManageView.resetConfirmationModal.confirmButtonLabel)});return h.pipe((0,be.q)(1),(0,p.U)(({confirmed:m})=>m?Ae.resetPublicUrlShareUrl():void 0),(0,z.M3)())}))),this.confirmResetPrivateUrl$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(bn.confirmResetPrivateShareUrl),(0,_.IC)(()=>this.i18n$),(0,L.w)(([l,d])=>{const{result$:h}=this.dialogService.confirmV2({title:Ee.translate(d,Ee.key.calendarShareManageView.resetConfirmationModal.title),message:Ee.translate(d,Ee.key.calendarShareManageView.resetConfirmationModal.message),confirm:Ee.translate(d,Ee.key.calendarShareManageView.resetConfirmationModal.confirmButtonLabel)});return h.pipe((0,be.q)(1),(0,p.U)(({confirmed:m})=>m?Ae.resetPrivateUrlShareUrl():void 0),(0,z.M3)())})))}static#e=this.\u0275fac=function(t){return new(t||Xo)(e.LFG(_.eX),e.LFG(ut.UG),e.LFG(PI.Y),e.LFG(Dr.xA),e.LFG($I.k))};static#t=this.\u0275prov=e.Yz7({token:Xo,factory:Xo.\u0275fac})}class ea{static#e=this.\u0275fac=function(t){return new(t||ea)};static#t=this.\u0275mod=e.oAB({type:ea});static#n=this.\u0275inj=e.cJS({imports:[u.ez,Gi,rs,_.sQ.forFeature([Xo])]})}class ta{constructor(n,t){this.actions$=n,this.store$=t,this.onSubscriptionSettingsChangeReloadBootstrap$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Qe.activateActiveUserCalendarSubscriptionSuccess,Qe.deactivateActiveUserCalendarSubscriptionSuccess,Qe.updateActiveUserCalendarSubscriptionSuccess),(0,p.U)(Be.qn.bootstrapLoadCalendarEvents)))}static#e=this.\u0275fac=function(t){return new(t||ta)(e.LFG(_.eX),e.LFG(g.yh))};static#t=this.\u0275prov=e.Yz7({token:ta,factory:ta.\u0275fac})}class na{static#e=this.\u0275fac=function(t){return new(t||na)};static#t=this.\u0275mod=e.oAB({type:na});static#n=this.\u0275inj=e.cJS({imports:[u.ez,Gi,_.sQ.forFeature([ta])]})}class ia{static#e=this.\u0275fac=function(t){return new(t||ia)};static#t=this.\u0275mod=e.oAB({type:ia});static#n=this.\u0275inj=e.cJS({imports:[Hi,Dn.b,Be.Lv,ps,Gi,ea,na,qo,ea,na,qo]})}var zI=r(13968),QI=r(84427),FI=r(66995),GI=r(82261),JI=r(4016),HI=r(87139),VI=r(27866),ul=r(86778);class oa{static#e=this.\u0275fac=function(t){return new(t||oa)};static#t=this.\u0275mod=e.oAB({type:oa});static#n=this.\u0275inj=e.cJS({imports:[u.ez,ve.ZD,En.z,QI.fn,me.TI,me.r2,me.FG,_n.qF,FI.d,GI.m,VI.W,vs.VW,me.KV,me.iK,Pn.Sl,me.wV,Mt.p,ul.I,JI.Js,HI.TR]})}var WI=r(4959);class Vs{static#e=this.\u0275fac=function(t){return new(t||Vs)};static#t=this.\u0275mod=e.oAB({type:Vs});static#n=this.\u0275inj=e.cJS({imports:[me.TI,_n.qF,oa,Fs.y,En.z,In,yn,Pn.wO,Ea.r,_n.qF,me.FG,Mt.p]})}var op=r(15716),ap=r(49753),YI=r(9288);class aa{constructor(n,t,i,o,s){this.actions$=n,this.confirmationModalService=t,this.activeUserMicrosoftIntegrations=i,this.windowService=o,this.i18n$=s,this.startVideoCallRejectedOpenAuthentication$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(U.Ns.startChatVideoCallRejection),(0,Do.M)(this.i18n$),(0,L.w)(([{rejection:l,conversationId:d},h])=>{const m=(0,ap.m)(h,Me,Me.key.videoCall.confirmConnect);return this.confirmationModalService.confirmV2(m).pipe((0,en.V)(),(0,Xa.h)({rejection:l,conversationId:d}))}),(0,gt.b)(({rejection:{authenticationUrl:l}})=>this.windowService.open(l)),(0,L.w)(({conversationId:l})=>this.windowService.focus$.pipe((0,si.P)(),(0,Xa.h)({conversationId:l}))),(0,L.w)(({conversationId:l})=>this.activeUserMicrosoftIntegrations.getUserSettingsMicrosoftIntegrationStatus().pipe((0,p.U)(({status:d})=>d===A.CEn.ACTIVE?U.Ns.connectMicrosoftIntegrationSuccess({conversationId:l}):U.Ns.connectMicrosoftIntegrationFailure()))))),this.connectIntegrationSuccessOpenCall$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(U.Ns.connectMicrosoftIntegrationSuccess),(0,p.U)(U.Ns.startChatVideoCall))),this.startVideoCallSuccessOpenCall$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(U.Ns.startChatVideoCallSuccess),(0,gt.b)(({activity:{videoCall:{videoCallUrl:l}}})=>this.windowService.open(l))),{dispatch:!1})}static#e=this.\u0275fac=function(t){return new(t||aa)(e.LFG(_.eX),e.LFG(op.k),e.LFG(st.Rh),e.LFG(YI.u),e.LFG(ut.UG))};static#t=this.\u0275prov=e.Yz7({token:aa,factory:aa.\u0275fac})}var KI=r(17164),sp=r(46595),rp=r(92114),jI=r(95349);class sa{constructor(n,t,i,o,s){this.actions$=n,this.store$=t,this.dialogService=i,this.i18n$=o,this.navigation=s,this.accessConversation$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.accessConversation),(0,p.U)(({conversationId:l})=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"conversation",params:{[Dt.CHAT_CONVERSATION_ID]:l}}}
1)))),this.accessConversationInfo$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.accessConversationInfo),(0,p.U)(({conversationId:l})=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"conversation-info",params:{[Dt.CHAT_CONVERSATION_ID]:l}}})))),this.loadConversationActivities$=(0,_.GW)(()=>this.store$.select(vn).pipe((0,q.h)(l=>void 0!==l),(0,w.x)(),(0,z.M3)(),(0,p.U)(l=>U.Xo.loadChatActivities({conversationId:l})))),this.loadMoreConversationActivities$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.loadMoreActivitiesForCurrentConversation)).pipe((0,rp.c)(this.store$.select(vn).pipe((0,si.P)())),(0,z.M3)(),(0,p.U)(l=>U.Xo.loadMoreChatActivities({conversationId:l})))),this.loadGroupMembers$=(0,_.GW)(()=>this.store$.select(vn).pipe((0,rp.c)(this.store$.select(Qo).pipe((0,si.P)(),(0,z.M3)(),(0,q.h)(({type:l})=>l===A.i1$.GROUP),(0,p.U)(({conversationId:l})=>U.nh.loadMembers({conversationId:l})))))),this.addGroupMembersToCurrentGroup$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.addMembersForCurrentGroup)).pipe((0,jI.j)(this.store$.select(vn).pipe((0,z.M3)(),(0,p.U)(l=>U.nh.performAddUsers({conversationId:l})))))),this.postMessage$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.postMessageForCurrentConversation),(0,_.IC)(()=>this.store$.select(vn)),(0,p.U)(([{content:l},d])=>({content:l,conversationId:d})),(0,p.U)(({content:l,conversationId:d})=>U.xx.postChatMessage({content:l,conversationId:d})))),this.confirmDeleteChatMessage$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.confirmDeleteChatMessage),(0,Do.M)(this.i18n$),(0,qt.zg)(([{activityId:l},d])=>{const h=(0,ap.m)(d,Me,Me.key.confirmDeleteChatMessage);return this.dialogService.confirmV2({...h,danger:!0}).pipe((0,en.V)(),(0,p.U)(()=>U.ww.deleteChatMessage({id:l})))}))),this.confirmLeaveConversation$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.confirmLeaveCurrentConversation),(0,Do.M)(this.i18n$),(0,qt.zg)(([,l])=>{const{confirmLeaveGroup:d}=Me.key.conversationInfo;return this.dialogService.confirmV2({title:Me.translate(l,d.title),message:Me.translate(l,d.message),confirmButtonLabel:Me.translate(l,d.confirmButton),danger:!0}).pipe((0,en.V)(),(0,p.U)(()=>Ze.leaveCurrentConversation()))}))),this.leaveConversation$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.leaveCurrentConversation),(0,qt.zg)(()=>this.store$.select(vn).pipe((0,si.P)(),(0,z.M3)())),(0,p.U)(l=>U.nh.leave({input:{conversationId:l}})))),this.leaveConversationSuccessNavigate$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(U.nh.leaveSuccess),(0,p.U)(()=>(0,De.Q$)({route:{tab:J.v0.CHAT,path:"conversations"}})))),this.openConversationOnUpsert$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(U.xx.startOrContinueSuccess),(0,p.U)(({chatDialog:{conversationId:l}})=>Ze.accessConversation({conversationId:l})))),this.groupCreatedNavigation$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(U.XB.createSuccess),(0,p.U)(({chatGroup:{conversationId:l}})=>Ze.accessConversation({conversationId:l})))),this.groupMemberAddedNavigation$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(U.nh.performAddUsersSuccess),(0,qt.zg)(({conversationId:l})=>[Ze.accessConversationInfo({conversationId:l}),U.nh.loadMembers({conversationId:l})]))),this.newDialogLoadUser$=(0,_.GW)(()=>this.store$.select(Mc).pipe((0,w.x)(),(0,z.M3)(),(0,p.U)(l=>U.WL.loadUser({userId:l})))),this.openBlabDef$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.openBlabDef),(0,_.IC)(()=>this.store$.select(Pt.vg)),(0,L.w)(([{blabDefId:l,blabViewId:d,anchorBlockDefId:h},{blabDefs:m,workspaces:C}])=>{const S=m.find(({id:R})=>R===l);if(!S||!(0,H.Ch)(S))return[];const{workspaceId:f,info:{slug:E}}=S,Z=C.find(({id:R})=>R===f);return Z?this.navigation.navigateInPrimaryOutlet({primaryCommands:[J.Q6.fragment,Z?.info?.slug||Z?.id||f,J.Cn.fragment,E,...d?[J.C$.fragment,`${d}`]:[]],mainModalCommands:null,extras:{fragment:h?(0,KI.cL)(h):void 0}}):[]})),{dispatch:!1}),this.openBlabItem$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Ze.openBlabItem),(0,p.U)(({blabItemId:l,anchorBlockDefId:d})=>Zn.i.navigateToItemEdit(l,{anchorBlockDefId:d}))))}static#e=this.\u0275fac=function(t){return new(t||sa)(e.LFG(_.eX),e.LFG(g.yh),e.LFG(op.k),e.LFG(ut.UG),e.LFG(sp.f))};static#t=this.\u0275prov=e.Yz7({token:sa,factory:sa.\u0275fac})}class Ws{static#e=this.\u0275fac=function(t){return new(t||Ws)};static#t=this.\u0275mod=e.oAB({type:Ws});static#n=this.\u0275inj=e.cJS({providers:[{provide:st.Rh,useFactory:n=>new st.Rh(n),deps:[st.RZ]}
1],imports:[_.sQ.forFeature([sa,aa])]})}class ra{static#e=this.\u0275fac=function(t){return new(t||ra)};static#t=this.\u0275mod=e.oAB({type:ra});static#n=this.\u0275inj=e.cJS({imports:[we.p,Hi,Vs,Fs.y,U.s,Ws,me.r2,oa,me.KV,WI.f,Mt.p,ul.I,zI.FJ]})}var qI=r(53711),XI=r(15667);class Ys{static#e=this.\u0275fac=function(t){return new(t||Ys)};static#t=this.\u0275mod=e.oAB({type:Ys});static#n=this.\u0275inj=e.cJS({imports:[me.TI,Fs.y,me.FG,_n.qF,XI.Z,In,yn,Pn.wO,Pn.u5,qI.l,Mt.p]})}class la{constructor(n,t,i,o){this.store$=n,this.actions$=t,this.i18n$=i,this.navigation=o,this.openBlabDef$=(0,_.GW)(()=>this.actions$.pipe((0,_.l4)(Kc.openBlabDef),(0,_.IC)(()=>[this.store$.select(Pt.u3),this.store$.select(Pt.t7)]),(0,L.w)(([{blabDefId:s},l,d])=>{const h=d.find(C=>C.id===s);if(!h)return[];const m=l.find(({id:C})=>C===h.workspaceId);return this.navigation.navigateInPrimaryOutlet({primaryCommands:[J.Q6.fragment,m?.info?.slug||m?.id||h.workspaceId,J.Cn.fragment,h.info?.slug||h.id],rootModalCommands:null})})),{dispatch:!1})}static#e=this.\u0275fac=function(t){return new(t||la)(e.LFG(g.yh),e.LFG(_.eX),e.LFG(ut.UG),e.LFG(sp.f))};static#t=this.\u0275prov=e.Yz7({token:la,factory:la.\u0275fac})}class ca{static#e=this.\u0275fac=function(t){return new(t||ca)};static#t=this.\u0275mod=e.oAB({type:ca});static#n=this.\u0275inj=e.cJS({imports:[kt.y,Hi,Dn.b,Ys,_.sQ.forFeature([la])]})}class Ks{static#e=this.\u0275fac=function(t){return new(t||Ks)};static#t=this.\u0275mod=e.oAB({type:Ks}
1);static#n=this.\u0275inj=e.cJS({imports:[u.ez,we.p,ca,ra,ia,ca,ra,ia]})}class js{static#e=this.\u0275fac=function(t){return new(t||js)};static#t=this.\u0275mod=e.oAB({type:js});static#n=this.\u0275inj=e.cJS({imports:[u.ez,hr.n,ur.BV,Ar.Ch,En.z,Ol.c7]})}class qs{static#e=this.\u0275fac=function(t){return new(t||qs)};static#t=this.\u0275mod=e.oAB({type:qs});static#n=this.\u0275inj=e.cJS({imports:[u.ez,me.TI]})}class Xs{static#e=this.\u0275fac=function(t){return new(t||Xs)};static#t=this.\u0275mod=e.oAB({type:Xs});static#n=this.\u0275inj=e.cJS({imports:[Dn.b,me.KV,qs,Mt.p,ul.I,Ar.Ch]})}class er{static#e=this.\u0275fac=function(t){return new(t||er)};static#t=this.\u0275mod=e.oAB({type:er});static#n=this.\u0275inj=e.cJS({imports:[we.p,gr.Ox,tn.mg,Dn.b,Xs,Pn.Xu,Mt.p,Ar.Ch,js]})}class tr{static#e=this.\u0275fac=function(t){return new(t||tr)};static#t=this.\u0275mod=e.oAB({type:tr});static#n=this.\u0275inj=e.cJS({providers:[Fi,{provide:$a.Z,useFactory:()=>new $a.Z({width:void 0})},...Qf,...zf,...Ff],imports:[B.Bz.forChild(LI),Pa,an,Oo.fQ,Dn.b,Bs.HZ,Qs,er,Ks,zs,Fa,D.PX,Ia]})}},54237:(Ye,he,r)=>{r.d(he,{As:()=>_,md:()=>D,rV:()=>B});var B=(()=>{return(g=B||(B={})).CREATION_SUCCESS="CREATION_SUCCESS",g.NESTED_CREATION_SUCCESS="NESTED_CREATION_SUCCESS",g.START_NESTED_CREATION="START_NESTED_CREATION",B;var g})();function D(g){return{navigationTrigger:g}}function _(g){return ne=>ne?.navigationTrigger===g}},7394:(Ye,he,r)=>{r.d(he,{i:()=>z});var B=r(48335),D=r(17164),_=r(56070),g=r(48014),ne=r(89920),O=r(37816),V=r(42989),L=r(54237);const{item:be,blabDefFlimDefEdit:p,itemCreation:w}=B.xF,q=Ce=>[be,Ce];class z{static#e=this.navigateToItems=(X,Q)=>(0,V.j_)({primaryCommands:(0,_._0)(X),mainModalCommands:null,elevatedMainModalCommands:null,rootModalCommands:null,extras:Q});static#t=this.navigateToItemsUsingIncomingRelationsFilter=(X,Q)=>(0,V.j_)({primaryCommands:(0,_._0)(X),mainModalCommands:null,extras:{queryParams:(0,O.Qd)(Q)}});static#n=this.navigateToBlabItemActivityThread=(X,Q={})=>(0,V.o0)({commands:[],extras:Q?{state:{omitActivityFilter:Q.omitActivityFilter,blabDefId:Q.blabDefId},queryParams:{[B.Wm.activityIdQueryParam]:X.id.toString()}}:{}});static#i=this.navigateToItemEdit=(X,Q={})=>(0,V.o0)({commands:q(X),extras:{...Q?{state:{omitActivityFilter:Q.omitActivityFilter,blabDefId:Q.blabDefId,skipNewBlabItemExperienceRedirect:Q.skipNewBlabItemExperienceRedirect}}:{},fragment:Q.anchorBlockDefId?(0,D.cL)(Q.anchorBlockDefId):void 0}});static#o=this.navigateToItemEditAfterCreationSuccess=X=>(0,V.o0)({commands:q(X),extras:{state:(0,L.md)(L.rV.CREATION_SUCCESS)}});static#a=this.navigateToCreateDuplicateAfterCreationSuccess=({blabItemId:X,blabDefId:Q})=>(0,V.o0)({commands:["create",Q],extras:{queryParams:{[g.J.templateBlabItemId]:(0,ne.qu)(X)},state:(0,L.md)(L.rV.CREATION_SUCCESS)}});static#s=this.navigateToBlabDefEdit=X=>{return(0,V.o0)({commands:(Ce=X.id,[p,Ce])});var Ce};static#r=this.navigateToBlabDef=X=>(0,V.Jn)({primaryCommands:(0,_._0)(X),mainModalCommands:null});static#l=this.openBlabItemCreation=(X,{templateType:Q,prefillFlimVals:de,prefillFlimValsV2:N,blabItemTemplateId:re}={})=>{const W={};return Q&&(W[g.J.templateType]=(0,ne.cc)(Q)),de&&de.length>0&&(W[g.J.prefillFlimVals]=(0,ne.Ji)(de)),N&&N.length>0&&(W[g.J.prefillFlimValsV2]=(0,ne.Hg)(N)),re&&(W[g.J.templateBlabItemId]=(0,ne.qu)(re)),(0,V.o0)({commands:["create",X],extras:{queryParams:W}})};static#c=this.openBlabItemTemplateCreation=(X,Q)=>(0,V.o0)({commands:["create",X],extras:{queryParams:{[g.J.templateType]:(0,ne.cc)(Q)}}});static#p=this.openBlabItemTemplateDuplicationCreation=(X,Q,de)=>(0,V.o0)({commands:["create",X],extras:{queryParams:{[g.J.templateType]:(0,ne.cc)(Q),[g.J.templateBlabItemId]:(0,ne.qu)(de)}}});static#d=this.openBlabItemCreationWithTemplate=(X,Q)=>(0,V.o0)({commands:["create",X],extras:{queryParams:{[g.J.templateBlabItemId]:(0,ne.qu)(Q)}}});static#_=this.openBlabItemCreationFlimDefEdit=X=>(0,V.o0)({commands:["create",X,w.flimDefEdit],extras:{}});static#u=this.fromNestedCreationReturnToBlabItemCreation=X=>(0,V.o0)({commands:["create",X],extras:{state:(0,L.md)(L.rV.NESTED_CREATION_SUCCESS)}});static#h=this.openNestedBlabItemCreation=X=>(0,V.o0)({commands:["create",X],extras:{state:(0,L.md)(L.rV.START_NESTED_CREATION)}})}},36465:(Ye,he,r)=>{r.d(he,{x:()=>g});var B=r(63866),D=r(40988),_=r(91052);class g{constructor(O){this.document=O,this.applyMainContentOptimisticWidthDelta$$=new D.xQ,this.applyMainContentOptimisticWidthDelta$=this.applyMainContentOptimisticWidthDelta$$.asObservable()}applyMainContentWidthOptimistically(O){this.applyMainContentOptimisticWidthDelta$$.next({widthDeltaPx:O})}static#e=this.\u0275fac=function(V){return new(V||g)(_.LFG(B.K0))};static#t=this.\u0275prov=_.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"})}},27502:(Ye,he,r)=>{r.d(he,{xA:()=>e,tM:()=>_e,u$:()=>A,dZ:()=>kn,BO:()=>ir,XC:()=>$,Fx:()=>jt});var B=r(55853),D=r(54520),_=r(52678),g=r(82021),ne=r(6839),O=r(19122),V=r(93591),L=r(48335),be=r(88006),p=r(11282),w=r(12782),q=r(41655),lt=r(82684),z=r(22133),Ce=r(46595),X=r(63995),Q=r(13395),de=r(3378),N=r(74434),re=r(42866),W=r(42128),Vi=r(53464),Wi=r(66233);
1const e={reset:(0,D.PH)("GlobalSearchActions.reset"),openModal:(0,D.PH)("GlobalSearchActions.openModal"),setModalOpenState:(0,D.PH)("GlobalSearchActions.setModalOpenState",(0,D.Ky)()),openBlabItem:(0,D.PH)("GlobalSearchActions.openBlabItem",(0,D.Ky)()),openBlabDef:(0,D.PH)("GlobalSearchActions.openBlabDef",(0,D.Ky)()),requestGetSearchResults:(0,D.PH)("GlobalSearchActions.requestGetSearchResults",(0,D.Ky)()),getSearchResults:(0,D.PH)("GlobalSearchActions.getSearchResults",(0,D.Ky)()),getSearchResultsSuccess:(0,D.PH)("GlobalSearchActions.getSearchResultsSuccess",(0,D.Ky)()),getSearchResultsFailure:(0,V.bR)("GlobalSearchActions.getSearchResultsFailure"),requestGetMoreSearchResults:(0,D.PH)("GlobalSearchActions.requestGetMoreSearchResults"),getMoreSearchResults:(0,D.PH)("GlobalSearchActions.getMoreSearchResults",(0,D.Ky)()),getMoreSearchResultsSuccess:(0,D.PH)("GlobalSearchActions.getMoreSearchResultsSuccess",(0,D.Ky)()),getMoreSearchResultsFailure:(0,V.bR)("GlobalSearchActions.getMoreSearchResultsFailure")};var Yt=r(82091),Yi=r(81793),Kt=r(73430),an=r(74849),tt=r(18);function Ne(Y){return Y.map(({node:ee,cursor:v})=>{switch(ee.type){case z.Yy.BLAB_DEF:return{type:z.Yy.BLAB_DEF,cursor:v,blabDefId:ee.blabDef.id,highlight:ee.highlight,rankingScore:ee.rankingScore,createdAt:ee.blabDef.info.createdAt,lastModifiedAt:ee.blabDef.info.lastModifiedAt};case z.Yy.BLAB_ITEM:return{type:z.Yy.BLAB_ITEM,cursor:v,blabItemId:ee.blabItem.id,highlight:ee.highlight,rankingScore:ee.rankingScore,createdAt:ee.blabItem.info.createdAt,lastModifiedAt:ee.blabItem.info.lastModifiedAt}}})}const ie="globalSearch",te=(0,an.H)({selectId:Y=>function ve(Y){switch(Y.type){case z.Yy.BLAB_DEF:return`${Y.type}-${Y.blabDefId}`;case z.Yy.BLAB_ITEM:return`${Y.type}-${Y.blabItemId}`}}(Y)}),ke=te.getInitialState({userRecentlyVisitedEdges:[],loadingState:tt.k.INITIAL,searchMode:X.n.RECENTLY_VISITED,isOpen:!1}),ct=(0,D.Lq)(ke,(0,D.on)(e.reset,()=>({...ke})),(0,D.on)(e.setModalOpenState,(Y,{modalOpen:ge})=>({...Y,isOpen:ge})),(0,D.on)(e.requestGetSearchResults,(Y,{mode:ge})=>Y.searchMode!==ge?te.removeAll({...Y,searchMode:ge,loadingState:ge===X.n.RECENTLY_VISITED?tt.k.LOADED:tt.k.REQUEST_LOADING}):{...Y,loadingState:tt.k.REQUEST_LOADING}),(0,D.on)(e.getSearchResults,Y=>({...Y,loadingState:tt.k.LOADING})),(0,D.on)(e.getSearchResultsSuccess,(Y,{result:ge})=>{const ee=Ne(ge.edges);return te.setAll(ee,{...Y,loadingState:tt.k.LOADED,hasNextPage:ge.pageInfo.hasNextPage,totalCount:ge.totalCount,after:ge.edges[ge.edges.length-1]?.cursor,hasMoreThanMaxSearchResults:ge.hasMoreThanMaxSearchResults})}),(0,D.on)(e.getSearchResultsFailure,Y=>({...Y,loadingState:tt.k.EXCEPTION})),(0,D.on)(e.getMoreSearchResults,Y=>({...Y,loadingState:tt.k.LOAD_MORE})),(0,D.on)(e.getMoreSearchResultsSuccess,(Y,{result:ge})=>{const ee=Ne(ge.edges);return te.addMany(ee,{...Y,loadingState:tt.k.LOADED,hasNextPage:ge.pageInfo.hasNextPage,totalCount:ge.totalCount,after:ge.edges[ge.edges.length-1]?.cursor,hasMoreThanMaxSearchResults:ge.hasMoreThanMaxSearchResults})}),(0,D.on)(e.getMoreSearchResultsFailure,Y=>({...Y,loadingState:tt.k.EXCEPTION}))),{selectAll:nt}=te.getSelectors(),Re=(0,D.ZF)(ie),kn=(0,D.P1)(O.vg,O.iL,O.mF,O.rP,O.M5,({organization:Y,userGroups:ge,userGroupMemberships:ee,workspaces:v,workspaceMemberships:pt,blabDefs:Pe,blabDefPermissionEdges:u,blabDefPermissionRules:oe,blabDefPermissionRuleUserInvolvements:sn,users:rn},le,we,or,ar)=>{if((0,w.pf)(Y))return{organization:Y,users:rn.filter(Yt.EN),userGroups:ge,userGroupMemberships:ee,workspaces:v.f
1ilter(Yi.$m),workspaceMemberships:pt,blabDefs:Pe.filter(be.Ch),blabDefPermissionEdges:u,blabDefPermissionRules:oe,blabDefPermissionRuleUserInvolvements:sn,blabItemPermissionEdges:ar,flimDefs:le,blabItems:we,flimVals:or}}),$=(0,D.P1)(Re,nt),H=(0,D.P1)(Re,Y=>({after:Y.after,hasNextPage:Y.hasNextPage})),A=(0,D.P1)(Re,({loadingState:Y})=>Y),jt=(0,D.P1)(ne.Ux,Kt._f,(Y,ge)=>ge.filter(ee=>ee.userId===Y).sort((ee,v)=>v.lastVisitedAt-ee.lastVisitedAt).slice(0,50)),ir=(0,D.P1)(Re,({isOpen:Y})=>Y);var Te=r(91052);class y{constructor(ge,ee,v,pt){this.store$=ge,this.actions$=ee,this.navigation=v,this.globalSearchApiService=pt,this.resetOnActiveUserIdChange$=(0,B.GW)(()=>this.store$.select(ne.Ux).pipe((0,q.M3)(),(0,Q.x)(),(0,de.T)(1),(0,N.U)(()=>e.reset()))),this.openBlabItem$=(0,B.GW)(()=>this.actions$.pipe((0,B.l4)(e.openBlabItem),(0,B.IC)(()=>this.store$.select(O.vg)),(0,re.w)(([{blabItem:Pe,newTab:u},{organization:oe}])=>u?this.navigation.openInNewWindow([(0,w.mY)(oe),"record",Pe.id]):this.navigation.navigateInMainModalOutlet({commands:["record",Pe.id]}))),{dispatch:!1}),this.openBlabDef$=(0,B.GW)(()=>this.actions$.pipe((0,B.l4)(e.openBlabDef),(0,B.IC)(()=>this.store$.select(O.vg)),(0,N.U)(([{blabDef:Pe,newTab:u},{organization:oe}])=>u?this.navigation.openInNewWindow([(0,w.mY)(oe),L.Q6.fragment,Pe.workspaceId,L.Cn.fragment,(0,be.td)({blabDef:Pe})??""]):this.navigation.navigateInPrimaryOutlet({primaryCommands:[L.Q6.fragment,Pe.workspaceId,L.Cn.fragment,(0,be.td)({blabDef:Pe})??""],rootModalCommands:null,mainModalCommands:null,elevatedMainModalCommands:null,rootModalOverlayCommands:null}))),{dispatch:!1}),this.requestGetSearchResults$=(0,B.GW)(()=>this.actions$.pipe((0,B.l4)(e.requestGetSearchResults),(0,W.b)(500),(0,Vi.h)(({mode:Pe})=>Pe===X.n.SEARCH),(0,lt.Ah)(5e3),(0,N.U)(({input:Pe})=>e.getSearchResults({input:Pe})))),this.getSearchResults$=(0,B.GW)(()=>this.actions$.pipe((0,B.l4)(e.getSearchResults),(0,re.w)(({input:Pe})=>this.globalSearchApiService.getGlobalSearchResults({input:Pe}).pipe((0,Wi.zg)(u=>{const oe="GlobalSearchEffects.getSearchResults",sn=u.edges.map(({node:le})=>le.type===z.Yy.BLAB_DEF?le.blabDef:void 0).filter(p.lm),rn=u.edges.map(({node:le})=>le.type===z.Yy.BLAB_ITEM?le.blabItem:void 0).filter(p.lm);return[e.getSearchResultsSuccess({result:u}),O.r7.setBlabDefs({blabDefs:sn,traceId:oe}),O.PF.setBlabItems({blabItems:rn,traceId:oe}),O.qG.setFlimDefs({flimDefs:u.titleFlimDefs,traceId:oe}),O.ge.setFlimVals({flimVals:u.titleFlimVals,traceId:oe})]}))))),this.requestGetMoreSearchResults$=(0,B.GW)(()=>this.actions$.pipe((0,B.l4)(e.requestGetMoreSearchResults),(0,B.IC)(()=>this.store$.select(H)),(0,N.U)(([Pe,{after:u}])=>u),(0,q.M3)(),(0,N.U)(Pe=>e.getMoreSearchResults({after:Pe})))),this.getMoreSearchResults$=(0,B.GW)(()=>this.actions$.pipe((0,B.l4)(e.getMoreSearchResults),(0,B.IC)(()=>this.store$.select(H)),(0,N.U)(([Pe,{after:u}])=>u),(0,q.M3)(),(0,re.w)(Pe=>this.globalSearchApiService.getGlobalSearchResults({after:Pe}).pipe((0,Wi.zg)(u=>{const oe="GlobalSearchEffects.getMoreSearchResults",sn=u.edges.map(({node:le})=>le.type===z.Yy.BLAB_DEF?le.blabDef:void 0).filter(p.lm),rn=u.edges.map(({node:le})=>le.type===z.Yy.BLAB_ITEM?le.blabItem:void 0).filter(p.lm);return[e.getMoreSearchResultsSuccess({result:u}),O.r7.setBlabDefs({blabDefs:sn,traceId:oe}),O.PF.setBlabItems({blabItems:rn,traceId:oe}),O.qG.setFlimDefs({flimDefs:u.titleFlimDefs,traceId:oe}),O.ge.setFlimVals({flimVals:u.titleFlimVals,traceId:oe})]}),(0,V.Mr)(e.getMoreSearchResultsFailure)))))}static#e=this.\u0275fac=function(ee){return new(ee||y)(Te.LFG(D.yh),Te.LFG(B.eX),Te.LFG(Ce.f),Te.LFG(g.g))};static#t=this.\u0275prov=Te.Yz7({token:y,factory:y.\u0275fac})}class _e{static#e=this.\u0275fac=function(ee){return new(ee||_e)};static#t=this.\u0275mod=Te.oAB({type:_e});static#n=this.\u0275inj=Te.cJS({providers:[{provide:g.g,useFactory:ge=>new g.g(ge),deps:[_.s]}],imports:[D.Aw.forFeature(ie,ct),B.sQ.forFeature([y])]})}},37860:(Ye,he,r)=>{r.d(he,{D:()=>ne}),r(60974);var D=r(63866),_=r(91052);class ne{static#e=this.\u0275fac=function(L){return new(L||ne)};static#t=this.\u0275mod=_.oAB({type:ne});static#n=this.\u0275inj=_.cJS({imports:[D.ez]})}},60974:(Ye,he,r)=>{r.d(he,{T:()=>q});var B=r(3982),D=r(45716),_=r(10607),g=r(31312),ne=r(82684),O=r(41655),V=r(10540),L=r(74434),be=r(88928),p=r(13395),w=r(91052);class q extends _.R{constructor(z){super(),this.elRef=z;const{nativeElement:Ce}=z;Ce.style.transitionDuration=(0,B.ms)(120),Ce.style.transitionProperty="border-color";const X=(0,V.R)(Ce,"scroll",{passive:!0}).pipe((0,ne.Ah)(100),(0,L.U)(Q=>(0,D.Nm)(Q)),(0,O.M3)(),(0,be.O)(0),(0,L.U)(Q=>Q>2),(0,p.x)());this.hold(X,Q=>{Ce.style.borderTop=(0,B.Cg)(1,"solid",Q?g._Z.light:"transparent")})}static#e=this.\u0275fac=function(Ce){return new(Ce||q)(w.Y36(w.SBq))};static#t=this.\u0275dir=w.lG2({type:q,selectors:[["","t5sScrolledHairlineBorder",""]],exportAs:["t5sScrolledHairlineBorder"],features:[w.qOj]})}},33710:(Ye,he,r)=>{r.d(he,{Z:()=>D});var B=r(99927);class D extends B.X{}},91184:(Ye,he,r)=>{r.d(he,{R:()=>_,y:()=>g});var B=r(99927),D=r(90568);class _ extends B.X{}class g extends D.y{}},26083:(Ye,he,r)=>{r.d(he,{p:()=>g,t:()=>_});var B=r(99927),D=r(90568);class _ extends B.X{}class g extends D.y{}},99797:(Ye,he,r)=>{r.d(he,{X:()=>L});var B=r(63866),D=r(35532),_=r(92225),g=r(38730),O=(r(4803),r(91052));class L{static#e=this.\u0275fac=function(w){return new(w||L)};static#t=this.\u0275mod=O.oAB({type:L});static#n=this.\u0275inj=O.cJS({imports:[B.ez,D.p,_.n,g.v8]})}},4803:(Ye,he,r)=>{r.d(he,{V:()=>X});var B=r(233),D=r(10224),_=r(91052),g=r(63866),ne=r(13043),O=r(24807),V=r(35532);const L=function(Q,de,N,re){return{custom:Q,graphic:de,emoji:N,emojiFont:re}};function be(Q,de){if(1&Q&&_._UZ(0,"t5s-entity-icon",5),2&Q){const N=_.oxw().ngIf;_.Q6J("icon",null==N.organization.info?null:N.organization.info.icon)("size",N.size)("hasBackgroun
1d",void 0===N.hasBackground||N.hasBackground)("ratio",_.l5B(4,L,(null==N.ratio?null:N.ratio.custom)||1,(null==N.ratio?null:N.ratio.graphic)||.78,(null==N.ratio?null:N.ratio.emoji)||.78,(null==N.ratio?null:N.ratio.emojiFont)||.7))}}function p(Q,de){if(1&Q&&(_.TgZ(0,"div")(1,"div"),_._uU(2),_.qZA()()),2&Q){const N=_.oxw(2).ngIf,re=_.oxw();_.Udp("width",N.size,"px")("height",N.size,"px")("background-color",re.rgba(re.Color.black,.09))("color",re.rgba(re.Color.black,.65))("text-transform","uppercase")("display","flex")("align-items","center")("justify-content","center")("border-radius",.25,"rem"),_.xp6(1),_.Udp("line-height",1)("font-size",re.getFallbackCharFontSize(N),"px")("height",re.getFallbackCharFontSize(N),"px")("user-select","none"),_.xp6(1),_.Oqu(re.getEntityName(N))}}function w(Q,de){if(1&Q&&_.YNc(0,p,3,27,"div",6),2&Q){const N=_.oxw().ngIf,re=_.MAs(5);_.Q6J("ngIf",null==N.organization?null:N.organization.info)("ngIfElse",re)}}function q(Q,de){if(1&Q&&(_.TgZ(0,"div"),_._UZ(1,"t5s-svg",8),_.qZA()),2&Q){const N=_.oxw(2).ngIf,re=_.oxw();_.Udp("min-width",N.size,"px")("width",N.size,"px")("max-width",N.size,"px")("min-height",N.size,"px")("height",N.size,"px")("max-height",N.size,"px")("display","flex")("align-items","center")("justify-content","center"),_.xp6(1),_.Q6J("icon",re.IconEyeHide)("size",re.getIconSize(N))("fgColor",re.Color.black)}}function lt(Q,de){if(1&Q&&_.YNc(0,q,2,21,"div",7),2&Q){const N=_.oxw().ngIf,re=_.MAs(7);_.Q6J("ngIf",N.organization&&!(null!=N.organization&&N.organization.info))("ngIfElse",re)}}function z(Q,de){if(1&Q&&(_.TgZ(0,"div"),_._UZ(1,"t5s-svg",8),_.qZA()),2&Q){const N=_.oxw().ngIf,re=_.oxw();_.Udp("min-width",N.size,"px")("width",N.size,"px")("max-width",N.size,"px")("min-height",N.size,"px")("height",N.size,"px")("max-height",N.size,"px")("display","flex")("align-items","center")("justify-content","center"),_.xp6(1),_.Q6J("icon",re.IconPage)("size",re.getIconSize(N))("fgColor",re.Color.black)}}function Ce(Q,de){if(1&Q&&(_.ynx(0),_.YNc(1,be,1,9,"t5s-entity-icon",1),_.YNc(2,w,1,2,"ng-template",null,2,_.W1O),_.YNc(4,lt,1,2,"ng-template",null,3,_.W1O),_.YNc(6,z,2,21,"ng-template",null,4,_.W1O),_.BQk()),2&Q){const N=de.ngIf,re=_.MAs(3);_.xp6(1),_.Q6J("ngIf",null==N.organization||null==N.organization.info?null:N.organization.info.icon)("ngIfElse",re)}}class X extends D.A{constructor(){super(),this.IconHelp=B.T08,this.IconEyeHide=B.OTy,this.IconPage=B.zby,this.set({organization:null})}set organization(de){this.setProperty("organization",de)}set hasBackground(de){this.setProperty("hasBackground",de)}set size(de){this.setProperty("size",de)}set ratio(de){this.setProperty("ratio",de)}getIconSize({size:de}){return Math.ceil(78*de)/100}getEntityName({organization:de}){return(de?.info?.name||"").trim().slice(0,1).toUpperCase()}getFallbackCharFontSize({size:de}){return Math.ceil(66*de)/100}static#e=this.\u0275fac=function(N){return new(N||X)};static#t=this.\u0275cmp=_.Xpm({type:X,selectors:[["t5s-organization-icon"]],inputs:{organization:"organization",hasBackground:"hasBackground",size:"size",ratio:"ratio"},features:[_.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"icon","size","hasBackground","ratio",4,"ngIf","ngIfElse"],["fallback1",""],["fallback2",""],["fallback3",""],[3,"icon","size","hasBackground","ratio"],[3,"width","height","background-color","color","text-transform","display","align-items","justify-content","border-radius",4,"ngIf","ngIfElse"],[3,"min-width","width","max-width","min-height","height","max-height","display","align-items","justify-content",4,"ngIf","ngIfElse"],[3,"icon","size","fgColor"]],template:function(N,re){1&N&&(_.YNc(0,Ce,8,2,"ng-container",0),_.ALo(1,"push")),2&N&&_.Q6J("ngIf",_.lcZ(1,1,re.state$))},dependencies:[g.O5,ne.H,O.L,V.f],encapsulation:2,changeDetection:0})}},4959:(Ye,he,r)=>{r.d(he,{f:()=>O});var B=r(63866),D=r(57921),g=(r(305),r(91052));class O{static#e=this.\u0275fac=function(be){return new(be||O)};static#t=this.\u0275mod=g.oAB({type:O});static#n=this.\u0275inj=g.cJS({imports:[B.ez,D.TI]})}},305:(Ye,he,r)=>{r.d(he,{N:()=>Ne});var B=r(3982),D=r(18948),_=r(61316),g=r(41655),ne=r(44813),O=r(40988),V=r(57347),L=r(82562),be=r(92056),p=r(30769),w=r(95337),q=r(88928),lt=r(69940),z=r(74434),Ce=r(13395),X=r(12645),Q=r(53464),de=r(66233),N=r(42866),re=r(17097),W=r(91052),Vi=r(63866),Wi=r(75349),e=r(63130),Yt=r(19208);const Yi=["fileDragDropZone"];function Kt(ve,ie){if(1&ve&&(W.ynx(0),W._UZ(1,"t5s-divider-4px"),W.TgZ(2,"t5s-bold-text-primary-16px"),W._uU(3),W.qZA(),W.BQk()),2&ve){const te=W.oxw().ngIf;W.xp6(3),W.Oqu(te.text)}}function an(ve,ie){if(1&ve&&(W.ynx(0),W.TgZ(1,"div")(2,"div")(3,"div"),W._UZ(4,"t5s-primary-icon-24px",2),W.YNc(5,Kt,4,1,"ng-container",1),W.qZA()()(),W.BQk()),2&ve){const te=ie.ngIf,ke=W.oxw();W.xp6(1),W.Tol(ke.getOverlayClass(te)),W.xp6(1),W.Tol(ke.getOverlayContentClass(te)),W.xp6(2),W.Q6J("icon",ke.Icons.uploadAttachment.name),W.xp6(1),W.Q6J("ngIf",te.text)}}const tt=["*"];class Ne extends ne.Oo{constructor(ie){super(ie),this.dragEnter$$=new O.xQ,this.dragLeave$$=new O.xQ,this.fileDragDropZone$$=new V.t(1),this.drop$$=new O.xQ,this.dragStart$=this.dragEnter$$.pipe((0,w.h)(1)),this.dragEnd$=this.dragLeave$$.pipe((0,w.h)(-1)),this.dragChange$=(0,L.T)(this.dragStart$,this.dragEnd$).pipe((0,q.O)(0),(0,lt.R)((te,ke)=>te+ke),(0,z.U)(te=>te>0),(0,Ce.x)(),(0,z.U)(te=>({active:te}))),this.fileDrop=this.drop$$.pipe((0,X.M)(this.state$),(0,Q.h)(([te,ke])=>!ke.disabled),(0,de.zg)(([te])=>this.handleFileDrop(te))),this.urlDrop=this.drop$$.pipe((0,X.M)(this.state$),(0,Q.h)(([te,ke])=>!ke.disabled),(0,z.U)(([te])=>this.handleUrlDrop(te)),(0,g.M3)()),this.contentClass=(0,_.I)({...B.hw}),this.connect(this.dragChange$)}set active(ie){this.set({active:ie})}set disabled(ie){this.set({disabled:ie})}set text(ie){this.set({text:ie})}getOverlayClass(ie){return(0,_.I)({...B.hw,display:ie.active&&!ie.disabled?"block":"none",position:"absolute",zIndex:10,left:(0,B.px)(0),top:(0,B.px)(0),padding:(0,B.px)(26),backgroundColor:(0,B.m4)(255,255,255,.95)})}getOverlayContentClass(ie){return(0,_.I)({...B.hw,...B._7,borderRadius:(0,B.px)(16),border:(0,B.Cg)(2,"dashed",ie.theme.color.primary),"> :first-child":{...B.i3,...B.QP,...B.ko}})}dragenter(ie){this.dragEnter$$.next(ie)}dragleave(ie){this.dragLeave$$.next(ie)}dragover(ie){return!1}handleFileDrop(ie){ie.preventDefault(),this.dragLeave$$.next(ie);const te=ie.dataTransfer?.getData("file-url");if(te){const{downloadUrl:ct,name:nt,mimetype:Re}=JSON.parse(te);return(0,be.D)(fetch(ct)).pipe((0,N.w)(kn=>(0,be.D)(kn.blob())),(0,z.U)(kn=>({files:[new File([kn],nt,{type:Re})]})),(0,re.K)(()=>[]))}const ke=(0,D.gM)(ie);return(0,p.of)({files:ke})}handleUrlDrop(ie){ie.preventDefault(),this.dragLeave$$.next(ie);const te=ie.dataTransfer?.getData("url");
1if(te){const{url:ke}=JSON.parse(te);return{url:ke}}}onBodyDrop(ie){return ie.preventDefault(),!1}ngOnDestroy(){super.ngOnDestroy(),this.dragEnter$$.complete(),this.dragLeave$$.complete(),this.fileDragDropZone$$.complete(),this.drop$$.complete()}static#e=this.\u0275fac=function(te){return new(te||Ne)(W.Y36(B.Q2))};static#t=this.\u0275cmp=W.Xpm({type:Ne,selectors:[["t5s-dropzone-template"]],viewQuery:function(te,ke){if(1&te&&W.Gf(Yi,5),2&te){let ct;W.iGM(ct=W.CRH())&&(ke.fileDragDropZone=ct.first)}},hostBindings:function(te,ke){1&te&&W.NdJ("drop",function(nt){return ke.onBodyDrop(nt)},!1,W.pYS)},inputs:{active:"active",disabled:"disabled",text:"text"},outputs:{fileDrop:"fileDrop",urlDrop:"urlDrop"},features:[W.qOj],ngContentSelectors:tt,decls:5,vars:13,consts:[["data-cy","t5s-wc-file-drop-zone-wrapper",3,"dragenter","dragleave","dragover","drop"],[4,"ngIf"],[3,"icon"]],template:function(te,ke){1&te&&(W.F$t(),W.TgZ(0,"div",0),W.NdJ("dragenter",function(nt){return ke.dragenter(nt)})("dragleave",function(nt){return ke.dragleave(nt)})("dragover",function(nt){return ke.dragover(nt)})("drop",function(nt){return ke.drop$$.next(nt)}),W.TgZ(1,"div"),W.Hsn(2),W.qZA(),W.YNc(3,an,6,6,"ng-container",1),W.ALo(4,"async"),W.qZA()),2&te&&(W.Udp("width",100,"%")("height",100,"%")("position","relative")("z-index",0),W.xp6(1),W.Tol(ke.contentClass),W.xp6(2),W.Q6J("ngIf",W.lcZ(4,11,ke.state$)))},dependencies:[Vi.O5,Wi.k,e.S,Yt.L,Vi.Ov],encapsulation:2,changeDetection:0})}},15667:(Ye,he,r)=>{r.d(he,{Z:()=>ne});var B=r(57921),_=(r(79853),r(91052));class ne{static#e=this.\u0275fac=function(L){return new(L||ne)};static#t=this.\u0275mod=_.oAB({type:ne});static#n=this.\u0275inj=_.cJS({imports:[B.TI]})}},79853:(Ye,he,r)=>{r.d(he,{X:()=>L});var B=r(44813),D=r(3982),_=r(61316),g=r(91052),ne=r(63866);function O(be,p){if(1&be&&(g.ynx(0),g.TgZ(1,"div")(2,"div"),g.Hsn(3),g.qZA()(),g.BQk()),2&be){const w=p.ngIf,q=g.oxw();g.xp6(1),g.Tol(q.getModalContainerClass(w)),g.xp6(1),g.Tol(q.getBodyClass(w))}}const V=["*"];class L extends B.Oo{getModalContainerClass(p){return(0,_.I)({...D.hw,...D.i3,...D.QP,flexGrow:1,backgroundColor:p.theme.color.lightest})}getBodyClass(p){return(0,_.I)({...D.hw,...D.i3,...D.QP,flexGrow:1,padding:(0,D.o3)(0,0,0,0)})}static#e=this.\u0275fac=function(){let p;return function(q){return(p||(p=g.n5z(L)))(q||L)}}();static#t=this.\u0275cmp=g.Xpm({type:L,selectors:[["t5s-setup-modal-template"]],features:[g.qOj],ngContentSelectors:V,decls:2,vars:3,consts:[[4,"ngIf"]],template:function(w,q){1&w&&(g.F$t(),g.YNc(0,O,4,4,"ng-container",0),g.ALo(1,"async")),2&w&&g.Q6J("ngIf",g.lcZ(1,1,q.state$))},dependencies:[ne.O5,ne.Ov],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0})}},18:(Ye,he,r)=>{r.d(he,{k:()=>B});var B=(()=>{return(D=B||(B={})).INITIAL="INITIAL",D.REQUEST_LOADING="REQUEST_LOADING",D.LOADING="LOADING",D.LOAD_MORE="LOAD_MORE",D.LOADED="LOADED",D.EXCEPTION="EXCEPTION",B;var D})()},63995:(Ye,he,r)=>{r.d(he,{n:()=>B});var B=(()=>{return(D=B||(B={})).RECENTLY_VISITED="RECENTLY_VISITED",D.SEARCH="SEARCH",B;var D})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.