1import{a as Ft,b as Mt}from"./chunk-3ZCKBFRL.js";import{a as Pt}from"./chunk-SDQ3XCJM.js";import{a as Te}from"./chunk-3VRI44AQ.js";import{a as Dt}from"./chunk-YSOOJI3S.js";import{c as yt}from"./chunk-ZUJKHSSQ.js";import"./chunk-G6AJAHLN.js";import{c as It,d as Rt}from"./chunk-6Y5W33MO.js";import{b as wt}from"./chunk-YQAXVBHR.js";import{a as xt,b as At,c as bt}from"./chunk-X6CHRR3T.js";import{f as ue,p as Tt,wa as Ot}from"./chunk-WYBDS4UK.js";import{C as Et,D as ne,E as ie,F as oe,G as re,M as gt,N as Ne,O as ut,p as he,q as ft,w as Se,x as mt}from"./chunk-3YWAM4HK.js";import"./chunk-XA5IESIA.js";import{E as Nt,m as ht,u as St}from"./chunk-QZHW5BOK.js";import"./chunk-ZUE3IRRM.js";import{a as te,b as vt}from"./chunk-E4COIOVI.js";import{f as U}from"./chunk-WZVNHV4F.js";import{$b as nt,$c as lt,E as qe,G as Ke,Hb as G,K as Ze,L as Je,M as Qe,Oc as at,Uc as st,Vb as et,Xb as tt,_c as ct,a as Ue,b as x,bd as _t,c as He,ec as it,ed as dt,k as Q,l as We,ld as pt,oc as ot,q as Re,r as ee,rd as Ct,s as Xe,w as Ye,wd as ge,x as Be,xc as rt,y as ze,z as je}from"./chunk-GXHPG2SU.js";import{$c as j,Aa as u,Ab as v,Ba as h,Bc as M,Eb as I,Ed as Ee,Hb as B,Ia as Y,Ib as z,Jb as S,Ob as g,Qb as c,Ub as _e,Xa as s,Ya as O,Zc as Ce,ad as q,bc as f,bd as K,c as Fe,cc as A,cd as Z,dc as R,dd as J,ec as de,ed as fe,fc as $e,hc as D,ib as C,ic as y,id as se,jc as P,ka as Me,kd as me,la as ce,mb as l,na as Le,p as b,qc as k,qd as ke,rd as Ge,sa as $,ta as le,tb as Ie,tc as pe,yb as r,za as Ve,zb as a,zc as F}from"./chunk-4EL7MW65.js";import{h as Pe}from"./chunk-WWX6BADO.js";var H=(()=>{class t{constructor(e){this.$appHttpClient=e,this._connected=new Fe}get connectedStatus$(){return this._connected.asObservable()}connectedStatus(e){this._connected.next(e)}getScheduledConferences(e,n){let i=null,o=null;n.agency!=null&&(i=n.agency.entityIdToken),n.officer!=null&&(o=n.officer.entityIdToken);let d=`/v1/clientsandscheduledconferences?startDate=${e}&x=${i}`;return o!==null&&(d+=`&y=${o}`),this.$appHttpClient.get(x.videoConferenceApi,d).pipe(b(p=>p))}getConferenceClientList(e,n){let i=null,o=null;n.agency!=null&&(i=n.agency.entityIdToken),n.officer!=null&&(o=n.officer.entityIdToken);let d=`/v1/clientsandscheduledconferences?startDate=${e}&x=${i}`;return o!==null&&(d+=`&y=${o}`),this.$appHttpClient.get(x.videoConferenceApi,d).pipe(b(p=>p))}getConferenceArchives(e,n,i){let o=null,d=null;i.agency!=null&&(o=i.agency.entityIdToken),i.officer!=null&&(d=i.officer.entityIdToken);let p=`/v1/conferencearchives?startDate=${e}&x=${o}`;return d!==null&&(p+=`&y=${d}`),this.$appHttpClient.get(x.videoConferenceApi,p).pipe(b(E=>E))}getConferenceRecording(e){let n=`/v1/conferencerecording?x=${e}`,i={responseType:"blob",observe:"response"};return this.$appHttpClient.get(x.videoConferenceApi,n,!0,i).pipe(b(o=>({reportData:new Blob([o.body],{type:"video/mkv"})})))}getConferenceReasons(){return this.$appHttpClient.get(x.videoConferenceApi,"/v1/reasons").pipe(b(e=>e))}getAgencyContacts(e){let n=null;e.agency!=null&&(n=e.agency.entityIdToken);let i=`/v1/agencycontacts?&x=${n}`;return this.$appHttpClient.get(x.videoConferenceApi,i).pipe(b(o=>o))}postRooms(e,n,i,o,d){return this.$appHttpClient.post(x.videoConferenceApi,"/v1/conferences",{clientIdToken:e,reasonId:n,sendNotification:!0,record:i,note:o,entityContacts:d})}deleteRooms(){return this.$appHttpClient.delete(x.videoConferenceApi,"/v1/rooms")}getActiveConference(){return this.$appHttpClient.get(x.videoConferenceApi,"/v1/activeconference").pipe(b(n=>n))}getActiveUserConferences(){return this.$appHttpClient.get(x.videoConferenceApi,"/v1/activeuserconferences").pipe(b(n=>n))}getActiveClientConferences(e){let n=`/v1/activeclientconferences?v=${e}`;return this.$appHttpClient.get(x.videoConferenceApi,n).pipe(b(i=>i))}getDateWithoutTimeAsIsoString(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).toISOString()}static{this.\u0275fac=function(n){return new(n||t)(Le(ge))}}static{this.\u0275prov=Me({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var W=function(t){return t[t.recorded=1]="recorded",t[t.noRecording=2]="noRecording",t[t.pending=3]="pending",t[t.failed=4]="failed",t[t.recordingInProgress=5]="recordingInProgress",t[t.clientHasNotExcepted=6]="clientHasNotExcepted",t}(W||{});var X=function(t){return t[t.enabled=1]="enabled",t[t.disabled=2]="disabled",t[t.noShow=3]="noShow",t}(X||{});var qt=()=>[30,50,100];function Kt(t,_){if(t&1&&(r(0,"span"),S(1,3),a(),f(2),F(3,"date")),t&2){let e=c(3);s(2),R(" - ",M(3,1,e.startDate,"EEEE, MMMM d")," ")}}function Zt(t,_){if(t&1&&(r(0,"th",17)(1,"span",18),f(2),v(3,"p-sortIcon",19),a()()),t&2){let e=_.$implicit;l("pSortableColumn",e.field),s(2),R(" ",e.header," "),s(),l("field",e.field)}}function Jt(t,_){if(t&1&&(r(0,"tr"),C(1,Zt,4,3,"th",16),a()),t&2){let e=_.$implicit;s(),l("ngForOf",e)}}function Qt(t,_){if(t&1&&(r(0,"span"),v(1,"i",7),r(2,"span",29),f(3),F(4,"date"),a()()),t&2){let e=c(2).$implicit,n=c().$implicit;s(3),R(" ",M(4,1,n[e.field],"MM/dd/yyyy H:mm:ss")," ")}}function en(t,_){if(t&1&&(r(0,"span"),v(1,"i",30),r(2,"span",29),f(3),F(4,"date"),a()()),t&2){let e=c(2).$implicit,n=c().$implicit;s(3),R(" ",M(4,1,n[e.field],"MM/dd/yyyy H:mm:ss")," ")}}function tn(t,_){if(t&1&&(r(0,"span")(1,"span",31),f(2),F(3,"date"),a()()),t&2){let e=c(2).$implicit,n=c().$implicit;s(2),R(" ",M(3,1,n[e.field],"MM/dd/yyyy H:mm:ss")," ")}}function nn(t,_){t&1&&(r(0,"span")(1,"div",31),f(2,"(Recording is being processed)"),a()())}function on(t,_){t&1&&(r(0,"span")(1,"div",31),f(2,"(Recording not available)"),a()())}function rn(t,_){t&1&&(r(0,"span")(1,"div",31),f(2,"(Recording in progress)"),a()())}function an(t,_){t&1&&(r(0,"span")(1,"div",31),f(2,"(Client did not join)"),a()())}function sn(t,_){if(t&1&&(r(0,"span",18)(1,"span")(2,"div"),C(3,Qt,5,4,"span",28)(4,en,5,4,"span",28)(5,tn,4,4,"span",28),a()(),C(6,nn,3,0,"span",28)(7,on,3,0,"span",28)(8,rn,3,0,"span",28)(9,an,3,0,"span",28),a()),t&2){let e=c(2).$implicit;
1s(3),l("ngIf",e.recordingIcon===1),s(),l("ngIf",e.recordingIcon===2),s(),l("ngIf",e.recordingIcon===3),s(),l("ngIf",e.conferenceStatus===3),s(),l("ngIf",e.conferenceStatus===4),s(),l("ngIf",e.conferenceStatus===5),s(),l("ngIf",e.conferenceStatus===6)}}function cn(t,_){if(t&1&&(r(0,"span",32)(1,"span",29),f(2),a()()),t&2){let e=c().$implicit,n=c().$implicit;s(2),R(" ",n[e.field]," ")}}function ln(t,_){if(t&1&&(r(0,"span",33)(1,"span"),f(2),a()()),t&2){let e=c().$implicit,n=c().$implicit;s(2),R(" ",n[e.field]," ")}}function _n(t,_){if(t&1&&(r(0,"span",33)(1,"span"),f(2),a()()),t&2){let e=c().$implicit,n=c().$implicit;s(2),R(" ",n[e.field]," ")}}function dn(t,_){if(t&1&&(r(0,"span",33)(1,"span"),f(2),a()()),t&2){let e=c().$implicit,n=c().$implicit;s(2),A(n[e.field])}}function pn(t,_){if(t&1&&(r(0,"span"),f(1),a()),t&2){let e=c().$implicit,n=c().$implicit;s(),A(n[e.field])}}function Cn(t,_){if(t&1&&(r(0,"td",23),C(1,sn,10,7,"span",24)(2,cn,3,1,"span",25)(3,ln,3,1,"span",26)(4,_n,3,1,"span",26)(5,dn,3,1,"span",26)(6,pn,2,1,"span",27),a()),t&2){let e=_.$implicit;l("ngSwitch",e.field),s(),l("ngSwitchCase","conferenceDate"),s(),l("ngSwitchCase","timeZone"),s(),l("ngSwitchCase","clientName"),s(),l("ngSwitchCase","caseNumber"),s(),l("ngSwitchCase","officerName")}}function fn(t,_){if(t&1){let e=I();r(0,"td",34)(1,"div")(2,"span"),S(3,4),a(),r(4,"span",35),g("click",function(){u(e);let i=c().$implicit,o=c(3);return h(o.downloadVideoClick(i))}),v(5,"i",36),a()(),r(6,"div")(7,"span"),S(8,5),a(),r(9,"span",35),g("click",function(){u(e);let i=c().$implicit,o=c(3);return h(o.streamVideoClick(i))}),v(10,"i",36),a()()()}t&2&&(s(5),l("className","fa fa-video fa-video-enabled ps-2"),s(5),l("className","fa fa-video fa-video-enabled ps-2"))}function mn(t,_){if(t&1&&(r(0,"tr",20),C(1,Cn,7,6,"td",21),a(),r(2,"tr"),C(3,fn,11,2,"td",22),a()),t&2){let e=_.$implicit,n=_.columns,i=_.rowIndex,o=c(3);l("pSelectableRow",e)("pSelectableRowIndex",i),s(),l("ngForOf",n),s(2),l("ngIf",o.selectedSegmentRowIndex===i&&e.conferenceStatus===1)}}function En(t,_){if(t&1){let e=I();r(0,"p-table",12,0),g("onRowSelect",function(i){u(e);let o=c(2);return h(o.onSegmentRowSelect(i))}),C(2,Kt,4,4,"ng-template",13)(3,Jt,2,1,"ng-template",14)(4,mn,4,4,"ng-template",15),a()}if(t&2){let e=c(2);l("columns",e.archiveTableCols)("value",e.conferenceArchives)("paginator",!0)("rows",50)("rowsPerPageOptions",k(7,qt))("autoLayout",!0)("loading",e.loadingGrid)}}function gn(t,_){if(t&1){let e=I();r(0,"div")(1,"p"),B(2,1),v(3,"i",7),z(),a(),r(4,"div",8)(5,"div",9)(6,"h6"),S(7,2),a(),r(8,"p-calendar",10),g("onSelect",function(i){u(e);let o=c();return h(o.calendarOnSelect(i))}),a()()(),C(9,En,5,8,"p-table",11),a()}if(t&2){let e=c();s(8),l("ngModel",e.startDate)("maxDate",e.maxDateValue)("showOtherMonths",!0)("selectOtherMonths",!0)("readonlyInput",!0),s(),l("ngIf",e.showGrid)}}var kt=(()=>{class t{constructor(e,n,i,o,d,p){this.$selectedEntityService=e,this.$videoConferenceService=n,this.$windowRefService=i,this.$appHttpClient=o,this.$appTokenService=d,this.datepipe=p,this.subscriptions=[],this._startDate=new Date,this._endDate=new Date,this.conferenceArchives=[],this.maxDateValue=new Date,this.loadingGrid=!1,this.showGrid=!1,this.loading=!0,this._getConferenceArchives=()=>{let E=this.$selectedEntityService.selectedEntities;if(E.agency){this.showGrid=!0,this.loadingGrid=!0;let N=this.$videoConferenceService.getDateWithoutTimeAsIsoString(this.startDate),T=this.$videoConferenceService.getDateWithoutTimeAsIsoString(this._endDate);this.subscriptions.push(this.$videoConferenceService.getConferenceArchives(N,T,E).subscribe(L=>{let w=[];L.conferences.forEach(m=>{let V=W.noRecording,Oe=X.noShow,De=m.recordParticipantsOnConnect.toLowerCase()==="true";Oe=De===!0?X.disabled:X.noShow,m.clientAccepted?m.recordParticipantsOnConnect.toLowerCase()==="true"&&(m.closedDateClientLocal?m.videoCompositionStatus===1?V=W.pending:m.videoCompositionStatus===2?(V=W.recorded,Oe=De===!0?X.enabled:X.noShow):m.videoCompositionStatus===3&&(V=W.failed):V=W.recordingInProgress):V=W.clientHasNotExcepted;let ye=m.closedDateClientLocal;m.closedDateClientLocal||(ye=m.createDateClientLocal);let Yt={createDate:m.createDateClientLocal,closedDate:m.closedDateClientLocal,conferenceDate:ye,caseNumber:m.caseNumber,officerName:`${m.officerLastName}, ${m.officerFirstName}`,clientName:`${m.clientFirstName}, ${m.clientLastName}`,timeZone:m.clientTimeZone,reason:m.reason,roomSid:m.roomSid,conferenceStatus:V,recordingIcon:Oe};w.push(Yt)}),w.sort((m,V)=>m.conferenceDate<V.conferenceDate?1:m.conferenceDate>V.conferenceDate?-1:0),this.conferenceArchives=w,this.loadingGrid=!1,this.loading=!1,this.loading=!1}))}else this.loading=!1,this.showGrid=!1}}ngOnInit(){this.subscriptions.push(this.$selectedEntityService.changed.subscribe(()=>{this._selectedEntitiesChanged()})),this.maxDateValue.setDate(new Date().getDate()+1),this.archiveTableCols=[{field:"conferenceDate",header:"Date"},{field:"timeZone",header:"Client Timezone"},{field:"clientName",header:"Client Name"},{field:"caseNumber",header:"Case#"},{field:"officerName",header:"Assigned Officer"},{field:"reason",header:"Reason"}]}ngOnChanges(){this._getConferenceArchives()}
1ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}get startDate(){return this._startDate}set startDate(e){this._startDate=e,this._getConferenceArchives()}downloadVideoClick(e){let n=this.datepipe.transform(e.createDate,"MM/dd/yyyy-HH:m:ss"),i="";e.caseNumber&&(i=`-${e.caseNumber}`);let o=`conference${i}-${n}.mkv`;this.subscriptions.push(this.$videoConferenceService.getConferenceRecording(e.roomSid).subscribe(d=>{Dt(d.reportData,o)}))}streamVideoClick(e){let n=`/v1/streamrecording?x=${e.roomSid}&access_token=${this.$appTokenService.token}`;this.openWindowWithSource(n)}calendarOnSelect(e){this.startDate=e}onSegmentRowSelect(e){this.selectedSegmentRowIndex=e.index}onClientRowSelect(e){this.selectedClientRowIndex=e.index}getBlob(e){let n={responseType:"blob",observe:"response"};return this.$appHttpClient.get(x.videoConferenceApi,e,!0,n).pipe(b(i=>({reportData:new Blob([i.body],{type:this.getContentTypeFromHttpResponse(i)})})))}_selectedEntitiesChanged(){this._getConferenceArchives()}getContentTypeFromHttpResponse(e){return e.headers.get("content-type")}openWindowWithSource(e){this.subscriptions.push(this.getBlob(e).subscribe(n=>{let i=URL.createObjectURL(n.reportData);this.$windowRefService.nativeWindow.BiVideoConferenceViewerWindowReference=this.$windowRefService.nativeWindow.open(i,"_blank"),this.$windowRefService.nativeWindow.BiVideoConferenceViewerWindowReference.onbeforeunload=()=>{},this.$windowRefService.nativeWindow.BiVideoConferenceViewerWindowReference.onunload=()=>{}}))}static{this.\u0275fac=function(n){return new(n||t)(O(U),O(H),O(Te),O(ge),O(Ct),O(se))}}static{this.\u0275cmp=$({type:t,selectors:[["app-conference-archives"]],inputs:{options:"options"},features:[Ve],decls:1,vars:1,consts:()=>{let e;e=$localize`:video conference archive instruction|video conference archive header 2 instruction Options@@ArchiveInstruction: This section contains the history of officer/client conferences. Conferences that were recorded have been prefixed by a camera icon ${"\uFFFD#3\uFFFD"}:START_ITALIC_TEXT:${"\uFFFD/#3\uFFFD"}:CLOSE_ITALIC_TEXT:. Recorded conferences can be downloaded or replayed by selecting the conference and then choosing the "Download Archive Video" or "Stream Archive Video" options. `;let n;n=$localize`:archive conference date|conference date Options@@ArchiveConferenceDate: Conference Date `;let i;i=$localize`:conference archive|conference archive Options@@ConferenceArchive:Conference Archive`;let o;o=$localize`:download archive video|download archive video 3 Options@@DownloadVideo:Download Archived Video`;let d;return d=$localize`:stream archived video|stream archived video Options@@StreamVideo:Stream Archived Video`,[["archiveTable",""],e,n,i,o,d,[4,"appLoadingIndicator"],[1,"fa","fa-video-enabled","fa-video"],[1,"row","date-field"],[1,"col-3"],["name","startDate",1,"ps-1",3,"onSelect","ngModel","maxDate","showOtherMonths","selectOtherMonths","readonlyInput"],["paginatorPosition","bottom","selectionMode","single","sortMode","multiple","responsiveLayout","scroll",3,"columns","value","paginator","rows","rowsPerPageOptions","autoLayout","loading","onRowSelect",4,"ngIf"],["paginatorPosition","bottom","selectionMode","single","sortMode","multiple","responsiveLayout","scroll",3,"onRowSelect","columns","value","paginator","rows","rowsPerPageOptions","autoLayout","loading"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn",4,"ngFor","ngForOf"],[3,"pSortableColumn"],[2,"white-space","nowrap"],[3,"field"],[3,"pSelectableRow","pSelectableRowIndex"],[3,"ngSwitch",4,"ngFor","ngForOf"],["colspan","6","style","text-align: center !important",4,"ngIf"],[3,"ngSwitch"],["style","white-space: nowrap",4,"ngSwitchCase"],["style","white-space: nowrap; width: 100px",4,"ngSwitchCase"],["style","min-width: 150px",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngIf"],[1,"ps-1"],[1,"fa","disabled","fa-video"],[1,"ps-4"],[2,"white-space","nowrap","width","100px"],[2,"min-width","150px"],["colspan","6",2,"text-align","center !important"],[3,"click"],[3,"className"]]},template:function(n,i){n&1&&C(0,gn,10,6,"div",6),n&2&&l("appLoadingIndicator",i.loading)},dependencies:[G,he,ne,ie,re,oe,Q,ee,j,q,K,Z,J,te,se],styles:[".date-field[_ngcontent-%COMP%]{margin-bottom:2em}i.fa-video[_ngcontent-%COMP%]{cursor:pointer}"]})}}return t})();var Nn=()=>[30,50,100],Tn=()=>({"vertical-align":"middle"});function vn(t,_){if(t&1&&(r(0,"span"),S(1,3),a(),f(2),F(3,"date")),t&2){let e=c(3);s(2),R(" - ",M(3,1,e.startDate,"EEEE, MMMM d")," ")}}function On(t,_){if(t&1&&(r(0,"th",16)(1,"span",17),f(2),v(3,"p-sortIcon",18),a()()),t&2){let e=_.$implicit;l("pSortableColumn",e.field),s(2),R(" ",e.header," "),s(),l("field",e.field)}}function In(t,_){if(t&1&&(r(0,"tr"),C(1,On,4,3,"th",15),a()),t&2){let e=_.$implicit;s(),l("ngForOf",e)}}function Rn(t,_){t&1&&v(0,"i",28)}function wn(t,_){if(t&1&&(r(0,"span",17),C(1,Rn,1,0,"i",26),r(2,"span",27),f(3),F(4,"date"),a()()),t&2){let e=c().$implicit,n=c(),i=n.$implicit,o=n.rowIndex,d=c(3);s(),l("ngIf",d.selectedSegmentRowIndex!==o&&d.isConferenceToday(i)),s(2),de("",M(4,3,i[e.field],"HH:mm")," ",i[e.field].localTimezone,"")}}function xn(t,_){if(t&1&&(r(0,"span")(1,"span"),f(2),a()()),t&2){let e=c().$implicit,n=c().$implicit;s(2),A(n[e.field])}}function An(t,_){if(t&1&&(r(0,"span")(1,"span"),f(2),a()()),t&2){let e=c().$implicit,n=c().$implicit;s(2),A(n[e.field].officerLastName+", "+n[e.field].officerFirstName)}}function bn(t,_){if(t&1&&(r(0,"span"),f(1),a()),t&2){let e=c().$implicit,n=c().$implicit;s(),A(n[e.field])}}function Dn(t,_){if(t&1&&(r(0,"td",22),C(1,wn,5,6,"span",23)(2,xn,3,1,"span",24)(3,An,3,1,"span",24)(4,bn,2,1,"span",25),a()),t&2){let e=_.$implicit;l("ngSwitch",e.field),s(),l("ngSwitchCase","localStartDateTime"),s(),l("ngSwitchCase","clientName"),s(),l("ngSwitchCase","officer")}}function yn(t,_){if(t&1){let e=I();r(0,"span",33),B(1,4),r(2,"p-checkbox",34),P("ngModelChange",function(i){u(e);let o=c(5);
3return y(o.recordConferenceChecked,i)||(o.recordConferenceChecked=i),h(i)}),a(),z(),a()}if(t&2){let e=c(5);s(2),l("ngStyle",k(4,Tn))("disabled",e.startVideoClicked)("binary",!0),D("ngModel",e.recordConferenceChecked)}}function Pn(t,_){if(t&1){let e=I();r(0,"td",29)(1,"p-dropdown",30),P("ngModelChange",function(i){u(e);let o=c().$implicit;return y(o.reason,i)||(o.reason=i),h(i)}),g("onChange",function(){u(e);let i=c().$implicit,o=c(3);return h(o.onPurposeDropdownChanged(i))}),a(),r(2,"fieldset",31),g("click",function(){u(e);let i=c().$implicit,o=c(3);return h(o.startVideoClick(i))}),v(3,"legend"),a(),C(4,yn,3,5,"span",32),a()}if(t&2){let e=c().$implicit,n=c(3);s(),l("disabled",n.startVideoClicked)("options",n.reasons),D("ngModel",e.reason),s(),l("disabled",n.startVideoClicked)("className",e.startEnabled?n.startVideoClicked?n.recordConferenceChecked?"fa fa-lg fa-circle text-danger ps-2":"fas fa-lg fa-play-circle text-danger ps-2":n.recordConferenceChecked?"far fa-lg fa-circle ps-2 clickable text-primary":"far fa-lg fa-play-circle ps-2 clickable text-primary":n.recordConferenceChecked?"fal fa-lg fa-circle ps-2 disabled":"fal fa-lg fa-play-circle ps-2 disabled"),s(2),l("ngIf",e.re
3cordAllowed)}}function Fn(t,_){t&1&&(r(0,"td",29)(1,"span"),S(2,5),a()())}function Mn(t,_){if(t&1&&(r(0,"tr",19),C(1,Dn,5,4,"td",20),a(),r(2,"tr"),C(3,Pn,5,6,"td",21)(4,Fn,3,0,"td",21),a()),t&2){let e=_.$implicit,n=_.columns,i=_.rowIndex,o=c(3);l("pSelectableRow",e)("pSelectableRowIndex",i),s(),l("ngForOf",n),s(2),l("ngIf",o.selectedSegmentRowIndex===i&&o.isConferenceToday(e)),s(),l("ngIf",o.selectedSegmentRowIndex===i&&!o.isConferenceToday(e))}}function Ln(t,_){if(t&1){let e=I();r(0,"p-table",11,0),g("onRowSelect",function(i){u(e);let o=c(2);return h(o.onSegmentRowSelect(i))}),C(2,vn,4,4,"ng-template",12)(3,In,2,1,"ng-template",13)(4,Mn,5,5,"ng-template",14),a()}if(t&2){let e=c(2);l("columns",e.segmentTableCols)("value",e.scheduledConferences)("paginator",!0)("rows",50)("rowsPerPageOptions",k(7,Nn))("autoLayout",!0)("loading",e.loadingGrid)}}function Vn(t,_){if(t&1){let e=I();r(0,"div")(1,"p"),S(2,1),a(),r(3,"div",7)(4,"div",8)(5,"h6"),S(6,2),a(),r(7,"p-calendar",9),g("onSelect",function(i){u(e);let o=c();return h(o.calendarOnSelect(i))}),a()()(),C(8,Ln,5,8,"p-table",10),a()}if(t&2){let e=c();s(7),l("ngModel",e.startDate)("minDate",e.minDateValue)("showOtherMonths",!0)("selectOtherMonths",!0)("readonlyInput",!0),s(),l("ngIf",e.showGrid)}}var Gt=(()=>{class t{constructor(e,n){this.$selectedEntityService=e,this.$videoConferenceService=n,this.message=new Y,this.conferenceEvent=new Y,this.subscriptions=[],this.loading=!0,this.loadingGrid=!0,this.showGrid=!1,this.minDateValue=new Date,this.maxDateValue=new Date,this.showMinimumRequiredSelectedEntitiesModal=!1,this.scheduledConferences=[],this.recordConferenceChecked=!0,this._startDate=new Date,this._dateOfLastGetClients=new Date,this.startVideoClicked=!1,this._getConferenceReasons=()=>{this.$videoConferenceService.getConferenceReasons().subscribe(i=>{this.reasons=i})},this._getScheduledConferences=()=>{let i=this.$selectedEntityService.selectedEntities;if(i.agency){this.showGrid=!0,this.loadingGrid=!0;let o=this.$videoConferenceService.getDateWithoutTimeAsIsoString(this.startDate);this.$videoConferenceService.getScheduledConferences(o,i).subscribe(d=>{this._dateOfLastGetClients=new Date,this._addNamesToSegments(d);let p=this._sortSegments(d.segments),E=[];p.forEach(N=>{let T={clientIdToken:N.clientIdToken,clientName:N.clientName.clientLastName+", "+N.clientName.clientFirstName,officerName:N.officer.officerLastName+", "+N.officer.officerFirstName,localStartDateTime:N.localStartDateTime,localTimezone:N.localTimezone,caseNumber:N.caseNumber,startEnabled:N.startEnabled,record:!1,recordAllowed:N.recordAllowed||!1};E.push(T)}),this.loadingGrid=!1,this.loading=!1,this.scheduledConferences=E})}else this.loading=!1,this.showGrid=!1},this.subscriptions.push(n.connectedStatus$.subscribe(i=>{this.startVideoClicked=i}))}ngOnInit(){this._getConferenceReasons(),this._getScheduledConferences(),this.minDateValue.setDate(new Date().getDate()-1),this.subscriptions.push(this.$selectedEntityService.changed.subscribe(()=>{this._selectedEntitiesChanged()})),this.segmentTableCols=[{field:"localStartDateTime",header:"Start"},{field:"localTimezone",header:"Client Timezone"},{field:"clientName",header:"Client Name"},{field:"caseNumber",header:"Case#"},{field:"officerName",header:"Assigned Officer"}]}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}startVideoClick(e){this.startVideoClicked=!0,e.record=this.recordConferenceChecked,e.startEnabled?this.conferenceEvent.emit(e):this.startVideoClicked=!1}isConferenceToday(e){let n=this._beginningOfNextDay(this._dateOfLastGetClients);return new Date(Date.parse(e.localStartDateTime))<n}calendarOnSelect(e){this.startDate=e}onPurposeDropdownChanged(e){e.startEnabled=!0}onSegmentRowSelect(e){this.recordConferenceChecked=e.data.record,this.selectedSegmentRowIndex=e.index}_beginningOfNextDay(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+1)}get startDate(){return this._startDate}set startDate(e){this._startDate=e,this._getScheduledConferences()}_selectedEntitiesChanged(){this._getScheduledConferences()}_addNamesToSegments(e){let n=e.clients.reduce(function(i,o,d){return i[o.clientIdToken]=d,i},{});
3return e.segments.forEach(i=>{let o=e.clients[n[i.clientIdToken]];i.clientName={clientFirstName:o.clientFirstName,clientLastName:o.clientLastName},i.caseNumber=o.caseNumber,i.recordAllowed=o.recordAllowed||!1,i.officer={officerIdToken:o.officerIdToken,officerFirstName:o.officerFirstName,officerLastName:o.officerLastName}}),e}_sortSegments(e,n="ASC"){if(!e)throw new Error("The collectionName must be properly defined in this method's parameters.");return e.sort((i,o)=>{let d=null,p=null;d=i.clientName.clientLastName+" "+i.clientName.clientFirstName+" "+i.localStartDateTime,p=o.clientName.clientLastName+" "+o.clientName.clientFirstName+" "+o.localStartDateTime;let E=null;return!d&&p?E=-1:d&&!p?E=1:!d&&!p?E=0:typeof d=="string"&&typeof p=="string"?E=d.localeCompare(p):E=d<p?-1:d>p?1:0,n==="ASC"?E:E*-1}),e}static{this.\u0275fac=function(n){return new(n||t)(O(U),O(H))}}static{this.\u0275cmp=$({type:t,selectors:[["app-scheduled-conferences"]],outputs:{message:"message",conferenceEvent:"conferenceEvent"},decls:1,vars:1,consts:()=>{let e;e=$localize`:scheduled conference discription|scheduled conference discription 4 Options@@ScheduledConferenceDiscription: To start a video conference, select a client, select a purpose from the drop-down, then click on the video camera icon. `;let n;n=$localize`:schedule date|schedule date Options@@ScheduledDate: Scheduled Date `;let i;i=$localize`:scheduled|scheduled Options@@Scheduled:Scheduled`;let o;o=$localize`:record conference|record conference Options@@RecordConference: Record Conference? ${"\uFFFD#2\uFFFD"}:START_TAG_P_CHECKBOX:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_P_CHECKBOX:`;let d;return d=$localize`:future scheduled warning|future scheduled warning Options@@Future 5 ScheduledWarning:You are not allowed to start a conference scheduled in the future.`,[["segmentTable",""],e,n,i,o,d,[4,"appLoadingIndicator"],[1,"row"],[1,"col-3","date-field"],["name","startDate",1,"ps-1",3,"onSelect","ngModel","minDate","showOtherMonths","selectOtherMonths","readonlyInput"],["paginatorPosition","bottom","selectionMode","single","sortMode","multiple","responsiveLayout","scroll",3,"columns","value","paginator","rows","rowsPerPageOptions","autoLayout","loading","onRowSelect",4,"ngIf"],["paginatorPosition","bottom","selectionMode","single","sortMode","multiple","responsiveLayout","scroll",3,"onRowSelect","columns","value","paginator","rows","rowsPerPageOptions","autoLayout","loading"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn",4,"ngFor","ngForOf"],[3,"pSortableColumn"],[2,"white-space","nowrap"],[3,"field"],[3,"pSelectableRow","pSelectableRowIndex"],[3,"ngSwitch",4,"ngFor","ngForOf"],["colspan","5","style","text-align: center",4,"ngIf"],[3,"ngSwitch"],["style","white-space: nowrap",4,"ngSwitchCase"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","fa fa-lg fa-video-enabled fa-video",4,"ngIf"],[1,"ps-1"],[1,"fa","fa-lg","fa-video-enabled","fa-video"],["colspan","5",2,"text-align","center"],["placeholder","Select a Purpose","optionLabel","reason","appendTo","body",3,"ngModelChange","onChange","disabled","options","ngModel"],[3,"click","disabled","className"],["style","padding-left: 10px",4,"ngIf"],[2,"padding-left","10px"],[3,"ngModelChange","ngStyle","disabled","binary","ngModel"]]},template:function(n,i){n&1&&C(0,Vn,9,6,"div",6),n&2&&l("appLoadingIndicator",i.loading)},dependencies:[G,Ne,he,ne,ie,re,oe,Q,ee,Se,j,q,fe,K,Z,J,te,se],styles:[".date-field[_ngcontent-%COMP%]{margin-bottom:2em}"]})}}return t})();var Un=()=>[30,50,100],Hn=()=>({"vertical-align":"middle"}),Wn=(t,_,e)=>({alert:!0,"alert-success":t,"alert-danger":_,"alert-warning":e});function Xn(t,_){t&1&&(r(0,"span"),S(1,1),a())}function Yn(t,_){if(t&1&&(r(0,"th",23)(1,"span",24),f(2),v(3,"p-sortIcon",25),a()()),t&2){let e=_.$implicit;l("pSortableColumn",e.field),s(2),R(" ",e.header," "),s(),l("field",e.field)}}function Bn(t,_){if(t&1&&(r(0,"tr"),C(1,Yn,4,3,"th",22),a()),t&2){let e=_.$implicit;s(),l("ngForOf",e)}}function zn(t,_){t&1&&v(0,"i",34)}function jn(t,_){if(t&1&&(r(0,"span"),C(1,zn,1,0,"i",32),r(2,"span",33),f(3),a()()),t&2){let e=c().$implicit,n=c(),i=n.$implicit,o=n.rowIndex,d=c(3);s(),l("ngIf",d.selectedClientRowIndex!==o),s(2),A(i[e.field])}}function qn(t,_){if(t&1&&(r(0,"span")(1,"span"),f(2),a()()),t&2){let e=c().$implicit,n=c().$implicit;s(2),A(n[e.field])}}function Kn(t,_){if(t&1&&(r(0,"span"),f(1),a()),t&2){let e=c().$implicit,n=c().$implicit;s(),A(n[e.field])}}function Zn(t,_){if(t&1&&(r(0,"td",29),C(1,jn,4,2,"span",30)(2,qn,3,1,"span",30)(3,Kn,2,1,"span",31),a()),t&2){let e=_.$implicit;l("ngSwitch",e.field),s(),l("ngSwitchCase","clientName"),s(),l("ngSwitchCase","officerName")}}function Jn(t,_){if(t&1){let e=I();r(0,"span",40),B(1,2),r(2,"p-checkbox",41),P("ngModelChange",function(i){u(e);let o=c(5);
5return y(o.recordConferenceChecked,i)||(o.recordConferenceChecked=i),h(i)}),a(),z(),a()}if(t&2){let e=c(5);s(2),l("ngStyle",k(4,Hn))("disabled",e.startVideoClicked)("binary",!0),D("ngModel",e.recordConferenceChecked)}}function Qn(t,_){if(t&1){let e=I();r(0,"td",35)(1,"p-dropdown",36),P("ngModelChange",function(i){u(e);let o=c().$implicit;return y(o.reason,i)||(o.reason=i),h(i)}),g("onChange",function(){u(e);let i=c().$implicit,o=c(3);return h(o.onPurposeDropdownChanged(i))}),a(),r(2,"button",37),g("click",function(){u(e);let i=c(4);return h(i.navigateToInvite())}),f(3," Invite "),a(),r(4,"fieldset",38),g("click",function(){u(e);let i=c().$implicit,o=c(3);return h(o.startVideoClick(i))}),v(5,"legend"),a(),C(6,Jn,3,5,"span",39),a()}if(t&2){let e=c().$implicit,n=c(3);s(),l("disabled",n.startVideoClicked)("options",n.reasons),D("ngModel",e.reason),s(),l("disabled",n.startVideoClicked),s(2),l("disabled",n.startVideoClicked)("className",e.startEnabled?n.startVideoClicked?n.recordConferenceChecked?"fa fa-lg fa-circle text-danger ps-2":"fas fa-lg fa-play-circle text-danger ps-2":n.recordConferenceChecked?"far fa-lg fa-circle ps-2 clickable text-primary":"far fa-lg fa-play-circle ps-2 clickable text-primary":n.recordConferenceChecked?"fal fa-lg fa-circle ps-2 disabled":"fal fa-lg fa-play-circle ps-2 disabled"),s(2),l("ngIf",e.re
5cordAllowed)}}function ei(t,_){if(t&1&&(r(0,"tr",26),C(1,Zn,4,3,"td",27),a(),r(2,"tr"),C(3,Qn,7,7,"td",28),a()),t&2){let e=_.$implicit,n=_.columns,i=_.rowIndex,o=c(3);l("pSelectableRow",e)("pSelectableRowIndex",i),s(),l("ngForOf",n),s(2),l("ngIf",o.selectedClientRowIndex===i)}}function ti(t,_){if(t&1){let e=I();r(0,"p-table",19),g("onRowSelect",function(i){u(e);let o=c(2);return h(o.onClientRowSelect(i))}),C(1,Xn,2,0,"ng-template",20)(2,Bn,2,1,"ng-template",13)(3,ei,4,4,"ng-template",21),a()}if(t&2){let e=c(2);l("columns",e.clientTableCols)("value",e.clientConferences)("paginator",!0)("rows",50)("rowsPerPageOptions",k(7,Un))("autoLayout",!0)("loading",e.loadingGrid)}}function ni(t,_){if(t&1&&(r(0,"div")(1,"p"),S(2,0),a(),C(3,ti,4,8,"p-table",18),a()),t&2){let e=c();s(3),l("ngIf",e.showGrid)}}function ii(t,_){if(t&1&&(r(0,"div",42)(1,"strong"),f(2),a(),f(3),a()),t&2){let e=c();l("ngClass",pe(3,Wn,e.popupMessageStatus===1,e.popupMessageStatus===2,e.popupMessageStatus===3)),s(2),A(e.popupActionMessage),s(),R(" ",e.popupActionMessageDetails," ")}}function oi(t,_){if(t&1&&(r(0,"bi-option",43),f(1),a()),t&2){let e=_.$implicit;l("value",e.contactEntityId),s(),$e(" ",e.lastName,", ",e.firstName," - ",e.email," ")}}function ri(t,_){if(t&1){let e=I();r(0,"tr")(1,"div",45)(2,"th",46),v(3,"bi-input-text",47),a(),r(4,"th",46),v(5,"bi-input-text",48),a(),r(6,"th",46),v(7,"bi-input-email",49),a(),r(8,"th",50)(9,"bi-action-delete",51),g("execute",function(){let i=u(e).index,o=c(2);return h(o.removeContact(i))}),a()()()()}if(t&2){let e=_.index;s(),l("formGroupName",e),s(),_e("id","firstName[",e,"]"),s(),l("maxlength",30)("required",!0),s(),_e("id","lastName[",e,"]"),s(),l("maxlength",30)("required",!0),s(),_e("id","email[",e,"]"),s(),l("maxlength",100)("required",!0)}}function ai(t,_){if(t&1&&C(0,ri,10,13,"tr",44),t&2){let e=c();l("ngForOf",e.contacts.controls)}}var Ut=function(t){return t[t.success=1]="success",t[t.failure=2]="failure",t[t.warning=3]="warning",t}(Ut||{}),Ht=(()=>{class t{constructor(e,n,i){this.fb=e,this.$selectedEntityService=n,this.$videoConferenceService=i,this.message=new Y,this.conferenceEvent=new Y,this.showPopupActionMessage=!1,this.subscriptions=[],this.loading=!0,this._startDate=new Date,this.clientConferences=[],this.minDateValue=new Date,this.loadingGrid=!1,this.showGrid=!1,this.recordConferenceChecked=!0,this.clientInConferanceWith=-1,this.startVideoClicked=!1,this.showInviteModal=!1,this.maxInvites=8,this.agencyContacts=[],this.availableContacts=[],this.validAgencyContacts=[],this.showInvitesPopup=!1,this.contactInputIsValid=!0,this.contactsForm=this.fb.group({contacts:this.fb.array([]),avContacts:new Re,notesValue:new Re}),this.hasMaxContacts=!1,this._getConferenceClientList=()=>{let o=this.$selectedEntityService.selectedEntities;if(o.agency){this.showGrid=!0,this.loadingGrid=!0;let d=this.$videoConferenceService.getDateWithoutTimeAsIsoString(this.startDate);this.subscriptions.push(this.$videoConferenceService.getConferenceClientList(d,o).subscribe(p=>{this._addNamesToSegments(p);let E=this._sortByClientLastname(p.clients),N=[];E.forEach(T=>{let L={agencyIdToken:T.agencyIdToken,clientIdToken:T.clientIdToken,clientName:T.clientLastName+", "+T.clientFirstName,officerName:T.officerLastName+", "+T.officerFirstName,officerIdToken:T.officerIdToken,caseNumber:T.caseNumber,reason:T.reason,startEnabled:T.startEnabled,record:!1,recordAllowed:T.recordAllowed||!1};N.push(L)}),this.clientConferences=N,this.loading=!1,this.loadingGrid=!1}))}else this.loading=!1,this.showGrid=!1},this._getConferenceReasons=()=>{this.subscriptions.push(this.$videoConferenceService.getConferenceReasons().subscribe(o=>{this.reasons=o}))},this._getAgencyContacts=()=>{let o=this.$selectedEntityService.selectedEntities;this.subscriptions.push(this.$videoConferenceService.getAgencyContacts(o).subscribe(d=>{this.availableContacts=d}))},this.subscriptions.push(i.connectedStatus$.subscribe(o=>{this.startVideoClicked=o}))}ngOnInit(){this._getConferenceReasons(),this._getConferenceClientList(),this._getAgencyContacts(),this.subscriptions.push(this.$selectedEntityService.changed.subscribe(()=>{this._selectedEntitiesChanged()})),this.clientTableCols=[{field:"clientName",header:"Client Name"},{field:"caseNumber",header:"Case#"},{field:"officerName",header:"Assigned Officer"}]}setDefaults(){this.contactsForm.controls.avContacts.setValue(""),this.contactsForm.controls.avContacts.markAsPristine(),this.contacts.clear(),this.validAgencyContacts=[],this.agencyContacts=[],this.contactsForm.controls.notesValue.setValue("")}get contacts(){return this.contactsForm.get("contacts")}
5get notesValue(){return this.contactsForm.get("notesValue").value}get sAgContacts(){return this.contactsForm.get("avContacts").value}get numberOfTotalContacts(){let e=0,n=0;return this.contacts!==null&&this.contacts!==void 0&&(e=this.contacts.length),this.sAgContacts!==null&&this.sAgContacts!==void 0&&(n=this.sAgContacts.length),e+n}get maxContactsStatus(){return this.numberOfTotalContacts>=this.maxInvites}newContact(){return this.fb.group({firstName:[""],lastName:[""],email:[""]})}onAvContactsSelected(){this.hasMaxContacts=this.maxContactsStatus}addContacts(){this.contacts.push(this.newContact()),this.hasMaxContacts=this.maxContactsStatus}removeContact(e){this.contacts.removeAt(e),this.hasMaxContacts=this.maxContactsStatus}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}get startDate(){return this._startDate}set startDate(e){this._startDate=e,this._getConferenceClientList()}startVideoClick(e){this.startVideoClicked=!0,e.record=this.recordConferenceChecked,e.note=this.notesValue,this.clientInConferanceWith=e.index,e.entityContacts=this.validAgencyContacts,e.startEnabled?(this.conferenceEvent.emit(e),this.validAgencyContacts=[],this._getAgencyContacts()):this.startVideoClicked=!1}onPurposeDropdownChanged(e){e.startEnabled=!0}onClientRowSelect(e){this.recordConferenceChecked=e.data.record,this._getAgencyContacts(),this.setDefaults(),this.clientInConferanceWith>-1?this.selectedClientRowIndex=0:this.selectedClientRowIndex=e.index}showHidePopup(e){this.showInvitesPopup=e}cancelClicked(){this.showPopupActionMessage=!1,this.showHidePopup(!1)}navigateToInvite(){this.agencyContacts.length===0&&this.contacts.clear(),this.showPopupActionMessage=!1,this.showHidePopup(!0)}saveParticipants(){if(this.agencyContacts=[],this.validAgencyContacts=[],!this.contactsForm.valid){this.popupActionMessageDetails="Please enter all required information.",this._displayWarning();return}if(this.sAgContacts!==null&&this.sAgContacts!==void 0&&this.sAgContacts.length>0)for(let n=0;n<this.sAgContacts.length;n++){let i=this.sAgContacts[n];this.agencyContact={},this.agencyContact.contactEntityId=i,this.agencyContacts.push(this.agencyContact)}let e=this.contactsForm.value.contacts;for(let n=0;n<e.length;n++){let i=e[n];this.agencyContact={},this.agencyContact.firstName=i.firstName,this.agencyContact.lastName=i.lastName,this.agencyContact.email=i.email,this.agencyContact.contactEntityId=0,this.agencyContacts.push(this.agencyContact)}
5this.agencyContacts.forEach((n,i)=>{if(this.validateContactInput(n)){let o=this.agencyContacts.slice(i,i+1)[0];this.validAgencyContacts.push(o)}else(/^\s*$/.test(n.firstName)||/^\s*$/.test(n.lastName)||/^\s*$/.test(n.email))&&(this.contactInputIsValid=!1)}),this.validAgencyContacts.length===0?(this.popupActionMessageDetails="Please select agency contacts from the dropdown or enter all first name, last name and email address for each participant you want to invite.",this._displayWarning()):this.contactInputIsValid?this.numberOfTotalContacts>this.maxInvites?(this.popupActionMessageDetails="You have exceeded maximum invites of 8 agency contacts. Please remove attendees and try again.",this._displayWarning()):this.showHidePopup(!1):(this.popupActionMessageDetails="Please enter all first name, last name and email address for each participant you want to invite.",this._displayWarning())}validateContactInput(e){return!!(e.firstName&&e.lastName&&e.email||e.contactEntityId>0)}_selectedEntitiesChanged(){this._getConferenceClientList()}_sortByClientLastname(e,n="ASC"){if(!e)throw new Error("The collectionName must be properly defined in this method's parameters.");return e.sort((i,o)=>{let d=null,p=null;d=i.clientLastName+" "+i.clientFirstName+" "+i.caseNumber,p=o.clientLastName+" "+o.clientFirstName+" "+o.caseNumber;let E=null;return!d&&p?E=-1:d&&!p?E=1:!d&&!p?E=0:typeof d=="string"&&typeof p=="string"?E=d.localeCompare(p):E=d<p?-1:d>p?1:0,n==="ASC"?E:E*-1}),e}_addNamesToSegments(e){return e.clients.forEach(n=>{n.clientName={clientFirstName:n.clientFirstName,clientLastName:n.clientLastName},n.officer={officerIdToken:n.officerIdToken,officerFirstName:n.officerFirstName,officerLastName:n.officerLastName}}),e}_displayWarning(){this.showPopupActionMessage=!0,this.popupMessageStatus=Ut.warning,this.popupActionMessage="Warning!"}static{this.\u0275fac=function(n){return new(n||t)(O(Ze),O(U),O(H))}}static{this.\u0275cmp=$({type:t,selectors:[["app-conference-client-list"]],outputs:{message:"message",conferenceEvent:"conferenceEvent"},decls:22,vars:12,consts:()=>{let e;e=$localize`Notes`;let n;n=$localize`Enter notes text`;let i;i=$localize`:initiate conference discription|initiate conference desciption 6 Options@@InitiateConferenceDescription: To start a video conference, with an agency selected, select a client, select a purpose from the drop-down, then click on the video camera icon. `;let o;o=$localize`:all client description|All CLIENTS Options@@AllClients:All Clients`;let d;d=$localize`:record conference|record conference Options@@RecordConference: Record Conference? ${"\uFFFD#2\uFFFD"}:START_TAG_P_CHECKBOX:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_P_CHECKBOX:`;let p;p=$localize`First Name`;let E;E=$localize`Enter first name`;let N;N=$localize`Last Name`;let T;T=$localize`Enter last name`;let L;return L=$localize`Email`,[i,o,d,[4,"appLoadingIndicator"],[3,"showPopupChange","showPopup","width"],[1,"modal-popup-title"],["id","vcinvites",1,"modal-popup-body"],[3,"ngClass",4,"ngIf"],[1,"form-horizontal",2,"margin","10px",3,"formGroup"],[1,"form-group"],["label","Agency Contacts","formControlName","avContacts",3,"blur"],[3,"value",4,"ngFor","ngForOf"],["formArrayName","contacts",1,"form-group"],["pTemplate","header"],["kind","secondary","size","wide",3,"execute","disabled"],["label",e,"formControlName","notesValue","placeholder",n,3,"maxlength","rows"],[1,"modal-popup-footer"],[3,"execute"],["paginatorPosition","bottom","selectionMode","single","responsiveLayout","scroll",3,"columns","value","paginator","rows","rowsPerPageOptions","autoLayout","loading","onRowSelect",4,"ngIf"],["paginatorPosition","bottom","selectionMode","single","responsiveLayout","scroll",3,"onRowSelect","columns","value","paginator","rows","rowsPerPageOptions","autoLayout","loading"],["pTemplate","caption"],["pTemplate","body"],[3,"pSortableColumn",4,"ngFor","ngForOf"],[3,"pSortableColumn"],[2,"white-space","nowrap"],["ariaLabel","Activate to sort","ariaLabelDesc","Activate to sort in descending order","ariaLabelAsc","Activate to sort in ascending order",3,"field"],[3,"pSelectableRow","pSelectableRowIndex"],["style","width: 150px",3,"ngSwitch",4,"ngFor","ngForOf"],["colspan","4","style","text-align: center",4,"ngIf"],[2,"width","150px",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","fa fa-lg fa-video-enabled fa-video",4,"ngIf"],[1,"ps-1"],[1,"fa","fa-lg","fa-video-enabled","fa-video"],["colspan","4",2,"text-align","center"],["placeholder","Select a Purpose","optionLabel","reason","appendTo","body",3,"ngModelChange","onChange","disabled","options","ngModel"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[3,"click","disabled","className"],["style","padding-left: 10px",4,"ngIf"],[2,"padding-left","10px"],[3,"ngModelChange","ngStyle","disabled","binary","ngModel"],[3,"ngClass"],[3,"value"],[4,"ngFor","ngForOf"],[3,"formGroupName"],[3,"id"],["label",p,"placeholder",E,"formControlName","firstName",3,"maxlength","required"],["label",N,"placeholder",T,"formControlName","lastName",3,"maxlength","required"],["label",L,"formControlName","email",3,"maxlength","required"],["id","btnRemove"],["size","small",3,"execute"]]},template:function(n,i){n&1&&(C(0,ni,4,1,"div",3),r(1,"app-modal-popup",4),P("showPopupChange",function(d){return y(i.showInvitesPopup,d)||(i.showInvitesPopup=d),d}),r(2,"div",5),f(3,"Video Conference Invite"),a(),r(4,"div",6),C(5,ii,4,7,"div",7),r(6,"form",8)(7,"div",9)(8,"bi-dropdown-multi",10),g("blur",function(){return i.onAvContactsSelected()}),C(9,oi,2,4,"bi-option",11),F(10,"sortBy"),a()(),r(11,"div",12)(12,"p-table"),C(13,ai,1,1,"ng-template",13),a()(),r(14,"p")(15,"bi-button",14),g("execute",function(){return i.addContacts()}),f(16,"Add Attendee"),a()(),r(17,"div",9),v(18,"bi-input-textarea",15),a()()(),r(19,"div",16)(20,"bi-action-save",17),g("execute",function(){return i.saveParticipants()}),a(),r(21,"bi-action-cancel",17),g("execute",function(){return i.cancelClicked()}),a()()()),n&2&&(l("appLoadingIndicator",i.loading),s(),D("showPopup",i.showInvitesPopup),l("width",800),s(4),l("ngIf",i.showPopupActionMessage),s(),l("formGroup",i.contactsForm),s(3),l("ngForOf",M(10,9,i.availableContacts,"lastName")),s(6),l("disabled",i.hasMaxContacts),s(3),l("maxlength",500)("rows",6))},dependencies:[G,Ne,ne,ie,re,oe,Xe,Q,We,qe,Ke,ee,Se,Ye,je,Be,ze,Ce,j,q,fe,K,Z,J,te,ue,
6nt,it,ot,rt,dt,lt,_t,ct,st,ht]})}}return t})();var ci=(t,_,e)=>({alert:!0,"alert-success":t,"alert-danger":_,"alert-warning":e});function li(t,_){if(t&1){let e=I();r(0,"div",25),g("click",function(){u(e);let i=c();return h(i.userConferenceInProgressDialogState.modalVisible=!0)}),r(1,"div",26)(2,"div",27)(3,"h3",28),v(4,"i",29),r(5,"span",30),S(6,8),a()(),r(7,"div"),f(8," Client in conference: "),r(9,"strong"),f(10),a()(),r(11,"strong")(12,"span"),S(13,9),a()()()()()}if(t&2){let e=c();s(10),de(" ",e.userConferenceInProgressDialogState.clientLastName,", ",e.userConferenceInProgressDialogState.clientFirstName,"")}}function _i(t,_){if(t&1&&(r(0,"div",11)(1,"strong"),f(2),a(),f(3),a()),t&2){let e=c();l("ngClass",pe(3,ci,e.messageStatus===1,e.messageStatus===2,e.messageStatus===3)),s(2),A(e.actionMessage),s(),R(" ",e.actionMessageDetails," ")}}function di(t,_){if(t&1){let e=I();r(0,"app-conference-client-list",31),g("conferenceEvent",function(i){u(e);let o=c();return h(o.clientConferenceEvent(i))}),a()}}function pi(t,_){if(t&1){let e=I();r(0,"app-scheduled-conferences",31),g("conferenceEvent",function(i){u(e);let o=c();return h(o.scheduledConferenceEvent(i))}),a()}}function Ci(t,_){if(t&1){let e=I();r(0,"app-conference-archives",32),g("conferenceEvent",function(){u(e);let i=c();return h(i.conferenceArchiveEvent())}),a()}if(t&2){let e=c();l("options",e.archiveComponentOptions)}}var be=function(t){return t[t.success=1]="success",t[t.failure=2]="failure",t[t.warning=3]="warning",t}(be||{}),Wt=(()=>{class t{constructor(e,n,i,o){this.$selectedEntityService=e,this.$videoConferenceService=n,this.$urlGeneratorService=i,this.$windowRefService=o,this.conferenceDurationInSeconds=0,this.showActionMessage=!1,this.message="",this.tabClass="",this.showMinimumRequiredSelectedEntitiesModal=!1}ngOnInit(){let e=this;this.$windowRefService.nativeWindow.addEventListener("message",function(i){i.data==="Conference Room Closed"&&e.closeConferenceInProgress()},!1),this.$selectedEntityService.changed.subscribe(()=>{this._selectedEntitiesChanged()}),this.breadItems=[{label:"Agencies"},{label:"Video Conferencing"}],this.$selectedEntityService.selectedEntities.agency||(this.showActionMessage=!0,this.messageStatus=be.warning,this.actionMessage="Warning!",this.actionMessageDetails="Select an Agency to View Client Conferences."),this._getActiveUserConferences(null)}ngOnDestroy(){clearInterval(this._setntervalId)}_selectedEntitiesChanged(){this.$selectedEntityService.selectedEntities.agency?this.showActionMessage=!1:(this.showActionMessage=!0,this.messageStatus=be.warning,this.actionMessage="Warning!",this.actionMessageDetails="Select an Agency to View Client Conferences.")}clientConferenceEvent(e){this.startVideoClick(e)}scheduledConferenceEvent(e){this.startVideoClick(e)}conferenceArchiveEvent(){}_getActiveUserConferences(e){this.$videoConferenceService.getActiveConference().subscribe(n=>{if(n.roomName){this.userConferenceInProgressDialogState={modalVisible:!1,warningVisible:!0,currentDateUtc:n.currentDateUtc,creationDateUtc:n.createDateUtc,expirationDateUtc:n.expirationDateUtc,clientLastName:n.clientLastName,clientFirstName:n.clientFirstName,officerRoomName:n.roomName,officerRoomToken:n.roomToken,officerUniqueUserName:n.officerUserName};let i=new Date(this.userConferenceInProgressDialogState.currentDateUtc),o=new Date(this._userConferenceInProgressDialogState.creationDateUtc),p=new Date(this._userConferenceInProgressDialogState.expirationDateUtc).valueOf()-o.valueOf();this.userConferenceInProgressDialogState.duration=(p/1e3).toString();let E=i.valueOf()-o.valueOf(),N=(p-E)/1e3;this.conferenceDurationInSeconds=Math.round(N)}else this.userConferenceInProgressDialogState={modalVisible:!1,warningVisible:!1,creationDateUtc:this.userConferenceInProgressDialogState.creationDateUtc,expirationDateUtc:this.userConferenceInProgressDialogState.expirationDateUtc,officerRoomName:this.userConferenceInProgressDialogState.officerRoomName,officerRoomToken:this.userConferenceInProgressDialogState.officerRoomToken,officerUniqueUserName:this.userConferenceInProgressDialogState.officerUniqueUserName},e&&this._getActiveClientConferences(e)})}_getActiveClientConferences(e){let n=this;this.$videoConferenceService.getActiveClientConferences(e.clientIdToken).subscribe(i=>{i.length!==0?n.clientConferenceInProgressDialogState={modalVisible:!0,warningVisible:!0}:n._postRooms(e)})}_postRooms(e){this.$videoConferenceService.postRooms(e.clientIdToken,e.reason.id,e.record,e.note,e.entityContacts).subscribe(n=>{this.userConferenceInProgressDialogState={modalVisible:!1,warningVisible:!0,currentDateUtc:n.currentDateUtc,creationDateUtc:n.createDateUtc,expirationDateUtc:n.expirationDateUtc,clientLastName:n.clientLastName,clientFirstName:n.clientFirstName,officerRoomName:n.roomName,officerRoomToken:n.roomToken,officerUniqueUserName:n.officerUserName};let i=new Date(this._userConferenceInProgressDialogState.creationDateUtc),o=new Date(this._userConferenceInProgressDialogState.expirationDateUtc);this.conferenceDurationInSeconds=(o.valueOf()-i.valueOf())/1e3,this.userConferenceInProgressDialogState.duration=this.conferenceDurationInSeconds.toString(),this._windowRedirect(n.roomName,n.roomToken,n.officerUserName,this.conferenceDurationInSeconds)})}_deleteRooms(){this.$videoConferenceService.connectedStatus(!1),this.userConferenceInProgressDialogState={modalVisible:!1,warningVisible:!1},this.$videoConferenceService.deleteRooms().subscribe(e=>{e.result&&this._getActiveUserConferences(null)})}get _vcViewerUrl(){return this.$urlGeneratorService.getRootUrlForApiDomain(x.videoConferenceViewer)}get userConferenceInProgressDialogState(){return this._userConferenceInProgressDialogState||(this._userConferenceInProgressDialogState={modalVisible:!1,warningVisible:!1}),this._userConferenceInProgressDialogState}set userConferenceInProgressDialogState(e){this._userConferenceInProgressDialogState=e}get clientConferenceInProgressDialogState(){return this._clientConferenceInProgressDialogState||(this._clientConferenceInProgressDialogState={modalVisible:!1,warningVisible:!1}),this._clientConferenceInProgressDialogState}set clientConferenceInProgressDialogState(e){this._clientConferenceInProgressDialogState=e}closeConferenceInProgress(){this.userConferenceInProgressDialogState={modalVisible:!1,warningVisible:!1},clearInterval(this._setntervalId),this.closeWindowReference(),this._deleteRooms()}closeWindowReference(){this.$windowRefService.nativeWindow.BiVideoConferenceViewerWindowReference&&!this.isEmpty(window.BiVideoConferenceViewerWindowReference)&&(this.$windowRefService.nativeWindow.BiVideoConferenceViewerWindowReference.close(),this.$windowRefService.nativeWindow.BiVideoConferenceViewerWindowReference={})}isEmpty(e){return Object.keys(e).length===0}cancelConferenceInProgress(){this.clientConferenceInProgressDialogState={modalVisible:!1,warningVisible:!1}}rejoinConferenceInProgress(){this.closeWindowReference(),this._windowRedirect(this.userConferenceInProgressDialogState.officerRoomName,this.userConferenceInProgressDialogState.officerRoomToken,this.userConferenceInProgressDialogState.officerUniqueUserName,this.conferenceDurationInSeconds),this.userConferenceInProgressDialogState={modalVisible:!1,warningVisible:this.userConferenceInProgressDialogState.warningVisible,creationDateUtc:this._userConferenceInProgressDialogState.creationDateUtc,expirationDateUtc:this._userConferenceInProgressDialogState.expirationDateUtc,clientLastName:this._userConferenceInProgressDialogState.clientLastName,clientFirstName:this._userConferenceInProgressDialogState.clientFirstName,officerRoomName:this.userConferenceInProgressDialogState.officerRoomName,officerRoomToken:this.userConferenceInProgressDialogState.officerRoomToken,officerUniqueUserName:this.userConferenceInProgressDialogState.officerUniqueUserName}}startVideoClick(e){e.startEnabled&&(this.$videoConferenceService.connectedStatus(!0),this._getActiveUserConferences(e))}_windowRedirect(e,n,i,o){return Pe(this,null,function*(){let d=`token=${n}`;d+=`&roomName=${e}`,d+=`&name=${i}`,d+="&callCtrl=1",d+=`&d=${o.toString(16)}`;let p=`${this._vcViewerUrl}?${d}`;this.$windowRefService.nativeWindow.BiVideoConferenceViewerWindowReference=this.$windowRefService.nativeWindow.open(p,"_blank")})}tabViewOnChange(e){e.index===2?(this.archiveComponentOptions={action:"reload"},this.tabClass="setMinWidth"):this.tabClass=""}static{this.\u0275fac=function(n){return new(n||t)(O(U),O(H),O(He),O(Te))}}static{this.\u0275cmp=$({type:t,selectors:[["ng-component"]],decls:30,vars:6,consts:()=>{let e;e=$localize`Video Conferencing`;let n;n=$localize`:Video Conference In Progress Title|Display In Progress Workflow 7 Options@@videoConferenceInProgressTitleLabel: Video Conference in Progress `;let i;i=$localize`:Video Conference In Progress Content|Display In Progress Workflow 8 Options@@videoConferenceInProgressContentLabel: A video conference is already in progress with a client. Click Close to end this video conference. Click Rejoin to enter this video conference again. `;let o;o=$localize`:Close|close option in In Progress Workflow Options@@closeButton: Close `;let d;d=$localize`:No|rejoin option in Entity Search Clear@@rejoinButton: Rejoin `;let p;p=$localize`:Video Conference In Progress Title|Display In Progress Workflow 9 Options@@videoConferenceInProgressTitleLabel: Video Conference in Progress `;let E;E=$localize`:Conference In Progress Content|Display In Progress Workflow 10 Options@@conferenceInProgressContentLabel: This client is already in a video conference with another user. `;let N;N=$localize`:Cancel|cancel option in In Progress Workflow Options@@cancelButton: Cancel `;let T;T=$localize`:page instructions|Page instructions Options@@VideoConferenceInstru
10ction: To start a video conference with a client you can select the "Conference a Client" tab and choose a client from the list. The "Scheduled Conferences" tab contains scheduled conferences from your calendar and shows upcoming conferences. The "Conference Archive" tab contains the history of conferences with the option of viewing recorded conferences for replay or download. `;let L;L=$localize`:video conference header|Video Conference in Progress 11 Options@@videoConferenceInProgress:Â Video Conference in Progress`;let w;return w=$localize`:breadcrumb agencies|Agencies Options@@ReconnectToConference:Click to reconnect to the conference in progress.`,[n,i,o,d,p,E,N,T,L,w,[1,"row",2,"padding","0 0 0 0","margin","5px 0 0 0px"],[3,"ngClass"],[3,"showPopupChange","showPopup"],[1,"modal-popup-title"],[1,"modal-popup-body"],[1,"modal-popup-footer"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click"],["type","button","data-dismiss","modal",1,"btn","btn-danger",3,"click"],["name",e],[3,"onChange","className"],["header","Conference a Client"],["pTemplate","content"],["header","Scheduled Conferences"],["header","Conference Archive",3,"cache"],["pTemplate","content","cache","false"],[1,"row",2,"padding","0 0 0 0","margin","5px 0 0 0px",3,"click"],[1,"col-md-12","col-md-offset-1",2,"padding","0px","margin","0px"],[1,"alert","alert-primary","text-center","video-link-connection",2,"margin","0px"],["_ngcontent-c1","",1,"ng-star-inserted","video-link"],["_ngcontent-c1","",1,"fa","fa-video","video-link-message"],["_ngcontent-c1","",1,"video-link-message","ps-1"],[3,"conferenceEvent"],[3,"conferenceEvent","options"]]},template:function(n,i){n&1&&(C(0,li,14,2,"div",10)(1,_i,4,7,"div",11),r(2,"app-modal-popup",12),P("showPopupChange",function(d){return y(i.userConferenceInProgressDialogState.modalVisible,d)||(i.userConferenceInProgressDialogState.modalVisible=d),d}),r(3,"div",13),S(4,0),a(),r(5,"div",14),S(6,1),a(),r(7,"div",15)(8,"button",16),g("click",function(){return i.closeConferenceInProgress()}),S(9,2),a(),r(10,"button",17),g("click",function(){return i.rejoinConferenceInProgress()}),S(11,3),a()()(),r(12,"app-modal-popup",12),P("showPopupChange",function(d){return y(i.clientConferenceInProgressDialogState.modalVisible,d)||(i.clientConferenceInProgressDialogState.modalVisible=d),d}),r(13,"div",13),S(14,4),a(),r(15,"div",14),S(16,5),a(),r(17,"div",15)(18,"button",16),g("click",function(){return i.cancelConferenceInProgress()}),S(19,6),a()()(),r(20,"bi-page-container",18)(21,"p"),S(22,7),a(),r(23,"p-tabView",19),g("onChange",function(d){return i.tabViewOnChange(d)}),r(24,"p-tabPanel",20),C(25,di,1,0,"ng-template",21),a(),r(26,"p-tabPanel",22),C(27,pi,1,0,"ng-template",21),a(),r(28,"p-tabPanel",23),C(29,Ci,1,1,"ng-template",24),a()()()),n&2&&(Ie(i.userConferenceInProgressDialogState.warningVisible===!0?0:-1),s(),Ie(i.showActionMessage?1:-1),s(),D("showPopup",i.userConferenceInProgressDialogState.modalVisible),s(10),D("showPopup",i.clientConferenceInProgressDialogState.modalVisible),s(11),l("className",i.tabClass),s(5),l("cache",!1))},dependencies:[G,At,xt,Ce,ue,at,kt,Gt,Ht],styles:["[_nghost-%COMP%]{display:block}p-tabView[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .alert{margin-top:5px}[_nghost-%COMP%] .p-table-auto-layout>.p-table-wrapper{overflow:hidden}[_nghost-%COMP%] .col-spacing{padding:0}[_nghost-%COMP%] .row-spacing{margin:0 0 20px;padding:0}[_nghost-%COMP%] .fa-video-enabled:hover{color:#595959}[_nghost-%COMP%] .setMinWidth .p-tabview-panels{min-width:64em}[_nghost-%COMP%] .setMinWidth .p-tabview-panels table{margin-bottom:1px}.breadcrumb[_ngcontent-%COMP%]{margin:0}.video-link-message[_ngcontent-%COMP%]{color:red}.video-link-connection[_ngcontent-%COMP%]:hover{box-shadow:inset 0 0 100px 100px #ffffff80;cursor:pointer}.video-link-connection[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%], .video-link-connection[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:#ff4d4d;cursor:pointer} .p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto!important}"]})}}return t})();var fi=[{path:"",component:Wt,pathMatch:"full"}],Xt=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=le({type:t})}
11static{this.\u0275inj=ce({imports:[Ee.forChild(fi),me]})}}return t})();var Po=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=le({type:t})}static{this.\u0275inj=ce({providers:[Ue,ke(Ge())],imports:[Xt,Et,bt,It,Ft,Mt,wt,Rt,Tt,ut,ft,gt,et,Je,mt,Qe,me,vt,Ot,St,Nt,Pt,tt,yt,pt,Ee]})}}return t})();export{Po as VideoConferenceModule};
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.