/home/ivoiecob/email.hirewise-va.com/static/js/RocketChatWebclient.app.38af3150cc940a9c3b3f.min.js
(self.webpackChunkafterlogic_aurora_platform=self.webpackChunkafterlogic_aurora_platform||[]).push([[2620],{"59vb":(t,e,i)=>{"use strict";var n=i("p09A"),o=i("7VXH"),a=i("uQaC"),s=i("Mrin");function r(){this.meetingLinkUrl=s.MeetingLinkUrl.replace(/[^\/]$/,"$&/"),this.allowAddMeetingLink=s.AllowAddMeetingLinkToEvent&&0!==s.MeetingLinkUrl.length,this.focusedDom=n.observable(null)}r.prototype.ViewTemplate="RocketChatWebclient_AddMeetingLinkToEventView",r.prototype.init=function(t){this.isEditable=t.descriptionView.isEditable,this.descriptionDom=t.descriptionView.dataDom,this.descriptionHtml=t.descriptionView.dataHtml,this.descriptionFocus=t.descriptionView.dataFocus,this.descriptionFocus.subscribe(function(){this.descriptionFocus()?this.focusedDom(this.descriptionDom()):(this.savedRanges=o.getSelectionRanges(),setTimeout(function(){this.descriptionFocus()||this.locationFocus()||this.focusedDom(null)}.bind(this),100))},this),this.locationDom=t.locationView.dataDom,this.locationHtml=t.locationView.dataHtml,this.locationFocus=t.locationView.dataFocus,this.locationFocus.subscribe(function(){this.locationFocus()?this.focusedDom(this.locationDom()):setTimeout(function(){this.descriptionFocus()||this.locationFocus()||this.focusedDom(null)}.bind(this),100)},this)},r.prototype.addMeetingLink=function(){var t=this.meetingLinkUrl,e=a.getRandomHash(32),i="".concat(t).concat(e),n='<a href="'.concat(i,'">').concat(i,"</a>");this.focusedDom()?(o.setSelectionRanges(this.savedRanges,!0),this.focusedDom().focus(),window.document.execCommand("insertHTML",!1,n)):(o.setCursorAtTheEnd(this.locationDom()[0]),window.document.execCommand("insertHTML",!1,n)),this.descriptionFocus()?this.descriptionHtml(this.descriptionDom().html()):this.locationFocus()&&this.locationHtml(this.locationDom().html())},t.exports=new r},"7VXH":(t,e,i)=>{"use strict";var n=i("a7T2"),o={setCursorAtTheEnd:function(t){if(document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var i=window.getSelection();i.removeAllRanges(),i.addRange(e),t.focus(),e.detach()}},getSelectionRanges:function(){var t=[];if(window.getSelection)for(var e=window.getSelection(),i=e.rangeCount,n=0;n<i;n++)t.push(e.getRangeAt(n));return t},setSelectionRanges:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i="";if(window.getSelection&&n.isArray(t)){var o=t.length,a=window.getSelection();a.removeAllRanges();for(var s=0;s<o;s++){var r=t[s];r&&(a.addRange(r),i+=r,e&&r.collapse(!1))}}return i}};t.exports=o},"7rNz":(t,e,i)=>{"use strict";var n=i("a7T2"),o=i("p09A"),a=i("ERH9"),s=i("uQaC"),r=i("8QQh"),c=(i("D2Gh"),i("LKDt")),h=i("db2p"),l=i("ioSH"),d=i("KIwC"),u=i("Mrin"),m=i("gSOl");function p(){h.call(this,"RocketChatWebclient"),this.initialized=o.observable(!1),this.sChatUrl=u.ChatUrl,this.iframeDom=o.observable(null),this.iframeLoaded=o.observable(!1),this.chatToken=o.observable(""),this.infoMessage=o.observable(c.i18n("COREWEBCLIENT/INFO_LOADING")),o.computed(function(){this.iframeDom()&&this.chatToken()&&this.iframeLoaded()&&this.init()},this),r.send(u.ServerModuleName,"InitChat",{},function(t){t.Result&&t.Result.authToken?(this.chatToken(t.Result.authToken),m.unseenCount(a.pInt(t.Result.unreadCounter))):this.infoMessage(c.i18n("ROCKETCHATWEBCLIENT/ERROR_INIT_CHAT"))},this),this.iframeDom.subscribe(function(t){var e=this;t[0].addEventListener("load",function(){window.addEventListener("message",function(t){t&&t.data&&this.iframeDom()&&t.source===this.iframeDom()[0].contentWindow&&(this.iframeLoaded(!0),"notification"===t.data.eventName&&this.showNotification(t.data.data.notification),"unread-changed"===t.data.eventName&&m.unseenCount(a.pInt(t.data.data)))}.bind(e))})},this)}n.extendOwn(p.prototype,h.prototype),p.prototype.ViewTemplate="RocketChatWebclient_MainView",p.prototype.ViewConstructorName="CMainView",p.prototype.init=function(){if(!this.initialized()){var t=document.getElementById("rocketchat_iframe"),e=this;t.contentWindow.postMessage({externalCommand:"login-with-token",token:e.chatToken()},"*"),setTimeout(function(){t.contentWindow.postMessage({externalCommand:"set-aurora-theme",theme:d.Theme},"*"),e.initialized(!0)},2e3)}},p.prototype.showNotification=function(t){var e={action:"show",icon:this.sChatUrl+"avatar/"+t.payload.sender.username+"?size=50&format=png",title:t.title,body:t.text,callback:function(){window.focus(),this.shown()||l.setHash([u.HashModuleName]);var e="";switch(t.payload.type){case"c":e="/channel/"+t.payload.name;break;case"d":e="/direct/"+t.payload.rid;break;case"p":e="/group/"+t.payload.name}e&&this.iframeDom()[0].contentWindow.postMessage({externalCommand:"go",path:e},"*")}.bind(this)};s.desktopNotify(e)},t.exports=new p},EW18:(t,e,i)=>{"use strict";var n=i("M4cL");t.exports=function(t){var e=i("p09A"),o=i("yU9o"),a=i("LKDt"),s=i("Mrin"),r=i("zVyH"),c=[],h=null;s.init(t);var l=s.AppName?a.getUrlFriendlyName(s.AppName):s.HashModuleName;if(o.isUserNormalOrTenant()){var d={getScreens:function(){var t={};return t[s.HashModuleName]=function(){return i("7rNz")},t}};return o.isNewTab()||(o.subscribeEvent("CalendarWebclient::RegisterEditEventController",function(t){var e=t.register,n=t.view,o=i("59vb");o.init(n),e(o,"AdditionalButton")}),d.start=function(t){i("D2Gh").initHiddenView(s.HashModuleName),""!==s.ChatUrl&&t.run("SettingsWebclient","registerSettingsTab",[function(){return i("aZaw")},s.HashModuleName,a.i18n("ROCKETCHATWEBCLIENT/LABEL_SETTINGS_TAB")]),o.subscribeEvent("Logout",function(){n("#rocketchat_iframe")&&(n("#rocketchat_iframe").hide(),n("#rocketchat_iframe").get(0).contentWindow.postMessage({externalCommand:"logout"},"*"))}),""!==s.ChatUrl&&o.subscribeEvent("ContactsWebclient::AddCustomCommand",function(t){t.Callback({Text:a.i18n("ROCKETCHATWEBCLIENT/ACTION_CHAT_WITH_CONTACT"),CssClass:"chat",Handler:function(){var t=c[this.uuid()];if(t&&!t.closed)t.focus();else{var e=window.screen.width,i=Math.ceil((e-360)/2),n=window.screen.height,o=Math.ceil((n-600)/2),a="?chat-direct="+this.uuid()+"&"+(new Date).getTime(),s=",width=360,height=600,top="+o+",left="+i;(t=r.open(a,"Chat",!1,s))&&(c[this.uuid()]=t)}},Visible:e.computed(function(){return t.Contact.team()&&!t.Contact.itsMe()})})})},d.getHeaderItem=function(){if(null===h&&(h=i("gSOl")),""!==s.ChatUrl)return{item:h,name:l}}),d}return null}},Mrin:(t,e,i)=>{"use strict";var n=i("a7T2"),o=i("ERH9");t.exports={ServerModuleName:"RocketChatWebclient",HashModuleName:"chat",ChatUrl:"",AllowAddMeetingLinkToEvent:!1,MeetingLinkUrl:"",init:function(t){var e=t.RocketChatWebclient;n.isEmpty(e)||(this.ChatUrl=o.pString(e.ChatUrl),this.AllowAddMeetingLinkToEvent=o.pBool(e.AllowAddMeetingLinkToEvent),this.MeetingLinkUrl=o.pString(e.MeetingLinkUrl))}}},TFLG:(t,e,i)=>{"use strict";var n=i("8QQh"),o=i("Mrin");t.exports={send:function(t,e,i,a,s){n.send(s||o.ServerModuleName,t,e,i,a)}}},aZaw:(t,e,i)=>{"use strict";var n=i("yU9o"),o=i("TFLG"),a=i("LKDt"),s=i("Mrin"),r=i("KIwC");function c(){this.sAppName=s.AppName||a.i18n("ROCKETCHATWEBCLIENT/LABEL_SETTINGS_TAB"),this.server=s.ChatUrl,this.bDemo=r.IsDemo,this.sDownloadLink="https://www.rocket.chat/download-apps",this.credentialsHintText=n.mobileCredentialsHintText}c.prototype.getLoginForCurrentUser=function(){o.send("GetLoginForCurrentUser",{},function(t){this.sLogin(t.Result)},this)},c.prototype.ViewTemplate="RocketChatWebclient_RocketChatSettingsPaneView",t.exports=new c},cR1d:(t,e,i)=>{var n=i("p09A"),o=i("ioSH");function a(t){this.sName="",this.visible=n.observable(!0),this.baseHash=n.observable(""),this.hash=n.observable(""),this.linkText=n.observable(t),this.isCurrent=n.observable(!1),this.recivedAnim=n.observable(!1).extend({autoResetToFalse:500}),this.unseenCount=n.observable(0),this.allowChangeTitle=n.observable(!1),this.inactiveTitle=n.observable(""),this.excludedHashes=n.observableArray([])}a.prototype.ViewTemplate="CoreWebclient_HeaderItemView",a.prototype.setName=function(t){this.sName=t.toLowerCase(),""===this.baseHash()?(this.hash(o.buildHashFromArray([t.toLowerCase()])),this.baseHash(this.hash())):this.hash(this.baseHash())},t.exports=a},gSOl:(t,e,i)=>{"use strict";var n=i("a7T2"),o=i("p09A"),a=i("LKDt"),s=(i("ERH9"),i("TFLG"),i("cR1d")),r=i("zVyH");function c(){s.call(this,a.i18n("ROCKETCHATWEBCLIENT/ACTION_SHOW_CHAT")),this.iAutoCheckMailTimer=-1,this.unseenCount=o.observable(0),this.mainHref=o.computed(function(){return this.hash()},this)}c.prototype.onChatClick=function(t,e){r.open("?chat","Chat")},n.extendOwn(c.prototype,s.prototype),c.prototype.ViewTemplate="RocketChatWebclient_HeaderItemView";var h=new c;h.allowChangeTitle(!0),t.exports=h}}]);