"],_default:[0,"",""]};Ka.optgroup=Ka.option,Ka.tbody=Ka.tfoot=Ka.colgroup=Ka.caption=Ka.thead,Ka.th=Ka.td;var La=/<|?\w+;/;!function(){var a=X.createDocumentFragment(),b=a.appendChild(X.createElement("div")),c=X.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),da.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",da.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var Ma=/^key/,Na=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Oa=/^([^.]*)(?:\.(.+)|)/;fa.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=za.get(a);if(q)for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=fa.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof fa&&fa.event.triggered!==b.type?fa.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(va)||[""],j=b.length;j--;)h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=fa.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=fa.event.special[n]||{},k=fa.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&fa.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),fa.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=za.hasData(a)&&za.get(a);if(q&&(i=q.events)){for(b=(b||"").match(va)||[""],j=b.length;j--;)if(h=Oa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=fa.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||fa.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)fa.event.remove(a,n+b[j],c,d,!0);fa.isEmptyObject(i)&&za.remove(a,"handle events")}},dispatch:function(a){a=fa.event.fix(a);var b,c,d,e,f,g=[],h=Y.call(arguments),i=(za.get(this,"events")||{})[a.type]||[],j=fa.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=fa.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(f.namespace)||(a.handleObj=f,a.data=f.data,d=((fa.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?fa(e,this).index(i)>-1:fa.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,Qa=/.")}},l.load(function(){k=!0}),i.fn=i.prototype={init:function(b,c,d){var e=a(this);this.url=b,this.qs=c,this.lastError=null,this._={keepAliveData:{},connectingMessageBuffer:new g(this,function(a){e.triggerHandler(n.onReceived,[a])}),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0},"boolean"==typeof d&&(this.logging=d)},_parseResponse:function(a){var b=this;return a&&"string"==typeof a?b.json.parse(a):a},_originalJson:b.JSON,json:b.JSON,isCrossDomain:function(c,d){var e;return c=a.trim(c),d=d||b.location,0!==c.indexOf("http")?!1:(e=b.document.createElement("a"),e.href=c,e.protocol+f(e.protocol,e.host)!==d.protocol+f(d.protocol,d.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:i.connectionState.disconnected,clientProtocol:"1.5",reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(c,e){var f,g=this,j={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},o=g._deferral||a.Deferred(),p=b.document.createElement("a");if(g.lastError=null,g._deferral=o,!g.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if("function"===a.type(c)?e=c:"object"===a.type(c)&&(a.extend(j,c),"function"===a.type(j.callback)&&(e=j.callback)),j.transport=d(j.transport,g),!j.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");if(g._.config=j,!k&&j.waitForPageLoad===!0)return g._.deferredStartHandler=function(){g.start(c,e)},l.bind("load",g._.deferredStartHandler),o.promise();if(g.state===i.connectionState.connecting)return o.promise();if(q(g,i.connectionState.disconnected,i.connectionState.connecting)===!1)return o.resolve(g),o.promise();t(g),p.href=g.url,p.protocol&&":"!==p.protocol?(g.protocol=p.protocol,g.host=p.host):(g.protocol=b.document.location.protocol,g.host=p.host||b.document.location.host),g.baseUrl=g.protocol+"//"+g.host,g.wsProtocol="https:"===g.protocol?"wss://":"ws://","auto"===j.transport&&j.jsonp===!0&&(j.transport="longPolling"),0===g.url.indexOf("//")&&(g.url=b.location.protocol+g.url,g.log("Protocol relative URL detected, normalizing it to '"+g.url+"'.")),this.isCrossDomain(g.url)&&(g.log("Auto detected cross domain url."),"auto"===j.transport&&(j.transport=["webSockets","serverSentEvents","longPolling"]),"undefined"==typeof j.withCredentials&&(j.withCredentials=!0),j.jsonp||(j.jsonp=!a.support.cors,j.jsonp&&g.log("Using jsonp because this browser doesn't support CORS.")),g.contentType=i._.defaultContentType),g.withCredentials=j.withCredentials,g.ajaxDataType=j.jsonp?"jsonp":"text",a(g).bind(n.onStart,function(b,c){"function"===a.type(e)&&e.call(g),o.resolve(g)}),g._.initHandler=i.transports._logic.initHandler(g),f=function(c,d){var e=i._.error(h.noTransportOnInit);if(d=d||0,d>=c.length)return 0===d?g.log("No transports supported by the server were selected."):1===d?g.log("No fallback transports were selected."):g.log("Fallback transports exhausted."),a(g).triggerHandler(n.onError,[e]),o.reject(e),void g.stop();if(g.state!==i.connectionState.disconnected){var j=c[d],k=i.transports[j],m=function(){f(c,d+1)};g.transport=k;try{g._.initHandler.start(k,function(){var c=i._.firefoxMajorVersion(b.navigator.userAgent)>=11,d=!!g.withCredentials&&c;g.log("The start request succeeded. Transitioning to the connected state."),s(g)&&i.transports._logic.monitorKeepAlive(g),i.transports._logic.startHeartbeat(g),i._.configurePingInterval(g),q(g,i.connectionState.connecting,i.connectionState.connected)||g.log("WARNING! The connection was not in the connecting state."),g._.connectingMessageBuffer.drain(),a(g).triggerHandler(n.onStart),l.bind("unload",function(){g.log("Window unloading, stopping the connection."),g.stop(d)}),c&&l.bind("beforeunload",function(){b.setTimeout(function(){g.stop(d)},0)})},m)}catch(p){g.log(k.name+" transport threw '"+p.message+"' when attempting to start."),m()}}};var r=g.url+"/negotiate",u=function(b,c){var d=i._.error(h.errorOnNegotiate,b,c._.negotiateRequest);a(c).triggerHandler(n.onError,d),o.reject(d),c.stop()};return a(g).triggerHandler(n.onStarting),r=i.transports._logic.prepareQueryString(g,r),g.log("Negotiating with '"+r+"'."),g._.negotiateRequest=i.transports._logic.ajax(g,{url:r,error:function(a,b){b!==m?u(a,g):o.reject(i._.error(h.stoppedWhileNegotiating,null,g._.negotiateRequest))},success:function(b){var c,d,e,k=[],l=[];try{c=g._parseResponse(b)}catch(m){return void u(i._.error(h.errorParsingNegotiateResponse,m),g)}return d=g._.keepAliveData,g.appRelativeUrl=c.Url,g.id=c.ConnectionId,g.token=c.ConnectionToken,g.webSocketServerUrl=c.WebSocketServerUrl,g._.pollTimeout=1e3*c.ConnectionTimeout+1e4,g.disconnectTimeout=1e3*c.DisconnectTimeout,g._.totalTransportConnectTimeout=g.transportConnectTimeout+1e3*c.TransportConnectTimeout,c.KeepAliveTimeout?(d.activated=!0,d.timeout=1e3*c.KeepAliveTimeout,d.timeoutWarning=d.timeout*g.keepAliveWarnAt,g._.beatInterval=(d.timeout-d.timeoutWarning)/3):d.activated=!1,g.reconnectWindow=g.disconnectTimeout+(d.timeout||0),c.ProtocolVersion&&c.ProtocolVersion===g.clientProtocol?(a.each(i.transports,function(a){return 0===a.indexOf("_")||"webSockets"===a&&!c.TryWebSockets?!0:void l.push(a)}),a.isArray(j.transport)?a.each(j.transport,function(b,c){a.inArray(c,l)>=0&&k.push(c)}):"auto"===j.transport?k=l:a.inArray(j.transport,l)>=0&&k.push(j.transport),void f(k)):(e=i._.error(i._.format(h.protocolIncompatible,g.clientProtocol,c.ProtocolVersion)),a(g).triggerHandler(n.onError,[e]),void o.reject(e))}}),o.promise()},starting:function(b){var c=this;return a(c).bind(n.onStarting,function(a,d){b.call(c)}),c},send:function(a){var b=this;if(b.state===i.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(b.state===i.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return b.transport.send(b,a),b},received:function(b){var c=this;return a(c).bind(n.onReceived,function(a,d){b.call(c,d)}),c},stateChanged:function(b){var c=this;return a(c).bind(n.onStateChanged,function(a,d){b.call(c,d)}),c},error:function(b){var c=this;return a(c).bind(n.onError,function(a,d,e){c.lastError=d,b.call(c,d,e)}),c},disconnected:function(b){var c=this;return a(c).bind(n.onDisconnect,function(a,d){b.call(c)}),c},connectionSlow:function(b){var c=this;return a(c).bind(n.onConnectionSlow,function(a,d){b.call(c)}),c},reconnecting:function(b){var c=this;return a(c).bind(n.onReconnecting,function(a,d){b.call(c)}),c},reconnected:function(b){var c=this;return a(c).bind(n.onReconnect,function(a,d){b.call(c)}),c},stop:function(c,d){var e=this,f=e._deferral;return e._.deferredStartHandler&&l.unbind("load",e._.deferredStartHandler),delete e._.config,delete e._.deferredStartHandler,k||e._.config&&e._.config.waitForPageLoad!==!0?e.state!==i.connectionState.disconnected?(e.log("Stopping connection."),q(e,e.state,i.connectionState.disconnected),b.clearTimeout(e._.beatHandle),b.clearInterval(e._.pingIntervalId),e.transport&&(e.transport.stop(e),d!==!1&&e.transport.abort(e,c),s(e)&&i.transports._logic.stopMonitoringKeepAlive(e),e.transport=null),e._.negotiateRequest&&(e._.negotiateRequest.abort(m),delete e._.negotiateRequest),e._.initHandler&&e._.initHandler.stop(),a(e).triggerHandler(n.onDisconnect),delete e._deferral,delete e.messageId,delete e.groupsToken,delete e.id,delete e._.pingIntervalId,delete e._.lastMessageAt,delete e._.lastActiveAt,e._.connectingMessageBuffer.clear(),e):void 0:(e.log("Stopping connection prior to negotiate."),void(f&&f.reject(i._.error(h.stoppedWhileLoading))))},log:function(a){p(a,this.logging)}},i.fn.init.prototype=i.fn,i.noConflict=function(){return a.connection===i&&(a.connection=j),i},a.connection&&(j=a.connection),a.connection=a.signalR=i}(window.jQuery,window),function(a,b,c){function d(a){a._.keepAliveData.monitoring&&e(a),h.markActive(a)&&(a._.beatHandle=b.setTimeout(function(){d(a)},a._.beatInterval))}function e(b){var c,d=b._.keepAliveData;b.state===i.connectionState.connected&&(c=(new Date).getTime()-b._.lastMessageAt,c>=d.timeout?(b.log("Keep alive timed out. Notifying transport that connection has been lost."),b.transport.lostConnection(b)):c>=d.timeoutWarning?d.userNotified||(b.log("Keep alive has been missed, connection may be dead/slow."),a(b).triggerHandler(j.onConnectionSlow),d.userNotified=!0):d.userNotified=!1)}function f(a,b){var c=a.url+b;return a.transport&&(c+="?transport="+a.transport.name),h.prepareQueryString(a,c)}function g(a){this.connection=a,this.startRequested=!1,this.startCompleted=!1,this.connectionStopped=!1}var h,i=a.signalR,j=a.signalR.events,k=a.signalR.changeState,l="__Start Aborted__";i.transports={},g.prototype={start:function(a,d,e){var f=this,g=f.connection,h=!1;return f.startRequested||f.connectionStopped?void g.log("WARNING! "+a.name+" transport cannot be started. Initialization ongoing or completed."):(g.log(a.name+" transport starting."),f.transportTimeoutHandle=b.setTimeout(function(){h||(h=!0,g.log(a.name+" transport timed out when trying to connect."),f.transportFailed(a,c,e))},g._.totalTransportConnectTimeout),void a.start(g,function(){h||f.initReceived(a,d)},function(b){return h||(h=!0,f.transportFailed(a,b,e)),!f.startCompleted||f.connectionStopped}))},stop:function(){this.connectionStopped=!0,b.clearTimeout(this.transportTimeoutHandle),i.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(a,c){var d=this,e=d.connection;return d.startRequested?void e.log("WARNING! The client received multiple init messages."):void(d.connectionStopped||(d.startRequested=!0,b.clearTimeout(d.transportTimeoutHandle),e.log(a.name+" transport connected. Initiating start request."),i.transports._logic.ajaxStart(e,function(){
d.startCompleted=!0,c()})))},transportFailed:function(c,d,e){var f,g=this.connection,h=g._deferral;this.connectionStopped||(b.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(f=i._.error(i.resources.errorDuringStartRequest,d),g.log(c.name+" transport failed during the start request. Stopping the connection."),a(g).triggerHandler(j.onError,[f]),h&&h.reject(f),g.stop()):(c.stop(g),g.log(c.name+" transport failed to connect. Attempting to fall back."),e()))}},h=i.transports._logic={ajax:function(b,c){return a.ajax(a.extend(!0,{},a.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:b.withCredentials},contentType:b.contentType,dataType:b.ajaxDataType},c))},pingServer:function(b){var c,d,e=a.Deferred();return b.transport?(c=b.url+"/ping",c=h.addQs(c,b.qs),d=h.ajax(b,{url:c,success:function(a){var c;try{c=b._parseResponse(a)}catch(f){return e.reject(i._.transportError(i.resources.pingServerFailedParse,b.transport,f,d)),void b.stop()}"pong"===c.Response?e.resolve():e.reject(i._.transportError(i._.format(i.resources.pingServerFailedInvalidResponse,a),b.transport,null,d))},error:function(a){401===a.status||403===a.status?(e.reject(i._.transportError(i._.format(i.resources.pingServerFailedStatusCode,a.status),b.transport,a,d)),b.stop()):e.reject(i._.transportError(i.resources.pingServerFailed,b.transport,a,d))}})):e.reject(i._.transportError(i.resources.noConnectionTransport,b.transport)),e.promise()},prepareQueryString:function(a,c){var d;return d=h.addQs(c,"clientProtocol="+a.clientProtocol),d=h.addQs(d,a.qs),a.token&&(d+="&connectionToken="+b.encodeURIComponent(a.token)),a.data&&(d+="&connectionData="+b.encodeURIComponent(a.data)),d},addQs:function(b,c){var d,e=-1!==b.indexOf("?")?"&":"?";if(!c)return b;if("object"==typeof c)return b+e+a.param(c);if("string"==typeof c)return d=c.charAt(0),"?"!==d&&"&"!==d||(e=""),b+e+c;throw new Error("Query string property must be either a string or object.")},getUrl:function(a,c,d,e,f){var g="webSockets"===c?"":a.baseUrl,i=g+a.appRelativeUrl,j="transport="+c;return!f&&a.groupsToken&&(j+="&groupsToken="+b.encodeURIComponent(a.groupsToken)),d?(i+=e?"/poll":"/reconnect",!f&&a.messageId&&(j+="&messageId="+b.encodeURIComponent(a.messageId))):i+="/connect",i+="?"+j,i=h.prepareQueryString(a,i),f||(i+="&tid="+Math.floor(11*Math.random())),i},maximizePersistentResponse:function(a){return{MessageId:a.C,Messages:a.M,Initialized:"undefined"!=typeof a.S,ShouldReconnect:"undefined"!=typeof a.T,LongPollDelay:a.L,GroupsToken:a.G}},updateGroups:function(a,b){b&&(a.groupsToken=b)},stringifySend:function(a,b){return"string"==typeof b||"undefined"==typeof b||null===b?b:a.json.stringify(b)},ajaxSend:function(b,c){var d,e=h.stringifySend(b,c),g=f(b,"/send"),k=function(b,e){a(e).triggerHandler(j.onError,[i._.transportError(i.resources.sendFailed,e.transport,b,d),c])};return d=h.ajax(b,{url:g,type:"jsonp"===b.ajaxDataType?"GET":"POST",contentType:i._.defaultContentType,data:{data:e},success:function(a){var c;if(a){try{c=b._parseResponse(a)}catch(d){return k(d,b),void b.stop()}h.triggerReceived(b,c)}},error:function(a,c){"abort"!==c&&"parsererror"!==c&&k(a,b)}})},ajaxAbort:function(a,b){if("undefined"!=typeof a.transport){b="undefined"==typeof b?!0:b;var c=f(a,"/abort");h.ajax(a,{url:c,async:b,timeout:1e3,type:"POST"}),a.log("Fired ajax abort async = "+b+".")}},ajaxStart:function(b,c){var d=function(a){var c=b._deferral;c&&c.reject(a)},e=function(c){b.log("The start request failed. Stopping the connection."),a(b).triggerHandler(j.onError,[c]),d(c),b.stop()};b._.startRequest=h.ajax(b,{url:f(b,"/start"),success:function(a,d,f){var g;try{g=b._parseResponse(a)}catch(h){return void e(i._.error(i._.format(i.resources.errorParsingStartResponse,a),h,f))}"started"===g.Response?c():e(i._.error(i._.format(i.resources.invalidStartResponse,a),null,f))},error:function(a,c,f){c!==l?e(i._.error(i.resources.errorDuringStartRequest,f,a)):(b.log("The start request aborted because connection.stop() was called."),d(i._.error(i.resources.stoppedDuringStartRequest,null,a)))}})},tryAbortStartRequest:function(a){a._.startRequest&&(a._.startRequest.abort(l),delete a._.startRequest)},tryInitialize:function(a,b){a.Initialized&&b()},triggerReceived:function(b,c){b._.connectingMessageBuffer.tryBuffer(c)||a(b).triggerHandler(j.onReceived,[c])},processMessages:function(b,c,d){var e;h.markLastMessage(b),c&&(e=h.maximizePersistentResponse(c),h.updateGroups(b,e.GroupsToken),e.MessageId&&(b.messageId=e.MessageId),e.Messages&&(a.each(e.Messages,function(a,c){h.triggerReceived(b,c)}),h.tryInitialize(e,d)))},monitorKeepAlive:function(b){var c=b._.keepAliveData;c.monitoring?b.log("Tried to monitor keep alive but it's already being monitored."):(c.monitoring=!0,h.markLastMessage(b),b._.keepAliveData.reconnectKeepAliveUpdate=function(){h.markLastMessage(b)},a(b).bind(j.onReconnect,b._.keepAliveData.reconnectKeepAliveUpdate),b.log("Now monitoring keep alive with a warning timeout of "+c.timeoutWarning+", keep alive timeout of "+c.timeout+" and disconnecting timeout of "+b.disconnectTimeout))},stopMonitoringKeepAlive:function(b){var c=b._.keepAliveData;c.monitoring&&(c.monitoring=!1,a(b).unbind(j.onReconnect,b._.keepAliveData.reconnectKeepAliveUpdate),b._.keepAliveData={},b.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(a){a._.lastActiveAt=(new Date).getTime(),d(a)},markLastMessage:function(a){a._.lastMessageAt=(new Date).getTime()},markActive:function(a){return h.verifyLastActive(a)?(a._.lastActiveAt=(new Date).getTime(),!0):!1},isConnectedOrReconnecting:function(a){return a.state===i.connectionState.connected||a.state===i.connectionState.reconnecting},ensureReconnectingState:function(b){return k(b,i.connectionState.connected,i.connectionState.reconnecting)===!0&&a(b).triggerHandler(j.onReconnecting),b.state===i.connectionState.reconnecting},clearReconnectTimeout:function(a){a&&a._.reconnectTimeout&&(b.clearTimeout(a._.reconnectTimeout),delete a._.reconnectTimeout)},verifyLastActive:function(b){if((new Date).getTime()-b._.lastActiveAt>=b.reconnectWindow){var c=i._.format(i.resources.reconnectWindowTimeout,new Date(b._.lastActiveAt),b.reconnectWindow);return b.log(c),a(b).triggerHandler(j.onError,[i._.error(c,"TimeoutException")]),b.stop(!1,!1),!1}return!0},reconnect:function(a,c){var d=i.transports[c];if(h.isConnectedOrReconnecting(a)&&!a._.reconnectTimeout){if(!h.verifyLastActive(a))return;a._.reconnectTimeout=b.setTimeout(function(){h.verifyLastActive(a)&&(d.stop(a),h.ensureReconnectingState(a)&&(a.log(c+" reconnecting."),d.start(a)))},a.reconnectDelay)}},handleParseFailure:function(b,c,d,e,f){var g=i._.transportError(i._.format(i.resources.parseFailed,c),b.transport,d,f);e&&e(g)?b.log("Failed to parse server response while attempting to connect."):(a(b).triggerHandler(j.onError,[g]),b.stop())},initHandler:function(a){return new g(a)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(a,b,c){var d=a.signalR,e=a.signalR.events,f=a.signalR.changeState,g=d.transports._logic;d.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(b,c){var f=g.stringifySend(b,c);try{b.socket.send(f)}catch(h){a(b).triggerHandler(e.onError,[d._.transportError(d.resources.webSocketsInvalidState,b.transport,h,b.socket),c])}},start:function(c,h,i){var j,k=!1,l=this,m=!h,n=a(c);return b.WebSocket?void(c.socket||(j=c.webSocketServerUrl?c.webSocketServerUrl:c.wsProtocol+c.host,j+=g.getUrl(c,this.name,m),c.log("Connecting to websocket endpoint '"+j+"'."),c.socket=new b.WebSocket(j),c.socket.onopen=function(){k=!0,c.log("Websocket opened."),g.clearReconnectTimeout(c),f(c,d.connectionState.reconnecting,d.connectionState.connected)===!0&&n.triggerHandler(e.onReconnect)},c.socket.onclose=function(b){var f;this===c.socket&&(k&&"undefined"!=typeof b.wasClean&&b.wasClean===!1?(f=d._.transportError(d.resources.webSocketClosed,c.transport,b),c.log("Unclean disconnect from websocket: "+(b.reason||"[no reason given]."))):c.log("Websocket closed."),i&&i(f)||(f&&a(c).triggerHandler(e.onError,[f]),l.reconnect(c)))},c.socket.onmessage=function(b){var d;try{d=c._parseResponse(b.data)}catch(e){return void g.handleParseFailure(c,b.data,e,i,b)}d&&(a.isEmptyObject(d)||d.M?g.processMessages(c,d,h):g.triggerReceived(c,d))})):void i()},reconnect:function(a){g.reconnect(a,this.name)},lostConnection:function(a){this.reconnect(a)},stop:function(a){g.clearReconnectTimeout(a),a.socket&&(a.log("Closing the Websocket."),a.socket.close(),a.socket=null)},abort:function(a,b){g.ajaxAbort(a,b)}}}(window.jQuery,window),function(a,b,c){var d=a.signalR,e=a.signalR.events,f=a.signalR.changeState,g=d.transports._logic,h=function(a){b.clearTimeout(a._.reconnectAttemptTimeoutHandle),delete a._.reconnectAttemptTimeoutHandle};d.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(c,i,j){var k,l=this,m=!1,n=a(c),o=!i;if(c.eventSource&&(c.log("The connection already has an event source. Stopping it."),c.stop()),!b.EventSource)return void(j&&(c.log("This browser doesn't support SSE."),j()));k=g.getUrl(c,this.name,o);try{c.log("Attempting to connect to SSE endpoint '"+k+"'."),c.eventSource=new b.EventSource(k,{withCredentials:c.withCredentials})}catch(p){return c.log("EventSource failed trying to connect with error "+p.Message+"."),void(j?j():(n.triggerHandler(e.onError,[d._.transportError(d.resources.eventSourceFailedToConnect,c.transport,p)]),o&&l.reconnect(c)))}o&&(c._.reconnectAttemptTimeoutHandle=b.setTimeout(function(){m===!1&&c.eventSource.readyState!==b.EventSource.OPEN&&l.reconnect(c)},l.timeOut)),c.eventSource.addEventListener("open",function(a){c.log("EventSource connected."),h(c),g.clearReconnectTimeout(c),m===!1&&(m=!0,f(c,d.connectionState.reconnecting,d.connectionState.connected)===!0&&n.triggerHandler(e.onReconnect))},!1),c.eventSource.addEventListener("message",function(a){var b;if("initialized"!==a.data){try{b=c._parseResponse(a.data)}catch(d){return void g.handleParseFailure(c,a.data,d,j,a)}g.processMessages(c,b,i)}},!1),c.eventSource.addEventListener("error",function(a){var f=d._.transportError(d.resources.eventSourceError,c.transport,a);this===c.eventSource&&(j&&j(f)||(c.log("EventSource readyState: "+c.eventSource.readyState+"."),a.eventPhase===b.EventSource.CLOSED?(c.log("EventSource reconnecting due to the server connection ending."),l.reconnect(c)):(c.log("EventSource error."),n.triggerHandler(e.onError,[f]))))},!1)},reconnect:function(a){g.reconnect(a,this.name)},lostConnection:function(a){this.reconnect(a)},send:function(a,b){g.ajaxSend(a,b)},stop:function(a){h(a),g.clearReconnectTimeout(a),a&&a.eventSource&&(a.log("EventSource calling close()."),a.eventSource.close(),a.eventSource=null,delete a.eventSource)},abort:function(a,b){g.ajaxAbort(a,b)}}}(window.jQuery,window),function(a,b,c){var d=a.signalR,e=a.signalR.events,f=a.signalR.changeState,g=d.transports._logic,h=function(){var a=b.document.createElement("iframe");return a.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),a},i=function(){var a=null,c=1e3,e=0;return{prevent:function(){d._.ieVersion<=8&&(0===e&&(a=b.setInterval(function(){var a=h();b.document.body.appendChild(a),b.document.body.removeChild(a),a=null},c)),e++)},cancel:function(){1===e&&b.clearInterval(a),e>0&&e--}}}();d.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(a,c,d){var e,f=this,j=g.foreverFrame.count+=1,k=h(),l=function(){a.log("Forever frame iframe finished loading and is no longer receiving messages."),d&&d()||f.reconnect(a)};return b.EventSource?void(d&&(a.log("Forever Frame is not supported by SignalR on browsers with SSE support."),d())):(k.setAttribute("data-signalr-connection-id",a.id),i.prevent(),e=g.getUrl(a,this.name),e+="&frameId="+j,b.document.documentElement.appendChild(k),a.log("Binding to iframe's load event."),k.addEventListener?k.addEventListener("load",l,!1):k.attachEvent&&k.attachEvent("onload",l),k.src=e,g.foreverFrame.connections[j]=a,a.frame=k,a.frameId=j,void(c&&(a.onSuccess=function(){a.log("Iframe transport started."),c()})))},reconnect:function(a){var c=this;g.isConnectedOrReconnecting(a)&&g.verifyLastActive(a)&&b.setTimeout(function(){if(g.verifyLastActive(a)&&a.frame&&g.ensureReconnectingState(a)){var b=a.frame,d=g.getUrl(a,c.name,!0)+"&frameId="+a.frameId;a.log("Updating iframe src to '"+d+"'."),b.src=d}},a.reconnectDelay)},lostConnection:function(a){this.reconnect(a)},send:function(a,b){g.ajaxSend(a,b)},receive:function(b,c){var e,f,h;if(b.json!==b._originalJson&&(c=b._originalJson.stringify(c)),h=b._parseResponse(c),g.processMessages(b,h,b.onSuccess),b.state===a.signalR.connectionState.connected&&(b.frameMessageCount=(b.frameMessageCount||0)+1,b.frameMessageCount>d.transports.foreverFrame.iframeClearThreshold&&(b.frameMessageCount=0,e=b.frame.contentWindow||b.frame.contentDocument,e&&e.document&&e.document.body)))for(f=e.document.body;f.firstChild;)f.removeChild(f.firstChild)},stop:function(a){var c=null;if(i.cancel(),a.frame){if(a.frame.stop)a.frame.stop();else try{c=a.frame.contentWindow||a.frame.contentDocument,c.document&&c.document.execCommand&&c.document.execCommand("Stop")}catch(d){a.log("Error occured when stopping foreverFrame transport. Message = "+d.message+".")}a.frame.parentNode===b.document.body&&b.document.body.removeChild(a.frame),delete g.foreverFrame.connections[a.frameId],a.frame=null,a.frameId=null,delete a.frame,delete a.frameId,delete a.onSuccess,delete a.frameMessageCount,a.log("Stopping forever frame.")}},abort:function(a,b){g.ajaxAbort(a,b)},getConnection:function(a){return g.foreverFrame.connections[a]},started:function(b){f(b,d.connectionState.reconnecting,d.connectionState.connected)===!0&&a(b).triggerHandler(e.onReconnect)}}}(window.jQuery,window),function(a,b,c){var d=a.signalR,e=a.signalR.events,f=a.signalR.changeState,g=a.signalR.isDisconnecting,h=d.transports._logic;d.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(c,i,j){var k=this,l=function(){l=a.noop,c.log("LongPolling connected."),i()},m=function(a){return j(a)?(c.log("LongPolling failed to connect."),!0):!1},n=c._,o=0,p=function(c){b.clearTimeout(n.reconnectTimeoutId),n.reconnectTimeoutId=null,f(c,d.connectionState.reconnecting,d.connectionState.connected)===!0&&(c.log("Raising the reconnect event"),a(c).triggerHandler(e.onReconnect))},q=36e5;c.pollXhr&&(c.log("Polling xhr requests already exists, aborting."),c.stop()),c.messageId=null,n.reconnectTimeoutId=null,n.pollTimeoutId=b.setTimeout(function(){!function f(i,j){var r=i.messageId,s=null===r,t=!s,u=!j,v=h.getUrl(i,k.name,t,u,!0),w={};i.messageId&&(w.messageId=i.messageId),i.groupsToken&&(w.groupsToken=i.groupsToken),g(i)!==!0&&(c.log("Opening long polling request to '"+v+"'."),i.pollXhr=h.ajax(c,{xhrFields:{onprogress:function(){h.markLastMessage(c)}},url:v,type:"POST",contentType:d._.defaultContentType,data:w,timeout:c._.pollTimeout,success:function(d){var e,j,k,q=0;c.log("Long poll complete."),o=0;try{e=c._parseResponse(d)}catch(r){return void h.handleParseFailure(i,d,r,m,i.pollXhr)}null!==n.reconnectTimeoutId&&p(i),e&&(j=h.maximizePersistentResponse(e)),h.processMessages(i,e,l),j&&"number"===a.type(j.LongPollDelay)&&(q=j.LongPollDelay),g(i)!==!0&&(k=j&&j.ShouldReconnect,k&&!h.ensureReconnectingState(i)||(q>0?n.pollTimeoutId=b.setTimeout(function(){f(i,k)},q):f(i,k)))},error:function(g,j){var l=d._.transportError(d.resources.longPollFailed,c.transport,g,i.pollXhr);if(b.clearTimeout(n.reconnectTimeoutId),n.reconnectTimeoutId=null,"abort"===j)return void c.log("Aborted xhr request.");if(!m(l)){if(o++,c.state!==d.connectionState.reconnecting&&(c.log("An error occurred using longPolling. Status = "+j+". Response = "+g.responseText+"."),a(i).triggerHandler(e.onError,[l])),(c.state===d.connectionState.connected||c.state===d.connectionState.reconnecting)&&!h.verifyLastActive(c))return;if(!h.ensureReconnectingState(i))return;n.pollTimeoutId=b.setTimeout(function(){f(i,!0)},k.reconnectDelay)}}}),t&&j===!0&&(n.reconnectTimeoutId=b.setTimeout(function(){p(i)},Math.min(1e3*(Math.pow(2,o)-1),q))))}(c)},250)},lostConnection:function(a){a.pollXhr&&a.pollXhr.abort("lostConnection")},send:function(a,b){h.ajaxSend(a,b)},stop:function(a){b.clearTimeout(a._.pollTimeoutId),b.clearTimeout(a._.reconnectTimeoutId),delete a._.pollTimeoutId,delete a._.reconnectTimeoutId,a.pollXhr&&(a.pollXhr.abort(),a.pollXhr=null,delete a.pollXhr)},abort:function(a,b){h.ajaxAbort(a,b)}}}(window.jQuery,window),function(a,b,c){function d(a){return a+k}function e(a,b,c){var d,e=a.length,f=[];for(d=0;e>d;d+=1)a.hasOwnProperty(d)&&(f[d]=b.call(c,a[d],d,a));return f}function f(b){return a.isFunction(b)?null:"undefined"===a.type(b)?null:b}function g(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1}function h(a,b){var c,d=a._.invocationCallbacks;g(d)&&a.log("Clearing hub invocation callbacks with error: "+b+"."),a._.invocationCallbackId=0,delete a._.invocationCallbacks,a._.invocationCallbacks={};for(var e in d)c=d[e],c.method.call(c.scope,{E:b})}function i(a,b){return new i.fn.init(a,b)}function j(b,c){var d={qs:null,logging:!1,useDefaultPath:!0};return a.extend(d,c),b&&!d.useDefaultPath||(b=(b||"")+"/signalr"),new j.fn.init(b,d)}var k=".hubProxy",l=a.signalR;i.fn=i.prototype={init:function(a,b){this.state={},this.connection=a,this.hubName=b,this._={callbackMap:{}}},constructor:i,hasSubscriptions:function(){return g(this._.callbackMap)},on:function(b,c){var e=this,f=e._.callbackMap;return b=b.toLowerCase(),f[b]||(f[b]={}),f[b][c]=function(a,b){c.apply(e,b)},a(e).bind(d(b),f[b][c]),e},off:function(b,c){var e,f=this,h=f._.callbackMap;return b=b.toLowerCase(),e=h[b],e&&(e[c]?(a(f).unbind(d(b),e[c]),delete e[c],g(e)||delete h[b]):c||(a(f).unbind(d(b)),delete h[b])),f},invoke:function(b){var c=this,d=c.connection,g=a.makeArray(arguments).slice(1),h=e(g,f),i={H:c.hubName,M:b,A:h,I:d._.invocationCallbackId},j=a.Deferred(),k=function(e){var f,g,h=c._maximizeHubResponse(e);a.extend(c.state,h.State),h.Progress?j.notifyWith?j.notifyWith(c,[h.Progress.Data]):d._.progressjQueryVersionLogged||(d.log("A hub method invocation progress update was received but the version of jQuery in use ("+a.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),d._.progressjQueryVersionLogged=!0):h.Error?(h.StackTrace&&d.log(h.Error+"\n"+h.StackTrace+"."),f=h.IsHubException?"HubException":"Exception",g=l._.error(h.Error,f),g.data=h.ErrorData,d.log(c.hubName+"."+b+" failed to execute. Error: "+g.message),j.rejectWith(c,[g])):(d.log("Invoked "+c.hubName+"."+b),j.resolveWith(c,[h.Result]))};return d._.invocationCallbacks[d._.invocationCallbackId.toString()]={scope:c,method:k},d._.invocationCallbackId+=1,a.isEmptyObject(c.state)||(i.S=c.state),d.log("Invoking "+c.hubName+"."+b),d.send(i),j.promise()},_maximizeHubResponse:function(a){return{State:a.S,Result:a.R,Progress:a.P?{Id:a.P.I,Data:a.P.D}:null,Id:a.I,IsHubException:a.H,Error:a.E,StackTrace:a.T,ErrorData:a.D}}},i.fn.init.prototype=i.fn,j.fn=j.prototype=a.connection(),j.fn.init=function(b,c){var e={qs:null,logging:!1,useDefaultPath:!0},f=this;a.extend(e,c),a.signalR.fn.init.call(f,b,e.qs,e.logging),f.proxies={},f._.invocationCallbackId=0,f._.invocationCallbacks={},f.received(function(b){var c,e,g,h,i,j;b&&("undefined"!=typeof b.P?(g=b.P.I.toString(),h=f._.invocationCallbacks[g],h&&h.method.call(h.scope,b)):"undefined"!=typeof b.I?(g=b.I.toString(),h=f._.invocationCallbacks[g],h&&(f._.invocationCallbacks[g]=null,delete f._.invocationCallbacks[g],h.method.call(h.scope,b))):(c=this._maximizeClientHubInvocation(b),f.log("Triggering client hub event '"+c.Method+"' on hub '"+c.Hub+"'."),i=c.Hub.toLowerCase(),j=c.Method.toLowerCase(),e=this.proxies[i],a.extend(e.state,c.State),a(e).triggerHandler(d(j),[c.Args])))}),f.error(function(a,b){var c,d;b&&(c=b.I,d=f._.invocationCallbacks[c],d&&(f._.invocationCallbacks[c]=null,delete f._.invocationCallbacks[c],d.method.call(d.scope,{E:a})))}),f.reconnecting(function(){f.transport&&"webSockets"===f.transport.name&&h(f,"Connection started reconnecting before invocation result was received.")}),f.disconnected(function(){h(f,"Connection was disconnected before invocation result was received.")})},j.fn._maximizeClientHubInvocation=function(a){return{Hub:a.H,Method:a.M,Args:a.A,State:a.S}},j.fn._registerSubscribedHubs=function(){var b=this;b._subscribedToHubs||(b._subscribedToHubs=!0,b.starting(function(){var c=[];a.each(b.proxies,function(a){this.hasSubscriptions()&&(c.push({name:a}),b.log("Client subscribed to hub '"+a+"'."))}),0===c.length&&b.log("No hubs have been subscribed to. The client will not receive data from hubs. To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to."),b.data=b.json.stringify(c)}))},j.fn.createHubProxy=function(a){a=a.toLowerCase();var b=this.proxies[a];return b||(b=i(this,a),this.proxies[a]=b),this._registerSubscribedHubs(),b},j.fn.init.prototype=j.fn,a.hubConnection=j}(window.jQuery,window),function(a,b){a.signalR.version="2.2.0"}(window.jQuery);