1import{a as ne}from"./chunk-DTHNHC33.js";import{a as Bt,b as k,c as Ut,d as Ge,r as zt}from"./chunk-4W6DKYR2.js";import{a as jt}from"./chunk-J5XN5A3N.js";import"./chunk-SFOKHGDK.js";import"./chunk-4IYVISYD.js";import{a as Dt,b as Lt}from"./chunk-RPF3KN6M.js";import{b as Me}from"./chunk-3BDFMJBH.js";import"./chunk-FKHDWX46.js";import{a as xe}from"./chunk-KOKY3PUN.js";import{a as Fe,b as kt}from"./chunk-PUGT4DAG.js";import"./chunk-QB566YSG.js";import{a as Se}from"./chunk-4L46VDH6.js";import{a as I,b as ie,c as B,d as $t,g as Ft,k as Gt}from"./chunk-W2LIO6CL.js";import"./chunk-NTYIHL7G.js";import{$ as We,$e as Nt,A as Ee,Aa as K,Ac as ye,Ba as Je,Bb as et,Cc as De,D as o,Da as ee,E as A,Ec as lt,Fa as te,Fe as Ct,Ga as D,Gc as Ne,Ge as bt,I as S,Ic as Ie,Id as gt,J as v,Jb as tt,K as he,Kc as Le,La as G,M as p,Ma as be,Na as M,Oa as le,Oc as ct,P as r,Pa as ce,Pb as it,Q as s,Qa as _e,Qc as _t,R as a,Ra as qe,Rb as Te,S as m,Sa as Oe,Sc as pe,T as P,U as x,Ua as Ze,V as z,Va as de,Vc as Re,Ve as Ot,W as E,Wc as X,We as Tt,X as V,Xa as Ke,Xc as Pe,Xd as ft,Y as H,Yb as se,Ye as vt,Z as h,Zc as dt,Zd as Et,_b as N,a as F,aa as Xe,bc as we,bf as It,ca as f,cc as nt,ce as ht,d as ze,da as l,dc as st,ea as re,ef as Rt,fa as ae,fd as pt,ff as Pt,ga as Y,gd as St,ha as J,ia as q,ic as ot,ja as w,k as Ve,ka as Ce,la as Z,ld as mt,ma as Qe,md as $e,na as Ae,nc as d,oa as b,pa as R,pd as ut,qa as W,qc as rt,r as fe,ra as me,rf as xt,tf as Mt,u,uc as at,uf as At,v as g,wc as ve,x as He,xa as Ye,yf as wt,zf as yt}from"./chunk-NSUYUBKD.js";import"./chunk-DOOYTSX3.js";function li(t,c){if(t&1){let e=E();s(0,"app-join-fields",3),f("joined",function(n){u(e);let _=l();return g(_.joined(n));})("back",function(){u(e);let n=l();return g(n.goBack());}),a();}if(t&2){let e=l();r("classId",e.classId)("emailPrompt",e.courseClass.emailPrompt||e.fieldPromptEnum.HIDDEN)("firstNamePrompt",e.courseClass.firstNamePrompt||e.fieldPromptEnum.HIDDEN)("lastNamePrompt",e.courseClass.lastNamePrompt||e.fieldPromptEnum.HIDDEN)("userIdPrompt",e.courseClass.userIdPrompt||e.fieldPromptEnum.HIDDEN);}}var Ht=(()=>{class t{constructor(e,i,n,_,O,C,T,y){this.environment=e,this.resizeUtilityService=i,this.route=n,this.router=_,this.classApiService=O,this.profileStorageService=C,this.learnerPollingApiService=T,this.integrationsUtilityService=y,this.subscriptions=new F(),this.isMobile=!1,this.startDate=new Date(),this.dateTimeFormat=xe,this.fieldPromptEnum=lt;}ngOnInit(){if(this.logoUrl=`${this.environment.cdnUrl}/images/echopoll/echopoll-logo.svg`,this.isInIntegration=this.integrationsUtilityService.isInIntegration(),this.subscriptions.add(this.resizeUtilityService.getIsMobileObservable().subscribe(e=>{this.isMobile=e;})),this.courseId=this.route.snapshot.paramMap.get("courseId"),this.classId=this.route.snapshot.paramMap.get("classId"),!this.profileStorageService.isGuest())if(this.isInIntegration){let e=this.integrationsUtilityService.getIntegration();this.router.navigate([`/${e.toLowerCase()}/session/course/${this.courseId}/class/${this.classId}`]).catch(()=>{});}else this.router.navigate([`/session/course/${this.courseId}/class/${this.classId}/`]).catch(()=>{});this.classApiService.getClassFromUnauthenticated(this.classId).subscribe(e=>{switch(this.courseClass=e,this.courseClass.id=this.classId,this.courseClass.state){case ne.IN_PROGRESS:break;case ne.READY:break;default:this.navigateEndLobby();break;}},()=>{});}ngOnDestroy(){this.subscriptions.unsubscribe();}goToSignIn(){let e=this.integrationsUtilityService.getIntegration(),i=`${this.environment.accountUrl}/authenticate?callback=${window.location.origin+this.router.url+e}}`;window.open(i,"_self");}joined(e){this.learnerPollingApiService.guestJoinSession(this.classId,e.firstName,e.lastName,e.email,!0).subscribe(()=>{if(this.isInIntegration){let i=this.integrationsUtilityService.getIntegration();this.router.navigate([`/${i.toLowerCase()}/session/course/${this.courseId}/class/${this.classId}`]).catch(()=>{});}else this.router.navigate([`/session/course/${this.courseId}/class/${this.classId}`]).catch(()=>{});},i=>{if(i.status!==400)if(this.isInIntegration){let n=this.integrationsUtilityService.getIntegration();this.router.navigate([`/${n.toLowerCase()}/session/course/${this.courseId}/class/${this.classId}`]).catch(()=>{});}else this.router.navigate([`/session/course/${this.courseId}/class/${this.classId}`]).catch(()=>{});});}goBack(){this.isInIntegration?this.router.navigate([this.integrationsUtilityService.getIntegration().toLowerCase()]).catch(()=>{}):this.router.navigate(["/join"]).catch(()=>{});}navigateEndLobby(){if(this.isInIntegration){let e=this.integrationsUtilityService.getIntegration();this.router.navigate([`/${e.toLowerCase()}/session/course/${this.courseId}/class/${this.classId}/ended`]).catch(()=>{});}else this.router.navigate([`/session/course/${this.courseId}/class/${this.classId}/ended`]).catch(()=>{});}static{this.ɵfac=function(i){return new(i||t)(S(pe),S(X),S(Ne),S(Ie),S(Me),S(Re),S(Nt),S(Se));};}static{this.ɵcmp=v({type:t,selectors:[["app-join-lobby-page"]],standalone:!1,decls:5,vars:3,consts:()=>{let e;return e="EchoPoll logo",[["alt",e,1,"encapsulated-logoSize","mb-3",3,"src"],[1,"text-center","mt-2","mb-2","encapsulated-class-name"],["class","w-100",3,"classId","emailPrompt","firstNamePrompt","lastNamePrompt","userIdPrompt","joined","back",4,"ngIf"],[1,"w-100",3,"joined","back","classId","emailPrompt","firstNamePrompt","lastNamePrompt","userIdPrompt"]];},template:function(i,n){i&1&&(s(0,"tt-join-outer-lobby"),m(1,"img",0),s(2,"span",1),b(3),a(),p(4,li,1,5,"app-join-fields",2),a()),i&2&&(o(),r("src",n.logoUrl,Ee),o(2),W(" ",n.courseClass==null?null:n.courseClass.name," "),o(),r("ngIf",n.courseClass));},dependencies:[M,Ft,Tt],styles:[".encapsulated-logoSize[_ngcontent-%COMP%]{height:60px}
1.encapsulated-class-name[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}"]});}}return t;})();var Be=function(t){return t.READY="READY",t.IN_PROGRESS="IN_PROGRESS",t.CLOSED="CLOSED",t;}(Be||{});var U=function(t){return t.CLASS_RESULTS="CLASS_RESULTS",t.MY_ANSWER="MY_ANSWER",t;}(U||{});function ci(t,c){t&1&&(s(0,"div",23)(1,"span",24),h(2,2),a()());}function _i(t,c){t&1&&(s(0,"div",25)(1,"span",24),h(2,3),a()());}function di(t,c){if(t&1&&(s(0,"div",17)(1,"div",18),m(2,"i",19),s(3,"h4",20),b(4),a()(),p(5,ci,3,0,"div",21)(6,_i,3,0,"div",22),a()),t&2){let e=l();r("ngClass",e.isMobile?"flex-grow-1":"flex-grow-0"),o(2),r("ngClass",e.getQuestionType().icon),o(2),R(e.getQuestionType().text),o(),r("ngIf",e.slide==null?null:e.slide.anonymous),o(),r("ngIf",e.slide==null?null:e.slide.anonymous);}}function pi(t,c){if(t&1){let e=E();s(0,"div",26)(1,"button",27),f("click",function(){u(e);let n=l();return g(n.switchReviewToggle(n.resultsToggleEnum.CLASS_RESULTS));}),h(2,4),a(),s(3,"button",27),f("click",function(){u(e);let n=l();return g(n.switchReviewToggle(n.resultsToggleEnum.MY_ANSWER));}),h(4,5),a()();}if(t&2){let e=l();o(),Z("active",e.resultsToggle===e.resultsToggleEnum.CLASS_RESULTS),o(2),Z("active",e.resultsToggle===e.resultsToggleEnum.MY_ANSWER);}}function Si(t,c){if(t&1&&(s(0,"div",28),m(1,"tt-avatar",29),s(2,"div",15),b(3),a()()),t&2){let e=l();o(),r("avatarClass",e.avatar),o(2),W(" ",e.team.name," ");}}function mi(t,c){t&1&&(s(0,"div",30),h(1,6),a());}var Wt=(()=>{class t{constructor(e,i){this.sessionService=e,this.resizeUtilityService=i,this.sessionState=d.CLOSED,this.resultsToggleChange=new A(),this.sessionStateEnum=d,this.resultsToggleEnum=U,this.score=0,this.isMobile=!1;}ngOnInit(){this.resizeUtilityService.getIsMobileObservable().subscribe(e=>{this.isMobile=e;}),this.sessionService.watchTeam().subscribe(e=>{this.team=e,e&&(this.avatar=new Te("","","",this.team.imageUrl,32));}),this.sessionService.getSessionState()?.subscribe(e=>{e===d.REVIEW&&this.resultsToggleChange.next(U.CLASS_RESULTS);}),this.sessionService.watchPoints().subscribe(e=>{this.score=e;});}switchReviewToggle(e){this.resultsToggleChange.next(e);}getQuestionType(){return jt.getIconAndText(this.slide);}static{this.ɵfac=function(i){return new(i||t)(S(k),S(X));};}static{this.ɵcmp=v({type:t,selectors:[["app-polling-header"]],inputs:{sessionState:"sessionState",slide:"slide",resultsToggle:"resultsToggle"},outputs:{resultsToggleChange:"resultsToggleChange"},standalone:!1,decls:15,vars:9,consts:()=>{let e;e=" Points ";let i;i="Anonymous";let n;n="Anonymous Response";let _;_=" All Participants ";let O;O=" My Answer ";let C;return C=" Waiting for Presenter ",[["pollingClosed",""],e,i,n,_,O,C,[1,"encapsulated-height","navbar","navbar-lg","bg-white","text-dark","flex-nowrap","border-bottom"],["class","d-flex align-items-center",3,"ngClass",4,"ngIf","ngIfElse"],[3,"ngClass"],["class","btn-group e360-nav-group","role","group",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-end"],[1,"mr-2","d-flex","align-items-center","flex-column","flex-md-row"],["aria-hidden","true",1,"mr-2","far","fa-sm","fa-medal","d-none","d-md-block"],[1,"mr-0","mr-md-1","encapsulated-text-height"],[1,"d-flex","align-items-center","justify-content-center","encapsulated-text-uppercase"],["class","d-flex align-items-center flex-column flex-md-row",4,"ngIf"],[1,"d-flex","align-items-center",3,"ngClass"],[1,"mr-1","d-flex","align-items-center"],["aria-hidden","true",1,"far","fa-sm","mr-1",3,"ngClass"],["aria-level","1",1,"m-0","px-1"],["class","d-flex h5 d-lg-none m-auto flex-fill",4,"ngIf"],["class","d-none d-lg-flex h5 m-auto flex-fill",4,"ngIf"],[1,"d-flex","h5","d-lg-none","m-auto","flex-fill"],[1,"badge","badge-pill","badge-dark"],[1,"d-none","d-lg-flex","h5","m-auto","flex-fill"],["role","group",1,"btn-group","e360-nav-group"],["type","button",1,"btn",3,"click"],[1,"d-flex","align-items-center","flex-column","flex-md-row"],[1,"mr-0","mr-md-2",3,"avatarClass"],[1,"d-flex","align-items-center"]];},template:function(i,n){if(i&1&&(s(0,"nav",7),p(1,di,7,5,"div",8),s(2,"div",9),p(3,pi,5,4,"div",10),a(),s(4,"div",11)(5,"div",12),m(6,"i",13),s(7,"span",14),b(8),ee(9,"number"),a(),s(10,"span",15),h(11,1),a()(),p(12,Si,4,2,"div",16),a()(),p(13,mi,2,0,"ng-template",null,0,D)),i&2){let _=w(14);o(),r("ngIf",n.slide&&n.sessionState!==n.sessionStateEnum.POLLING_CLOSED)("ngIfElse",_),o(),r("ngClass",n.isMobile?"d-none":"d-flex"),o(),r("ngIf",n.sessionState===n.sessionStateEnum.REVIEW),o(5),R(te(9,6,n.score,"1.0-2")),o(4),r("ngIf",n.team);}},dependencies:[G,M,Pe,de],styles:[".encapsulated-height[_ngcontent-%COMP%]{height:56px}.encapsulated-text-uppercase[_ngcontent-%COMP%]{text-transform:capitalize;font-weight:400;font-size:1rem}.encapsulated-text-height[_ngcontent-%COMP%]{height:unset}@media only screen and (max-width: 767px){.encapsulated-text-uppercase[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:600;font-size:.5rem}.encapsulated-text-height[_ngcontent-%COMP%]{height:32px}}"]});}}return t;})();var gi=["*"],Xt=(()=>{class t{constructor(){}ngOnInit(){}static{this.ɵfac=function(i){return new(i||t)();};}static{this.ɵcmp=v({type:t,selectors:[["app-polling-closed"]],standalone:!1,ngContentSelectors:gi,decls:10,vars:0,consts:()=>{let e;e="Waiting for presenter";let i;return i="You\u2019ll be able to respond when the presenter"+"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"+"opens this question.",[i,[1,"d-flex","flex-column","h-100"],[1,"d-flex","mx-auto"],[1,"d-flex","flex-column","flex-fill","text-center","align-items-center","justify-content-center"],["imageName","
1icons/waitingForPresenter","text",e],[1,"text-center"],[1,"text-left"]];},template:function(i,n){i&1&&(re(),s(0,"div",1)(1,"div",2),ae(2),a(),s(3,"div",3)(4,"div"),m(5,"tt-empty-screen",4),a(),s(6,"div",5)(7,"p",6),V(8,0),m(9,"br"),H(),a()()()());},dependencies:[Ct],encapsulation:2});}}return t;})();var Ei=["chatButton"],hi=["leaderButton"],Ci=t=>({"encapsulated-max-width":t});function bi(t,c){if(t&1&&(s(0,"div",25)(1,"span",26),b(2),a()()),t&2){let e=l(3);o(2),R(e.unreadChatCount);}}function Oi(t,c){if(t&1){let e=E();s(0,"button",22,1),f("click",function(){u(e);let n=l(2);return g(n.drawerButtonClick(n.DrawerState.SHOWING_MESSAGES));}),m(2,"i",23),s(3,"span"),h(4,4),a(),p(5,bi,3,1,"div",24),a();}if(t&2){let e=l(2);Z("flat",e.activeDrawerState!==e.DrawerState.SHOWING_MESSAGES)("primary",e.activeDrawerState===e.DrawerState.SHOWING_MESSAGES),o(5),r("ngIf",e.unreadChatCount);}}function Ti(t,c){if(t&1){let e=E();s(0,"button",27,2),f("click",function(){u(e);let n=l(2);return g(n.drawerButtonClick(n.DrawerState.SHOWING_LEADERBOARD));}),m(2,"i",28),s(3,"span"),h(4,5),a()();}if(t&2){let e=l(2);Z("flat",e.activeDrawerState!==e.DrawerState.SHOWING_LEADERBOARD)("primary",e.activeDrawerState===e.DrawerState.SHOWING_LEADERBOARD);}}function vi(t,c){if(t&1&&(P(0),p(1,Oi,6,5,"button",20)(2,Ti,5,4,"button",21),x()),t&2){let e=l();o(),r("ngIf",!e.isInIntegration),o(),r("ngIf",e.showLeaderboard);}}function Ni(t,c){if(t&1&&(s(0,"div",29)(1,"span",30),b(2),a()()),t&2){let e=l();r("ngClass",e.isMobile?"justify-content-between px-3":"justify-content-center"),o(),r("ngClass",K(3,Ci,!e.isMobile)),o(),R(e.getFooterPrompt(!1));}}function Ii(t,c){t&1&&(V(0,6,1),m(1,"span",35),H());}function Ri(t,c){if(t&1){let e=E();s(0,"button",33),f("click",function(){u(e);let n=l(2);return g(n.onSubmit());}),V(1,6),p(2,Ii,2,0,"span",34),H(),a();}if(t&2){let e=l(2);r("disabled",!e.canSubmit||e.isSubmitting)("tabindex",!e.canSubmit||e.isSubmitting?-1:0),o(2),r("ngIf",e.isSubmitting);}}function Pi(t,c){if(t&1&&(s(0,"div",31),p(1,Ri,3,3,"button",32),a()),t&2){let e=l();o(),r("ngIf",e.slide&&(e.slide.type===e.pollingSlideType.SHORT_ANSWER||e.slide.type==e.pollingSlideType.WORD_CLOUD||e.slide.type===e.pollingSlideType.NUMERIC));}}function xi(t,c){if(t&1){let e=E();s(0,"div",37)(1,"button",38),f("click",function(){u(e);let n=l(2);return g(n.switchReviewToggle(n.resultsToggleEnum.CLASS_RESULTS));}),h(2,7),a(),s(3,"button",38),f("click",function(){u(e);let n=l(2);return g(n.switchReviewToggle(n.resultsToggleEnum.MY_ANSWER));}),h(4,8),a()();}if(t&2){let e=l(2);o(),r("ngClass",e.resultsToggle===e.resultsToggleEnum.CLASS_RESULTS?"primary":"flat"),o(2),r("ngClass",e.resultsToggle===e.resultsToggleEnum.MY_ANSWER?"primary":"flat");}}function Mi(t,c){if(t&1&&(P(0),p(1,xi,5,2,"div",36),x()),t&2){let e=l();o(),r("ngIf",e.isMobile);}}function Ai(t,c){t&1&&z(0);}function wi(t,c){if(t&1){let e=E();s(0,"div",11,3)(2,"button",39),f("click",function(){u(e);let n=l();return g(n.leaveSessionEvent.emit());}),m(3,"i",40),s(4,"span"),h(5,9),a()()();}}var Qt=(()=>{class t{constructor(e,i,n){this.learnerSessionService=e,this.resizeUtilityService=i,this.drawerUtilityService=n,this.sessionState=d.CLOSED,this.resultsToggleChange=new A(),this.leaveSessionEvent=new A(),this.DrawerState=I,this.unreadChatCount=0,this.sessionStateEnum=d,this.pollingSlideType=N,this.resultsToggleEnum=U,this.canSubmit=!1,this.hasResponse=!1,this.hasActiveResponse=!1,this.isMobile=!1,this.isSubmitting=!1,this.subscriptions=new F(),this.hideMedia=!1;}ngOnInit(){this.subscriptions.add(this.resizeUtilityService.getIsMobileObservable().subscribe(e=>{this.isMobile=e;})),this.subscriptions.add(this.learnerSessionService.getSessionState().subscribe(e=>{e===d.REVIEW&&this.resultsToggleChange.next(U.CLASS_RESULTS);})),this.subscriptions.add(this.learnerSessionService.getSubmitState().subscribe(e=>{this.isSubmitting=!1,this.canSubmit=e.canSubmit,this.hasResponse=e.hasResponse,this.hasActiveResponse=e.hasActiveResponse;})),this.subscriptions.add(this.drawerUtilityService.getDrawerSelectedSubject().subscribe(e=>{if(e===I.DRAWER_HIDDEN)switch(this.activeDrawerState){case I.SHOWING_MESSAGES:this.chatButton.nativeElement.focus();return;case I.SHOWING_LEADERBOARD:this.leaderButton.nativeElement.focus();return;default:return;}this.activeDrawerState=e;})),this.subscriptions.add(this.learnerSessionService.getHideMedia().subscribe(e=>{this.hideMedia=e;})),this.subscriptions.add(this.learnerSessionService.getShowLeaderboard().subscribe(e=>{this.showLeaderboard=e;})),this.subscriptions.add(this.learnerSessionService.getNewMessageCount().subscribe(e=>{this.activeDrawerState===I.SHOWING_MESSAGES?this.unreadChatCount=0:this.unreadChatCount=e,this.unreadChatStatus=""+this.unreadChatCount+" unread chat messages";}));}drawerButtonClick(e){this.activeDrawerState===e?(this.activeDrawerState=I.DRAW
1ER_HIDDEN,this.drawerUtilityService.openDrawer(I.DRAWER_HIDDEN)):(this.activeDrawerState=e,this.drawerUtilityService.openDrawer(e));}switchReviewToggle(e){this.resultsToggleChange.next(e);}getFooterPrompt(e=!1){return this.sessionState===d.POLLING_CLOSED?"The question is not open":this.sessionState===d.REVIEW?this.hasResponse&&this.learnerSessionService.response?this.getSubmittedResponse():"No response":this.sessionState===d.PRESENTATION_POLLING?this.canSubmit===!1&&this.hasResponse?this.getSubmittedResponse():this.canSubmit?this.slide.type!==N.SHORT_ANSWER&&this.slide.type!==N.WORD_CLOUD&&this.slide.type!==N.NUMERIC?e?"":"Submitting...":this.hasActiveResponse?"Click Submit":"Click Submit to clear":{MULTIPLE_CHOICE_SINGLE_RESPONSE:"Select a response",MULTIPLE_CHOICE_MULTIPLE_RESPONSE:"Select all that apply",TRUE_FALSE:"Select a response",FILL_IN_THE_BLANK:"Fill in the blanks",SHORT_ANSWER:"Enter a response",NUMERIC:"Enter a response",HOT_SPOT:"Click the image"}[this.slide.type]:"";}getSubmittedResponse(){let{response:e}=this.learnerSessionService;if(!this.slide)return"";switch(this.slide.type){case N.MULTIPLE_CHOICE_SINGLE_RESPONSE:case N.TRUE_FALSE:{let n=this.slide.answers.find(_=>_.transmitValue===e[0])?.displayValue;return this.isMobile?n:"You submitted \""+n+"\"";}case N.MULTIPLE_CHOICE_MULTIPLE_RESPONSE:{let i=this.slide,n=e.map(O=>i.answers.find(C=>C.transmitValue===O)?.displayValue);if(n.length===1)return this.isMobile?n[0]:"You submitted \""+n[0]+"\"";if(this.isMobile)return`${n.join(", ")}`;let _=n.slice(0,n.length-1).join('", "');return"You submitted \""+_+"\" and \""+n[n.length-1]+"\"";}case N.FILL_IN_THE_BLANK:{let i=this.slide;return""+e.length+" of "+i.blankIds.length+" responses submitted";}case N.SHORT_ANSWER:case N.WORD_CLOUD:case N.NUMERIC:case N.HOT_SPOT:return this.isMobile?"Submitted":"Response submitted";default:return"";}}onSubmit(){this.isSubmitting=!0,this.learnerSessionService.submitResponse();}ngOnDestroy(){this.subscriptions.unsubscribe();}toggleHideMedia(){this.learnerSessionService.setHideMedia(!this.hideMedia);}static{this.ɵfac=function(i){return new(i||t)(S(k),S(X),S(ie));};}static{this.ɵcmp=v({type:t,selectors:[["app-session-footer"]],viewQuery:function(i,n){if(i&1&&(Y(Ei,5),Y(hi,5)),i&2){let _;J(_=q())&&(n.chatButton=_.first),J(_=q())&&(n.leaderButton=_.first);}},inputs:{sessionState:"sessionState",isInIntegration:"isInIntegration",slide:"slide",resultsToggle:"resultsToggle"},outputs:{resultsToggleChange:"resultsToggleChange",leaveSessionEvent:"leaveSessionEvent"},standalone:!1,decls:14,vars:9,consts:()=>{let e;e="Chat";let i;i="Leaderboard";let n;n=""+"\uFFFD*2:1\uFFFD\uFFFD#1:1\uFFFD"+""+"\uFFFD/#1:1\uFFFD\uFFFD/*2:1\uFFFD"+" Submit ";let _;_=" All Participants ";let O;O=" My Answer ";let C;return C="Exit",[["leftSection",""],["chatButton",""],["leaderButton",""],["rightSection",""],e,i,n,_,O,C,["role","status",1,"sr-only"],[1,"d-flex"],[4,"ngIf"],["class","d-flex flex-grow-1 align-items-center",3,"ngClass",4,"ngIf"],[1,"d-flex","flex-grow-0","justify-content-end",3,"ngClass"],[3,"ngSwitch"],["class","d-flex align-items-center",4,"ngSwitchCase"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","d-flex",4,"ngIf"],["class","e360-btn large mr-1",3,"flat","primary","click",4,"ngIf"],["class","e360-btn large",3,"flat","primary","click",4,"ngIf"],[1,"e360-btn","large","mr-1",3,"click"],["aria-hidden","true",1,"far","fa-comments-alt","mr-2"],["class","h5 d-inline position-absolute indicator-align",4,"ngIf"],[1,"h5","d-inline","position-absolute","indicator-align"],[1,"bg-warning","text-dark","rounded-pill","font-weight-bold","px-1"],[1,"e360-btn","large",3,"click"],["aria-hidden","true",1,"far","fa-ranking-star","mr-2"],[1,"d-flex","flex-grow-1","align-items-center",3,"ngClass"],[3,"ngClass"],[1,"d-flex","align-items-center"],["class","e360-btn primary large ml-3 d-flex align-items-center","aria-label","Submit Form",3,"disabled","tabindex","click",4,"ngIf"],["aria-label","Submit Form",1,"e360-btn","primary","large","ml-3","d-flex","align-items-center",3,"click","disabled","tabindex"],["class","spinner-border spinner-border-sm","role","status","aria-live","polite","aria-hidden","true",4,"ngIf"],["role","status","aria-live","polite","aria-hidden","true",1,"spinner-border","spinner-border-sm"],["class","btn-group","role","group",4,"ngIf"],["role","group",1,"btn-group"],["type","button","aria-live","polite",1,"e360-btn","large",3,"click","ngClass"],[1,"e360-btn","flat","large","ml-2",3,"click"],["aria-hidden","true",1,"far","fa-person-to-door","mr-2"]];},template:function(i,n){i&1&&(s(0,"div",10),b(1),a(),s(2,"div",11,0),p(4,vi,3,2,"ng-container",12),a(),s(5,"div",10),b(6),a(),p(7,Ni,3,5,"div",13),s(8,"div",14),P(9,15),p(10,Pi,2,1,"div",16)(11,Mi,2,1,"ng-container",17)(12,Ai,1,0,"ng-container",18),x(),a(),p(13,wi,6,0,"div",19)),i&2&&(o(),R(n.unreadChatStatus),o(3),r("ngIf",!n.isMobile),o(2),R(n.getFooterPrompt(!0)),o(),r("ngIf",n.sessionState!==n.sessionStateEnum.REVIEW),o(),r("ngClass",n.isMobile?"px-3":"px-1"),o(),r("ngSwitch",n.sessionState),o(),r("ngSwitchCase",n.sessionStateEnum.PRESENTATION_POLLING),o(),r("ngSwitchCase",n.sessionStateEnum.REVIEW),o(2),r("ngIf",!n.isMobile));},dependencies:[G,M,le,ce,_e],styles:[".indicator-align[_ngcontent-%COMP%]{margin-top:-
17px;margin-left:-7px}.encapsulated-max-width[_ngcontent-%COMP%]{max-width:200px;text-align:center}.encapsulated-border[_ngcontent-%COMP%]{border:3px solid var(--secondary-dark)}"]});}}return t;})();var Di=["chatButton"],Li=["*"],$i=t=>({"background-image":t});function Fi(t,c){t&1&&z(0);}function Gi(t,c){if(t&1){let e=E();s(0,"div",22)(1,"p",23),b(2),a(),s(3,"button",24),f("click",function(){u(e);let n=l(2);return g(n.joinSessionEmitter.emit());}),b(4,"Join Session"),a()();}if(t&2){let e=l(2);o(2),R(e.alertMessage);}}function Bi(t,c){if(t&1&&(s(0,"div",28)(1,"span",29),b(2),a()()),t&2){let e=l(3);o(2),R(e.unreadChatCount);}}function ki(t,c){if(t&1){let e=E();s(0,"button",25,2),f("click",function(){u(e);let n=l(2);return g(n.openMessagesDrawerEmitter.emit());}),m(2,"i",26),s(3,"span"),h(4,5),a(),p(5,Bi,3,1,"div",27),a();}if(t&2){let e=l(2);o(5),r("ngIf",e.unreadChatCount);}}function Ui(t,c){if(t&1){let e=E();s(0,"div",8),p(1,Fi,1,0,"ng-container",9),m(2,"div",10),s(3,"div",11),ae(4),a(),s(5,"div",12)(6,"div",13)(7,"span",14),b(8),a(),s(9,"div",15)(10,"p",16),h(11,3),a(),s(12,"p"),b(13),ee(14,"date"),a(),p(15,Gi,5,1,"div",17),a()(),m(16,"div",10),s(17,"div",18),p(18,ki,6,1,"button",19),s(19,"button",20),f("click",function(){u(e);let n=l();return g(n.exitSessionEmitter.emit());}),V(20,4),m(21,"i",21),H(),a()()()();}if(t&2){let e=l(),i=w(4);r("ngStyle",K(13,$i,e.courseClass.coverImageUrl?"url("+e.courseClass.coverImageUrl+")":"none")),o(),r("ngTemplateOutlet",i),o(4),r("ngClass",e.isMobile?"lobbyPadding":"justify-content-center"),o(),r("ngClass",e.isMobile?"lobbyMobileWidth":"lobbyMaxWidth"),o(2),W(" ",e.courseClass.name," "),o(3),We(e.getInstructorName()),Xe(11),o(2),R(te(14,10,e.startDate,e.dateTimeFormat.DATE_TIME_NO_TIMEZONE)),o(2),r("ngIf",e.classNotAvailableError),o(2),r("ngClass",e.classNotAvailableError||e.inZoom?"justify-content-end":"justify-content-between"),o(),r("ngIf",!e.classNotAvailableError&&!e.inZoom);}}function ji(t,c){t&1&&z(0);}function zi(t,c){if(t&1){let e=E();p(0,ji,1,0,"ng-container",9),s(1,"div",30)(2,"div",12)(3,"div",13)(4,"div",15)(5,"p",31),b(6),a()()(),s(7,"div",32)(8,"button",20),f("click",function(){u(e);let n=l();return g(n.exitSessionEmitter.emit());}),V(9,6),m(10,"i",21),H(),a()()()();}if(t&2){let e=l(),i=w(4);r("ngTemplateOutlet",i),o(2),r("ngClass",e.isMobile?"lobbyPadding":"justify-content-center"),o(),r("ngClass",e.isMobile?"lobbyMobileWidth":"lobbyMaxWidth"),o(3),R(e.alertMessage);}}function Vi(t,c){if(t&1&&(s(0,"div",33)(1,"div",34),m(2,"img",35),a()()),t&2){let e=l();o(2),r("src",e.logoUrl,Ee);}}var Yt=(()=>{class t{constructor(e,i,n,_,O){this.environment=e,this.drawerUtilityService=i,this.learnerSessionService=n,this.resizeUtilityService=_,this.integrationsUtilityService=O,this.exitSessionEmitter=new A(),this.openMessagesDrawerEmitter=new A(),this.joinSessionEmitter=new A(),this.unreadChatCount=0,this.subscriptions=new F(),this.isMobile=!1,this.startDate=new Date(),this.dateTimeFormat=xe;}ngOnInit(){this.logoUrl=`${this.environment.cdnUrl}/images/echopoll/echopoll-logo.svg`,this.inZoom=this.integrationsUtilityService.isInIntegration(),this.classNotAvailableError&&this.courseClass?.scheduledStartDate?this.startDate=new Date(this.courseClass?.scheduledStartDate):this.courseClass?.sessionStartDate?this.startDate=this.courseClass?.sessionStartDate:this.startDate=new Date(),this.classNotAvailableError&&setTimeout(()=>{this.alertMessage=this.getText();},500),this.subscriptions.add(this.drawerUtilityService.getDrawerSelectedSubject().subscribe(e=>{this.activeDrawerState=e,e===I.DRAWER_HIDDEN&&this.chatButton.nativeElement.focus();})),this.subscriptions.add(this.learnerSessionService.getNewMessageCount().subscribe(e=>{this.activeDrawerState===I.SHOWING_MESSAGES?this.unreadChatCount=0:this.unreadChatCount=e;})),this.subscriptions.add(this.resizeUtilityService.getIsMobileObservable().subscribe(e=>{this.isMobile=e;}));}ngOnDestroy(){this.subscriptions.unsubscribe();}ngOnChanges(e){e&&(this.courseClass=e.courseClass?.currentValue,this.classNotAvailableError=e.classNotAvailableError?.currentValue);}getInstructorName(){let e=this.courseClass.instructors[0];return`${e.firstName} ${e.lastName}`;}getText(){return $t.getText(this.classNotAvailableError);}static{this.ɵfac=function(i){return new(i||t)(S(pe),S(ie),S(k),S(X),S(Se));};}static{this.ɵcmp=v({type:t,selectors:[["app-start-lobby-page"]],viewQuery:function(i,n){if(i&1&&Y(Di,5),i&2){let _;J(_=q())&&(n.chatButton=_.first);}},inputs:{courseClass:"courseClass",classNotAvailableError:"classNotAvailableError"},outputs:{exitSessionEmitter:"exitSessionEmitter",openMessagesDrawerEmitter:"openMessagesDrawerEmitter",joinSessionEmitter:"joinSessionEmitter"},standalone:!1,features:[He],ngContentSelectors:Li,decls:5,vars:2,consts:()=>{let e;e="Instructor: "+"\uFFFD0\uFFFD"+"";let i;i=""+"\uFFFD#21\uFFFD"+""+"\uFFFD/#21\uFFFD"+" Exit ";let n;n="Chat";let _;_=""+"\uFFFD#10\uFFFD"+""+"\uFFFD/#10\uFFFD"+" Exit ";let O;return O="EchoPoll logo",[["error",""],["header",""],["chatButton",""],e,i,n,_,["class","d-flex flex-fill flex-column h-100 lobbyBackgroun
1d",3,"ngStyle",4,"ngIf","ngIfElse"],[1,"d-flex","flex-fill","flex-column","h-100","lobbyBackground",3,"ngStyle"],[4,"ngTemplateOutlet"],[1,"d-flex",2,"height","50px"],[1,"d-flex","mx-auto"],[1,"d-flex","flex-column","align-items-center","flex-fill",3,"ngClass"],[1,"rounded","bg-white","p-4","d-flex","flex-column","align-items-center","justify-content-center","font-weight-bold","shadow-sm",3,"ngClass"],[1,"encapsulated-class-name","text-center","mb-4"],[1,"instructorFontSize","d-flex","flex-column","align-items-center"],[1,"mb-0"],["class","d-flex flex-column align-items-center",4,"ngIf"],[1,"d-flex","encapsulated-footer","position-absolute","p-2","w-100",3,"ngClass"],["class","e360-btn white large",3,"click",4,"ngIf"],[1,"e360-btn","white","large","mr-2",3,"click"],["aria-hidden","true",1,"far","fa-person-to-door","mr-2"],[1,"d-flex","flex-column","align-items-center"],["role","alert",1,"text-center"],[1,"e360-btn","primary","large",3,"click"],[1,"e360-btn","white","large",3,"click"],["aria-hidden","true",1,"far","fa-comments-alt","mr-2"],["class","h5 d-inline position-absolute indicator-align",4,"ngIf"],[1,"h5","d-inline","position-absolute","indicator-align"],[1,"bg-warning","text-dark","rounded-pill","font-weight-bold","px-1"],[1,"d-flex","flex-fill","flex-column","h-100","lobbyBackground"],["role","alert",1,"mb-0","text-center"],[1,"d-flex","encapsulated-footer","border-top","position-absolute","bg-white","p-2","w-100","justify-content-end"],[1,"navbar","position-absolute","encapsulated-header","d-flex","flex-column","m-2"],[1,"encapsulated-header-height","d-flex","justify-content-between","align-items-center"],["alt",O,1,"encapsulated-logoSize",3,"src"]];},template:function(i,n){if(i&1&&(re(),p(0,Ui,22,15,"div",7)(1,zi,11,4,"ng-template",null,0,D)(3,Vi,3,1,"ng-template",null,1,D)),i&2){let _=w(2);r("ngIf",n.courseClass)("ngIfElse",_);}},dependencies:[G,M,Oe,qe,Ze],styles:[".lobbyBackground[_ngcontent-%COMP%]{background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position:center}.encapsulated-footer[_ngcontent-%COMP%]{bottom:0}.lobbyMaxWidth[_ngcontent-%COMP%]{max-width:540px;width:100%}.lobbyMobileWidth[_ngcontent-%COMP%]{width:calc(100% - 32px)}.encapsulated-class-name[_ngcontent-%COMP%]{font-size:2rem;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.instructorFontSize[_ngcontent-%COMP%]{font-size:20px}.encapsulated-header-height[_ngcontent-%COMP%]{height:36px}.encapsulated-header[_ngcontent-%COMP%]{top:0;z-index:10;background:#ffffff80;border-radius:16px}.encapsulated-logoSize[_ngcontent-%COMP%]{height:36px}.lobbyPadding[_ngcontent-%COMP%]{padding-top:126px}.indicator-align[_ngcontent-%COMP%]{margin-top:-7px;margin-left:-7px}"]});}}return t;})();var Wi=["*"];function Xi(t,c){if(t&1&&(s(0,"div",2)(1,"span",3),b(2),a()()),t&2){let e=l();o(2),W(" ",e.count," ");}}var Jt=(()=>{class t{constructor(){this.clickEvent=new A();}ngOnInit(){}click(){this.clickEvent.emit();}static{this.ɵfac=function(i){return new(i||t)();};}static{this.ɵcmp=v({type:t,selectors:[["app-control-footer-button"]],inputs:{count:"count"},outputs:{clickEvent:"clickEvent"},standalone:!1,ngContentSelectors:Wi,decls:3,vars:1,consts:[["type","button",1,"controlButton","btn","btn-flat-primary","h-100","w-100","p-0","rounded-0","border-0","position-relative","text-dark",3,"click"],["class","d-inline float-right position-absolute indicator-align",4,"ngIf"],[1,"d-inline","float-right","position-absolute","indicator-align"],[1,"bg-warning","text-dark","rounded-pill","font-weight-bold","px-1"]],template:function(i,n){i&1&&(re(),s(0,"button",0),f("click",function(){return n.click();}),p(1,Xi,3,1,"div",1),ae(2),a()),i&2&&(o(),r("ngIf",n.count));},dependencies:[M],styles:[".controlButton[_ngcontent-%COMP%]{font-size:8px}.controlButton[_ngcontent-%COMP%]:focus{background-color:var(--light)!important;box-shadow:inset 0 0 0 .15rem var(--secondary)!important}.controlButton[_ngcontent-%COMP%]:hover{background-color:var(--light)}.indicator-align[_ngcontent-%COMP%]{margin-top:-9px;font-size:10px}"]});}}return t;})();function Yi(t,c){if(t&1){let e=E();s(0,"app-control-footer-button",10),f("clickEvent",function(){u(e);let n=l();return g(n.drawerButtonClick(n.DrawerState.SHOWING_MESSAGES));}),s(1,"div",8),m(2,"i",11),s(3,"span"),h(4,1),a()()();}if(t&2){let e=l();r("count",e.unreadChatCount);}}function Ji(t,c){if(t&1){let e=E();s(0,"app-control-footer-button",7),f("clickEvent",function(){u(e);let n=l();return g(n.drawerButtonClick(n.DrawerState.SHOWING_LEADERBOARD));}),s(1,"div",8),m(2,"i",12),s(3,"span"),h(4,2),a()()();}}var qt=(()=>{class t{constructor(e,i){this.drawerUtilityService=e,this.learnerSessionService=i,this.DrawerState=I,this.unreadChatCount=0,this.subscriptions=new F(),this.hideMedia=!1,this.leaveSessionEvent=new A();}ngOnInit(){this.subscriptions.add(this.learnerSessionService.getShowLeaderboard().subscribe(e=>{this.showLeaderboard=e;})),this.subscriptions.add(this.drawerUtilityService.getDrawerSelectedSubject().subscribe(e=>{this.activeDrawerState=e;})),this.subscriptions.add(this.learnerSessionService.getNewMessageCount().subscribe(e=>{this.activeDrawerState===I.SHOWING_MESSAGES?this.unreadChatCount=0:this.unreadChatCount=e;})),this.subscriptions.add(this.learnerSessionService.getHideMedia().subscribe(e=>{this.hideMedia=e;}));}ngOnDestroy(){this.subscriptions.unsubscribe();}drawerButtonClick(e){this.activeDrawerState=e,this.drawerUtilityService.openDrawer(e);}exitClick(){this.leaveSessionEvent.emit();}toggleHideMedia(){this.learnerSessionService.setHideMedia(!this.hideMedia);}static{this.ɵfac=function(i){return new(i||t)(S(ie),S(k));};}static{this.ɵcmp=v({type:t,selectors:[["app-session-control-footer"]],inputs:{isInIntegration:"isInIntegration"},outputs:{leaveSessionEvent:"leaveSessionEvent"},standalone:!1,decls:9,vars:2,consts:()=>{let e;e=" EXIT ";let i;i=" CHAT ";let n;return n=" LEADERBOARD ",[e,i,n,[1,"d-flex","w-100","bg-white","border-top"],[1,"sidebar","d-flex","w-100","flex-shrink-0"],["class","encapsulated-flex-even",3,"count","clickEvent",4,"ngIf"],["class","encapsulated-flex-even",3,"clickEvent",4,"ngIf"],[1,"encapsulated-flex-even",3,"clickEvent"],[1,"d-flex","flex-column","align-items-center","justify-content-center"],["aria-hidden","true",1,"far","fa-person-to-door","mb-1"],[1,"encapsulated-flex-even",3,"clickEvent","count"],["aria-hidden","true",1,"far","fa-comments-alt","mb-1"],["aria-hidden","true",1,"far","fa-ranking-star","mb-1"]];},template:function(i,n){i&1&&(s(0,"div",3)(1,"div",4),p(2,Yi,5,1,"app-control-footer-button",5)(3,Ji,5,0,"app-control-footer-button",6),s(4,"app-control-footer-button",7),f("clickEvent",function(){return n.exitClick();}),s(5,"div",8),m(6,"i",9),s(7,"span"),h(8,0),a()()()()()),i&2&&(o(2),r("ngIf",!n.isInIntegration),o(),r("ngIf",n.showLeaderboard));},dependencies:[M,Jt],styles:[".sidebar[_ngcontent-%COMP%]{height:56px}.encapsulated-flex-even[_ngcontent-%COMP%]{flex:1}"]});}}return t;})();var $=function(t){return t.TEAMS="TEAMS",t.PARTICIPANTS="PARTICIPANTS",t.LEADERS="LEADERS",t;}($||{});var Zt=(()=>{class t{constructor(){}ngOnInit(){this.scorePercent=this.team.score/this.totalPossiblePoints*100;}static{this.ɵfac=function(i){return new(i||t)();};}static{this.ɵcmp=v({type:t,selectors:[["app-team-card"]],inputs:{team:"team",totalPossiblePoints:"totalPossiblePoints"},standalone:!1,decls:10,vars:8,consts:()=>{let e;return e="team score",[[1,"d-flex","flex-row","align-items-center","border-bottom","border-secondary","py-2"],[1,"d-flex","flex-column","flex-grow-1","align-items-start"],[1,"d-flex","flex-row","w-100"],[1,"text-truncate","font-weight-bold","flex-grow-1"],[1,"text-truncate","font-weight-bold"],[1,"progress","bg-dark-light","mt-2"],["role","progressbar","aria-label",e,"aria-valuemin","0",1,"progress-bar","bg-info"]];},template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),b(4),a(),s(5,"span",4),b(6),ee(7,"number"),a()(),s(8,"div",5),m(9,"div",6),a()()()),i&2&&(o(4),me(" ",n.team.rank,". ",n.team.name," "),o(2),R(te(7,5,n.team.score,"1.0-2")),o(3),Ce("width",n.scorePercent,"%"));},dependencies:[de],styles:[".progress[_ngcontent-%COMP%]{height:.5rem;width:100%}"]});}}return t;})();var Kt=(()=>{class t{constructor(e){this.userUtilityService=e,this.scorePercent=0;}ngOnInit(){let e=this.participant;this.displayedName=this.userUtilityService.getDisplayName(e),this.scorePercent=this.participant.score/this.totalPossiblePoints*100;}static{this.ɵfac=function(i){return new(i||t)(S(It));};}static{this.ɵcmp=v({type:t,selectors:[["app-participant-score-card"]],inputs:{participant:"participant",totalPossiblePoints:"totalPossiblePoints",totalGradedQuestions:"totalGradedQuestions"},standalone:!1,decls:12,vars:10,consts:()=>{let e;return e="participant score",[[1,"d-flex","flex-row","align-items-center","border-bottom","border-secondary","py-2"],[1,"d-flex","flex-column","flex-grow-1","align-items-start"],[1,"text-truncate","font-weight-bold","encapsulated-width"],[1,"progress","bg-dark-light","mt-2"],["role","progressbar","aria-label",e,"aria-valuemin","0",1,"progress-bar","bg-info"],[1,"d-flex","flex-column","align-items-end","pl-4"],[1,"text-truncate","font-weight-bold"]];},template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1)(2,"span",2),b(3),a(),s(4,"div",3),m(5,"div",4),a()(),s(6,"div",5)(7,"span",6),b(8),ee(9,"number"),a(),s(10,"span",6),b(11),a()()()),i&2&&(o(3),me("",n.participant.rank,". ",n.displayedName),o(2),Ce("width",n.scorePercent,"%"),o(3),R(te(9,7,n.participant.score,"1.0-2")),o(3),me("",n.participant.correctQuestions,"/",n.totalGradedQuestions));},dependencies:[de],styles:[".progress[_ngcontent-%COMP%]{height:.5rem;width:100%}.encapsulated-width[_ngcontent-%COMP%]{max-width:300px}"]});}}return t;})();function en(t,c){if(t&1&&(s(0,"p",5),b(1),a()),t&2){let e=c.$implicit,i=c.last,n=l();r("ngClass",i?"mb-0":"mb-2"),o(),R(n.getDisplayName(e));}}var ei=(()=>{class t{constructor(){}ngOnInit(){this.avatar=new Te("","","",`${this.team.imageUrl}`);}getDisplayName(e){return rt.getName(e);}static{this.ɵfac=function(i){return new(i||t)();};}static{this.ɵcmp=v({type:t,selectors:[["app-leader-card"]],inputs:{team:"team"},standalone:!1,decls:6,vars:3,consts:[[1,"card","m-2"],[1,"card-header","bg-secondary","d-flex","align-items-center","justify-content-center"],[1,"flex-grow-0","text-center","pr-2",3,"avatarClass"],[1,"card-body"],["class","text-truncate",3,"ngClass",4,"ngFor","ngForOf"],[1,"text-truncate",3,"ngClass"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1),m(2,"tt-avatar",2),b(3),a(),s(4,"div",3),p(5,en,2,2,"p",4),a()()),i&2&&(o(2),r("avatarClass",n.avatar),o(),W(" ",n.team.name," "),o(2),r("ngForOf",n.team.leaders));},dependencies:[G,be,Pe],encapsulation:2});}}return t;})();var nn=t=>({"tab-nav-active":t});function sn(t,c){t&1&&(s(0,"span"),h(1,3),a());}function on(t,c){t&1&&(s(0,"span"),h(1,4),a());}function rn(t,c){t&1&&(s(0,"span"),h(1,5),a());}function an(t,c){if(t&1){let e=E();
1s(0,"button",20),f("click",function(){let n=u(e).$implicit,_=l(3);return g(_.changeBoard(n));}),P(1,21),p(2,sn,2,0,"span",22)(3,on,2,0,"span",22)(4,rn,2,0,"span",22),x(),a();}if(t&2){let e=c.$implicit,i=l(3);r("ngClass",K(5,nn,e===i.boardType)),o(),r("ngSwitch",e),o(),r("ngSwitchCase",i.LeaderBoardTypeEnum.TEAMS),o(),r("ngSwitchCase",i.LeaderBoardTypeEnum.PARTICIPANTS),o(),r("ngSwitchCase",i.LeaderBoardTypeEnum.LEADERS);}}function ln(t,c){if(t&1&&(s(0,"div",18),p(1,an,5,7,"button",19),a()),t&2){let e=l(2);o(),r("ngForOf",e.boardTypeArray);}}function cn(t,c){if(t&1&&m(0,"app-team-card",30),t&2){let e=l().$implicit,i=l(4);r("team",e)("totalPossiblePoints",i.teamsBoardData.totalPossiblePoints);}}function _n(t,c){if(t&1&&(s(0,"div",28),p(1,cn,1,2,"app-team-card",29),a()),t&2){let e=c.$implicit;o(),r("ngIf",e.hasUsers);}}function dn(t,c){if(t&1&&(P(0),p(1,_n,2,1,"div",27),x()),t&2){let e=l(3);o(),r("ngForOf",e.teamsBoardData==null?null:e.teamsBoardData.teams);}}function pn(t,c){if(t&1&&m(0,"app-leader-card",32),t&2){let e=l().$implicit;r("team",e);}}function Sn(t,c){if(t&1&&(s(0,"div",28),p(1,pn,1,1,"app-leader-card",31),a()),t&2){let e=c.$implicit;o(),r("ngIf",e.leaders.length);}}function mn(t,c){if(t&1&&(P(0),p(1,Sn,2,1,"div",27),x()),t&2){let e=l(3);o(),r("ngForOf",e.teamsBoardData==null?null:e.teamsBoardData.teams);}}function un(t,c){if(t&1&&(s(0,"div",28),m(1,"app-participant-score-card",33),a()),t&2){let e=c.$implicit,i=l(4);o(),r("participant",e)("totalPossiblePoints",i.leaderBoardData.totalPossiblePoints)("totalGradedQuestions",i.leaderBoardData.totalGradedQuestions);}}function gn(t,c){if(t&1&&(P(0),p(1,un,2,3,"div",27),x()),t&2){let e=l(3);o(),r("ngForOf",e.leaderBoardData==null?null:e.leaderBoardData.participants);}}function fn(t,c){if(t&1&&(s(0,"div",23)(1,"div",24)(2,"div",25),p(3,dn,2,1,"ng-container",22)(4,mn,2,1,"ng-container",22)(5,gn,2,1,"ng-container",26),a()()()),t&2){let e=l(2);o(2),r("ngSwitch",e.boardType),o(),r("ngSwitchCase",e.LeaderBoardTypeEnum.TEAMS),o(),r("ngSwitchCase",e.LeaderBoardTypeEnum.LEADERS);}}function En(t,c){if(t&1&&(P(0),p(1,ln,2,1,"div",16)(2,fn,6,3,"div",17),x()),t&2){let e=l(),i=w(12);o(),r("ngIf",e.isTeamsEnabled),o(),r("ngIf",!e.isEmpty)("ngIfElse",i);}}function hn(t,c){t&1&&(s(0,"div",34),m(1,"i",35),s(2,"h1",36),h(3,6),a()());}function Cn(t,c){t&1&&(s(0,"div",34),m(1,"i",35),s(2,"h1"),h(3,7),a()());}var ti=(()=>{class t{constructor(e){this.learnerSessionService=e,this.closePanelAction=new A(),this.subscription=new F(),this.isAvailable=!1,this.isEmpty=!1,this.isTeamsEnabled=!1,this.boardType=$.PARTICIPANTS,this.LeaderBoardTypeEnum=$,this.boardTypeArray=[$.TEAMS,$.PARTICIPANTS,$.LEADERS];}ngOnInit(){this.leaderBoardData=this.learnerSessionService.getLeaderBoardData(),this.teamsBoardData=this.learnerSessionService.getTeamBoardData(),this.subscription.add(this.learnerSessionService.getSessionState().subscribe(e=>{let i=this.learnerSessionService.currentQuestion;e===d.PRESENTATION_POLLING&&i.type!==N.INFO_SLIDE?this.isAvailable=!1:this.isAvailable=!0;})),this.subscription.add(this.learnerSessionService.watchLeaderBoardData().subscribe(()=>{this.leaderBoardData=this.learnerSessionService.getLeaderBoardData(),this.teamsBoardData=this.learnerSessionService.getTeamBoardData(),this.checkEmptyBoard();})),this.subscription.add(this.learnerSessionService.watchTeam().subscribe(e=>{this.isTeamsEnabled=!!e,this.isTeamsEnabled?this.boardType=$.TEAMS:this.boardType=$.PARTICIPANTS,this.checkEmptyBoard();}));}ngOnDestroy(){this.subscription.unsubscribe();}checkEmptyBoard(){let e=!1;this.isTeamsEnabled&&(e=this.teamsBoardData?.teams?.reduce((i,n)=>i||n&&!!n.leaders?.length,!1)),!this.leaderBoardData||this.boardType===$.PARTICIPANTS&&!this.leaderBoardData?.totalGradedQuestions||this.boardType===$.TEAMS&&!this.teamsBoardData?.totalPossiblePoints||this.boardType===$.LEADERS&&!this.teamsBoardData?.totalPossiblePoints||this.boardType===$.LEADERS&&!e?this.isEmpty=!0:this.isEmpty=!1;}changeBoard(e){this.boardType=e,this.checkEmptyBoard();}static{this.ɵfac=function(i){return new(i||t)(S(k));};}static{this.ɵcmp=v({type:t,selectors:[["app-leaderboard-drawer"]],outputs:{closePanelAction:"closePanelAction"},standalone:!1,decls:13,vars:2,consts:()=>{let e;e="Close";let i;i="Leaderboard";let n;n="Team Ranking";let _;_="Participants";let O;O="Team Leaders";let C;C="Unavailable while polling";let T;return T="No scores",[["notAvailable",""],["emptyBoard",""],i,n,_,O,C,T,[1,"w-100","h-100"],[1,"d-flex","flex-column","h-100","overflow-hidden","bg-white"],[1,"encapsulated-drawer-header","border-bottom","border-light","py-2","bg-white","position-sticky","w-100","d-flex","align-items-center"],["aria-label",e,1,"e360-btn","white","large",3,"click"],["aria-hidden","true",1,"far","fa-times","encapsulated-closeFontSize"],[1,"py-2"],[1,"h-100","overflow-auto","d-flex","flex-column"],[4,"ngIf","ngIfElse"],["class","d-flex justify-content-center",4,"ngIf"],["class","h-100",4,"ngIf","ngIfElse"],[1,"d-flex","justify-content-center"],["type","button","class","btn btn-flat tab-nav",3,"ngClass","click",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-flat","tab-nav",3,"click","ngClass"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"h-100"],[1,"mt-3","mx-2"],[1,"h-100",3,"ngSwitch"],[4,"ngSwitchDefault"],["class","w-100",4,"ngFor","ngForOf"],[1,"w-100"],[3,"team","totalPossiblePoints",4,"ngIf"],[3,"team","totalPossiblePoints"],[3,"team",4,"ngIf"],[3,"team"],[3,"participant","totalPossiblePoints","totalGradedQuestions"],[1,"d-flex","flex-fill","flex-column","align-items-center","justify-content-center","w-100"],["aria-hidden","true",1,"far","fa-ranking-star","encapsulated-iconFontSize","text-info","mb-3"],[1,"text-center"]];},template:function(i,n){if(i&1){let _=E();s(0,"div",8)(1,"div",9)(2,"div",10)(3,"button",11),f("click",function(){return u(_),g(n.closePanelAction.emit());}),m(4,"i",12),a(),s(5,"span",13),h(6,2),a()(),s(7,"div",14),p(8,En,3,3,"ng-container",15),a()()(),p(9,hn,4,0,"ng-template",null,0,D)(11,Cn,4,0,"ng-template",null,1,D);}if(i&2){let _=w(10);o(8),r("ngIf",n.isAvailable)("ngIfElse",_);}},dependencies:[G,be,M,le,ce,_e,Zt,Kt,ei],styles:[".encapsulated-closeFontSize[_ngcontent-%COMP%]{font-size:1.25rem}.encapsulated-drawer-header[_ngcontent-%COMP%]{font-size:18px;font-weight:600;height:56px;padding-left:12px;top:0;z-index:1}.encapsulated-iconFontSize[_ngcontent-%COMP%]{font-size:5rem}.tab-nav[_ngcontent-%COMP%]{padding:1rem .5rem;border-top:0;border-left:0;border-right:0;border-bottom:2px solid var(--dark-light);border-radius:0}.tab-nav[_ngcontent-%COMP%]:hover, .tab-nav[_ngcontent-%COMP%]:focus{border-bottom:2px solid var(--secondary);box-shadow:inset 0 0 0 .15rem var(--secondary)!important}.tab-nav-active[_ngcontent-%COMP%]{border-bottom:2px solid var(--primary)}.tab-nav-active[_ngcontent-%COMP%]:hover, .tab-nav-active[_ngcontent-%COMP%]:focus{border-bottom:2px solid var(--primary-dark)}"]});}}return t;})();var On=["endBodyRef"],Tn=["requireAuthenticationModal"],vn=t=>({"encapsulated-lobby-hidden":t}),Nn=(t,c)=>({"encapsulated-margin":t,"encapsulated-HotspotCanvasMobile":c});function In(t,c){if(t&1&&m(0,"app-status-updater",29),t&2){let e=l(2);r("drawerState",e.drawerState);}}function Rn(t,c){if(t&1){let e=E();s(0,"tt-messages-drawer",33),f("submitMessage",function(n){u(e);let _=l(3);return g(_.submitChat(n));})("closePanelAction",function(){u(e);let n=l(3);return g(n.closeDrawer());}),a();}if(t&2){let e=l(3);r("messages",e.messages)("hasCloseButton",!0)("user",e.user);}}function Pn(t,c){if(t&1){let e=E();s(0,"app-leaderboard-drawer",34),f("closePanelAction",function(){u(e);let n=l(3);return g(n.closeDrawer());}),a();}}function xn(t,c){if(t&1&&(s(0,"div",30),P(1,22),p(2,Rn,1,3,"tt-messages-drawer",31)(3,Pn,1,0,"app-leaderboard-drawer",32),x(),a()),t&2){let e=l(2);o(),r("ngSwitch",e.drawerSelected),o(),r("ngSwitchCase",e.drawerState.SHOWING_MESSAGES),o(),r("ngSwitchCase",e.drawerState.SHOWING_LEADERBOARD);}}function Mn(t,c){if(t&1){let e=E();s(0,"tt-messages-drawer",33),f("submitMessage",function(n){u(e);let _=l(3);return g(_.submitChat(n));})("closePanelAction",function(){u(e);let n=l(3);return g(n.closeDrawer());}),a();}if(t&2){let e=l(3);r("messages",e.messages)("hasCloseButton",!0)("user",e.user);}}function An(t,c){if(t&1){let e=E();s(0,"app-leaderboard-drawer",34),f("closePanelAction",function(){u(e);let n=l(3);return g(n.closeDrawer());}),a();}}function wn(t,c){if(t&1&&(s(0,"div",35),P(1,22),p(2,Mn,1,3,"tt-messages-drawer",31)(3,An,1,0,"app-leaderboard-drawer",32),x(),a()),t&2){let e=l(2);o(),r("ngSwitch",e.drawerSelected),o(),r("ngSwitchCase",e.drawerState.SHOWING_MESSAGES),o(),r("ngSwitchCase",e.drawerState.SHOWING_LEADERBOARD);}}function yn(t,c){if(t&1){let e=E();s(0,"app-polling-header",38),f("resultsToggleChange",function(n){u(e);let _=l(3);return g(_.resultsToggleChange(n));}),a();}if(t&2){let e=l(3);r("slide",e.slide)("sessionState",e.sessionState)("resultsToggle",e.resultsToggle);}}function Dn(t,c){if(t&1&&(s(0,"section",36),p(1,yn,1,3,"app-polling-header",37),a()),t&2){let e=l(2);o(),r("ngIf",!e.embedded);}}function Ln(t,c){t&1&&z(0);}function $n(t,c){if(t&1){let e=E();s(0,"div",39)(1,"app-start-lobby-page",40),f("exitSessionEmitter",function(){u(e);let n=l(2);return g(n.leaveSession());})("openMessagesDrawerEmitter",function(){u(e);let n=l(2);return g(n.toggleMessagesDrawer());}),p(2,Ln,1,0,"ng-container",41),a()();}if(t&2){let e=l(2),i=w(3);r("ngClass",K(3,vn,e.sessionState!==e.sessionStateEnum.WAITING)),o(),r("courseClass",e.class),o(),r("ngTemplateOutlet",i);}}function Fn(t,c){t&1&&z(0);}function Gn(t,c){t&1&&(P(0),s(1,"div",42),m(2,"tt-progress-indicator"),a(),x());}function Bn(t,c){t&1&&(P(0),s(1,"div",43),h(2,4),a(),x());}function kn(t,c){t&1&&z(0);}function Un(t,c){if(t&1&&(s(0,"app-polling-closed"),p(1,kn,1,0,"ng-container",41),a()),t&2){l(2);let e=w(3);o(),r("ngTemplateOutlet",e);}}function jn(t,c){t&1&&(s(0,"div",42),m(1,"tt-progress-indicator"),a());}function zn(t,c){t&1&&z(0);}function Vn(t,c){if(t&1){let e=E();s(0,"tt-item-renderer-wrapper",46),f("receivedMessage",function(n){u(e);let _=l(3);return g(_.messageReceived(n));})("errorEvent",function(n){u(e);let _=l(3);return g(_.errorEvent(n));}),a();}if(t&2){let e=l(3);r("ngClass",Je(4,Nn,e.isMobile,e.isMobile&&!e.embedded))("disableResponse",e.disableResponse)("currentMessage",e.currentMessage)("supportZoom",!1);}}function Hn(t,c){if(t&1&&(s(0,"main",44),p(1,zn,1,0,"ng-container",41)(2,Vn,1,7,"tt-item-renderer-wrapper",45),a()),t&2){let e=l(2),i=w(3);Qe(Ye("max-height: ",e.sessionBodyHeight)),o(),r("ngTemplateOutlet",i),o(),r("ngIf",e.sessionState!==e.sessionStateEnum.WAITING);}}function Wn(t,c){if(t&1){let e=E();s(0,"section",47)(1,"app-session-footer",48),f("resultsToggleChange",function(n){u(e);let _=l(2);return g(_.resultsToggleChange(n));})("leaveSessionEvent",function(){u(e);let n=l(2);return g(n.leaveSession());}),a()();}if(t&2){let e=l(2);Z("encapsulated-footerMobile",e.isMobile&&!e.embedded),o(),r("slide",e.slide)("sessionState",e.sessionState)("resultsToggle",e.resultsToggle)("isInIntegration",e.isInIntegration);}}function Xn(t,c){if(t&1){let e=E();s(0,"div",11),p(1,In,1,1,"app-status-updater",12)(2,xn,4,3,"div",13),s(3,"div",14),p(4,wn,4,3,"div",15),s(5,"div",16),p(6,Dn,2,1,"section",17),s(7,"div",18)(8,"div",19)(9,"div",20),p(10,$n,3,5,"div",21),P(11,22),p(12,Fn,1,0,"ng-container",23)(13,Gn,3,0,"ng-container",23)(14,Bn,3,0,"ng-container",23)(15,Un,2,1,"app-polling-closed",23)(16,jn,2,0,"div",24)(17,Hn,3,5,"main",25),x(),a()()(),p(18,Wn,2,6,"section",26),a(),s(19,"section",27)(20,"app-session-control-footer",28),f("leaveSessionEvent",function(){u(e);let n=l();return g(n.leaveSession());}),a()()()();}if(t&2){let e=l();o(),r("ngIf",e.isConnected()),o(),r("ngIf",!e.isMobile&&e.isDrawerOpen),o(2),r("ngIf",e.isMobile&&e.isDrawerOpen),o(),Ae(!e.isDrawerOpen||!e.isMobile?"d-flex":"d-none"),o(),r("ngIf",e.hideL
1obby),o(4),r("ngIf",!e.hideLobby),o(),r("ngSwitch",e.sessionState),o(),r("ngSwitchCase",e.sessionStateEnum.WAITING),o(),r("ngSwitchCase",e.sessionStateEnum.RECOVERING),o(),r("ngSwitchCase",e.sessionStateEnum.REJECTED),o(),r("ngSwitchCase",e.sessionStateEnum.POLLING_CLOSED),o(),r("ngSwitchCase",e.sessionStateEnum.LOADING),o(2),r("ngIf",e.isStarted()&&e.hideLobby&&e.showSessionFooter()),o(),Ae(e.isMobile&&!e.embedded&&!e.isDrawerOpen&&e.hideLobby?"d-flex":"d-none"),o(),r("isInIntegration",e.isInIntegration);}}function Qn(t,c){if(t&1){let e=E();s(0,"div",51),V(1,5),s(2,"button",52),f("click",function(){u(e);let n=l(2);return g(n.joinClass());}),a(),H(),a();}}function Yn(t,c){t&1&&(s(0,"div",53),h(1,6),a());}function Jn(t,c){if(t&1&&p(0,Qn,3,0,"div",49)(1,Yn,2,0,"div",50),t&2){let e=l();r("ngIf",e.showDisconnected&&!e.showReconnecting),o(),r("ngIf",e.showDisconnected&&e.showReconnecting);}}function qn(t,c){if(t&1){let e=E();s(0,"app-start-lobby-page",54),f("exitSessionEmitter",function(){u(e);let n=l();return g(n.leaveSession());})("openMessagesDrawerEmitter",function(){u(e);let n=l();return g(n.toggleMessagesDrawer());})("joinSessionEmitter",function(){u(e);let n=l();return g(n.continue());}),a();}if(t&2){let e=l();r("courseClass",e.class)("classNotAvailableError",e.classNotAvailableError);}}function Zn(t,c){t&1&&(s(0,"div",55),m(1,"tt-stacked-icon",56),s(2,"div",57),h(3,7),a()());}function Kn(t,c){t&1&&(s(0,"div",58)(1,"div"),h(2,8),a()());}var Ue=(()=>{class t{constructor(e,i,n,_,O,C,T,y,ge,j,ii,ni,si,oi){this.toastService=e,this.drawerUtilityService=i,this.ngbModal=n,this.router=_,this.route=O,this.learnerSessionService=C,this.classApiService=T,this.profileStorageService=y,this.resizeUtilityService=ge,this.initializationService=j,this.environment=ii,this.integrationsUtilityService=ni,this.loginService=si,this.pendoService=oi,this.isLoading=!0,this.currentMessage=new ze(null),this.slideTypeEnum=se,this.canLeaveSession=!1,this.drawerState=I,this.classStateType=Be,this.slidePosition=1,this.disableResponse=!1,this.sessionState=d.NOT_CONNECTED,this.sessionStateEnum=d,this.resultsToggle=U.CLASS_RESULTS,this.showReconnecting=!1,this.showDisconnected=!1,this.hideMedia=!1,this.hideLobby=!0,this.joinSubscriptions=new F(),this.authenticateRedirectTimer=null,this.isInIntegration=!1,this.sessionBodyHeight="1024px";}ngOnInit(){$e.overrideUnauthenticatedAction=()=>{this.profileStorageService.makeGuest(),this.isLoading&&this.continue();},this.initializationService.init().then(()=>{this.pendoService.addBlocker(this);}).catch(()=>{this.pendoService.addBlocker(this);}),this.courseId=this.route.snapshot.paramMap.get("courseId"),this.classId=this.route.snapshot.paramMap.get("classId"),this.embedded=this.route.snapshot.url.length>0&&this.route.snapshot.url[0].toString()==="embed",this.router.url.split("/").includes("zoom")?this.integrationsUtilityService.setIntegration(Fe.ZOOM):this.router.url.split("/").includes("teams")&&this.integrationsUtilityService.setIntegration(Fe.TEAMS),this.isInIntegration=this.integrationsUtilityService.isInIntegration(),this.drawerUtilityService.getDrawerSelectedSubject().subscribe(e=>{this.drawerSelected=e,this.isDrawerOpen=e!==I.DRAWER_HIDDEN;}),this.profileStorageService.watchProfile().subscribe(this.setUser.bind(this)),this.setUser(this.profileStorageService.getProfile()),this.resizeUtilityService.getResizeObservable().subscribe(()=>{this.calcSessionBodyHeight();}),this.resizeUtilityService.getIsMobileObservable().subscribe(e=>{this.isMobile=e,this.calcSessionBodyHeight();});}calcSessionBodyHeight(){let e=window.innerHeight-112;this.isStarted()&&this.hideLobby&&this.showSessionFooter()&&this.isMobile&&!this.embedded&&(e-=56),this.sessionBodyHeight=`${e}px`;}continue(){this.isLoading=!1,this.classNotAvailableError=null,this.classApiService.getClassFromUnauthenticated(this.classId).subscribe(e=>{if(this.class=e,this.learnerSessionService.setShowLeaderboard(e.showLeaderboard),this.class.id=this.classId,e.requireParticipantLogin&&this.profileStorageService.isGuest())this.isInIntegration?this.loginService.getToken().subscribe(i=>{if(i)switch(this.class.state){case ne.IN_PROGRESS:this.joinClass();break;case ne.READY:this.classNotAvailableError=B.CLASS_NOT_STARTED,this.sessionState=d.NOT_CONNECTED;break;default:this.navigateEndLobby();break;}}):(this.ngbModal.open(this.requireAuthenticationModal,{backdrop:"static",keyboard:!1,centered:!0}).result.then(()=>{},()=>{this.authenticateRedirectTimer&&(this.authenticateRedirectTimer.unsubscribe(),this.authenticateRedirectTimer=null);}),this.authenticateRedirectTimer=Ve(5e3).subscribe(()=>{this.authenticateRedirectTimer.unsubscribe(),this.authenticateRedirectTimer=null,window.open(`${this.environment.accountUrl}/authenticate?callback=${this.environment.participantClient}/session/course/${this.courseId}/class/${this.classId}`,"_self");}));else switch(this.class.state){case ne.IN_PROGRESS:this.joinClass();break;case ne.READY:this.classNotAvailableError=B.CLASS_NOT_STARTED,this.sessionState=d.NOT_CONNECTED;break;default:this.navigateEndLobby();break;}},()=>{this.classNotAvailableError=B.ITEM_UNKNOWN,this.sessionState=d.REJECTED;});}
1ngOnDestroy(){$e.overrideUnauthenticatedAction=null,this.joinSubscribe?.unsubscribe();}killJoinSubscriptions(){this.joinSubscribe?.unsubscribe(),this.joinSubscribe=null,this.joinSubscriptions?.unsubscribe();}canLeave(){return this.canLeaveSession;}closeDrawer(){this.drawerUtilityService.openDrawer(I.DRAWER_HIDDEN);}toggleMessagesDrawer(){this.isDrawerOpen?this.drawerUtilityService.openDrawer(I.DRAWER_HIDDEN):this.drawerUtilityService.openDrawer(I.SHOWING_MESSAGES);}setUser(e){if(this.profileStorageService.isGuest())this.user=this.profileStorageService.getGuestDetails();else{if(!e)return;this.user=new at(),this.user.userId=e.id,this.user.firstName=e.firstName,this.user.lastName=e.lastName,this.user.email=e.email;}this.isLoading&&this.continue();}joinClass(){this.showDisconnected&&(this.showReconnecting=!0),this.reconnectToast&&(this.toastService.removeById(this.reconnectToast),this.reconnectToast=null),this.joinSubscribe?.unsubscribe(),this.joinSubscribe=this.learnerSessionService.joinSession(this.classId,this.embedded).subscribe(()=>{this.joinSubscribe&&(this.joinSubscribe?.unsubscribe(),this.joinSubscribe=null,this.setUser(this.profileStorageService.getProfile()),this.messages=this.learnerSessionService.messages,this.joinSubscriptions.add(this.learnerSessionService.getSessionState().subscribe(e=>{this.handleSessionState(e),this.slideCount=this.learnerSessionService.slideCount;})),this.joinSubscriptions.add(this.learnerSessionService.watchPresenter().subscribe(e=>{this.presenter=e;})),this.joinSubscriptions.add(this.learnerSessionService.getSubmitState().subscribe(e=>{this.disableResponse=e.hasResponse&&this.slide.firstResponseOnly;})),this.joinSubscriptions.add(this.learnerSessionService.getHideMedia().subscribe(e=>{this.hideMedia=e,this.sessionState===this.sessionStateEnum.PRESENTATION_POLLING?this.handlePresentQuestionMessage():this.handleReviewMessage();})));},()=>{this.killJoinSubscriptions(),this.showReconnecting||(this.classNotAvailableError=B.CLASS_NOT_STARTED,this.sessionState=d.NOT_CONNECTED);});}reconnectFailed(){this.showDisconnected=!0,this.showReconnecting=!1,this.reconnectToast&&(this.toastService.removeById(this.reconnectToast),this.reconnectToast=null),this.reconnectToast=this.toastService.showDanger("Reconnect failed");}messageReceived(e){this.sessionState===d.PRESENTATION_POLLING&&(e.responses?(this.learnerSessionService.setResponse(e.responses),this.slide.type!==N.SHORT_ANSWER&&this.slide.type!==N.NUMERIC&&this.slide.type!==N.WORD_CLOUD&&(this.learnerSessionService.submitResponse(),this.slide.firstResponseOnly&&(this.disableResponse=!0))):e.pointResponses&&(this.learnerSessionService.setPointResponse(e.pointResponses[0]),this.learnerSessionService.submitResponse()));}errorEvent(e){this.toastService.showDanger(JSON.stringify(e.data));}handleSessionState(e){switch(e){case d.RECONNECTING:this.showReconnecting=!0,this.showDisconnected=!0;return;case d.DISCONNECTED:this.showDisconnected=!0,this.showReconnecting=!1;return;case d.CONNECTED:this.showDisconnected=!1,this.showReconnecting=!1;return;case d.LEAVING:this.navigateAway();return;case d.WAITING:this.hideLobby=!1,this.startTime=this.learnerSessionService.getDetails()?.dateCreated;break;case d.POLLING_CLOSED:break;case d.PRESENTATION_POLLING:this.handlePresentQuestionMessage();break;case d.REVIEW:this.handleReviewMessage();break;case d.CLOSED:case d.CLOSING:this.showReconnecting=!1,this.profileStorageService.setGuestDetails(null),this.navigateEndLobby();break;case d.NOT_OPEN:this.classNotAvailableError=B.CLASS_NOT_STARTED;break;case d.REJECTED_IN_SESSION:this.classNotAvailableError=B.LEARNER_IN_SESSION;break;case d.REJECTED_NOT_IN_ROSTER:this.classNotAvailableError=B.LEARNER_NOT_IN_ROSTER;break;case d.REJECTED_NOT_IN_ORG:this.classNotAvailableError=B.LEARNER_NOT_IN_ORG;break;case d.REJECTED_NOT_LICENSED:case d.LEARNER_LICENSE_REQUIRED:this.classNotAvailableError=B.LEARNER_NO_LICENSE;break;case d.SESSION_FULL:this.classNotAvailableError=B.SESSION_FULL;break;case d.JOIN_PROMPT:if(this.canLeaveSession=!0,this.integrationsUtilityService.isInIntegration()){let i=this.integrationsUtilityService.getIntegration();this.router.navigate([`/${i.toLowerCase()}/session/course/${this.courseId}/class/${this.classId}/joining`]).catch(()=>{});}else this.router.navigate([`/session/course/${this.courseId}/class/${this.classId}/joining`]).catch(()=>{});break;case d.REJECTED:if(this.showReconnecting=!1,!this.showReconnecting&&!this.showDisconnected)this.classNotAvailableError=B.ITEM_UNKNOWN;else{this.reconnectFailed();return;}break;default:this.showReconnecting=!1;break;}e!==this.sessionStateEnum.WAITING&&e!==this.sessionStateEnum.RECOVERING&&setTimeout(()=>{this.hideLobby=!0;},1e3),this.sessionState=e,this.calcSessionBodyHeight();}handlePresentQuestionMessage(){let e=this.getQuestion(!1);if(!e)return;let i=new De();i.mode=ve.INTERACTIVE,i.items=[e],i.suspendData=new ye(),i.suspendData.suspendItems={};let n=!1;if(e.datatype===se.HOT_SPOT&&this.learnerSessionService.pointResponse)n=!!this.learnerSessionService.pointResponse,i.suspendData.suspendItems[e.id]={origin:0,responses:null,pointResponses:[this.learnerSessionService.pointResponse],graded:null};else{let{response:O}=this.learnerSessionService;if(O)n=!0;else switch(e.datatype){case se.SHORT_ANSWER:case se.NUMERIC:case se.WORD_CLOUD:O=[""];break;default:break;}i.suspendData.suspendItems[e.id]={origin:0,responses:O,pointResponses:null,graded:null};}this.disableResponse=this.slide.firstResponseOnly&&n,i.hideQuestionMedia=this.hideMedia;let{polledDate:_}=this.learnerSessionService.currentQuestion;this.startTime=_?new Date(_):new Date(),this.currentMessage.next(i);}getQuestion(e){if(this.slide=this.learnerSessionService.currentQuestion,!this.slide)return null;this.slidePosition=this.slide.slideIndex;let i=ot.toContentSlide(this.slide);return e&&this.populateResults(i),i;}populateResults(e){let i=new st(),{chartData:n,chartDisplayType:_,showCorrectAnswer:O}=this.learnerSessionService;if(n&&(i.displayType=_,i.showPercentage=n[0].percent!==void 0),i.data=new Array(),n?.forEach(C=>{let T=new nt();T.response=C.label,T.percent=C.percent,T.count=C.count,T.isCorrect=O?C.isCorrect:null,T.isCorrect===void 0&&(T.isCorrect=!1),i.data.push(T);}),!this.learnerSessionService.showCorrectAnswer){let C=e;C.correct=null,C.shapes=[];}we.addResults(e,i);}handleReviewMessage(){let e=this.getQuestion(!!this.learnerSessionService.chartData);if(!e)return;let i=new De();if(i.suspendData=new ye(),i.suspendData.suspendItems={},this.resultsToggle===U.CLASS_RESULTS)i.mode=ve.CLASS_RESULTS,this.populateResults(e);else{i.mode=ve.LEARNER_RESULT;let n=e;n.correct=null,n.shapes=[],we.addResults(e,null);}e.datatype===se.HOT_SPOT?this.resultsToggle===U.CLASS_RESULTS?i.suspendData.suspendItems[e.id]={origin:0,responses:null,pointResponses:this.learnerSessionService.reviewPointResponses,graded:null}:i.suspendData.suspendItems[e.id]={origin:0,responses:null,pointResponses:[this.learnerSessionService.pointResponse],graded:null}:i.suspendData.suspendItems[e.id]={origin:0,responses:this.learnerSessionService.response,pointResponses:null,graded:null},i.hideQuestionMedia=this.hideMedia,e&&(i.items=[e],this.currentMessage.next(i));}leaveSession(){if(this.isConnected()){let e=this.ngbModal.open(ft,{size:"md"}),i=e.componentInstance;i.header="Exit Session",i.body=this.endBodyRef,i.mainAction="Exit",e.result.then(()=>{this.learnerSessionService.leaveSession();}).catch(()=>{});}else this.navigateAway();}navigateEndLobby(){this.canLeaveSession=!0,this.router.navigate(["ended"],{relativeTo:this.route}).catch(()=>{});}navigateAway(){this.canLeaveSession=!0,this.integrationsUtilityService.isInIntegration()?this.router.navigate([`/${this.integrationsUtilityService.getIntegration().toLowerCase()}`]).catch(()=>{}):this.profileStorageService.isGuest()?this.router.navigate(["/join"]).catch(()=>{}):this.router.navigate(["/"]).catch(()=>{});}isStarted(){switch(this.sessionState){case d.REJECTED:case d.RECOVERING:case d.JOINING:case d.DISCONNECTED:case d.NOT_CONNECTED:case d.CLOSED:case d.WAITING:case d.JOIN_PROMPT:return!1;default:return!0;}}isConnected(){switch(this.sessionState){case d.NOT_CONNECTED:case d.CLOSED:case d.REJECTED:case d.REJECTED_NOT_LICENSED:case d.REJECTED_NOT_IN_ORG:case d.REJECTED_NOT_IN_ROSTER:case d.REJECTED_IN_SESSION:case d.NOT_OPEN:case d.SESSION_FULL:case d.LEARNER_LICENSE_REQUIRED:case d.JOIN_PROMPT:return!1;default:return!0;}}resultsToggleChange(e){this.resultsToggle=e,this.handleReviewMessage();}submitChat(e){this.learnerSessionService.submitChat(e);}disconnect(){this.learnerSessionService.disconnect();}showSessionFooter(){return!(this.sessionState===d.WAITING||this.isMobile&&this.slide?.type===N.INFO_SLIDE&&this.sessionState===d.PRESENTATION_POLLING);}static{this.ɵfac=function(i){return new(i||t)(S(gt),S(ie),S(tt),S(Ie),S(Ne),S(k),S(Me),S(Re),S(X),S(mt),S(pe),S(Se),S(kt),S(dt));};}static{this.ɵcmp=v({type:t,selectors:[["app-session"]],viewQuery:function(i,n){if(i&1&&(Y(On,7),Y(Tn,7)),i&2){let _;J(_=q())&&(n.endBodyRef=_.first),J(_=q())&&(n.requireAuthenticationModal=_.first);}},standalone:!1,decls:10,vars:3,consts:()=>{let e;e="Session Header";let i;i="Session Content";let n;n="Session Footer";let _;_="Session Footer";let O;
1O=" Unable to recover session. ";let C;C=" This device has lost connection with the server. Please verify your connection and then "+"\uFFFD#2\uFFFD"+"reconnect."+"\uFFFD/#2\uFFFD"+"";let T;T=" Reconnecting... ";let y;y=" Are you sure you want to exit this session? ";let ge;return ge=" You are required to sign in through your Echo360 account. You will be redirected in just a moment. ",[["showDisconnectTemplate",""],["classUnavailable",""],["endBodyRef",""],["requireAuthenticationModal",""],O,C,T,y,ge,[3,"navigateToCourse"],["class","d-flex h-100",4,"ngIf","ngIfElse"],[1,"d-flex","h-100"],[3,"drawerState",4,"ngIf"],["class","encapsulated-drawer border-right",4,"ngIf"],[1,"d-flex","flex-fill","flex-column","overflow-hidden"],["class","w-100 flex-fill overflow-hidden",4,"ngIf"],[1,"flex-fill","flex-column"],["class","encapsulated-header position-sticky","aria-label",e,4,"ngIf"],["id","session-body",1,"d-flex","flex-grow-1","overflow-hidden"],[1,"w-100"],["body","",1,"h-100","w-100"],["class","position-relative w-100 h-100 encapsulated-lobby",3,"ngClass",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","h-100 d-flex align-items-center justify-content-center",4,"ngSwitchCase"],["class","w-100 encapsulated-overflow h-100","aria-label",i,"tabindex","0",3,"style",4,"ngSwitchDefault"],["class","encapsulated-footer position-sticky bg-white","aria-label",n,3,"encapsulated-footerMobile",4,"ngIf"],["aria-label",_,1,"encapsulated-footer","position-sticky"],[1,"w-100",3,"leaveSessionEvent","isInIntegration"],[3,"drawerState"],[1,"encapsulated-drawer","border-right"],[3,"messages","hasCloseButton","user","submitMessage","closePanelAction",4,"ngSwitchCase"],[3,"closePanelAction",4,"ngSwitchCase"],[3,"submitMessage","closePanelAction","messages","hasCloseButton","user"],[3,"closePanelAction"],[1,"w-100","flex-fill","overflow-hidden"],["aria-label",e,1,"encapsulated-header","position-sticky"],[3,"slide","sessionState","resultsToggle","resultsToggleChange",4,"ngIf"],[3,"resultsToggleChange","slide","sessionState","resultsToggle"],[1,"position-relative","w-100","h-100","encapsulated-lobby",3,"ngClass"],[1,"w-100",3,"exitSessionEmitter","openMessagesDrawerEmitter","courseClass"],[4,"ngTemplateOutlet"],[1,"h-100","d-flex","align-items-center","justify-content-center"],[1,"m-3","alert","alert-danger-light","text-dark","shadow-sm","text-center"],["aria-label",i,"tabindex","0",1,"w-100","encapsulated-overflow","h-100"],["class","d-flex flex-grow-1 encapsulated-HotspotCanvas encapsulated-margin",3,"ngClass","disableResponse","currentMessage","supportZoom","receivedMessage","errorEvent",4,"ngIf"],[1,"d-flex","flex-grow-1","encapsulated-HotspotCanvas","encapsulated-margin",3,"receivedMessage","errorEvent","ngClass","disableResponse","currentMessage","supportZoom"],["aria-label",n,1,"encapsulated-footer","position-sticky","bg-white"],[1,"w-100","p-2","flex-grow-0","d-flex","align-items-center","justify-content-between","encapsulated-height",3,"resultsToggleChange","leaveSessionEvent","slide","sessionState","resultsToggle","isInIntegration"],["class","alert alert-danger-light text-dark shadow-sm m-2 text-center",4,"ngIf"],["class","alert alert-secondary text-dark shadow-sm m-2 text-center",4,"ngIf"],[1,"alert","alert-danger-light","text-dark","shadow-sm","m-2","text-center"],[1,"btn","p-0","btn-link","encapsulated-alignment",3,"click"],[1,"alert","alert-secondary","text-dark","shadow-sm","m-2","text-center"],[1,"w-100",3,"exitSessionEmitter","openMessagesDrawerEmitter","joinSessionEmitter","courseClass","classNotAvailableError"],[1,"text-center","pt-2"],["icon","person-to-door"],[1,"pt-4"],[1,"modal-body"]];},template:function(i,n){if(i&1&&(m(0,"app-attendance-notification",9),p(1,Xn,21,17,"div",10)(2,Jn,2,2,"ng-template",null,0,D)(4,qn,1,2,"ng-template",null,1,D)(6,Zn,4,0,"ng-template",null,2,D)(8,Kn,3,0,"ng-template",null,3,D)),i&2){let _=w(5);r("navigateToCourse",!1),o(),r("ngIf",!n.classNotAvailableError)("ngIfElse",_);}},dependencies:[G,M,Oe,le,ce,_e,Rt,Dt,Et,ct,Ut,wt,Wt,Xt,Qt,Yt,qt,ti],styles:[".encapsulated-header[_ngcontent-%COMP%]{top:0;z-index:10}.encapsulated-footer[_ngcontent-%COMP%]{bottom:0;z-index:3;border-top:1px solid var(--dark-light);margin-bottom:0;width:100%!important}.encapsulated-footerMobile[_ngcontent-%COMP%]{bottom:56px;z-index:2;width:100%!important}.encapsulated-mobileSidebar[_ngcontent-%COMP%]{bottom:0}.encapsulated-fontSize[_ngcontent-%COMP%]{font-size:1rem}.encapsulated-height[_ngcontent-%COMP%]{height:56px}.encapsulated-drawer[_ngcontent-%COMP%]{width:375px;z-index:4}.encapsulated-drawerMobile[_ngcontent-%COMP%]{top:0;left:0;z-index:4}.encapsulated-alignment[_ngcontent-%COMP%]{vertical-align:initial}.encapsulated-overflow[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}.encapsulated-lobby[_ngcontent-%COMP%]{z-index:3;
1opacity:1;height:100%}.encapsulated-lobby-hidden[_ngcontent-%COMP%]{opacity:0;height:0;transition:height 0s 1s,opacity 1s linear}.encapsulated-HotspotCanvasMobile[_ngcontent-%COMP%]{min-height:300px!important;flex-grow:1;flex-basis:0}.encapsulated-HotspotCanvas[_ngcontent-%COMP%]{min-height:300px!important;max-width:90%;margin:auto;height:100%!important}@media only screen and (orientation: landscape) and (max-height: 500px){.encapsulated-HotspotCanvasMobile[_ngcontent-%COMP%]{min-height:450px!important;padding-bottom:115px}}"]});}}return t;})();var es=[{path:"ended",component:Bt,data:{title:"Session: Ended"}},{path:"joining",component:Ht,data:{title:"Session: Joining"}},{path:"embed",component:Ue,canDeactivate:[Ge],data:{title:"Session: Embed"}},{path:"",component:Ue,canDeactivate:[Ge],data:{title:"Session"}}],je=(()=>{class t{static{this.ɵfac=function(i){return new(i||t)();};}static{this.ɵmod=he({type:t});}static{this.ɵinj=fe({imports:[Le.forChild(es),Le]});}}return t;})();var sr=(()=>{class t{static{this.ɵfac=function(i){return new(i||t)();};}static{this.ɵmod=he({type:t});}static{this.ɵinj=fe({imports:[Ke,je,pt,St,it,Pt,Mt,Ot,ut,et,Lt,ht,xt,Gt,At,_t,bt,vt,zt,yt,je]});}}return t;})();export{sr as SessionModule};/**i18n:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855*/
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.