1import{a as ri}from"./chunk-DPNIXA7N.js";import{B as si,C as Re,D as Be,Ga as Si,H as z,Ha as gi,Jb as We,K as ai,L as li,M as ci,Mc as wi,Na as Ve,O as J,Ra as vi,Sa as Ge,Td as qe,Zb as He,bc as Ci,ca as ee,cd as $e,da as ye,db as Ce,dd as xi,e as Kt,ea as pi,eb as _e,fa as mi,gb as bi,ha as ze,hd as Ii,j as Xt,jb as yi,jd as te,kd as ki,la as hi,me as Ai,nd as Pi,ne as Te,oc as Di,pb as je,pc as Mi,qc as Ye,s as Jt,ya as fi,z as X}from"./chunk-BPMIFNOR.js";import{$b as Le,Aa as ni,Hb as oi,U as ct,bc as _i,cc as Ti,fa as Se,ha as ti,ia as dt,la as ge,q as ei,vb as K,wa as ve,xa as ut,xb as Ne,ya as ii,za as be}from"./chunk-3SOHUSEO.js";import{$a as kt,$b as Lt,Da as W,Db as N,Ea as Mt,Eb as Ot,Fb as g,Fc as fe,Ga as wt,Gb as Et,Ha as xt,Hb as u,He as di,Ib as Ut,Ja as O,Jb as Ft,Ka as ot,Ke as ui,La as q,Lb as me,M as bt,Mb as oe,Nb as se,Nc as Q,Q as Pe,Qa as It,Ra as de,Rb as Nt,Rc as Z,Sb as H,T as yt,Ta as c,Tb as Ee,Tc as Qt,W as $,Wb as _,Xb as B,Xc as A,Ya as l,Yb as Ue,Z as Ct,Zb as Rt,_ as _t,_a as C,_b as Bt,a as ce,ab as Pt,ac as zt,af as V,b as ke,bc as Vt,bf as G,cc as Gt,db as At,dc as jt,eb as st,ec as Wt,fa as it,g as et,ga as v,gc as Ht,ic as P,jc as w,jd as Zt,kc as Yt,kd as lt,lc as he,m as F,mb as f,mc as $t,n as tt,oa as Ae,ob as S,oc as qt,pa as Tt,qb as Oe,ra as nt,rb as E,rc as re,sa as Dt,sb as U,sc as rt,tb as h,tc as Fe,ub as d,vb as p,vc as at,wa as T,wb as b,xa as D,xb as ue,yb as pe}from"./chunk-XG6YRYXO.js";var Oi=` 2 .p-buttongroup { 3 display: inline-flex; 4 } 5 6 .p-buttongroup .p-button { 7 margin: 0; 8 } 9 10 .p-buttongroup .p-button:not(:last-child), 11 .p-buttongroup .p-button:not(:last-child):hover { 12 border-inline-end: 0 none; 13 } 14 15 .p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) { 16 border-radius: 0; 17 } 18 19 .p-buttongroup .p-button:first-of-type:not(:only-of-type) { 20 border-start-end-radius: 0; 21 border-end-end-radius: 0; 22 } 23 24 .p-buttongroup .p-button:last-of-type:not(:only-of-type) { 25 border-start-start-radius: 0; 26 border-end-start-radius: 0; 27 } 28 29 .p-buttongroup .p-button:focus { 30 position: relative; 31 z-index: 1; 32 } 33`;var wn=["*"],xn=` 34 ${Oi} 35 36 /* For PrimeNG */ 37 .p-buttongroup p-button:focus .p-button { 38 position: relative; 39 z-index: 1; 40 } 41 42 .p-buttongroup p-button:not(:last-child) .p-button, 43 .p-buttongroup p-button:not(:last-child) .p-button:hover { 44 border-right: 0 none; 45 } 46 47 .p-buttongroup p-button:not(:first-of-type):not(:last-of-type) .p-button { 48 border-radius: 0; 49 } 50 51 .p-buttongroup p-button:first-of-type:not(:only-of-type) .p-button { 52 border-start-end-radius: 0; 53 border-end-end-radius: 0; 54 } 55 56 .p-buttongroup p-button:last-of-type:not(:only-of-type) .p-button { 57 border-start-start-radius: 0; 58 border-end-start-radius: 0; 59 } 60`,In={root:"p-buttongroup p-component"},Ei=(()=>{class n extends di{name="buttongroup";style=xn;classes=In;static \u0275fac=(()=>{let o;return function(t){return(o||(o=ot(n)))(t||n)}})();static \u0275prov=Ae({token:n,factory:n.\u0275fac})}return n})();var pt=(()=>{class n extends ui{componentName="ButtonGroup";_componentStyle=Dt(Ei);static \u0275fac=(()=>{let o;return function(t){return(o||(o=ot(n)))(t||n)}})();static \u0275cmp=C({type:n,selectors:[["p-buttonGroup"],["p-buttongroup"],["p-button-group"]],features:[Ht([Ei]),At],ngContentSelectors:wn,decls:2,vars:0,consts:[["role","group",1,"p-buttongroup","p-component"]],template:function(e,t){e&1&&(Ut(),d(0,"span",0),Ft(1),p())},dependencies:[A],encapsulation:2,changeDetection:0})}return n})(),Ui=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=kt({type:n});static \u0275inj=Tt({imports:[pt]})}return n})();var ae=et(ct());var Pn=["1d","2d","3d","5d","7d","1w"],An={"1d":1,"2d":2,"3d":3,"5d":5,"7d":7,"1w":7},On={1:"1d",2:"2d",3:"3d",5:"5d",7:"7d"},De=(()=>{let s=class s{constructor(e,t){this.viewportService=e,this.localStorageService=t,this.calendarRangeSubject=new tt(null),this.calendarRange$=this.calendarRangeSubject.asObservable(),this.todaySelectedSubject=ne
60w tt(null),this.todaySelected$=this.todaySelectedSubject.asObservable(),this.triggerTodaySelected$=new F}isCalendarViewMode(e){return Pn.includes(e)}getInitialCalendarMode(){let e=this.localStorageService.getItem("calendarMode");if(e!==null){if(this.isCalendarViewMode(e))return e}else{let t=this.getDefaultCalendarMode(this.viewportService.width());return this.localStorageService.setItem("calendarMode",t),t}}getNumberOfdaysForCalendarMode(e){return An[e]}getCalendarModeFromNumberOfDays(e,t){return e===7&&t?"1w":On[e]}storeCalendarMode(e){this.localStorageService.setItem("calendarMode",e)}emitCalendarRange(e){this.calendarRangeSubject.next(e)}emitTodaySelected(){this.todaySelectedSubject.next(null)}triggerTodaySelected(){this.triggerTodaySelected$.next()}getMaxDaysToShow(e){return e<480?1:e<760?3:e<908?5:e<=1099?3:e<=1279?5:(e<=1535,7)}getDefaultCalendarMode(e){return e<480?"1d":e<760?"2d":(e<908||e<=1099||e<=1279||e<=1535,"3d")}};s.\u0275fac=function(t){return new(t||s)(nt(ve),nt(be))},s.\u0275prov=Ae({token:s,factory:s.\u0275fac,providedIn:"root"});let n=s;return n})();var En=n=>({"padding-right.px":n}),Qe=()=>({autofocus:!1});function Un(n,s){if(n&1){let o=N();d(0,"p-button",12),g("click",function(){T(o);let t=u(2);return D(t.onCycleNumberOfDays())}),d(1,"span",7),_(2,"Toggle number of days to show on calendar"),p()()}if(n&2){let o=u(2);h("buttonProps",P(3,Qe))("outlined",!0)("label",o.selectedCalendarModeNumberOfdays)}}function Fn(n,s){if(n&1){let o=N();d(0,"p-select",13),g("onChange",function(t){T(o);let i=u(2);return D(i.onChangeNumberOfDaysToShow(t))}),p()}if(n&2){let o=u(2);h("tooltipDisabled",!o.enableTooltipOndaySelector)("options",o.calendarViewModeOptions)("ngModel",o.selectedCalendarMode)}}function Nn(n,s){if(n&1&&f(0,Un,3,4,"p-button",10)(1,Fn,1,3,"p-select",11),n&2){let o=u();S(o.viewportService.isSmallDesktop()?0:1)}}var Rn={root:{borderRadius:"8px"},secondary:{background:"#fff",color:"#62647E",activeBackground:"#f2e8dc",borderColor:"#f2e8dc"},sm:{fontSize:"12px",fontWeight:600}},Li=(()=>{let s=class s{constructor(e,t,i,r,a,m){this.viewportService=e,this.calendarViewService=t,this.dialogService=i,this.localStorageAccessService=r,this.timeUtils=a,this.cdr=m,this.ngUnsubscribe=new F,this.faChevronLeft=fi,this.faChevronRight=hi,this.calendarButtonToken=Rn,this.calendarViewModeOptions=[{label:"1 day",value:"1d",disabled:!1},{label:"2 days",value:"2d",disabled:!1},{label:"3 days",value:"3d",disabled:!1},{label:"5 days",value:"5d",disabled:!1},{label:"7 days",value:"7d",disabled:!1},{label:"Week",value:"1w",disabled:!1}],this.enableTooltipOndaySelector=!1,this.lastCheckedDay=ae.default.tz(this.timezone).startOf("day"),xt(y=>{let x=e.width(),I=setTimeout(()=>{let j=this.maxDaysToShow;this.maxDaysToShow=this.calendarViewService.getMaxDaysToShow(x),j!==this.maxDaysToShow&&(this.calendarViewModeOptions.forEach(L=>{L.disabled=this.calendarViewService.getNumberOfdaysForCalendarMode(L.value)>this.maxDaysToShow}),this.enableTooltipOndaySelector=this.calendarViewModeOptions.some(L=>L.disabled)),this.updateCalendarViewModeBasedOnWidth(),this.cdr.markForCheck()});y(()=>clearTimeout(I))})}onSelectDate(e){this.setDateString(),this.emitCalendarRange()}ngOnChanges(e){e.startOfWeekDay&&!e.startOfWeekDay.firstChange&&this.selectedCalendarMode==="1w"&&(this.setDateString(),this.emitCalendarRange())}initializeDate(){if(this.timezone){let e=ae.default.tz(this.timezone);this.setSelectedDate(e.format("MM.DD.YYYY")),this.emitCalendarRange()}}updateCalendarViewModeBasedOnWidth(){if(!this.maxDaysToShow||!this.storedCalendarMode)return;let e=Math.min(this.storedCalendarModeNumberOfdays,this.maxDaysToShow);this.selectedCalendarModeNumberOfdays!==e&&(this.selectedCalendarModeNumberOfdays=e,this.selectedCalendarMode=this.calendarViewService.getCalendarModeFromNumberOfDays(e,this.storedCalendarMode==="1w"),this.initialized?(this.setDateString(),this.emitCalendarRange()):(this.initialized=!0,this.initializeDate()))}ngOnInit(){this.storedCalendarMode=this.calendarViewService.getInitialCalendarMode(),this.storedCalendarModeNumberOfdays=this.calendarViewService.getNumberOfdaysForCalendarMode(this.storedCalendarMode),this.updateCalendarViewModeBasedOnWidth(),this.calendarViewService.triggerTodaySelected$.pipe(v(this.ngUnsubscribe)).subscribe(()=>{this.onClickToday()}),this.timeUtils.onIdleMinuteStart().pipe(v(this.ngUnsubscribe)).subscribe(()=>{this.onClickToday()})}setSelectedDate(e){this.selectedDateString=e,this.setDateString()}setDateString(){let e=(0,ae.default)(this.selectedDateString,"MM.DD.YYYY").tz(this.timezone).startOf("day"),t=e.clone().add(this.selectedCalendarModeNumberOfdays-1,"days"),i=e.format("MMM"),r=e.format("YYYY"),a=t.format("MMM"),m=t.format("YYYY"),y;e.month()===t.month()?y=`${i} ${r}`:y=`${i} - ${a} ${m}`,this.dateStringDisplay=y}onClickToday(){this.initializeDate(),this.calendarViewService.emitTodaySelected()}onClickAdvanceForward(){let i=(0,ae.default)(this.selectedDateString,"MM.DD.YYYY").add(this.selectedCalendarModeNumberOfdays,"days").format("MM.DD.YYYY");this.setSelectedDate(i),this.emitCalendarRange()}onClickAdvanceBackwards(){let i=(0,ae.default)(this.selectedDateString,"MM.DD.YYYY").subtract(this.selectedCalendarModeNumberOfdays,"days").format("MM.DD.YYYY");this.setSelectedDate(i),this.emitCalendarRange()}determineCalendarViewStartDate(){let e=(0,ae.default)(this.selectedDateString,"MM.DD.YYYY").tz(this.timezone).startOf("day");return this.selectedCalendarMode==="1w"&&(e.day()===0&&this.startOfWeekDay===1&&e.subtract(7,"days"),e.day(this.startOfWeekDay)),e.valueOf()}emitCalendarRange(){this.calendarViewService.emitCalendarRange({startTime:this.determineCalendarViewStartDate(),numberOfDaysToShow:this.selectedCalendarModeNumberOfdays})}onChangeNumberOfDaysToShow(e){this.storedCalendarMode=e.value,this.storedCalendarModeNumberOfdays=this.calendarViewService.getNumberOfdaysForCalendarMode(e.value),this.selectedCalendarMode=e.value,this.selectedCalendarModeNumberOfdays=this.storedCalendarModeNumberOfdays,this.calendarViewService.storeCalendarMode(e.value),this.setDateString(),this.emitCalendarRange(),this.selectedCalendarMode==="1w"&&!this.hasSeenStartOfWeekDialog()&&(this.dialogService.openEditStartOfWeekDayDialog(!0),this.setHasSeenStartOfWeekDialog())}onCycleNumberOfDays(){this.selectedCalendarModeNumberOfdays===this.maxDaysToShow?this.selectedCalendarModeNumberOfdays=1:this.selectedCalendarModeNumberOfdays+=1,this.selectedCalendarMode=this.calendarViewService.getCalendarModeFromNumberOfDays(this.selectedCalendarModeNumberOfdays,!1),this.calendarViewService.storeCalendarMode(this.selectedCalendarMode),this.setDateString(),this.emitCalendarRange()}addDays(e,t){let i=new Date(e);return i.setDate(i.getDate()+t),i}subtractDays(e,t){let i=new Date(e);return i.setDate(i.getDate()-t),i}hasSeenStartOfWeekDialog(){return this.localStorageAccessService.getItem("viewedDialog:startOfWeekDay")==="true"}setHasSeenStartOfWeekDialog(){this.localStorageAccessService.setItem("viewedDialog:startOfWeekDay","true")}ngOnDestroy(){this.ngUnsubscribe.next(null),this.ngUnsubscribe.complete()}};s.\u0275fac=function(t){return new(t||s)(l(ve),l(De),l(Te),l(be),l(K),l(fe))},s.\u0275cmp=C({type:s,selectors:[["fm-calendar-header"]],inputs:{timezone:"timezone",startOfWeekDay:"startOfWeekDay",scrollBarWidth:"scrollBarWidth"},features:[O],decls:17,vars:22,consts:[[1,"pb-2","bp908:pb-4","pt-0","bp908:pt-2","w-full","bg-p-content-background","flex","justify-between","items-center","touch-none",3,"ngStyle"],[1,"ml-[45px]","flex","text-color","font-inter","text-base","font-semibold","items-center"],[1,"text-14","font-medium"],["aria-label","Choose calendar date","dateFormat","mm.dd.yy","inputStyleClass","!w-0 !p-0 !border-none","panelStyleClass","!mt-2","dataType","string","icon","pi pi-chevron-down","appendTo","body",1,"ml-2","calendar-datepicker",3,"ngModelChange","onSelect","ngModel","readonlyInput","showIcon","firstDayOfWeek","selectOtherMonths"],[1,"flex","justify-end","items-center"],[1,"ml-2"],["severity","secondary","size","small","icon","pi pi-chevron-left","styleClass","w-8 aspect-square",3,"onClick","buttonProps","outlined"],[1,"sr-only"],["severity","secondary","size","small","styleClass","min-w-8",3,"onClick","buttonProps","outlined","label"],["severity","secondary","size","small","icon","pi pi-chevron-right","styleClass","w-8 aspect-square",3,"onClick","buttonProps","outlined"],["styleClass","w-8 aspect-square","severity","secondary","size","small",1,"w-8",3,"buttonProps","outlined","label"],["aria-label","Change number of days to show on calendar","pTooltip","Some options disabled due to screen size","size","small","scrollHeight","400","severity","secondary","optionDisabled","disabled","optionLabel","label","optionValue","value",1,"w-[108px]",3,"tooltipDisabled","options","ngModel"],["styleClass","w-8 aspect-square","severity","secondary","size","small",1,"w-8",3,"click","buttonProps","outlined","label"],["aria-label","Change number of days to show on calendar","pTooltip","Some options disabled due to screen size","size","small","scrollHeight","400","severity","secondary","optionDisabled","disabled","optionLabel","label","optionValue","value",1,"w-[108px]",3,"onChange","tooltipDisabled","options","ngModel"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"div",1)(2,"div",2),_(3),p(),d(4,"p-datepicker",3),zt("ngModelChange",function(a){return Lt(i.selectedDateString,a)||(i.selectedDateString=a),a}),g("onSelect",function(a){return i.onSelectDate(a)}),p()(),d(5,"div",4),f(6,Nn,2,1),d(7,"p-buttonGroup",5)(8,"p-button",6),g("onClick",function(){return i.onClickAdvanceBackwards()}),d(9,"span",7),_(10,"Go back one day"),p()(),d(11,"p-button",8),g("onClick",function(){return i.onClickToday()}),d(12,"span",7),_(13,"Go to today"),p()(),d(14,"p-button",9),g("onClick",function(){return i.onClickAdvanceForward()}),d(15,"span",7),_(16,"Go forward one day"),p()()()()()),t&2&&(Ee("opacity-0",i.scrollBarWidth===void 0),h("ngStyle",w(17,En,i.scrollBarWidth)),c(3),B(i.dateStringDisplay),c(),Bt("ngModel",i.selectedDateString),h("readonlyInput",!0)("showIcon",!0)("firstDayOfWeek",i.startOfWeekDay)("selectOtherMonths",!0),c(2),S(i.maxDaysToShow>1?6:-1),c(2),h("buttonProps",P(19,Qe))("outlined",!0),c(3),h("buttonProps",P(20,Qe))("outlined",!0)("label",i.viewportService.isSmallDesktop()?"T":"Today"),c(3),h("buttonProps",P(21,Qe))("outlined",!0))},dependencies:[ye,ee,A,Z,gi,Si,Jt,Kt,Xt,mi,pi,G,V,Ui,pt,ze],encapsulation:2});let n=s;return n})();var zi="/assets/images/blank_profile.png",Vi=(()=>{let s=class s{ngOnChanges(){this.groupAvatar=this.avatarLocation||zi}onProfileImageFailedToLoad(){this.groupAvatar=zi}};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=C({type:s,selectors:[["fm-group-avatar"]],inputs:{avatarLocation:"avatarLocation"},features:[O],decls:2,vars:2,consts:[[1,"overflow-hidden","rounded","flex","items-center","justify-center","border","border-white","h-6","w-6"],[1,"h-full","w-full","object-cover",3,"error","src"]],template:function(t,i){t&1&&(ue(0,"div",0)(1,"img",1),Et("error",function(){return i.onProfileImageFailedToLoad()}),pe()()),t&2&&(c(),Ot("src",Wt(i.groupAvatar),It))},encapsulation:2});let n=s;return n})();var Gi=()=>({autofocus:!1}),Ln=(n,s)=>s.groupId;function zn(n,s){if(n&1){let o=N();d(0,"p-button",11),g("click",function(t){T(o);let i=u();return D(i.onClosePopover.emit(t))}),p()}n&2&&h("buttonProps",P(2,Gi))("outlined",!0)}function Vn(n,s){if(n&1&&(_(0," \xA0\xB7\xA0"),b(1,"fm-ambassador-sessions-badge",12)),n&2){let o=u();c(),h("tag",!1)("ambassadorSessionsAttended",o.data.partner==null?null:o.data.partner.ambassadorSessionsAttended)}}function Gn(n,s){if(n&1&&(d(0,"div",9),b(1,"fm-host-badge",13),p()),n&2){let o=u();c(),h("isHost",!!(o.data.partner!=null&&o.data.partner.isHost))}}function jn(n,s){if(n&1&&b(0,"fm-group-avatar",15),n&2){let o=u().$implicit;h("avatarLocation",o.groupLogo)}}function Wn(n,s){if(n&1&&f(0,jn,1,1,"fm-group-avatar",15),n&2){let o=s.$index;S(o<2?0:-1)}}function Hn(n,s){if(n&1&&(d(0,"div",14),_(1),p()),n&2){let o=u(2);c(),Ue("+",o.sharedGroups.length-2)}}function Yn(n,s){if(n&1&&(d(0,"div",10),E(1,Wn,1,1,null,null,Ln),f(3,Hn,2,1,"div",14),p()),n&2){let o=u();c(),U(o.sharedGroups),c(2),S(o.sharedGroups.length>2?3:-1)}}var ji=(()=>{let s=class s{constructor(e,t){this.userService=e,this.featureCheckService=t,this.onViewProfileSelected=new W,this.onClosePopover=new W,this.sharedGroups=[]}ngOnInit(){let e=[];this.userService.currentUser.pipe($(1)).subscribe(t=>{for(let i of this.data.partner?.groups){let r=t.group.find(a=>a.groupId===i.groupId);r&&e.push(r)}this.sharedGroups=[...e]})}ngOnChanges(){}};s.\u0275fac=function(t){return new(t||s)(l(z),l(J))},s.\u0275cmp=C({type:s,selectors:[["fm-profile-preview"]],inputs:{data:"data",showCloseButton:"showCloseButton"},outputs:{onViewProfileSelected:"onViewProfileSelected",onClosePopover:"onClosePopover"},features:[O],decls:17,vars:16,consts:[[1,"relative","flex","flex-col","justify-start","items-center","gap-4","bg-p-content-hover-background","font-inter","w-40","p-3","pointer-events-auto"],["size","small","severity","secondary","icon","pi pi-times",1,"absolute","top-0","right-0",3,"buttonProps","outlined"],[1,"flex","flex-col","justify-start","items-center","gap-2"],[1,"flex","flex-col","justify-start","items-center","gap-1"],[3,"sizePx","isSaved","avatarLocation"],[1,"font-semibold","text-14","text-color","leading-[17px]","text-center","text-ellipsis","overflow-hidden"],["size","small","label","View profile","severity","primary",3,"click","buttonProps","fmSendProfileToDynamicPanel","fmSendProfileToDynamicPanelSource","outlined"],[1,"flex","flex-col","justify-center","items-center","text-12","text-muted-color","font-medium","leading-[15px]","w-full","text-center"],[1,"flex","flex-row","items-center"],[1,"flex","w-full","justify-center"],[1,"flex","flex-row","justify-center","items-center","gap-0.5"],["size","small","severity","secondary","icon","pi pi-times",1,"absolute","top-0","right-0",3,"click","buttonProps","outlined"],[3,"tag","ambassadorSessionsAttended"],["size","small",3,"isHost"],[1,"bg-p-content-background","text-muted-color","text-10","font-medium","h-6","w-6","rounded","flex","item-center","justify-center","leading-[24px]","text-center"],[3,"avatarLocation"]],template:function(t,i){t&1&&(d(0,"div",0),f(1,zn,1,3,"p-button",1),d(2,"div",2)(3,"div",3),b(4,"fm-avatar",4),d(5,"div",5),_(6),p()(),d(7,"p-button",6),g("click",function(a){return i.onViewProfileSelected.next(a)}),p(),d(8,"div",7)(9,"div",8)(10,"div"),_(11),p(),f(12,Vn,2,2),p(),f(13,Gn,2,1,"div",9),d(14,"div"),_(15),p()(),f(16,Yn,4,1,"div",10),p()()),t&2&&(c(),S(i.showCloseButton?1:-1),c(3),h("sizePx",64)("isSaved",i.data.partner==null?null:i.data.partner.saved)("avatarLocation",i.data.partner==null?null:i.data.partner.profilePhoto),c(2),B(i.data.partner==null?null:i.data.partner.displayName),c(),h("buttonProps",P(15,Gi))("fmSendProfileToDynamicPanel",i.data.partner.profileSlug)("fmSendProfileToDynamicPanelSource","Profile Preview")("outlined",!0),c(4),Rt(" ",i.data.partner==null?null:i.data.partner.completedSessions," ",(i.data.partner==null?null:i.data.partner.completedSessions)==1?"session":"sessions"," "),c(),S(i.data.partner!=null&&i.data.partner.ambassadorSessionsAttended?12:-1),c(),S(i.data.partner!=null&&i.data.partner.isHost&&i.featureCheckService.groupMeetingsEnabledSig()?13:-1),c(2),B(i.data.partner==null?null:i.data.partner.timezone),c(),S(i.sharedGroups.length>0?16:-1))},dependencies:[He,Vi,G,V,Ci,Di,Mi],encapsulation:2});let n=s;return n})();var qn=n=>({"cursor-pointer":n}),Wi=()=>({autofocus:!1});function Qn(n,s){if(n&1&&b(0,"fm-profile-preview",9),n&2){let o=u(2);h("data",o.partnerInfo)}}function Zn(n,s){if(n&1){let o=N();d(0,"div",10),g("pointerdown",function(t){T(o);let i=u(2);return D(i.onPointerDownOverlay(t))})("click",function(t){T(o);let i=u(2);return D(i.onClickOverlay(t))}),p()}}function Kn(n,s){if(n&1){let o=N();d(0,"fm-avatar",5),g("touchstart",function(t){T(o);let i=u();return D(i.onTouchStartAvatar(t))})("touchend",function(t){T(o);let i=u();return D(i.onTouchAvatar(t))})("pointerenter",function(t){T(o);let i=u();return D(i.onPointerEnterAvatar(t))})("mouseenter",function(t){T(o);let i=u();return D(i.onMouseEnterAvatar(t))}
60),p(),st(1,Qn,1,1,"ng-template",null,0,at),d(3,"p-popover",6,1),g("onShow",function(){T(o);let t=u();return D(t.overlayVisible=!0)})("onHide",function(){T(o);let t=u();return D(t.overlayVisible=!1)}),d(5,"fm-profile-preview",7),g("onViewProfileSelected",function(t){T(o);let i=u();return D(i.closePopover(t))})("onClosePopover",function(t){T(o);let i=u();return D(i.closePopover(t))}),p()(),f(6,Zn,1,0,"div",8)}if(n&2){let o=Nt(2),e=u();h("sizePx",36)("pTooltip",o)("autoHide",!1)("isSaved",e.partnerInfo.partner==null?null:e.partnerInfo.partner.saved)("isQuietMode",e.partnerInfo.partner==null?null:e.partnerInfo.partner.preferences.quietMode.value)("avatarLocation",e.partnerInfo.partner==null?null:e.partnerInfo.partner.profilePhoto),c(3),h("dismissable",!1)("autoZIndex",!1),c(2),h("data",e.partnerInfo)("showCloseButton",!0),c(),S(e.overlayVisible?6:-1)}}function Xn(n,s){n&1&&b(0,"fm-icon",14)}function Jn(n,s){if(n&1){let o=N();d(0,"p-button",13),g("click",function(t){T(o);let i=u(2);return D(i.onClickSendTimeslotGroupMeetingsToDynamicPanel(t))}),st(1,Xn,1,0,"ng-template",null,2,at),p()}n&2&&h("buttonProps",P(2,Wi))("outlined",!0)}function eo(n,s){if(n&1){let o=N();d(0,"p-button",15),g("click",function(){T(o);let t=u(2);return D(t.onClickSendTimeslotPartnersToDynamicPanel())}),p()}n&2&&h("buttonProps",P(2,Wi))("outlined",!0)}function to(n,s){if(n&1&&(d(0,"div",4),f(1,Jn,3,3,"p-button",11),f(2,eo,1,3,"p-button",12),p()),n&2){let o=u();c(),S(o.hasAvailableGroupMeeting?1:-1),c(),S(o.hasDirectBookablePartner?2:-1)}}var Hi=(()=>{let s=class s{constructor(e){this.contentStackService=e,this.isSaved=!1,this.isQuietMode=!1,this.hasDirectBookablePartner=!1,this.hasAvailableGroupMeeting=!1,this.lastPointerType=null}ngOnInit(){}onClickSendTimeslotPartnersToDynamicPanel(){this.contentStackService.pushTimeslotPartnersToDynamicPanel(this.partnerInfo.sessionTime,this.partnerInfo.sessionDuration)}onClickSendTimeslotGroupMeetingsToDynamicPanel(e){e?.stopPropagation(),e?.preventDefault(),this.contentStackService.pushTimeslotGroupMeetingsToDynamicPanel(this.partnerInfo.sessionTime,this.partnerInfo.sessionDuration)}showTooltip(e){this.tooltip.activate(),e.stopPropagation(),e.preventDefault()}onTouchStartAvatar(e){e.stopImmediatePropagation()}onPointerEnterAvatar(e){this.lastPointerType=e.pointerType}onMouseEnterAvatar(e){this.lastPointerType==="touch"&&e.stopImmediatePropagation()}onTouchAvatar(e){this.popover.toggle(e),e.stopPropagation(),e.preventDefault()}onClickOverlay(e){this.popover.hide(),this.overlayVisible=!1,e.preventDefault(),e.stopPropagation()}onPointerDownOverlay(e){e.preventDefault(),e.stopPropagation()}closePopover(e){this.popover.hide(),e.stopPropagation(),e.preventDefault()}};s.\u0275fac=function(t){return new(t||s)(l(qe))},s.\u0275cmp=C({type:s,selectors:[["fm-available-partner-tile"]],viewQuery:function(t,i){if(t&1&&me(ee,5)($e,5),t&2){let r;oe(r=se())&&(i.tooltip=r.first),oe(r=se())&&(i.popover=r.first)}},inputs:{partnerInfo:"partnerInfo",validPartner:"validPartner",sessionTime:"sessionTime",sessionDuration:"sessionDuration",profilePhoto:"profilePhoto",profileSlug:"profileSlug",isSaved:"isSaved",isQuietMode:"isQuietMode",hasDirectBookablePartner:"hasDirectBookablePartner",hasAvailableGroupMeeting:"hasAvailableGroupMeeting",isSelectable:"isSelectable"},decls:3,vars:5,consts:[["tooltipContent",""],["op",""],["icon",""],[1,"w-full","h-full","flex","flex-row","items-center","justify-between","px-1.5","rounded-lg","group","animation-fade-in-quick",3,"ngClass"],[1,"ml-auto","flex","items-center","gap-[3px]"],["tooltipPosition","left","tooltipStyleClass","profile-preview",3,"touchstart","touchend","pointerenter","mouseenter","sizePx","pTooltip","autoHide","isSaved","isQuietMode","avatarLocation"],["styleClass","z-[960] !bg-p-content-hover-background",3,"onShow","onHide","dismissable","autoZIndex"],[3,"onViewProfileSelected","onClosePopover","data","showCloseButton"],[1,"fixed","inset-0","bg-transparent","z-[999]","touch-none","select-none"],[3,"data"],[1,"fixed","inset-0","bg-transparent","z-[999]","touch-none","select-none",3,"pointerdown","click"],["pTooltip","Group Sessions","severity","info","ariaLabel","Group Sessions","styleClass","h-[36px] bp908:!w-5",3,"buttonProps","outlined"],["severity","secondary","icon","pi pi-star-fill","styleClass","h-[36px] bp908:!w-5",3,"buttonProps","outlined"],["pTooltip","Group Sessions","severity","info","ariaLabel","Group Sessions","styleClass","h-[36px] bp908:!w-5",3,"click","buttonProps","outlined"],["name","flower","size","14px"],["severity","secondary","icon","pi pi-star-fill","styleClass","h-[36px] bp908:!w-5",3,"click","buttonProps","outlined"]],template:function(t,i){t&1&&(d(0,"div",3),f(1,Kn,7,11),f(2,to,3,2,"div",4),p()),t&2&&(h("ngClass",w(3,qn,i.isSelectable)),c(),S(i.partnerInfo.partner?1:-1),c(),S(i.hasDirectBookablePartner||i.hasAvailableGroupMeeting?2:-1))},dependencies:[xi,$e,ye,ee,G,V,A,Q,He,wi,ji],encapsulation:2});let n=s;return n})();var Xe=(()=>{let s=class s{constructor(e){this.elementRef=e,this.windowResized=new W,this.windowResized.emit({width:this.elementRef.nativeElement.offsetWidth,height:this.elementRef.nativeElement.offsetHeight})}onResize(e){this.windowResized.emit({width:this.elementRef.nativeElement.offsetWidth,height:this.elementRef.nativeElement.offsetHeight})}ngOnInit(){}ngAfterViewInit(){setTimeout(()=>{this.windowResized.emit({width:this.elementRef.nativeElement.offsetWidth,height:this.elementRef.nativeElement.offsetHeight})})}ngOnDestroy(){}};s.\u0275fac=function(t){return new(t||s)(l(q))},s.\u0275dir=Pt({type:s,selectors:[["","windowResized",""]],hostBindings:function(t,i){t&1&&g("resize",function(a){return i.onResize(a)},de)},outputs:{windowResized:"windowResized"}});let n=s;return n})();var io=(n,s,o)=>({"pointer-events-none":n,"bg-[linear-gradient(to_bottom,transparent_40px,var(--p-content-background)_40px)]":s,"bg-[linear-gradient(to_bottom,transparent_40px,var(--today-column-color)_40px)]":o}),no=n=>({"height.px":n}),oo=n=>({"opacity-50":n}),Yi=99,we=48;var qi=(()=>{let s=class s{constructor(e,t){this.dstBoundaryService=e,this.sessionSettingsService=t,this.sessionDuration=15e5,this.slotNumber=null,this.sessionTime=null,this.partnerAvailable=!1,this.timeslotselected=new W,this.outlineHeight=0,this.sessionDimensionsMap={15e5:{outlineheight:we*2},3e6:{outlineheight:we*4},45e5:{outlineheight:we*6}},this.determineIcons()}ngOnChanges(){if(this.sessionDuration){let e=this.dstBoundaryService.intersectsSpringForward(this.timezone,this.sessionTime,this.sessionTime+this.sessionDuration),t;this.sessionDuration===45e5&&this.slotNumber>93?t=this.sessionDimensionsMap[3e6].outlineheight:t=this.sessionDimensionsMap[this.sessionDuration].outlineheight,e.intersects&&(t+=we*(e.shiftMinutes/15),t/we+this.slotNumber>=Yi&&(t=(Yi-this.slotNumber-1)*we)),this.outlineHeight=t}this.determineIcons()}determineIcons(){this.activityType=this.sessionSettingsService.getSessionSettingActivityType(),this.quietMode=this.sessionSettingsService.quietModeEnabled()}};s.\u0275fac=function(t){return new(t||s)(l(te),l(Ce))},s.\u0275cmp=C({type:s,selectors:[["fm-session-selector-outline"]],inputs:{sessionDuration:"sessionDuration",slotNumber:"slotNumber",sessionTime:"sessionTime",partnerAvailable:"partnerAvailable",isToday:"isToday",timezone:"timezone"},outputs:{timeslotselected:"timeslotselected"},features:[O],decls:5,vars:18,consts:[[1,"flex","flex-col","w-full","border-2","border-primary","rounded-xl","absolute","cursor-pointer","z-30","px-[4px]","pt-[4px]",3,"ngClass","ngStyle"],[1,"rounded-lg","h-9","w-9","flex","items-center","justify-center","bg-primary",3,"ngClass"],[1,"pi","pi-check","text-white/100"],[1,"text-xs","font-normal","text-muted-color","pb-[4px]","pr-[4px]","flex","items-center","justify-start","gap-[4px]"],[3,"isQuietMode","activityType","sessionDuration","showActivityType","isLockedIn","showTooltips","showPreferFavorites"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"div",1),b(2,"i",2),p(),d(3,"div",3),b(4,"fm-session-indicator-icons",4),p()()),t&2&&(h("ngClass",he(10,io,i.partnerAvailable,!i.isToday,i.isToday))("ngStyle",w(14,no,i.outlineHeight)),c(),h("ngClass",w(16,oo,i.partnerAvailable)),c(3),h("isQuietMode",i.quietMode)("activityType",i.activityType)("sessionDuration",i.sessionDuration)("showActivityType",!0)("isLockedIn",!1)("showTooltips",!1)("showPreferFavorites",i.sessionSettingsService.preferFavoritesSetting()==="preferred"))},dependencies:[A,Q,Z,ze,Ii],encapsulation:2});let n=s;return n})();var lo=n=>({"height.px":n}),Qi=()=>({autofocus:!1}),Zi=99,xe=48,Ki=(()=>{let s=class s{constructor(e,t,i,r,a,m,y,x,I){this.elementRef=e,this.rewardsReferralService=t,this.userService=i,this.errorHandlerService=r,this.dialogService=a,this.welcomeChecklistService=m,this.bs=y,this.selectedSessionService=x,this.dstBoundaryService=I,this.sessionDuration=15e5,this.slotNumber=null,this.booking=!1,this.ngUnsubscribe=new F,this.currentUser=new ei,this.tileHeight=0,this.sessionDimensionsMap={15e5:{tileHeight:xe*2},3e6:{tileHeight:xe*4},45e5:{tileHeight:xe*6}},this.isWelcomeChecklistActive=this.welcomeChecklistService.isWelcomeChecklistActive}ngOnInit(){this.userService.currentUser.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.currentUser=e})}ngOnChanges(){if(this.sessionDuration){let e=this.dstBoundaryService.intersectsSpringForward(this.timezone,this.sessionTime,this.sessionTime+this.sessionDuration),t;this.sessionDuration===45e5&&this.slotNumber>93?t=this.sessionDimensionsMap[3e6].tileHeight:t=this.sessionDimensionsMap[this.sessionDuration].tileHeight,e.intersects&&(t+=xe*(e.shiftMinutes/15),t/xe+this.slotNumber>=Zi&&(t=(Zi-this.slotNumber-1)*xe)),this.tileHeight=t}}onClickClearSelectedSession(e){e.stopPropagation(),this.selectedSessionService.deleteSelectedSession(this.sessionTime)}onClickBookSession(e){if(this.booking)return;e.stopPropagation();let t=this.selectedSessionService.getSelectedSessionInfoByTime(this.sessionTime),i={favorites:{value:t.sessionPreferenceFavorites},quietMode:{value:t.quietMode}},r={sessionTime:this.sessionTime,userAvailabilityCode:"",duration:this.sessionDuration,userId:"",title:"",preferences:i,activityType:t.activityType};this.bs.bookSessions([r],this.currentUser.timeZone,Ne.CalendarTile).pipe($(1)).subscribe(a=>
60{let m=this.bs.parseBookResponse(a);m.numSuccess!==0&&this.dialogService.openConfirmTransaction(m.numSuccess===1?"Session booked!":m.numSuccess+" sessions booked!",3e3,{desktopOnly:!0}),this.currentUser.emailVerified===!1?this.dialogService.openEmailVerificationDialog(Ve,()=>{this.processParsedResult(m)}):this.processParsedResult(m)},a=>{this.errorHandlerService.handleErrorResponse(a)})}processParsedResult(e){e.planLimitReached===!0?this.dialogService.openPlanLimitReachedDialog():!this.isWelcomeChecklistActive()&&!this.currentUser.properties.viewedSegmentationSurveyModal&&this.currentUser.compSessions>=3?this.dialogService.openSegmentationSurveyModal():!this.isWelcomeChecklistActive()&&this.rewardsReferralService.shouldSeeReferralPrompt(this.currentUser)&&this.dialogService.openReferralPromptModal()}ngOnDestroy(){this.ngUnsubscribe.next(null),this.ngUnsubscribe.complete()}};s.\u0275fac=function(t){return new(t||s)(l(q),l(Le),l(z),l(je),l(Te),l(We),l(Ge),l(X),l(te))},s.\u0275cmp=C({type:s,selectors:[["fm-selected-session-tile"]],inputs:{sessionTime:"sessionTime",sessionDuration:"sessionDuration",slotNumber:"slotNumber",booking:"booking",timezone:"timezone"},features:[O],decls:3,vars:11,consts:[[1,"flex","flex-col","w-full","justify-between","items-center","border-2","border-primary","rounded-xl","absolute","bg-p-content-background","p-1","z-20",3,"ngStyle"],["severity","primary","styleClass","w-full",1,"w-full",3,"click","buttonProps","label","loading"],["label","Clear","severity","primary","styleClass","w-full",1,"w-full",3,"click","buttonProps","outlined","disabled"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"p-button",1),g("click",function(a){return i.onClickBookSession(a)}),p(),d(2,"p-button",2),g("click",function(a){return i.onClickClearSelectedSession(a)}),p()()),t&2&&(h("ngStyle",w(7,lo,i.tileHeight)),c(),h("buttonProps",P(9,Qi))("label",i.booking?"":"Book")("loading",i.booking),c(),h("buttonProps",P(10,Qi))("outlined",!0)("disabled",i.booking))},dependencies:[A,Z,G,V],encapsulation:2});let n=s;return n})();var co=["dayContainer"],uo=(n,s,o,e,t,i)=>({"!border-solid":n,"bg-today-color":s,"border-p-divider-border-color/50":o,"last:rounded-br-lg":e,"last:rounded-bl-lg":t,"!bg-p-content-hover-background":i}),gt=n=>({"top.px":n}),po=n=>({"top.px":n,"left.px":0}),nn=n=>({"top.px":n,"left.px":2}),mo=(n,s,o)=>({format:n,timezone:s,trim:o}),ho=(n,s)=>s.index,Xi=(n,s)=>s.sessionTime,Ji=(n,s)=>s.id;function fo(n,s){n&1&&(d(0,"div",5),_(1,"Daylight"),p())}function So(n,s){n&1&&(d(0,"div",5),_(1,"Saving"),p())}function go(n,s){if(n&1&&f(0,fo,2,0,"div",5)(1,So,2,0,"div",5),n&2){let o=u().$implicit;S(o.index%2===0?0:1)}}function vo(n,s){if(n&1&&(d(0,"div",2),f(1,go,2,1),p()),n&2){let o=s.$implicit,e=u();h("ngClass",qt(2,uo,o.index%4==3,e.isToday,!o.isSelectable,e.isLastDay,e.isFirstDay,o.isDst)),c(),S(o.isDst?1:-1)}}function bo(n,s){if(n&1&&b(0,"fm-session-selector-outline",3),n&2){let o=u();h("ngStyle",w(7,gt,o.sessionOutlineTop))("sessionDuration",o.sessionDuration)("sessionTime",o.pointedAtSessionTime)("slotNumber",o.slotNumber)("timezone",o.timezone)("isToday",o.isToday)("partnerAvailable",!!o.pointedAtSessionInfo)}}function yo(n,s){if(n&1&&(d(0,"div",6),b(1,"p-skeleton",7),p()),n&2){let o=s.$implicit,e=u();Ee("animation-fade-out-quick",e.removingLoadingSkeletons),h("ngStyle",w(3,gt,o*48))}}function Co(n,s){if(n&1&&b(0,"fm-available-partner-tile",8),n&2){let o=u().$implicit,e=u();h("partnerInfo",o)("validPartner",!!o.partner)("sessionTime",o.sessionTime)("sessionDuration",o.sessionDuration)("profilePhoto",o.partner==null?null:o.partner.profilePhoto)("profileSlug",o.partner==null?null:o.partner.profileSlug)("isSaved",o.partner==null?null:o.partner.saved)("isQuietMode",o.partner==null?null:o.partner.preferences.quietMode.value)("hasDirectBookablePartner",o.hasDirectBookablePartner)("hasAvailableGroupMeeting",o.hasAvailableGroupMeeting)("isSelectable",e.sessionOutlineTop!==null)("ngStyle",w(12,po,o.slot*48))}}function _o(n,s){if(n&1&&f(0,Co,1,14,"fm-available-partner-tile",8),n&2){let o=s.$implicit,e=u();S(o.sessionTime<e.endOfDay&&o.sessionTime>=e.dayData.startOfDay&&o.sessionTime>e.currentTimeInMs?0:-1)}}function To(n,s){if(n&1&&b(0,"fm-booked-session-tile",9),n&2){let o=u().$implicit,e=u();h("sessionInfo",o)("partnerInfo",o.partner)("timezone",e.timezone)("timeFormat",e.timeFormat)("slotNumber",o.slot)("ngStyle",w(6,nn,o.slot*48+2))}}function Do(n,s){if(n&1&&f(0,To,1,8,"fm-booked-session-tile",9),n&2){let o=s.$implicit,e=u();S(o.startMs<e.endOfDay&&o.startMs>=e.dayData.startOfDay?0:-1)}}function Mo(n,s){if(n&1&&b(0,"fm-group-meeting-tile",10),n&2){let o=u().$implicit,e=u();h("groupMeetingInfo",o)("timezone",e.timezone)("timeFormat",e.timeFormat)("slotNumber",o.slot)("hidesClaim",!0)("ngStyle",w(6,nn,o.slot*48+2))}}function wo(n,s){if(n&1&&f(0,Mo,1,8,"fm-group-meeting-tile",10),n&2){let o=s.$implicit,e=u();S(o.startMs<e.endOfDay&&o.startMs>=e.dayData.startOfDay?0:-1)}}function xo(n,s){if(n&1&&(d(0,"fm-selected-session-tile",11),_(1,"SELECTED"),p()),n&2){let o=u().$implicit,e=u();h("sessionDuration",o.sessionDuration)("sessionTime",o.sessionTime)("slotNumber",o.slot)("booking",o.booking)("timezone",e.timezone)("ngStyle",w(6,gt,o.slot*48))}}function Io(n,s){if(n&1&&f(0,xo,2,8,"fm-selected-session-tile",11),n&2){let o=s.$implicit,e=u();S(o.sessionTime>=e.dayData.startOfDay&&o.sessionTime<e.endOfDay?0:-1)}}function ko(n,s){if(n&1&&(b(0,"div",12)(1,"div",13),d(2,"div",14)(3,"div",15),b(4,"div",16)(5,"div",17)(6,"div",18)(7,"div",19)(8,"div",20),d(9,"div",21),_(10),re(11,"epochToTime"),p()()()),n&2){let o=u();H("top",o.timeLineTop+"px"),c(),H("top",o.timeLineAnchorTop+"px"),c(),H("top",o.timeLineAnchorTop+"px"),c(8),Ue(" ",Fe(11,7,o.currentTimeInMs,he(10,mo,o.displayTimeFormat,o.timezone,o.timeFormat=="12hr"))," ")}}var Je=99,Ie=48,en=95,on=(()=>{let s=class s{constructor(e,t,i,r,a,m,y,x,I){this.cdr=e,this.selectedSessionService=t,this.utilsService=i,this.sessionSettingsService=r,this.availableTimesService=a,this.timeUtils=m,this.dstService=y,this.userService=x,this.featureCheckService=I,this.timeFormat="12hr",this.sessionDuration=15e5,this.ngUnsubscribe=new F,this.fifteenMinsInMs=Se,this.allTimeslots=[],this.pointerYCoordinate=null,this.sessionOutlineTop=null,this.dayColumnWidth=null,this.slotNumber=null,this.pointedAtSessionTime=null,this.pointedAtSessionInfo=null,this.loadingSkeletonIndices=[],this.removingLoadingSkeletons=!1,this.currentUser=null}ngOnInit(){this.dstBoundries=this.dstService.getDstBoundaries(this.timezone,this.dayData.startOfDay),this.populateTimeSlotData(),this.updateEmptyTimeslotStatus(),this.endOfDay=this.timeUtils.getEndOfDay(this.dayData.startOfDay,this.timezone),this.updateUnavailableRanges(),this.filterPotentialPartnerData(),this.updateRectanglePosition(!0),this.userService.currentUser.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.currentUser=e,this.updateEmptyTimeslotStatus(),this.cdr.markForCheck()}),this.availableTimesService.daysBeingLoaded$.pipe(v(this.ngUnsubscribe)).subscribe(e=>{let t=this.loadingSkeletonIndices.length>0,i=e.has(this.dayData.startOfDay);i&&!t?(this.generateLoadingSkeletons(),this.filterLoadingSkeletons(),this.cdr.markForCheck()):!i&&t&&!this.removingLoadingSkeletons&&(this.clearLoadingSkeletons(),this.cdr.markForCheck())}),this.timeUtils.onMinuteStart().pipe(v(this.ngUnsubscribe)).subscribe(()=>{this.isToday&&(this.currentTimeInMs=this.utilsService.getCurrentTimestamp(),this.setTimeLineIndicatorPosition(),this.updateEmptyTimeslotStatus(),this.cdr.markForCheck())})}ngOnChanges(e){let t=this.utilsService.getCurrentTimeForTimezone(this.timezone);this.currentTimeInMs=t.valueOf(),this.dstBoundries=this.dstService.getDstBoundaries(this.timezone,this.dayData.startOfDay),this.dayContainer&&(setTimeout(()=>{this.dayColumnWidth=this.dayContainer.nativeElement.offsetWidth,this.cdr.detectChanges()},0),this.setTimeLineIndicatorPosition(),this.updateEmptyTimeslotStatus()),this.updateUnavailableRanges(),this.filterPotentialPartnerData(),this.updateRectanglePosition(!0),this.filterLoadingSkeletons()}generateLoadingSkeletons(){let e=[];for(let t of this.allTimeslots)Math.random()<=.33&&e.push(t.index);this.loadingSkeletonIndices=e}filterLoadingSkeletons(){let e=[];for(let t of this.loadingSkeletonIndices){if(t>en)continue;let i=t*Se+this.dayData.startOfDay;!this.isSlotCoveredByConfirmedOrSelectedSession(i)&&i>this.utilsService.getCurrentTimestamp()&&e.push(t)}this.loadingSkeletonIndices=e}clearLoadingSkeletons(){this.removingLoadingSkeletons=!0,this.cdr.detectChanges(),setTimeout(()=>{this.loadingSkeletonIndices=[],this.removingLoadingSkeletons=!1,this.cdr.detectChanges()},400)}updateUnavailableRanges(){this.unavailableRanges=new Array(0);for(let e of this.dayData.selectedSessionData){let t=!1;if(this.dstBoundries&&this.dstBoundries.endMs){let i=this.dstBoundries.offsetDeltaMinutes*60*1e3,r=e.sessionTime-i,a=e.sessionTime+e.sessionDuration;a>=this.dstBoundries.endMs&&a<=this.dstBoundries.endMs+i&&(this.unavailableRanges.push([e.sessionTime,a+i]),t=!0),r>=this.dstBoundries.endMs&&r<=this.dstBoundries.endMs+i&&(this.unavailableRanges.push([r,a]),t=!0)}t||this.unavailableRanges.push([e.sessionTime,e.sessionTime+e.sessionDuration])}if(this.dayData.bookedSessionData)for(let e of this.dayData.bookedSessionData){let t=!1,i=e.startMs,r=e.startMs+e.durationMs;if(this.dstBoundries&&this.dstBoundries.endMs){let a=this.dstBoundries.offsetDeltaMinutes*60*1e3,m=i-a;r>=this.dstBoundries.endMs&&r<=this.dstBoundries.endMs+a&&(this.unavailableRanges.push([i,r+a]),t=!0),m>=this.dstBoundries.endMs&&m<=this.dstBoundries.endMs+a&&(this.unavailableRanges.push([m,r]),t=!0)}t||this.unavailableRanges.push([i,r])}if(this.dayData.bookedGroupMeetingData)for(let e of this.dayData.bookedGroupMeetingData){let t=e.startMs,i=e.startMs+e.durationMs;this.unavailableRanges.push([t,i])}}filterPotentialPartnerData(){let e=[];for(let t of this.dayData.potentialPartnerData)this.isSlotCoveredByConfirmedOrSelectedSession(t.sessionTime)||e.push(t);this.filteredPotentialPartnerData=[...e]}onWindowResized(e){this.dayColumnWidth=e.width}onPointerMove(e){e.pointerType==="mouse"&&(this.pointerYCoordinate=e.clientY-this.dayContainer.nativeElement.getBoundingClientRect().top+this.dayContainer.nativeElement.scrollTop,this.updateRectanglePosition())}onPointerLeave(){this.sessionOutlineTop=null,this.pointerYCoordinate=null}updateRectanglePosition(e=!1){if(this.pointerYCoordinate!==null&&this.dayContainer){let t=Math.floor(this.pointerYCoordinate/Ie)*Ie-this.dayContainer.nativeElement.scrollTop;this.slotNumber=Math.floor(t/Ie),this.pointedAtSessionTime=this.allTimeslots[this.slotNumber]?.startTime||0,this.pointedAtSessionInfo=this.getPotentialPartnerInfo(this.pointedAtSessionTime),this.timeslotIsSelectable(this.pointedAtSessionTime,this.slotNumber)?e||(this.sessionOutlineTop=t):this.sessionOutlineTop=null}}timeslotIsSelectable(e,t){let i=this.utilsService.getCurrentTimestamp(),r=i-ti,a=e<i,m=e>r;return e<=r||a&&m&&(!this.currentUser||!this.featureCheckService.canUseNowSessions(this.currentUser))||t>en?!1:this.canScheduleMeeting(e,this.sessionDuration)}canScheduleMeeting(e,t){let i=e+t,r=this.unavailableRanges;if(this.unavailableRanges){for(let[a,m]of r)if(e<=m&&i>=a)return!1}return!0}isSlotCoveredByConfirmedOrSelectedSession(e){let t=this.unavailableRanges;if(this.unavailableRanges){for(let[i,r]of t)if(e<=r&&e>=i)return!0}return!1}onClickSelectSlot(e){let t=e.clientY-this.dayContainer.nativeElement.getBoundingClientRect().top+this.dayContainer.nativeElement.scrollTop,i=Math.floor(t/Ie),r=this.allTimeslots[i].startTime;if(this.timeslotIsSelectable(r,i)){let a=this.sessionSettingsService.getSessionSettingFavoritesPreference(),m=this.sessionSettingsService.getSessionSettingActivityType(),y=this.sessionSettingsService.quietModeEnabled(),x=this.getPotentialPartnerInfo(r);this.selectedSessionService.addSelectedSession({sessionDuration:this.sessionDuration,sessionTime:r,userAvailabilityCode:"",sessionPreferenceFavorites:a,activityType:m,quietMode:y,user:x?.partner?.displayName??"",profileUrl:x?.partner?.profileSlug??""})}}getPotentialPartnerInfo(e){for(let t of this.dayData.potentialPartnerData)if(t.sessionTime===e)return t;return null}setTimeLineIndicatorPosition(){this.timeFormat=="12hr"?this.displayTimeFormat="h:mma":this.displayTimeFormat="HH:mm";let e=this.utilsService.getCurrentTimeForTimezone(this.timezone),i=e.hour()*(Ie*4)+e.minute()/60*(Ie*4);this.timeLineTop=i,this.timeLineAnchorTop=i-5}updateEmptyTimeslotStatus(){let e=this.currentTimeInMs||this.utilsService.getCurrentTimestamp(),t=this.currentUser?this.featureCheckService.canUseNowSessions(this.currentUser):!1;for(let i of this.allTimeslots){let r=i.startTime<e,a=i.startTime<e-vi*60*1e3;r&&!a?i.isSelectable=t:a?i.isSelectable=!1:i.isSelectable=!0}}populateTimeSlotData(){this.allTimeslots=[];let e=Se,t=this.dayData.startOfDay,i=this.dstBoundries?.offsetDeltaMinutes??0,r=Math.abs(Math.trunc(i/15)),a=this.dstBoundries?.startMs!=null&&this.dstBoundries.startMs>=t&&this.dstBoundries.startMs<this.timeUtils.getEndOfDay(t,this.timezone)?this.dstBoundries.startMs:null,m=this.dstBoundries?.endMs!=null&&this.dstBoundries.endMs>=t&&this.dstBoundries.endMs<this.timeUtils.getEndOfDay(t,this.timezone)?this.dstBoundries.endMs:null,y=a?1:m?-1:0,x=a??m??null,I=x==null?null:Math.max(0,Math.min(Je-1,Math.floor((x-t)/e))),j=(M,{isDst:k=!1,index:ne})=>({startTime:M,isDst:k,isSelectable:!0,index:ne});if(y===0||r===0||I==null){for(let M=0;M<Je;M++){let k=t+M*e;this.allTimeslots.push(j(k,{index:M}))}return}if(y>0){let M=!1;for(let k=0;k<Je;k++)if(k>=I&&k<I+r)this.allTimeslots.push(j(0,{isDst:!0,index:k})),M=!0;else{let ne=M?t+(k-r)*e:t+k*e;this.allTimeslots.push(j(ne,{index:k}))}return}let L=r*e;for(let M=0;M<Je;M++){let k=t+M*e;if(M<I){this.allTimeslots.push({startTime:k,isDst:!1,isSelectable:!0,index:M});continue}let ne=k+L;this.allTimeslots.push({startTime:ne,isDst:!1,isSelectable:!0,index:M})}}ngOnDestroy(){this.ngUnsubscribe.next(null),this.ngUnsubscribe.complete()}};s.\u0275fac=function(t){return new(t||s)(l(fe),l(X),l(ge),l(Ce),l(_e),l(K),l(te),l(z),l(J))},s.\u0275cmp=C({type:s,selectors:[["fm-calendar-day"]],viewQuery:function(t,i){if(t&1&&me(co,7,q),t&2){let r;oe(r=se())&&(i.dayContainer=r.first)}},inputs:{isToday:"isToday",dayData:"dayData",timezone:"timezone",timeFormat:"timeFormat",sessionDuration:"sessionDuration",isFirstDay:"isFirstDay",isLastDay:"isLastDay"},features:[O],decls:16,vars:2,consts:[["dayContainer",""],[1,"w-full","h-full","relative",3,"windowResized","pointermove","pointerleave","click"],[1,"relative","h-[48px]","border-b","border-p-divider-border-color","border-dashed",3,"ngClass"],[1,"absolute","cursor-pointer","w-full",3,"ngStyle","sessionDuration","sessionTime","slotNumber","timezone","isToday","partnerAvailable"],[1,"flex","items-center","px-1.5","absolute","w-full","h-[48px]","animation-fade-in-quick",3,"animation-fade-out-quick","ngStyle"],[1,"absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2","text-muted-color"],[1,"flex","items-center","px-1.5","absolute","w-full","h-[48px]","animation-fade-in-quick",3,"ngStyle"],["size","36px"],[1,"h-[48px]","w-full","absolute","rounded-lg",3,"partnerInfo","validPartner","sessionTime","sessionDuration","profilePhoto","profileSlug","isSaved","isQuietMode","hasDirectBookablePartner","hasAvailableGroupMeeting","isSelectable","ngStyle"],[1,"w-full","absolute","rounded-lg",3,"sessionInfo","partnerInfo","timezone","timeFormat","slotNumber","ngStyle"],[1,"w-full","absolute","rounded-lg",3,"groupMeetingInfo","timezone","timeFormat","slotNumber","hidesClaim","ngStyle"],[1,"w-full","absolute","rounded-xl",3,"sessionDuration","sessionTime","slotNumber","booking","t
60imezone","ngStyle"],[1,"absolute","w-full","border-t","border-b","border-red","dark:border-orange-400","left-0","right-0","z-[100]","pointer-events-none"],[1,"absolute","w-[3px]","h-3","bg-red","dark:bg-orange-400","-left-[3px]","z-[100]","pointer-events-none"],[1,"absolute","text-12","text-red","dark:text-orange-400","font-semibold","z-[100]","bg-p-content-background",2,"transform","translateX(calc(-100% - 3px))"],[1,"relative"],[1,"absolute","w-full","h-[8px]","top-full","left-0","pointer-events-none",2,"background",`linear-gradient( 61 to bottom, 62 var(--p-content-background) 0%, 63 transparent 100% 64 )`],[1,"absolute","w-full","h-[8px]","bottom-full","left-0","pointer-events-none",2,"background",`linear-gradient( 65 to top, 66 var(--p-content-background) 0%, 67 transparent 100% 68 )`],[1,"absolute","h-full","w-[8px]","top-0","right-full","pointer-events-none",2,"background",`linear-gradient( 69 to left, 70 var(--p-content-background) 0%, 71 transparent 100% 72 )`],[1,"absolute","w-[8px]","h-[8px]","bottom-full","right-full","pointer-events-none",2,"background",`radial-gradient( 73 circle at bottom right, 74 var(--p-content-background) 0%, 75 transparent 70% 76 )`],[1,"absolute","w-[8px]","h-[8px]","top-full","right-full","pointer-events-none",2,"background",`radial-gradient( 77 circle at top right, 78 var(--p-content-background) 0%, 79 transparent 70% 80 )`],[1,"relative","pr-[3px]","pointer-events-none"]],template:function(t,i){t&1&&(d(0,"div",1,0),g("windowResized",function(a){return i.onWindowResized(a)})("pointermove",function(a){return i.onPointerMove(a)})("pointerleave",function(){return i.onPointerLeave()})("click",function(a){return i.onClickSelectSlot(a)}),E(2,vo,2,9,"div",2,ho),f(4,bo,1,9,"fm-session-selector-outline",3),E(5,yo,2,5,"div",4,Oe),E(7,_o,1,1,null,null,Xi),E(9,Do,1,1,null,null,Ji),E(11,wo,1,1,null,null,Ji),E(13,Io,1,1,null,null,Xi),f(15,ko,12,14),p()),t&2&&(c(2),U(i.allTimeslots),c(2),S(i.sessionOutlineTop!=null?4:-1),c(),U(i.loadingSkeletonIndices),c(2),U(i.filteredPotentialPartnerData),c(2),U(i.dayData.bookedSessionData),c(2),U(i.dayData.bookedGroupMeetingData),c(2),U(i.dayData.selectedSessionData),c(2),S(i.isToday?15:-1))},dependencies:[A,Q,Z,Hi,Xe,qi,Ki,ki,Pi,Ti,_i,Ye],encapsulation:2,changeDetection:0});let n=s;return n})();function Po(n,s){if(n&1&&(ue(0,"div",3),_(1),pe()),n&2){let o=u(),e=o.$implicit,t=o.$index;H("top",t*48,"px"),c(),B(e)}}function Ao(n,s){if(n&1&&(ue(0,"div",4),_(1),pe()),n&2){let o=u(),e=o.$implicit,t=o.$index;H("top",t*48-4,"px"),c(),B(e)}}function Oo(n,s){if(n&1&&f(0,Po,2,3,"div",1)(1,Ao,2,3,"div",2),n&2){let o=s.$index;S(o%4==0?0:1)}}var sn=(()=>{let s=class s{constructor(){this.timeslots=[]}ngOnInit(){this.generateTimeslots()}generateTimeslots(){this.timeslots=[];let e=0,t=96;for(let i=e;i<t;i++){let r=Math.floor(i/4),a=i%4*15,m=this.timeFormat==="12hr"?this.formatTime12Hour(r,a):this.formatTime24Hour(r,a);this.timeslots.push(m)}}formatTime12Hour(e,t){let i=e<12?"am":"pm",r=e%12===0?12:e%12;return t?`:${this.padTime(t)}`:`${r}${i}`}formatTime24Hour(e,t){return t?`:${this.padTime(t)}`:`${this.padTime(e)}:${this.padTime(t)}`}padTime(e){return e.toString().padStart(2,"0")}};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=C({type:s,selectors:[["fm-calendar-timeslot-labels"]],inputs:{timeFormat:"timeFormat"},decls:3,vars:0,consts:[[1,"w-full","h-full","text-muted-color","font-inter","relative"],[1,"text-[12px]","text-color","leading-[10px]","right-0","font-medium","absolute",3,"top"],[1,"text-[10px]","text-muted-color","right-0","leading-3","font-semibold","tracking-[.48px]","absolute",3,"top"],[1,"text-[12px]","text-color","leading-[10px]","right-0","font-medium","absolute"],[1,"text-[10px]","text-muted-color","right-0","leading-3","font-semibold","tracking-[.48px]","absolute"]],template:function(t,i){t&1&&(ue(0,"div",0),E(1,Oo,2,1,null,null,Oe),pe()),t&2&&(c(),U(i.timeslots))},encapsulation:2,changeDetection:0});let n=s;return n})();var cn=et(ct());var Eo=["scrollPanel"],Uo=(n,s,o,e)=>
80({"rounded-tl-lg border-l":n,"bg-today-color":s,"animation-slide-left-and-fade-in":o,"animation-slide-right-and-fade-in":e}),Fo=(n,s)=>({"!text-primary":n,"text-muted-color/50":s}),No=n=>({format:"ddd D",timezone:n}),Ro=(n,s,o)=>({"border-x border-x-p-content-border-color rounded-bl-lg":n,"animation-slide-left-and-fade-in":s,"animation-slide-right-and-fade-in":o}),an=(n,s)=>s.startOfDayInMs;function Bo(n,s){if(n&1&&(d(0,"div",4)(1,"span",9),_(2),re(3,"epochToTime"),p()()),n&2){let o=s.$implicit,e=s.$index,t=u();h("ngClass",$t(6,Uo,e===0,o.isToday,o.slideDirection==="left",o.slideDirection==="right")),c(),h("ngClass",Yt(11,Fo,o.isToday,o.isPast)),c(),B(Fe(3,3,o.startOfDayInMs,w(14,No,t.timezone)))}}function Lo(n,s){if(n&1&&b(0,"fm-calendar-day",8),n&2){let o=s.$implicit,e=s.$index,t=u();h("isToday",o.isToday)("dayData",t.calendarDayData[e])("sessionDuration",t.sessionDuration)("timezone",t.timezone)("timeFormat",t.timeFormat)("isFirstDay",e===0)("isLastDay",e===t.days.length-1)("ngClass",he(8,Ro,e===0,o.slideDirection==="left",o.slideDirection==="right"))}}var ln=48,dn=(()=>{let s=class s{constructor(e,t,i,r,a,m,y,x,I,j,L,M){this.sanitizer=e,this.utilsService=t,this.confirmedSessionService=i,this.meetingsService=r,this.featureCheckService=a,this.userService=m,this.selectedSessionService=y,this.availableTimesService=x,this.contentStackService=I,this.calendarViewService=j,this.timeUtils=L,this.dstService=M,this.days=new Array(0),this.timeFormat="12hr",this.availableGroupMeetings=[],this.updatedScrollbarWidth=new W,this.ngUnsubscribe=new F,this.bookedSessionsFullList=[],this.bookedGroupMeetingsFullList=[],this.calendarDayData=[],this.scrollpositionInitialized=!1}ngOnInit(){this.availableTimesService.availableTimesAndPartners.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.availableTimesAndPartnersFullList=e,this.buildDayData()}),this.selectedSessionService.selectedSessions$.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.selectedSessionData=[...e],this.buildDayData()}),this.meetingsService.meetingsBookingsSubject.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.bookedSessionsFullList=this.mapBookingEventsToBookedSessions(e.meetings,e.participants),this.bookedGroupMeetingsFullList=this.mapBookingEventsToBookedGroupMeetings(e.meetings,e.participants),this.buildDayData()}),this.contentStackService.panelToggled$.pipe(v(this.ngUnsubscribe)).subscribe(()=>{this.buildDayData()}),this.calendarViewService.todaySelected$.pipe(v(this.ngUnsubscribe)).subscribe(()=>{this.updateScrollPosition()}),this.timeUtils.onMinuteStart().pipe(v(this.ngUnsubscribe)).subscribe(()=>{this.buildDayData()}),this.timeZoneAbbr=cn.default.tz(this.timezone).format("z"),this.timezoneTooltip=`${this.timezone.replace("_"," ")} (${this.timeZoneAbbr})`}ngOnChanges(e){let t=e.days?.previousValue;if(t){let i=e.days.currentValue;for(let r of i)r.startOfDayInMs>t[t.length-1].startOfDayInMs?r.slideDirection="left":r.startOfDayInMs<t[0].startOfDayInMs&&(r.slideDirection="right")}this.buildDayData()}getScrollBarWidth(){if(this.scrollPanel){let e=this.scrollPanel.nativeElement;return e.offsetWidth-e.clientWidth}return 0}ngAfterViewInit(){setTimeout(()=>{this.updateScrollbarWidth(),this.updateScrollPosition(!1),this.scrollpositionInitialized=!0})}onWindowResized(e){setTimeout(()=>{this.updateScrollbarWidth()})}updateScrollPosition(e=!0){!this.scrollpositionInitialized&&e||setTimeout(()=>{if(this.scrollPanel){let t=this.utilsService.getCurrentTimeForTimezone(this.timezone),i=t.hour(),a=t.minutes()<15?ln:0,m=i*ln*4-a;this.scrollPanel.nativeElement.scrollTo({top:m,behavior:e?"smooth":"auto"}),this.updateScrollbarWidth()}})}updateScrollbarWidth(){let e=this.getScrollBarWidth();if(this.scrollBarWidth!==void 0&&Math.abs(e-this.scrollBarWidth)<=1)return;this.scrollBarWidth=e;let t=`calc(100% - ${this.scrollBarWidth}px)`;this.toolbarWidth=this.sanitizer.bypassSecurityTrustStyle(t),this.updatedScrollbarWidth.emit(this.scrollBarWidth)}buildDayData(){let e=new Array(0),t=this.populateDayAvailabilityData(),i=this.populateConfirmedSessionData(),r=this.populateBookedGroupMeetingData(),a=this.populateSelectedSessionData();for(let m in this.days)e.push({startOfDay:this.days[m].startOfDayInMs,potentialPartnerData:t[m],bookedSessionData:i[m],bookedGroupMeetingData:r[m],selectedSessionData:a[m]});this.calendarDayData=[...e]}getSessionMapForDuration(){return this.sessionDuration===15e5?this.availableTimesAndPartnersFullList.sessions25minutes:this.sessionDuration===3e6?this.availableTimesAndPartnersFullList.sessions50minutes:this.availableTimesAndPartnersFullList.sessions75minutes}populateDayAvailabilityData(){let e=new Array(this.days.length).fill(null).map(()=>new Array),t=this.buildAvailableGroupMeetingsByStart(),i=this.availableTimesAndPartnersFullList?this.get
80SessionMapForDuration():new Map,r=new Set([...i.keys(),...t.keys()]);for(let a of r){let m=i.get(a),y=t.get(a)??[],x=this.getDayIndexForSessionTime(a);for(let I of x)e[I].push({slot:this.determineSlotNumber(a,I),sessionTime:a,sessionDuration:this.sessionDuration,partner:m?.partner??null,hasDirectBookablePartner:m?.hasDirectBookablePartner??!1,availableGroupMeetings:y,hasAvailableGroupMeeting:y.length>0})}return e}buildAvailableGroupMeetingsByStart(){let e=new Map;if(!this.featureCheckService.groupMeetingsEnabledSig())return e;for(let t of this.availableGroupMeetings??[]){if(t.state!=="available"||t.durationMs!==this.sessionDuration)continue;let i=e.get(t.startMs)??[];i.push(t),e.set(t.startMs,i)}return e}populateConfirmedSessionData(){let e=new Array(this.days.length).fill(null).map(()=>new Array(0));if(this.bookedSessionsFullList)for(let t of this.bookedSessionsFullList){if(!this.utilsService.shouldDisplaySession(t.sessionType,t.startMs,t.state,!!t.partnerId))continue;let i=this.getDayIndexForSessionTime(t.startMs);for(let r of i)e[r].push(ke(ce({},t),{slot:this.determineSlotNumber(t.startMs,r)}))}return e}populateBookedGroupMeetingData(){let e=new Array(this.days.length).fill(null).map(()=>new Array(0));if(this.bookedGroupMeetingsFullList)for(let t of this.bookedGroupMeetingsFullList){let i=this.getDayIndexForSessionTime(t.startMs);for(let r of i)e[r].push(ke(ce({},t),{slot:this.determineSlotNumber(t.startMs,r)}))}return e}mapBookingEventsToBookedSessions(e,t){let i=[];for(let r of e){if(r.meetingType!=="paired")continue;let a=r.partnerId?t[r.partnerId]:null;i.push(ke(ce({},r),{slot:0,partner:a}))}return i}mapBookingEventsToBookedGroupMeetings(e,t){let i=[];for(let r of e){if(r.meetingType!=="group_meeting")continue;let a=this.mapGroupMeetingParticipants(r,t);i.push(ke(ce({},r),{slot:0,participants:a}))}return i}mapGroupMeetingParticipants(e,t){return(Array.isArray(e.participantConfigs)?e.participantConfigs:[]).map(r=>this.resolveParticipantInfo(r.id,t))}resolveParticipantInfo(e,t){return t[e]??this.buildFallbackParticipantInfo(e)}buildFallbackParticipantInfo(e){return{id:e,displayName:null,profileUrl:null,photo:null,saved:!1,status:0,timezone:null,group:null,completedSessions:null,snoozed:!1,snoozeExpiresAt:null,sharedAvailability:!1}}mapConfirmedSessionsToBookedSessions(e){return e.filter(t=>!!t).map(t=>{let i=t.partnerId?{id:t.partnerId,displayName:t.partnerDisplayName??"",profileUrl:t.partnerProfileUrl??"",photo:t.partnerPhoto??"",saved:t.saved??!1,status:t.status??0,timezone:t.partnerTimezone??null,group:null,completedSessions:t.user_comp_sessions??null,snoozed:t.snoozed??!1,snoozeExpiresAt:t.snoozeExpiresAt??null,sharedAvailability:t.sharedAvailability??!1}:null;return{meetingType:"paired",id:t.externalId??"",startMs:t.sessionTime,durationMs:t.duration,title:t.title??null,meetingRoom:t.meetingRoom??null,partnerId:t.partnerId??null,sessionType:t.sessionType??"standard",state:t.state??0,preferences:t.preferences??this.defaultPreferences(),activityType:t.activityType??100,partnerPreferences:t.partnerPreferences??this.defaultPartnerPreferences(),partnerActivityType:t.partnerActivityType??100,ambassadorMatch:t.ambassadorMatch??!1,slot:0,partner:i}})}defaultPreferences(){return{favorites:{value:"noPreference"},quietMode:{value:!1}}}defaultPartnerPreferences(){return{quietMode:{value:!1}}}populateSelectedSessionData(){let e=new Array(this.days.length).fill(null).map(()=>new Array(0));if(this.selectedSessionData)for(let t of this.selectedSessionData){let i=this.getDayIndexForSessionTime(t.sessionTime);for(let r of i)e[r].push(ce({slot:this.determineSlotNumber(t.sessionTime,r)},t))}return e}getDayIndexForSessionTime(e){let t=[];for(let i=0;i<this.days.length;i++)e>=this.days[i].startOfDayInMs-45e5&&e<this.timeUtils.getEndOfDay(this.days[i].startOfDayInMs,this.timezone)+45e5&&t.push(i);return t}determineSlotNumber(e,t){let i=this.dstService.getDstBoundaries(this.timezone,e),r=0;return i.startMs>=this.days[t].startOfDayInMs&&i.startMs<this.timeUtils.getEndOfDay(this.days[t].startOfDayInMs,this.timezone)&&e>=i.startMs?r=i.offsetDeltaMinutes/15:i.endMs>=this.days[t].startOfDayInMs&&i.endMs<this.timeUtils.getEndOfDay(this.days[t].startOfDayInMs,this.timezone)&&e>=i.endMs&&(r=-i.offsetDeltaMinutes/15),(e-this.days[t].startOfDayInMs)/Se+r}ngOnDestroy(){this.ngUnsubscribe.next(null),this.ngUnsubscribe.complete()}};s.\u0275fac=function(t){return new(t||s)(l(Zt),l(ge),l(Re),l(Be),l(J),l(z),l(X),l(_e),l(qe),l(De),l(K),l(te))},s.\u0275cmp=C({type:s,selectors:[["fm-calendar-days"]],viewQuery:function(t,i){if(t&1&&me(Eo,7,q),t&2){let r;oe(r=se())&&(i.scrollPanel=r.first)}},inputs:{days:"days",timezone:"timezone",timeFormat:"timeFormat",sessionDuration:"sessionDuration",availableGroupMeetings:"availableGroupMeetings"},outputs:{updatedScrollbarWidth:"updatedScrollbarWidth"},features:[O],decls:12,vars:5,consts:[["scrollPanel",""],[1,"h-full","w-full","flex","flex-col",3,"windowResized"],[1,"flex","flex-row","items-center","justify-center"],["tooltipPosition","top",1,"w-10","bp908:w-[41px]","mr-[3px]","text-muted-color","text-10","text-right","cursor-default",3,"pTooltip"],[1,"h-full","flex-1","text-left","border-p-divider-border-color","last:rounded-tr-lg","border-r","border-t","border-b","p-2",3,"ngClass"],[1,"w-full","h-[calc(100%_-_36px)]","overflow-y-auto","overflow-x-hidden"],[1,"flex","flex-row"],[1,"w-10","bp908:w-[41px]","mr-[3px]",3,"timeFormat"],[1,"flex-grow","border-r","border-p-divider-border-color","last:rounded-br-lg",3,"isToday","dayData","
80sessionDuration","timezone","timeFormat","isFirstDay","isLastDay","ngClass"],[1,"font-inter","text-muted-color","text-14","font-medium",3,"ngClass"]],template:function(t,i){t&1&&(d(0,"div",1),g("windowResized",function(a){return i.onWindowResized(a)}),d(1,"div",2)(2,"span",3),_(3),p(),E(4,Bo,4,16,"div",4,an),p(),d(6,"div",5,0)(8,"div",6),b(9,"fm-calendar-timeslot-labels",7),E(10,Lo,1,12,"fm-calendar-day",8,an),p()()()),t&2&&(c(),H("width",i.toolbarWidth),c(),h("pTooltip",i.timezoneTooltip),c(),B(i.timeZoneAbbr),c(),U(i.days),c(5),h("timeFormat",i.timeFormat),c(),U(i.days))},dependencies:[ye,ee,on,sn,A,Q,Xe,Ye],encapsulation:2});let n=s;return n})();var vt=et(ct());var un=()=>({autofocus:!1});function zo(n,s){if(n&1){let o=N();d(0,"fm-calendar-days",3),g("updatedScrollbarWidth",function(t){T(o);let i=u(2);return D(i.onReceiveScrollbarWidth(t))}),p()}if(n&2){let o=u(2);h("days",o.days)("timezone",o.currentUser.timeZone)("timeFormat",o.currentUser.settings.timeFormat)("sessionDuration",o.sessionDuration)("availableGroupMeetings",o.groupMeetingsStoreService.availableGroupMeetingsSig())}}function Vo(n,s){if(n&1&&(b(0,"fm-calendar-header",1),f(1,zo,1,5,"fm-calendar-days",2)),n&2){let o=u();h("scrollBarWidth",o.scrollbarWidth())("timezone",o.currentUser==null?null:o.currentUser.timeZone)("startOfWeekDay",o.currentUser.settings.startOfWeekDay),c(),S(o.initialized?1:-1)}}function Go(n,s){if(n&1){let o=N();d(0,"div",4)(1,"p-button",5),g("click",function(){T(o);let t=u(2);return D(t.onClickClearAll())}),p(),d(2,"p-button",6),g("click",function(){T(o);let t=u(2);return D(t.onClickBookSessions())}),p()()}if(n&2){u();let o=jt(0),e=u();c(),h("buttonProps",P(6,un))("disabled",e.bookingInProgress)("outlined",!0),c(),h("buttonProps",P(7,un))("loading",e.bookingInProgress)("label",e.bookingInProgress?"":"Book "+(o||0)+" "+((o||0)===1?"session":"sessions"))}}function jo(n,s){if(n&1&&(Vt(0),re(1,"async"),f(2,Go,3,8,"div",4)),n&2){let o=u(),e=Gt(rt(1,1,o.selectedSessionService.selectedSessions$).length),t=o.viewportService.isMobile();c(2),S(t&&e>1||!t?2:-1)}}var Wo=17619696e5,Ho="twentyFourHourBannerDismissed",pn=800,Yo=[2026,7,10,9],$o="Europe/Berlin",mn=(()=>{let s=class s{constructor(e,t,i,r,a,m,y,x,I,j,L,M,k,ne,hn,fn,Sn,gn,vn,bn,yn,Cn,_n,Tn,Dn,Mn){this.userService=e,this.timeUtilitiesService=t,this.calendarViewService=i,this.availableTimesService=r,this.confirmedSessionsService=a,this.meetingsService=m,this.sessionSettingsService=y,this.userRelationshipService=x,this.featureCheckService=I,this.analyticsService=j,this.dialogService=L,this.lUtil=M,this.utilsService=k,this.welcomeChecklistService=ne,this.bookSessionsService=hn,this.errorHandlerService=fn,this.rewardsReferralService=Sn,this.ngZone=gn,this.selectedSessionService=vn,this.localStorageAccessService=bn,this.viewportService=yn,this.darkModeService=Cn,this.cdr=_n,this.newUserCancelationService=Tn,this.stripeService=Dn,this.groupMeetingsStoreService=Mn,this.ngUnsubscribe=new F,this.days=new Array({}),this.initialized=!1,this.endTimeToRetrieve=0,this.pollTimerStarted=!1,this.dateRange$=new F,this.timedOut=!1,this.blurred=!1,this.unmatchedSessionStartingTimeout=null,this.isWelcomeChecklistActive=this.welcomeChecklistService.isWelcomeChecklistActive,this.showFeatureBanner=!1,this.selectedSessions=[],this.bookingInProgress=!1,this.scrollbarWidth=wt(void 0),this.timeAtLastDateRangeChangeEvent=null,this.queryUnmatchedSessionsDebounceTimeout=null,this.queryAvailableTimesInProgress=!1,this.lastNewUserCancelationKey=null}onFocus(e){this.blurred=!1,this.timedOut===!0&&(this.timedOut=!1,this.queryUnmatchedSessions(!1))}onBlur(e){this.blurred=!0}onMouseMove(e){this.blurred===!0&&this.timedOut===!0&&(this.timedOut=!1,this.queryUnmatchedSessions(!0))}ngOnInit(){this.waitForRequiredDataToInitialize(),this.registerForUserUpdates(),this.registerForBlockStatusUpdates(),this.registerForConfirmedSessionUpdates(),this.registerForSelectedSessionUpdates(),this.registerForDateRangeUpdates(),this.registerForSessionDurationUpdates(),this.availableTimesService.daysBeingLoaded$.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.queryAvailableTimesInProgress=e.size>0})}onReceiveScrollbarWidth(e){setTimeout(()=>{this.scrollbarWidth.set(e)})}waitForRequiredDataToInitialize(){this.userService.currentUser.pipe(Pe(e=>e?.timeZone!=null),it(e=>(this.currentUser=e,this.userService.currentUser.pipe(yt(this.calendarViewService.calendarRange$,this.sessionSettingsService.sessionDurationSetting$),Pe(([t,i,r])=>t?.timeZone!=null&&i!==null&&i.numberOfDaysToShow!==void 0)))),$(1)).subscribe(([e,t,i])=>{this.currentUser=e,this.sessionDuration=i,this.setDateRange(t),this.initialized=!0,this.cdr.detectChanges(),this.startSessionDataQueries(),this.triggerNotifications(this.currentUser)})}displayNewLookDialog(){if(this.featureCheckService.isNewLayoutEnabled(this.currentUser)){if(this.currentUser.features.newLayoutOnly){this.localStorageAccessService.setItem("viewedDialog:newLookBetaWelcome","true");return}this.localStorageAccessService.getItem("viewedDialog:newLookBetaWelcome")!=="true"&&(this.localStorageAccessService.setItem("viewedDialog:newLookBetaWelcome","true"),this.dialogService.openNewLookBetaWelcomeDialog())}}displayNewInterfaceReleasedDialog(e){return e.features.newLayoutOnly&&this.localStorageAccessService.getItem("viewedDialog:interfaceUpdated")!=="true"?(this.localStorageAccessService.setItem("viewedDialog:interfaceUpdated","true"),this.dialogService.openNewInterfaceBeatCompleteDialog(!1),!0):e.createdOn<176047311e4&&this.localStorageAccessService.getItem("viewedDialog:newLookBetaComplete")!=="true"?(this.localStorageAccessService.setItem("viewedDialog:newLookBetaComplete","true"),this.dialogService.openNewInterfaceBeatCompleteDialog(!0),!0):!1}registerForDateRangeUpdates(){this.calendarViewService.calendarRange$.pipe(Pe(e=>e!==null&&e.numberOfDaysToShow!==void 0),Ct((e,t)=>e?.startTime===t?.startTime&&e?.numberOfDaysToShow===t?.numberOfDaysToShow),v(this.ngUnsubscribe)).subscribe(e=>this.setDateRange(e))}setDateRange(e){if(this.calendarStartDayMidnight===e.startTime&&this.numberOfDaysToShow===e.numberOfDaysToShow)return;this.calendarStartDayMidnight=e.startTime,this.numberOfDaysToShow=e.numberOfDaysToShow,this.endTimeToRetrieve=this.calculateEndTimeToRetrieve(),this.updateDayArrays(),this.queryUnmatchedSessionsDebounceTimeout&&(clearTimeout(this.queryUnmatchedSessionsDebounceTimeout),this.queryUnmatchedSessionsDebounceTimeout=null);let t=this.utilsService.getCurrentTimestamp(),i=this.timeAtLastDateRangeChangeEvent;if(this.timeAtLastDateRangeChangeEvent=t,i&&t-i<1e3||this.queryAvailableTimesInProgress){let r=this.queryAvailableTimesInProgress?pn:pn-(t-i);this.queryUnmatchedSessionsDebounceTimeout=setTimeout(()=>{this.queryUnmatchedSessions(!0)},r)}else this.queryUnmatchedSessions(!0)}
80registerForUserUpdates(){this.userService.currentUser.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.currentUser=e})}registerForSessionDurationUpdates(){this.sessionSettingsService.sessionDurationSetting$.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.sessionDuration=e})}registerForBlockStatusUpdates(){this.userRelationshipService.userRelationUpdated.pipe(v(this.ngUnsubscribe)).subscribe(e=>{(e.action==="block"||e.action==="unblock"||e.action==="bulk-unblock"||e.action==="snooze"||e.action==="blocks-to-snoozes"||e.action==="unsnooze")&&this.queryUnmatchedSessions(!0,!0)})}registerForSelectedSessionUpdates(){this.selectedSessionService.selectedSessions$.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.selectedSessions=[...e]})}registerForConfirmedSessionUpdates(){this.meetingsService.meetingsBookingsSubject.pipe(v(this.ngUnsubscribe)).subscribe(e=>{this.checkForTodayChanges(),this.querySessionIfUnmatchedAtStartTimeFromBookingEvents(e.meetings)}),this.meetingsService.lateSessionCanceled.pipe(v(this.ngUnsubscribe)).subscribe(e=>{e===!0&&this.dialogService.openLateSessionCanceledNotification()}),this.meetingsService.forceRematchNeeded.pipe(v(this.ngUnsubscribe)).subscribe(e=>{e&&this.dialogService.openForceRematchModal(e.id,e.startMs,e.durationMs)}),this.newUserCancelationService.newUserCancelation$.pipe(v(this.ngUnsubscribe)).subscribe(e=>this.handleNewUserCancelation(e))}startSessionDataQueries(){if(this.endTimeToRetrieve&&!this.pollTimerStarted){this.pollTimerStarted=!0;let e=bt(0,12e4);this.ngZone.runOutsideAngular(()=>{e.pipe(v(this.ngUnsubscribe)).subscribe(()=>{this.ngZone.run(()=>{this.queryUnmatchedSessions(!1),this.blurred&&(this.timedOut=!0)})})})}}queryUnmatchedSessions(e,t=!1){this.checkForTodayChanges(),(this.blurred===!1||e)&&(this.availableTimesService.queryAvailableTimes(this.calendarStartDayMidnight,this.endTimeToRetrieve,t).subscribe(),this.featureCheckService.groupMeetingsEnabledSig()&&this.groupMeetingsStoreService.loadAvailableGroupMeetings(t,this.calendarStartDayMidnight,this.endTimeToRetrieve))}querySessionIfUnmatchedAtStartTime(e){let t=e.length(),i=this.utilsService.getCurrentTimestamp();this.clearUnmatchedSessionStartingTimeout();for(let r=0;r<t;++r){let a=e.getByIndex(r),m=a.sessionTime-i;m>=0&&m<dt&&!a.partnerId&&(this.unmatchedSessionStartingTimeout=setTimeout(()=>{this.confirmedSessionsService.updateConfirmedSession(a.externalId),this.clearUnmatchedSessionStartingTimeout()},m))}}querySessionIfUnmatchedAtStartTimeFromBookingEvents(e){let t=this.utilsService.getCurrentTimestamp();this.clearUnmatchedSessionStartingTimeout();for(let i=0;i<e.length;++i){let r=e[i];if(!this.isPairedMeeting(r))continue;let a=r.startMs-t;a>=0&&a<dt&&!r.partnerId&&(this.unmatchedSessionStartingTimeout=setTimeout(()=>{this.confirmedSessionsService.getFullSessionInfoByExternalIds([r.id]).subscribe(m=>{let y=m[r.id]??null;this.meetingsService.updatePairedMeetingFromConfirmedSession(r.id,y)}),this.clearUnmatchedSessionStartingTimeout()},a))}}isPairedMeeting(e){return e.meetingType==="paired"}clearUnmatchedSessionStartingTimeout(){this.unmatchedSessionStartingTimeout&&(clearTimeout(this.unmatchedSessionStartingTimeout),this.unmatchedSessionStartingTimeout=null)}handleNewUserCancelation(e){if(!e){this.lastNewUserCancelationKey=null;return}let t=e.sessionTime??e.userId;this.lastNewUserCancelationKey!==t&&(this.lastNewUserCancelationKey=t,this.openNewUserCancelationDialog(e))}openNewUserCancelationDialog(e){this.dialogService.openReportNewUserPromptDialog(e.displayName,e.firstName,e.photoUrl||"",e.sessionCount,e.sessionTime,e.accountDeleted,e.profileUrl,t=>{t==="report"&&this.dialogService.openReportProfile(e.userId,e.photoUrl||"",e.firstName,e.displayName,"reportNewUserPrompt")})}checkForTodayChanges(){let e=!1;for(let t=0;t<this.days.length;t++)if(this.days[t].isToday!==this.timeUtilitiesService.isToday(this.days[t].startOfDayInMs,this.currentUser.timeZone)){e=!0;break}e&&this.updateDayArrays()}updateDayArrays(){this.calendarStartDayMidnight&&this.numberOfDaysToShow&&(this.days=Array.from({length:this.numberOfDaysToShow},(e,t)=>{let i=(0,vt.default)(this.calendarStartDayMidnight).add(t,"day").valueOf(),a=this.timeUtilitiesService.getEndOfDay(i,this.currentUser.timeZone)<this.utilsService.getCurrentTimestamp(),m=this.timeUtilitiesService.isToday(i,this.currentUser.timeZone);return{startOfDayInMs:i,isToday:m,isPast:a}}))}calculateEndTimeToRetrieve(){return this.numberOfDaysToShow&&this.calendarStartDayMidnight?this.timeUtilitiesService.addDays(this.calendarStartDayMidnight,this.numberOfDaysToShow,this.currentUser.timeZone):0}triggerNotifications(e){setTimeout(()=>{this.lUtil.getComingFromSignup()&&(this.lUtil.setComingFromSignUp(!1),this.lUtil.markOnboardingComplete(e)),this.isWelcomeChecklistActive()&&this.welcomeChecklistService.openWelcomeChecklistAtPageLoad(),this.displayFocusNowUnlockedModal(e),this.displayGroupInviteNotifications(e),this.displayAmbassad
80orProgramModal(e),this.displayYearInReviewModal(e),this.displayPricingOptions(e),this.displayLabsAnnouncement(e),this.displayGroupMeetingHostRecruitment(e),this.displayGroupMeetingsHostPrompt(e),this.displayGroupMeetingsHostBetaAnnouncement(e),this.displayGroupMeetingsBetaLaunchModal(e),this.displayGroupSessionsUpgradesModal(e)},500)}displayGroupSessionsUpgradesModal(e){this.featureCheckService.isGroupMeetingsEnabled(e)&&this.featureCheckService.shouldAnnounceGroupSessionsUpgrades(e)&&this.dialogService.openGroupSessionsUpgradesDialog(()=>{this.featureCheckService.setGroupSessionsUpgradesAnnounced(e)})}displayGroupMeetingsBetaLaunchModal(e){let t=vt.default.tz(Yo,$o).valueOf();Date.now()>=t&&this.featureCheckService.isGroupMeetingsEnabled(e)&&!this.featureCheckService.hasViewedGroupMeetingsBetaLaunchModal(e)&&this.dialogService.openGroupSessionsLaunchDialog(()=>{this.featureCheckService.setHasViewedGroupMeetingsBetaLaunchModal(e)})}displayNewUserFeedbackRequestModal(e){e.features.newLayoutOnly&&!this.featureCheckService.hasViewedNewLayoutFeedbackRequest(e)&&e.compSessions>=1&&!this.isWelcomeChecklistActive()&&this.dialogService.openNewLookFeedbackRequestDialog(t=>{this.featureCheckService.setHasViewedNewLayoutFeedbackRequest(e),t&&window.open(Ai({email:e.email}),"_blank")})}displayFocusNowUnlockedModal(e){this.featureCheckService.canUseNowSessions(e)&&!this.featureCheckService.hasViewedFocusNowUnlockedModal(e)&&(this.dialogService.openFocusNowUnlockedModal(),this.featureCheckService.setHasViewedFocusNowUnlockedModal(e))}displayDomainUpdatedNotificationModal(e){!this.featureCheckService.hasViewedDomainUpdatedNotification(e)&<.showDomainUpdatedConfirmation&&this.dialogService.openDomainUpdatedNotificationModal()}displayFeatureModal(e){let t=this.localStorageAccessService.getItem("darkModeEnabled"),i=this.utilsService.getCurrentTimestamp();t==null&&i<Wo&&(this.darkModeService.set(!1),this.dialogService.openDarkModeReleaseModal())}displayYearInReviewModal(e){e.yearlyReview&&(this.featureCheckService.hasViewedYearInReviewModal(e)||this.dialogService.openYearInReviewModal())}displayGroupInviteNotifications(e){let t=e.group;for(let i of t)i.groupMember===!1&&i.groupInviteNotified===!1&&this.dialogService.openGroupInviteNotification(i,this.currentUser.photo)}displayAmbassadorProgramModal(e){e.compSessions>=li&&!this.featureCheckService.hasViewedAmbassadorProgramModal(e)&&!this.isWelcomeChecklistActive()&&this.dialogService.openAmbassadorPromptDialog(e.compSessions,t=>{this.featureCheckService.setHasViewedAmbassadorProgramModal(e),t===!0&&this.dialogService.openEditAmbassadorMatchFrequencySettingDialog(!0)})}displayPricingOptions(e){let t=this.localStorageAccessService.getItem("priceOptionsReminder"),i=this.utilsService.getCurrentTimestamp();t&&+i<+t||e.planInfo.subscribedLegacy&&this.stripeService.getPriceUpdateOptions().pipe(Pe(r=>!this.hasValidPricingOptionResponses(r)),it(r=>this.dialogService.openPriceUpdateOptionsDialog(r).onClose),$(1)).subscribe({next:()=>{let r=this.utilsService.getCurrentTimestamp()+72e6;this.localStorageAccessService.setItem("priceOptionsReminder",r.toString())},error:r=>console.error("Failed to load pricing options",r)})}displayLabsAnnouncement(e){let t=e.terms.accepted===!1&&e.terms.latestVersion===lt.tosVersion;this.featureCheckService.isLabsAccessEnabled(e)&&(!this.featureCheckService.hasViewedLabsAnnouncementModal(e)||t)&&this.dialogService.openLabsAnnouncementModal(()=>{t||this.featureCheckService.setHasViewedLabsAnnouncementModal(e)},t,e)}displayGroupMeetingsHostBetaAnnouncement(e){this.featureCheckService.groupMeetingsCreateEnabledSig()&&!this.featureCheckService.hasViewedGroupMeetingsHostBetaModal(e)&&this.dialogService.openGroupMeetingsHostBetaAnnouncementDialog(()=>{this.featureCheckService.setHasViewedGroupMeetingsHostBetaModal(e)})}displayGroupMeetingHostRecruitment(e){!this.featureCheckService.isGroupMeetingsEnabled(e)&&!this.featureCheckService.isGroupMeetingsCreateEnabled(e)&&this.featureCheckService.isHostRecruitmentEnabled(e)&&this.localStorageAccessService.getItem(ut)!=="true"&&this.localStorageAccessService.getItem(ii)!=="true"&&this.dialogService.openGroupMeetingHostRecruitmentDialog(()=>{this.localStorageAccessService.setItem(ut,"true")})}displayGroupMeetingsHostPrompt(e){this.featureCheckService.isGroupMeetingsHostApplicationEnabled(e)&&(e.compGroupSessions??0)>=ci&&!this.featureCheckService.hasViewedGroupMeetingsHostPromptModal(e)&&this.dialogService.openGroupMeetingApplyToHostDialog()}hasValidPricingOptionResponses(e){return!(e.annualUpgradeAvailable&&e.convertToAnnual==null||e.localCurrencyAvailable&&e.convertToLocalCurrency==null)}
80onClickBannerDismissed(){this.showFeatureBanner=!1;try{localStorage.setItem(Ho,"true")}catch(e){}}onClickClearAll(){this.selectedSessionService.deleteAllSelectedSessions()}onClickBookSessions(){let e=this.selectedSessions.length,t=[];for(let i=0;i<e;i++){let r=this.selectedSessions[i],a={favorites:{value:r.sessionPreferenceFavorites},quietMode:{value:r.quietMode}};t.push({sessionTime:r.sessionTime,duration:r.sessionDuration,title:"",userAvailabilityCode:"",userId:"",preferences:a,activityType:r.activityType})}this.bookingInProgress=!0,this.bookSessionsService.bookSessions(t,this.currentUser.timeZone,Ne.CalendarFooter).pipe($(1),_t(()=>this.bookingInProgress=!1)).subscribe(i=>{let r=this.bookSessionsService.parseBookResponse(i);r.numSuccess!==0&&this.dialogService.openConfirmTransaction(r.numSuccess===1?r.numSuccess+" session booked!":r.numSuccess+" sessions booked!",3e3,{desktopOnly:!0}),this.currentUser.emailVerified===!1?this.dialogService.openEmailVerificationDialog(Ve,()=>{this.processParsedResult(r)}):this.processParsedResult(r)},i=>{this.errorHandlerService.handleErrorResponse(i),this.selectedSessionService.deleteAllSelectedSessions()})}processParsedResult(e){e.planLimitReached===!0?this.dialogService.openPlanLimitReachedDialog():!this.isWelcomeChecklistActive()&&!this.currentUser.properties.viewedSegmentationSurveyModal&&this.currentUser.compSessions>=3?this.dialogService.openSegmentationSurveyModal():!this.isWelcomeChecklistActive()&&this.rewardsReferralService.shouldSeeReferralPrompt(this.currentUser)&&this.dialogService.openReferralPromptModal()}ngOnDestroy(){this.clearUnmatchedSessionStartingTimeout(),this.ngUnsubscribe.next(null),this.ngUnsubscribe.complete()}};s.\u0275fac=function(t){return new(t||s)(l(z),l(K),l(De),l(_e),l(Re),l(Be),l(Ce),l(bi),l(J),l(oi),l(Te),l(ri),l(ge),l(We),l(Ge),l(je),l(Le),l(Mt),l(X),l(be),l(ve),l(ni),l(fe),l(si),l(ai),l(yi))},s.\u0275cmp=C({type:s,selectors:[["fm-calendar"]],hostBindings:function(t,i){t&1&&g("focus",function(a){return i.onFocus(a)},de)("blur",function(a){return i.onBlur(a)},de)("mousemove",function(a){return i.onMouseMove(a)},de)},decls:4,vars:4,consts:[[1,"w-full","h-full","flex","flex-col","items-start","justify-start","animation-fade-in"],[1,"w-full",3,"scrollBarWidth","timezone","startOfWeekDay"],[1,"h-[calc(100%_-_52px)]","w-full","overflow-hidden",3,"days","timezone","timeFormat","sessionDuration","availableGroupMeetings"],[1,"h-[calc(100%_-_52px)]","w-full","overflow-hidden",3,"updatedScrollbarWidth","days","timezone","timeFormat","sessionDuration","availableGroupMeetings"],[1,"w-full","h-[75px]","border-t","border-t-p-content-border-color","flex","justify-between","items-center","p-4","gap-4","gb-white"],["size","large","severity","primary","styleClass","w-full","label","Clear All",1,"flex-1",3,"click","buttonProps","disabled","outlined"],["size","large","severity","primary","styleClass","w-full",1,"flex-1",3,"click","buttonProps","loading","label"]],template:function(t,i){t&1&&(d(0,"div",0),f(1,Vo,2,4),f(2,jo,3,4),re(3,"async"),p()),t&2&&(c(),S(i.currentUser!=null&&i.currentUser.timeZone?1:-1),c(),S(rt(3,2,i.selectedSessionService.selectedSessions$).length?2:-1))},dependencies:[Li,dn,A,G,V,Qt],encapsulation:2});let n=s;return n})();var ya=(()=>{let s=class s{};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=C({type:s,selectors:[["app-dashboard"]],decls:2,vars:0,consts:[[1,"flex","flex-col","w-full","h-full","bg-p-content-background","bp908:rounded-2xl","p-4","pb-0","pt-2","bp908:pb-4"],[1,"h-full"]],template:function(t,i){t&1&&(d(0,"div",0),b(1,"fm-calendar",1),p())},dependencies:[mn],encapsulation:2});let n=s;return n})();export{De as a,ya as b}; 81//# sourceMappingURL=chunk-34ST3DWD.js.map
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.