(function(){"use strict";u8.Crm.ChangeNotificationsHub=function(){this._isDisposed=false;this._watchlistHub=null};$.extend(u8.Crm.ChangeNotificationsHub.prototype,{init:function(){if(!$.connection||!$.connection.watchListHub){return}this._watchlistHub=$.connection.watchListHub;var i=this;this._watchlistHub.client.subscribed=this._subscribed;this._watchlistHub.client.invokePopupNotification=this._invokePopupNotification;$.connection.hub.start().done(function(){i._watchlistHub.server.subscribeToNotifications(u8.session.identity.repId)})},_subscribed:function(i){},_invokePopupNotification:function(i){var t=u8.application.getWorkWindow();u8.using({texts:[],types:["ViewChangeNotificationPopup"]},function(){var n=new u8.Crm.Widgets.ViewChangeNotificationPopup(t,{parent:page});n.open(i)})}});u8.services.add({name:"changeNotificationsHub",scope:"Application",ctor:u8.Crm.ChangeNotificationsHub})})();