function LoadtheLoader(n){try{var t=new CanvasLoader(n);t.setShape("spiral");t.setDiameter(30);t.setDensity(18);t.setRange(.9);t.setSpeed(1);t.setFPS(14);t.show();$("#"+n).hide()}catch(i){}}function MaskScreen(n){n?($(".screen-overlay").show(),$("#canvasloader-container").show()):($(".screen-overlay").hide(),$("#canvasloader-container").hide())}function popup(n,t,i){new PNotify({title:n,text:t,type:i.toLowerCase(),delay:4e3})}function popup2(n,t,i){new PNotify({title:n,text:t,type:i.toLowerCase(),delay:1e4,width:"45%",min_height:"125px"})}function IsEmail(n){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(n)?!0:!1}function CustomizeKendoGrid(n){var i=$("#"+n).data("kendoGrid"),r=i.getOptions().columns.length,t;i.thead.find("[data-index="+(r-1)+"], [data-index="+(r-2)+"]").attr("style","border-right-width: 0 !important");t=$("#"+n+" .k-grid-pager");t.find(".k-pager-first, .k-pager-last").remove();t.find(".k-pager-nav:first").find("span").after("<span>"+prevText+"&nbsp;&nbsp;<\/span>");t.find(".k-pager-nav:last").find("span").before("<span>&nbsp;&nbsp;"+nextText+"<\/span>")}function SaveUserCustomGrid(n,t,i){n.preventDefault();localStorage[i]=kendo.stringify(t.getOptions());popup(gridFilterText,saveFilterMsg,"success")}function LoadUserCustomGrid(n,t,i,r){popup(gridFilterText,loadFilterMsg,"success");n.preventDefault();var u=localStorage[r];u&&(t.setOptions(JSON.parse(u)),CustomizeKendoGrid(i))}function LoadDefaultGrid(n,t,i){var r,u;n.preventDefault();r=t.dataSource.pageSize();t.dataSource.query({page:1,pageSize:r,sort:i});u=t.getOptions().columns;u.forEach(function(n){n.hidden!==undefined&&n.hidden===!0&&t.showColumn(n.field)});popup(gridFilterText,defFilterMsg,"success")}function generateRandom(){return Math.floor(1e5+Math.random()*9e5)}function ExportToExcelGridData(n,t,i,r){var u,f,e,o;Authorize()&&(u=[],f=0,$(t.getOptions().columns).each(function(n,r){i.indexOf(r.field)>-1&&(f++,u.push({Order:f,Field:r.field,Title:$("#"+t.element[0].id+" [data-field='"+r.field+"']").text(),Width:r.width/5}))}),e=JSON.stringify(u),o=t.dataSource.transport.parameterMap({sort:t.dataSource.sort(),filter:t.dataSource.filter(),group:t.dataSource.group()}),r=r+"-"+generateRandom()+".xlsx",$.ajax({url:n+(n.indexOf("?")>-1?"&":"?")+"columns="+e+"&FileName="+r,cache:!1,data:o,type:"POST",beforeSend:function(){MaskScreen(!0)},success:function(n){n.result?window.location.href=siteUrl+"/Layout/Download?fileName="+n.fileName:popup(exportExcelText,excelExportNoData,"warning")},error:function(n,t,i){console.log(i);popup(exportExcelText,adminErrorText,"error")},complete:function(){MaskScreen(!1)}}))}function GetColumnsForExportToExcel(n,t){var r=[];switch(t){case"1":case"3":for(i=0;i<n.columns.length-1;i++)typeof n.columns[i].hidden=="undefined"&&n.columns[i].field!="Info"&&n.columns[i].field!="Functionalities"&&n.columns[i].field!="Id"&&n.columns[i].field!="ConnectButton"&&r.push(n.columns[i].field);break;case"2":for(i=0;i<n.columns.length-1;i++)typeof n.columns[i].hidden=="undefined"&&n.columns[i].field!="Activate"&&n.columns[i].field!="Functionalities"&&r.push(n.columns[i].field);break;case"4":for(i=0;i<n.columns.length-1;i++)typeof n.columns[i].hidden=="undefined"&&n.columns[i].field!="Functionalities"&&r.push(n.columns[i].field);break;case"5":for(i=0;i<n.columns.length-3;i++)typeof n.columns[i].hidden=="undefined"&&r.push(n.columns[i].field)}return r}function onSearch(n,t,i){var r,u;if(Authorize()){if(n.preventDefault(),generalSearch=!0,r=$("#txtSearchString").val(),r=="")return!1;u=[];$.each(i,function(n,t){u.push({field:t,operator:"contains",value:r})});t.dataSource.query({page:1,pageSize:5,filter:{logic:"or",filters:u}})}}function clearSearch(n,t,i){var r,u;Authorize()&&(n.preventDefault(),generalSearch=!1,$(".kendo-search-box").val(""),r=t.dataSource.pageSize(),t.dataSource.query({page:1,pageSize:r,sort:i}),u=t.getOptions().columns,u.forEach(function(n){n.hidden!==undefined&&n.hidden===!0&&t.showColumn(n.field)}))}function DisplayOverlay(n){hasScroll=$("body").css("overflow-y")=="visible"||$("body").css("overflow-y")=="auto"?!0:!1;$(n).show();$("body").css("overflow-y","hidden")}function DisplayLoginOverlay(n){(hasScroll==null||hasScroll==undefined)&&(hasScroll=$("body").css("overflow-y")=="visible"||$("body").css("overflow-y")=="auto"?!0:!1);var t=iosDevice?{"overflow-y":"hidden",position:"fixed"}:{"overflow-y":"hidden"};$(iosDevice?"html, body":"html").css(t);$(n).show();$(n).focus()}function CloseOverlay(n,t){if(t){$(n).collapse("toggle");return}$(n).hide();$("body").css("overflow-y",hasScroll?"visible":"hidden")}function SignOut(){MaskScreen(!0);$.ajax({url:siteUrl+"Account/SignOutWithLog",data:{},cache:!1,async:!0,success:function(){MaskScreen(!1);$("#SignOutModal").modal("show").on("hide.bs.modal",function(){$.removeCookie("lhiUserType",{path:"/"});location.href=siteUrl+"Home/Index"})}})}function ProgressBarModal(n){n==="show"?($("#mod-progress").modal("show"),arguments.length>=2?$("#progressBarParagraph").text(arguments[1]):$("#progressBarParagraph").text("Please contact administrator.."),window.progressBarActive=!0):($("#mod-progress").modal("hide"),window.progressBarActive=!1)}function StartSignalRClient(){var n=$.connection.progressHub;n.client.AddProgress=function(n,t){ProgressBarModal("show",n+" "+t);$("#ProgressMessage").width(t);t=="100%"&&ProgressBarModal()};$.connection.hub.start().done(function(){var n=$.connection.hub.id;$("#hiddenHubId").val(n)})}function ExportToExcelGridLargeData(n,t,i,r,u,f){var e,o,s,h;Authorize()&&(e=[],o=0,$(t.getOptions().columns).each(function(n,r){i.indexOf(r.field)>-1&&(o++,e.push({Order:o,Field:r.field,Title:$("#"+t.element[0].id+" [data-field='"+r.field+"']").text(),Width:r.width/5}))}),s=JSON.stringify(e),h=t.dataSource.transport.parameterMap({sort:t.dataSource.sort(),filter:t.dataSource.filter(),group:t.dataSource.group()}),r=r+"-"+generateRandom()+".xlsx",$.ajax({url:n+(n.indexOf("?")>-1?"&":"?")+"columns="+s+"&FileName="+r+"&TotalRecords="+u+"&HubConnectionId="+f,cache:!1,data:h,type:"POST",beforeSend:function(){},success:function(n){n.result?window.location.href=siteUrl+"/Layout/Download?fileName="+n.fileName:popup(exportExcelText,excelExportNoData,"warning")},error:function(n,t,i){console.log(i);popup(exportExcelText,adminErrorText,"error")},complete:function(){MaskScreen(!1)}}))}function WidgetLoader(n){var i=/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=i?{width:"100%",overflow:"scroll !important"}:{width:"100%"};$.ajax({url:siteUrl+"/Layout/setWidgetSession",data:{fromWidget:isFromWidget},cache:!1,async:!1});siteUrl=siteUrl.toLowerCase();$("head").append('<link rel="stylesheet" data-element="widgetStyle" type="text/css" media="screen" href="'+siteUrl+'Content/WidgetStyles/style2.css" />');document.referrer.toLowerCase()==siteUrl+"account/login"&&(document.location.href.toLowerCase()==siteUrl||document.location.href.toLowerCase()==siteUrl+"/home"||document.location.href.toLowerCase()==siteUrl+"/home/index")&&(MaskScreen(!0),document.location.href=n);$(".maindiv").removeClass("maindiv");$(".videoWrapper").css("position","static");$("#visual-portal-wrapper").css(t);$("#hdMainDiv").css(t);$("#widgetSource").val(n);$("#SiteLayout").show()}function Authorize(){var n=!1;return $.ajax({url:siteUrl+"/Account/CheckSession",async:!1,success:function(t){n=t=="True"?!0:!1},error:function(){n=!1}}),n||(popup(sessionTimoutTitle,sessionTimoutMessage,"error"),MaskScreen(!1)),n}function CheckInCaseOtherPanelOpen(n,t){var u=n.siblings("[class='custom-grid-panel collapse']").not(t).length,r,i;if(u<4){for(r=n.siblings("[class='custom-grid-panel collapse in']"),r.collapse("toggle"),r.attr("panel-drop","close"),i=0;i<4;i++)rowGrid[0].childNodes[i].style="position: relative; top: 0px; border-bottom: 1";rowGrid[0].childNodes[4].style="border-bottom: 1"}}function CheckUriIsValid(n){var t=$(n).siblings(".field-validation-error:first").length>0?!0:!1;$(n).val()!=""?$.ajax({url:siteUrl+"/TemplatePortal/CheckUriIsValid",data:{uri:$(n).val()},cache:!1,async:!1,success:function(i){return i?$(n).siblings('[data-element="customError"]:first').text("").hide():($(n).val(""),t||$(n).siblings('[data-element="customError"]:first').text(requiredPageWhereURL).show()),i},error:function(){return t||$(n).siblings('[data-element="customError"]:first').text(requiredPageWhereURL).show(),!1}}):$(n).siblings('[data-element="customError"]:first').text("").hide()}function DownloadAssembledDocuments(n,t,i){var u,r,f,e;if(Authorize()){if(u="[data-verify='getform']",r=t.siblings(u),CheckInCaseOtherPanelOpen(t,r),t.siblings(u).attr("style","inline"),f=t.closest("tr").attr("data-uid"),e=t.closest("tr")[0].clientHeight,$(r).children().length>0){$(r).collapse("toggle");$(r).focus();$("html, body").animate({scrollTop:$(r).parent().offset().top-navHeight},1e3);return}$.ajax({url:siteUrl+"/TemplatePortal/InitiateAssembledDocuments",data:{answerId:n,downloadIndividualFiles:i},cache:!1,async:!1,beforeSend:function(){MaskScreen(!0)},success:function(t){var i=$.parseJSON(t),u;if(i.Result){if(i.DownloadFileName&&i.DownloadFilePath&&(window.location=siteUrl+"templateportal/DownloadAssembledDocuments?fileName="+i.DownloadFileName+"&filePath="+Base64.encode(i.DownloadFilePath)),i.DownloadFileList!=undefined&&i.DownloadFileList.length>0){u="<div class='deleteTemplate-h5' tabindex='0'><span id='getFormModalClose-"+n+"' onclick=\"CloseGridOverlay(this,'#getFormModalAccessibility-"+n+"');\" aria-label='Close' onkeypress=\"CloseGridOverlay(this,'#getFormModalAccessibility-"+n+"');\" onblur=\"returnToPanel('#getFormAnswerModal-"+n+'\')" class="closebtn" aria-hidden="true">x<\/span>'+downloadDocText2+"<\/div>";$(i.DownloadFileList).each(function(n,t){var i=t.split(";")[0],r=t.split(";")[1];u+="<p><a href='#' title='Click to download' onClick='window.location=siteUrl+\"/templateportal/DownloadAssembledDocuments?fileName="+i+"&filePath="+Base64.encode(r)+"\";' onkeypress='window.location=siteUrl+\"/templateportal/DownloadAssembledDocuments?fileName="+i+"&filePath="+Base64.encode(r)+"\";'>"+i+"<\/a><\/p>"});u+="<p tabindex='0'  onblur=\"returnToClose('#getFormModalClose-"+n+"' )'>&nbsp;&nbsp;<\/p>";$(r).append(u);$(r).collapse("toggle");$(r).focus();$("html, body").animate({scrollTop:$(r).parent().offset().top-navHeight},1e3);return}}else popup("Download Assembled Documents",i.ExcecutionMessage,"error")},error:function(){popup("Download Assembled Documents","Unable to generate document(s). Please contact administrator.","error")},complete:function(){MaskScreen(!1)}})}}function ViewXmlAnswerFile(n){Authorize()&&$.ajax({url:siteUrl+"/TemplatePortal/RetreiveXmlAnswerFile",data:{answerId:n},cache:!1,async:!1,beforeSend:function(){MaskScreen(!0)},success:function(n){var t=$.parseJSON(n);t.Result?window.location=siteUrl+"templateportal/DownloadAssembledDocuments?fileName="+t.DownloadFileName+"&filePath="+Base64.encode(t.DownloadFilePath):popup("View Answer File",t.ExcecutionMessage,"error")},error:function(){popup("View Answer File","Unable to retreive answer file. Please contact administrator.","error")},complete:function(){MaskScreen(!1)}})}function AnonymousLogin(n,t){var i=$(t).attr("data-ddo")!=undefined?!0:!1,r=$(n+' [data-id="txtUserName"]').val(),u=$(n+' [data-id="txtPassword"]').val();if(r==""&&u=="")return $(n+" [data-id='spnUsername']").text(userNameReqMsg),$(n+" [data-id='spnPassword']").text(passwordRegMsg),!1;if(r=="")return $(n+" [data-id='spnUsername']").text(userNameReqMsg),!1;if(u=="")return $(n+" [data-id='spnPassword']").text(passwordRegMsg),!1;$(n+" [data-id='spnUsername'], "+n+" [data-id='spnPassword']").text("");$(n+' [data-id="pLoginStatus"]').html("").hide();var e=$("#"+(i?"ddotemplateId":"templateId")).val(),o=$("#"+(i?"ddoanswerId":"answerId")).val(),s=$("#"+(i?"ddoengineId":"engineId")).val(),h=$("#"+(i?"ddointerviewSessionId":"interviewSessionId")).val(),c=$("#"+(i?"ddourlProcessSet":"urlProcessSet")).val(),l=$("#"+(i?"ddointerimProcessSetID":"interimProcessSetID")).val(),f=$(n);$.ajax({url:siteUrl+"/Account/AnanymousLogin",data:{Username:r,Password:u,TemplateId:e,AnswerId:o,EngineId:s,InterviewSessionId:h,UrlProcessSet:c,InterimProcessSetID:l},cache:!1,beforeSend:function(){MaskScreen(!0)},success:function(t){t.url!=null&&t.url!=""?(f.hasClass("collapse in")?f.collapse("hide"):f.has(".overlay").length>0?CloseLoginOverlay("#loginOverlay"):$("#loginSignupOverlay").length>0&&CloseSignInUpForm("#loginSignupOverlay"),window.document.location.href=t.url):($(n+' [data-id="pLoginStatus"]').html(t.message).show(),$(n+' [data-id="pLoginStatus"]').focus())},error:function(n,t,i){console.log(i);popup("Sign-In",adminErrorText,"error")},complete:function(){MaskScreen(!1)}})}function CloseLoginOverlay(n){var t=iosDevice?{"overflow-y":"scroll",position:"relative"}:{"overflow-y":"scroll"};$(iosDevice?"html, body":"html").css(t);$(n).find("input").val("");$(n).find("[data-id='pLoginStatus']").text("");$(n).find("span.error").text("");$(n).hide()}function ClearFormValus(n){$(n).find("input").val("");$(n).find("select").val(0);$(n).find(".error").text("");$(n).find(".error span").text("")}function ClearRegisterFormFields(n){$(n).find("input[type='text']").val("");$(n).find("input[type='password']").val("");$(n).find("select").val("");$(n).find("span.error, span.error span").text("");$(n).find("input[type='checkbox']").prop("checked",!1);$(n).find("#organization, #contributorgroup, #connectpermissiontype").hide();$(n).find("#OrganizationIds").multiselect("refresh");$(n).find("input:radio[name='ConnectPermissionType']:first").attr("checked",!0).prop("checked","checked");$(n).find("[data-id='commonerrormsg']").text("")}function CloseSignInUpForm(n){ClearRegisterFormFields(n);$(n).hide();$("html, body").css("overflow-y",hasScroll?"visible":"hidden")}function returnToCloseBox(){!$("#loginError").text().length>0&&($("#closeLoginOverlaySection").attr("tabindex",0),$("#closeLoginOverlaySection").attr("aria-hidden","false"),$("#closeLoginOverlaySection").focus())}function returnToCloseSignUp(){$("#commonerrormsg").text().length>0?$("#commonerrormsg").focus():($("#closeSignupPanel").attr("tabindex",0),$("#closeSignupPanel").attr("aria-hidden","false"),$("#closeSignupPanel").focus())}function returnToSignupForm(){$("#commonerrormsg").text().length>0&&$("#UserTypeId").focus()}function returnToLoginBox(){var n=$("#loginError").attr("aria-label");!n.length>0?$("#loginError").text().length>0&&($("#loginError").attr("aria-label","Invalid Username or Password, correct the error or use close button to close login overlay"),$("#txtUserName").focus()):($("#closeLoginOverlaySection").attr("tabindex",0),$("#closeLoginOverlaySection").attr("aria-hidden","false"),$("#closeLoginOverlaySection").focus())}function returnToPanel(n){$(n).focus()}function initilizeRemoveFunctionForIE11OrLess(){"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)})}function blockUIForDownload(n){var t=n;MaskScreen(!0);fileDownloadCheckTimer=window.setInterval(function(){var n=$.cookie("fileDownloadToken");n==t&&finishDownload()},1e3)}function finishDownload(){window.clearInterval(fileDownloadCheckTimer);$.removeCookie("fileDownloadToken");MaskScreen(!1)}function JWTLogin(){$.ajax({url:siteUrl+"/Account/GetJWTURL",data:{},cache:!1,async:!1,success:function(n){window.open(n,"_blank")},error:function(){popup("Unable to get JWTURL","Please contact administrator.","error")}})}var hasScroll,Base64,navHeight,fileDownloadCheckTimer;if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(void 0!==i.style[n])return{end:t[n]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one(n.support.transition.end,function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t()})}(jQuery);+function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.prototype.close=function(t){function f(){i.trigger("closed.bs.alert").remove()}var u=n(this),r=u.attr("data-target"),i;r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));i=n(r);t&&t.preventDefault();i.length||(i=u.hasClass("alert")?u:u.parent());i.trigger(t=n.Event("close.bs.alert"));t.isDefaultPrevented()||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.one(n.support.transition.end,f).emulateTransitionEnd(150):f())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},i;t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,u=i.is("input")?"val":"html",f=i.data();t+="Text";f.resetText||i.data("resetText",i[u]());i[u](f[t]||this.options[t]);setTimeout(n.proxy(function(){"loadingText"==t?(this.isLoading=!0,i.addClass(r).attr(r,r)):this.isLoading&&(this.isLoading=!1,i.removeClass(r).removeAttr(r))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length&&(n=this.$element.find("input"),"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:i.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change"));t&&this.$element.toggleClass("active")};i=n.fn.button;n.fn.button=function(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})};n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=i,this};n(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var i=n(t.target);i.hasClass("btn")||(i=i.closest(".btn"));i.button("toggle");t.preventDefault()})}(jQuery);+function(n){"use strict";var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=this.sliding=this.interval=this.$active=this.$items=null;"hover"==this.options.pause&&this.$element.on("mouseenter",n.proxy(this.pause,this)).on("mouseleave",n.proxy(this.cycle,this))},i;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)};t.prototype.to=function(t){var r=this,i=this.getActiveIndex();if(!(t>this.$items.length-1)&&!(0>t))return this.sliding?this.$element.one("slid.bs.carousel",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(t,i){var u=this.$element.find(".item.active"),r=i||u[t](),s=this.interval,f="next"==t?"left":"right",h="next"==t?"first":"last",e=this,o;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[h]()}return r.hasClass("active")?this.sliding=!1:(o=n.Event("slide.bs.carousel",{relatedTarget:r[0],direction:f}),this.$element.trigger(o),o.isDefaultPrevented()?void 0:(this.sliding=!0,s&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var t=n(e.$indicators.children()[e.getActiveIndex()]);t&&t.addClass("active")})),n.support.transition&&this.$element.hasClass("slide")?(r.addClass(t),r[0].offsetWidth,u.addClass(f),r.addClass(f),u.one(n.support.transition.end,function(){r.removeClass([t,f].join(" ")).addClass("active");u.removeClass(["active",f].join(" "));e.sliding=!1;setTimeout(function(){e.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*u.css("transition-duration").slice(0,-1))):(u.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),s&&this.cycle(),this))};i=n.fn.carousel;n.fn.carousel=function(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})};n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=i,this};n(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var f,i=n(this),r=n(i.attr("data-target")||(f=i.attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")),e=n.extend({},r.data(),i.data()),u=i.attr("data-slide-to");u&&(e.interval=!1);r.carousel(e);(u=i.attr("data-slide-to"))&&r.data("bs.carousel").to(u);t.preventDefault()});n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);t.carousel(t.data())})})}(jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.transitioning=null;this.options.parent&&(this.$parent=n(this.options.parent));this.options.toggle&&this.toggle()},i;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var u,t,r,i,f,e;if(!this.transitioning&&!this.$element.hasClass("in")&&(u=n.Event("show.bs.collapse"),this.$element.trigger(u),!u.isDefaultPrevented())){if(t=this.$parent&&this.$parent.find("> .panel > .in"),t&&t.length){if(r=t.data("bs.collapse"),r&&r.transitioning)return;t.collapse("hide");r||t.data("bs.collapse",null)}if(i=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[i](0),this.transitioning=1,f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i]("auto");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return f.call(this);e=n.camelCase(["scroll",i].join("-"));this.$element.one(n.support.transition.end,n.proxy(f,this)).emulateTransitionEnd(350)[i](this.$element[0][e])}};t.prototype.hide=function(){var i,t,r;if(!this.transitioning&&this.$element.hasClass("in")&&(i=n.Event("hide.bs.collapse"),this.$element.trigger(i),!i.isDefaultPrevented()))return t=this.dimension(),this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1,r=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")},n.support.transition?void this.$element[t](0).one(n.support.transition.end,n.proxy(r,this)).emulateTransitionEnd(350):r.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};i=n.fn.collapse;n.fn.collapse=function(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&"show"==i&&(i=!i);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=i,this};n(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var e,i=n(this),s=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),r=n(s),u=r.data("bs.collapse"),h=u?"toggle":i.data(),f=i.attr("data-parent"),o=f&&n(f);u&&u.transitioning||(o&&o.find('[data-toggle=collapse][data-parent="'+f+'"]').not(i).addClass("collapsed"),i[r.hasClass("in")?"addClass":"removeClass"]("collapsed"));r.collapse(h)})}(jQuery);+function(n){"use strict";function r(t){n(e).remove();n(i).each(function(){var i=u(n(this)),r={relatedTarget:this};i.hasClass("open")&&(i.trigger(t=n.Event("hide.bs.dropdown",r)),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown",r))})}function u(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}var e=".dropdown-backdrop",i="[data-toggle=dropdown]",t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=u(f),o=i.hasClass("open"),r(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click",r),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown",e);f.focus()}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,r;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=u(e),s=o.hasClass("open"),!s||s&&27==t.keyCode)return 27==t.which&&o.find(i).focus(),e.click();h=" li:not(.divider):visible a";f=o.find("[role=menu]"+h+", [role=listbox]"+h);f.length&&(r=f.index(f.filter(":focus")),38==t.keyCode&&r>0&&r--,40==t.keyCode&&r<f.length-1&&r++,~r||(r=0),f.eq(r).focus())}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i+", [role=menu], [role=listbox]",t.prototype.keydown)}(jQuery);+function(n){"use strict";var t=function(t,i){this.options=i;this.$element=n(t);this.$backdrop=this.isShown=null;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},i;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this[this.isShown?"hide":"show"](n)};t.prototype.show=function(t){var i=this,r=n.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var u=n.support.transition&&i.$element.hasClass("fade"),r;i.$element.parent().length||i.$element.appendTo(document.body);i.$element.show().scrollTop(0);u&&i.$element[0].offsetWidth;i.$element.addClass("in").attr("aria-hidden",!1);i.enforceFocus();r=n.Event("shown.bs.modal",{relatedTarget:t});u?i.$element.find(".modal-dialog").one(n.support.transition.end,function(){i.$element.focus().trigger(r)}).emulateTransitionEnd(300):i.$element.focus().trigger(r)}))};t.prototype.hide=function(t){t&&t.preventDefault();t=n.Event("hide.bs.modal");this.$element.trigger(t);this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one(n.support.transition.end,n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.focus()},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.removeBackdrop();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(t){var r=this.$element.hasClass("fade")?"fade":"",i;if(this.isShown&&this.options.backdrop){if(i=n.support.transition&&r,this.$backdrop=n('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};i=n.fn.modal;n.fn.modal=function(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})};n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=i,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var i=n(this),r=i.attr("href"),u=n(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),f=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(r)&&r},u.data(),i.data());i.is("a")&&t.preventDefault();u.modal(f,this).one("hide",function(){i.is(":visible")&&i.focus()})});n(document).on("show.bs.modal",".modal",function(){n(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){n(document.body).removeClass("modal-open")})}(jQuery);+function(n){"use strict";var t=function(n,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",n,t)},i;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};t.prototype.init=function(t,i,r){var f,e,u,o,s;for(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()};t.prototype.show=function(){var h=n.Event("show.bs."+this.type),u,i,v,s;if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;u=this;i=this.tip();this.setContent();this.options.animation&&i.addClass("fade");var t="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,c=/\s?auto?\s?/i,l=c.test(t);l&&(t=t.replace(c,"")||"top");i.detach().css({top:0,left:0,display:"block"}).addClass(t);this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),f=i[0].offsetWidth,e=i[0].offsetHeight;if(l){var o=this.$element.parent(),y=t,a=document.documentElement.scrollTop||document.body.scrollTop,p="body"==this.options.container?window.innerWidth:o.outerWidth(),w="body"==this.options.container?window.innerHeight:o.outerHeight(),b="body"==this.options.container?0:o.offset().left;t="bottom"==t&&r.top+r.height+e-a>w?"top":"top"==t&&r.top-a-e<0?"bottom":"right"==t&&r.right+f>p?"left":"left"==t&&r.left-f<b?"right":t;i.removeClass(y).addClass(t)}v=this.getCalculatedOffset(t,r,f,e);this.applyPlacement(v,t);this.hoverState=null;s=function(){u.$element.trigger("shown.bs."+u.type)};n.support.transition&&this.$tip.hasClass("fade")?i.one(n.support.transition.end,s).emulateTransitionEnd(150):s()}};t.prototype.applyPlacement=function(t,i){var c,r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),f,u,h;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top=t.top+o;t.left=t.left+s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");f=r[0].offsetWidth;u=r[0].offsetHeight;("top"==i&&u!=e&&(c=!0,t.top=t.top+e-u),/bottom|top/.test(i))?(h=0,t.left<0&&(h=-2*t.left,t.left=0,r.offset(t),f=r[0].offsetWidth,u=r[0].offsetHeight),this.replaceArrow(h-l+f,f,"left")):this.replaceArrow(u-e,u,"top");c&&r.offset(t)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(){function r(){"in"!=t.hoverState&&i.detach();t.$element.trigger("hidden.bs."+t.type)}var t=this,i=this.tip(),u=n.Event("hide.bs."+this.type);return this.$element.trigger(u),u.isDefaultPrevented()?void 0:(i.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?i.one(n.support.transition.end,r).emulateTransitionEnd(150):r(),this.hoverState=null,this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(){var t=this.$element[0];return n.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.tip=function(){return this.$tip=this.$tip||n(this.options.template)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=t?n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){clearTimeout(this.timeout);this.hide().$element.off("."+this.type).removeData("bs."+this.type)};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;(r||"destroy"!=i)&&(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content")[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};t.prototype.tip=function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip};i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;(r||"destroy"!=i)&&(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){var u,f=n.proxy(this.process,this);this.$element=n(n(i).is("body")?window:i);this.$body=n("body");this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||(u=n(i).attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.offsets=n([]);this.targets=n([]);this.activeTarget=null;this.refresh();this.process()}t.DEFAULTS={offset:10};t.prototype.refresh=function(){var i=this.$element[0]==window?"offset":"position",t;this.offsets=n([]);this.targets=n([]);t=this;this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),r=/^#./.test(u)&&n(u);return r&&r.length&&r.is(":visible")&&[[r[i]().top+(!n.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,e=f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(i>=e)return u!=(n=r.last()[0])&&this.activate(n);if(u&&i<=t[0])return u!=(n=r[0])&&this.activate(n);for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(!t[n+1]||i<=t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;n(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};var i=n.fn.scrollspy;n.fn.scrollspy=function(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=i,this};n(window).on("load",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);t.scrollspy(t.data())})})}(jQuery);+function(n){"use strict";var t=function(t){this.element=n(t)},i;t.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],u=n.Event("show.bs.tab",{relatedTarget:r}),(t.trigger(u),u.isDefaultPrevented())||(f=n(i),this.activate(t.parent("li"),e),this.activate(f,f.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})))};t.prototype.activate=function(t,i,r){function f(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");e?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var u=i.find("> .active"),e=r&&n.support.transition&&u.hasClass("fade");e?u.one(n.support.transition.end,f).emulateTransitionEnd(150):f();u.removeClass("in")};i=n.fn.tab;n.fn.tab=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})};n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=i,this};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();n(this).tab("show")})}(jQuery);+function(n){"use strict";var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$window=n(window).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=this.unpin=this.pinnedOffset=null;this.checkPosition()},i;t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$window.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,h;if(this.$element.is(":visible")){var c=n(document).height(),o=this.$window.scrollTop(),s=this.$element.offset(),r=this.options.offset,f=r.top,u=r.bottom;"top"==this.affixed&&(s.top+=o);"object"!=typeof r&&(u=f=r);"function"==typeof f&&(f=r.top(this.$element));"function"==typeof u&&(u=r.bottom(this.$element));i=null!=this.unpin&&o+this.unpin<=s.top?!1:null!=u&&s.top+this.$element.height()>=c-u?"bottom":null!=f&&f>=o?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),h=n.Event(e+".bs.affix"),this.$element.trigger(h),h.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(e).trigger(n.Event(e.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-u-this.$element.height()})))}};i=n.fn.affix;n.fn.affix=function(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=i,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.affix(t)})})}(jQuery);$(document).ready(function(){try{($.cookie("LHIUserIP")==null||$.cookie("LHIUserIP")=="")&&$.getJSON("https://api.ipstack.com/check?access_key=464a6e09daa56556bc07b11bcafe5d55",function(n){$.cookie("LHIUserIP",n.ip,{secure:!0});$.cookie("LHIUserZip",n.zip,{secure:!0})})}catch(n){}try{$(this).tooltip({selector:"a[data-toggle=tooltip]"})}catch(n){}try{$(this).popover({selector:"[data-toggle=popover]",trigger:"hover",html:!0,content:function(){return $($(this).attr("data-target")).html()}})}catch(n){}$(this).find("body").append("<div class='screen-overlay'><div id='canvasloader-container'><\/div><\/div>");LoadtheLoader("canvasloader-container");$(".screen-overlay").hide();$("input[type='submit'],input[type='button'].maskscreen,button.maskscreen,a.maskscreen").bind("click",function(){try{var n=$(this).closest("form");n.length&&n.validate();(n.length&&n.valid()||$(this).hasClass("novalidation"))&&!$(this).hasClass("NoMask")?MaskScreen(!0):MaskScreen(!1)}catch(t){MaskScreen(!1)}});$("#closeIwModal span.common-red-button").on("click keypress",function(){var n=$(this).data("value"),t=$(this).data("widget"),i;n=n!=undefined&&n!=""?n:$("#SessionTimeoutTemplateId").val();CloseOverlay("#closeIwModal");MaskScreen(!0);i=eventId!=undefined&&eventId!=""?siteUrl+"Event/LoadEvent/"+eventId:siteUrl+"Interview/InterviewHome?templateId="+n+(t!=""&&t!=undefined&&t!=null?"&isWidget="+t:"");location.href=i})});$.date=function(n){var r=new Date(parseInt(n.replace(/(^.*\()|([+-].*$)/g,""))),t=r.getDate(),i=r.getMonth()+1,u=r.getFullYear();return t<10&&(t="0"+t),i<10&&(i="0"+i),i+"/"+t+"/"+u};Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(n){var f="",e,t,i,s,h,o,r,u=0;for(n=Base64._utf8_encode(n);u<n.length;)e=n.charCodeAt(u++),t=n.charCodeAt(u++),i=n.charCodeAt(u++),s=e>>2,h=(e&3)<<4|t>>4,o=(t&15)<<2|i>>6,r=i&63,isNaN(t)?o=r=64:isNaN(i)&&(r=64),f=f+this._keyStr.charAt(s)+this._keyStr.charAt(h)+this._keyStr.charAt(o)+this._keyStr.charAt(r);return f},decode:function(n){var t="",e,o,s,h,u,r,f,i=0;for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)h=this._keyStr.indexOf(n.charAt(i++)),u=this._keyStr.indexOf(n.charAt(i++)),r=this._keyStr.indexOf(n.charAt(i++)),f=this._keyStr.indexOf(n.charAt(i++)),e=h<<2|u>>4,o=(u&15)<<4|r>>2,s=(r&3)<<6|f,t=t+String.fromCharCode(e),r!=64&&(t=t+String.fromCharCode(o)),f!=64&&(t=t+String.fromCharCode(s));return Base64._utf8_decode(t)},_utf8_encode:function(n){var i,r,t;for(n=n.replace(/\r\n/g,"\n"),i="",r=0;r<n.length;r++)t=n.charCodeAt(r),t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128));return i},_utf8_decode:function(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}},function(n){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera);navHeight=$("nav").height();$(document).ready(function(){initilizeRemoveFunctionForIE11OrLess();$("#listLogin").keypress(function(n){n.keyCode!=13||$("#formHeaderLogin").hasClass("collapse in")||($("#formHeaderLogin").addClass("collapse in"),$("#formHeaderLogin").css("height","auto"))});$("a#languageList").keypress(function(n){n.keyCode==13&&$("a#languageList").dropdown()});$("#languageListChoice").keypress(function(n){n.keyCode!=13||$("#languageListChoice").hasClass("open")?$("#languageListChoice").removeClass("open"):$("#languageListChoice").addClass("open")});$("#loginSignupOverlay [data-id='closeButton']").on("click",function(){CloseSignInUpForm($("#loginSignupOverlay"))});$("#loginSignupOverlay [data-id='closeButton']").on("keypress",function(n){(n.keyCode==13||n.which==13)&&CloseSignInUpForm($("#loginSignupOverlay"))});$("#signUpPanel #btnCreateAccount").on("blur",function(){returnToCloseSignUp()});$("#signUpPanel #commonerrormsg").on("blur",function(){returnToSignupForm()})});$(function(){var r,i,n,t;for((isFromWidget==="1"||isFromWidget==="3")&&$("#SiteLayout").show(),r=window.location.search.substring(1),i=r.split("&"),n=0;n<i.length;n++)t=i[n].split("="),t[0].toLowerCase()=="session"&&(t[1].toLowerCase()=="expired"?popup(sessionTimoutTitle,sessionTimoutMessage,"error"):t[1].toLowerCase()=="accountexpired"&&popup("User Account Exception","Your account is de-activated. Please contact administrator.","error"))}),function(n,t,i,r,u,f,e){n.GoogleAnalyticsObject=u;n[u]=n[u]||function(){(n[u].q=n[u].q||[]).push(arguments)};n[u].l=1*new Date;f=t.createElement(i);e=t.getElementsByTagName(i)[0];f.async=1;f.src=r;e.parentNode.insertBefore(f,e)}(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create","UA-3254976-11","auto");ga("send","pageview");_userType!=""&&$.cookie("lhiUserType")==null&&($.cookie("lhiUserType",_userType,{path:"/",expires:1,secure:!0}),ga("set","dimension2",_userType)),function(n){typeof define=="function"&&define.amd?define("pnotify",["jquery"],n):n(jQuery)}(function(n){var f={dir1:"down",dir2:"left",push:"bottom",spacing1:25,spacing2:25,context:n("body")},t,i,r=n(window),u=function(){i=n("body");PNotify.prototype.options.stack.context=i;r=n(window);r.bind("resize",function(){t&&clearTimeout(t);t=setTimeout(function(){PNotify.positionAll(!0)},10)})};return PNotify=function(n){this.parseOptions(n);this.init()},n.extend(PNotify.prototype,{version:"2.0.1",options:{title:!1,title_escape:!1,text:!1,text_escape:!1,styling:"bootstrap3",addclass:"",cornerclass:"",auto_display:!0,width:"300px",min_height:"16px",type:"notice",icon:!0,opacity:1,animation:"fade",animate_speed:"slow",position_animate_speed:500,shadow:!0,hide:!0,delay:8e3,mouse_reset:!0,remove:!0,insert_brs:!0,destroy:!0,stack:f},modules:{},runModules:function(n,t){var r,i;for(i in this.modules)r=typeof t=="object"&&i in t?t[i]:t,typeof this.modules[i][n]=="function"&&this.modules[i][n](this,typeof this.options[i]=="object"?this.options[i]:{},r)},state:"initializing",timer:null,styles:null,elem:null,container:null,title_container:null,text_container:null,animating:!1,timerHide:!1,init:function(){var t=this;return this.modules={},n.extend(!0,this.modules,PNotify.prototype.modules),this.styles=typeof this.options.styling=="object"?this.options.styling:PNotify.styling[this.options.styling],this.elem=n("<div />",{"class":"ui-pnotify "+this.options.addclass,css:{display:"none"},mouseenter:function(){if(t.options.mouse_reset&&t.animating==="out"){if(!t.timerHide)return;t.cancelRemove()}t.options.hide&&t.options.mouse_reset&&t.cancelRemove()},mouseleave:function(){t.options.hide&&t.options.mouse_reset&&t.queueRemove();PNotify.positionAll()}}),this.container=n("<div />",{"class":this.styles.container+" ui-pnotify-container "+(this.options.type==="error"?this.styles.error:this.options.type==="info"?this.styles.info:this.options.type==="success"?this.styles.success:this.styles.notice)}).appendTo(this.elem),this.options.cornerclass!==""&&this.container.removeClass("ui-corner-all").addClass(this.options.cornerclass),this.options.shadow&&this.container.addClass("ui-pnotify-shadow"),this.options.icon!==!1&&n("<div />",{"class":"ui-pnotify-icon"}).append(n("<span />",{"class":this.options.icon===!0?this.options.type==="error"?this.styles.error_icon:this.options.type==="info"?this.styles.info_icon:this.options.type==="success"?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container),this.title_container=n("<h4 />",{"class":"ui-pnotify-title"}).appendTo(this.container),this.options.title===!1?this.title_container.hide():this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),this.text_container=n("<div />",{"class":"ui-pnotify-text"}).appendTo(this.container),this.options.text===!1?this.text_container.hide():this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),typeof this.options.width=="string"&&this.elem.css("width",this.options.width),typeof this.options.min_height=="string"&&this.container.css("min-height",this.options.min_height),PNotify.notices=this.options.stack.push==="top"?n.merge([this],PNotify.notices):n.merge(PNotify.notices,[this]),this.options.stack.push==="top"&&this.queuePosition(!1,1),this.options.stack.animation=!1,this.runModules("init"),this.options.auto_display&&this.open(),this},update:function(t){var i=this.options;return this.parseOptions(i,t),this.options.cornerclass!==i.cornerclass&&this.container.removeClass("ui-corner-all "+i.cornerclass).addClass(this.options.cornerclass),this.options.shadow!==i.shadow&&(this.options.shadow?this.container.addClass("ui-pnotify-shadow"):this.container.removeClass("ui-pnotify-shadow")),this.options.addclass===!1?this.elem.removeClass(i.addclass):this.options.addclass!==i.addclass&&this.elem.removeClass(i.addclass).addClass(this.options.addclass),this.options.title===!1?this.title_container.slideUp("fast"):this.options.title!==i.title&&(this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),i.title===!1&&this.title_container.slideDown(200)),this.options.text===!1?this.text_container.slideUp("fast"):this.options.text!==i.text&&(this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),i.text===!1&&this.text_container.slideDown(200)),this.options.type!==i.type&&this.container.removeClass(this.styles.error+" "+this.styles.notice+" "+this.styles.success+" "+this.styles.info).addClass(this.options.type==="error"?this.styles.error:this.options.type==="info"?this.styles.info:this.options.type==="success"?this.styles.success:this.styles.notice),(this.options.icon!==i.icon||this.options.icon===!0&&this.options.type!==i.type)&&(this.container.find("div.ui-pnotify-icon").remove(),this.options.icon!==!1&&n("<div />",{"class":"ui-pnotify-icon"}).append(n("<span />",{"class":this.options.icon===!0?this.options.type==="error"?this.styles.error_icon:this.options.type==="info"?this.styles.info_icon:this.options.type==="success"?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container)),this.options.width!==i.width&&this.elem.animate({width:this.options.width}),this.options.min_height!==i.min_height&&this.container.animate({minHeight:this.options.min_height}),this.options.opacity!==i.opacity&&this.elem.fadeTo(this.options.animate_speed,this.options.opacity),this.options.hide?i.hide||this.queueRemove():this.cancelRemove(),this.queuePosition(!0),this.runModules("update",i),this},open:function(){this.state="opening";this.runModules("beforeOpen");var n=this;return this.elem.parent().length||this.elem.appendTo(this.options.stack.context?this.options.stack.context:i),this.options.stack.push!=="top"&&this.position(!0),this.options.animation==="fade"||this.options.animation.effect_in==="fade"?this.elem.show().fadeTo(0,0).hide():this.options.opacity!==1&&this.elem.show().fadeTo(0,this.options.opacity).hide(),this.animateIn(function(){n.queuePosition(!0);n.options.hide&&n.queueRemove();n.state="open";n.runModules("afterOpen")}),this},remove:function(t){this.state="closing";this.timerHide=!!t;this.runModules("beforeClose");var i=this;return this.timer&&(window.clearTimeout(this.timer),this.timer=null),this.animateOut(function(){if(i.state="closed",i.runModules("afterClose"),i.queuePosition(!0),i.options.remove&&i.elem.detach(),i.runModules("beforeDestroy"),i.options.destroy&&PNotify.notices!==null){var t=n.inArray(i,PNotify.notices);t!==-1&&PNotify.notices.splice(t,1)}i.runModules("afterDestroy")}),this},get:function(){return this.elem},parseOptions:function(t,i){var f,r,e,u;this.options=n.extend(!0,{},PNotify.prototype.options);this.options.stack=PNotify.prototype.options.stack;f=[t,i];for(e in f){if(r=f[e],typeof r=="undefined")break;if(typeof r!="object")this.options.text=r;else for(u in r)this.modules[u]?n.extend(!0,this.options[u],r[u]):this.options[u]=r[u]}},animateIn:function(n){this.animating="in";var t;t=typeof this.options.animation.effect_in!="undefined"?this.options.animation.effect_in:this.options.animation;t==="none"?(this.elem.show(),n()):t==="show"?this.elem.show(this.options.animate_speed,n):t==="fade"?this.elem.show().fadeTo(this.options.animate_speed,this.options.opacity,n):t==="slide"?this.elem.slideDown(this.options.animate_speed,n):typeof t=="function"?t("in",n,this.elem):this.elem.show(t,typeof this.options.animation.options_in=="object"?this.options.animation.options_in:{},this.options.animate_speed,n);this.elem.parent().hasClass("ui-effects-wrapper")&&this.elem.parent().css({position:"fixed",overflow:"visible"});t!=="slide"&&this.elem.css("overflow","visible");this.container.css("overflow","hidden")},animateOut:function(n){this.animating="out";var t;t=typeof this.options.animation.effect_out!="undefined"?this.options.animation.effect_out:this.options.animation;t==="none"?(this.elem.hide(),n()):t==="show"?this.elem.hide(this.options.animate_speed,n):t==="fade"?this.elem.fadeOut(this.options.animate_speed,n):t==="slide"?this.elem.slideUp(this.options.animate_speed,n):typeof t=="function"?t("out",n,this.elem):this.elem.hide(t,typeof this.options.animation.options_out=="object"?this.options.animation.options_out:{},this.options.animate_speed,n);this.elem.parent().hasClass("ui-effects-wrapper")&&this.elem.parent().css({position:"fixed",overflow:"visible"});t!=="slide"&&this.elem.css("overflow","visible");this.container.css("overflow","hidden")},position:function(n){var t=this.options.stack,u=this.elem,c,s,h,f,e,o;if(u.parent().hasClass("ui-effects-wrapper")&&(u=this.elem.css({left:"0",top:"0",right:"0",bottom:"0"}).parent()),typeof t.context=="undefined"&&(t.context=i),t){if(typeof t.nextpos1!="number"&&(t.nextpos1=t.firstpos1),typeof t.nextpos2!="number"&&(t.nextpos2=t.firstpos2),typeof t.addpos2!="number"&&(t.addpos2=0),c=u.css("display")==="none",!c||n){f={};switch(t.dir1){case"down":e="top";break;case"up":e="bottom";break;case"left":e="right";break;case"right":e="left"}s=parseInt(u.css(e).replace(/(?:\..*|[^0-9.])/g,""));isNaN(s)&&(s=0);typeof t.firstpos1!="undefined"||c||(t.firstpos1=s,t.nextpos1=t.firstpos1);switch(t.dir2){case"down":o="top";break;case"up":o="bottom";break;case"left":o="right";break;case"right":o="left"}if(h=parseInt(u.css(o).replace(/(?:\..*|[^0-9.])/g,"")),isNaN(h)&&(h=0),typeof t.firstpos2!="undefined"||c||(t.firstpos2=h,t.nextpos2=t.firstpos2),(t.dir1==="down"&&t.nextpos1+u.height()>(t.context.is(i)?r.height():t.context.prop("scrollHeight"))||t.dir1==="up"&&t.nextpos1+u.height()>(t.context.is(i)?r.height():t.context.prop("scrollHeight"))||t.dir1==="left"&&t.nextpos1+u.width()>(t.context.is(i)?r.width():t.context.prop("scrollWidth"))||t.dir1==="right"&&t.nextpos1+u.width()>(t.context.is(i)?r.width():t.context.prop("scrollWidth")))&&(t.nextpos1=t.firstpos1,t.nextpos2+=t.addpos2+(typeof t.spacing2=="undefined"?25:t.spacing2),t.addpos2=0),t.animation&&t.nextpos2<h)switch(t.dir2){case"down":f.top=t.nextpos2+"px";break;case"up":f.bottom=t.nextpos2+"px";break;case"left":f.right=t.nextpos2+"px";break;case"right":f.left=t.nextpos2+"px"}else typeof t.nextpos2=="number"&&u.css(o,t.nextpos2+"px");switch(t.dir2){case"down":case"up":u.outerHeight(!0)>t.addpos2&&(t.addpos2=u.height());break;case"left":case"right":u.outerWidth(!0)>t.addpos2&&(t.addpos2=u.width())}if(typeof t.nextpos1=="number")if(t.animation&&(s>t.nextpos1||f.top||f.bottom||f.right||f.left))switch(t.dir1){case"down":f.top=t.nextpos1+"px";break;case"up":f.bottom=t.nextpos1+"px";break;case"left":f.right=t.nextpos1+"px";break;case"right":f.left=t.nextpos1+"px"}else u.css(e,t.nextpos1+"px");(f.top||f.bottom||f.right||f.left)&&u.animate(f,{duration:this.options.position_animate_speed,queue:!1});switch(t.dir1){case"down":case"up":t.nextpos1+=u.height()+(typeof t.spacing1=="undefined"?25:t.spacing1);break;case"left":case"right":t.nextpos1+=u.width()+(typeof t.spacing1=="undefined"?25:t.spacing1)}}return this}},queuePosition:function(n,i){return t&&clearTimeout(t),i||(i=10),t=setTimeout(function(){PNotify.positionAll(n)},i),this},cancelRemove:function(){return this.timer&&window.clearTimeout(this.timer),this.state==="closing"&&(this.elem.stop(!0),this.state="open",this.animating="in",this.elem.css("height","auto").animate({width:this.options.width,opacity:this.options.opacity},"fast")),this},queueRemove:function(){var n=this;return this.cancelRemove(),this.timer=window.setTimeout(function(){n.remove(!0)},isNaN(this.options.delay)?0:this.options.delay),this}}),n.extend(PNotify,{notices:[],removeAll:function(){n.each(PNotify.notices,function(){this.remove&&this.remove()})},positionAll:function(i){t&&clearTimeout(t);t=null;n.each(PNotify.notices,function(){var n=this.options.stack;n&&(n.nextpos1=n.firstpos1,n.nextpos2=n.firstpos2,n.addpos2=0,n.animation=i)});n.each(PNotify.notices,function(){this.position()})},styling:{jqueryui:{container:"ui-widget ui-widget-content ui-corner-all",notice:"ui-state-highlight",notice_icon:"ui-icon ui-icon-info",info:"",info_icon:"ui-icon ui-icon-info",success:"ui-state-default",success_icon:"ui-icon ui-icon-circle-check",error:"ui-state-error",error_icon:"ui-icon ui-icon-alert"},bootstrap2:{container:"alert",notice:"",notice_icon:"icon-exclamation-sign",info:"alert-info",info_icon:"icon-info-sign",success:"alert-success",success_icon:"icon-ok-sign",error:"alert-error",error_icon:"icon-warning-sign"},bootstrap3:{container:"alert",notice:"alert-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"alert-info",info_icon:"glyphicon glyphicon-info-sign",success:"alert-success",success_icon:"glyphicon glyphicon-ok-sign",error:"alert-danger",error_icon:"glyphicon glyphicon-warning-sign"}}}),PNotify.styling.fontawesome=n.extend({},PNotify.styling.bootstrap3),n.extend(PNotify.styling.fontawesome,{notice_icon:"fa fa-exclamation-circle",info_icon:"fa fa-info",success_icon:"fa fa-check",error_icon:"fa fa-warning"}),document.body?u():n(u),PNotify}),function(n){typeof define=="function"&&define.amd?define("pnotify.buttons",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){t.prototype.options.buttons={closer:!0,closer_hover:!0,sticker:!0,sticker_hover:!0,labels:{close:"Close",stick:"Stick"}};t.prototype.modules.buttons={myOptions:null,closer:null,sticker:null,init:function(t,i){var r=this;this.myOptions=i;t.elem.on({mouseenter:function(){!r.myOptions.sticker||t.options.nonblock&&t.options.nonblock.nonblock||r.sticker.trigger("pnotify_icon").css("visibility","visible");!r.myOptions.closer||t.options.nonblock&&t.options.nonblock.nonblock||r.closer.css("visibility","visible")},mouseleave:function(){r.myOptions.sticker_hover&&r.sticker.css("visibility","hidden");r.myOptions.closer_hover&&r.closer.css("visibility","hidden")}});this.sticker=n("<div />",{"class":"ui-pnotify-sticker",css:{cursor:"pointer",visibility:i.sticker_hover?"hidden":"visible"},click:function(){t.options.hide=!t.options.hide;t.options.hide?t.queueRemove():t.cancelRemove();n(this).trigger("pnotify_icon")}}).bind("pnotify_icon",function(){n(this).children().removeClass(t.styles.pin_up+" "+t.styles.pin_down).addClass(t.options.hide?t.styles.pin_up:t.styles.pin_down)}).append(n("<span />",{"class":t.styles.pin_up,title:i.labels.stick})).prependTo(t.container);(!i.sticker||t.options.nonblock&&t.options.nonblock.nonblock)&&this.sticker.css("display","none");this.closer=n("<div />",{"class":"ui-pnotify-closer",css:{cursor:"pointer",visibility:i.closer_hover?"hidden":"visible"},click:function(){t.remove(!1);r.sticker.css("visibility","hidden");r.closer.css("visibility","hidden")}}).append(n("<span />",{"class":t.styles.closer,title:i.labels.close})).prependTo(t.container);(!i.closer||t.options.nonblock&&t.options.nonblock.nonblock)&&this.closer.css("display","none")},update:function(n,t){this.myOptions=t;!t.closer||n.options.nonblock&&n.options.nonblock.nonblock?this.closer.css("display","none"):t.closer&&this.closer.css("display","block");!t.sticker||n.options.nonblock&&n.options.nonblock.nonblock?this.sticker.css("display","none"):t.sticker&&this.sticker.css("display","block");this.sticker.trigger("pnotify_icon");t.sticker_hover?this.sticker.css("visibility","hidden"):n.options.nonblock&&n.options.nonblock.nonblock||this.sticker.css("visibility","visible");t.closer_hover?this.closer.css("visibility","hidden"):n.options.nonblock&&n.options.nonblock.nonblock||this.closer.css("visibility","visible")}};n.extend(t.styling.jqueryui,{closer:"ui-icon ui-icon-close",pin_up:"ui-icon ui-icon-pin-w",pin_down:"ui-icon ui-icon-pin-s"});n.extend(t.styling.bootstrap2,{closer:"icon-remove",pin_up:"icon-pause",pin_down:"icon-play"});n.extend(t.styling.bootstrap3,{closer:"glyphicon glyphicon-remove",pin_up:"glyphicon glyphicon-pause",pin_down:"glyphicon glyphicon-play"});n.extend(t.styling.fontawesome,{closer:"fa fa-times",pin_up:"fa fa-pause",pin_down:"fa fa-play"})}),function(n){typeof define=="function"&&define.amd?define("pnotify.desktop",["jquery","pnotify"],n):n(jQuery,PNotify)}(function(n,t){var i,r=function(n,t){return r="Notification"in window?function(n,t){return new Notification(n,t)}:"mozNotification"in navigator?function(n,t){return navigator.mozNotification.createNotification(n,t.body,t.icon).show()}:"webkitNotifications"in window?function(n,t){return window.webkitNotifications.createNotification(t.icon,n,t.body)}:function(){return null},r(n,t)};t.prototype.options.desktop={desktop:!1,icon:null,tag:null};t.prototype.modules.desktop={tag:null,icon:null,genNotice:function(n,t){this.icon=t.icon===null?"http://sciactive.com/pnotify/includes/desktop/"+n.options.type+".png":t.icon===!1?null:t.icon;(this.tag===null||t.tag!==null)&&(this.tag=t.tag===null?"PNotify-"+Math.round(Math.random()*1e6):t.tag);n.desktop=r(n.options.title,{icon:this.icon,body:n.options.text,tag:this.tag});"close"in n.desktop||(n.desktop.close=function(){n.desktop.cancel()});n.desktop.onclick=function(){n.elem.trigger("click")};n.desktop.onclose=function(){n.state!=="closing"&&n.state!=="closed"&&n.remove()}},init:function(n,r){r.desktop&&(i=t.desktop.checkPermission(),i==0)&&this.genNotice(n,r)},update:function(n,t){i==0&&t.desktop&&this.genNotice(n,t)},beforeOpen:function(n,t){i==0&&t.desktop&&n.elem.css({left:"-10000px",display:"none"})},afterOpen:function(n,t){i==0&&t.desktop&&(n.elem.css({left:"-10000px",display:"none"}),"show"in n.desktop&&n.desktop.show())},beforeClose:function(n,t){i==0&&t.desktop&&n.elem.css({left:"-10000px",display:"none"})},afterClose:function(n,t){i==0&&t.desktop&&(n.elem.css({left:"-10000px",display:"none"}),n.desktop.close())}};t.desktop={permission:function(){typeof Notification!="undefined"&&"requestPermission"in Notification?Notification.requestPermission():"webkitNotifications"in window&&window.webkitNotifications.requestPermission()},checkPermission:function(){return typeof Notification!="undefined"&&"permission"in Notification?Notification.permission=="granted"?0:1:"webkitNotifications"in window?window.webkitNotifications.checkPermission():1}};i=t.desktop.checkPermission()}),function(n){var o=function(n,t){typeof t=="undefined"&&(t={});this.init(n,t)},t=o.prototype,f,e=["canvas","vml"],i=["oval","spiral","square","rect","roundRect"],a=/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,c=navigator.appVersion.indexOf("MSIE")!==-1&&parseFloat(navigator.appVersion.split("MSIE")[1])===8?!0:!1,v=!!document.createElement("canvas").getContext,l=!0,u=function(n,t,i){var n=document.createElement(n),r;for(r in i)n[r]=i[r];return typeof t!="undefined"&&t.appendChild(n),n},r=function(n,t){for(var i in t)n.style[i]=t[i];return n},s=function(n,t){for(var i in t)n.setAttribute(i,t[i]);return n},h=function(n,t,i,r){n.save();n.translate(t,i);n.rotate(r);n.translate(-t,-i);n.beginPath()};t.init=function(n,t){typeof t.safeVML=="boolean"&&(l=t.safeVML);try{this.mum=document.getElementById(n)!==void 0?document.getElementById(n):document.body}catch(h){this.mum=document.body}if(t.id=typeof t.id!="undefined"?t.id:"canvasLoader",this.cont=u("div",this.mum,{id:t.id}),v)f=e[0],this.can=u("canvas",this.cont),this.con=this.can.getContext("2d"),this.cCan=r(u("canvas",this.cont),{display:"none"}),this.cCon=this.cCan.getContext("2d");else{if(f=e[1],typeof o.vmlSheet=="undefined"){document.getElementsByTagName("head")[0].appendChild(u("style"));o.vmlSheet=document.styleSheets[document.styleSheets.length-1];var i=["group","oval","roundrect","fill"],s;for(s in i)o.vmlSheet.addRule(i[s],"behavior:url(#default#VML); position:absolute;")}this.vml=u("group",this.cont)}this.setColor(this.color);this.draw();r(this.cont,{display:"none"})};t.cont={};t.can={};t.con={};t.cCan={};t.cCon={};t.timer={};t.activeId=0;t.diameter=40;t.setDiameter=function(n){this.diameter=Math.round(Math.abs(n));this.redraw()};t.getDiameter=function(){return this.diameter};t.cRGB={};t.color="#428BCA";t.setColor=function(n){this.color=a.test(n)?n:"#428BCA";this.cRGB=this.getRGB(this.color);this.redraw()};t.getColor=function(){return this.color};t.shape=i[0];t.setShape=function(n){for(var t in i)if(n===i[t]){this.shape=n;this.redraw();break}};t.getShape=function(){return this.shape};t.density=40;t.setDensity=function(n){this.density=l&&f===e[1]?Math.round(Math.abs(n))<=40?Math.round(Math.abs(n)):40:Math.round(Math.abs(n));this.density>360&&(this.density=360);this.activeId=0;this.redraw()};t.getDensity=function(){return this.density};t.range=1.3;t.setRange=function(n){this.range=Math.abs(n);this.redraw()};t.getRange=function(){return this.range};t.speed=2;t.setSpeed=function(n){this.speed=Math.round(Math.abs(n))};t.getSpeed=function(){return this.speed};t.fps=24;t.setFPS=function(n){this.fps=Math.round(Math.abs(n));this.reset()};t.getFPS=function(){return this.fps};t.getRGB=function(n){return n=n.charAt(0)==="#"?n.substring(1,7):n,{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16)}};t.draw=function(){var w=0,t,y,n,l,a,d,p,k=this.density,g=Math.round(k*this.range),b,v,nt=0,o;if(v=this.cCon,o=this.diameter,f===e[0])for(v.clearRect(0,0,1e3,1e3),s(this.can,{width:o,height:o}),s(this.cCan,{width:o,height:o});w<k;){b=w<=g?1-1/g*w:b=0;d=270-360/k*w;p=d/180*Math.PI;v.fillStyle="rgba("+this.cRGB.r+","+this.cRGB.g+","+this.cRGB.b+","+b.toString()+")";switch(this.shape){case i[0]:case i[1]:t=o*.07;l=o*.47+Math.cos(p)*(o*.47-t)-o*.47;a=o*.47+Math.sin(p)*(o*.47-t)-o*.47;v.beginPath();this.shape===i[1]?v.arc(o*.5+l,o*.5+a,t*b,0,Math.PI*2,!1):v.arc(o*.5+l,o*.5+a,t,0,Math.PI*2,!1);break;case i[2]:t=o*.12;l=Math.cos(p)*(o*.47-t)+o*.5;a=Math.sin(p)*(o*.47-t)+o*.5;h(v,l,a,p);v.fillRect(l,a-t*.5,t,t);break;case i[3]:case i[4]:y=o*.3;n=y*.27;l=Math.cos(p)*(n+(o-n)*.13)+o*.5;a=Math.sin(p)*(n+(o-n)*.13)+o*.5;h(v,l,a,p);this.shape===i[3]?v.fillRect(l,a-n*.5,y,n):(t=n*.55,v.moveTo(l+t,a-n*.5),v.lineTo(l+y-t,a-n*.5),v.quadraticCurveTo(l+y,a-n*.5,l+y,a-n*.5+t),v.lineTo(l+y,a-n*.5+n-t),v.quadraticCurveTo(l+y,a-n*.5+n,l+y-t,a-n*.5+n),v.lineTo(l+t,a-n*.5+n),v.quadraticCurveTo(l,a-n*.5+n,l,a-n*.5+n-t),v.lineTo(l,a-n*.5+t),v.quadraticCurveTo(l,a-n*.5,l+t,a-n*.5))}v.closePath();v.fill();v.restore();++w}else{r(this.cont,{width:o,height:o});r(this.vml,{width:o,height:o});switch(this.shape){case i[0]:case i[1]:p="oval";t=140;break;case i[2]:p="roundrect";t=120;break;case i[3]:case i[4]:p="roundrect";t=300}for(y=n=t,l=500-n,a=-n*.5;w<k;){b=w<=g?1-1/g*w:b=0;d=270-360/k*w;switch(this.shape){case i[1]:y=n=t*b;l=500-t*.5-t*b*.5;a=(t-t*b)*.5;break;case i[0]:case i[2]:c&&(a=0,this.shape===i[2]&&(l=500-n*.5));break;case i[3]:case i[4]:y=t*.95;n=y*.28;c?(l=0,a=500-n*.5):(l=500-y,a=-n*.5);nt=this.shape===i[4]?.6:0}v=s(r(u("group",this.vml),{width:1e3,height:1e3,rotation:d}),{coordsize:"1000,1000",coordorigin:"-500,-500"});v=r(u(p,v,{stroked:!1,arcSize:nt}),{width:y,height:n,top:a,left:l});u("fill",v,{color:this.color,opacity:b});++w}}this.tick(!0)};t.clean=function(){if(f===e[0])this.con.clearRect(0,0,1e3,1e3);else{var n=this.vml;if(n.hasChildNodes())for(;n.childNodes.length>=1;)n.removeChild(n.firstChild)}};t.redraw=function(){this.clean();this.draw()};t.reset=function(){typeof this.timer=="number"&&(this.hide(),this.show())};t.tick=function(n){var i=this.con,t=this.diameter;n||(this.activeId+=360/this.density*this.speed);f===e[0]?(i.clearRect(0,0,t,t),h(i,t*.5,t*.5,this.activeId/180*Math.PI),i.drawImage(this.cCan,0,0,t,t),i.restore()):(this.activeId>=360&&(this.activeId-=360),r(this.vml,{rotation:this.activeId}))};t.show=function(){if(typeof this.timer!="number"){var n=this;this.timer=self.setInterval(function(){n.tick()},Math.round(1e3/this.fps));r(this.cont,{display:"block"})}};t.hide=function(){typeof this.timer=="number"&&(clearInterval(this.timer),delete this.timer,r(this.cont,{display:"none"}))};t.kill=function(){var n=this.cont,t;typeof this.timer=="number"&&this.hide();f===e[0]?(n.removeChild(this.can),n.removeChild(this.cCan)):n.removeChild(this.vml);for(t in this)delete this[t]};n.CanvasLoader=o}(window),function(n,t,i){function v(t,i){var u,f;if(n.isArray(t)){for(u=t.length-1;u>=0;u--)f=t[u],n.type(f)==="string"&&r.transports[f]||(i.log("Invalid transport: "+f+", removing it from the transports list."),t.splice(u,1));t.length===0&&(i.log("No transports remain within the specified transport array."),t=null)}else if(r.transports[t]||t==="auto"){if(t==="auto"&&r._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+t.toString()+"."),t=null;return t}function y(n){return n==="http:"?80:n==="https:"?443:void 0}function h(n,t){return t.match(/:\d+$/)?t:t+":"+y(n)}function p(t,i){var u=this,r=[];u.tryBuffer=function(i){return t.state===n.signalR.connectionState.connecting?(r.push(i),!0):!1};u.drain=function(){if(t.state===n.signalR.connectionState.connected)while(r.length>0)i(r.shift())};u.clear=function(){r=[]}}var f={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",errorDuringStartRequest:"Error during start request. Stopping the connection.",stoppedDuringStartRequest:"The connection was stopped during the start request.",errorParsingStartResponse:"Error parsing start response: '{0}'. Stopping the connection.",invalidStartResponse:"Invalid start response: '{0}'. Stopping the connection.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server.  Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting.",reconnectTimeout:"Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",reconnectWindowTimeout:"The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."};if(typeof n!="function")throw new Error(f.nojQuery);var r,c,o=t.document.readyState==="complete",e=n(t),l="__Negotiate Aborted__",u={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},w=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},s=function(t,i,r){return i===t.state?(t.state=r,n(t).triggerHandler(u.onStateChanged,[{oldState:i,newState:r}]),!0):!1},b=function(n){return n.state===r.connectionState.disconnected},a=function(n){return n._.keepAliveData.activated&&n.transport.supportsKeepAlive(n)},k=function(i){var f,e;i._.configuredStopReconnectingTimeout||(e=function(t){var i=r._.format(r.resources.reconnectTimeout,t.disconnectTimeout);t.log(i);n(t).triggerHandler(u.onError,[r._.error(i,"TimeoutException")]);t.stop(!1,!1)},i.reconnecting(function(){var n=this;n.state===r.connectionState.reconnecting&&(f=t.setTimeout(function(){e(n)},n.disconnectTimeout))}),i.stateChanged(function(n){n.oldState===r.connectionState.reconnecting&&t.clearTimeout(f)}),i._.configuredStopReconnectingTimeout=!0)};if(r=function(n,t,i){return new r.fn.init(n,t,i)},r._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var i,n;return t.navigator.appName==="Microsoft Internet Explorer"&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(i=t.parseFloat(n[1]))),i}(),error:function(n,t,i){var r=new Error(n);return r.source=t,typeof i!="undefined"&&(r.context=i),r},transportError:function(n,t,r,u){var f=this.error(n,r,u);return f.transport=t?t.name:i,f},format:function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace("{"+n+"}",arguments[n+1]);return t},firefoxMajorVersion:function(n){var t=n.match(/Firefox\/(\d+)/);return!t||!t.length||t.length<2?0:parseInt(t[1],10)},configurePingInterval:function(i){var f=i._.config,e=function(t){n(i).triggerHandler(u.onError,[t])};f&&!i._.pingIntervalId&&f.pingInterval&&(i._.pingIntervalId=t.setInterval(function(){r.transports._logic.pingServer(i).fail(e)},f.pingInterval))}},r.events=u,r.resources=f,r.ajaxDefaults={processData:!0,timeout:null,async:!0,global:!1,cache:!1},r.changeState=s,r.isDisconnecting=b,r.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4},r.hub={start:function(){throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'><\/script>.");}},typeof e.on=="function")e.on("load",function(){o=!0});else e.load(function(){o=!0});r.fn=r.prototype={init:function(t,i,r){var f=n(this);this.url=t;this.qs=i;this.lastError=null;this._={keepAliveData:{},connectingMessageBuffer:new p(this,function(n){f.triggerHandler(u.onReceived,[n])}),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0};typeof r=="boolean"&&(this.logging=r)},_parseResponse:function(n){var t=this;return n?typeof n=="string"?t.json.parse(n):n:n},_originalJson:t.JSON,json:t.JSON,isCrossDomain:function(i,r){var u;return(i=n.trim(i),r=r||t.location,i.indexOf("http")!==0)?!1:(u=t.document.createElement("a"),u.href=i,u.protocol+h(u.protocol,u.host)!==r.protocol+h(r.protocol,r.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:r.connectionState.disconnected,clientProtocol:"1.5",reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(i,h){var c=this,y={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},d,p=c._deferral||n.Deferred(),w=t.document.createElement("a"),b,g;if(c.lastError=null,c._deferral=p,!c.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(n.type(i)==="function"?h=i:n.type(i)==="object"&&(n.extend(y,i),n.type(y.callback)==="function"&&(h=y.callback)),y.transport=v(y.transport,c),!y.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");return(c._.config=y,!o&&y.waitForPageLoad===!0)?(c._.deferredStartHandler=function(){c.start(i,h)},e.bind("load",c._.deferredStartHandler),p.promise()):c.state===r.connectionState.connecting?p.promise():s(c,r.connectionState.disconnected,r.connectionState.connecting)===!1?(p.resolve(c),p.promise()):(k(c),w.href=c.url,w.protocol&&w.protocol!==":"?(c.protocol=w.protocol,c.host=w.host):(c.protocol=t.document.location.protocol,c.host=w.host||t.document.location.host),c.baseUrl=c.protocol+"//"+c.host,c.wsProtocol=c.protocol==="https:"?"wss://":"ws://",y.transport==="auto"&&y.jsonp===!0&&(y.transport="longPolling"),c.url.indexOf("//")===0&&(c.url=t.location.protocol+c.url,c.log("Protocol relative URL detected, normalizing it to '"+c.url+"'.")),this.isCrossDomain(c.url)&&(c.log("Auto detected cross domain url."),y.transport==="auto"&&(y.transport=["webSockets","serverSentEvents","longPolling"]),typeof y.withCredentials=="undefined"&&(y.withCredentials=!0),y.jsonp||(y.jsonp=!n.support.cors,y.jsonp&&c.log("Using jsonp because this browser doesn't support CORS.")),c.contentType=r._.defaultContentType),c.withCredentials=y.withCredentials,c.ajaxDataType=y.jsonp?"jsonp":"text",n(c).bind(u.onStart,function(){n.type(h)==="function"&&h.call(c);p.resolve(c)}),c._.initHandler=r.transports._logic.initHandler(c),d=function(i,o){var l=r._.error(f.noTransportOnInit);if(o=o||0,o>=i.length){o===0?c.log("No transports supported by the server were selected."):o===1?c.log("No fallback transports were selected."):c.log("Fallback transports exhausted.");n(c).triggerHandler(u.onError,[l]);p.reject(l);c.stop();return}if(c.state!==r.connectionState.disconnected){var y=i[o],h=r.transports[y],v=function(){d(i,o+1)};c.transport=h;try{c._.initHandler.start(h,function(){var i=r._.firefoxMajorVersion(t.navigator.userAgent)>=11,f=!!c.withCredentials&&i;c.log("The start request succeeded. Transitioning to the connected state.");a(c)&&r.transports._logic.monitorKeepAlive(c);r.transports._logic.startHeartbeat(c);r._.configurePingInterval(c);s(c,r.connectionState.connecting,r.connectionState.connected)||c.log("WARNING! The connection was not in the connecting state.");c._.connectingMessageBuffer.drain();n(c).triggerHandler(u.onStart);e.bind("unload",function(){c.log("Window unloading, stopping the connection.");c.stop(f)});i&&e.bind("beforeunload",function(){t.setTimeout(function(){c.stop(f)},0)})},v)}catch(w){c.log(h.name+" transport threw '"+w.message+"' when attempting to start.");v()}}},b=c.url+"/negotiate",g=function(t,i){var e=r._.error(f.errorOnNegotiate,t,i._.negotiateRequest);n(i).triggerHandler(u.onError,e);p.reject(e);i.stop()},n(c).triggerHandler(u.onStarting),b=r.transports._logic.prepareQueryString(c,b),c.log("Negotiating with '"+b+"'."),c._.negotiateRequest=r.transports._logic.ajax(c,{url:b,error:function(n,t){t!==l?g(n,c):p.reject(r._.error(f.stoppedWhileNegotiating,null,c._.negotiateRequest))},success:function(t){var i,e,h,o=[],s=[];try{i=c._parseResponse(t)}catch(l){g(r._.error(f.errorParsingNegotiateResponse,l),c);return}if(e=c._.keepAliveData,c.appRelativeUrl=i.Url,c.id=i.ConnectionId,c.token=i.ConnectionToken,c.webSocketServerUrl=i.WebSocketServerUrl,c._.pollTimeout=i.ConnectionTimeout*1e3+1e4,c.disconnectTimeout=i.DisconnectTimeout*1e3,c._.totalTransportConnectTimeout=c.transportConnectTimeout+i.TransportConnectTimeout*1e3,i.KeepAliveTimeout?(e.activated=!0,e.timeout=i.KeepAliveTimeout*1e3,e.timeoutWarning=e.timeout*c.keepAliveWarnAt,c._.beatInterval=(e.timeout-e.timeoutWarning)/3):e.activated=!1,c.reconnectWindow=c.disconnectTimeout+(e.timeout||0),!i.ProtocolVersion||i.ProtocolVersion!==c.clientProtocol){h=r._.error(r._.format(f.protocolIncompatible,c.clientProtocol,i.ProtocolVersion));n(c).triggerHandler(u.onError,[h]);p.reject(h);return}n.each(r.transports,function(n){if(n.indexOf("_")===0||n==="webSockets"&&!i.TryWebSockets)return!0;s.push(n)});n.isArray(y.transport)?n.each(y.transport,function(t,i){n.inArray(i,s)>=0&&o.push(i)}):y.transport==="auto"?o=s:n.inArray(y.transport,s)>=0&&o.push(y.transport);d(o)}}),p.promise())},starting:function(t){var i=this;return n(i).bind(u.onStarting,function(){t.call(i)}),i},send:function(n){var t=this;if(t.state===r.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(t.state===r.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 t.transport.send(t,n),t},received:function(t){var i=this;return n(i).bind(u.onReceived,function(n,r){t.call(i,r)}),i},stateChanged:function(t){var i=this;return n(i).bind(u.onStateChanged,function(n,r){t.call(i,r)}),i},error:function(t){var i=this;return n(i).bind(u.onError,function(n,r,u){i.lastError=r;t.call(i,r,u)}),i},disconnected:function(t){var i=this;return n(i).bind(u.onDisconnect,function(){t.call(i)}),i},connectionSlow:function(t){var i=this;return n(i).bind(u.onConnectionSlow,function(){t.call(i)}),i},reconnecting:function(t){var i=this;return n(i).bind(u.onReconnecting,function(){t.call(i)}),i},reconnected:function(t){var i=this;return n(i).bind(u.onReconnect,function(){t.call(i)}),i},stop:function(i,h){var c=this,v=c._deferral;if(c._.deferredStartHandler&&e.unbind("load",c._.deferredStartHandler),delete c._.config,delete c._.deferredStartHandler,!o&&(!c._.config||c._.config.waitForPageLoad===!0)){c.log("Stopping connection prior to negotiate.");v&&v.reject(r._.error(f.stoppedWhileLoading));return}if(c.state!==r.connectionState.disconnected)return c.log("Stopping connection."),t.clearTimeout(c._.beatHandle),t.clearInterval(c._.pingIntervalId),c.transport&&(c.transport.stop(c),h!==!1&&c.transport.abort(c,i),a(c)&&r.transports._logic.stopMonitoringKeepAlive(c),c.transport=null),c._.negotiateRequest&&(c._.negotiateRequest.abort(l),delete c._.negotiateRequest),c._.initHandler&&c._.initHandler.stop(),delete c._deferral,delete c.messageId,delete c.groupsToken,delete c.id,delete c._.pingIntervalId,delete c._.lastMessageAt,delete c._.lastActiveAt,c._.connectingMessageBuffer.clear(),n(c).unbind(u.onStart),s(c,c.state,r.connectionState.disconnected),n(c).triggerHandler(u.onDisconnect),c},log:function(n){w(n,this.logging)}};r.fn.init.prototype=r.fn;r.noConflict=function(){return n.connection===r&&(n.connection=c),r};n.connection&&(c=n.connection);n.connection=n.signalR=r}(window.jQuery,window),function(n,t,i){function o(n){n._.keepAliveData.monitoring&&c(n);u.markActive(n)&&(n._.beatHandle=t.setTimeout(function(){o(n)},n._.beatInterval))}function c(t){var i=t._.keepAliveData,u;t.state===r.connectionState.connected&&(u=(new Date).getTime()-t._.lastMessageAt,u>=i.timeout?(t.log("Keep alive timed out.  Notifying transport that connection has been lost."),t.transport.lostConnection(t)):u>=i.timeoutWarning?i.userNotified||(t.log("Keep alive has been missed, connection may be dead/slow."),n(t).triggerHandler(f.onConnectionSlow),i.userNotified=!0):i.userNotified=!1)}function e(n,t){var i=n.url+t;return n.transport&&(i+="?transport="+n.transport.name),u.prepareQueryString(n,i)}function s(n){this.connection=n;this.startRequested=!1;this.startCompleted=!1;this.connectionStopped=!1}var r=n.signalR,f=n.signalR.events,l=n.signalR.changeState,h="__Start Aborted__",u;r.transports={};s.prototype={start:function(n,r,u){var f=this,e=f.connection,o=!1;if(f.startRequested||f.connectionStopped){e.log("WARNING! "+n.name+" transport cannot be started. Initialization ongoing or completed.");return}e.log(n.name+" transport starting.");n.start(e,function(){o||f.initReceived(n,r)},function(t){return o||(o=!0,f.transportFailed(n,t,u)),!f.startCompleted||f.connectionStopped});f.transportTimeoutHandle=t.setTimeout(function(){o||(o=!0,e.log(n.name+" transport timed out when trying to connect."),f.transportFailed(n,i,u))},e._.totalTransportConnectTimeout)},stop:function(){this.connectionStopped=!0;t.clearTimeout(this.transportTimeoutHandle);r.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(n,i){var u=this,f=u.connection;if(u.startRequested){f.log("WARNING! The client received multiple init messages.");return}u.connectionStopped||(u.startRequested=!0,t.clearTimeout(u.transportTimeoutHandle),f.log(n.name+" transport connected. Initiating start request."),r.transports._logic.ajaxStart(f,function(){u.startCompleted=!0;i()}))},transportFailed:function(i,u,e){var o=this.connection,h=o._deferral,s;this.connectionStopped||(t.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(s=r._.error(r.resources.errorDuringStartRequest,u),o.log(i.name+" transport failed during the start request. Stopping the connection."),n(o).triggerHandler(f.onError,[s]),h&&h.reject(s),o.stop()):(i.stop(o),o.log(i.name+" transport failed to connect. Attempting to fall back."),e()))}};u=r.transports._logic={ajax:function(t,i){return n.ajax(n.extend(!0,{},n.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:t.withCredentials},contentType:t.contentType,dataType:t.ajaxDataType},i))},pingServer:function(t){var e,f,i=n.Deferred();return t.transport?(e=t.url+"/ping",e=u.addQs(e,t.qs),f=u.ajax(t,{url:e,success:function(n){var u;try{u=t._parseResponse(n)}catch(e){i.reject(r._.transportError(r.resources.pingServerFailedParse,t.transport,e,f));t.stop();return}u.Response==="pong"?i.resolve():i.reject(r._.transportError(r._.format(r.resources.pingServerFailedInvalidResponse,n),t.transport,null,f))},error:function(n){n.status===401||n.status===403?(i.reject(r._.transportError(r._.format(r.resources.pingServerFailedStatusCode,n.status),t.transport,n,f)),t.stop()):i.reject(r._.transportError(r.resources.pingServerFailed,t.transport,n,f))}})):i.reject(r._.transportError(r.resources.noConnectionTransport,t.transport)),i.promise()},prepareQueryString:function(n,i){var r;return r=u.addQs(i,"clientProtocol="+n.clientProtocol),r=u.addQs(r,n.qs),n.token&&(r+="&connectionToken="+t.encodeURIComponent(n.token)),n.data&&(r+="&connectionData="+t.encodeURIComponent(n.data)),r},addQs:function(t,i){var r=t.indexOf("?")!==-1?"&":"?",u;if(!i)return t;if(typeof i=="object")return t+r+n.param(i);if(typeof i=="string")return u=i.charAt(0),(u==="?"||u==="&")&&(r=""),t+r+i;throw new Error("Query string property must be either a string or object.");},getUrl:function(n,i,r,f,e){var h=i==="webSockets"?"":n.baseUrl,o=h+n.appRelativeUrl,s="transport="+i;return!e&&n.groupsToken&&(s+="&groupsToken="+t.encodeURIComponent(n.groupsToken)),r?(o+=f?"/poll":"/reconnect",!e&&n.messageId&&(s+="&messageId="+t.encodeURIComponent(n.messageId))):o+="/connect",o+="?"+s,o=u.prepareQueryString(n,o),e||(o+="&tid="+Math.floor(Math.random()*11)),o},maximizePersistentResponse:function(n){return{MessageId:n.C,Messages:n.M,Initialized:typeof n.S!="undefined"?!0:!1,ShouldReconnect:typeof n.T!="undefined"?!0:!1,LongPollDelay:n.L,GroupsToken:n.G}},updateGroups:function(n,t){t&&(n.groupsToken=t)},stringifySend:function(n,t){return typeof t=="string"||typeof t=="undefined"||t===null?t:n.json.stringify(t)},ajaxSend:function(t,i){var h=u.stringifySend(t,i),c=e(t,"/send"),o,s=function(t,u){n(u).triggerHandler(f.onError,[r._.transportError(r.resources.sendFailed,u.transport,t,o),i])};return o=u.ajax(t,{url:c,type:t.ajaxDataType==="jsonp"?"GET":"POST",contentType:r._.defaultContentType,data:{data:h},success:function(n){var i;if(n){try{i=t._parseResponse(n)}catch(r){s(r,t);t.stop();return}u.triggerReceived(t,i)}},error:function(n,i){i!=="abort"&&i!=="parsererror"&&s(n,t)}})},ajaxAbort:function(n,t){if(typeof n.transport!="undefined"){t=typeof t=="undefined"?!0:t;var i=e(n,"/abort");u.ajax(n,{url:i,async:t,timeout:1e3,type:"POST"});n.log("Fired ajax abort async = "+t+".")}},ajaxStart:function(t,i){var s=function(n){var i=t._deferral;i&&i.reject(n)},o=function(i){t.log("The start request failed. Stopping the connection.");n(t).triggerHandler(f.onError,[i]);s(i);t.stop()};t._.startRequest=u.ajax(t,{url:e(t,"/start"),success:function(n,u,f){var e;try{e=t._parseResponse(n)}catch(s){o(r._.error(r._.format(r.resources.errorParsingStartResponse,n),s,f));return}e.Response==="started"?i():o(r._.error(r._.format(r.resources.invalidStartResponse,n),null,f))},error:function(n,i,u){i!==h?o(r._.error(r.resources.errorDuringStartRequest,u,n)):(t.log("The start request aborted because connection.stop() was called."),s(r._.error(r.resources.stoppedDuringStartRequest,null,n)))}})},tryAbortStartRequest:function(n){n._.startRequest&&(n._.startRequest.abort(h),delete n._.startRequest)},tryInitialize:function(n,t,i){t.Initialized&&i?i():t.Initialized&&n.log("WARNING! The client received an init message after reconnecting.")},triggerReceived:function(t,i){t._.connectingMessageBuffer.tryBuffer(i)||n(t).triggerHandler(f.onReceived,[i])},processMessages:function(t,i,r){var f;u.markLastMessage(t);i&&(f=u.maximizePersistentResponse(i),u.updateGroups(t,f.GroupsToken),f.MessageId&&(t.messageId=f.MessageId),f.Messages&&(n.each(f.Messages,function(n,i){u.triggerReceived(t,i)}),u.tryInitialize(t,f,r)))},monitorKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring?t.log("Tried to monitor keep alive but it's already being monitored."):(i.monitoring=!0,u.markLastMessage(t),t._.keepAliveData.reconnectKeepAliveUpdate=function(){u.markLastMessage(t)},n(t).bind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t.log("Now monitoring keep alive with a warning timeout of "+i.timeoutWarning+", keep alive timeout of "+i.timeout+" and disconnecting timeout of "+t.disconnectTimeout))},stopMonitoringKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring&&(i.monitoring=!1,n(t).unbind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t._.keepAliveData={},t.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(n){n._.lastActiveAt=(new Date).getTime();o(n)},markLastMessage:function(n){n._.lastMessageAt=(new Date).getTime()},markActive:function(n){return u.verifyLastActive(n)?(n._.lastActiveAt=(new Date).getTime(),!0):!1},isConnectedOrReconnecting:function(n){return n.state===r.connectionState.connected||n.state===r.connectionState.reconnecting},ensureReconnectingState:function(t){return l(t,r.connectionState.connected,r.connectionState.reconnecting)===!0&&n(t).triggerHandler(f.onReconnecting),t.state===r.connectionState.reconnecting},clearReconnectTimeout:function(n){n&&n._.reconnectTimeout&&(t.clearTimeout(n._.reconnectTimeout),delete n._.reconnectTimeout)},verifyLastActive:function(t){if((new Date).getTime()-t._.lastActiveAt>=t.reconnectWindow){var i=r._.format(r.resources.reconnectWindowTimeout,new Date(t._.lastActiveAt),t.reconnectWindow);return t.log(i),n(t).triggerHandler(f.onError,[r._.error(i,"TimeoutException")]),t.stop(!1,!1),!1}return!0},reconnect:function(n,i){var f=r.transports[i];if(u.isConnectedOrReconnecting(n)&&!n._.reconnectTimeout){if(!u.verifyLastActive(n))return;n._.reconnectTimeout=t.setTimeout(function(){u.verifyLastActive(n)&&(f.stop(n),u.ensureReconnectingState(n)&&(n.log(i+" reconnecting."),f.start(n)))},n.reconnectDelay)}},handleParseFailure:function(t,i,u,e,o){var s=r._.transportError(r._.format(r.resources.parseFailed,i),t.transport,u,o);e&&e(s)?t.log("Failed to parse server response while attempting to connect."):(n(t).triggerHandler(f.onError,[s]),t.stop())},initHandler:function(n){return new s(n)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,f=n.signalR.changeState,i=r.transports._logic;r.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(t,f){var e=i.stringifySend(t,f);try{t.socket.send(e)}catch(o){n(t).triggerHandler(u.onError,[r._.transportError(r.resources.webSocketsInvalidState,t.transport,o,t.socket),f])}},start:function(e,o,s){var h,c=!1,l=this,a=!o,v=n(e);if(!t.WebSocket){s();return}e.socket||(h=e.webSocketServerUrl?e.webSocketServerUrl:e.wsProtocol+e.host,h+=i.getUrl(e,this.name,a),e.log("Connecting to websocket endpoint '"+h+"'."),e.socket=new t.WebSocket(h),e.socket.onopen=function(){c=!0;e.log("Websocket opened.");i.clearReconnectTimeout(e);f(e,r.connectionState.reconnecting,r.connectionState.connected)===!0&&v.triggerHandler(u.onReconnect)},e.socket.onclose=function(t){var i;this===e.socket&&(c&&typeof t.wasClean!="undefined"&&t.wasClean===!1?(i=r._.transportError(r.resources.webSocketClosed,e.transport,t),e.log("Unclean disconnect from websocket: "+(t.reason||"[no reason given]."))):e.log("Websocket closed."),s&&s(i)||(i&&n(e).triggerHandler(u.onError,[i]),l.reconnect(e)))},e.socket.onmessage=function(t){var r;try{r=e._parseResponse(t.data)}catch(u){i.handleParseFailure(e,t.data,u,s,t);return}r&&(n.isEmptyObject(r)||r.M?i.processMessages(e,r,o):i.triggerReceived(e,r))})},reconnect:function(n){i.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},stop:function(n){i.clearReconnectTimeout(n);n.socket&&(n.log("Closing the Websocket."),n.socket.close(),n.socket=null)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var i=n.signalR,u=n.signalR.events,e=n.signalR.changeState,r=i.transports._logic,f=function(n){t.clearTimeout(n._.reconnectAttemptTimeoutHandle);delete n._.reconnectAttemptTimeoutHandle};i.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(o,s,h){var c=this,l=!1,a=n(o),v=!s,y;if(o.eventSource&&(o.log("The connection already has an event source. Stopping it."),o.stop()),!t.EventSource){h&&(o.log("This browser doesn't support SSE."),h());return}y=r.getUrl(o,this.name,v);try{o.log("Attempting to connect to SSE endpoint '"+y+"'.");o.eventSource=new t.EventSource(y,{withCredentials:o.withCredentials})}catch(p){o.log("EventSource failed trying to connect with error "+p.Message+".");h?h():(a.triggerHandler(u.onError,[i._.transportError(i.resources.eventSourceFailedToConnect,o.transport,p)]),v&&c.reconnect(o));return}v&&(o._.reconnectAttemptTimeoutHandle=t.setTimeout(function(){l===!1&&o.eventSource.readyState!==t.EventSource.OPEN&&c.reconnect(o)},c.timeOut));o.eventSource.addEventListener("open",function(){o.log("EventSource connected.");f(o);r.clearReconnectTimeout(o);l===!1&&(l=!0,e(o,i.connectionState.reconnecting,i.connectionState.connected)===!0&&a.triggerHandler(u.onReconnect))},!1);o.eventSource.addEventListener("message",function(n){var t;if(n.data!=="initialized"){try{t=o._parseResponse(n.data)}catch(i){r.handleParseFailure(o,n.data,i,h,n);return}r.processMessages(o,t,s)}},!1);o.eventSource.addEventListener("error",function(n){var r=i._.transportError(i.resources.eventSourceError,o.transport,n);this===o.eventSource&&(h&&h(r)||(o.log("EventSource readyState: "+o.eventSource.readyState+"."),n.eventPhase===t.EventSource.CLOSED?(o.log("EventSource reconnecting due to the server connection ending."),c.reconnect(o)):(o.log("EventSource error."),a.triggerHandler(u.onError,[r]))))},!1)},reconnect:function(n){r.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){r.ajaxSend(n,t)},stop:function(n){f(n);r.clearReconnectTimeout(n);n&&n.eventSource&&(n.log("EventSource calling close()."),n.eventSource.close(),n.eventSource=null,delete n.eventSource)},abort:function(n,t){r.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var r=n.signalR,e=n.signalR.events,o=n.signalR.changeState,i=r.transports._logic,u=function(){var n=t.document.createElement("iframe");return n.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),n},f=function(){var i=null,f=1e3,n=0;return{prevent:function(){r._.ieVersion<=8&&(n===0&&(i=t.setInterval(function(){var n=u();t.document.body.appendChild(n);t.document.body.removeChild(n);n=null},f)),n++)},cancel:function(){n===1&&t.clearInterval(i);n>0&&n--}}}();r.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(n,r,e){var l=this,s=i.foreverFrame.count+=1,h,o=u(),c=function(){n.log("Forever frame iframe finished loading and is no longer receiving messages.");e&&e()||l.reconnect(n)};if(t.EventSource){e&&(n.log("Forever Frame is not supported by SignalR on browsers with SSE support."),e());return}o.setAttribute("data-signalr-connection-id",n.id);f.prevent();h=i.getUrl(n,this.name);h+="&frameId="+s;t.document.documentElement.appendChild(o);n.log("Binding to iframe's load event.");o.addEventListener?o.addEventListener("load",c,!1):o.attachEvent&&o.attachEvent("onload",c);o.src=h;i.foreverFrame.connections[s]=n;n.frame=o;n.frameId=s;r&&(n.onSuccess=function(){n.log("Iframe transport started.");r()})},reconnect:function(n){var r=this;i.isConnectedOrReconnecting(n)&&i.verifyLastActive(n)&&t.setTimeout(function(){if(i.verifyLastActive(n)&&n.frame&&i.ensureReconnectingState(n)){var u=n.frame,t=i.getUrl(n,r.name,!0)+"&frameId="+n.frameId;n.log("Updating iframe src to '"+t+"'.");u.src=t}},n.reconnectDelay)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){i.ajaxSend(n,t)},receive:function(t,u){var f,e,o;if(t.json!==t._originalJson&&(u=t._originalJson.stringify(u)),o=t._parseResponse(u),i.processMessages(t,o,t.onSuccess),t.state===n.signalR.connectionState.connected&&(t.frameMessageCount=(t.frameMessageCount||0)+1,t.frameMessageCount>r.transports.foreverFrame.iframeClearThreshold&&(t.frameMessageCount=0,f=t.frame.contentWindow||t.frame.contentDocument,f&&f.document&&f.document.body)))for(e=f.document.body;e.firstChild;)e.removeChild(e.firstChild)},stop:function(n){var r=null;if(f.cancel(),n.frame){if(n.frame.stop)n.frame.stop();else try{r=n.frame.contentWindow||n.frame.contentDocument;r.document&&r.document.execCommand&&r.document.execCommand("Stop")}catch(u){n.log("Error occurred when stopping foreverFrame transport. Message = "+u.message+".")}n.frame.parentNode===t.document.documentElement&&t.document.documentElement.removeChild(n.frame);delete i.foreverFrame.connections[n.frameId];n.frame=null;n.frameId=null;delete n.frame;delete n.frameId;delete n.onSuccess;delete n.frameMessageCount;n.log("Stopping forever frame.")}},abort:function(n,t){i.ajaxAbort(n,t)},getConnection:function(n){return i.foreverFrame.connections[n]},started:function(t){o(t,r.connectionState.reconnecting,r.connectionState.connected)===!0&&n(t).triggerHandler(e.onReconnect)}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,e=n.signalR.changeState,f=n.signalR.isDisconnecting,i=r.transports._logic;r.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(o,s,h){var a=this,v=function(){v=n.noop;o.log("LongPolling connected.");s?s():o.log("WARNING! The client received an init message after reconnecting.")},y=function(n){return h(n)?(o.log("LongPolling failed to connect."),!0):!1},c=o._,l=0,p=function(i){t.clearTimeout(c.reconnectTimeoutId);c.reconnectTimeoutId=null;e(i,r.connectionState.reconnecting,r.connectionState.connected)===!0&&(i.log("Raising the reconnect event"),n(i).triggerHandler(u.onReconnect))},w=36e5;o.pollXhr&&(o.log("Polling xhr requests already exists, aborting."),o.stop());o.messageId=null;c.reconnectTimeoutId=null;c.pollTimeoutId=t.setTimeout(function(){(function e(s,h){var g=s.messageId,nt=g===null,k=!nt,tt=!h,d=i.getUrl(s,a.name,k,tt,!0),b={};(s.messageId&&(b.messageId=s.messageId),s.groupsToken&&(b.groupsToken=s.groupsToken),f(s)!==!0)&&(o.log("Opening long polling request to '"+d+"'."),s.pollXhr=i.ajax(o,{xhrFields:{onprogress:function(){i.markLastMessage(o)}},url:d,type:"POST",contentType:r._.defaultContentType,data:b,timeout:o._.pollTimeout,success:function(r){var h,w=0,u,a;o.log("Long poll complete.");l=0;try{h=o._parseResponse(r)}catch(b){i.handleParseFailure(s,r,b,y,s.pollXhr);return}(c.reconnectTimeoutId!==null&&p(s),h&&(u=i.maximizePersistentResponse(h)),i.processMessages(s,h,v),u&&n.type(u.LongPollDelay)==="number"&&(w=u.LongPollDelay),f(s)!==!0)&&(a=u&&u.ShouldReconnect,!a||i.ensureReconnectingState(s))&&(w>0?c.pollTimeoutId=t.setTimeout(function(){e(s,a)},w):e(s,a))},error:function(f,h){var v=r._.transportError(r.resources.longPollFailed,o.transport,f,s.pollXhr);if(t.clearTimeout(c.reconnectTimeoutId),c.reconnectTimeoutId=null,h==="abort"){o.log("Aborted xhr request.");return}if(!y(v)){if(l++,o.state!==r.connectionState.reconnecting&&(o.log("An error occurred using longPolling. Status = "+h+".  Response = "+f.responseText+"."),n(s).triggerHandler(u.onError,[v])),(o.state===r.connectionState.connected||o.state===r.connectionState.reconnecting)&&!i.verifyLastActive(o))return;if(!i.ensureReconnectingState(s))return;c.pollTimeoutId=t.setTimeout(function(){e(s,!0)},a.reconnectDelay)}}}),k&&h===!0&&(c.reconnectTimeoutId=t.setTimeout(function(){p(s)},Math.min(1e3*(Math.pow(2,l)-1),w))))})(o)},250)},lostConnection:function(n){n.pollXhr&&n.pollXhr.abort("lostConnection")},send:function(n,t){i.ajaxSend(n,t)},stop:function(n){t.clearTimeout(n._.pollTimeoutId);t.clearTimeout(n._.reconnectTimeoutId);delete n._.pollTimeoutId;delete n._.reconnectTimeoutId;n.pollXhr&&(n.pollXhr.abort(),n.pollXhr=null,delete n.pollXhr)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n){function r(n){return n+s}function e(n,t,i){for(var f=n.length,u=[],r=0;r<f;r+=1)n.hasOwnProperty(r)&&(u[r]=t.call(i,n[r],r,n));return u}function o(t){return n.isFunction(t)?null:n.type(t)==="undefined"?null:t}function u(n){for(var t in n)if(n.hasOwnProperty(t))return!0;return!1}function f(n,t){var i=n._.invocationCallbacks,r,f;u(i)&&n.log("Clearing hub invocation callbacks with error: "+t+".");n._.invocationCallbackId=0;delete n._.invocationCallbacks;n._.invocationCallbacks={};for(f in i)r=i[f],r.method.call(r.scope,{E:t})}function i(n,t){return new i.fn.init(n,t)}function t(i,r){var u={qs:null,logging:!1,useDefaultPath:!0};return n.extend(u,r),(!i||u.useDefaultPath)&&(i=(i||"")+"/signalr"),new t.fn.init(i,u)}var s=".hubProxy",h=n.signalR;i.fn=i.prototype={init:function(n,t){this.state={};this.connection=n;this.hubName=t;this._={callbackMap:{}}},constructor:i,hasSubscriptions:function(){return u(this._.callbackMap)},on:function(t,i){var u=this,f=u._.callbackMap;return t=t.toLowerCase(),f[t]||(f[t]={}),f[t][i]=function(n,t){i.apply(u,t)},n(u).bind(r(t),f[t][i]),u},off:function(t,i){var e=this,o=e._.callbackMap,f;return t=t.toLowerCase(),f=o[t],f&&(f[i]?(n(e).unbind(r(t),f[i]),delete f[i],u(f)||delete o[t]):i||(n(e).unbind(r(t)),delete o[t])),e},invoke:function(t){var i=this,r=i.connection,s=n.makeArray(arguments).slice(1),c=e(s,o),f={H:i.hubName,M:t,A:c,I:r._.invocationCallbackId},u=n.Deferred(),l=function(f){var e=i._maximizeHubResponse(f),s,o;n.extend(i.state,e.State);e.Progress?u.notifyWith?u.notifyWith(i,[e.Progress.Data]):r._.progressjQueryVersionLogged||(r.log("A hub method invocation progress update was received but the version of jQuery in use ("+n.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),r._.progressjQueryVersionLogged=!0):e.Error?(e.StackTrace&&r.log(e.Error+"\n"+e.StackTrace+"."),s=e.IsHubException?"HubException":"Exception",o=h._.error(e.Error,s),o.data=e.ErrorData,r.log(i.hubName+"."+t+" failed to execute. Error: "+o.message),u.rejectWith(i,[o])):(r.log("Invoked "+i.hubName+"."+t),u.resolveWith(i,[e.Result]))};return r._.invocationCallbacks[r._.invocationCallbackId.toString()]={scope:i,method:l},r._.invocationCallbackId+=1,n.isEmptyObject(i.state)||(f.S=i.state),r.log("Invoking "+i.hubName+"."+t),r.send(f),u.promise()},_maximizeHubResponse:function(n){return{State:n.S,Result:n.R,Progress:n.P?{Id:n.P.I,Data:n.P.D}:null,Id:n.I,IsHubException:n.H,Error:n.E,StackTrace:n.T,ErrorData:n.D}}};i.fn.init.prototype=i.fn;t.fn=t.prototype=n.connection();t.fn.init=function(t,i){var e={qs:null,logging:!1,useDefaultPath:!0},u=this;n.extend(e,i);n.signalR.fn.init.call(u,t,e.qs,e.logging);u.proxies={};u._.invocationCallbackId=0;u._.invocationCallbacks={};u.received(function(t){var f,o,e,i,s,h;t&&(typeof t.P!="undefined"?(e=t.P.I.toString(),i=u._.invocationCallbacks[e],i&&i.method.call(i.scope,t)):typeof t.I!="undefined"?(e=t.I.toString(),i=u._.invocationCallbacks[e],i&&(u._.invocationCallbacks[e]=null,delete u._.invocationCallbacks[e],i.method.call(i.scope,t))):(f=this._maximizeClientHubInvocation(t),u.log("Triggering client hub event '"+f.Method+"' on hub '"+f.Hub+"'."),s=f.Hub.toLowerCase(),h=f.Method.toLowerCase(),o=this.proxies[s],n.extend(o.state,f.State),n(o).triggerHandler(r(h),[f.Args])))});u.error(function(n,t){var i,r;t&&(i=t.I,r=u._.invocationCallbacks[i],r&&(u._.invocationCallbacks[i]=null,delete u._.invocationCallbacks[i],r.method.call(r.scope,{E:n})))});u.reconnecting(function(){u.transport&&u.transport.name==="webSockets"&&f(u,"Connection started reconnecting before invocation result was received.")});u.disconnected(function(){f(u,"Connection was disconnected before invocation result was received.")})};t.fn._maximizeClientHubInvocation=function(n){return{Hub:n.H,Method:n.M,Args:n.A,State:n.S}};t.fn._registerSubscribedHubs=function(){var t=this;t._subscribedToHubs||(t._subscribedToHubs=!0,t.starting(function(){var i=[];n.each(t.proxies,function(n){this.hasSubscriptions()&&(i.push({name:n}),t.log("Client subscribed to hub '"+n+"'."))});i.length===0&&t.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.");t.data=t.json.stringify(i)}))};t.fn.createHubProxy=function(n){n=n.toLowerCase();var t=this.proxies[n];return t||(t=i(this,n),this.proxies[n]=t),this._registerSubscribedHubs(),t};t.fn.init.prototype=t.fn;n.hubConnection=t}(window.jQuery,window),function(n){n.signalR.version="2.3.0"}(window.jQuery)