typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t}),function(n,t,i){var r={init:function(t,i){var r=this;r.$elem=n(i);r.options=n.extend({},n.fn.owlCarousel.options,r.$elem.data(),t);r.userOptions=t;r.loadContent()},loadContent:function(){function r(n){var i,r="";if(typeof t.options.jsonSuccess=="function")t.options.jsonSuccess.apply(this,[n]);else{for(i in n.owl)n.owl.hasOwnProperty(i)&&(r+=n.owl[i].item);t.$elem.html(r)}t.logIn()}var t=this,i;typeof t.options.beforeInit=="function"&&t.options.beforeInit.apply(this,[t.$elem]);typeof t.options.jsonPath=="string"?(i=t.options.jsonPath,n.getJSON(i,r)):t.logIn()},logIn:function(){var n=this;n.$elem.data("owl-originalStyles",n.$elem.attr("style"));n.$elem.data("owl-originalClasses",n.$elem.attr("class"));n.$elem.css({opacity:0});n.orignalItems=n.options.items;n.checkBrowser();n.wrapperWidth=0;n.checkVisible=null;n.setVars()},setVars:function(){var n=this;if(n.$elem.children().length===0)return!1;n.baseClass();n.eventTypes();n.$userItems=n.$elem.children();n.itemsAmount=n.$userItems.length;n.wrapItems();n.$owlItems=n.$elem.find(".owl-item");n.$owlWrapper=n.$elem.find(".owl-wrapper");n.playDirection="next";n.prevItem=0;n.prevArr=[0];n.currentItem=0;n.customEvents();n.onStartup()},onStartup:function(){var n=this;n.updateItems();n.calculateAll();n.buildControls();n.updateControls();n.response();n.moveEvents();n.stopOnHover();n.owlStatus();n.options.transitionStyle!==!1&&n.transitionTypes(n.options.transitionStyle);n.options.autoPlay===!0&&(n.options.autoPlay=5e3);n.play();n.$elem.find(".owl-wrapper").css("display","block");n.$elem.is(":visible")?n.$elem.css("opacity",1):n.watchVisibility();n.onstartup=!1;n.eachMoveUpdate();typeof n.options.afterInit=="function"&&n.options.afterInit.apply(this,[n.$elem])},eachMoveUpdate:function(){var n=this;n.options.lazyLoad===!0&&n.lazyLoad();n.options.autoHeight===!0&&n.autoHeight();n.onVisibleItems();typeof n.options.afterAction=="function"&&n.options.afterAction.apply(this,[n.$elem])},updateVars:function(){var n=this;typeof n.options.beforeUpdate=="function"&&n.options.beforeUpdate.apply(this,[n.$elem]);n.watchVisibility();n.updateItems();n.calculateAll();n.updatePosition();n.updateControls();n.eachMoveUpdate();typeof n.options.afterUpdate=="function"&&n.options.afterUpdate.apply(this,[n.$elem])},reload:function(){var n=this;t.setTimeout(function(){n.updateVars()},0)},watchVisibility:function(){var n=this;if(n.$elem.is(":visible")===!1)n.$elem.css({opacity:0}),t.clearInterval(n.autoPlayInterval),t.clearInterval(n.checkVisible);else return!1;n.checkVisible=t.setInterval(function(){n.$elem.is(":visible")&&(n.reload(),n.$elem.animate({opacity:1},200),t.clearInterval(n.checkVisible))},500)},wrapItems:function(){var n=this;n.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"><\/div>');n.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">');n.wrapperOuter=n.$elem.find(".owl-wrapper-outer");n.$elem.css("display","block")},baseClass:function(){var n=this,t=n.$elem.hasClass(n.options.baseClass),i=n.$elem.hasClass(n.options.theme);t||n.$elem.addClass(n.options.baseClass);i||n.$elem.addClass(n.options.theme)},updateItems:function(){var t=this,i,r;if(t.options.responsive===!1)return!1;if(t.options.singleItem===!0)return t.options.items=t.orignalItems=1,t.options.itemsCustom=!1,t.options.itemsDesktop=!1,t.options.itemsDesktopSmall=!1,t.options.itemsTablet=!1,t.options.itemsTabletSmall=!1,t.options.itemsMobile=!1,!1;if(i=n(t.options.responsiveBaseWidth).width(),i>(t.options.itemsDesktop[0]||t.orignalItems)&&(t.options.items=t.orignalItems),t.options.itemsCustom!==!1)for(t.options.itemsCustom.sort(function(n,t){return n[0]-t[0]}),r=0;r<t.options.itemsCustom.length;r+=1)t.options.itemsCustom[r][0]<=i&&(t.options.items=t.options.itemsCustom[r][1]);else i<=t.options.itemsDesktop[0]&&t.options.itemsDesktop!==!1&&(t.options.items=t.options.itemsDesktop[1]),i<=t.options.itemsDesktopSmall[0]&&t.options.itemsDesktopSmall!==!1&&(t.options.items=t.options.itemsDesktopSmall[1]),i<=t.options.itemsTablet[0]&&t.options.itemsTablet!==!1&&(t.options.items=t.options.itemsTablet[1]),i<=t.options.itemsTabletSmall[0]&&t.options.itemsTabletSmall!==!1&&(t.options.items=t.options.itemsTabletSmall[1]),i<=t.options.itemsMobile[0]&&t.options.itemsMobile!==!1&&(t.options.items=t.options.itemsMobile[1]);t.options.items>t.itemsAmount&&t.options.itemsScaleUp===!0&&(t.options.items=t.itemsAmount)},response:function(){var i=this,u,r;if(i.options.responsive!==!0)return!1;r=n(t).width();i.resizer=function(){n(t).width()!==r&&(i.options.autoPlay!==!1&&t.clearInterval(i.autoPlayInterval),t.clearTimeout(u),u=t.setTimeout(function(){r=n(t).width();i.updateVars()},i.options.responsiveRefreshRate))};n(t).resize(i.resizer)},updatePosition:function(){var n=this;n.jumpTo(n.currentItem);n.options.autoPlay!==!1&&n.checkAp()},appendItemsSizes:function(){var t=this,i=0,r=t.itemsAmount-t.options.items;t.$owlItems.each(function(u){var f=n(this);f.css({width:t.itemWidth}).data("owl-item",Number(u));(u%t.options.items==0||u===r)&&(u>r||(i+=1));f.data("owl-roundPages",i)})},appendWrapperSizes:function(){var n=this,t=n.$owlItems.length*n.itemWidth;n.$owlWrapper.css({width:t*2,left:0});n.appendItemsSizes()},calculateAll:function(){var n=this;n.calculateWidth();n.appendWrapperSizes();n.loops();n.max()},calculateWidth:function(){var n=this;n.itemWidth=Math.round(n.$elem.width()/n.options.items)},max:function(){var n=this,t=(n.itemsAmount*n.itemWidth-n.options.items*n.itemWidth)*-1;return n.options.items>n.itemsAmount?(n.maximumItem=0,t=0,n.maximumPixels=0):(n.maximumItem=n.itemsAmount-n.options.items,n.maximumPixels=t),t},min:function(){return 0},loops:function(){var t=this,r=0,f=0,i,e,u;for(t.positionsInArray=[0],t.pagesInArray=[],i=0;i<t.itemsAmount;i+=1)f+=t.itemWidth,t.positionsInArray.push(-f),t.options.scrollPerPage===!0&&(e=n(t.$owlItems[i]),u=e.data("owl-roundPages"),u!==r&&(t.pagesInArray[r]=t.positionsInArray[i],r=u))},buildControls:function(){var t=this;(t.options.navigation===!0||t.options.pagination===!0)&&(t.owlControls=n('<div class="owl-controls"/>').toggleClass("clickable",!t.browser.isTouch).appendTo(t.$elem));t.options.pagination===!0&&t.buildPagination();t.options.navigation===!0&&t.buildButtons()},buildButtons:function(){var t=this,i=n('<div class="owl-buttons"/>');t.owlControls.append(i);t.buttonPrev=n("<div/>",{"class":"owl-prev",html:t.options.navigationText[0]||""});t.buttonNext=n("<div/>",{"class":"owl-next",html:t.options.navigationText[1]||""});i.append(t.buttonPrev).append(t.buttonNext);i.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(n){n.preventDefault()});i.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(i){i.preventDefault();n(this).hasClass("owl-next")?t.next():t.prev()})},buildPagination:function(){var t=this;t.paginationWrapper=n('<div class="owl-pagination"/>');t.owlControls.append(t.paginationWrapper);t.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(i){i.preventDefault();Number(n(this).data("owl-page"))!==t.currentItem&&t.goTo(Number(n(this).data("owl-page")),!0)})},updatePagination:function(){var t=this,u,f,e,i,r,o;if(t.options.pagination===!1)return!1;for(t.paginationWrapper.html(""),u=0,f=t.itemsAmount-t.itemsAmount%t.options.items,i=0;i<t.itemsAmount;i+=1)i%t.options.items==0&&(u+=1,f===i&&(e=t.itemsAmount-t.options.items),r=n("<div/>",{"class":"owl-page"}),o=n("<span><\/span>",{text:t.options.paginationNumbers===!0?u:"","class":t.options.paginationNumbers===!0?"owl-numbers":""}),r.append(o),r.data("owl-page",f===i?e:i),r.data("owl-roundPages",u),t.paginationWrapper.append(r));t.checkPagination()},checkPagination:function(){var t=this;if(t.options.pagination===!1)return!1;t.paginationWrapper.find(".owl-page").each(function(){n(this).data("owl-roundPages")===n(t.$owlItems[t.currentItem]).data("owl-roundPages")&&(t.paginationWrapper.find(".owl-page").removeClass("active"),n(this).addClass("active"))})},checkNavigation:function(){var n=this;if(n.options.navigation===!1)return!1;n.options.rewindNav===!1&&(n.currentItem===0&&n.maximumItem===0?(n.buttonPrev.addClass("disabled"),n.buttonNext.addClass("disabled")):n.currentItem===0&&n.maximumItem!==0?(n.buttonPrev.addClass("disabled"),n.buttonNext.removeClass("disabled")):n.currentItem===n.maximumItem?(n.buttonPrev.removeClass("disabled"),n.buttonNext.addClass("disabled")):n.currentItem!==0&&n.currentItem!==n.maximumItem&&(n.buttonPrev.removeClass("disabled"),n.buttonNext.removeClass("disabled")))},updateControls:function(){var n=this;n.updatePagination();n.checkNavigation();n.owlControls&&(n.options.items>=n.itemsAmount?n.owlControls.hide():n.owlControls.show())},destroyControls:function(){var n=this;n.owlControls&&n.owlControls.remove()},next:function(n){var t=this;if(t.isTransition)return!1;if(t.currentItem+=t.options.scrollPerPage===!0?t.options.items:1,t.currentItem>t.maximumItem+(t.options.scrollPerPage===!0?t.options.items-1:0))if(t.options.rewindNav===!0)t.currentItem=0,n="rewind";else return t.currentItem=t.maximumItem,!1;t.goTo(t.currentItem,n)},prev:function(n){var t=this;if(t.isTransition)return!1;if(t.options.scrollPerPage===!0&&t.currentItem>0&&t.currentItem<t.options.items?t.currentItem=0:t.currentItem-=t.options.scrollPerPage===!0?t.options.items:1,t.currentItem<0)if(t.options.rewindNav===!0)t.currentItem=t.maximumItem,n="rewind";else return t.currentItem=0,!1;t.goTo(t.currentItem,n)},goTo:function(n,i,r){var u=this,f;if(u.isTransition)return!1;if(typeof u.options.beforeMove=="function"&&u.options.beforeMove.apply(this,[u.$elem]),n>=u.maximumItem?n=u.maximumItem:n<=0&&(n=0),u.currentItem=u.owl.currentItem=n,u.options.transitionStyle!==!1&&r!=="drag"&&u.options.items===1&&u.browser.support3d===!0)return u.swapSpeed(0),u.browser.support3d===!0?u.transition3d(u.positionsInArray[n]):u.css2slide(u.positionsInArray[n],1),u.afterGo(),u.singleItemTransition(),!1;f=u.positionsInArray[n];u.browser.support3d===!0?(u.isCss3Finish=!1,i===!0?(u.swapSpeed("paginationSpeed"),t.setTimeout(function(){u.isCss3Finish=!0},u.options.paginationSpeed)):i==="rewind"?(u.swapSpeed(u.options.rewindSpeed),t.setTimeout(function(){u.isCss3Finish=!0},u.options.rewindSpeed)):(u.swapSpeed("slideSpeed"),t.setTimeout(function(){u.isCss3Finish=!0},u.options.slideSpeed)),u.transition3d(f)):i===!0?u.css2slide(f,u.options.paginationSpeed):i==="rewind"?u.css2slide(f,u.options.rewindSpeed):u.css2slide(f,u.options.slideSpeed);u.afterGo()},jumpTo:function(n){var t=this;typeof t.options.beforeMove=="function"&&t.options.beforeMove.apply(this,[t.$elem]);n>=t.maximumItem||n===-1?n=t.maximumItem:n<=0&&(n=0);t.swapSpeed(0);t.browser.support3d===!0?t.transition3d(t.positionsInArray[n]):t.css2slide(t.positionsInArray[n],1);t.currentItem=t.owl.currentItem=n;t.afterGo()},afterGo:function(){var n=this;n.prevArr.push(n.currentItem);n.prevItem=n.owl.prevItem=n.prevArr[n.prevArr.length-2];n.prevArr.shift(0);n.prevItem!==n.currentItem&&(n.checkPagination(),n.checkNavigation(),n.eachMoveUpdate(),n.options.autoPlay!==!1&&n.checkAp());typeof n.options.afterMove=="function"&&n.prevItem!==n.currentItem&&n.options.afterMove.apply(this,[n.$elem])},stop:function(){var n=this;n.apStatus="stop";t.clearInterval(n.autoPlayInterval)},checkAp:function(){var n=this;n.apStatus!=="stop"&&n.play()},play:function(){var n=this;if(n.apStatus="play",n.options.autoPlay===!1)return!1;t.clearInterval(n.autoPlayInterval);n.autoPlayInterval=t.setInterval(function(){n.next(!0)},n.options.autoPlay)},swapSpeed:function(n){var t=this;n==="slideSpeed"?t.$owlWrapper.css(t.addCssSpeed(t.options.slideSpeed)):n==="paginationSpeed"?t.$owlWrapper.css(t.addCssSpeed(t.options.paginationSpeed)):typeof n!="string"&&t.$owlWrapper.css(t.addCssSpeed(n))},addCssSpeed:function(n){return{"-webkit-transition":"all "+n+"ms ease","-moz-transition":"all "+n+"ms ease","-o-transition":"all "+n+"ms ease",transition:"all "+n+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(n){return{"-webkit-transform":"translate3d("+n+"px, 0px, 0px)","-moz-transform":"translate3d("+n+"px, 0px, 0px)","-o-transform":"translate3d("+n+"px, 0px, 0px)","-ms-transform":"translate3d("+n+"px, 0px, 0px)",transform:"translate3d("+n+"px, 0px,0px)"}},transition3d:function(n){var t=this;t.$owlWrapper.css(t.doTranslate(n))},css2move:function(n){var t=this;t.$owlWrapper.css({left:n})},css2slide:function(n,t){var i=this;i.isCssFinish=!1;i.$owlWrapper.stop(!0,!0).animate({left:n},{duration:t||i.options.slideSpeed,complete:function(){i.isCssFinish=!0}})},checkBrowser:function(){var s=this,n="translate3d(0px, 0px, 0px)",u=i.createElement("div"),f,r,e,o;u.style.cssText="  -moz-transform:"+n+"; -ms-transform:"+n+"; -o-transform:"+n+"; -webkit-transform:"+n+"; transform:"+n;f=/translate3d\(0px, 0px, 0px\)/g;r=u.style.cssText.match(f);e=r!==null&&r.length===1;o="ontouchstart"in t||t.navigator.msMaxTouchPoints;s.browser={support3d:e,isTouch:o}},moveEvents:function(){var n=this;(n.options.mouseDrag!==!1||n.options.touchDrag!==!1)&&(n.gestures(),n.disabledEvents())},eventTypes:function(){var n=this,t=["s","e","x"];n.ev_types={};n.options.mouseDrag===!0&&n.options.touchDrag===!0?t=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:n.options.mouseDrag===!1&&n.options.touchDrag===!0?t=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:n.options.mouseDrag===!0&&n.options.touchDrag===!1&&(t=["mousedown.owl","mousemove.owl","mouseup.owl"]);n.ev_types.start=t[0];n.ev_types.move=t[1];n.ev_types.end=t[2]},disabledEvents:function(){var t=this;t.$elem.on("dragstart.owl",function(n){n.preventDefault()});t.$elem.on("mousedown.disableTextSelect",function(t){return n(t.target).is("input, textarea, select, option")})},gestures:function(){function f(n){if(n.touches!==undefined)return{x:n.touches[0].pageX,y:n.touches[0].pageY};if(n.touches===undefined){if(n.pageX!==undefined)return{x:n.pageX,y:n.pageY};if(n.pageX===undefined)return{x:n.clientX,y:n.clientY}}}function e(t){if(t==="on"){n(i).on(r.ev_types.move,s);n(i).on(r.ev_types.end,h)}else t==="off"&&(n(i).off(r.ev_types.move),n(i).off(r.ev_types.end))}function o(i){var o=i.originalEvent||i||t.event,s;if(o.which===3)return!1;if(!(r.itemsAmount<=r.options.items)){if(r.isCssFinish===!1&&!r.options.dragBeforeAnimFinish||r.isCss3Finish===!1&&!r.options.dragBeforeAnimFinish)return!1;r.options.autoPlay!==!1&&t.clearInterval(r.autoPlayInterval);r.browser.isTouch===!0||r.$owlWrapper.hasClass("grabbing")||r.$owlWrapper.addClass("grabbing");r.newPosX=0;r.newRelativeX=0;n(this).css(r.removeTransition());s=n(this).position();u.relativePos=s.left;u.offsetX=f(o).x-s.left;u.offsetY=f(o).y-s.top;e("on");u.sliding=!1;u.targetElement=o.target||o.srcElement}}function s(e){var o=e.originalEvent||e||t.event,s,h;r.newPosX=f(o).x-u.offsetX;r.newPosY=f(o).y-u.offsetY;r.newRelativeX=r.newPosX-u.relativePos;typeof r.options.startDragging=="function"&&u.dragging!==!0&&r.newRelativeX!==0&&(u.dragging=!0,r.options.startDragging.apply(r,[r.$elem]));(r.newRelativeX>8||r.newRelativeX<-8)&&r.browser.isTouch===!0&&(o.preventDefault!==undefined?o.preventDefault():o.returnValue=!1,u.sliding=!0);(r.newPosY>10||r.newPosY<-10)&&u.sliding===!1&&n(i).off("touchmove.owl");s=function(){return r.newRelativeX/5};h=function(){return r.maximumPixels+r.newRelativeX/5};r.newPosX=Math.max(Math.min(r.newPosX,s()),h());r.browser.support3d===!0?r.transition3d(r.newPosX):r.css2move(r.newPosX)}function h(i){var f=i.originalEvent||i||t.event,s,o,h;if(f.target=f.target||f.srcElement,u.dragging=!1,r.browser.isTouch!==!0&&r.$owlWrapper.removeClass("grabbing"),r.dragDirection=r.newRelativeX<0?r.owl.dragDirection="left":r.owl.dragDirection="right",r.newRelativeX!==0&&(s=r.getNewPosition(),r.goTo(s,!1,"drag"),u.targetElement===f.target&&r.browser.isTouch!==!0)){n(f.target).on("click.disable",function(t){t.stopImmediatePropagation();t.stopPropagation();t.preventDefault();n(t.target).off("click.disable")});o=n._data(f.target,"events").click;h=o.pop();o.splice(0,0,h)}e("off")}var r=this,u={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};r.isCssFinish=!0;r.$elem.on(r.ev_types.start,".owl-wrapper",o)},getNewPosition:function(){var n=this,t=n.closestItem();return t>n.maximumItem?(n.currentItem=n.maximumItem,t=n.maximumItem):n.newPosX>=0&&(t=0,n.currentItem=0),t},closestItem:function(){var t=this,i=t.options.scrollPerPage===!0?t.pagesInArray:t.positionsInArray,u=t.newPosX,r=null;return n.each(i,function(f,e){u-t.itemWidth/20>i[f+1]&&u-t.itemWidth/20<e&&t.moveDirection()==="left"?(r=e,t.currentItem=t.options.scrollPerPage===!0?n.inArray(r,t.positionsInArray):f):u+t.itemWidth/20<e&&u+t.itemWidth/20>(i[f+1]||i[f]-t.itemWidth)&&t.moveDirection()==="right"&&(t.options.scrollPerPage===!0?(r=i[f+1]||i[i.length-1],t.currentItem=n.inArray(r,t.positionsInArray)):(r=i[f+1],t.currentItem=f+1))}),t.currentItem},moveDirection:function(){var n=this,t;return n.newRelativeX<0?(t="right",n.playDirection="next"):(t="left",n.playDirection="prev"),t},customEvents:function(){var n=this;n.$elem.on("owl.next",function(){n.next()});n.$elem.on("owl.prev",function(){n.prev()});n.$elem.on("owl.play",function(t,i){n.options.autoPlay=i;n.play();n.hoverStatus="play"});n.$elem.on("owl.stop",function(){n.stop();n.hoverStatus="stop"});n.$elem.on("owl.goTo",function(t,i){n.goTo(i)});n.$elem.on("owl.jumpTo",function(t,i){n.jumpTo(i)})},stopOnHover:function(){var n=this;if(n.options.stopOnHover===!0&&n.browser.isTouch!==!0&&n.options.autoPlay!==!1){n.$elem.on("mouseover",function(){n.stop()});n.$elem.on("mouseout",function(){n.hoverStatus!=="stop"&&n.play()})}},lazyLoad:function(){var t=this,u,i,f,r,e;if(t.options.lazyLoad===!1)return!1;for(u=0;u<t.itemsAmount;u+=1)if(i=n(t.$owlItems[u]),i.data("owl-loaded")!=="loaded"){if(f=i.data("owl-item"),r=i.find(".lazyOwl"),typeof r.data("src")!="string"){i.data("owl-loaded","loaded");continue}i.data("owl-loaded")===undefined&&(r.hide(),i.addClass("loading").data("owl-loaded","checked"));e=t.options.lazyFollow===!0?f>=t.currentItem:!0;e&&f<t.currentItem+t.options.items&&r.length&&t.lazyPreload(i,r)}},lazyPreload:function(n,i){function e(){n.data("owl-loaded","loaded").removeClass("loading");i.removeAttr("data-src");r.options.lazyEffect==="fade"?i.fadeIn(400):i.show();typeof r.options.afterLazyLoad=="function"&&r.options.afterLazyLoad.apply(this,[r.$elem])}function o(){u+=1;r.completeImg(i.get(0))||f===!0?e():u<=100?t.setTimeout(o,100):e()}var r=this,u=0,f;i.prop("tagName")==="DIV"?(i.css("background-image","url("+i.data("src")+")"),f=!0):i[0].src=i.data("src");o()},autoHeight:function(){function f(){var r=n(i.$owlItems[i.currentItem]).height();i.wrapperOuter.css("height",r+"px");i.wrapperOuter.hasClass("autoHeight")||t.setTimeout(function(){i.wrapperOuter.addClass("autoHeight")},0)}function e(){r+=1;i.completeImg(u.get(0))?f():r<=100?t.setTimeout(e,100):i.wrapperOuter.css("height","")}var i=this,u=n(i.$owlItems[i.currentItem]).find("img"),r;u.get(0)!==undefined?(r=0,e()):f()},completeImg:function(n){var t;return n.complete?(t=typeof n.naturalWidth,t!=="undefined"&&n.naturalWidth===0)?!1:!0:!1},onVisibleItems:function(){var t=this,i;for(t.options.addClassActive===!0&&t.$owlItems.removeClass("active"),t.visibleItems=[],i=t.currentItem;i<t.currentItem+t.options.items;i+=1)t.visibleItems.push(i),t.options.addClassActive===!0&&n(t.$owlItems[i]).addClass("active");t.owl.visibleItems=t.visibleItems},transitionTypes:function(n){var t=this;t.outClass="owl-"+n+"-out";t.inClass="owl-"+n+"-in"},singleItemTransition:function(){function s(n){return{position:"relative",left:n+"px"}}var n=this,f=n.outClass,e=n.inClass,i=n.$owlItems.eq(n.currentItem),r=n.$owlItems.eq(n.prevItem),o=Math.abs(n.positionsInArray[n.currentItem])+n.positionsInArray[n.prevItem],u=Math.abs(n.positionsInArray[n.currentItem])+n.itemWidth/2,t="webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend";n.isTransition=!0;n.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":u+"px","-moz-perspective-origin":u+"px","perspective-origin":u+"px"});r.css(s(o,10)).addClass(f).on(t,function(){n.endPrev=!0;r.off(t);n.clearTransStyle(r,f)});i.addClass(e).on(t,function(){n.endCurrent=!0;i.off(t);n.clearTransStyle(i,e)})},clearTransStyle:function(n,t){var i=this;n.css({position:"",left:""}).removeClass(t);i.endPrev&&i.endCurrent&&(i.$owlWrapper.removeClass("owl-origin"),i.endPrev=!1,i.endCurrent=!1,i.isTransition=!1)},owlStatus:function(){var n=this;n.owl={userOptions:n.userOptions,baseElement:n.$elem,userItems:n.$userItems,owlItems:n.$owlItems,currentItem:n.currentItem,prevItem:n.prevItem,visibleItems:n.visibleItems,isTouch:n.browser.isTouch,browser:n.browser,dragDirection:n.dragDirection}},clearEvents:function(){var r=this;r.$elem.off(".owl owl mousedown.disableTextSelect");n(i).off(".owl owl");n(t).off("resize",r.resizer)},unWrap:function(){var n=this;n.$elem.children().length!==0&&(n.$owlWrapper.unwrap(),n.$userItems.unwrap().unwrap(),n.owlControls&&n.owlControls.remove());n.clearEvents();n.$elem.attr("style",n.$elem.data("owl-originalStyles")||"").attr("class",n.$elem.data("owl-originalClasses"))},destroy:function(){var n=this;n.stop();t.clearInterval(n.checkVisible);n.unWrap();n.$elem.removeData()},reinit:function(t){var i=this,r=n.extend({},i.userOptions,t);i.unWrap();i.init(r,i.$elem)},addItem:function(n,t){var i=this,r;if(!n)return!1;if(i.$elem.children().length===0)return i.$elem.append(n),i.setVars(),!1;i.unWrap();r=t===undefined||t===-1?-1:t;r>=i.$userItems.length||r===-1?i.$userItems.eq(-1).after(n):i.$userItems.eq(r).before(n);i.setVars()},removeItem:function(n){var t=this,i;if(t.$elem.children().length===0)return!1;i=n===undefined||n===-1?-1:n;t.unWrap();t.$userItems.eq(i).remove();t.setVars()}};n.fn.owlCarousel=function(t){return this.each(function(){if(n(this).data("owl-init")===!0)return!1;n(this).data("owl-init",!0);var i=Object.create(r);i.init(t,this);n.data(this,"owlCarousel",i)})};n.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:t,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document);
function ChangeAlterMessageClass(n,t){n&&t.Message&&(t.IsPurchaseLimitExceeded?($(n).find(".alert").removeClass("alert-success").addClass("alert-warning"),$(n).find("i").removeClass("fa-check").addClass("fa-exclamation-circle")):($(n).find(".alert").removeClass("alert-warning").addClass("alert-success"),$(n).find("i").removeClass("fa-exclamation-circle").addClass("fa-check")))}function beginPagingSingleCol(){}function onRegisterSubmit(){$("#Widget-form").submit()}function successPagingSingleCol(){$("#dt_basic_wrapper_singlecol").attr("action",$("#pagingFormAction").attr("href"))}function failurePagingSingleCol(){alert("Could not retrieve list.")}function beginPagingTwoCol(){}function successPagingTwoCol(){$("#dt_basic_wrapper_twocol").attr("action",$("#pagingFormActiontwocol").attr("href"))}function failurePagingTwoCol(){alert("Could not retrieve list.")}function beginPagingThreeCol(){}function successPagingThreeCol(){$("#dt_basic_wrapper_threecol").attr("action",$("#pagingFormActionthreecol").attr("href"))}function failurePagingThreeCol(){alert("Could not retrieve list.")}function beginPagingSimpleProd(){}function successPagingSimpleProd(){$("#dt_basic_wrapper_simplepro").attr("action",$("#pagingFormActionsimplepro").attr("href"))}function failurePagingSimpleProd(){alert("Could not retrieve list.")}function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function getParameterByNameForHref(n,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var r=new RegExp("[\\?&]"+t+"=([^&#]*)"),i=r.exec(n);return i==null?"":decodeURIComponent(i[1].replace(/\+/g," "))}function closePopup(){$.magnificPopup.close()}function frmGetAllState(n,t){var u=$(".clsfrmStateId").val(),i=$("#OtherState").val(),r=!0;$.getJSON("/Account/GetState/"+n,function(n){var f="";n.length>0?(f+="<option value=''><\/option>",$.each(n,function(n,t){u==t.Text?(r=!1,f+="<option selected='selected' value='"+t.Text+"'>"+t.Text+"<\/option>"):(r=!1,f+="<option value='"+t.Text+"'>"+t.Text+"<\/option>")}),$(".clsfrmstateDrp").attr("style","display"),$(".clsOtherState").attr("style","display:none"),$(".clsfrmState").html(f),r&&t==1?($(".clsfrmStateId").val(""),i==""?$(".clsOtherState").val(u):$(".clsOtherState").val(i)):$(".clsOtherState").val("")):($(".clsfrmstateDrp").attr("style","display:none"),$(".clsOtherState").attr("style","display"),$(".clsfrmState").html(""),r&&t==1?i==""?$(".clsOtherState").val(u):$(".clsOtherState").val(i):$(".clsOtherState").val(""));$("#divProgress").hide()})}function frmGetAllStateLoad(){var n=$(".clsformCountryId").val(),t=$("#Customerid").val();t<0&&(n="United States",$(".clsformCountryId").val("United States"));jQuery.noConflict();n!=undefined&&frmGetAllState(n,1)}function CloseMagnificPop(){$.magnificPopup.close()}function subscriptionFailure(){alert("There is a problem to submit code. Please, try after some time")}function subscriptionSuccess(n){n!==undefined&&n!=null&&n.Message!==undefined&&n.Message!=null&&n.Message!="success"&&n.Message.length>0&&alert(n.Message);n!=null&&n!=undefined&&n.Url!=null&&n.Url!=undefined&&(window.location.href=n.Url);$(".subscriptionCode").val("");$.validator!=undefined&&$.validator.unobtrusive!=undefined&&$.validator.unobtrusive.parse("form")}function UpdateOrderSummary(n){if($("#div-order-summary").length>0){$("#divProgress").show();var t=null;$("#OrderId").length>0&&(t=Number($("#OrderId").val()));$.ajax({url:MY_CART_URL,type:"POST",data:{DisplayScreen:"_OrderSummary",orderId:t,currentStage:$("#CurrentStage").val()},cache:!1,success:function(n){$("#div-order-summary").html(n);$("#hdnMessage").val()!=null&&$("#hdnMessage").val()!=""&&alert($("#hdnMessage").val())},complete:function(){n&&typeof n=="function"&&n()}})}}function updateWishList(){$("#grid-WishList").load("/Account/CustomerSavedItem",function(){loadAlertToolTip()}).prepend("<p class='loaderTxt' >Please wait ...<\/p>")}function RemoveDisount(){$.ajax({type:"POST",url:REMOVE_COUPN_CODE_URL,dataType:"json",success:function(n){$("#divShippingMethods").show();n&&updateShippingOptionsByDiscount();UpdateOrderSummary();typeof UpdateItemCart=="function"&&UpdateItemCart(0)}})}function applyGlobalDiscount(n){$.ajax({type:"POST",url:CHECK_COUPON_CODE_URL,dataType:"json",data:{discountId:n},success:function(n){n!=""&&(ApplyFreeShipping(n.freeshipping,n),n.type==1?(n.message!=""&&alert(n.message),typeof UpdateItemCart=="function"&&UpdateItemCart(0),typeof UpdateOrderSummary=="function"&&UpdateOrderSummary(0)):confirm(n.message)?(typeof UpdateItemCart=="function"&&UpdateItemCart(0),typeof UpdateOrderSummary=="function"&&UpdateOrderSummary(0)):typeof RemoveDisount=="function"&&RemoveDisount())},complete:function(){},error:function(){alert("Error! Please try again later.")}})}function closeAddToCartPopup(n,t,i){$.magnificPopup.close();t.Message&&(displayCartMessages(cls_saveSingleProduct,t,i),i!=null&&i=="shoppingcart"&&typeof UpdateItemCart=="function"&&(UpdateItemCart(0),$("#spnMessage").html("The item was successfully added to your shopping cart"),$(".wishlistCart").show()))}function displayCartMessages(n,t,i){var f,e,u,r;n&&n!=0&&(n.closest(".divItemProductSection").find(".cartAlertMessage, .maxRegistrantAlertMessage, .compareProductAlertMessage").hide(),f=".cartAlertMessage",e=".divAlertMessageSection",t.IsPurchaseLimitExceeded&&(f=".maxRegistrantAlertMessage",e=".divMaxRegistrantLimitAlert"),t.isAddInComparedProduct&&(f=".compareProductAlertMessage",e=".divCompareProductAlert"),u=n.closest(".divItemProductSection").find(f),u.length>0?(u.show(),i&&i.toLowerCase()==="bundlepage"?(u.find("span").html(t.ErrorMessage),t.Message&&u.find("span").html(t.Message)):u.find("span").html(t.Message)):(r=$(e),i&&i.toLowerCase()==="bundlepage"?(r.find("span").html(t.ErrorMessage),t.Message&&r.find("span").html(t.Message)):r.find("span").html(t.Message),i&&i.toLowerCase()==="featuredscroll"?n.closest(".divItemProductSection").prepend(r.html()).css("margin-top","8px"):i&&(i.toLowerCase()==="threecolumn"||i.toLowerCase()==="threecolumnsimple"||i.toLowerCase()==="relatedproduct"||i.toLowerCase()==="productdetail")||i.toLowerCase()==="addtocart"?n.closest(".divItemProductSection").prepend(r.html()):n.closest(".divItemProductSection").append(r.html())))}function backtoParentSingleCartItem(n,t,i){$.magnificPopup.close();displayCartMessages(n,t,i)}function checkAddOnOrRelatedProductExist(n,t,i,r){if($(r).attr("disabled",!0),!t)return i(),$(r).removeAttr("disabled"),!1;$.get(CHECK_ADDON_OR_RELATEDPRODUCT_EXIST,{productId:n},function(n){if($(r).removeAttr("disabled"),n)return openAddToCartPopupModal(t),!1;i&&i()})}function saveSingleProduct(n,t,i){var r=$(t).attr("data-val"),h="",c=1,l=11,f=$(t).attr("data-token"),e=!1,p=$(t).attr("data-btnType"),a=$(t).attr("data-isAgendaAnswer"),v=$(t).attr("data-isAgendacart"),u=$(t).attr("data-productpriceid"),w=$(t).attr("data-productpricetype"),it=$(t).attr("data-purchasealertid"),b=$(t).attr("data-marketingEntityId"),k=$(t).attr("data-marketingEntityType"),d=$(t).attr("data-relatedproductid"),rt=$(t).attr("data-productAvailibityRuleId"),g=$(t).attr("data-eventid"),nt=$(t).attr("data-typeid"),tt=$(t).attr("data-productregistranttypeid"),y,o,s;if(f!=undefined&&f=="ViewerCartProduct"&&(e=!0),parent.$("#pageType").val()!=undefined&&(h=parent.$("#pageType").val()),parent.$("#pageno").val()!=undefined&&(c=parent.$("#pageno").val()),parent.$("#sortby").val()!=undefined&&(l=parent.$("#sortby").val()),n=="1"&&$(".btndismissAlert").trigger("click"),u&&Number(u)>0&&!i&&tt>0&&(y=IsRegistrantTypeQuestionSetAvailable(u,g,r,nt),y))return OpenRegistrantTypeQuestionSetPopup(r,u),!1;if(a!=undefined&&a=="0"&&v!=undefined&&v=="1")return o=$(this).attr("data-height"),s=$(this).attr("data-width"),$.magnificPopup.close(),$.magnificPopup.open({items:{src:AGENDA_PRODUCT_POPUP+"?productId="+r+"&orderItemId=0&btnType="+p+"&productPrice="+$(this).attr("data-price")+"&discountId="+u+"&entityType="+w+"&registrantTypeOrderItemId="+i},type:"iframe",closeOnBgClick:!1,mainClass:"CustomPop"}),$(".mfp-content").css("height",o),$(".mfp-content").css("width",s),$(".mfp-iframe-holder .mfp-content").css("max-height",o+"px"),$(".mfp-iframe-holder .mfp-content").css("max-width",s+"px"),!1;$.ajax({type:"POST",url:ADD_SAVE_SINGLE_PRODUCT_URL,dataType:"json",data:{productId:r,quantity:1,EventTimeId:$(t).attr("data-eventid"),productTypeId:$(t).attr("data-typeid"),productPrice:$(t).attr("data-price"),priceType:$(t).attr("data-pricetype"),IsAddOnProduct:e,productPriceId:$(t).attr("data-productpriceid"),marketingEntityType:k,marketingEntityId:b,RelatedProductId:d,RegistrantTypeOrderItemId:i&&!isNaN(i)?i:0},success:function(n){if(n&&n.productAddedInCartDetails&&(googleAnalytics.addToCartEvent(n.productAddedInCartDetails),faceBookAnalytics.addToCartEvent(n.productAddedInCartDetails)),e==!0)return confirm("The item is now in your shopping cart at the discounted price. You can go to your shopping cart now and check out or after the seminar is finished.")?parent.$.magnificPopup.close():parent.$.magnificPopup.close(),!1;if(n.isSendCustomerToCart!=undefined&&n.isSendCustomerToCart==!0&&!n.IsCECreditPrice&&!n.IsPurchaseLimitExceeded)return setTimeout(function(){window.parent.location.href="/ShoppingCart"},555),!1;typeof parent.clearSessionStorageKeyForGroup=="function"&&parent.clearSessionStorageKeyForGroup();n.CartCount!=null&&n.CartCount!=""&&n.CartCount!="0"&&(parent.$("#cartspancount").html(n.CartCount),parent.$("#cartItemList").load(GET_CART_URL),parent.$("#grid-WishList").load(SAVED_ITEMS));n.isCompareProduct!=undefined&&n.isCompareProduct==!0&&(parent.$("#compareProductcartspancount").html(n.compareProductCount),parent.$("#compareProductcartItemList").load(GET_COMPAREPRODUCTCART_URL));h=="CompareItem"&&parent.$("#grid-compareProduct").load(GET_COMPARE_PRODUCT_URL+"?page="+c+"&sortby="+l);n.Message!=null&&n.Message!=""&&displayCartMessages(t,n,f);n.IsCECreditPrice?($("#bundleType4AlertPopup").modal("hide"),cartMessage="",cartMessage=n.Message,displayPurchaseCEMessage(r,n.CECreditPrice)):backtoParentSingleCartItem(t,n,f)},complete:function(){},error:function(){alert("Error! Please try again later.")}})}function loadCharacterCount(){$(".charcount").after(function(){if($("#char"+$(this).attr("id")).length==0)return'<div class="note" style="font-weight:normal;" id="char'+this.id+'">'+$(this).val().length+" of "+$(this).attr("data-val-maxlength-max")+" characters maximum.<\/div>"}).keyup(function(){$(this).val().length>$(this).attr("data-val-maxlength-max")&&$(this).val($(this).val().substring(0,$(this).attr("data-val-maxlength-max")));$("#char"+$(this).attr("id")).html($(this).val().length+" of "+$(this).attr("data-val-maxlength-max")+" characters maximum.")})}function CloseAgendamodal(){$.magnificPopup.close()}function closeEmailPopUp(){$.magnificPopup.close()}function OpenOrFocus(n,t){var i=navigator.userAgent;if(i.indexOf("Firefox")>-1||i.indexOf("Chrome")>-1||i.indexOf("Safari")>-1)return!0;if(detectIE())popup==null?popup=window.open(n.href,t):(popup.close(),popup=window.open(n.href,t));else return popup=window.open(n.href,t),popup.close(),popup=window.open(n.href,t),!1}function detectIE(){var n=window.navigator.userAgent,r=n.indexOf("MSIE "),t,u,i;return r>0?!0:(t=n.indexOf("Trident/"),t>0)?(u=n.indexOf("rv:"),!0):(i=n.indexOf("Edge/"),i>0)?!0:!1}function random(n){n.children().sort(function(){return Math.round(Math.random())-.5}).each(function(){$(this).appendTo(n)})}function initBundleSlider(){parent.$("#divBundleCarousel").length>0&&parent.$("#divBundleCarousel").owlCarousel({items:4,itemsDesktop:[1600,3],itemsDesktopSmall:[979,2],navigation:!0,navigationText:["<i class='fa fa-angle-left'><\/i>","<i class='fa fa-angle-right'><\/i>"],beforeInit:function(n){random(n)}})}function DefaultAddToBundleCheckBoxButtonSettings(){$(".chkAddCustomerBundle").prop("checked",!1);$(".btnAddCustomerBundle").attr("data-status","0");$(".btnAddCustomerBundle").removeClass("btn-warning").addClass("btn-info");$(".clsBundleFiveglyphicon").removeClass("glyphicon-check").addClass("glyphicon-unchecked");$(".btnAddCustomerBundle").prop("title","Use the Add To Bundle button to create your own bundle of products and receive increasing discounts based on the products you add.")}function SelectedAddToBundleProducts(n){$(".chkCustomerBundle"+n).prop("checked",!0);var t=".btnCustomerBundle"+n;$(t).length>0&&($(t).attr("data-status","1"),$(t).removeClass("btn-info").addClass("btn-warning"),$(t).find("i").removeClass("glyphicon-unchecked").addClass("glyphicon-check"),$(t).prop("title","Remove product from Bundle"))}function DefaultAddToBundleCheckBoxButtonSettingsAddToCart(){$(".chkAddCustomerBundleAddToCart").prop("checked",!1);$(".btnAddCustomerBundleAddToCart").attr("data-status","0");$(".btnAddCustomerBundleAddToCart").removeClass("btn-warning").addClass("btn-info");$(".clsBundleFiveglyphiconAddToCart").removeClass("glyphicon-check").addClass("glyphicon-unchecked");$(".btnAddCustomerBundleAddToCart ").prop("title","Use the Add To Bundle button to create your own bundle of products and receive increasing discounts based on the products you add.")}function SelectedAddToBundleProductsAddToCart(n){$(".chkAddCustomerBundleAddToCart"+n).prop("checked",!0);var t=".btnCustomerBundleAddToCart"+n;$(t).length>0&&($(t).attr("data-status","1"),$(t).removeClass("btn-info").addClass("btn-warning"),$(t).find("i").removeClass("glyphicon-unchecked").addClass("glyphicon-check"),$(t).prop("title","Remove product from Bundle"))}function ChkBundleTypeFiveCustomerSelectedProducts(){DefaultAddToBundleCheckBoxButtonSettings();DefaultAddToBundleCheckBoxButtonSettingsAddToCart();var n=parent.$(".clsCustomerBundleType5Products").map(function(){return Number($(this).attr("data-productid"))}).get();n!=undefined&&n!=null&&n.length>0&&jQuery.each(n,function(n,t){t!=undefined&&t!=null&&t>0&&(SelectedAddToBundleProducts(t),SelectedAddToBundleProductsAddToCart(t))})}function BtnBundleTypeFiveCustomerSelectedProducts(){$(this).removeClass("btn-warning").addClass("btn-info");$(this).find("i").removeClass("glyphicon-check").addClass("glyphicon-unchecked");$(this).attr("data-status")=="0"?$(this).attr("data-status","1"):$(this).attr("data-status")=="0"&&$(this).attr("data-status","0")}function LoadCustomerBundleProductList(n){n!=undefined&&n!=null&&n==!0&&$.magnificPopup.close();typeof isBundle5Active!="undefined"&&isBundle5Active!=undefined&&isBundle5Active.toLowerCase()=="true"&&$("#CustomreProductsList").length==0&&(parent.$("#divCustomerBundleProduct").length==0&&parent.$("body").append('<div id="divCustomerBundleProduct"><\/div>'),$.ajax({type:"GET",url:BUNDLE_TYPE_5_List_CUSTOMER_PRODUCT,global:!1,success:function(t){var i,r;parent.$("#divCustomerBundleProduct").html(t);ChkBundleTypeFiveCustomerSelectedProducts();initBundleSlider();$("#stickyCompareFooter").length>0?(i=$("#stickyCompareFooter").height(),$("footer").attr("style"," margin-bottom:"+i+"px;")):$("footer").attr("style"," margin-bottom: 0px;");n!=!0?(r=localStorage.getItem("BundleArrow"),r=="fa-chevron-up"&&(parent.$("#isc-compare-control").hide(),$(".stickyCompareFooter").removeClass("active"),parent.$("#StickeyBundleIcon").removeClass("fa-chevron-down").addClass("fa-chevron-up"),parent.$("#StickeyBundleIcon").attr("data-arrow","fa-chevron-up"),$("footer").attr("style"," margin-bottom: 0px;"))):localStorage.setItem("BundleArrow","fa-chevron-down")}}))}function SaveCustomerBundleTypeFive(n,t,i,r,u){var f,e,o;(u==undefined||u==""||u==null)&&(f=$(".rdbprice input[type=radio]:checked,.rdbprice input[type=checkbox]:checked"),f!=undefined&&f!=null&&f!=""&&(e=$(f).attr("value"),e!=undefined&&e!=null&&e.length>0&&(o=e.split(","),u=o[0])));$.ajax({type:"POST",url:BUNDLE_TYPE_5_ADD_CUSTOMER_PRODUCT,dataType:"json",data:{productId:n,bundleProductId:t,eventTimeId:i,status:r,priceId:u},success:function(){LoadCustomerBundleProductList()},error:function(){$("#divProgress").hide();alert("Error! Please try again later.")}})}function addCECredittoCart(n){$("#divPurchaseCECreditmodal").length>0&&$("#divPurchaseCECreditmodal").modal("hide");$.ajax({type:"POST",url:ADD_CECREDITTOCART_URL,dataType:"json",data:{productId:n},success:function(n){if(n&&n.productAddedInCartDetails&&(googleAnalytics.addToCartEvent(n.productAddedInCartDetails),faceBookAnalytics.addToCartEvent(n.productAddedInCartDetails)),n.isSendCustomerToCart!=undefined&&n.isSendCustomerToCart==!0)return setTimeout(function(){parent.window.location.href="/ShoppingCart"},555),!1;n.CartCount!=null&&n.CartCount!=""&&n.CartCount!="0"&&(parent.$("#cartspancount").html(n.CartCount),parent.$("#cartItemList").load(GET_CART_URL))},complete:function(){},error:function(){alert("Error! Please try again later.")}})}function ClosePurchaseCECreditModel(){$.magnificPopup.close();window.location.href="/ShoppingCart"}function LoadCustomerBundleWidget(){$.magnificPopup.close();LoadCustomerBundleProductList()}function removeUrlMessage(n){var i=[],r=window.location.href.split("?"),t;if(r.length>=2){for(t=0;t<n.length;t++)r[1].indexOf(n[t])>-1&&i.push(n[t]);i&&i.length>0&&window.history.pushState("object or string","Title",removeURLParameter(window.location.href.indexOf("#")>-1?window.location.href.substring(0,window.location.href.indexOf("#")):window.location.href,i))}}function removeURLParameter(n,t){var f=n.split("?"),i,r,e,u;if(f.length>=2){for(i=f[1].split(/[&;]/g),r=0;r<t.length;r++){for(e=encodeURIComponent(t[r])+"=",u=i.length;u-->0;)i[u].lastIndexOf(e,0)!==-1&&i.splice(u,1);n=f[0]+(i.length>0?"?"+i.join("&"):"")}return n}return n}function getLinkedTenants(){$("#divCustomerLinkedTenants").length>0&&$("#divCustomerLinkedTenants").html().trim().length==0&&($("#divCustomerLinkedTenants").prepend("<p class='loaderTxt' >Please wait ...<\/p>"),$.ajax({type:"GET",url:GET_CUSTOMER_LINKEDTENANTS,global:!1,success:function(n){$("#divCustomerLinkedTenants").html(n)}}))}function WidgetBundleDateSelectorPopup(n){return $.magnificPopup.close(),$.magnificPopup.open({items:{src:n},type:"iframe",closeOnBgClick:!1,callbacks:{close:function(){ChkBundleTypeFiveCustomerSelectedProducts()}},mainClass:"popAddtoCartMainClass"}),!1}function closeMultiPaymentSalesPageModal(){$.magnificPopup.close();window.location.href="/ShoppingCart"}function updateCartCount(){$("#mobile-cartspancount").html($("#cartspancount").html())}function onMarketingCodeBegin(){$("#btnMarketingCodeSave").attr("disabled",!0)}function onMarketingCodeSuccess(n){n!=null&&loadMarketingDiv(!1)}function onMarketingCodefailure(){$("#btnMarketingCodeSave").prop("disabled",!1)}function loadMarketingDiv(n){$("#divMarketingCode").load("/ShoppingCart/MarketingCodeViewSummary?removeCode="+n,function(){})}function removeTableResponsiveCss(){$(window).width()<974?$(".remove-table-responsive").length>0&&$(".remove-table-responsive").removeClass("table-responsive"):$(".remove-table-responsive").hasClass("table-responsive")||$(".remove-table-responsive").addClass("table-responsive")}function SearchFiltersCollapse(){$(".clsSearchFilterWidget").length>0&&$(".clsSearchFilterWidget").each(function(){var t=$(this).find("input[type=checkbox]:checked").length,n=!1;t&&t>0&&(n=!0);($(this).find('[data-value="Search Near Me"]').length>0||$(this).find('[data-value="Directory Search"]').length>0||$(this).find("#DirectorySearchByMemberNumber").length>0)&&(n=!0);$(this).find('[data-value="Event Date Filter"]').length>0&&($("#txtStartingOnOrAfter").val()||$("#txtStartingOnOrBefore").val())&&(n=!0);$(this).find('[data-value="Geo Search By City"]').length>0&&(n=!0);n&&($(this).find(".collapse").parent().find('.panel-heading [data-toggle="collapse"]').attr("aria-expanded","true"),$(this).find(".collapse").parent().find(".glyphicon-plus").removeClass("glyphicon-plus").addClass("glyphicon-minus"),$(this).find(".panel-collapse").addClass("in"))})}function checkMarketingConsentCustomer(n,t){t=t==undefined?"":t;($("#divMarketingConsentCustomerEUAware").length>0||$("#divLegitimateInterestEUaware").length>0)&&$.ajax({type:"GET",url:CHECK_MARKETINGCONSENT_CUSTOMER,dataType:"json",data:{email:n,countryName:t},success:function(n){n?($("#divMarketingConsentCustomerEUAware").length>0&&($("#divMarketingConsentCustomerEUAware").show(),enableDisablemarketingConsent(!1)),$("#divLegitimateInterestEUaware").length>0&&($("#divLegitimateInterestEUaware").show(),setOrRemoveConsentInCookie("LegitimateInterestEUaware",!1,$("#divLegitimateInterestEUaware").attr("data-page")))):($("#divMarketingConsentCustomerEUAware").length>0&&($("#divMarketingConsentCustomerEUAware").hide(),enableDisablemarketingConsent(!0),setOrRemoveConsentInCookie("MarketingConsentEUAware",!0,$("#divMarketingConsentCustomerEUAware").attr("data-page"))),$("#divLegitimateInterestEUaware").length>0&&($("#divLegitimateInterestEUaware").hide(),setOrRemoveConsentInCookie("LegitimateInterestEUaware",!0,$("#divLegitimateInterestEUaware").attr("data-page"))))},error:function(){alert("Error! Please try again later.")}})}function setOrRemoveConsentInCookie(n,t,i){i&&(document.cookie=t?n+"=; path=/ ":n+"=true; path=/ ")}function enableDisablemarketingConsent(n){$("#MarketingConsentEUAware").length>0&&($("#MarketingConsentEUAware").prop("disabled",n),$("#hdnMarketingConsentEUAware").length==0&&$('input[name="MarketingConsentEUAware"]').prop("disabled",n))}function membbershipAuthorizationAlert(n,t){var r="",i=n.alertFrom||"";i=="addonpage"&&(r=$(".chkAddonMemberships:checked").map(function(){return $(this).attr("data-id")}).get().join());$.post("/Search/GroupBillingcycle",{memberShipTypeId:n.mebershipTypeId,childIds:r,checkAddons:i!="addonpage",noOfUser:n.noOfUsers||0},function(r){r&&r.ParentId&&r.ParentId>0?i=="questionset"?($("#parentMembershipId").val(r.ParentId),t()):chooseAddonGroups(r.ParentId):r&&r.trim()?($.confirm({title:n.memberhipLable||"Membership",boxWidth:"550px",useBootstrap:!1,type:"green",content:r,buttons:{ok:{text:"Accept and Add to Cart",btnClass:"btn-success",action:t},cancel:{text:"Cancel Order",btnClass:"btn-warning",action:function(){typeof parent.clearSessionStorageKeyForGroup=="function"&&parent.clearSessionStorageKeyForGroup();$("#groupPaymentCycleId").val("");$("#autoRecurringType").val(0)}}}}),setTimeout(function(){$("#groupPaymentCycleId").val($(".billingCycleType:checked").attr("data-GroupCycleId"));$("#autoRecurringType").val($(".customerRecurringType:checked").val())},200)):t()})}function DisplayInnerTabs(){var n=window.location.hash;n&&$(".aInnerTab[href="+n+"]").length>0&&$(".aInnerTab[href="+n+"]").trigger("click")}function chooseAddonGroups(n){n>0&&($("#divProgress").show(),location.href="/Group/Addons?parentMembershipId="+n)}function addtoCartMembership(n,t,i,r,u){var f=$("#groupPaymentCycleId").val(),e=Number($("#autoRecurringType").val()||0);n&&($("#divProgress").show(),$.ajax({type:"POST",url:"/Search/AddToCartMemberType",dataType:"json",data:{membershipTypeId:n,groupPaymentCycleId:f,autoRecurringType:e,childMemberships:r,itemId:u},success:function(n){$("#divProgress").hide();var r=n.message;if(n.isSuccess!=undefined&&n.isSuccess==!1&&n.message&&alert(n.message),t&&t==!0)memberShipSuccessMessage(n),typeof addToCartProductAfterMembership=="function"&&addToCartProductAfterMembership(i);else{if(n.isSendCustomerToCart!=undefined&&n.isSendCustomerToCart==!0&&!n.message)return window.location.href="/ShoppingCart",!1;memberShipSuccessMessage(n)}},error:function(){$("#divProgress").hide();alert("Error! please try later.")}}))}function memberShipSuccessMessage(n){n&&n.message!=""&&($("#spnMemberTypeConfirmationMessage").html(n.message),$("#divMemberTypeConfirmationMessage").show(),setTimeout(function(){$("#divMemberTypeConfirmationMessage").hide()},1e4));parent.$("#cartspancount").html(n.CartCount);parent.$("#cartItemList").load("/ShoppingCart/GetCart")}function SaveBrowserInfo(){$("#hfBrowserInfo").length>0&&browserReport(function(n,t){if(n)throw n;$("#hfBrowserInfo").val(JSON.stringify(t))})}function SubmitBrowerInfoForWebinar(n){if($("#hfBrowserInfo").length>0){if($("#hfBrowserInfo").val()||browserReport(function(n,t){if(n)throw n;$("#hfBrowserInfo").val(JSON.stringify(t))}),isImpersonateSession())return;$.get("/ShowtimeWidget/GetCurrurntDateTimeWithTimeZone",function(t){t!==undefined&&$("#hfBrowserInfo").val()&&(report=JSON.parse($("#hfBrowserInfo").val()),report.submittedVia="Webinar Launch Button",report.SubmmitedDate=t,$.ajax({type:"POST",url:"/ShowtimeWidget/SubmitBrowser",dataType:"json",data:{programRegistrantId:n,settings:JSON.stringify(report)},success:function(){},error:function(){}}))})}}function getProductsInfo(){var n=$(".hdnGlobalPid").map(function(){return $(this).val()}).get().join(",");$.ajax({type:"POST",url:GET_PRODUCTS_INFO,dataType:"json",data:{pIds:n},success:function(n){n&&$.each(n,function(n,t){Number(t.ProductId)>0&&(t.WidgetMessage&&$(".clsWidgetMessage[data-Pid="+t.ProductId+"]").html(t.WidgetMessage),t.CatalogMessage&&$(".clsCatalogMessage[data-Pid="+t.ProductId+"]").html(t.CatalogMessage))})},error:function(){}})}function CheckADARequirement(){$("#DivADARequirement").length>0&&($("#ADARequirementNote").val()!=""&&$("#ADARequirementNote").val()!=undefined?($("#ADARequirement").prop("checked",!0),$("#ADARequirementNote").attr("data-Note",$("#ADARequirementNote").val())):($("#ADARequirement").prop("checked",!1),removeADARequirementValidation()))}function AddADARequirementValidation(){$("#DivADARequirement").length>0&&($("#ADARequirement").prop("checked")==!0?($("#ADARequirementNote").attr("required","required"),$("#ADARequirementNote").closest("div").find("span.field-validation-error").show().html(""),$("#ADARequirementNote").val($("#ADARequirementNote").attr("data-Note"))):($("#ADARequirementNote").attr("data-Note",$("#ADARequirementNote").val()),$("#ADARequirementNote").val(""),removeADARequirementValidation()))}function removeADARequirementValidation(){$("#ADARequirementNote").removeAttr("required").removeClass("input-validation-error");$("#ADARequirementNote").closest("div").find("span.field-validation-error").hide();$("#ADARequirementNote").closest("div").parents("div").removeClass("has-error")}function ApplyFreeShipping(n,t){n?($("#divShippingMethods").hide(),$(".clsshippingOption").prop("checked",!1)):t&&t.partialShipping?($("#divShippingMethods").show(),updateShippingOptionsByDiscount()):$("#divShippingMethods").show()}function updateShippingOptionsByDiscount(){$("#divShippingMethods").load(GET_SHIPPING_METHOD_URL).prepend("<p class='loaderTxt'>Please wait ...<\/p>")}function LoadCertificateButton(){if($(".btnCert[data-certid=-1]").length>0){var n=$(".btnCert[data-certid=-1]").map(function(){return $(this).attr("data-pid")}).get().join(",");n&&$.ajax({type:"GET",url:"/Certificate/GetProductWithoutCertRequirement",data:{productIds:n},dataType:"json",async:!1,success:function(n){n.length>0&&$.each(n,function(n,t){parent.$(".btnCert_"+t).hide();parent.$(".tdCert_"+t).html("<span>N/A<\/span>")})}})}initAfterMyAccountProduct()}function initAfterMyAccountProduct(){var n="";$(".btnLaunchChat").length>0&&(n=$(".btnLaunchChat").map(function(){return $(this).attr("data-pid")}).get().join(","));n&&$.ajax({type:"GET",url:"/Account/InitMyAccountProducts",data:{launchChatProductIds:n},dataType:"json",async:!1,success:function(n){n&&n.directChatId&&$.each(n.directChatId.split(","),function(n,t){$(".btnLaunchChat[data-pid="+t+"]").removeClass("hidden")})}})}function openAddToCartPopupModal(n){return $.magnificPopup.open({items:{src:n},type:"iframe",closeOnBgClick:!1,mainClass:"popAddtoCartMainClass"}),!1}function setFreeViewerUrl(n){var t=$(".LaunchFreeViewerRoute"),f=t.attr("data-productid"),i=t.attr("data-btnTitle"),e=$.trim(f)+"|"+$.trim(n),r=0,u="General";$("#hdnMemberShipDiscountId").length>0&&(r=$("#hdnMemberShipDiscountId").val(),u="MemberShipGroup");$.get("/Viewer/GetEncryptedValue?x="+$.trim(e),function(n){var e,o,f,s;i&&i.toLowerCase()=="launch"?(e={x:n,discountId:r,marketingEntityId:0,marketingEntityType:u},o=LAUNCH_FREE_VIEWER_URL+"?"+$.param(e),t.attr("href",o)):(f=COMPLETE_FREE_ORDER_URL+"?x="+n,s=CLASSROOM_LOGIN_URL+"?isFromFreeProduct=true&returnUrl="+f,t.attr("data-returnUrl",f),t.attr("data-href",s))})}function processQuickPurchaseMembership(n,t){quickPurchaseMembership(n,t,function(){$("#divProgress").show();window.location.href="/account/myaccount#tabMemberShip"})}function quickPurchaseMembership(n,t,i){n>0&&($("#divProgress").show(),$.ajax({type:"POST",url:"/Search/FreeMembershipRegistration",dataType:"json",data:{membershipTypeId:n,orderItemId:t},success:function(n){$("#divProgress").hide();n.Message||n.PopUp?!n.Message&&n.PopUp?$.magnificPopup.open({items:{src:n.RedirectURL},type:"iframe",callbacks:{afterClose:i},closeOnBgClick:!1}):alert(n.Message):($("#divProgress").show(),window.location=n.RedirectURL)},error:function(){$("#divProgress").hide();alert("Error! please try later.")}}))}function saveMembershipQuestion(){var n=$("#memberShipQuestionAnswerForm").serialize();$.post("/Search/SaveMemberTypeQuestions",n,function(n){n.membershipTypeId&&n.orderItemId?processQuickPurchaseMembership(n.membershipTypeId,n.orderItemId):(n&&n.PriceId&&parent.addToCartProductAfterMembership(n.PriceId),window.location.href=n.RedirectUrl||"/ShoppingCart")})}function openMembershipCertificate(n,t){$.get("/Group/CustomerMembershipCertificate?customerMembershipId="+n+"&displayMembershipCertButtonLabel="+t,function(n){n&&n.trim()&&$.confirm({title:t,boxWidth:"550px",useBootstrap:!1,content:n,buttons:{cancel:{text:"Close",btnClass:"btnCloseMemberCertificate",action:function(){}}}})})}function addressMethod(n,t){$.magnificPopup.close();$("#grid-list-address").length>0&&(t=t&&t==="True"?!0:!1,$("#grid-list-address").load(GET_CUSTOMER_GET_CUSTOMER_ADDRESS_LIST+"?editAddressPopupType="+n+"&isHideDirectory="+t,function(){$('.verifiedLabel[data-toggle="tooltip"]').tooltip()}).prepend("<p class='loaderTxt'>Please wait ...<\/p>"));$("#divExistingAddress").length>0&&($("#divExistingAddress").load(GET_CUSTOMER_CUSTOMER_GET_EXISTING_ADDRESSES+"?editAddressPopupType="+n).prepend("<p class='loaderTxt'>Please wait ...<\/p>"),n==="EditShippingInfo"?getShippingMethodByAddress():(UpdateOrderSummary(),typeof calculatePriceAndTax=="function"&&calculatePriceAndTax()))}function isElementVisibleOnScreen(n){var t=$(n),i=$(window),r=i.scrollTop(),f=r+i.height(),u=t.offset().top,e=u+t.height();return e<=f&&u>=r}function toggleGroupType(n){var t=$(".groupAccordian[data-gId="+n+"]");$(t).find(".panel-collapse").is(":visible")?$(t).find(".groupExpander").addClass("fa-plus").removeClass("fa-minus"):$(t).find(".groupExpander").addClass("fa-minus").removeClass("fa-plus")}function checkUncheckAllCustomCheckBox(n){$(n).prop("checked")===!0?$(n).closest("table").find('input[type="checkbox"]:visible').prop("checked",!0):$(n).closest("table").find('input[type="checkbox"]').prop("checked",!1);var t=$(n).closest("table").find('input[data-triggerType="1"]').first();t&&callTriggerQuestion(t)}function searchCustomFieldCheckBox(n){n&&$(n).closest("table").find("tbody>tr").filter(function(){$(this).toggle($(this).text().toLowerCase().indexOf($(n).val().toLowerCase())>-1)})}function checkMultiChoiceValidation(n){return $(".tblCustomFieldMultiSelect").each(function(){var t=$(this);$(t).find("tbody>tr:visible").length==0&&$(t).find("tbody>tr:hidden").find('input[type="checkbox"]:required').length>0&&$(t).find("tbody>tr:hidden").find('input[type="checkbox"]:checked').length==0&&($(t).find("tbody>tr").show(),n=!1)}),n}function dataCustomFilter(){var r=$(".dataCustomFilter"),t=$("input#customFilterinput"),n=$(".dataEntities"),i=$(".dataEntity");if(r&&r.length!=0&&t&&t.length!=0&&n&&n.length!=0&&i&&i.length!=0)t.on("change",function(){var t=($(this).val()||"").trim();return t?(n.attr("data-filter","true"),n.find(".active").removeClass("active"),i.filter(function(){return $(this).attr("data-title").toLowerCase().indexOf((t||"").toLowerCase())>-1||$(this).is(":contains("+(t||"")+")")}).addClass("active")):n.attr("data-filter","false"),!1}).on("keyup",function(){$(this).change()})}function loadAlertToolTip(){if($(".moreinfo")!=undefined)$(".moreinfo").popover({trigger:"hover"}).on("show.bs.popover",function(){return $(this).data("bs.popover").tip().css({maxWidth:"500px"})})}function redirectToShoppingCart(){window.location.href="/ShoppingCart"}function AddToCartPayments(n,t,i,r){var u=r&&r.IsAuthorize||0;$("#divProgress").show();$.post("/Group/AddMembershipPaymentsInCart",{customerMembershipId:n,membershipPaymentsIds:t,IsAuthorize:u},function(n){n&&n.Success?(i&&i.toLowerCase()=="companybasedmembershipdetail"&&parent.goToShoppingCart(),window.location.href="/ShoppingCart"):($("#divProgress").hide(),n&&n.Message?alert(n.Message):alert("Currently, invoice(s) is not added into cart. Please try again."))})}function showPendingPaymentPopup(){$(".PendingPaymentPopOver").popover({trigger:"manual",content:function(){var n=$(this),t=n.attr("data-originalcontent"),i=n.attr("data-customermembershipId");return t+$("#dvPendingPayments"+i).html()},placement:"top",container:"body",html:!0,animation:!1}).on("mouseenter",function(){var n=this;$(n).popover("show");$(".popover").on("mouseleave",function(){$(n).popover("hide")})}).on("mouseleave",function(){var n=this;setTimeout(function(){$(".popover:hover").length||$(n).popover("hide")},100)}).on("show.bs.popover",function(){return $(this).data("bs.popover").tip().css({minWidth:"925px"})})}function reloadParentWindow(n){parent.location.href=n}function clearGroupSessionAfterPurchaseProduct(){typeof clearSessionStorageKeyForGroup=="function"&&clearSessionStorageKeyForGroup()}function toggleSidebarToHamburger(){var n=$('div#sidebar.sidebar-offcanvas[role="navigation"]'),t,i,r;if(window&&window.innerWidth>768){if($("body").removeClass("custom-mobileview"),t=$("div.container2 > div.body-content > div.row.row-offcanvas.row-offcanvas-right > div.col-xs-12.col-sm-9"),!t||!n||t.length==0||n.length==0)return;switch(n.attr("data-layouttype")){case"LeftSidebar":n.insertBefore(t);break;case"RightSidebar":n.insertAfter(t)}}else{if($("body").addClass("custom-mobileview"),i=$("#cartbar button.navbar-toggle"),!i||!n||i.length==0||n.length==0)return;r=$("#navbar div.TopmenuInToggle");n.insertAfter(r)}n&&n.hasClass("hidden-xs")&&n.removeClass("hidden-xs")}function getCartItems(){$("#cartItemList").load(GET_CART_URL)}function showPrerequisiteProducts(n,t){$.ajax({type:"get",url:GET_PREREQUSITE_PRODUCTS+"?productId="+n+"&productName="+t,success:function(n){$("#divPrerequisiteProducts").length===0&&$("body").append("<div class='modal fade' id='divPrerequisiteProducts' tabindex='- 1' role='dialog' aria-hidden='true' style='display: none;'><\/div>");$("#divPrerequisiteProducts").html(n);$("#divPrerequisiteProducts").modal()},error:function(){alert("Error! Please try again later.")}})}function openSharToEmailModel(n,t){$("#externalEmailShareScreen #shareUrl").val(t);$("#externalEmailShareScreen #shareTitle").val(n);var i=$("#externalEmailShareScreen").html();$.confirm({title:"",boxWidth:"450px",useBootstrap:!1,type:"",content:i,buttons:{close:{text:"Close",btnClass:"btn-danger",action:function(){}}}})}function getParameterFromUrl(n){for(var t,u=window.location.search.substring(1),r=u.split("&"),i=0;i<r.length;i++)if(t=r[i].split("="),t[0]&&n&&t[0].toLowerCase()==n.toLowerCase())return t[1]}function isIOsSafari(){var n=navigator.userAgent;return/iP(ad|od|hone)/i.test(n)&&/WebKit/i.test(n)&&!/(CriOS|FxiOS|OPiOS|mercury)/i.test(n)}function preventViewerLaunchInNewTab(){if(!isIOsSafari())return!1;var n=[],t=[$('a[href*="/ShowTime"]'),$('a[href*="/viewer/classroom"]'),$('a[href*="/Viewer"]'),$('a[href*="/UnAutheticatedLinkDemo"]'),$('a[href*="/LaunchFreeViewer"]')];if(!t||t.length==0||(t.map(function(t){t&&t.length>0&&n.push(t)}),!n||n.length==0))return!1;n.map(function(n){var t=$(n),i;if(!t||t.length==0)return!1;i=t.attr("target");i&&i=="_self"||t.attr("target","_self")})}function showWebinarPassword(){$(".webinar-launch-button").length>0&&$(".webinar-launch-button").each(function(){var n=$(this).attr("data-programregistrantid");$(".webinar-password[data-programRegistrantId="+n+"]").show()})}function checkCreditCardTypeValidation(n,t){var r="You have selected "+n+" as card type. Please make sure your card is "+n+".",i;n=="American Express"&&(n="amex");n&&n!="MasterPass"&&t&&(i=getCreditCardName(t),i!=n.toLowerCase()&&alert(r))}function getCreditCardName(n){return visa_regex=new RegExp("^4[0-9]{0,15}$"),mastercard_regex=new RegExp("^5[1-5][0-9]{0,17}$|^2[2-7][0-9]{0,17}$"),maestro_regex=new RegExp("^6[7-9][0-9]{0,17}$"),amex_regex=new RegExp("^3$|^3[47][0-9]{0,13}$"),diners_regex=new RegExp("^3$|^3[068]$|^3(?:0[0-5]|[68][0-9])[0-9]{0,11}$"),discover_regex=new RegExp("^6$|^6[05]$|^601[1]?$|^65[0-9][0-9]?$|^6(?:011|5[0-9]{2})[0-9]{0,12}$"),jcb_regex=new RegExp("^2[1]?$|^21[3]?$|^1[8]?$|^18[0]?$|^(?:2131|1800)[0-9]{0,11}$|^3[5]?$|^35[0-9]{0,14}$"),n=n.replace(/ /g,"").replace(/-/g,""),n.match(visa_regex)?"visa":n.match(mastercard_regex)?"mastercard":n.match(maestro_regex)?"maestro":n.match(amex_regex)?"amex":n.match(diners_regex)?"diners_club":n.match(discover_regex)?"discover":n.match(jcb_regex)?"jcb":"unknown"}function fixedSideBarScrollTop(){setTimeout(function(){$(".fixedSideBar").css("top",$(".fixedSideBar").offset().top-$(".divPurhaceItems:first").height()-20)},500)}function membershipList(){var n=$("#txtMembershipSearch").val(),t=$("#txtMembershipSearch").attr("data-groupTypeName");n=encodeURIComponent(n);window.location.href=t!=""?"/GroupType/"+t+"?q="+n:"/Search/MembershipTypesList?q="+n}function ManualRenewalPopup(n,t){return n=n+"&IsUseCardOnFile="+(t||!1),openPopup(n),!1}function DisplayCardOnFile(n,t){var i="A credit card has been authorized to be used for recurring payments. Would you like to use this payment method to process any outstanding invoices? ";t&&t.toLocaleLowerCase()=="true"&&(i="ACH/eCheck has been authorized to be used for recurring payments. Would you like to use this payment method to process any outstanding invoices? ");$.confirm({title:"Use Payment Method on File?",boxWidth:"500px",useBootstrap:!1,type:"green",content:'<span style="font-size: 14px;margin-top:20px;">'+i+"<\/span>",buttons:{ok:{text:"Yes",btnClass:"btn-success",action:function(){ManualRenewalPopup(n,!0)}},cancel:{text:"No",btnClass:"btn-danger",action:function(){ManualRenewalPopup(n,!1)}}}})}function openPopup(n){return $.magnificPopup.open({items:{src:n},type:"iframe",closeOnBgClick:!1,mainClass:"poprenewManually"}),!1}function retryPendingInvoicePayments(n,t){if(!n)return!1;$("#divProgress").show();$.post(RETRY_PENDING_INVOICE_PAYMENTS,{customerMembershipId:n,isManulaPayment:t},function(i){function r(n){if(!isValidPayNowForSeleted())return!1;$.post(DEACTIVATE_MEMBERSHIP_PAYMENT_PROFILE,{customerMembershipId:n},function(t){if($("#divProgress").hide(),!t)return alert("Your payment profile has not been deactivated successfully. Please try again or contact support."),!1;var i=$(this).attr("data-pageName"),r=$("input[type='checkbox'][class='chkSelect-FuturePayment']:checked").map(function(){return $(this).val()}).get().join(",");AddToCartPayments(n,r,i)})}if($("#divProgress").hide(),!i||!i.success)return i.errorMessage&&alert(i.errorMessage),!1;t&&i.isPendingPayment===!0?r(n):window.location.reload()})}function edgeBrowserLaunch(){window.location="microsoft-edge:"+window.location;setTimeout(function(){window.location="https://www.microsoft.com/en-us/edge?browser=Chrome&FORM=MG0AU2"},100)}var BUNDLE_ADDTOCART_LINK="/bundle1/AddToCart/",ACCOUNT_REGISTER_COMPANY_AUTOCOMPLETE="/Account/Autocomplete/",EMAIL_IN_USED_ACCOUNT_REGISTER="/Account/EmailCheck",EMAIL_IS_MATCH_WITH_COMPANY_DOMAIN="/Account/EmailMatchWithCompanyDomain",GENERATE_NEW_GIFTCARD_URL="/Account/GenerateNewGiftCard",DELETE_SAVED_ITEM_URL="/Account/DeleteSavedItem",CHECK_REGISTRANT_EMAIL_URL="/Account/CheckRegistrantEmail",UPLOAD_AVATAR_URL="/Account/UploadAvatar",GET_STATE_URL="/Account/GetState/",GET_CONTACT_INFO_URL="/Account/GetContactInfo",GET_SHIPPING_INFO_URL="/Account/GetShippingInfo/",CANCELLED_GIFT_CARD_URL="/Account/CancelledGiftCard",PENDING_SEMINAR="/Account/PendingSeminar",COMPLETED_SEMINAR="/Account/CompletedSeminar",SAVED_ITEMS="/Account/CustomerSavedItem",GET_COMPARE_PRODUCT_URL="/Account/CompareItemsView",GET_County_URL="/Account/GetCounty/",CHECK_CUSTOMER_SICCODE="/Account/CheckCustomerSicCodes",GET_ORDERITEM_EVENTDATE="/Account/GetOrderItemEventDate",GET_CUSTOMER_LINKEDTENANTS="/Base/GetLinkedTenants",CUSTOMER_CANCELMEMBERSHIP="/Account/CancelCustomerMemberShip",CHECK_MARKETINGCONSENT_CUSTOMER="/Account/CheckMarketingConsentCustomer",GET_CUSTOMER_ACCOUNT_MESSAGE_URL="/Account/GetCustomerAccountMessage",GET_PREREQUSITE_PRODUCTS="/Account/GetPrerequsiteProducts",GET_CUSTOMER_GET_CUSTOMER_ADDRESS_LIST="/Account/GetCustomerAddressList",GET_CUSTOMER_CUSTOMER_GET_EXISTING_ADDRESSES="/Account/GetCustomerExistingAddresses",DELETE_MESSAGE_URL="/QuestionAnswer/DeleteMessage/",MARK_AS_UNREAD_URL="/QuestionAnswer/MarkAsUnRead/",COMPOSE_MESSAGE_URL="/QuestionAnswer/ComposeMessage",QUESTION_ANSWER_LIST_URL="/QuestionAnswer/QuestionAnswerList",UPDATE_PRODUCT_QUANTITY_URL="/ShoppingCart/UpdateProductQuantity",REMOVE_PROGRAM_REGISTRANT_URL="/ShoppingCart/RemoveProgramRegistrant",REMOVE_REGISTRANT_URL="/Registrant/RemoveRegistrants",UPDATE_PRODUCT_ITEM_AND_REGISTRANT_QTY="/Registrant/UpdateProductItemAndRegistrantQty",GET_REGISTRANT_DETAIL="/Registrant/GetRegistrantDetail",GET_REGISTRANT_PRODUCT_DETAIL="/Registrant/GetRegistrantProductDetail",REMOVE_ASSIGNLATER_REGISTRANTS="/Account/DeleteProgramRegForAssignLater",UPDATE_BUNDLE_QAUNTITY_URL="/ShoppingCart/UpdateBundleQauntity",UPDATE_ORDER_EVENTDATE_URL="/ShoppingCart/UpdateOrderEventDate",MY_CART_URL="/ShoppingCart/MyCart",REMOVE_ITEM_URL="/ShoppingCart/RemoveItem",UPDATE_OR_REMOVE_PRODUCT_BY_PARENTORDERITEM="/ShoppingCart/UpdateOrRemoveProductByParentOrderItem",GET_ADDON_PRODUCT_IN_CART="/ShoppingCart/GetAddOnProductInCart",REMOVE_ITEM_FROM_BUNDLE_URL="/ShoppingCart/RemoveItemFromBundle",CHECK_GIFT_CARD_CODE_URL="/ShoppingCart/CheckGiftCardCode",CHECK_COUPON_CODE_URL="/ShoppingCart/CheckCouponCode",GET_CURRENT_DISCOUNT_DETAIL="/ShoppingCart/GetCurrentDiscountDetail",REMOVE_COUPN_CODE_URL="/ShoppingCart/RemoveCoupnCode",SET_SHIPPING_METHOD_URL="/ShoppingCart/SetShippingMethod",GET_SHIPPING_METHOD_URL="/Account/GetShippingMethod",SAVE_SHIPPING_INFO_URL="/Account/ShippingInfo",GET_SHIPPING_METHOD_BY_ADDRESS="/Account/GetShippingMethodByAddress",REMOVE_GIFT_CARD_CODE_URL="/ShoppingCart/RemoveGiftCardCode",GET_CART_URL="/ShoppingCart/GetCart",GET_RECEIPT="/ShoppingCart/ReceiptPart",GET_COMPAREPRODUCTCART_URL="/ShoppingCart/GetCompareProductCart",APPLY_GLOBAL_AUTO_DISCOUNT_URL="/ShoppingCart/ApplyGlobalAutoDiscount",SET_BILLING_ZIPCODE_URL="/ShoppingCart/SetBillingZipCode",GET_MULTIPAYMENTS_ITEMS="/Items/MultiPayment",POST_MULTIPAYMENTS_ITEMS="/Items/SaveMultiPayment",GET_PAYMENTINFO_ADDRESS_DETAIL="/Account/PaymentInfoAddressDetail",UPDATE_CHANGED_PRICE_CART_ITEMS="/ShoppingCart/UpdateChangedPriceCartItems",REWARD_POINTS_NOTIFICATION_URL="/ShoppingCart/RewardPointsNotification",SAVE_PARTICIPATION_CODE_URL="/Items/Saveparticipationcode",AUTO_SAVE_PARTICIPATION_CODE_URL="/Items/AutoSaveparticipationcode",SAVE_EVALUATION_URL="/Items/SaveEvaluation",SAVE_AFFIDAVIT_URL="/Items/SaveAffidavit",ADD_TO_CART_URL="/Items/AddToCart",SAVE_TO_CALENDAR_URL="/Items/SaveToCalendar",GET_EVALUATION_URL="/Items/GetEvaluation",GET_PARTICIPATION_CODE_URL="/Items/GetParticipationCode",GET_AFFIDAVIT_URL="/Items/GetAffidavit",GET_QUIZES_URL="/Items/GetQuizeHistory",COMPLETED_CERT_REQUIREMENT="/Items/CompletedCertRequirement",COMPLETED_MOVE_REQUIREMENT="/Items/MoveToCompleted",ADD_COMPAREPRODUCT_URL="/Items/AddCompareProduct",ADD_PURCHASEEXTENSION_URL="/Items/AddToCartExtension",ADD_CECREDITTOCART_URL="/Items/AddCECredit",ADD_SAVE_SINGLE_PRODUCT_URL="/Items/SaveSingleProduct",GET_PRODUCT_AGENDATAB="/Items/GetProductAgenda",AGENDA_PRODUCT_POPUP="/Items/ProductAgenda",AGENDA_CUSTOMER_ATTEDANCE="/Items/GetCustomerAttedanceConfirmation",CHECK_DISCOUNTPRODUCT_ELIGIBLITY="/Items/CheckDiscountProductEligiblity",GET_ATTENDANCE_HISTORY="/Items/GetAttendanceHistory",UPDATE_EXPIRED_DISCOUNTINCART="/Items/UpdateExpiredDiscountInCart",GET_LOGGEDINCUSTOMERID="/Items/GetLoggedInCustomerId",GET_PURCHASECECREDIT_STATUS="/Items/GetPurchaseCECreditStatus",GET_PRODUCTS_INFO="/Items/GetProductsInfo",GET_PURCHASECE_PRICE_POPUP="/Items/GetPurchaseCEPricePopup",CHECK_ADDON_OR_RELATEDPRODUCT_EXIST="/Items/CheckAddOnOrRelatedProductExist",GET_ACKNOWLEDGE_PREREQUISITE_PRODUCTS="/Items/GetAcknowledgePrerequisiteProducts",ARTICLE_LIKED_URL="/Support/ArticleLiked",ARTICLE_DISLIKED_URL="/Support/ArticleDisLiked",ADDITIONAL_PARTICIPANT_URL="/Search/AdditionalParticipantCE",ADDITIONAL_PARTICIPANT_ADDTOCARTURL="/Search/AddToCartAdditionalPriceItem",Subscription_List_URL="/Search/SubscriptionList",Docreadyeventid=1,DdlChangeid=2,GET_BUNDLEDETAIL_URL="/bundle2/BundleDetail",GET_BUNDLETYPEFIVE_DATEPOPUP="/Items/BundleTypeFiveMultiDates",GET_CATALOG_USER_TAB_URL="/CompanyCatalog/GetCatalogUserTab",GET_CATALOG_COURSE_TAB_URL="/CompanyCatalog/CatalogCoursesTab",GET_CATALOG_COURSE_LIST_URL="/CompanyCatalog/GetCatalogCourses",GET_CATALOG_SETTING_TAB_URL="/CompanyCatalog/GetCatalogSetting",SAVE_CATALOG_SETTING_TAB_URL="/CompanyCatalog/UpdateCompanyCatalogSetting",POST_HIDE_SHOW_COURSE_URL="/CompanyCatalog/ShowHideCourse",CATALOG_MESSAGE_URL="/CompanyCatalog/MessageUser",CATALOG_DELETE_NOTES="/CompanyCatalog/DeleteNote",CATALOG_LOAD_NOTES="/CompanyCatalog/GetAllNotesByEntityIdNType",CATALOG_SEND_CUSTOMER_ACCOUNTLINK="/CompanyCatalog/SendCustomerAccountLink",CATALOG_LOAD_CUSTOMER_USERDETAIL="/CompanyCatalog/CatalogUserDetail",CATALOG_COURSE_LISTINGS_SEND_REQUEST_URL="/CompanyCatalog/SendCourseRequest",CATALOG_COURSE_REQUEST_TAB_URL="/CompanyCatalog/CatalogCourseRequestTab",CATALOG_COURSE_ALLOW_DENY_URL="/CompanyCatalog/AllowDenyAccess",CATALOG_LMS_USERTAB_USERLIST="/CompanyCatalog/GetUsers",CATALOG_LMS_ENROLUSER_URL="/CompanyCatalog/EnrollUsers/",CATALOG_LMS_ENROL_COURSE_URL="/CompanyCatalog/EnrollCourses/",CATALOG_LMS_REMOVEUSERFROMENROL="/CompanyCatalog/RemoveUsers",CATALOG_LMS_REMOVE_USER_FROM_COURSE="/CompanyCatalog/RemoveCourse",CATALOG_ADD_COURSE_MY_ACCOUNT_URL="/CompanyCatalog/AddCourseToMyAccount",CATALOG_USER_MESSAGE_TAB_URL="/CompanyCatalog/GetMessageTab",CATALOG_USER_HISTORY_TAB_URL="/CompanyCatalog/GetLMSHistory",SPEAKER_PORTAL_DELETEDOCUMENT_URL="/Documents/DeleteDocument",SPEAKER_PORTAL_DOCUMENT_TAB_URL="/Documents/GetAllDocumentsByEntityIdNType",SPEAKER_PORTAL_PROFILEINFO_TAB_URL="/SpeakerProfileInformation/GetProfileInformation",SPEAKER_PORTAL_PRODUCT_TAB_URL="/SpeakerProducts/GetSpeakerProducts",ADD_BUNDLE_TYPE_4_ADD_TO_CART_URL="/BundleType4Product/GetProductList",REMOVE_REWARDPOINT="/ShoppingCart/RemoveRewardPoints",BUNDLE_TYPE_5_List_CUSTOMER_PRODUCT="/BundleType5Product/GetCustomerBundleProductList",BUNDLE_TYPE_5_ADD_CUSTOMER_PRODUCT="/BundleType5Product/AddCustomerBundleProduct",GET_PURCHASEALERTMESSSAGE="/Items/GetPurchaseAlertMesssage",LAUNCH_FREE_VIEWER_URL="/LaunchFreeViewer",COMPLETE_FREE_ORDER_URL="/CompleteFreeOrder",CLASSROOM_LOGIN_URL="/sq/lg/LoginView",BANNER_CLICK_COUNT="/Home/UpdateClickCountForBannerAdvert",BANNER_SHOWN_COUNT="/Home/UpdateBannerShownCount",CENCEL_PURCHASECE="/Items/CancelPurchaseForPurchaseCE",ADD_OUT_STANDING_INVOICE_IN_CART="/Group/AddOutStandingInvoiceInCart",RETRY_PENDING_INVOICE_PAYMENTS="/Group/RetryPendingInvoicePayments",DEACTIVATE_MEMBERSHIP_PAYMENT_PROFILE="/Group/DeActivateMembershipPaymentProfile",CHECK_GBOOKCUSTOMER="/GuestBook/CheckForGuestbookCustomer",GET_GUESTBOOK_ORDER_SUMMARY="/GuestBook/GetOrderSummary",MediaTypes={nonLiveTypes:[4,5,6,7,9,10,11,12,13,14,15],liveTypes:[1,2,3,8],isLiveType:function(n){return MediaTypes.liveTypes.indexOf(n)>-1}},cls_saveSingleProduct,displayPurchaseCEMessage,popup,changePlaceHolderGlobalSearh,validateMobileNumber,getComparelist,isImpersonateSession;typeof $.ajaxSetup=="function"&&$.ajaxSetup({cache:!1});$(document).ready(function(){function t(){$("#cartbar").affix({offset:{top:$(".headersection").outerHeight(!0)+25,bottom:null}})}var i,n,r,u;toggleSidebarToHamburger();loadAlertToolTip();updateCartCount();getComparelist();getCartItems();$(".validation-summary-errors").length>0&&$(".validation-summary-errors ul li:visible").length==0&&$(".validation-summary-errors").hide();$('[data-toggle="popover"]').popover({trigger:"hover",placement:"top"});$(".scheduleAtGlance").popover({trigger:"hover",placement:"top"}).on("show.bs.popover",function(){return $(this).data("bs.popover").tip().css({width:"500px"})});$(".clsCalenderTooltip").tooltip();$(".PendingPaymentPopOver").length>0&&showPendingPaymentPopup();document.getElementById("myCarousel")!=null&&$("#myCarousel").carousel({interval:1e4});$("#DivADARequirement").length>0&&($("#ADARequirementNote").val()!=""&&$("#ADARequirementNote")!=undefined&&$("#ADARequirement").prop("checked",!0),$("#ADARequirement").prop("checked")==!0&&($("#ADARequirementNote").attr("required","required"),$("#ADARequirementNote").closest("div").find("span.field-validation-error").show().html("")));$(".recentcarousel").each(function(){var n=$(this).next();n.length||(n=$(this).siblings(":first"));n.children(":first-child").clone().appendTo($(this));n.next().length>0?n.next().children(":first-child").clone().appendTo($(this)):$(this).siblings(":first").children(":first-child").clone().appendTo($(this))});document.getElementById("myCarousel1")!=null&&$("#myCarousel1").carousel({interval:1e4});t();i=250;n=300;$(window).scroll(function(){t();jQuery(this).scrollTop()>i?jQuery(".back-to-top").fadeIn(n):jQuery(".back-to-top").fadeOut(n)});$(".back-to-top").click(function(t){return t.preventDefault(),jQuery("html, body").animate({scrollTop:0},n),!1});$("body").on("click",".popAddtoCart",function(){var r;if($(this).hasClass("clsChangePrice")){var n=[],t=$(this).attr("data-productId"),i=localStorage.getItem("SwapProducts");i&&(n=JSON.parse(i));n.indexOf(t)==-1&&n.push(t);localStorage.setItem("SwapProducts",JSON.stringify(n))}return r=$(this).attr("href"),openAddToCartPopupModal(r),!1});$(".container").on("click",".calendar_nav",function(){var n=$(this).attr("data-rel");return $.get($(this).attr("href"),function(t){$("#"+n).html(t);$(".clsCalenderTooltip").tooltip()}),!1});$("body").on("click",".popUploadImage",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"popUploadImageMainClass"}),!1});$("body").on("click",".popCourseDescription",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"popCourseDescriptionMainClass"}),!1});$("body").on("click",".pop400",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!0,mainClass:"pop400"}),!1});$("#tabDocuments").on("click",".popDocumentUpload",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"popDocumentUpload"}),!1});$("body").on("click",".popRequiredInfo",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"popRequiredInfoMainClass"}),!1});$("body").on("click",".pop850",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"pop850mainClass"}),!1});$("body").on("click",".popReactivate",function(){return openPopup($(this).attr("href")),!1});$("#btnProductSearch").on("click",function(){var n=$("#txtProductSearch").val();n.trim().length>0&&(n=encodeURIComponent(n),window.location.href="/Search?search="+n)});$("body").on("keypress","#frmHeaderSearch",function(n){if(kCode=n.keyCode||n.charCode,kCode==13){var t=$(this).attr("data-DefaultButton");return $("#"+t).click(),!1}});$("#btnProductSearchOutside").on("click",function(){var n=$("#txtProductSearchOutside").val();n.trim().length>0&&(n=encodeURIComponent(n),window.location.href="/Search?search="+n)});$("body").on("keypress","#frmHeaderSearchOutside",function(n){if(kCode=n.keyCode||n.charCode,kCode==13){var t=$(this).attr("data-DefaultButton");return $("#"+t).click(),!1}});$(".toggle-password").on("click",function(){$(this).toggleClass("fa-eye fa-eye-slash");var n=$($(this).attr("data-toggleid"));if(!n)return!1;(n.attr("type")||"")==="password"?n.attr("type","text"):n.attr("type","password")});$(".topWishlistMessage").length>0&&setTimeout(function(){$(".topWishlistMessage").remove()},5e3);$(".topSubscriptionsMessage").length>0&&setTimeout(function(){$(".topSubscriptionsMessage").remove()},5e3);$("#content").on("click",".pop700",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!0,mainClass:"pop700"}),!1});$(document).ajaxStart(function(){$("#divProgress").show()});$(document).ajaxComplete(function(){$("#divProgress").hide();setTimeout(function(){updateCartCount()},200);preventViewerLaunchInNewTab()});$(document).ready(function(){$("#divProgress").hide()});try{r=$("#IsContryExists").val();r=="true"&&(u=$(".clsformCountryId").val(),frmGetAllState(u,Docreadyeventid))}catch(f){}$("body").on("change",".clsformCountryId",function(){$("#divProgress").show();var n=$(this).val();frmGetAllState(n,DdlChangeid)});setTimeout(function(){LoadCustomerBundleProductList()},100);typeof dateFormate=="string"&&dateFormate=="ddMMyyyy"&&$.validator&&$.validator.addMethod("date",function(n,t){if(this.optional(t))return!0;var i=!0;try{$.datepicker.parseDate("dd/mm/yy",n)}catch(r){i=!1}return i});changePlaceHolderGlobalSearh();removeTableResponsiveCss();$(".collapse").on("shown.bs.collapse",function(){$(this).parent().find(".glyphicon-plus").removeClass("glyphicon-plus").addClass("glyphicon-minus")}).on("hidden.bs.collapse",function(){$(this).parent().find(".glyphicon-minus").removeClass("glyphicon-minus").addClass("glyphicon-plus")});if(typeof SearchFiltersCollapse=="function"&&SearchFiltersCollapse(),$(".datepicker").length>0&&$(".datepicker").datepicker(),$(".DOBdatepicker").length>0){$(".DOBdatepicker").datepicker({defaultDate:new Date((new Date).setYear(1989)),changeMonth:!0,changeYear:!0,yearRange:"1900:"+((new Date).getFullYear()-10)});$(".DOBdatepicker").on("blur",function(){try{var n=$.datepicker.parseDate(dateFormate=="ddMMyyyy"?"dd/mm/yy":"mm/dd/yy",$(this).val());n>new Date&&(alert("Please select another date"),$(this).val(""))}catch(t){return!1}})}preventViewerLaunchInNewTab()});$("body").on("click",".btnAddtowishlist",function(){var i=$(this),s=$(this).attr("data-value"),r=s.split(","),n=0,h=r[0],t=r[1],u=$(".EventDate").val(),f="",e=1,o=11,c=$(this).attr("data-eventTimeId");parent.$("#pageType").val()!=undefined&&(f=parent.$("#pageType").val());parent.$("#pageno").val()!=undefined&&(e=parent.$("#pageno").val());parent.$("#sortby").val()!=undefined&&(o=parent.$("#sortby").val());t=="ShoppingCart"?n=c:u>0&&(n=u);$.ajax({type:"POST",url:"/Items/SaveToCalendar",dataType:"json",data:{ProductId:h,eventDateId:n,Type:t},success:function(n){if(n.WishlistCount>0&&parent.$("#Wishlistcount").html("("+n.WishlistCount+")"),n.isCompareProduct!=undefined&&n.isCompareProduct==!0&&(parent.$("#compareProductcartspancount").html(n.compareProductCount),parent.$("#compareProductcartItemList").load(GET_COMPAREPRODUCTCART_URL)),f=="CompareItem"&&parent.$("#grid-compareProduct").load(GET_COMPARE_PRODUCT_URL+"?page="+e+"&sortby="+o),n.Message!=null&&n.Message!=""&&(displayCartMessages(i,n,t),n.Type!=null&&n.Type=="ShoppingCart")){var r=$(i).prev().prev();r!=null&&$(r).hasClass("RemoveItemFromCart")&&n.isAlreadyPurchase==!1&&(isRefreshWishList=!0,$(r).trigger("click"));$("#spnMessage").html(n.Message);$(".wishlistCart").show()}},complete:function(){},error:function(){alert("Error! Please try again later.")}})});$("body").on("click",".btnAddCompareProduct",function(){var n=$(this),r=n.attr("data-value"),t=n.attr("data-widgetType"),i=!1;t!=undefined&&t=="ViewerCompareProduct"&&(i=!0);$.ajax({type:"POST",url:ADD_COMPAREPRODUCT_URL,dataType:"json",data:{ProductId:r,IsFromViewerProduct:i},success:function(i){i.CartCount!=null&&i.CartCount!=""&&i.CartCount!="0"&&(parent.$("#compareProductcartspancount").html(i.CartCount),parent.$("#compareProductcartItemList").load(GET_COMPAREPRODUCTCART_URL));i.isChangeWishlist==!0&&parent.$("#Wishlistcount").html("("+i.wishlistCount+")");i.Message!=null&&i.Message!=""&&displayCartMessages(n,i,t)},complete:function(){},error:function(){alert("Error! Please try again later.")}})});$("body").on("click",".btnCouponShoppingCart",function(){var n=$(".txtCouponCodeShoppingCart").val();n&&n.trim()!=""?$.ajax({type:"POST",url:CHECK_COUPON_CODE_URL,dataType:"json",data:{DiscountCode:n},success:function(n){n!=""&&(n.type==1?(n.message!=""&&alert(n.message),UpdateOrderSummary(),typeof UpdateItemCart=="function"&&UpdateItemCart(0)):confirm(n.message)?(UpdateOrderSummary(),typeof UpdateItemCart=="function"&&UpdateItemCart(0)):RemoveDisount(),location.href&&location.href.toLowerCase().indexOf("/account/shippinginfo")>-1&&ApplyFreeShipping(n.freeshipping,n))},error:function(){alert("Error! Please try again later.")}}):RemoveDisount()});$("body").on("click",".clsGlobalDiscount",function(){var t=Number($(this).attr("data-priceId")),i=$(this).attr("data-isAdded"),n=$("#discountOffPrice").val();$('[name="discountOffPrice"]').length>1&&(n=$('[name="discountOffPrice"]')[1].value);n=typeof n=="string"&&n!=undefined&&n!=""?n:"";i==1?typeof RemoveDisount=="function"&&RemoveDisount():t>0&&$.ajax({type:"POST",url:GET_CURRENT_DISCOUNT_DETAIL,dataType:"json",data:{newDiscountId:t,currentStage:$("#CurrentStage").val()},success:function(i){if(i!=undefined&&i!=null&&i.discountId!=undefined&&i.discountId!=null&&Number(i.discountId)>0){var r=typeof i.newDiscount=="string"&&i.newDiscount!=undefined&&i.newDiscount!=""?i.newDiscount:"";$.confirm({title:"",boxWidth:"600px",useBootstrap:!1,type:"",content:"You currently have a discount in your cart that is saving you "+n+".<br/>If you apply this discount you will receive "+r+" off of your purchase instead.<br/>Please choose one discount to apply.<br/><br/> Do you wish to continue? ",buttons:{cancel:{text:"No, Keep the other discount",btnClass:"btn-warning",action:function(){}},ok:{text:"Yes, Apply new discount",btnClass:"btn-success",action:function(){applyGlobalDiscount(t)}}}})}else applyGlobalDiscount(t)},complete:function(){},error:function(){alert("Error! Please try again later.")}})});$("body").on("click",".lnkRemoveDiscountShoppingCart",function(){RemoveDisount()});$(function(){$(".shoppingCartLayout .fixedSideBar").length>0&&$(".shoppingCartLayout .fixedSideBar").scrollToFixed({marginTop:$(".custom-navbar.navbar").length>0?65:25,limit:function(){return $("footer.footer").offset().top-$(".shoppingCartLayout .fixedSideBar").outerHeight(!0)-10}})});$("body").on("click",".pop500",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,callbacks:{close:function(){}},mainClass:"pop500rMainClass"}),!1});$("body").on("click",".removeSavedItems",function(){var n=$(this).attr("id"),t=n.split("~")[0],i=n.split("~")[1];confirm("Are you sure you want to remove this item?")&&($.ajax({type:"POST",url:DELETE_SAVED_ITEM_URL,dataType:"json",data:{productID:t,dateID:i},success:function(n){n.WishlistCount>=0&&(parent.$("#Wishlistcount").html("("+n.WishlistCount+")"),$("#Wishcount").html(n.WishlistCount));$("#divProgress").hide();updateWishList()},error:function(){alert("Error Occured");$("#divProgress").hide()}}),$("#divProgress").show())});cls_saveSingleProduct="";$("body").on("click",".btnPopAddToCart",function(){cls_saveSingleProduct=$(this)});$("body").on("click",".closeCartAlertMessage, .closeMaxRegistrantMessage, .closeCompareProductMessage",function(){$(this).closest(".cartAlertMessage").hide();$(this).closest(".maxRegistrantAlertMessage").hide();$(this).closest(".compareProductAlertMessage").hide()});$(".btnClose").click(function(){$(this).closest("div.alert").hide()});$(".btnCloseFromSearchList").click(function(){$(this).closest("div.alertMessage").hide()});$("body").on("click",".clsSaveSingleProduct",function(n,t,i){var r=$(this);cls_saveSingleProduct=r;var f=$(this).attr("data-btnType"),e=$(this).attr("data-purchasealertid"),o=$(this).attr("data-productAvailibityRuleId"),s=$(this).attr("data-typeid"),u=$(this).attr("data-val"),h=$(this).attr("data-urlpopupaddtocart"),c=function(){t!="1"?$.get(GET_PURCHASEALERTMESSSAGE+"?purchaseAlertId="+e+"&btyType="+f+"&productAvailibityRuleId="+o+"&productTypeId="+s+"&productId="+u,function(n){if(n&&n.indexOf("divGeneralPurchaseAlert")>-1)return $(n).modal(),!1;saveSingleProduct(t,r,i)}):saveSingleProduct(t,r,i)};checkAddOnOrRelatedProductExist(u,h,c,r)});displayPurchaseCEMessage=function(n,t){$.get(GET_PURCHASECE_PRICE_POPUP+"?productId="+n+"&ceCreditPrice="+t,function(n){return $("#divPurchaseCECreditmodal").length>0?($("#div-list-purchaseCE").html(n),$("#divPurchaseCECreditmodal").modal()):($("body").append(n),$("#divPurchaseCECreditmodal").modal()),!1})};$("body").on("click",".btnAddtocartDiscountProductFromSearch",function(){var n=$(this),r=n.attr("data-customerid"),u=n.attr("data-exclude-discount"),t=n.attr("data-productpriceid"),i;if(parseInt(r)<=0&&u==1)return alert("You just need to Log In for purchase this product."),!1;i=[];i.push({productId:$(this).attr("data-productid"),EventTimeId:$(this).attr("data-eventtimeid"),priceType:$(this).attr("data-discounttype"),productPrice:$(this).attr("data-ProductPrice"),quantity:1,productPriceId:$(this).attr("data-productpriceid"),IsDiscountProduct:!0,ProductDiscountId:$(this).attr("data-product-discountid")});$.ajax({type:"POST",url:ADD_TO_CART_URL,dataType:"json",data:{listCart:JSON.stringify(i)},success:function(i){i.CartCount!=null&&i.CartCount!=""&&i.CartCount!="0"&&(parent.$("#cartspancount").html(i.CartCount),parent.$("#cartItemList").load(GET_CART_URL));i.Message!=null&&i.Message!=""&&displayCartMessages(n,i,"SearchProduct");backtoParentSingleCartItem(n,i,"SearchProduct");t!=undefined&&t!=null&&Number(t)>0&&$.ajax({type:"POST",url:CHECK_COUPON_CODE_URL,dataType:"json",data:{discountId:t},success:function(){},complete:function(){},error:function(){alert("Error! Please try again later.")}})},complete:function(){},error:function(){alert("Error! Please try again later.")}})});$("body").on("click",".btnItemProductStock",function(){var n=$(this).attr("data-saveLaterUrl"),t="We're sorry, but this product is out of stock.",r=$(this).attr("data-ItemType"),i;n!=undefined&&n!=""&&n!=""&&(t+=" Click "+n+" to save this for later");i={Message:t};displayCartMessages($(this),i,r)});$("body").on("click",".cartAgenda",function(){var n=$(this).attr("data-height"),t=$(this).attr("data-width");return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,callbacks:{close:function(){}},mainClass:"CustomPop"}),$(".mfp-content").css("height",n),$(".mfp-content").css("width",t),$(".mfp-iframe-holder .mfp-content").css("max-height",n+"px"),$(".mfp-iframe-holder .mfp-content").css("max-width",t+"px"),!1});$("body").on("click",".supportTicketPopUp",function(){return $.magnificPopup.open({items:{src:"/CreateSupportTicket"},type:"iframe",closeOnBgClick:!1,mainClass:"popCreateSupportTicket"}),!1});$("body").on("click",".popEmailToFriend",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"popCreateSupportTicket"}),!1});$("body").on("click",".launchiosapp,.launchandroid",function(){return $(this).hasClass("launchandroid")?setTimeout(function(){window.location=AndroidMarketLink},500):setTimeout(function(){window.location=iOSStoreLink},500),window.location=DeepLinkingUrl,!1});$("body").on("click",".launchvieweriosapp,.launchviewerandroid",function(){var n=$(this).attr("data-registrantencryptkey");return $(this).hasClass("launchviewerandroid")?(setTimeout(function(){window.location=AndroidMarketLink},500),n=encodeURIComponent(n)):(setTimeout(function(){window.location=iOSStoreLink},500),n=encodeURIComponent(n)),window.location=DeepLinkingUrl+n,!1});$("body").on("click",".popNotificationOption",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,callbacks:{close:function(){}},mainClass:"popNotificationOptionMainClass"}),!1});$("body").on("click",".btnAddCustomerBundle",function(){var o=$(this).attr("data-ProductId"),s=$(this).attr("data-bundleproductid"),u=$(this).attr("data-eventid"),h=$(this).attr("data-priceid"),f=$(".EventDate").val(),i,n,t,r,e;if($("#EventDate").length>0&&(i=$("#EventDate").val(),i!=undefined&&i!=null&&i>0&&(u=i)),f!=undefined&&f>0&&(u=f),n=$(this).attr("data-status"),t=!0,n!=undefined&&n!=""&&n=="0"?t=!0:n!=undefined&&n!=""&&n=="1"&&(t=!1),r=$(this).attr("data-href"),e=$(this).attr("data-displaypopup"),t!=undefined&&t==!0&&e!=undefined&&e=="True"&&r!=undefined&&r!="")return WidgetBundleDateSelectorPopup(r),!1;SaveCustomerBundleTypeFive(o,s,u,t,h)});$("body").on("click","#StickeyBundleIcon",function(){var t=$(this).attr("data-arrow"),n;t=="fa-chevron-down"?($(this).removeClass("fa-chevron-down").addClass("fa-chevron-up"),$(this).attr("data-arrow","fa-chevron-up"),$("#isc-compare-control").hide("500"),$(".stickyCompareFooter").removeClass("active"),$("footer").attr("style"," margin-bottom: 0px;"),localStorage.setItem("BundleArrow","fa-chevron-up")):($(this).removeClass("fa-chevron-up").addClass("fa-chevron-down"),$(this).attr("data-arrow","fa-chevron-down"),$("#isc-compare-control").show("500"),$(".stickyCompareFooter").addClass("active"),n=$("#stickyCompareFooter").height(),$("footer").attr("style"," margin-bottom:"+n+"px;"),localStorage.setItem("BundleArrow","fa-chevron-down"))});$("body").on("change",".chkAddCustomerBundle",function(){var e=$(this).attr("data-ProductId"),o=$(this).attr("data-bundleproductid"),t=$(this).attr("data-eventid"),s=$(this).attr("data-priceid"),i=$(".EventDate").val(),n;$("#EventDate").length>0&&(n=$("#EventDate").val(),n!=undefined&&n!=null&&n>0&&(t=n));i!=undefined&&i>0&&(t=i);var r=$(this).prop("checked"),f=$(this).attr("data-displaypopup"),u=$(this).attr("data-href");if(r!=undefined&&r==!0&&f!=undefined&&f=="True"&&u!=undefined&&u!="")return WidgetBundleDateSelectorPopup(u),!1;SaveCustomerBundleTypeFive(e,o,t,r,s)});$("body").on("click",".clsDeleteCustomerBundleProduct",function(){var n=$(this).attr("data-productid"),t=".chkCustomerBundle"+n;confirm("Are you sure you want to remove this product?")&&($("#divProgress").show(),$.ajax({type:"POST",url:"/Bundle/DeleteCustomerBundleProduct",dataType:"json",data:{customerBundleId:$(this).attr("data-customerbundleid")},success:function(){LoadCustomerBundleProductList()},complete:function(){$("#divProgress").hide()},error:function(){$("#divProgress").hide();alert("Error! Please try again later.")}}))});$("body").on("click",".clsClearAllCustomerBundleProduct",function(){confirm("Are you sure you want to Clear this Bundle?")&&($("#divProgress").show(),$.ajax({type:"POST",url:"/Bundle/ClearCustomerBundle",dataType:"json",data:{},success:function(){LoadCustomerBundleProductList();$(".chkAddCustomerBundle")!=undefined&&$(".chkAddCustomerBundle").attr("checked",!1)},complete:function(){$("#divProgress").hide()},error:function(){$("#divProgress").hide()}}))});$("body").on("click",".btnGetMobileApp,.linkPagerDutySubmit",function(){return $.magnificPopup.open({items:{src:$(this).attr("data-href")},type:"iframe",closeOnBgClick:!1,callbacks:{close:function(){}},mainClass:$(this).hasClass("linkPagerDutySubmit")?"popPagerDuty":"popNotificationOptionMainClass"}),!1});$("body").on("click",".btnAddCECredittoCart",function(){var n=$(this).attr("data-productId");addCECredittoCart(n)});$("body").on("click",".btnCloseAddCECredittoCart",function(){var n=$(this).attr("data-isSendCustomerCart");typeof parent.IsProceedToMemberShipGroup=="function"&&parent.IsProceedToMemberShipGroup()&&typeof parent.proceedToMembershipGroup=="function"?parent.proceedToMembershipGroup():n!=undefined&&n=="True"&&(parent.window.location.href="/ShoppingCart")});$(function(){var n=[];n.push("IsUpdateCartId");n.push("Message");n.push("subscriptionsMessage");n.push("wishListMessage");n.push("classroomMessage");n.push("InActiveProductCount");n.push("InActiveDiscountProductCount");n.push("alertMsg");n.push("sucMsg");n.push("warnMsg");removeUrlMessage(n)});$(".topMyAccountBar").mouseover(function(){getLinkedTenants()});$("body").on("click",".clsGoToLinkedAccount",function(){var n=$(this).attr("data-linkedCatalogName");n!=undefined&&($("#divProgressLinkedAccount").show(),$(".clsLinkedAccountLoaderTxt").text("Switching to "+n))});$(".sideBarCloseButton").click(function(){$("body").removeClass("sidemenu-active")});$(".btnForHideShowSideBar").length>0&&$("#sidebar").length>0&&$(".btnForHideShowSideBar").click(function(){$("body").addClass("sidemenu-active")});changePlaceHolderGlobalSearh=function(){if($(window).width()<=415)$("#txtProductSearch").attr("placeholder","Global Search"),$("#txtProductSearchOutside").attr("placeholder","Global Search");else{var n=$("#lblCustomLabelFaculty").val();(n==null||n==undefined||n=="")&&(n="");$("#txtProductSearch").attr("placeholder","Global Search on Seminars, "+n);$("#txtProductSearchOutside").attr("placeholder","Global Search on Seminars, "+n)}};$(window).resize(function(){toggleSidebarToHamburger();changePlaceHolderGlobalSearh();$(".fixedSideBar").length&&($(window).width()<767?$(".fixedSideBar").addClass("disableAffix"):$(".fixedSideBar").removeClass("disableAffix"))});$("body").on("click",".btnRemoveMarketingCode",function(){loadMarketingDiv(!0)});$(window).resize(function(){$(".remove-table-responsive").length>0&&removeTableResponsiveCss()});$("body").on("click",".popUpFreeCourseRegister",function(){var n=$(this),t=n.attr("data-href"),i=n.attr("data-returnUrl"),r=n.attr("data-ProductId"),u=n.closest(".ProductDetailPortion").length>0?"productdetail":"SearchProduct";$.get("/Items/CheckMaxRegistrantForFreeProducts?productId="+r,function(r){r&&r.Message?displayCartMessages(n,r,u):$.ajax({type:"GET",url:GET_LOGGEDINCUSTOMERID,dataType:"json",success:function(n){return n!=undefined&&n!=null&&n>0&&(t=i),$.magnificPopup.open({items:{src:t},type:"iframe",closeOnBgClick:!0,mainClass:"CustomPop"}),!1},complete:function(){},error:function(){}})})});$("body").on("click",".btnGuestBookRegistration",function(){var i=$(this).attr("data-eventtimeid"),t=$(this).attr("data-href"),n=0,r=$(".EventDate").val();element=$(this);productId=element.attr("data-ProductId");pageType=element.closest(".ProductDetailPortion").length>0?"productdetail":"SearchProduct";$.get("/Items/CheckMaxRegistrantForFreeProducts?productId="+productId+"&eventTimeId="+i,function(u){u&&u.Message?displayCartMessages(element,u,pageType):(n=r>0?r:i,n!=undefined&&n>0&&t!=undefined&&t!=null&&t!=""&&(parent.location.href=t+"/"+n))})});$("body").on("click","#purchaseProductWithAlert",function(){var n=$(this).attr("data-purchasebuttontype");n!=undefined&&n!=null&&n!=""&&$("."+n).trigger("click",[1])});$("#txtStartingOnOrAfter").on("change",function(){$("#txtStartingOnOrBefore").datepicker("option","minDate",$("#txtStartingOnOrAfter").val())});$("#txtStartingOnOrBefore").on("change",function(){$("#txtStartingOnOrAfter").datepicker("option","maxDate",$("#txtStartingOnOrBefore").val())});$(function(){$(".clsNotices").length>0&&document.cookie.indexOf("CookieNoticeAccepted=")==-1&&$(".clsNotices").show()});$("body").on("click",".clsCookieNoticeAccept",function(){var t=new Date,n,i,r;t.setFullYear(t.getFullYear()+1);n=window.location.hostname;n.indexOf("ce21")==-1&&(i=n.split("."),i.shift(),n=i.join("."));r=new Date;document.cookie="CookieNoticeAccepted="+r.toISOString()+"; domain="+n+"; path=/; expires="+t.toUTCString();setTimeout(function(){$(".clsNotices").hide()},500)});$(".aInnerTab[data-toggle='tab']").click(function(){var n=$(this).attr("href");n&&window.history.replaceState(null,null,n)});validateMobileNumber=function(n){return/^([0-9]|[(]|[)]|[-]|[+]|[ ])+$/.test(n)?!0:!1};$("body").on("click",".clsExistsMembership",function(){var n=$(this).attr("data-val"),t=$(this).attr("data-href");$("#divProgress").show();$.get("/Search/MembershipExistsForCustomer?membershipTypeId="+n,function(n){$("#divProgress").hide();n!==undefined&&n!==""?alert(n):window.location.href=t})});$("body").on("click",".webinar-launch-button",function(){SubmitBrowerInfoForWebinar($(this).attr("data-ProgramRegistrantId"))});$("body").on("click",'a:not(.clsIphoneMsgBtn)[href*="/LaunchFreeViewer?"], .clsFreeViewerLaunch, .btnScheduletabsLaunchViewer',function(){var e;if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)){var t=$(this),n=t.attr("href"),u=0,i=0,r=getParameterByNameForHref(n,"x"),f=n.indexOf("ShowTime/")>0;return!n||n.indexOf("javascript")>0?!1:(f&&(e=t.attr("data-programregistrantid"),u=n.lastIndexOf("/"),i=n.indexOf("?")>0?e:n.substring(u+1)),(r&&r.trim()!=""||f&&Number(i)>0)&&$.ajax({type:"POST",url:"/Items/IphoneNonCompatibleMessage",dataType:"json",data:{encryptedStr:r.trim(),viewerUrl:n,programRegistrantId:i},success:function(i){if($("#divProgress").hide(),i&&i.ShowMessage==!0){var r=function(){var t=i.ExistAttendanceRequirment;parent.$("#divIphoneMessageGeneral").modal("show");parent.$("#divIphoneMessageGeneral .modal-footer").find("a").attr("href",n);parent.$("#divIphoneMessageGeneral .modal-footer").find("a").addClass("csViewerOk");t==!0?(parent.$(".iphone-questionrequirement-message").show(),parent.$(".iphone-participationcode-message").hide()):(parent.$(".iphone-questionrequirement-message").hide(),parent.$(".iphone-participationcode-message").show());parent.$.magnificPopup.close()};return parent.$("#divIphoneMessageGeneral").length>0?r():$.get("/Items/IphoneInCompatiblePopup",function(n){parent.$("body").append(n);r()}),!1}!isIOsSafari()&&t.attr("target")&&(t.attr("target")=="_blank"||t.attr("target")=="_ce21")?window.open(n,"_blank"):isIOsSafari()&&window.open(n,"_self")},error:function(){alert("Error! Please try again later.");$("#divProgress").hide()}}),!1)}});$("body").on("click",".csViewerOk",function(){window.open($(this).attr("href"),isIOsSafari()?"_self":"_blank")});$("body").on("click","input[type='checkbox'][class*='chkSelect-']",function(){var r=$(this).attr("class").split(" "),i="",u="single",n="",t="";r.length>0&&r.forEach(function(n){if(n.indexOf("chkSelect-")>-1){i=n;return}});i!==""&&((i.match(/-/g)||[]).length===2?(u="all",t=i,n=t.replace("-All","")):(n=i,t=n+"-All"),n!==""&&t!==""&&(u==="all"?$("."+n).prop("checked",$(this).is(":checked")):$(this).is(":checked")&&$("."+n).length===$("."+n+":checked").length?$("."+t).prop("checked",!0):$("."+t).prop("checked",!1)))});getComparelist=function(){$("#compareProductcartItemList").load(GET_COMPAREPRODUCTCART_URL,function(){var n=$('#compareProductcartItemList input[name="CompareCount"]').val();$("#compareProductcartspancount").text(n)})};$("body").on("click","#btnMarketingCodeSave",function(){var n=$("#MarketingCode").val();if(!n)return $(".clsRequired").show(),!1;$("#divProgress").show();$.ajax({type:"POST",url:"/ShoppingCart/SaveMarketingCode",dataType:"json",data:{marketingCode:n},beforeSend:function(){onMarketingCodeBegin()},success:function(n){onMarketingCodeSuccess(n);$("#divProgress").hide()},error:function(){onMarketingCodefailure();$("#divProgress").hide()}});$("#divProgress").hide()});var IsRegistrantTypeQuestionSetAvailable=function(n,t,i,r){var u=!1;return $.ajax({type:"GET",url:"/Items/IsRegistrantTypeQuestionSetAvailable/",data:{discountId:n,eventTimeId:t,productId:i,productTypeId:r},dataType:"json",async:!1,success:function(n){u=n},error:function(){u=!1}}),u},OpenRegistrantTypeQuestionSetPopup=function(n,t,i){return parent.$(".mfp-iframe-holder .mfp-iframe-scaler").css("padding-top","80%"),parent.$(".mfp-iframe-holder .mfp-content").css("max-width","900px"),parent.parent.$(".mfp-iframe-holder .mfp-iframe-scaler").css("padding-top","80%"),parent.parent.$(".mfp-iframe-holder .mfp-content").css("max-width","920px"),$.magnificPopup.open({items:{src:"/Search/RegistrantTypeQuestionSet?productId="+n+"&discountId="+t+"&priceType="+i},type:"iframe",closeOnBgClick:!1,mainClass:"CustomPop"}),!1},addToCartProductAfterRegistrantTypeQuestionSet=function(n,t){cls_saveSingleProduct&&cls_saveSingleProduct.length>0?saveSingleProduct(!1,cls_saveSingleProduct,n):saveAddToCartProducts(n,t)};$("body").on("change",".videoReplyEventDate",function(){setFreeViewerUrl($(this).val())});$("body").on("click",".ce21FreeCourse",function(){var n=$(this),t=$(this).attr("href"),i=n.attr("data-ProductId"),r=$("#EventDate").val(),u=n.closest(".ProductDetailPortion").length>0?"productdetail":"SearchProduct";if(t)return t.toLowerCase()=="javascript:void(0);"||t.toLowerCase()=="javascript:void(0)"?void 0:($.get("/Items/CheckMaxRegistrantForFreeProducts?productId="+i+"&eventTimeId="+r,function(i){i&&i.Message?displayCartMessages(n,i,u):$.ajax({url:t,type:"GET",dataType:"json",success:function(t){if(t.Success===!1&&t.ErrorMessage){alert(t.ErrorMessage);return}if(t.Success===!0){if(t.IsOpenPopup!==undefined&&t.IsOpenPopup===!0){if(n.hasClass("clsLaunchModel")&&t.PopupClass){parent.parent.$(".mfp-bg.mfp-ready").addClass(t.PopupClass).removeClass("CustomPop");parent.parent.$(".mfp-wrap.mfp-ready").addClass(t.PopupClass).removeClass("CustomPop");parent.parent.$(".mfp-content").removeAttr("style");window.location=t.RedirectURL;return}return $.magnificPopup.open({items:{src:t.RedirectURL},type:"iframe",closeOnBgClick:!1,mainClass:t.PopupClass||"popQuickLaunchMainClass"}),!1}t.OpenInNewTab===undefined||t.OpenInNewTab!==!0||isIOsSafari()?window.location=t.RedirectURL:window.open(t.RedirectURL,"_blank")}}})}),!1)});$("body").on("click",".btnLunchModelYmLogin",function(){parent.window.location=$(this).attr("data-href");return});$("body").on("change",".billingCycleType",function(){$("#groupPaymentCycleId").val($(this).attr("data-GroupCycleId"));$("#renewAmount").html($(this).attr("data-price"));$("#renewDays").html($(this).attr("data-days"));$("#renewalDate").html($(this).attr("data-renewalDate"))});$("body").on("change",".customerRecurringType",function(){$("#autoRecurringType").val($(this).val())});$("body").on("click",".freeMembershipRegistration",function(){var n=$(this).attr("data-val");return processQuickPurchaseMembership(n),!1});$("#memberShipQuestionAnswerForm").submit(function(){var n=!0;return($(".clsDatePicker").each(function(){var t=$(this).val(),r=$(this).attr("data-questionid"),i=".clsValDate"+r,u;if(t!=undefined&&t!=null&&t!="")if(ValidateDate(t))$(i).hide();else return n=!1,$(i).show(),u="#txtDate"+r,$(u).focus(),!1;validateDatePicker(t,i)}),$(".clsMembershipAnswerDocuments").each(function(){var t=$(this),i=t.attr("data-questionId");t.find("table").hasClass("noResults")&&($("#spnError_"+i).text("Please upload document."),$("#spnError_"+i).addClass("field-validation-error"),n=!1)}),n=checkMultiChoiceValidation(n),n==!1)?!1:$("#memberShipQuestionAnswerForm").valid()&&n&&($('button[type="submit"],input[type="submit"]').html('<i class="fa fa-refresh fa-spin"><\/i>&nbsp;&nbsp;Processing...').prop("disabled",!0),$(this).attr("pagetype")==="Default")?($("#divProgress").show(),saveMembershipQuestion(),!1):void 0});$("body").on("click",".btnEmailGroupCert",function(){return $(".btnCloseMemberCertificate").trigger("click"),$.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"popPagerDuty"}),!1});$("body").on("click",".popEditAddress",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"popEditAddressMainClass"}),!1});$(".autoCompleteCompanyName").autocomplete({source:function(n,t){$.ajax({global:!1,url:"/Search/Autocomplete",dataType:"json",data:n,success:t})}});$("body").on("click",".deleteAddress",function(){var n=$(this).attr("data-value"),t=$(this).attr("data-editAddressPopupType"),i=$(this).attr("data-isHideDirectory");confirm("Are you sure you want to delete this address?")&&$.post("/Account/DeleteAddress",{addressId:n},function(){addressMethod(t,i)}).fail(function(){alert("Error! Please try again later.")})});$("body").on("click","#printProductDecription",function(){var n=$(".printDescription").html(),t=document.body.innerHTML;document.body.innerHTML=n;window.print();document.body.innerHTML=t});$("body").on("change",".chkSelecAllCustomFields",function(){checkUncheckAllCustomCheckBox(this)});$("body").on("click",".btnClearCustomFields",function(){var n=$(this).closest("th").find('input[type="text"]');$(n).val("");searchCustomFieldCheckBox(n)});$("body").on("click",".btnCancelPurchaseCE",function(){var n=$(this).attr("data-productId");n&&$.get(CENCEL_PURCHASECE,{productId:n},function(n){n!=undefined&&(parent.$("#cartspancount").html(n),parent.$("#cartItemList").load(GET_CART_URL))})});jQuery.expr[":"].contains=function(n,t,i){return(n.textContent||n.innerText||"").toUpperCase().indexOf(i[3].toUpperCase())>=0};isValidPayNowForSeleted=function(){if($("input[type='checkbox'][class='chkSelect-FuturePayment']:checked").length===0)return alert("Please select a record for payment."),!1;var t=parseInt($("input[type='checkbox'][class='chkSelect-FuturePayment']:checked:first").attr("data-index")),i=parseInt($("input[type='checkbox'][class='chkSelect-FuturePayment']:checked:last").attr("data-index")),n=parseInt($("input[type='checkbox'][class='chkSelect-FuturePayment']:not(:checked):first").attr("data-index"));return t&&i&&n&&(t>n||n<i)?(alert("You cannot skip a middle payment."),!1):!0};$("body").on("click",".btnPayNow,.btnPayMultiple",function(){var t=$(this).attr("data-customerMembershipId"),n=$(this).attr("data-paymentId"),i=$(this).attr("data-pageName"),r;if($(this).hasClass("btnPayMultiple")){if(!isValidPayNowForSeleted())return!1;n=$("input[type='checkbox'][class='chkSelect-FuturePayment']:checked").map(function(){return $(this).val()}).get().join(",")}$("#hdnAutoPayerEnable").length>0&&$("#hdnAutoPayerEnable").val()==="false"?(r="You have not yet authorized a payment method to be used for recurring payments. Would you like to set up an automatic payment method for future dues invoices?",r+="<br/><br/> If you select Yes, the payment method will be stored and can be updated in the Invoices & Payments section of your membership tab. If you select No, only this current transaction will be processed.",$.confirm({title:"Enable Automatic Recurring Payments?",boxWidth:"750px",useBootstrap:!1,type:"green",content:r,buttons:{ok:{text:"Yes",btnClass:"btn-success",action:function(){AddToCartPayments(t,n,i,{IsAuthorize:!0})}},cancel:{text:"No",btnClass:"btn-warning",action:function(){AddToCartPayments(t,n,i)}}}})):AddToCartPayments(t,n,i)});$("body").on("click",".clsContinueCartForMobile",function(){var n=$($.grep(["#frmEditCustomer","#frmShippingInfo","#frmRegistrant","#frmMarketingCode","#frmPaymentInfo"],function(n){return $(n).length>0})[0]);if(!n)return!1;n.valid()&&$(this).attr("disabled","disabled");n.submit();setTimeout(function(){$(".clsContinueCartForMobile").removeAttr("disabled")},1500)});$("body").on("click",".PayOutStandingInvoices",function(){var n=$(this).attr("data-customerMembershipId"),t=$(this).attr("data-productpriceid");if(!t||!n||Number(t)<=0||Number(n)<=0)return!1;$("#divProgress").show();$.post(ADD_OUT_STANDING_INVOICE_IN_CART,{customerMembershipId:n},function(n){if(n&&n.Success)saveAddToCartProducts(undefined,t);else{$("#divProgress").hide();var i=n&&n.Message?n.Message:"Currently, invoice(s) is not added into cart. Please try again.";alert(i)}})});$("body").on("click",".ShowPrerequisiteProducts",function(){var n=parseInt($(this).attr("data-productid"))||0,t=$(this).attr("data-productname");n>0&&showPrerequisiteProducts(n,t)});$("body").on("click",".ShowAcknowledgePopup",function(){var n=parseInt($(this).attr("data-productid"))||0,t={productId:n,nextTargetDiv:$(this).attr("data-val")||"",agendaHeight:parseInt($(this).attr("data-height"))||0,agendaWidth:parseInt($(this).attr("data-width"))||0};if(n>0)return $.ajax({type:"get",url:GET_ACKNOWLEDGE_PREREQUISITE_PRODUCTS+"?"+$.param(t),success:function(n){$("#dvAcknowledgePopup").length===0&&$("body").append("<div class='modal fade' id='dvAcknowledgePopup' tabindex='- 1' role='dialog' aria-hidden='true' style='display: none;'><\/div>");$("#dvAcknowledgePopup").html(n);$("#dvAcknowledgePopup").modal()},error:function(){alert("Error! Please try again later.")}}),!1});$("body").on("click","#dvAcknowledgePopup a",function(){var n=$(this).attr("data-val")||"";$("#dvAcknowledgePopup").modal("hide");n&&$(n).modal()});$("body").on("click",".btnSocilMediaShare",function(){var r=$(this).attr("displayText"),t=$(this).attr("st_url")||location.href,n="",i=$(this).attr("st_title")||$("title").text();switch(r){case"Facebook":n="https://www.facebook.com/sharer/sharer.php?u={productUrl}";break;case"LinkedIn":n="https://www.linkedin.com/shareArticle?mini=true&url={productUrl}&title={productTitle}";break;case"Tweet":n="http://twitter.com/share?url={productUrl}&text={productTitle}";break;case"Email":openSharToEmailModel(i,t);return}n&&(n=n.replace("{productUrl}",encodeURIComponent(t)).replace("{productTitle}",encodeURIComponent(i)),window.open(n,"NewSharingWindow","height=700,width=800"))});$("body").on("click",".btnShareOnMail",function(){var i=$(this).attr("displayText"),r=$("#externalEmailShareScreen #shareUrl").val()||location.href,n="",u=$("#externalEmailShareScreen #shareTitle").val()||$("title").text(),f=u,t="{productUrl}";switch(i){case"Gmail":n="https://mail.google.com/mail/?view=cm&fs=1&su={subject}&body={body}";break;case"Yahoo":n="http://compose.mail.yahoo.com/?subject={subject}&body={body}";break;case"Email":n="mailto:test@example.com?subject={productUrl}&body={body}"}n&&(t=t.replace("{productUrl}",r),n=n.replace("{subject}",encodeURIComponent(f)).replace("{body}",encodeURIComponent(t)),window.open(n))});$("body").on("click",".impersonateInfo",function(){$.alert({title:"Impersonate Session",content:$(".clsImpersonateTextModel").html(),useBootstrap:!1,boxWidth:"600px",backgroundDismiss:!0,buttons:{cancel:{text:"Close",btnClass:"btn-default"}},onContentReady:function(){$(".impersonateUL").css("padding-left","18px")}})});isImpersonateSession=function(){return document.cookie.indexOf("ImpersonateId=")!=-1};$("body").on("click",".supoortSolutionPopup",function(){return $.magnificPopup.open({items:{src:"/Tickets/TicketEmailPopup?isViewer=false"},type:"iframe",closeOnBgClick:!1,mainClass:"pop700"}),$(".pop700").find("iframe").attr("id","ifrSupportSolution"),$(".pop700").attr("data-html2canvas-ignore","true"),!1});$("body").on("click",".copyToClipboard",function(){var n=$(this),t=$(this).attr("data-text");Helper.Common.copyToClipBoard(t,n)});$("body").on("click",".popCancellationOptions",function(){return $.magnificPopup.open({items:{src:$(this).attr("href")},type:"iframe",closeOnBgClick:!1,mainClass:"popCancellationOptionsMainClass"}),!1});$("body").on("keypress","#frmMembershipSearch",function(n){return kCode=n.keyCode||n.charCode,kCode==13?(membershipList(),!1):void 0});$("body").on("click","#btnClearTxtbox",function(){$("#txtMembershipSearch").val("");membershipList()});$("body").on("click","#btnSearchGroupType",function(){membershipList()});$("body").on("click",".popManualRenewal",function(){var n=$(this).attr("data-isautopayer"),t=$(this).attr("data-isACHPayment");if(n&&n.toLocaleLowerCase()=="true")DisplayCardOnFile($(this).attr("data-href"),t);else return ManualRenewalPopup($(this).attr("data-href")),!1});$("body").on("click",".btnPendingInvoiceRetryPayment",function(){var n=$(this).attr("data-customerMembershipId");$.confirm({title:"Retry Payment",content:"<p>The Retry Payment will just check, whether the pending payment has received or not.<\/p>",type:"green",useBootstrap:!0,buttons:{YES:{btnClass:"btn-success",action:function(){retryPendingInvoicePayments(n)}},NO:{btnClass:"btn-warning"}}})});$("body").on("click",".btnPendingInvoiceManualPayment",function(){var n=$(this).attr("data-customerMembershipId");if(!isValidPayNowForSeleted())return!1;$.confirm({title:"Pay Manually",content:"<p>It will deactivate your current payment profile. It allows paying manually all the pending selected invoices.<\/p>",type:"red",useBootstrap:!0,buttons:{YES:{btnClass:"btn-red",action:function(){retryPendingInvoicePayments(n,!0)}},NO:{btnClass:"btn-warning"}}})});$("body").on("click",".showMoreFaculty",function(){var n=$(this);n.closest(".facultyList").find(".moreFacultyList").toggleClass("hidden");n.closest(".facultyList").find(".moreFacultyList").hasClass("hidden")?n.text("+ More"):n.text("- Less")});$("body").on("click",".previewInfo",function(){$.alert({title:"Preview Viewer",content:$(".clsPreviewTextModel").html(),useBootstrap:!1,boxWidth:"800px",backgroundDismiss:!0,buttons:{cancel:{text:"Close",btnClass:"btn-default"}}})});
var isAction,isLargeCalender,renderFullCalendar,getEventData,getHolidayData;if($("#largeCalender").length>0){isAction=!1;isLargeCalender=!0;$(document).ready(function(){var t={events_source:eventSourceFunctionForCalender,view:calview,tmpl_path:"/Themes/New/Content/tmpls/",tmpl_cache:!1,day:calstartdate,onAfterEventsLoad:function(n){!n},onAfterViewLoad:function(n){$("#divCalenderProgress").hide();$("#calbuttons .btn-group button").removeClass("active");$('button[data-calendar-view="'+n+'"]').addClass("active")},classes:{months:{general:"label"}}},n;n=calview!="day"?$("#largeCalender").calendar(t):$("#largeCalender").calendar(t);$("#divProgress").hide();$(".btn-group button[data-calendar-nav]").each(function(){var t=$(this);t.click(function(){n.navigate(t.data("calendar-nav"))})});$(".btn-group button[data-calendar-view]").each(function(){var t=$(this);t.click(function(){calview=t.data("calendar-view");n.view(t.data("calendar-view"))})})});function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function eventSourceFunctionForCalender(n,t){var i=moment(n).format("YYYY-MM-DD"),u=moment(t).format("YYYY-MM-DD"),r;return calstartdate=i,r="?producttype="+encodeURIComponent(calproductType!=undefined?calproductType:"")+"&category="+encodeURIComponent(calCategory!=undefined?calCategory:"")+"&startdate="+encodeURIComponent(i)+"&enddate="+encodeURIComponent(u)+"&calview="+encodeURIComponent(calview)+"&toff="+encodeURIComponent(moment(n).format("Z"))+"&speakerIds="+encodeURIComponent(speaker!=undefined?speaker:""),loadCalenderData("/calendar/largeCalender"+r)}function loadCalenderData(n){var t=[];return $.ajax({url:n,async:!1,global:!1,success:function(n){$(".clsCalenderTitle").html(n.caltitle);t=n.returnArray},error:function(){}}),t}}if($(".ajax-outlook-fullCalendar").length>0){var isAction=!1,isLargeCalender=!0,ajaxCalendar=$(".ajax-outlook-fullCalendar");$(document).ready(function(){renderFullCalendar()});renderFullCalendar=function(){$(ajaxCalendar).fullCalendar({header:{center:"",right:"",left:""},defaultDate:calstartdate,events:function(n,t,i,r){return initEventSourceFunction(r)},defaultView:calview,viewRender:function(n){$("#calbuttons .btn-group button").removeClass("active");$('button[data-calendar-view="'+n.type+'"]').addClass("active");initEventSourceFunction(null)},eventAfterAllRender:function(n){var t,i,r,u,f;if($('*[data-toggle="tooltip"]').tooltip({container:"body"}),t=[],t=getHolidayData(holidayArray),t!=undefined&&t!=null&&t.length>0)for(r=0;r<t.length;r++)i=moment.unix(t[r].HolidayDate/1e3).tz("UTC"),n.name=="month"?($("td[data-date="+i.format("YYYY-MM-DD")+"]").addClass("holiday"),$("td.fc-day-number[data-date="+i.format("YYYY-MM-DD")+"]").append('<span class="holidaytooltip">'+t[r].HolidayName+"<\/span>")):n.name=="agendaWeek"?(u=moment.unix(t[r].HolidayDate/1e3).tz("UTC"),f=$("th:contains(' "+u.format("M/D")+"')").attr("class"),f!=null&&($("td[data-date="+i.format("YYYY-MM-DD")+"]").addClass("holiday"),$("td[data-date="+i.format("YYYY-MM-DD")+"]:first").append('<span class="holidaytooltip">'+t[r].HolidayName+"<\/span>"),$("th:contains(' "+u.format("M/D")+"')").addClass("holiday"))):n.name=="agendaDay"&&i.format("YYYY-MM-DD")==$(ajaxCalendar).fullCalendar("getDate").format("YYYY-MM-DD")&&($("th[data-date="+i.format("YYYY-MM-DD")+"]").append(" - <span class='holidayheader'>"+t[r].HolidayName+"<\/span>"),$("td[data-date="+i.format("YYYY-MM-DD")+"]").addClass("holiday"))},eventRender:function(n,t){!n.description==""&&t.find(".fc-content").append("<br/><span class='fc-description'>"+n.description+"<\/span>");!n.time==""&&t.find(".fc-content").prepend("<span class='fc-time'>"+n.time+"<\/span><br/>");!n.showmoonIcon==""&&t.find(".fc-content").prepend(n.showmoonIcon+"&nbsp;");var i=title="<h4>"+n.title+"<\/h4><div>Type: "+n.producttype+"<\/div><div>Time: "+moment.unix(n.start/1e3).tz("TC").format("MM/DD/YYYY hh:mm A")+" "+n.startTimeZone+"<\/div><div>"+n.price+"<\/div>";n.venuedetail&&n.venuedetail!=""&&(i+="<div>Venue: "+n.venuedetail+"<\/div>");$(t).attr("title",i);$(t).attr("data-toggle","tooltip");$(t).attr("data-html","true")},windowResize:function(){$(ajaxCalendar).fullCalendar("render")},dayClick:function(n){isAction=!0;calview="agendaDay";eventSourceFunctionForOutlookCalender(n,n,null)},contentHeight:"auto"})};$(".btn-group button[data-calendar-nav]").click(function(){var n=$(this);isAction=!0;$(ajaxCalendar).fullCalendar(n.data("calendar-nav"))});$(".btn-group button[data-calendar-view]").click(function(){var n=$(this);isAction=!0;calview=n.data("calendar-view");$(ajaxCalendar).fullCalendar("changeView",n.data("calendar-view"));$(this).closest(".btn-group").find(".active").removeClass("active");$(this).addClass("active")});function initEventSourceFunction(n){var t=$(ajaxCalendar).fullCalendar("getView").intervalEnd.clone(),i=$(ajaxCalendar).fullCalendar("getView").intervalStart,r=t.add(-1,"days");return eventSourceFunctionForOutlookCalender(i,r,n)}function eventSourceFunctionForOutlookCalender(n,t,i){var r=moment(n).format("YYYY-MM-DD"),e=moment(t).format("YYYY-MM-DD"),u,f;return calstartdate=r,u="?producttype="+encodeURIComponent(calproductType!=undefined?calproductType:"")+"&category="+encodeURIComponent(calCategory!=undefined?calCategory:"")+"&startdate="+encodeURIComponent(r)+"&enddate="+encodeURIComponent(e)+"&calview="+encodeURIComponent(calview)+"&toff="+encodeURIComponent(moment(n).format("Z"))+"&speakerIds="+encodeURIComponent(speaker!=undefined?speaker:""),i?(f=loadCalenderData("/calendar/largeCalender"+u),i(getEventData(f))):void 0}getEventData=function(n){var t=[];return n!=undefined&&n.length>0&&$.each(n,function(n,i){t.push({title:i.title,start:i.start,end:i.end,description:i.producttype,time:i.time,className:[i.class],url:i.url,producttype:i.producttype,price:i.price,startTimeZone:i.startTimeZone,showmoonIcon:i.showmoonIcon,venuedetail:i.venueDetail})}),t};getHolidayData=function(n){var t=[];return n!=undefined&&n.length>0&&$.each(n,function(n,i){t.push({HolidayDate:i.HolidayDate,HolidayName:i.HolidayName,TenantId:i.TenantId})}),t};$("body").on("click",".chkProductType,.chkCategory,.chkTopicAreas,#btnSearch,.chkSpeaker",function(){return $("#divProgress").show(),isAction=!0,initEventSourceFunction(null),!1});function loadCalenderData(n){var t=[];return $.ajax({url:n,async:!1,global:!1,success:function(n){$(".clsCalenderTitle").html(n.caltitle);t=n.returnArray},error:function(){}}),t}};
/*!
 * <%= meta.title %> v<%= meta.version %>
 * Docs & License: <%= meta.homepage %>
 * (c) <%= meta.copyright %>
 */
(function(n){typeof define=="function"&&define.amd?define(["jquery","moment"],n):typeof exports=="object"?module.exports=n(require("jquery"),require("moment")):n(jQuery,moment)})(function(n,t){function nt(n){return ri(n,wt)}function du(t){var i={views:t.views||{}},r;return n.each(t,function(t,u){t!="views"&&(n.isPlainObject(u)&&!/(time|duration|interval)$/i.test(t)&&n.inArray(t,wt)==-1?(r=null,n.each(u,function(n,u){/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(n)?(i.views[n]||(i.views[n]={}),i.views[n][t]=u):(r||(r={}),r[n]=u)}),r&&(i[t]=r)):i[t]=u)}),i}function bi(n,t){t.left&&n.css({"border-left-width":1,"margin-left":t.left-1});t.right&&n.css({"border-right-width":1,"margin-right":t.right-1})}function ki(n){n.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function ut(){n("body").addClass("fc-not-allowed")}function ft(){n("body").removeClass("fc-not-allowed")}function di(t,i,r){var u=Math.floor(i/t.length),e=Math.floor(i-u*(t.length-1)),f=[],o=[],s=[],h=0;gi(t);t.each(function(i,r){var l=i===t.length-1?e:u,c=n(r).outerHeight(!0);c<l?(f.push(r),o.push(c),s.push(n(r).height())):h+=c});r&&(i-=h,u=Math.floor(i/f.length),e=Math.floor(i-u*(f.length-1)));n(f).each(function(t,i){var r=t===f.length-1?e:u,h=o[t],c=s[t],l=r-(h-c);h<r&&n(i).height(l)})}function gi(n){n.height("")}function nr(t){var i=0;return t.find("> span").each(function(t,r){var u=n(r).outerWidth();u>i&&(i=u)}),i++,t.width(i),i}function tr(n,t){var i=n.add(t),r;return i.css({position:"relative",left:-1}),r=n.outerHeight()-t.outerHeight(),i.css({position:"",left:""}),r}function bt(t){var r=t.css("position"),i=t.parents().filter(function(){var t=n(this);return/(auto|scroll)/.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return r==="fixed"||!i.length?n(t[0].ownerDocument||document):i}function kt(n,t){var i=n.offset(),r=i.left-(t?t.left:0),u=i.top-(t?t.top:0);return{left:r,right:r+n.outerWidth(),top:u,bottom:u+n.outerHeight()}}function ir(n,t){var i=n.offset(),r=dt(n),u=i.left+d(n,"border-left-width")+r.left-(t?t.left:0),f=i.top+d(n,"border-top-width")+r.top-(t?t.top:0);return{left:u,right:u+n[0].clientWidth,top:f,bottom:f+n[0].clientHeight}}function gu(n,t){var i=n.offset(),r=i.left+d(n,"border-left-width")+d(n,"padding-left")-(t?t.left:0),u=i.top+d(n,"border-top-width")+d(n,"padding-top")-(t?t.top:0);return{left:r,right:r+n.width(),top:u,bottom:u+n.height()}}function dt(n){var i=n.innerWidth()-n[0].clientWidth,t={left:0,right:0,top:0,bottom:n.innerHeight()-n[0].clientHeight};return nf()&&n.css("direction")=="rtl"?t.left=i:t.right=i,t}function nf(){return et===null&&(et=tf()),et}function tf(){var t=n("<div><div/><\/div>").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),i=t.children(),r=i.offset().left>t.offset().left;return t.remove(),r}function d(n,t){return parseFloat(n.css(t))||0}function rr(n){return n.which==1&&!n.ctrlKey}function c(n){if(n.pageX!==undefined)return n.pageX;var t=n.originalEvent.touches;if(t)return t[0].pageX}function l(n){if(n.pageY!==undefined)return n.pageY;var t=n.originalEvent.touches;if(t)return t[0].pageY}function ur(n){return/^touch/.test(n.type)}function rf(n){n.addClass("fc-unselectable").on("selectstart",ot)}function ot(n){n.preventDefault()}function uf(n){return window.addEventListener?(window.addEventListener("scroll",n,!0),!0):!1}function ff(n){return window.removeEventListener?(window.removeEventListener("scroll",n,!0),!0):!1}function fr(n,t){var i={left:Math.max(n.left,t.left),right:Math.min(n.right,t.right),top:Math.max(n.top,t.top),bottom:Math.min(n.bottom,t.bottom)};return i.left<i.right&&i.top<i.bottom?i:!1}function ef(n,t){return{left:Math.min(Math.max(n.left,t.left),t.right),top:Math.min(Math.max(n.top,t.top),t.bottom)}}function of(n){return{left:(n.left+n.right)/2,top:(n.top+n.bottom)/2}}function sf(n,t){return{left:n.left-t.left,top:n.top-t.top}}function er(t){var f=[],r=[],u,i;for(typeof t=="string"?r=t.split(/\s*,\s*/):typeof t=="function"?r=[t]:n.isArray(t)&&(r=t),u=0;u<r.length;u++)i=r[u],typeof i=="string"?f.push(i.charAt(0)=="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&f.push({func:i});return f}function or(n,t,i){for(var u,r=0;r<i.length;r++)if(u=sr(n,t,i[r]),u)return u;return 0}function sr(n,t,i){return i.func?i.func(n,t):hr(n[i.field],t[i.field])*(i.order||1)}function hr(t,i){return!t&&!i?0:i==null?-1:t==null?1:n.type(t)==="string"||n.type(i)==="string"?String(t).localeCompare(String(i)):t-i}function gt(n,t){var i=n.start,r=n.end,u=t.start,f=t.end,e,o,s,h;if(r>u&&i<f)return i>=u?(e=i.clone(),s=!0):(e=u.clone(),s=!1),r<=f?(o=r.clone(),h=!0):(o=f.clone(),h=!1),{start:e,end:o,isStart:s,isEnd:h}}function cr(n,i){return t.duration({days:n.clone().stripTime().diff(i.clone().stripTime(),"days"),ms:n.time()-i.time()})}function hf(n,i){return t.duration({days:n.clone().stripTime().diff(i.clone().stripTime(),"days")})}function lr(n,i,r){return t.duration(Math.round(n.diff(i,r,!0)),r)}function ti(n,t){for(var r,u,i=0;i<st.length;i++)if(r=st[i],u=cf(r,n,t),u>=1&&v(u))break;return r}function cf(n,i,r){return r!=null?r.diff(i,n,!0):t.isDuration(i)?i.as(n):i.end.diff(i.start,n,!0)}function lf(n,t,i){var r;return b(i)?(t-n)/i:(r=i.asMonths(),Math.abs(r)>=1&&v(r))?t.diff(n,"months",!0)/r:t.diff(n,"days",!0)/i.asDays()}function ii(n,t){var i,r;return b(n)||b(t)?n/t:(i=n.asMonths(),r=t.asMonths(),Math.abs(i)>=1&&v(i)&&Math.abs(r)>=1&&v(r))?i/r:n.asDays()/t.asDays()}function af(n,i){var r;return b(n)?t.duration(n*i):(r=n.asMonths(),Math.abs(r)>=1&&v(r))?t.duration({months:r*i}):t.duration({days:n.asDays()*i})}function b(n){return Boolean(n.hours()||n.minutes()||n.seconds()||n.milliseconds())}function vf(n){return Object.prototype.toString.call(n)==="[object Date]"||n instanceof Date}function ar(n){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(n)}function ri(n,t){var u={},i,r,e,o,f,s;if(t)for(i=0;i<t.length;i++){for(r=t[i],e=[],o=n.length-1;o>=0;o--)if(f=n[o][r],typeof f=="object")e.unshift(f);else if(f!==undefined){u[r]=f;break}e.length&&(u[r]=ri(e))}for(i=n.length-1;i>=0;i--){s=n[i];for(r in s)r in u||(u[r]=s[r])}return u}function ht(n){var t=function(){};return t.prototype=n,new t}function ui(n,t){for(var i in n)yr(n,i)&&(t[i]=n[i])}function yf(n,t){for(var u=["constructor","toString","valueOf"],i,r=0;r<u.length;r++)i=u[r],n[i]!==Object.prototype[i]&&(t[i]=n[i])}function yr(n,t){return vr.call(n,t)}function pf(t){return/undefined|null|boolean|number|string/.test(n.type(t))}function ct(t,i,r){if(n.isFunction(t)&&(t=[t]),t){for(var f,u=0;u<t.length;u++)f=t[u].apply(i,r)||f;return f}}function o(){for(var n=0;n<arguments.length;n++)if(arguments[n]!==undefined)return arguments[n]}function f(n){return(n+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function fi(n){return n.replace(/&.*?;/g,"")}function lt(t){var i=[];return n.each(t,function(n,t){t!=null&&i.push(n+":"+t)}),i.join(";")}function wf(n){return n.charAt(0).toUpperCase()+n.slice(1)}function bf(n,t){return n-t}function v(n){return n%1==0}function k(n,t){var i=n[t];return function(){return i.apply(n,arguments)}}function at(n,t,i){var r,u,f,o,e,s=function(){var h=+new Date-o;h<t?r=setTimeout(s,t-h):(r=null,i||(e=n.apply(f,u),f=u=null))};return function(){f=this;u=arguments;o=+new Date;var h=i&&!r;return r||(r=setTimeout(s,t)),h&&(e=n.apply(f,u),f=u=null),e}}function ei(t,i){if(t&&t.then&&t.state()!=="resolved"){if(i)return t.then(i)}else return n.when(i())}function hi(i,r,u){var f=i[0],h=i.length==1&&typeof f=="string",o,s,c,e;return t.isMoment(f)?(e=t.apply(null,i),wr(f,e)):vf(f)||f===undefined?e=t.apply(null,i):(o=!1,s=!1,h?kf.test(f)?(f+="-01",i=[f],o=!0,s=!0):(c=df.exec(f))&&(o=!c[5],s=!0):n.isArray(f)&&(s=!0),e=r||o?t.utc.apply(t,i):t.apply(null,i),o?(e._ambigTime=!0,e._ambigZone=!0):u&&(s?e._ambigZone=!0:h&&(e.utcOffset?e.utcOffset(f):e.zone(f)))),e._fullCalendar=!0,e}function ci(n,r){for(var o=!1,s=!1,h=n.length,e=[],u,f=0;f<h;f++)u=n[f],t.isMoment(u)||(u=i.moment.parseZone(u)),o=o||u._ambigTime,s=s||u._ambigZone,e.push(u);for(f=0;f<h;f++)u=e[f],r||!o||u._ambigTime?s&&!u._ambigZone&&(e[f]=u.clone().stripZone()):e[f]=u.clone().stripTime();return e}function wr(n,t){n._ambigTime?t._ambigTime=!0:t._ambigTime&&(t._ambigTime=!1);n._ambigZone?t._ambigZone=!0:t._ambigZone&&(t._ambigZone=!1)}function br(n,t){n.year(t[0]||0).month(t[1]||0).date(t[2]||0).hours(t[3]||0).minutes(t[4]||0).seconds(t[5]||0).milliseconds(t[6]||0)}function y(n,t){return e.format.call(n,t)}function gf(n,t){return kr(n,tu(t))}function kr(n,t){for(var r="",i=0;i<t.length;i++)r+=ai(n,t[i]);return r}function ai(n,t){var i,r;return typeof t=="string"?t:(i=t.token)?li[i]?li[i](n):y(n,i):t.maybe&&(r=kr(n,t.maybe),r.match(/[1-9]/))?r:""}function dr(n,t,r,u,f){var e;return n=i.moment.parseZone(n),t=i.moment.parseZone(t),e=(n.localeData||n.lang).call(n),r=e.longDateFormat(r)||r,u=u||" - ",ne(n,t,tu(r),u,f)}function ne(n,t,i,r,u){for(var a=n.clone().stripZone(),v=t.clone().stripZone(),f,y="",o,l="",s,h="",c="",p="",e=0;e<i.length;e++){if(f=nu(n,t,a,v,i[e]),f===!1)break;y+=f}for(o=i.length-1;o>e;o--){if(f=nu(n,t,a,v,i[o]),f===!1)break;l=f+l}for(s=e;s<=o;s++)h+=ai(n,i[s]),c+=ai(t,i[s]);return(h||c)&&(p=u?c+r+h:h+r+c),y+p+l}function nu(n,t,i,r,u){var f,e;return typeof u=="string"?u:(f=u.token)&&(e=gr[f.charAt(0)],e&&i.isSame(r,e))?y(n,f):!1}function tu(n){return n in vt?vt[n]:vt[n]=iu(n)}function iu(n){for(var i=[],r=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g,t;t=r.exec(n);)t[1]?i.push(t[1]):t[2]?i.push({maybe:iu(t[2])}):t[3]?i.push({token:t[3]}):t[5]&&i.push(t[5]);return i}function s(){}function te(n,t){var i;return yr(t,"constructor")&&(i=t.constructor),typeof i!="function"&&(i=t.constructor=function(){n.apply(this,arguments)}),i.prototype=ht(n.prototype),ui(t,i.prototype),yf(t,i.prototype),ui(n,i),i}function ru(n,t){ui(t,n.prototype)}function eu(n,t){return!n&&!t?!0:n&&t?n.component===t.component&&ou(n,t)&&ou(t,n):!1}function ou(n,t){for(var i in n)if(!/^(component|left|right|top|bottom)$/.test(i)&&n[i]!==t[i])return!1;return!0}function hu(n){var t=cu(n);return t==="background"||t==="inverse-background"}function re(n){return cu(n)==="inverse-background"}function cu(n){return o((n.source||{}).rendering,n.rendering)}function ue(n){for(var r={},i,t=0;t<n.length;t++)i=n[t],(r[i._id]||(r[i._id]=[])).push(i);return r}function fe(n,t){return n.start-t.start}function ee(r){var e=i.dataAttrPrefix,u,f,o,s;return e&&(e+="-"),u=r.data(e+"event")||null,u&&(u=typeof u=="object"?n.extend({},u):{},f=u.start,f==null&&(f=u.time),o=u.duration,s=u.stick,delete u.start,delete u.time,delete u.duration,delete u.stick),f==null&&(f=r.data(e+"start")),f==null&&(f=r.data(e+"time")),o==null&&(o=r.data(e+"duration")),s==null&&(s=r.data(e+"stick")),f=f!=null?t.duration(f):null,o=o!=null?t.duration(o):null,s=Boolean(s),{eventProps:u,startTime:f,duration:o,stick:s}}function oe(n,t){for(var r,i=0;i<t.length;i++)if(r=t[i],r.leftCol<=n.rightCol&&r.rightCol>=n.leftCol)return!0;return!1}function se(n,t){return n.leftCol-t.leftCol}function he(n){for(var i=[],u,t,r=0;r<n.length;r++){for(u=n[r],t=0;t<i.length;t++)if(!au(u,i[t]).length)break;u.level=t;(i[t]||(i[t]=[])).push(u)}return i}function ce(n){for(var f,i,r,u,t=0;t<n.length;t++)for(f=n[t],i=0;i<f.length;i++)for(r=f[i],r.forwardSegs=[],u=t+1;u<n.length;u++)au(r,n[u],r.forwardSegs)}function lu(n){var u=n.forwardSegs,i=0,t,r;if(n.forwardPressure===undefined){for(t=0;t<u.length;t++)r=u[t],lu(r),i=Math.max(i,1+r.forwardPressure);n.forwardPressure=i}}function au(n,t,i){i=i||[];for(var r=0;r<t.length;r++)le(n,t[r])&&i.push(t[r]);return i}function le(n,t){return n.bottom>t.top&&n.top<t.bottom}function ae(r,u){function nt(n){"_locale"in n?n._locale=c:n._lang=c}function bt(){l?y()&&(et(),h()):kt()}function kt(){r.addClass("fc");f.bindOption("theme",function(n){wt=n?"ui":"fc";r.toggleClass("ui-widget",n);r.toggleClass("fc-unthemed",!n)});f.bindOptions(["isRTL","lang"],function(n){r.toggleClass("fc-ltr",!n);r.toggleClass("fc-rtl",n)});l=n("<div class='fc-view-container'/>").prependTo(r);s=f.header=new we(f);rt();h(f.options.defaultView);f.options.handleWindowResize&&(w=at(ni,f.options.windowResizeDelay),n(window).resize(w))}function rt(){s.render();s.el&&r.prepend(s.el)}function dt(){e&&e.removeElement();s.removeElement();l.remove();r.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget");w&&n(window).unbind("resize",w)}function y(){return r.is(":visible")}function h(t,i){v++;e&&t&&e.type!==t&&(k(),ut());!e&&t&&(e=f.view=d[t]||(d[t]=f.instantiateView(t)),e.setElement(n("<div class='fc-view fc-"+t+"-view' />").appendTo(l)),s.activateButton(t));e&&(o=e.massageCurrentDate(o),e.displaying&&o.isWithin(e.intervalStart,e.intervalEnd)||y()&&(e.display(o,i),p(),fi(),ei(),ii()));p();v--}function ut(){s.deactivateButton(e.type);e.removeElement();e=f.view=null}function gt(){v++;k();var n=e.type,t=e.queryScroll();ut();h(n,t);p();v--}function ft(n){if(y())return n&&ot(),v++,e.updateSize(!0),v--,!0}function et(){y()&&ot()}function ot(){var t=f.options.contentHeight,n=f.options.height;a=typeof t=="number"?t:typeof t=="function"?t():typeof n=="number"?n-g():typeof n=="function"?n()-g():n==="parent"?r.parent().height()-g():Math.round(l.width()/Math.max(f.options.aspectRatio,.5))}function g(){return s.el?s.el.outerHeight(!0):0}function ni(n){!v&&n.target===window&&e.start&&ft(!0)&&e.trigger("windowResize",tt)}function st(){ct()}function ti(n){pt(f.getEventSourcesByMatchArray(n))}function b(){y()&&(k(),e.displayEvents(it),p())}function ii(){!f.options.lazyFetching||vt(e.start,e.end)?ct():b()}function ct(){yt(e.start,e.end)}function ri(n){it=n;b()}function ui(){b()}function fi(){s.updateTitle(e.title)}function ei(){var n=f.getNow();n.isWithin(e.intervalStart,e.intervalEnd)?s.disableButton("today"):s.enableButton("today")}function oi(){e.select(f.buildSelectSpan.apply(f,arguments))}function si(){e&&e.unselect()}function hi(){o=e.computePrevDate(o);h()}function ci(){o=e.computeNextDate(o);h()}function li(){o.add(-1,"years");h()}function ai(){o.add(1,"years");h()}function vi(){o=f.getNow();h()}function yi(n){o=f.moment(n).stripZone();h()}function pi(n){o.add(t.duration(n));h()}function wi(n,t){var i;t=t||"day";i=f.getViewSpec(t)||f.getUnitViewSpec(t);o=n.clone();h(i?i.type:null)}function bi(){return f.applyTimezone(o)}function k(){l.css({width:"100%",height:l.height(),overflow:"hidden"})}function p(){l.css({width:"",height:"",overflow:""})}function ki(){return f}function di(){return e}function gi(n,t){var i;if(typeof n=="string"){if(t===undefined)return f.options[n];i={};i[n]=t;lt(i)}else typeof n=="object"&&lt(n)}function lt(n){var i=0;for(var t in n)f.dynamicOverrides[t]=n[t];f.viewSpecCache={};f.populateOptionsHash();for(t in n)f.triggerOptionHandlers(t),i++;if(i===1){if(t==="height"||t==="contentHeight"||t==="aspectRatio"){ft(!0);return}if(t==="defaultDate")return;if(t==="businessHours"){e&&(e.unrenderBusinessHours(),e.renderBusinessHours());return}if(t==="timezone"){f.rezoneArrayEventSources();st();return}}rt();d={};gt()}function nr(n,t){var i=Array.prototype.slice.call(arguments,2);return t=t||tt,this.triggerWith(n,t,i),f.options[n]?f.options[n].apply(t,i):void 0}var f=this,c;f.render=bt;f.destroy=dt;f.refetchEvents=st;f.refetchEventSources=ti;f.reportEvents=ri;f.reportEventChange=ui;f.rerenderEvents=b;f.changeView=h;f.select=oi;f.unselect=si;f.prev=hi;f.next=ci;f.prevYear=li;f.nextYear=ai;f.today=vi;f.gotoDate=yi;f.incrementDate=pi;f.zoomTo=wi;f.getDate=bi;f.getCalendar=ki;f.getView=di;f.option=gi;f.trigger=nr;f.dynamicOverrides={};f.viewSpecCache={};f.optionHandlers={};f.overrides=du(u||{});f.populateOptionsHash();f.bindOptions(["lang","monthNames","monthNamesShort","dayNames","dayNamesShort","firstDay","weekNumberCalculation"],function(n,t,i,r,u,f,e){if(c=ht(pu(n)),t&&(c._months=t),i&&(c._monthsShort=i),r&&(c._weekdays=r),u&&(c._weekdaysShort=u),f!=null){var s=ht(c._week);s.dow=f;c._week=s}e==="iso"&&(e="ISO");(e==="ISO"||e==="local"||typeof e=="function")&&(c._fullCalendar_weekCalc=e);o&&nt(o)});f.defaultAllDayEventDuration=t.duration(f.options.defaultAllDayEventDuration);f.defaultTimedEventDuration=t.duration(f.options.defaultTimedEventDuration);f.moment=function(){var n;return f.options.timezone==="local"?(n=i.moment.apply(null,arguments),n.hasTime()&&n.local()):n=f.options.timezone==="UTC"?i.moment.utc.apply(null,arguments):i.moment.parseZone.apply(null,arguments),nt(n),n};f.getIsAmbigTimezone=function(){return f.options.timezone!=="local"&&f.options.timezone!=="UTC"};f.applyTimezone=function(n){if(!n.hasTime())return n.clone();var t=f.moment(n.toArray()),r=n.time()-t.time(),i;return r&&(i=t.clone().add(r),n.time()-i.time()==0&&(t=i)),t};f.getNow=function(){var n=f.options.now;return typeof n=="function"&&(n=n()),f.moment(n).stripZone()};f.getEventEnd=function(n){return n.end?n.end.clone():f.getDefaultEventEnd(n.allDay,n.start)};f.getDefaultEventEnd=function(n,t){var i=t.clone();return n?i.stripTime().add(f.defaultAllDayEventDuration):i.add(f.defaultTimedEventDuration),f.getIsAmbigTimezone()&&i.stripZone(),i};f.humanizeDuration=function(n){return(n.locale||n.lang).call(n,f.options.lang).humanize()};be.call(f);var vt=f.isFetchNeeded,yt=f.fetchEvents,pt=f.fetchEventSources,tt=r[0],s,l,wt,e,d={},a,w,v=0,it=[],o;o=f.options.defaultDate!=null?f.moment(f.options.defaultDate).stripZone():f.getNow();f.getSuggestedViewHeight=function(){return a===undefined&&et(),a};f.isHeightAuto=function(){return f.options.contentHeight==="auto"||f.options.height==="auto"};f.freezeContentHeight=k;f.unfreezeContentHeight=p;f.initialize()}function yu(t){n.each(pe,function(n,i){t[n]==null&&(t[n]=i(t))})}function pu(n){var i=t.localeData||t.langData;return i.call(t,n)||i.call(t,"en")}function we(t){function h(){var u=t.options,f=u.header;i=u.theme?"ui":"fc";f?(r?r.empty():r=this.el=n("<div class='fc-toolbar'/>"),r.append(o("left")).append(o("right")).append(o("center")).append('<div class="fc-clear"/>')):s()}function s(){r&&(r.remove(),r=u.el=null)}function o(r){var o=n('<div class="fc-'+r+'"/>'),u=t.options,s=u.header[r];return s&&n.each(s.split(" "),function(){var r=n(),h=!0,s;n.each(this.split(","),function(o,s){var l,p,a,v,y,w,b,k,d,c;s=="title"?(r=r.add(n("<h2>&nbsp;<\/h2>")),h=!1):((l=(u.customButtons||{})[s])?(a=function(n){l.click&&l.click.call(c[0],n)},v="",y=l.text):(p=t.getViewSpec(s))?(a=function(){t.changeView(s)},e.push(s),v=p.buttonTextOverride,y=p.buttonTextDefault):t[s]&&(a=function(){t[s]()},v=(t.overrides.buttonText||{})[s],y=u.buttonText[s]),a&&(w=l?l.themeIcon:u.themeButtonIcons[s],b=l?l.icon:u.buttonIcons[s],k=v?f(v):w&&u.theme?"<span class='ui-icon ui-icon-"+w+"'><\/span>":b&&!u.theme?"<span class='fc-icon fc-icon-"+b+"'><\/span>":f(y),d=["fc-"+s+"-button",i+"-button",i+"-state-default"],c=n('<button type="button" class="'+d.join(" ")+'">'+k+"<\/button>").click(function(n){c.hasClass(i+"-state-disabled")||(a(n),(c.hasClass(i+"-state-active")||c.hasClass(i+"-state-disabled"))&&c.removeClass(i+"-state-hover"))}).mousedown(function(){c.not("."+i+"-state-active").not("."+i+"-state-disabled").addClass(i+"-state-down")}).mouseup(function(){c.removeClass(i+"-state-down")}).hover(function(){c.not("."+i+"-state-active").not("."+i+"-state-disabled").addClass(i+"-state-hover")},function(){c.removeClass(i+"-state-hover").removeClass(i+"-state-down")}),r=r.add(c)))});h&&r.first().addClass(i+"-corner-left").end().last().addClass(i+"-corner-right").end();r.length>1?(s=n("<div/>"),h&&s.addClass("fc-button-group"),s.append(r),o.append(s)):o.append(r)}),o}function c(n){r&&r.find("h2").text(n)}function l(n){r&&r.find(".fc-"+n+"-button").addClass(i+"-state-active")}function a(n){r&&r.find(".fc-"+n+"-button").removeClass(i+"-state-active")}function v(n){r&&r.find(".fc-"+n+"-button").prop("disabled",!0).addClass(i+"-state-disabled")}function y(n){r&&r.find(".fc-"+n+"-button").prop("disabled",!1).removeClass(i+"-state-disabled")}function p(){return e}var u=this,r,e,i;u.render=h;u.removeElement=s;u.updateTitle=c;u.activateButton=l;u.deactivateButton=a;u.disableButton=v;u.enableButton=y;u.getViewsWithButtons=p;u.el=null;e=[]}function be(){function vt(n,t){return!e||n<e||t>s}function yt(n,t){e=n;s=t;p(f,"reset")}function p(n,t){var i,r;for(t==="reset"?u=[]:t!=="add"&&(u=ut(u,n)),i=0;i<n.length;i++)r=n[i],r._status!=="pending"&&y++,r._fetchId=(r._fetchId||0)+1,r._status="pending";for(i=0;i<n.length;i++)r=n[i],wt(r,r._fetchId)}function wt(t,i){g(t,function(r){var s=n.isArray(t.events),f,e,o;if(i===t._fetchId&&t._status!=="rejected"){if(t._status="resolved",r)for(f=0;f<r.length;f++)e=r[f],o=s?e:h(e,t),o&&u.push.apply(u,a(o));d()}})}function bt(n){var t=n._status==="pending";n._status="rejected";t&&d()}function d(){y--;y||c(u)}function g(t,u){for(var a=i.sourceFetchers,c,f,v,h=0;h<a.length;h++){if(c=a[h].call(r,t,e.clone(),s.clone(),r.options.timezone,u),c===!0)return;if(typeof c=="object"){g(c,u);return}}if(f=t.events,f)n.isFunction(f)?(r.pushLoading(),f.call(r,e.clone(),s.clone(),r.options.timezone,function(n){u(n);r.popLoading()})):n.isArray(f)?u(f):u();else if(v=t.url,v){var w=t.success,b=t.error,k=t.complete,d=n.isFunction(t.data)?t.data():t.data;var l=n.extend({},d||{}),y=o(t.startParam,r.options.startParam),p=o(t.endParam,r.options.endParam),nt=o(t.timezoneParam,r.options.timezoneParam);y&&(l[y]=e.format());p&&(l[p]=s.format());r.options.timezone&&r.options.timezone!="local"&&(l[nt]=r.options.timezone);r.pushLoading();n.ajax(n.extend({},wu,t,{data:l,success:function(t){t=t||[];var i=ct(w,this,arguments);n.isArray(i)&&(t=i);u(t)},error:function(){ct(b,this,arguments);u()},complete:function(){ct(k,this,arguments);r.popLoading()}}))}else u()}function kt(n){var t=nt(n);t&&(f.push(t),p([t],"add"))}function nt(t){var e=i.sourceNormalizers,u,f;if(n.isFunction(t)||n.isArray(t)?u={events:t}:typeof t=="string"?u={url:t}:typeof t=="object"&&(u=n.extend({},t)),u){for(u.className?typeof u.className=="string"&&(u.className=u.className.split(/\s+/)):u.className=[],n.isArray(u.events)&&(u.origArray=u.events,u.events=n.map(u.events,function(n){return h(n,u)})),f=0;f<e.length;f++)e[f].call(r,u);return u}}function dt(n){w(b(n))}function gt(n){n==null?w(f,!0):w(it(n))}function w(t,i){for(var r=0;r<t.length;r++)bt(t[r]);i?(f=[],u=[]):(f=n.grep(f,function(n){for(r=0;r<t.length;r++)if(n===t[r])return!1;return!0}),u=ut(u,t));c(u)}function ni(){return f.slice(1)}function tt(t){return n.grep(f,function(n){return n.id&&n.id===t})[0]}function it(t){t?n.isArray(t)||(t=[t]):t=[];for(var r=[],i=0;i<t.length;i++)r.push.apply(r,b(t[i]));return r}function b(t){for(var i,r=0;r<f.length;r++)if(i=f[r],i===t)return[i];return(i=tt(t),i)?[i]:n.grep(f,function(n){return ti(t,n)})}function ti(n,t){return n&&t&&rt(n)==rt(t)}function rt(n){return(typeof n=="object"?n.origArray||n.googleCalendarId||n.url||n.events:null)||n}function ut(t,i){return n.grep(t,function(n){for(var t=0;t<i.length;t++)if(n.source===i[t])return!1;return!0})}function ii(n){n.start=r.moment(n.start);n.end=n.end?r.moment(n.end):null;st(n,ri(n));c(u)}function ri(t){var i={};return n.each(t,function(n,t){ft(n)&&t!==undefined&&pf(t)&&(i[n]=t)}),i}function ft(n){return!/^_|^(id|allDay|start|end)$/.test(n)}function ui(n,t){var e=h(n),r,f,i;if(e){for(r=a(e),f=0;f<r.length;f++)i=r[f],i.source||(t&&(v.events.push(i),i.source=v),u.push(i));return c(u),r}return[]}function fi(t){var r,i;for(t==null?t=function(){return!0}:n.isFunction(t)||(r=t+"",t=function(n){return n._id==r}),u=n.grep(u,t,!0),i=0;i<f.length;i++)n.isArray(f[i].events)&&(f[i].events=n.grep(f[i].events,t,!0));c(u)}function k(t){return n.isFunction(t)?n.grep(u,t):t!=null?(t+="",n.grep(u,function(n){return n._id==t})):u}function ei(n){n.start=r.moment(n.start);n.end&&(n.end=r.moment(n.end));pt(n)}function h(i,u){var s={},e,f,h;if(r.options.eventDataTransform&&(i=r.options.eventDataTransform(i)),u&&u.eventDataTransform&&(i=u.eventDataTransform(i)),n.extend(s,i),u&&(s.source=u),s._id=i._id||(i.id===undefined?"_fc"+bu++:i.id+""),s.className=i.className?typeof i.className=="string"?i.className.split(/\s+/):i.className:[],e=i.start||i.date,f=i.end,ar(e)&&(e=t.duration(e)),ar(f)&&(f=t.duration(f)),i.dow||t.isDuration(e)||t.isDuration(f))s.start=e?t.duration(e):null,s.end=f?t.duration(f):null,s._recurring=!0;else{if(e&&(e=r.moment(e),!e.isValid()))return!1;f&&(f=r.moment(f),f.isValid()||(f=null));h=i.allDay;h===undefined&&(h=o(u?u.allDayDefault:undefined,r.options.allDayDefault));et(e,f,h,s)}return r.normalizeEvent(s),s}function et(n,t,i,r){r.start=n;r.end=t;r.allDay=i;l(r);pt(r)}function l(n){ot(n);n.end&&!n.end.isAfter(n.start)&&(n.end=null);n.end||(n.end=r.options.forceEventDuration?r.getDefaultEventEnd(n.allDay,n.start):null)}function ot(n){n.allDay==null&&(n.allDay=!(n.start.hasTime()||n.end&&n.end.hasTime()));n.allDay?(n.start.stripTime(),n.end&&n.end.stripTime()):(n.start.hasTime()||(n.start=r.applyTimezone(n.start.time(0))),n.end&&!n.end.hasTime()&&(n.end=r.applyTimezone(n.end.time(0))))}function a(t,i,r){var a=[],f,v,o,u,h,c,l,y,p;if(i=i||e,r=r||s,t)if(t._recurring){if(v=t.dow)for(f={},o=0;o<v.length;o++)f[v[o]]=!0;for(u=i.clone().stripTime();u.isBefore(r);)(!f||f[u.day()])&&(h=t.start,c=t.end,l=u.clone(),y=null,h&&(l=l.time(h)),c&&(y=u.clone().time(c)),p=n.extend({},t),et(l,y,!h&&!c,p),a.push(p)),u.add(1,"days")}else a.push(t);return a}function st(t,i,u){function v(n,t){return u?lr(n,t,u):i.allDay?hf(n,t):cr(n,t)}var s={},f,h,e,c,o,a;return i=i||{},i.start||(i.start=t.start.clone()),i.end===undefined&&(i.end=t.end?t.end.clone():null),i.allDay==null&&(i.allDay=t.allDay),l(i),f={start:t._start.clone(),end:t._end?t._end.clone():r.getDefaultEventEnd(t._allDay,t._start),allDay:i.allDay},l(f),h=t._end!==null&&i.end===null,e=v(i.start,f.start),i.end?(c=v(i.end,f.end),o=c.subtract(e)):o=null,n.each(i,function(n,t){ft(n)&&t!==undefined&&(s[n]=t)}),a=oi(k(t._id),h,i.allDay,e,o,s),{dateDelta:e,durationDelta:o,undo:a}}function oi(t,i,u,f,e,o){var h=r.getIsAmbigTimezone(),s=[];return f&&!f.valueOf()&&(f=null),e&&!e.valueOf()&&(e=null),n.each(t,function(t,c){var v,a;v={start:c.start.clone(),end:c.end?c.end.clone():null,allDay:c.allDay};n.each(o,function(n){v[n]=c[n]});a={start:c._start,end:c._end,allDay:u};l(a);i?a.end=null:e&&!a.end&&(a.end=r.getDefaultEventEnd(a.allDay,a.start));f&&(a.start.add(f),a.end&&a.end.add(f));e&&a.end.add(e);h&&!a.allDay&&(f||e)&&(a.start.stripZone(),a.end&&a.end.stripZone());n.extend(c,o,a);pt(c);s.push(function(){n.extend(c,v);pt(c)})}),function(){for(var n=0;n<s.length;n++)s[n]()}}function ht(n,t){var i=t.source||{},u=o(t.constraint,i.constraint,r.options.eventConstraint),f=o(t.overlap,i.overlap,r.options.eventOverlap);return at(n,u,f,t)}function si(t,i,r){var f,u;return r&&(f=n.extend({},r,i),u=a(h(f))[0]),u?ht(t,u):lt(t)}function lt(n){return at(n,r.options.selectConstraint,r.options.selectOverlap)}function at(n,t,i,u){var h,c,l,f,e,s;if(t!=null){for(h=hi(t),c=!1,f=0;f<h.length;f++)if(r.spanContainsSpan(h[f],n)){c=!0;break}if(!c)return!1}for(l=r.getPeerEvents(n,u),f=0;f<l.length;f++)if(e=l[f],ci(e,n)&&(i===!1||typeof i=="function"&&!i(e,u)||u&&((s=o(e.overlap,(e.source||{}).overlap),s===!1)||typeof s=="function"&&!s(u,e))))return!1;return!0}function hi(n){return n==="businessHours"?r.getCurrentBusinessHourEvents():typeof n=="object"?a(h(n)):k(n)}function ci(n,t){var i=n.start.clone().stripZone(),u=r.getEventEnd(n).stripZone();return t.start<u&&t.end>i}var r=this;r.isFetchNeeded=vt;r.fetchEvents=yt;r.fetchEventSources=p;r.getEventSources=ni;r.getEventSourceById=tt;r.getEventSourcesByMatchArray=it;r.getEventSourcesByMatch=b;r.addEventSource=kt;r.removeEventSource=dt;r.removeEventSources=gt;r.updateEvent=ii;r.renderEvent=ui;r.removeEvents=fi;r.clientEvents=k;r.mutateEvent=st;r.normalizeEventDates=l;r.normalizeEventTimes=ot;var c=r.reportEvents,v={events:[]},f=[v],e,s,y=0,u=[];n.each((r.options.events?[r.options.events]:[]).concat(r.options.eventSources||[]),function(n,t){var i=nt(t);i&&f.push(i)});r.rezoneArrayEventSources=function(){for(var i,r,t=0;t<f.length;t++)if(i=f[t].events,n.isArray(i))for(r=0;r<i.length;r++)ei(i[r])};r.buildEventFromInput=h;r.expandEvent=a;r.isEventSpanAllowed=ht;r.isExternalSpanAllowed=si;r.isSelectionSpanAllowed=lt;r.getEventCache=function(){return u}}function pt(n){n._allDay=n.allDay;n._start=n.start.clone();n._end=n.end?n.end.clone():null}var i=n.fullCalendar={version:"<%= meta.version %>",internalApiVersion:5},a=i.views={},wt,et,ni,st,vr,li,gr,vt,it,su,p,vi,rt,yi,w,wu,bu,pi;n.fn.fullCalendar=function(t){var u=Array.prototype.slice.call(arguments,1),i=this;return this.each(function(f,e){var s=n(e),o=s.data("fullCalendar"),h;typeof t=="string"?o&&n.isFunction(o[t])&&(h=o[t].apply(o,u),f||(i=h),t==="destroy"&&s.removeData("fullCalendar")):o||(o=new r(s,t),s.data("fullCalendar",o),o.render())}),i};wt=["header","buttonText","buttonIcons","themeButtonIcons"];i.intersectRanges=gt;i.applyAll=ct;i.debounce=at;i.isInt=v;i.htmlEscape=f;i.cssToStr=lt;i.proxy=k;i.capitaliseFirstLetter=wf;i.getOuterRect=kt;i.getClientRect=ir;i.getContentRect=gu;i.getScrollbarWidths=dt;et=null;i.preventDefault=ot;i.intersectRects=fr;i.parseFieldSpecs=er;i.compareByFieldSpecs=or;i.compareByFieldSpec=sr;i.flexibleCompare=hr;i.computeIntervalUnit=ti;i.divideRangeByDuration=lf;i.divideDurationByDuration=ii;i.multiplyDuration=af;i.durationHasTime=b;ni=["sun","mon","tue","wed","thu","fri","sat"];st=["year","month","week","day","hour","minute","second","millisecond"];i.log=function(){var n=window.console;if(n&&n.log)return n.log.apply(n,arguments)};i.warn=function(){var n=window.console;return n&&n.warn?n.warn.apply(n,arguments):i.log.apply(i,arguments)};vr={}.hasOwnProperty;var kf=/^\s*\d{4}-\d\d$/,df=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,u=t.fn,e=n.extend({},u),oi,si,pr;i.moment=function(){return hi(arguments)};i.moment.utc=function(){var n=hi(arguments,!0);return n.hasTime()&&n.utc(),n};i.moment.parseZone=function(){return hi(arguments,!0,!0)};u.clone=function(){var n=e.clone.apply(this,arguments);return wr(this,n),this._fullCalendar&&(n._fullCalendar=!0),n};u.week=u.weeks=function(n){var t=(this._locale||this._lang)._fullCalendar_weekCalc;return n==null&&typeof t=="function"?t(this):t==="ISO"?e.isoWeek.apply(this,arguments):e.week.apply(this,arguments)};u.time=function(n){if(!this._fullCalendar)return e.time.apply(this,arguments);if(n==null)return t.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1;t.isDuration(n)||t.isMoment(n)||(n=t.duration(n));var i=0;return t.isDuration(n)&&(i=Math.floor(n.asDays())*24),this.hours(i+n.hours()).minutes(n.minutes()).seconds(n.seconds()).milliseconds(n.milliseconds())};u.stripTime=function(){var n;return this._ambigTime||(n=this.toArray(),this.utc(),si(this,n.slice(0,3)),this._ambigTime=!0,this._ambigZone=!0),this};u.hasTime=function(){return!this._ambigTime};u.stripZone=function(){var n,t;return this._ambigZone||(n=this.toArray(),t=this._ambigTime,this.utc(),si(this,n),this._ambigTime=t||!1,this._ambigZone=!0),this};u.hasZone=function(){return!this._ambigZone};u.local=function(){var n=this.toArray(),t=this._ambigZone;return e.local.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,t&&pr(this,n),this};u.utc=function(){return e.utc.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,this};n.each(["zone","utcOffset"],function(n,t){e[t]&&(u[t]=function(n){return n!=null&&(this._ambigTime=!1,this._ambigZone=!1),e[t].apply(this,arguments)})});u.format=function(){return this._fullCalendar&&arguments[0]?gf(this,arguments[0]):this._ambigTime?y(this,"YYYY-MM-DD"):this._ambigZone?y(this,"YYYY-MM-DD[T]HH:mm:ss"):e.format.apply(this,arguments)};u.toISOString=function(){return this._ambigTime?y(this,"YYYY-MM-DD"):this._ambigZone?y(this,"YYYY-MM-DD[T]HH:mm:ss"):e.toISOString.apply(this,arguments)};u.isWithin=function(n,t){var i=ci([this,n,t]);return i[0]>=i[1]&&i[0]<i[2]};u.isSame=function(n,t){var r;return this._fullCalendar?t?(r=ci([this,n],!0),e.isSame.call(r[0],r[1],t)):(n=i.moment.parseZone(n),e.isSame.call(this,n)&&Boolean(this._ambigTime)===Boolean(n._ambigTime)&&Boolean(this._ambigZone)===Boolean(n._ambigZone)):e.isSame.apply(this,arguments)};n.each(["isBefore","isAfter"],function(n,t){u[t]=function(n,i){var r;return this._fullCalendar?(r=ci([this,n]),e[t].call(r[0],r[1],i)):e[t].apply(this,arguments)}});oi="_d"in t()&&"updateOffset"in t;si=oi?function(n,i){n._d.setTime(Date.UTC.apply(Date,i));t.updateOffset(n,!1)}:br;pr=oi?function(n,i){n._d.setTime(+new Date(i[0]||0,i[1]||0,i[2]||0,i[3]||0,i[4]||0,i[5]||0,i[6]||0));t.updateOffset(n,!1)}:br;li={t:function(n){return y(n,"a").charAt(0)},T:function(n){return y(n,"A").charAt(0)}};i.formatRange=dr;gr={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"};vt={};i.Class=s;s.extend=function(){for(var i=arguments.length,t,n=0;n<i;n++)t=arguments[n],n<i-1&&ru(this,t);return te(this,t||{})};s.mixin=function(n){ru(this,n)};var uu=i.EmitterMixin={on:function(t,i){var r=function(n,t){return i.apply(t.context||this,t.args||[])};i.guid||(i.guid=n.guid++);r.guid=i.guid;n(this).on(t,r);return this},off:function(t,i){return n(this).off(t,i),this},trigger:function(t){var i=Array.prototype.slice.call(arguments,1);return n(this).triggerHandler(t,{args:i}),this},triggerWith:function(t,i,r){return n(this).triggerHandler(t,{context:i,args:r}),this}},tt=i.ListenerMixin=function(){var t=0;return{listenerId:null,listenTo:function(t,i,r){if(typeof i=="object")for(var u in i)i.hasOwnProperty(u)&&this.listenTo(t,u,i[u]);else if(typeof i=="string")t.on(i+"."+this.getListenerNamespace(),n.proxy(r,this))},stopListeningTo:function(n,t){n.off((t||"")+"."+this.getListenerNamespace())},getListenerNamespace:function(){return this.listenerId==null&&(this.listenerId=t++),"_listener"+this.listenerId}}}(),fu={isIgnoringMouse:!1,delayUnignoreMouse:null,initMouseIgnoring:function(n){this.delayUnignoreMouse=at(k(this,"unignoreMouse"),n||1e3)},tempIgnoreMouse:function(){this.isIgnoringMouse=!0;this.delayUnignoreMouse()},unignoreMouse:function(){this.isIgnoringMouse=!1}},ie=s.extend(tt,{isHidden:!0,options:null,el:null,margin:10,constructor:function(n){this.options=n||{}},show:function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},hide:function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},render:function(){var i=this,t=this.options;this.el=n('<div class="fc-popover"/>').addClass(t.className||"").css({top:0,left:0}).append(t.content).appendTo(t.parentEl);this.el.on("click",".fc-close",function(){i.hide()});t.autoHide&&this.listenTo(n(document),"mousedown",this.documentMousedown)},documentMousedown:function(t){this.el&&!n(t.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide();this.el&&(this.el.remove(),this.el=null);this.stopListeningTo(n(document),"mousedown")},position:function(){var t=this.options,h=this.el.offsetParent().offset(),c=this.el.outerWidth(),l=this.el.outerHeight(),o=n(window),i=bt(this.el),f,e,s,r,u;r=t.top||0;u=t.left!==undefined?t.left:t.right!==undefined?t.right-c:0;i.is(window)||i.is(document)?(i=o,f=0,e=0):(s=i.offset(),f=s.top,e=s.left);f+=o.scrollTop();e+=o.scrollLeft();t.viewportConstrain!==!1&&(r=Math.min(r,f+i.outerHeight()-l-this.margin),r=Math.max(r,f+this.margin),u=Math.min(u,e+i.outerWidth()-c-this.margin),u=Math.max(u,e+this.margin));this.el.css({top:r-h.top,left:u-h.left})},trigger:function(n){this.options[n]&&this.options[n].apply(this,Array.prototype.slice.call(arguments,1))}}),yt=i.CoordCache=s.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(t){this.els=n(t.els);this.isHorizontal=t.isHorizontal;this.isVertical=t.isVertical;this.forcedOffsetParentEl=t.offsetParent?n(t.offsetParent):null},build:function(){var n=this.forcedOffsetParentEl||this.els.eq(0).offsetParent();this.origin=n.offset();this.boundingRect=this.queryBoundingRect();this.isHorizontal&&this.buildElHorizontals();this.isVertical&&this.buildElVerticals()},clear:function(){this.origin=null;this.boundingRect=null;this.lefts=null;this.rights=null;this.tops=null;this.bottoms=null},ensureBuilt:function(){this.origin||this.build()},buildElHorizontals:function(){var t=[],i=[];this.els.each(function(r,u){var f=n(u),e=f.offset().left,o=f.outerWidth();t.push(e);i.push(e+o)});this.lefts=t;this.rights=i},buildElVerticals:function(){var t=[],i=[];this.els.each(function(r,u){var f=n(u),e=f.offset().top,o=f.outerHeight();t.push(e);i.push(e+o)});this.tops=t;this.bottoms=i},getHorizontalIndex:function(n){this.ensureBuilt();for(var i=this.lefts,r=this.rights,u=i.length,t=0;t<u;t++)if(n>=i[t]&&n<r[t])return t},getVerticalIndex:function(n){this.ensureBuilt();for(var i=this.tops,r=this.bottoms,u=i.length,t=0;t<u;t++)if(n>=i[t]&&n<r[t])return t},getLeftOffset:function(n){return this.ensureBuilt(),this.lefts[n]},getLeftPosition:function(n){return this.ensureBuilt(),this.lefts[n]-this.origin.left},getRightOffset:function(n){return this.ensureBuilt(),this.rights[n]},getRightPosition:function(n){return this.ensureBuilt(),this.rights[n]-this.origin.left},getWidth:function(n){return this.ensureBuilt(),this.rights[n]-this.lefts[n]},getTopOffset:function(n){return this.ensureBuilt(),this.tops[n]},getTopPosition:function(n){return this.ensureBuilt(),this.tops[n]-this.origin.top},getBottomOffset:function(n){return this.ensureBuilt(),this.bottoms[n]},getBottomPosition:function(n){return this.ensureBuilt(),this.bottoms[n]-this.origin.top},getHeight:function(n){return this.ensureBuilt(),this.bottoms[n]-this.tops[n]},queryBoundingRect:function(){var n=bt(this.els.eq(0));if(!n.is(document))return ir(n)},isPointInBounds:function(n,t){return this.isLeftInBounds(n)&&this.isTopInBounds(t)},isLeftInBounds:function(n){return!this.boundingRect||n>=this.boundingRect.left&&n<this.boundingRect.right},isTopInBounds:function(n){return!this.boundingRect||n>=this.boundingRect.top&&n<this.boundingRect.bottom}}),h=i.DragListener=s.extend(tt,fu,{options:null,subjectEl:null,subjectHref:null,originX:null,originY:null,scrollEl:null,isInteracting:!1,isDistanceSurpassed:!1,isDelayEnded:!1,isDragging:!1,isTouch:!1,delay:null,delayTimeoutId:null,minDistance:null,handleTouchScrollProxy:null,constructor:function(n){this.options=n||{};this.handleTouchScrollProxy=k(this,"handleTouchScroll");this.initMouseIgnoring(500)},startInteraction:function(t,i){var r=ur(t);if(t.type==="mousedown"){if(this.isIgnoringMouse)return;if(rr(t))t.preventDefault();else return}this.isInteracting||(i=i||{},this.delay=o(i.delay,this.options.delay,0),this.minDistance=o(i.distance,this.options.distance,0),this.subjectEl=this.options.subjectEl,this.isInteracting=!0,this.isTouch=r,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.originX=c(t),this.originY=l(t),this.scrollEl=bt(n(t.target)),this.bindHandlers(),this.initAutoScroll(),this.handleInteractionStart(t),this.startDelay(t),this.minDistance||this.handleDistanceSurpassed(t))},handleInteractionStart:function(n){this.trigger("interactionStart",n)},endInteraction:function(n,t){this.isInteracting&&(this.endDrag(n),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),this.destroyAutoScroll(),this.unbindHandlers(),this.isInteracting=!1,this.handleInteractionEnd(n,t),this.isTouch&&this.tempIgnoreMouse())},handleInteractionEnd:function(n,t){this.trigger("interactionEnd",n,t||!1)},bindHandlers:function(){var i=this,t=1;this.isTouch?(this.listenTo(n(document),{touchmove:this.handleTouchMove,touchend:this.endInteraction,touchcancel:this.endInteraction,touchstart:function(n){t?t--:i.endInteraction(n,!0)}}),!uf(this.handleTouchScrollProxy)&&this.scrollEl&&this.listenTo(this.scrollEl,"scroll",this.handleTouchScroll)):this.listenTo(n(document),{mousemove:this.handleMouseMove,mouseup:this.endInteraction});this.listenTo(n(document),{selectstart:ot,contextmenu:ot})},unbindHandlers:function(){this.stopListeningTo(n(document));ff(this.handleTouchScrollProxy);this.scrollEl&&this.stopListeningTo(this.scrollEl,"scroll")},startDrag:function(n,t){this.startInteraction(n,t);this.isDragging||(this.isDragging=!0,this.handleDragStart(n))},handleDragStart:function(n){this.trigger("dragStart",n);this.initHrefHack()},handleMove:function(n){var t=c(n)-this.originX,i=l(n)-this.originY,r=this.minDistance,u;this.isDistanceSurpassed||(u=t*t+i*i,u>=r*r&&this.handleDistanceSurpassed(n));this.isDragging&&this.handleDrag(t,i,n)},handleDrag:function(n,t,i){this.trigger("drag",n,t,i);this.updateAutoScroll(i)},endDrag:function(n){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(n))},handleDragEnd:function(n){this.trigger("dragEnd",n);this.destroyHrefHack()},startDelay:function(n){var t=this;this.delay?this.delayTimeoutId=setTimeout(function(){t.handleDelayEnd(n)},this.delay):this.handleDelayEnd(n)},handleDelayEnd:function(n){this.isDelayEnded=!0;this.isDistanceSurpassed&&this.startDrag(n)},handleDistanceSurpassed:function(n){this.isDistanceSurpassed=!0;this.isDelayEnded&&this.startDrag(n)},handleTouchMove:function(n){this.isDragging&&n.preventDefault();this.handleMove(n)},handleMouseMove:function(n){this.handleMove(n)},handleTouchScroll:function(n){this.isDragging||this.endInteraction(n,!0)},initHrefHack:function(){var n=this.subjectEl;(this.subjectHref=n?n.attr("href"):null)&&n.removeAttr("href")},destroyHrefHack:function(){var t=this.subjectEl,n=this.subjectHref;setTimeout(function(){n&&t.attr("href",n)},0)},trigger:function(n){this.options[n]&&this.options[n].apply(this,Array.prototype.slice.call(arguments,1));this["_"+n]&&this["_"+n].apply(this,Array.prototype.slice.call(arguments,1))}});h.mixin({isAutoScroll:!1,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var n=this.scrollEl;this.isAutoScroll=this.options.scroll&&n&&!n.is(window)&&!n.is(document);this.isAutoScroll&&this.listenTo(n,"scroll",at(this.handleDebouncedScroll,100))},destroyAutoScroll:function(){this.endAutoScroll();this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},computeScrollBounds:function(){this.isAutoScroll&&(this.scrollBounds=kt(this.scrollEl))},updateAutoScroll:function(n){var t=this.scrollSensitivity,i=this.scrollBounds,r,u,f,e,o=0,s=0;i&&(r=(t-(l(n)-i.top))/t,u=(t-(i.bottom-l(n)))/t,f=(t-(c(n)-i.left))/t,e=(t-(i.right-c(n)))/t,r>=0&&r<=1?o=r*this.scrollSpeed*-1:u>=0&&u<=1&&(o=u*this.scrollSpeed),f>=0&&f<=1?s=f*this.scrollSpeed*-1:e>=0&&e<=1&&(s=e*this.scrollSpeed));this.setScrollVel(o,s)},setScrollVel:function(n,t){this.scrollTopVel=n;this.scrollLeftVel=t;this.constrainScrollVel();(this.scrollTopVel||this.scrollLeftVel)&&!this.scrollIntervalId&&(this.scrollIntervalId=setInterval(k(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var n=this.scrollEl;this.scrollTopVel<0?n.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&n.scrollTop()+n[0].clientHeight>=n[0].scrollHeight&&(this.scrollTopVel=0);this.scrollLeftVel<0?n.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&n.scrollLeft()+n[0].clientWidth>=n[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var n=this.scrollEl,t=this.scrollIntervalMs/1e3;this.scrollTopVel&&n.scrollTop(n.scrollTop()+this.scrollTopVel*t);this.scrollLeftVel&&n.scrollLeft(n.scrollLeft()+this.scrollLeftVel*t);this.constrainScrollVel();this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},endAutoScroll:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},handleDebouncedScroll:function(){this.scrollIntervalId||this.handleScrollEnd()},handleScrollEnd:function(){}});it=h.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(n,t){h.call(this,t);this.component=n},handleInteractionStart:function(n){var r=this.subjectEl,i,u,t;this.computeCoords();n?(u={left:c(n),top:l(n)},t=u,r&&(i=kt(r),t=ef(t,i)),this.origHit=this.queryHit(t.left,t.top),r&&this.options.subjectCenter&&(this.origHit&&(i=fr(this.origHit,i)||i),t=of(i)),this.coordAdjust=sf(t,u)):(this.origHit=null,this.coordAdjust=null);h.prototype.handleInteractionStart.apply(this,arguments)},computeCoords:function(){this.component.prepareHits();this.computeScrollBounds()},handleDragStart:function(n){var t;h.prototype.handleDragStart.apply(this,arguments);t=this.queryHit(c(n),l(n));t&&this.handleHitOver(t)},handleDrag:function(n,t,i){var r;h.prototype.handleDrag.apply(this,arguments);r=this.queryHit(c(i),l(i));eu(r,this.hit)||(this.hit&&this.handleHitOut(),r&&this.handleHitOver(r))},handleDragEnd:function(){this.handleHitDone();h.prototype.handleDragEnd.apply(this,arguments)},handleHitOver:function(n){var t=eu(n,this.origHit);this.hit=n;this.trigger("hitOver",this.hit,t,this.origHit)},handleHitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},handleHitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},handleInteractionEnd:function(){h.prototype.handleInteractionEnd.apply(this,arguments);this.origHit=null;this.hit=null;this.component.releaseHits()},handleScrollEnd:function(){h.prototype.handleScrollEnd.apply(this,arguments);this.computeCoords()},queryHit:function(n,t){return this.coordAdjust&&(n+=this.coordAdjust.left,t+=this.coordAdjust.top),this.component.queryHit(n,t)}});su=s.extend(tt,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(t,i){this.options=i=i||{};this.sourceEl=t;this.parentEl=i.parentEl?n(i.parentEl):t.parent()},start:function(t){this.isFollowing||(this.isFollowing=!0,this.y0=l(t),this.x0=c(t),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),ur(t)?this.listenTo(n(document),"touchmove",this.handleMove):this.listenTo(n(document),"mousemove",this.handleMove))},stop:function(t,i){function f(){r.isAnimating=!1;r.removeElement();r.top0=r.left0=null;i&&i()}var r=this,u=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(n(document)),t&&u&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:u,complete:f})):f())},getEl:function(){var n=this.el;return n||(this.sourceEl.width(),n=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}),n.addClass("fc-unselectable"),n.appendTo(this.parentEl)),n},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var n,t;this.getEl();this.top0===null&&(this.sourceEl.width(),n=this.sourceEl.offset(),t=this.el.offsetParent().offset(),this.top0=n.top-t.top,this.left0=n.left-t.left);this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},handleMove:function(n){this.topDelta=l(n)-this.y0;this.leftDelta=c(n)-this.x0;this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}});p=i.Grid=s.extend(tt,fu,{view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayDragListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(n){this.view=n;this.isRTL=n.opt("isRTL");this.elsByFill={};this.dayDragListener=this.buildDayDragListener();this.initMouseIgnoring()},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(n){this.start=n.start.clone();this.end=n.end.clone();this.rangeUpdated();this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var n=this.view,t,i;this.eventTimeFormat=n.opt("eventTimeFormat")||n.opt("timeFormat")||this.computeEventTimeFormat();t=n.opt("displayEventTime");t==null&&(t=this.computeDisplayEventTime());i=n.opt("displayEventEnd");i==null&&(i=this.computeDisplayEventEnd());this.displayEventTime=t;this.displayEventEnd=i},spanToSegs:function(){},diffDates:function(n,t){return this.largeUnit?lr(n,t,this.largeUnit):cr(n,t)},prepareHits:function(){},releaseHits:function(){},queryHit:function(){},getHitSpan:function(){},getHitEl:function(){},setElement:function(n){this.el=n;rf(n);this.bindDayHandler("touchstart",this.dayTouchStart);this.bindDayHandler("mousedown",this.dayMousedown);this.bindSegHandlers();this.bindGlobalHandlers()},bindDayHandler:function(t,i){var r=this;this.el.on(t,function(t){if(!n(t.target).is(".fc-event-container *, .fc-more"))return i.call(r,t)})},removeElement:function(){this.unbindGlobalHandlers();this.clearDragListeners();this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo(n(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart})},unbindGlobalHandlers:function(){this.stopListeningTo(n(document))},dayMousedown:function(n){this.isIgnoringMouse||this.dayDragListener.startInteraction(n,{})},dayTouchStart:function(n){var t=this.view;(t.isSelected||t.selectedEvent)&&this.tempIgnoreMouse();this.dayDragListener.startInteraction(n,{delay:this.view.opt("longPressDelay")})},buildDayDragListener:function(){var n=this,r=this.view,f=r.opt("selectable"),i,t,u=new it(this,{scroll:r.opt("dragScroll"),interactionStart:function(){i=u.origHit;t=null},dragStart:function(){r.unselect()},hitOver:function(r,u,e){e&&(u||(i=null),f&&(t=n.computeSelection(n.getHitSpan(e),n.getHitSpan(r)),t?n.renderSelection(t):t===!1&&ut()))},hitOut:function(){i=null;t=null;n.unrenderSelection()},hitDone:function(){ft()},interactionEnd:function(u,f){f||(i&&!n.isIgnoringMouse&&r.triggerDayClick(n.getHitSpan(i),n.getHitEl(i),u),t&&r.reportSelection(t,u))}});return u},clearDragListeners:function(){this.dayDragListener.endInteraction();this.segDragListener&&this.segDragListener.endInteraction();this.segResizeListener&&this.segResizeListener.endInteraction();this.externalDragListener&&this.externalDragListener.endInteraction()},renderEventLocationHelper:function(n,t){var i=this.fabricateHelperEvent(n,t);return this.renderHelper(i,t)},fabricateHelperEvent:function(n,t){var i=t?ht(t.event):{};return i.start=n.start.clone(),i.end=n.end?n.end.clone():null,i.allDay=null,this.view.calendar.normalizeEventDates(i),i.className=(i.className||[]).concat("fc-helper"),t||(i.editable=!1),i},renderHelper:function(){},unrenderHelper:function(){},renderSelection:function(n){this.renderHighlight(n)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(n,t){var i=this.computeSelectionSpan(n,t);return i&&!this.view.calendar.isSelectionSpanAllowed(i)?!1:i},computeSelectionSpan:function(n,t){var i=[n.start,n.end,t.start,t.end];return i.sort(bf),{start:i[0].clone(),end:i[3].clone()}},renderHighlight:function(n){this.renderFill("highlight",this.spanToSegs(n))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(){},unrenderNowIndicator:function(){},renderFill:function(){},unrenderFill:function(n){var t=this.elsByFill[n];t&&(t.remove(),delete this.elsByFill[n])},renderFillSegEls:function(t,i){var u=this,f=this[t+"SegEl"],e="",o=[],r;if(i.length){for(r=0;r<i.length;r++)e+=this.fillSegHtml(t,i[r]);n(e).each(function(t,r){var s=i[t],e=n(r);f&&(e=f.call(u,s,e));e&&(e=n(e),e.is(u.fillSegTag)&&(s.el=e,o.push(s)))})}return o},fillSegTag:"div",fillSegHtml:function(n,t){var i=this[n+"SegClasses"],r=this[n+"SegCss"],u=i?i.call(this,t):[],f=lt(r?r.call(this,t):{});return"<"+this.fillSegTag+(u.length?' class="'+u.join(" ")+'"':"")+(f?' style="'+f+'"':"")+" />"},getDayClasses:function(n){var i=this.view,r=i.calendar.getNow(),t=["fc-"+ni[n.day()]];return i.intervalDuration.as("months")==1&&n.month()!=i.intervalStart.month()&&t.push("fc-other-month"),n.isSame(r,"day")?t.push("fc-today",i.highlightStateClass):n<r?t.push("fc-past"):t.push("fc-future"),t}});p.mixin({mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(n){for(var i=[],r=[],t=0;t<n.length;t++)(hu(n[t])?i:r).push(n[t]);this.segs=[].concat(this.renderBgEvents(i),this.renderFgEvents(r))},renderBgEvents:function(n){var t=this.eventsToSegs(n);return this.renderBgSegs(t)||t},renderFgEvents:function(n){var t=this.eventsToSegs(n);return this.renderFgSegs(t)||t},unrenderEvents:function(){this.handleSegMouseout();this.clearDragListeners();this.unrenderFgSegs();this.unrenderBgSegs();this.segs=null},getEventSegs:function(){return this.segs||[]},renderFgSegs:function(){},unrenderFgSegs:function(){},renderFgSegEls:function(t,i){var e=this.view,u="",f=[],r;if(t.length){for(r=0;r<t.length;r++)u+=this.fgSegHtml(t[r],i);n(u).each(function(i,r){var u=t[i],o=e.resolveEventEl(u.event,n(r));o&&(o.data("fc-seg",u),u.el=o,f.push(u))})}return f},fgSegHtml:function(){},renderBgSegs:function(n){return this.renderFill("bgEvent",n)},unrenderBgSegs:function(){this.unrenderFill("bgEvent")},bgEventSegEl:function(n,t){return this.view.resolveEventEl(n.event,t)},bgEventSegClasses:function(n){var t=n.event,i=t.source||{};return["fc-bgevent"].concat(t.className,i.className||[])},bgEventSegCss:function(n){return{"background-color":this.getSegSkinCss(n)["background-color"]}},businessHoursSegClasses:function(){return["fc-nonbusiness","fc-bgevent"]},buildBusinessHourSegs:function(t){var i=this.view.calendar.getCurrentBusinessHourEvents(t);return!i.length&&this.view.calendar.options.businessHours&&(i=[n.extend({},pi,{start:this.view.end,end:this.view.end,dow:null})]),this.eventsToSegs(i)},bindSegHandlers:function(){this.bindSegHandlersToEl(this.el)},bindSegHandlersToEl:function(n){this.bindSegHandlerToEl(n,"touchstart",this.handleSegTouchStart);this.bindSegHandlerToEl(n,"touchend",this.handleSegTouchEnd);this.bindSegHandlerToEl(n,"mouseenter",this.handleSegMouseover);this.bindSegHandlerToEl(n,"mouseleave",this.handleSegMouseout);this.bindSegHandlerToEl(n,"mousedown",this.handleSegMousedown);this.bindSegHandlerToEl(n,"click",this.handleSegClick)},bindSegHandlerToEl:function(t,i,r){var u=this;t.on(i,".fc-event-container > *",function(t){var i=n(this).data("fc-seg");if(i&&!u.isDraggingSeg&&!u.isResizingSeg)return r.call(u,i,t)})},handleSegClick:function(n,t){return this.view.trigger("eventClick",n.el[0],n.event,t)},handleSegMouseover:function(n,t){this.isIgnoringMouse||this.mousedOverSeg||(this.mousedOverSeg=n,n.el.addClass("fc-allow-mouse-resize"),this.view.trigger("eventMouseover",n.el[0],n.event,t))},handleSegMouseout:function(n,t){t=t||{};this.mousedOverSeg&&(n=n||this.mousedOverSeg,this.mousedOverSeg=null,n.el.removeClass("fc-allow-mouse-resize"),this.view.trigger("eventMouseout",n.el[0],n.event,t))},handleSegMousedown:function(n,t){var i=this.startSegResize(n,t,{distance:5});!i&&this.view.isEventDraggable(n.event)&&this.buildSegDragListener(n).startInteraction(t,{distance:5})},handleSegTouchStart:function(n,t){var i=this.view,r=n.event,u=i.isEventSelected(r),f=i.isEventDraggable(r),e=i.isEventResizable(r),o=!1,s;u&&e&&(o=this.startSegResize(n,t));!o&&(f||e)&&(s=f?this.buildSegDragListener(n):this.buildSegSelectListener(n),s.startInteraction(t,{delay:u?0:this.view.opt("longPressDelay")}));this.tempIgnoreMouse()},handleSegTouchEnd:function(){this.tempIgnoreMouse()},startSegResize:function(t,i,r){return n(i.target).is(".fc-resizer")?(this.buildSegResizeListener(t,n(i.target).is(".fc-start-resizer")).startInteraction(i,r),!0):!1},buildSegDragListener:function(n){var r=this,t=this.view,h=t.calendar,s=n.el,u=n.event,o,f,i,e;return this.segDragListener?this.segDragListener:e=this.segDragListener=new it(t,{scroll:t.opt("dragScroll"),subjectEl:s,subjectCenter:!0,interactionStart:function(i){n.component=r;o=!1;f=new su(n.el,{additionalClass:"fc-dragging",parentEl:t.el,opacity:e.isTouch?null:t.opt("dragOpacity"),revertDuration:t.opt("dragRevertDuration"),zIndex:2});f.hide();f.start(i)},dragStart:function(i){e.isTouch&&!t.isEventSelected(u)&&t.selectEvent(u);o=!0;r.handleSegMouseout(n,i);r.segDragStart(n,i);t.hideEvent(u)},hitOver:function(o,s,c){var l;n.hit&&(c=n.hit);i=r.computeEventDrop(c.component.getHitSpan(c),o.component.getHitSpan(o),u);i&&!h.isEventSpanAllowed(r.eventToSpan(i),u)&&(ut(),i=null);i&&(l=t.renderDrag(i,n))?(l.addClass("fc-dragging"),e.isTouch||r.applyDragOpacity(l),f.hide()):f.show();s&&(i=null)},hitOut:function(){t.unrenderDrag();f.show();i=null},hitDone:function(){ft()},interactionEnd:function(e){delete n.component;f.stop(!i,function(){o&&(t.unrenderDrag(),t.showEvent(u),r.segDragStop(n,e));i&&t.reportEventDrop(u,i,this.largeUnit,s,e)});r.segDragListener=null}})},buildSegSelectListener:function(n){var u=this,t=this.view,i=n.event,r;return this.segDragListener?this.segDragListener:r=this.segDragListener=new h({dragStart:function(){r.isTouch&&!t.isEventSelected(i)&&t.selectEvent(i)},interactionEnd:function(){u.segDragListener=null}})},segDragStart:function(n,t){this.isDraggingSeg=!0;this.view.trigger("eventDragStart",n.el[0],n.event,t,{})},segDragStop:function(n,t){this.isDraggingSeg=!1;this.view.trigger("eventDragStop",n.el[0],n.event,t,{})},computeEventDrop:function(n,t,i){var e=this.view.calendar,o=n.start,u=t.start,f,r;return o.hasTime()===u.hasTime()?(f=this.diffDates(u,o),i.allDay&&b(f)?(r={start:i.start.clone(),end:e.getEventEnd(i),allDay:!1},e.normalizeEventTimes(r)):r={start:i.start.clone(),end:i.end?i.end.clone():null,allDay:i.allDay},r.start.add(f),r.end&&r.end.add(f)):r={start:u.clone(),end:null,allDay:!u.hasTime()},r},applyDragOpacity:function(n){var t=this.view.opt("dragOpacity");t!=null&&n.each(function(n,i){i.style.opacity=t})},externalDragStart:function(t,i){var f=this.view,r,u;f.opt("droppable")&&(r=n((i?i.item:null)||t.target),u=f.opt("dropAccept"),(n.isFunction(u)?u.call(r[0],r):r.is(u))&&(this.isDraggingExternal||this.listenToExternalDrag(r,t,i)))},listenToExternalDrag:function(n,t,i){var u=this,e=this.view.calendar,f=ee(n),r,o=u.externalDragListener=new it(this,{interactionStart:function(){u.isDraggingExternal=!0},hitOver:function(n){r=u.computeExternalDrop(n.component.getHitSpan(n),f);r&&!e.isExternalSpanAllowed(u.eventToSpan(r),r,f.eventProps)&&(ut(),r=null);r&&u.renderDrag(r)},hitOut:function(){r=null},hitDone:function(){ft();u.unrenderDrag()},interactionEnd:function(t){r&&u.view.reportExternalDrop(f,r,n,t,i);u.isDraggingExternal=!1;u.externalDragListener=null}});o.startDrag(t)},computeExternalDrop:function(n,t){var r=this.view.calendar,i={start:r.applyTimezone(n.start),end:null};return t.startTime&&!i.start.hasTime()&&i.start.time(t.startTime),t.duration&&(i.end=i.start.clone().add(t.duration)),i},renderDrag:function(){},unrenderDrag:function(){},buildSegResizeListener:function(n,t){var r=this,f=this.view,o=f.calendar,s=n.el,u=n.event,h=o.getEventEnd(u),e,i;return this.segResizeListener=new it(this,{scroll:f.opt("dragScroll"),subjectEl:s,interactionStart:function(){e=!1},dragStart:function(t){e=!0;r.handleSegMouseout(n,t);r.segResizeStart(n,t)},hitOver:function(e,s,c){var l=r.getHitSpan(c),a=r.getHitSpan(e);i=t?r.computeEventStartResize(l,a,u):r.computeEventEndResize(l,a,u);i&&(o.isEventSpanAllowed(r.eventToSpan(i),u)?i.start.isSame(u.start)&&i.end.isSame(h)&&(i=null):(ut(),i=null));i&&(f.hideEvent(u),r.renderEventResize(i,n))},hitOut:function(){i=null},hitDone:function(){r.unrenderEventResize();f.showEvent(u);ft()},interactionEnd:function(t){e&&r.segResizeStop(n,t);i&&f.reportEventResize(u,i,this.largeUnit,s,t);r.segResizeListener=null}})},segResizeStart:function(n,t){this.isResizingSeg=!0;this.view.trigger("eventResizeStart",n.el[0],n.event,t,{})},segResizeStop:function(n,t){this.isResizingSeg=!1;this.view.trigger("eventResizeStop",n.el[0],n.event,t,{})},computeEventStartResize:function(n,t,i){return this.computeEventResize("start",n,t,i)},computeEventEndResize:function(n,t,i){return this.computeEventResize("end",n,t,i)},computeEventResize:function(n,t,i,r){var f=this.view.calendar,o=this.diffDates(i[n],t[n]),u,e;return u={start:r.start.clone(),end:f.getEventEnd(r),allDay:r.allDay},u.allDay&&b(o)&&(u.allDay=!1,f.normalizeEventTimes(u)),u[n].add(o),u.start.isBefore(u.end)||(e=this.minResizeDuration||(r.allDay?f.defaultAllDayEventDuration:f.defaultTimedEventDuration),n=="start"?u.start=u.end.clone().subtract(e):u.end=u.start.clone().add(e)),u},renderEventResize:function(){},unrenderEventResize:function(){},getEventTimeText:function(n,t,i){return(t==null&&(t=this.eventTimeFormat),i==null&&(i=this.displayEventEnd),this.displayEventTime&&n.start.hasTime())?i&&n.end?this.view.formatRange(n,t):n.start.format(t):""},getSegClasses:function(n,t,i){var f=this.view,r=n.event,u=["fc-event",n.isStart?"fc-start":"fc-not-start",n.isEnd?"fc-end":"fc-not-end"].concat(r.className,r.source?r.source.className:[]);return t&&u.push("fc-draggable"),i&&u.push("fc-resizable"),f.isEventSelected(r)&&u.push("fc-selected"),u},getSegSkinCss:function(n){var t=n.event,i=this.view,r=t.source||{},u=t.color,f=r.color,e=i.opt("eventColor");return{"background-color":t.backgroundColor||u||r.backgroundColor||f||i.opt("eventBackgroundColor")||e,"border-color":t.borderColor||u||r.borderColor||f||i.opt("eventBorderColor")||e,color:t.textColor||r.textColor||i.opt("eventTextColor")}},eventToSegs:function(n){return this.eventsToSegs([n])},eventToSpan:function(n){return this.eventToSpans(n)[0]},eventToSpans:function(n){var t=this.eventToRange(n);return this.eventRangeToSpans(t,n)},eventsToSegs:function(t,i){var u=this,f=ue(t),r=[];return n.each(f,function(n,t){for(var e=[],f=0;f<t.length;f++)e.push(u.eventToRange(t[f]));if(re(t[0]))for(e=u.invertRanges(e),f=0;f<e.length;f++)r.push.apply(r,u.eventRangeToSegs(e[f],t[0],i));else for(f=0;f<e.length;f++)r.push.apply(r,u.eventRangeToSegs(e[f],t[f],i))}),r},eventToRange:function(n){return{start:n.start.clone().stripZone(),end:(n.end?n.end.clone():this.view.calendar.getDefaultEventEnd(n.allDay!=null?n.allDay:!n.start.hasTime(),n.start)).stripZone()}},eventRangeToSegs:function(n,t,i){for(var f=this.eventRangeToSpans(n,t),u=[],r=0;r<f.length;r++)u.push.apply(u,this.eventSpanToSegs(f[r],t,i));return u},eventRangeToSpans:function(t){return[n.extend({},t)]},eventSpanToSegs:function(n,t,i){for(var f=i?i(n):this.spanToSegs(n),u,r=0;r<f.length;r++)u=f[r],u.event=t,u.eventStartMS=+n.start,u.eventDurationMS=n.end-n.start;return f},invertRanges:function(n){var f=this.view,o=f.start.clone(),e=f.end.clone(),u=[],t=o,i,r;for(n.sort(fe),i=0;i<n.length;i++)r=n[i],r.start>t&&u.push({start:t,end:r.start}),t=r.end;return t<e&&u.push({start:t,end:e}),u},sortEventSegs:function(n){n.sort(k(this,"compareEventSegs"))},compareEventSegs:function(n,t){return n.eventStartMS-t.eventStartMS||t.eventDurationMS-n.eventDurationMS||t.event.allDay-n.event.allDay||or(n.event,t.event,this.view.eventOrderSpecs)}});i.isBgEvent=hu;i.dataAttrPrefix="";vi=i.DayTableMixin={breakOnWeeks:!1,dayDates:null,dayIndices:null,daysPerRow:null,rowCnt:null,colCnt:null,colHeadFormat:null,updateDayTable:function(){for(var o=this.view,i=this.start.clone(),r=-1,u=[],n=[],t,e,f;i.isBefore(this.end);)o.isHiddenDay(i)?u.push(r+.5):(r++,u.push(r),n.push(i.clone())),i.add(1,"days");if(this.breakOnWeeks){for(e=n[0].day(),t=1;t<n.length;t++)if(n[t].day()==e)break;f=Math.ceil(n.length/t)}else f=1,t=n.length;this.dayDates=n;this.dayIndices=u;this.daysPerRow=t;this.rowCnt=f;this.updateDayTableCols()},updateDayTableCols:function(){this.colCnt=this.computeColCnt();this.colHeadFormat=this.view.opt("columnFormat")||this.computeColHeadFormat()},computeColCnt:function(){return this.daysPerRow},getCellDate:function(n,t){return this.dayDates[this.getCellDayIndex(n,t)].clone()},getCellRange:function(n,t){var i=this.getCellDate(n,t),r=i.clone().add(1,"days");return{start:i,end:r}},getCellDayIndex:function(n,t){return n*this.daysPerRow+this.getColDayIndex(t)},getColDayIndex:function(n){return this.isRTL?this.colCnt-1-n:n},getDateDayIndex:function(n){var t=this.dayIndices,i=n.diff(this.start,"days");return i<0?t[0]-1:i>=t.length?t[t.length-1]+1:t[i]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(n){for(var f=this.daysPerRow,e=this.view.computeDayRange(n),o=this.getDateDayIndex(e.start),s=this.getDateDayIndex(e.end.clone().subtract(1,"days")),h=[],u,c,t,i,r=0;r<this.rowCnt;r++)u=r*f,c=u+f-1,t=Math.max(o,u),i=Math.min(s,c),t=Math.ceil(t),i=Math.floor(i),t<=i&&h.push({row:r,firstRowDayIndex:t-u,lastRowDayIndex:i-u,isStart:t===o,isEnd:i===s});return h},sliceRangeByDay:function(n){for(var e=this.daysPerRow,o=this.view.computeDayRange(n),s=this.getDateDayIndex(o.start),h=this.getDateDayIndex(o.end.clone().subtract(1,"days")),c=[],u,l,f,t,i,r=0;r<this.rowCnt;r++)for(u=r*e,l=u+e-1,f=u;f<=l;f++)t=Math.max(s,f),i=Math.min(h,f),t=Math.ceil(t),i=Math.floor(i),t<=i&&c.push({row:r,firstRowDayIndex:t-u,lastRowDayIndex:i-u,isStart:t===s,isEnd:i===h});return c},renderHeadHtml:function(){var n=this.view;return'<div class="fc-row '+n.widgetHeaderClass+'"><table><thead>'+this.renderHeadTrHtml()+"<\/thead><\/table><\/div>"},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return"<tr>"+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+"<\/tr>"},renderHeadDateCellsHtml:function(){for(var t=[],i,n=0;n<this.colCnt;n++)i=this.getCellDate(0,n),t.push(this.renderHeadDateCellHtml(i));return t.join("")},renderHeadDateCellHtml:function(n,t,i){var r=this.view;return'<th class="fc-day-header '+r.widgetHeaderClass+" fc-"+ni[n.day()]+'"'+(this.rowCnt==1?' data-date="'+n.format("YYYY-MM-DD")+'"':"")+(t>1?' colspan="'+t+'"':"")+(i?" "+i:"")+">"+f(n.format(this.colHeadFormat))+"<\/th>"},renderBgTrHtml:function(n){return"<tr>"+(this.isRTL?"":this.renderBgIntroHtml(n))+this.renderBgCellsHtml(n)+(this.isRTL?this.renderBgIntroHtml(n):"")+"<\/tr>"},renderBgIntroHtml:function(){return this.renderIntroHtml()},renderBgCellsHtml:function(n){for(var i=[],r,t=0;t<this.colCnt;t++)r=this.getCellDate(n,t),i.push(this.renderBgCellHtml(r));return i.join("")},renderBgCellHtml:function(n,t){var r=this.view,i=this.getDayClasses(n);return i.unshift("fc-day",r.widgetContentClass),'<td class="'+i.join(" ")+'" data-date="'+n.format("YYYY-MM-DD")+'"'+(t?" "+t:"")+"><\/td>"},renderIntroHtml:function(){},bookendCells:function(n){var t=this.renderIntroHtml();t&&(this.isRTL?n.append(t):n.prepend(t))}};rt=i.DayGrid=p.extend(vi,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(n){for(var f=this.view,r=this.rowCnt,e=this.colCnt,u="",i,t=0;t<r;t++)u+=this.renderDayRowHtml(t,n);for(this.el.html(u),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day"),this.rowCoordCache=new yt({els:this.rowEls,isVertical:!0}),this.colCoordCache=new yt({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),t=0;t<r;t++)for(i=0;i<e;i++)f.trigger("dayRender",null,this.getCellDate(t,i),this.getCellEl(t,i))},unrenderDates:function(){this.removeSegPopover()},renderBusinessHours:function(){var n=this.buildBusinessHourSegs(!0);this.renderFill("businessHours",n,"bgevent")},unrenderBusinessHours:function(){this.unrenderFill("businessHours")},renderDayRowHtml:function(n,t){var r=this.view,i=["fc-row","fc-week",r.widgetContentClass];return t&&i.push("fc-rigid"),'<div class="'+i.join(" ")+'"><div class="fc-bg"><table>'+this.renderBgTrHtml(n)+'<\/table><\/div><div class="fc-content-skeleton"><table>'+(this.numbersVisible?"<thead>"+this.renderNumberTrHtml(n)+"<\/thead>":"")+"<\/table><\/div><\/div>"},renderNumberTrHtml:function(n){return"<tr>"+(this.isRTL?"":this.renderNumberIntroHtml(n))+this.renderNumberCellsHtml(n)+(this.isRTL?this.renderNumberIntroHtml(n):"")+"<\/tr>"},renderNumberIntroHtml:function(){return this.renderIntroHtml()},renderNumberCellsHtml:function(n){for(var i=[],r,t=0;t<this.colCnt;t++)r=this.getCellDate(n,t),i.push(this.renderNumberCellHtml(r));return i.join("")},renderNumberCellHtml:function(n){var t;return this.view.dayNumbersVisible?(t=this.getDayClasses(n),t.unshift("fc-day-number"),'<td class="'+t.join(" ")+'" data-date="'+n.format()+'">'+n.date()+"<\/td>"):"<td/>"},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return this.colCnt==1},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(n){for(var r=this.sliceRangeByRow(n),t,i=0;i<r.length;i++)t=r[i],this.isRTL?(t.leftCol=this.daysPerRow-1-t.lastRowDayIndex,t.rightCol=this.daysPerRow-1-t.firstRowDayIndex):(t.leftCol=t.firstRowDayIndex,t.rightCol=t.lastRowDayIndex);return r},prepareHits:function(){this.colCoordCache.build();this.rowCoordCache.build();this.rowCoordCache.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},releaseHits:function(){this.colCoordCache.clear();this.rowCoordCache.clear()},queryHit:function(n,t){if(this.colCoordCache.isLeftInBounds(n)&&this.rowCoordCache.isTopInBounds(t)){var i=this.colCoordCache.getHorizontalIndex(n),r=this.rowCoordCache.getVerticalIndex(t);if(r!=null&&i!=null)return this.getCellHit(r,i)}},getHitSpan:function(n){return this.getCellRange(n.row,n.col)},getHitEl:function(n){return this.getCellEl(n.row,n.col)},getCellHit:function(n,t){return{row:n,col:t,component:this,left:this.colCoordCache.getLeftOffset(t),right:this.colCoordCache.getRightOffset(t),top:this.rowCoordCache.getTopOffset(n),bottom:this.rowCoordCache.getBottomOffset(n)}},getCellEl:function(n,t){return this.cellEls.eq(n*this.colCnt+t)},renderDrag:function(n,t){return this.renderHighlight(this.eventToSpan(n)),t&&t.component!==this?this.renderEventLocationHelper(n,t):void 0},unrenderDrag:function(){this.unrenderHighlight();this.unrenderHelper()},renderEventResize:function(n,t){return this.renderHighlight(this.eventToSpan(n)),this.renderEventLocationHelper(n,t)},unrenderEventResize:function(){this.unrenderHighlight();this.unrenderHelper()},renderHelper:function(t,i){var u=[],r=this.eventToSegs(t),f;return r=this.renderFgSegEls(r),f=this.renderSegRows(r),this.rowEls.each(function(t,r){var o=n(r),e=n('<div class="fc-helper-skeleton"><table/><\/div>'),s;s=i&&i.row===t?i.el.position().top:o.find(".fc-content-skeleton tbody").position().top;e.css("top",s).find("table").append(f[t].tbodyEl);o.append(e);u.push(e[0])}),this.helperEls=n(u)},unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(t,i,r){var o=[],u,f,e;for(i=this.renderFillSegEls(t,i),u=0;u<i.length;u++)f=i[u],e=this.renderFillRow(t,f,r),this.rowEls.eq(f.row).append(e),o.push(e[0]);return this.elsByFill[t]=n(o),i},renderFillRow:function(t,i,r){var s=this.colCnt,f=i.leftCol,e=i.rightCol+1,o,u;return r=r||t.toLowerCase(),o=n('<div class="fc-'+r+'-skeleton"><table><tr/><\/table><\/div>'),u=o.find("tr"),f>0&&u.append('<td colspan="'+f+'"/>'),u.append(i.el.attr("colspan",e-f)),e<s&&u.append('<td colspan="'+(s-e)+'"/>'),this.bookendCells(u),o}});rt.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover();p.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return p.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(t){var i=n.grep(t,function(n){return n.event.allDay});return p.prototype.renderBgSegs.call(this,i)},renderFgSegs:function(t){var i;return t=this.renderFgSegEls(t),i=this.rowStructs=this.renderSegRows(t),this.rowEls.each(function(t,r){n(r).find(".fc-content-skeleton > table").append(i[t].tbodyEl)}),t},unrenderFgSegs:function(){for(var t=this.rowStructs||[],n;n=t.pop();)n.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(n){for(var r=[],i=this.groupSegRows(n),t=0;t<i.length;t++)r.push(this.renderSegRow(t,i[t]));return r},fgSegHtml:function(n,t){var r=this.view,i=n.event,l=r.isEventDraggable(i),e=!t&&i.allDay&&n.isStart&&r.isEventResizableFromStart(i),o=!t&&i.allDay&&n.isEnd&&r.isEventResizableFromEnd(i),s=this.getSegClasses(n,l,e||o),h=lt(this.getSegSkinCss(n)),c="",a,u;return s.unshift("fc-day-grid-event","fc-h-event"),n.isStart&&(a=this.getEventTimeText(i)),u='<span class="fc-title">'+(f(i.title||"")||"&nbsp;")+"<\/span>",'<a class="'+s.join(" ")+'"'+(i.url?' href="'+f(i.url)+'"':"")+(h?' style="'+h+'"':"")+'><div class="fc-content">'+(this.isRTL?u+" "+c:c+" "+u)+"<\/div>"+(e?'<div class="fc-resizer fc-start-resizer" />':"")+(o?'<div class="fc-resizer fc-end-resizer" />':"")+"<\/a>"},renderSegRow:function(t,i){function p(t){while(u<t)r=(h[f-1]||[])[u],r?r.attr("rowspan",parseInt(r.attr("rowspan")||1,10)+1):(r=n("<td/>"),o.append(r)),s[f][u]=r,h[f][u]=r,u++}for(var w=this.colCnt,a=this.buildSegLevels(i),b=Math.max(1,a.length),y=n("<tbody/>"),v=[],s=[],h=[],c,u,o,l,e,r,f=0;f<b;f++){if(c=a[f],u=0,o=n("<tr/>"),v.push([]),s.push([]),h.push([]),c)for(l=0;l<c.length;l++){for(e=c[l],p(e.leftCol),r=n('<td class="fc-event-container"/>').append(e.el),e.leftCol!=e.rightCol?r.attr("colspan",e.rightCol-e.leftCol+1):h[f][u]=r;u<=e.rightCol;)s[f][u]=r,v[f][u]=e,u++;o.append(r)}p(w);this.bookendCells(o);y.append(o)}return{row:t,tbodyEl:y,cellMatrix:s,segMatrix:v,segLevels:a,segs:i}},buildSegLevels:function(n){var i=[],r,u,t;for(this.sortEventSegs(n),r=0;r<n.length;r++){for(u=n[r],t=0;t<i.length;t++)if(!oe(u,i[t]))break;u.level=t;(i[t]||(i[t]=[])).push(u)}for(t=0;t<i.length;t++)i[t].sort(se);return i},groupSegRows:function(n){for(var i=[],t=0;t<this.rowCnt;t++)i.push([]);for(t=0;t<n.length;t++)i[n[t].row].push(n[t]);return i}});rt.mixin({segPopover:null,popoverSegs:null,removeSegPopover:function(){this.segPopover&&this.segPopover.hide()},limitRows:function(n){for(var r=this.rowStructs||[],i,t=0;t<r.length;t++)this.unlimitRow(t),i=n?typeof n=="number"?n:this.computeRowLevelLimit(t):!1,i!==!1&&this.limitRow(t,i)},computeRowLevelLimit:function(t){function s(t,i){r=Math.max(r,n(i).outerHeight())}for(var e=this.rowEls.eq(t),o=e.height(),f=this.rowStructs[t].tbodyEl.children(),u,r,i=0;i<f.length;i++)if(u=f.eq(i).removeClass("fc-limited"),r=0,u.find("> td > :first-child").each(s),u.position().top+r>o)return i;return!1},limitRow:function(t,i){function tt(f){while(r<f)u=g.getCellSegs(t,r,i),u.length&&(o=w[i-1][r],v=g.renderMoreLink(t,r,u),h=n("<div/>").append(v),o.append(h),y.push(h[0])),r++}var g=this,f=this.rowStructs[t],y=[],r=0,p,w,b,c,e,u,k,l,o,nt,d,s,a,h,v;if(i&&i<f.segLevels.length){for(p=f.segLevels[i-1],w=f.cellMatrix,b=f.tbodyEl.children().slice(i).addClass("fc-limited").get(),c=0;c<p.length;c++){for(e=p[c],tt(e.leftCol),l=[],k=0;r<=e.rightCol;)u=this.getCellSegs(t,r,i),l.push(u),k+=u.length,r++;if(k){for(o=w[i-1][e.leftCol],nt=o.attr("rowspan")||1,d=[],s=0;s<l.length;s++)a=n('<td class="fc-more-cell"/>').attr("rowspan",nt),u=l[s],v=this.renderMoreLink(t,e.leftCol+s,[e].concat(u)),h=n("<div/>").append(v),a.append(h),d.push(a[0]),y.push(a[0]);o.addClass("fc-limited").after(n(d));b.push(o[0])}}tt(this.colCnt);f.moreEls=n(y);f.limitedEls=n(b)}},unlimitRow:function(n){var t=this.rowStructs[n];t.moreEls&&(t.moreEls.remove(),t.moreEls=null);t.limitedEls&&(t.limitedEls.removeClass("fc-limited"),t.limitedEls=null)},renderMoreLink:function(t,i,r){var u=this,f=this.view;return n('<a class="fc-more"/>').text(this.getMoreLinkText(r.length)).on("click",function(e){var o=f.opt("eventLimitClick"),s=u.getCellDate(t,i),h=n(this),l=u.getCellEl(t,i),a=u.getCellSegs(t,i),c=u.resliceDaySegs(a,s),v=u.resliceDaySegs(r,s);typeof o=="function"&&(o=f.trigger("eventLimitClick",null,{date:s,dayEl:l,moreEl:h,segs:c,hiddenSegs:v},e));o==="popover"?u.showSegPopover(t,i,h,c):typeof o=="string"&&f.calendar.zoomTo(s,o)})},showSegPopover:function(n,t,i,r){var f=this,o=this.view,e=i.parent(),s,u;s=this.rowCnt==1?o.el:this.rowEls.eq(n);u={className:"fc-more-popover",content:this.renderSegPopoverContent(n,t,r),parentEl:this.view.el,top:s.offset().top,autoHide:!0,viewportConstrain:o.opt("popoverViewportConstrain"),hide:function(){f.segPopover.removeElement();f.segPopover=null;f.popoverSegs=null}};this.isRTL?u.right=e.offset().left+e.outerWidth()+1:u.left=e.offset().left-1;this.segPopover=new ie(u);this.segPopover.show();this.bindSegHandlersToEl(this.segPopover.el)},renderSegPopoverContent:function(t,i,r){var e=this.view,s=e.opt("theme"),h=this.getCellDate(t,i).format(e.opt("dayPopoverFormat")),o=n('<div class="fc-header '+e.widgetHeaderClass+'"><span class="fc-close '+(s?"ui-icon ui-icon-closethick":"fc-icon fc-icon-x")+'"><\/span><span class="fc-title">'+f(h)+'<\/span><div class="fc-clear"/><\/div><div class="fc-body '+e.widgetContentClass+'"><div class="fc-event-container"><\/div><\/div>'),c=o.find(".fc-event-container"),u;for(r=this.renderFgSegEls(r,!0),this.popoverSegs=r,u=0;u<r.length;u++)this.prepareHits(),r[u].hit=this.getCellHit(t,i),this.releaseHits(),c.append(r[u].el);return o},resliceDaySegs:function(t,i){var u=n.map(t,function(n){return n.event}),r=i.clone(),f=r.clone().add(1,"days"),e={start:r,end:f};return t=this.eventsToSegs(u,function(n){var t=gt(n,e);return t?[t]:[]}),this.sortEventSegs(t),t},getMoreLinkText:function(n){var t=this.view.opt("eventLimitText");return typeof t=="function"?t(n):"+"+n+" "+t},getCellSegs:function(n,t,i){for(var f=this.rowStructs[n].segMatrix,r=i||0,e=[],u;r<f.length;)u=f[r][t],u&&e.push(u),r++;return e}});yi=i.TimeGrid=p.extend(vi,{slotDuration:null,snapDuration:null,snapsPerSlot:null,minTime:null,maxTime:null,labelFormat:null,labelInterval:null,colEls:null,slatContainerEl:null,slatEls:null,nowIndicatorEls:null,colCoordCache:null,slatCoordCache:null,constructor:function(){p.apply(this,arguments);this.processOptions()},renderDates:function(){this.el.html(this.renderHtml());this.colEls=this.el.find(".fc-day");this.slatContainerEl=this.el.find(".fc-slats");this.slatEls=this.slatContainerEl.find("tr");this.colCoordCache=new yt({els:this.colEls,isHorizontal:!0});this.slatCoordCache=new yt({els:this.slatEls,isVertical:!0});this.renderContentSkeleton()},renderHtml:function(){return'<div class="fc-bg"><table>'+this.renderBgTrHtml(0)+'<\/table><\/div><div class="fc-slats"><table>'+this.renderSlatRowHtml()+"<\/table><\/div>"},renderSlatRowHtml:function(){for(var i=this.view,o=this.isRTL,s="",n=t.duration(+this.minTime),r,u,e;n<this.maxTime;)r=this.start.clone().time(n),u=v(ii(n,this.labelInterval)),e='<td class="fc-axis fc-time '+i.widgetContentClass+'" '+i.axisStyleAttr()+">"+(u?"<span>"+f(r.format(this.labelFormat))+"<\/span>":"")+"<\/td>",s+='<tr data-time="'+r.format("HH:mm:ss")+'"'+(u?"":' class="fc-minor"')+">"+(o?"":e)+'<td class="'+i.widgetContentClass+'"/>'+(o?e:"")+"<\/tr>",n.add(this.slotDuration);return s},processOptions:function(){var r=this.view,u=r.opt("slotDuration"),f=r.opt("snapDuration"),i;u=t.duration(u);f=f?t.duration(f):u;this.slotDuration=u;this.snapDuration=f;this.snapsPerSlot=u/f;this.minResizeDuration=f;this.minTime=t.duration(r.opt("minTime"));this.maxTime=t.duration(r.opt("maxTime"));i=r.opt("slotLabelFormat");n.isArray(i)&&(i=i[i.length-1]);this.labelFormat=i||r.opt("axisFormat")||r.opt("smallTimeFormat");i=r.opt("slotLabelInterval");this.labelInterval=i?t.duration(i):this.computeLabelInterval(u)},computeLabelInterval:function(n){for(var r,u,i=ku.length-1;i>=0;i--)if(r=t.duration(ku[i]),u=ii(r,n),v(u)&&u>1)return r;return t.duration(n)},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},prepareHits:function(){this.colCoordCache.build();this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(n,t){var u=this.snapsPerSlot,f=this.colCoordCache,e=this.slatCoordCache,i,r;if(f.isLeftInBounds(n)&&e.isTopInBounds(t)&&(i=f.getHorizontalIndex(n),r=e.getVerticalIndex(t),i!=null&&r!=null)){var o=e.getTopOffset(r),s=e.getHeight(r),c=(t-o)/s,h=Math.floor(c*u),l=r*u+h,a=o+h/u*s,v=o+(h+1)/u*s;return{col:i,snap:l,component:this,left:f.getLeftOffset(i),right:f.getRightOffset(i),top:a,bottom:v}}},getHitSpan:function(n){var t=this.getCellDate(0,n.col),r=this.computeSnapTime(n.snap),i;return t.time(r),i=t.clone().add(this.snapDuration),{start:t,end:i}},getHitEl:function(n){return this.colEls.eq(n.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(n){return t.duration(this.minTime+this.snapDuration*n)},spanToSegs:function(n){for(var i=this.sliceRangeByTimes(n),t=0;t<i.length;t++)i[t].col=this.isRTL?this.daysPerRow-1-i[t].dayIndex:i[t].dayIndex;return i},sliceRangeByTimes:function(n){for(var u=[],i,r,f,t=0;t<this.daysPerRow;t++)r=this.dayDates[t].clone(),f={start:r.clone().time(this.minTime),end:r.clone().time(this.maxTime)},i=gt(n,f),i&&(i.dayIndex=t,u.push(i));return u},updateSize:function(n){this.slatCoordCache.build();n&&this.updateSegVerticals([].concat(this.fgSegs||[],this.bgSegs||[],this.businessSegs||[]))},getTotalSlatHeight:function(){return this.slatContainerEl.outerHeight()},computeDateTop:function(n,i){return this.computeTimeTop(t.duration(n-i.clone().stripTime()))},computeTimeTop:function(n){var r=this.slatEls.length,t=(n-this.minTime)/this.slotDuration,i,u;return t=Math.max(0,t),t=Math.min(r,t),i=Math.floor(t),i=Math.min(i,r-1),u=t-i,this.slatCoordCache.getTopPosition(i)+this.slatCoordCache.getHeight(i)*u},renderDrag:function(n,t){if(t)return this.renderEventLocationHelper(n,t);this.renderHighlight(this.eventToSpan(n))},unrenderDrag:function(){this.unrenderHelper();this.unrenderHighlight()},renderEventResize:function(n,t){return this.renderEventLocationHelper(n,t)},unrenderEventResize:function(){this.unrenderHelper()},renderHelper:function(n,t){return this.renderHelperSegs(this.eventToSegs(n),t)},unrenderHelper:function(){this.unrenderHelperSegs()},renderBusinessHours:function(){this.renderBusinessSegs(this.buildBusinessHourSegs())},unrenderBusinessHours:function(){this.unrenderBusinessSegs()},getNowIndicatorUnit:function(){return"minute"},renderNowIndicator:function(t){for(var r=this.spanToSegs({start:t,end:t}),f=this.computeDateTop(t,t),u=[],i=0;i<r.length;i++)u.push(n('<div class="fc-now-indicator fc-now-indicator-line"><\/div>').css("top",f).appendTo(this.colContainerEls.eq(r[i].col))[0]);r.length>0&&u.push(n('<div class="fc-now-indicator fc-now-indicator-arrow"><\/div>').css("top",f).appendTo(this.el.find(".fc-content-skeleton"))[0]);this.nowIndicatorEls=n(u)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(n){this.view.opt("selectHelper")?this.renderEventLocationHelper(n):this.renderHighlight(n)},unrenderSelection:function(){this.unrenderHelper();this.unrenderHighlight()},renderHighlight:function(n){this.renderHighlightSegs(this.spanToSegs(n))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});yi.mixin({colContainerEls:null,fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,renderContentSkeleton:function(){for(var r="",t,i=0;i<this.colCnt;i++)r+='<td><div class="fc-content-col"><div class="fc-event-container fc-helper-container"><\/div><div class="fc-event-container"><\/div><div class="fc-highlight-container"><\/div><div class="fc-bgevent-container"><\/div><div class="fc-business-container"><\/div><\/div><\/td>';t=n('<div class="fc-content-skeleton"><table><tr>'+r+"<\/tr><\/table><\/div>");this.colContainerEls=t.find(".fc-content-col");this.helperContainerEls=t.find(".fc-helper-container");this.fgContainerEls=t.find(".fc-event-container:not(.fc-helper-container)");this.bgContainerEls=t.find(".fc-bgevent-container");this.highlightContainerEls=t.find(".fc-highlight-container");this.businessContainerEls=t.find(".fc-business-container");this.bookendCells(t.find("tr"));this.el.append(t)},renderFgSegs:function(n){return n=this.renderFgSegsIntoContainers(n,this.fgContainerEls),this.fgSegs=n,n},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(t,i){var e=[],u,f,r;for(t=this.renderFgSegsIntoContainers(t,this.helperContainerEls),u=0;u<t.length;u++)f=t[u],i&&i.col===f.col&&(r=i.el,f.el.css({left:r.css("left"),right:r.css("right"),"margin-left":r.css("margin-left"),"margin-right":r.css("margin-right")})),e.push(f.el[0]);return this.helperSegs=t,n(e)},unrenderHelperSegs:function(){this.unrenderNamedSegs("helperSegs")},renderBgSegs:function(n){return n=this.renderFillSegEls("bgEvent",n),this.updateSegVerticals(n),this.attachSegsByCol(this.groupSegsByCol(n),this.bgContainerEls),this.bgSegs=n,n},unrenderBgSegs:function(){this.unrenderNamedSegs("bgSegs")},renderHighlightSegs:function(n){n=this.renderFillSegEls("highlight",n);this.updateSegVerticals(n);this.attachSegsByCol(this.groupSegsByCol(n),this.highlightContainerEls);this.highlightSegs=n},unrenderHighlightSegs:function(){this.unrenderNamedSegs("highlightSegs")},renderBusinessSegs:function(n){n=this.renderFillSegEls("businessHours",n);this.updateSegVerticals(n);this.attachSegsByCol(this.groupSegsByCol(n),this.businessContainerEls);this.businessSegs=n},unrenderBusinessSegs:function(){this.unrenderNamedSegs("businessSegs")},groupSegsByCol:function(n){for(var i=[],t=0;t<this.colCnt;t++)i.push([]);for(t=0;t<n.length;t++)i[n[t].col].push(n[t]);return i},attachSegsByCol:function(n,t){for(var u,r,i=0;i<this.colCnt;i++)for(u=n[i],r=0;r<u.length;r++)t.eq(i).append(u[r].el)},unrenderNamedSegs:function(n){var i=this[n],t;if(i){for(t=0;t<i.length;t++)i[t].el.remove();this[n]=null}},renderFgSegsIntoContainers:function(n,t){var r,i;for(n=this.renderFgSegEls(n),r=this.groupSegsByCol(n),i=0;i<this.colCnt;i++)this.updateFgSegCoords(r[i]);return this.attachSegsByCol(r,t),n},fgSegHtml:function(n,t){var r=this.view,i=n.event,l=r.isEventDraggable(i),a=!t&&n.isStart&&r.isEventResizableFromStart(i),s=!t&&n.isEnd&&r.isEventResizableFromEnd(i),h=this.getSegClasses(n,l,a||s),c=lt(this.getSegSkinCss(n)),u,e,o;return h.unshift("fc-time-grid-event","fc-v-event"),r.isMultiDayEvent(i)?(n.isStart||n.isEnd)&&(u=this.getEventTimeText(n),e=this.getEventTimeText(n,"LT"),o=this.getEventTimeText(n,null,!1)):(u=this.getEventTimeText(i),e=this.getEventTimeText(i,"LT"),o=this.getEventTimeText(i,null,!1)),'<a class="'+h.join(" ")+'"'+(i.url?' href="'+f(i.url)+'"':"")+(c?' style="'+c+'"':"")+'><div class="fc-content">'+(u?'<div class="fc-time" data-start="'+f(o)+'" data-full="'+f(e)+'"><span>'+f(u)+"<\/span><\/div>":"")+(i.title?'<div class="fc-title">'+f(i.title)+"<\/div>":"")+'<\/div><div class="fc-bg"/>'+(s?'<div class="fc-resizer fc-end-resizer" />':"")+"<\/a>"},updateSegVerticals:function(n){this.computeSegVerticals(n);this.assignSegVerticals(n)},computeSegVerticals:function(n){for(var t,i=0;i<n.length;i++)t=n[i],t.top=this.computeDateTop(t.start,t.start),t.bottom=this.computeDateTop(t.end,t.start)},assignSegVerticals:function(n){for(var i,t=0;t<n.length;t++)i=n[t],i.el.css(this.generateSegVerticalCss(i))},generateSegVerticalCss:function(n){return{top:n.top,bottom:-n.bottom}},updateFgSegCoords:function(n){this.computeSegVerticals(n);this.computeFgSegHorizontals(n);this.assignSegVerticals(n);this.assignFgSegHorizontals(n)},computeFgSegHorizontals:function(n){var r,i,t;if(this.sortEventSegs(n),r=he(n),ce(r),i=r[0]){for(t=0;t<i.length;t++)lu(i[t]);for(t=0;t<i.length;t++)this.computeFgSegForwardBack(i[t],0,0)}},computeFgSegForwardBack:function(n,t,i){var r=n.forwardSegs,u;if(n.forwardCoord===undefined)for(r.length?(this.sortForwardSegs(r),this.computeFgSegForwardBack(r[0],t+1,i),n.forwardCoord=r[0].backwardCoord):n.forwardCoord=1,n.backwardCoord=n.forwardCoord-(n.forwardCoord-i)/(t+1),u=0;u<r.length;u++)this.computeFgSegForwardBack(r[u],0,n.forwardCoord)},sortForwardSegs:function(n){n.sort(k(this,"compareForwardSegs"))},compareForwardSegs:function(n,t){return t.forwardPressure-n.forwardPressure||(n.backwardCoord||0)-(t.backwardCoord||0)||this.compareEventSegs(n,t)},assignFgSegHorizontals:function(n){for(var t,i=0;i<n.length;i++)t=n[i],t.el.css(this.generateFgSegHorizontalCss(t)),t.bottom-t.top<30&&t.el.addClass("fc-short")},generateFgSegHorizontalCss:function(n){var e=this.view.opt("slotEventOverlap"),i=n.backwardCoord,r=n.forwardCoord,t=this.generateSegVerticalCss(n),u,f;return e&&(r=Math.min(1,i+(r-i)*2)),this.isRTL?(u=1-r,f=i):(u=i,f=1-r),t.zIndex=n.level+1,t.left=u*100+"%",t.right=f*100+"%",e&&n.forwardPressure&&(t[this.isRTL?"marginLeft":"marginRight"]=20),t}});var g=i.View=s.extend(uu,tt,{type:null,name:null,title:null,calendar:null,options:null,el:null,displaying:null,isSkeletonRendered:!1,isEventsRendered:!1,start:null,end:null,intervalStart:null,intervalEnd:null,intervalDuration:null,intervalUnit:null,isRTL:!1,isSelected:!1,selectedEvent:null,eventOrderSpecs:null,widgetHeaderClass:null,widgetContentClass:null,highlightStateClass:null,nextDayThreshold:null,isHiddenDayHash:null,isNowIndicatorRendered:null,initialNowDate:null,initialNowQueriedMs:null,nowIndicatorTimeoutID:null,nowIndicatorIntervalID:null,constructor:function(n,i,r,u){this.calendar=n;this.type=this.name=i;this.options=r;this.intervalDuration=u||t.duration(1,"day");this.nextDayThreshold=t.duration(this.opt("nextDayThreshold"));this.initThemingProps();this.initHiddenDays();this.isRTL=this.opt("isRTL");this.eventOrderSpecs=er(this.opt("eventOrder"));this.initialize()},initialize:function(){},opt:function(n){return this.options[n]},trigger:function(n,t){var i=this.calendar;return i.trigger.apply(i,[n,t||this].concat(Array.prototype.slice.call(arguments,2),[this]))},setDate:function(n){this.setRange(this.computeRange(n))},setRange:function(t){n.extend(this,t);this.updateTitle()},computeRange:function(n){var f=ti(this.intervalDuration),t=n.clone().startOf(f),i=t.clone().add(this.intervalDuration),r,u;return/year|month|week|day/.test(f)?(t.stripTime(),i.stripTime()):(t.hasTime()||(t=this.calendar.time(0)),i.hasTime()||(i=this.calendar.time(0))),r=t.clone(),r=this.skipHiddenDays(r),u=i.clone(),u=this.skipHiddenDays(u,-1,!0),{intervalUnit:f,intervalStart:t,intervalEnd:i,start:r,end:u}},computePrevDate:function(n){return this.massageCurrentDate(n.clone().startOf(this.intervalUnit).subtract(this.intervalDuration),-1)},computeNextDate:function(n){return this.massageCurrentDate(n.clone().startOf(this.intervalUnit).add(this.intervalDuration))},massageCurrentDate:function(n,t){return this.intervalDuration.as("days")<=1&&this.isHiddenDay(n)&&(n=this.skipHiddenDays(n,t),n.startOf("day")),n},updateTitle:function(){this.title=this.computeTitle()},computeTitle:function(){return this.formatRange({start:this.calendar.applyTimezone(this.intervalStart),end:this.calendar.applyTimezone(this.intervalEnd)},this.opt("titleFormat")||this.computeTitleFormat(),this.opt("titleRangeSeparator"))},computeTitleFormat:function(){return this.intervalUnit=="year"?"YYYY":this.intervalUnit=="month"?this.opt("monthYearFormat"):this.intervalDuration.as("days")>1?"ll":"LL"},formatRange:function(n,t,i){var r=n.end;return r.hasTime()||(r=r.clone().subtract(1)),dr(n.start,r,t,i,this.opt("isRTL"))},setElement:function(n){this.el=n;this.bindGlobalHandlers()},removeElement:function(){this.clear();this.isSkeletonRendered&&(this.unrenderSkeleton(),this.isSkeletonRendered=!1);this.unbindGlobalHandlers();this.el.remove()},display:function(n,t){var i=this,r=null;return t!=null&&this.displaying&&(r=this.queryScroll()),this.calendar.freezeContentHeight(),ei(this.clear(),function(){return i.displaying=ei(i.displayView(n),function(){t!=null?i.setScroll(t):i.forceScroll(i.computeInitialScroll(r));i.calendar.unfreezeContentHeight();i.triggerRender()})})},clear:function(){var t=this,i=this.displaying;return i?ei(i,function(){return t.displaying=null,t.clearEvents(),t.clearView()}):n.when()},displayView:function(n){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0);n&&this.setDate(n);this.render&&this.render();this.renderDates();this.updateSize();this.renderBusinessHours();this.startNowIndicator()},clearView:function(){this.unselect();this.stopNowIndicator();this.triggerUnrender();this.unrenderBusinessHours();this.unrenderDates();this.destroy&&this.destroy()},renderSkeleton:function(){},unrenderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},triggerRender:function(){this.trigger("viewRender",this,this,this.el)},triggerUnrender:function(){this.trigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){this.listenTo(n(document),"mousedown",this.handleDocumentMousedown);this.listenTo(n(document),"touchstart",this.processUnselect)},unbindGlobalHandlers:function(){this.stopListeningTo(n(document))},initThemingProps:function(){var n=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=n+"-widget-header";this.widgetContentClass=n+"-widget-content";this.highlightStateClass=n+"-state-highlight"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var u=this,i,r,n;this.opt("nowIndicator")&&(i=this.getNowIndicatorUnit(),i&&(r=k(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,n=this.initialNowDate.clone().startOf(i).add(1,i)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){u.nowIndicatorTimeoutID=null;r();n=+t.duration(1,i);n=Math.max(100,n);u.nowIndicatorIntervalID=setInterval(r,n)},n)))},updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},getNowIndicatorUnit:function(){},renderNowIndicator:function(){},unrenderNowIndicator:function(){},updateSize:function(n){var t;n&&(t=this.queryScroll());this.updateHeight(n);this.updateWidth(n);this.updateNowIndicator();n&&this.setScroll(t)},updateWidth:function(){},updateHeight:function(){var n=this.calendar;this.setHeight(n.getSuggestedViewHeight(),n.isHeightAuto())},setHeight:function(){},computeInitialScroll:function(){return 0},queryScroll:function(){},setScroll:function(){},forceScroll:function(n){var t=this;this.setScroll(n);setTimeout(function(){t.setScroll(n)},0)},displayEvents:function(n){var t=this.queryScroll();this.clearEvents();this.renderEvents(n);this.isEventsRendered=!0;this.setScroll(t);this.triggerEventRender()},clearEvents:function(){var n;this.isEventsRendered&&(n=this.queryScroll(),this.triggerEventUnrender(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.setScroll(n),this.isEventsRendered=!1)},renderEvents:function(){},unrenderEvents:function(){},triggerEventRender:function(){this.renderedEventSegEach(function(n){this.trigger("eventAfterRender",n.event,n.event,n.el)});this.trigger("eventAfterAllRender")},triggerEventUnrender:function(){this.renderedEventSegEach(function(n){this.trigger("eventDestroy",n.event,n.event,n.el)})},resolveEventEl:function(t,i){var r=this.trigger("eventRender",t,t,i);return r===!1?i=null:r&&r!==!0&&(i=n(r)),i},showEvent:function(n){this.renderedEventSegEach(function(n){n.el.css("visibility","")},n)},hideEvent:function(n){this.renderedEventSegEach(function(n){n.el.css("visibility","hidden")},n)},renderedEventSegEach:function(n,t){for(var r=this.getEventSegs(),i=0;i<r.length;i++)t&&r[i].event._id!==t._id||r[i].el&&n.call(this,r[i])},getEventSegs:function(){return[]},isEventDraggable:function(n){var t=n.source||{};return o(n.startEditable,t.startEditable,this.opt("eventStartEditable"),n.editable,t.editable,this.opt("editable"))},reportEventDrop:function(n,t,i,r,u){var f=this.calendar,e=f.mutateEvent(n,t,i),o=function(){e.undo();f.reportEventChange()};this.triggerEventDrop(n,e.dateDelta,o,r,u);f.reportEventChange()},triggerEventDrop:function(n,t,i,r,u){this.trigger("eventDrop",r[0],n,t,i,u,{})},reportExternalDrop:function(t,i,r,u,f){var e=t.eventProps,o,s;e&&(o=n.extend({},e,i),s=this.calendar.renderEvent(o,t.stick)[0]);this.triggerExternalDrop(s,i,r,u,f)},triggerExternalDrop:function(n,t,i,r,u){this.trigger("drop",i[0],t.start,r,u);n&&this.trigger("eventReceive",null,n)},renderDrag:function(){},unrenderDrag:function(){},isEventResizableFromStart:function(n){return this.opt("eventResizableFromStart")&&this.isEventResizable(n)},isEventResizableFromEnd:function(n){return this.isEventResizable(n)},isEventResizable:function(n){var t=n.source||{};return o(n.durationEditable,t.durationEditable,this.opt("eventDurationEditable"),n.editable,t.editable,this.opt("editable"))},reportEventResize:function(n,t,i,r,u){var f=this.calendar,e=f.mutateEvent(n,t,i),o=function(){e.undo();f.reportEventChange()};this.triggerEventResize(n,e.durationDelta,o,r,u);f.reportEventChange()},triggerEventResize:function(n,t,i,r,u){this.trigger("eventResize",r[0],n,t,i,u,{})},select:function(n,t){this.unselect(t);this.renderSelection(n);this.reportSelection(n,t)},renderSelection:function(){},reportSelection:function(n,t){this.isSelected=!0;this.triggerSelect(n,t)},triggerSelect:function(n,t){this.trigger("select",null,this.calendar.applyTimezone(n.start),this.calendar.applyTimezone(n.end),t)},unselect:function(n){this.isSelected&&(this.isSelected=!1,this.destroySelection&&this.destroySelection(),this.unrenderSelection(),this.trigger("unselect",null,n))},unrenderSelection:function(){},selectEvent:function(n){this.selectedEvent&&this.selectedEvent===n||(this.unselectEvent(),this.renderedEventSegEach(function(n){n.el.addClass("fc-selected")},n),this.selectedEvent=n)},unselectEvent:function(){this.selectedEvent&&(this.renderedEventSegEach(function(n){n.el.removeClass("fc-selected")},this.selectedEvent),this.selectedEvent=null)},isEventSelected:function(n){return this.selectedEvent&&this.selectedEvent._id===n._id},handleDocumentMousedown:function(n){rr(n)&&this.processUnselect(n)},processUnselect:function(n){this.processRangeUnselect(n);this.processEventUnselect(n)},processRangeUnselect:function(t){var i;this.isSelected&&this.opt("unselectAuto")&&(i=this.opt("unselectCancel"),i&&n(t.target).closest(i).length||this.unselect(t))},processEventUnselect:function(t){this.selectedEvent&&(n(t.target).closest(".fc-selected").length||this.unselectEvent())},triggerDayClick:function(n,t,i){this.trigger("dayClick",t,this.calendar.applyTimezone(n.start),i)},initHiddenDays:function(){var i=this.opt("hiddenDays")||[],r=[],u=0,t;for(this.opt("weekends")===!1&&i.push(0,6),t=0;t<7;t++)(r[t]=n.inArray(t,i)!==-1)||u++;if(!u)throw"invalid hiddenDays";this.isHiddenDayHash=r},isHiddenDay:function(n){return t.isMoment(n)&&(n=n.day()),this.isHiddenDayHash[n]},skipHiddenDays:function(n,t,i){var r=n.clone();for(t=t||1;this.isHiddenDayHash[(r.day()+(i?t:0)+7)%7];)r.add(t,"days");return r},computeDayRange:function(n){var r=n.start.clone().stripTime(),i=n.end,t=null,u;return i&&(t=i.clone().stripTime(),u=+i.time(),u&&u>=this.nextDayThreshold&&t.add(1,"days")),(!i||t<=r)&&(t=r.clone().add(1,"days")),{start:r,end:t}},isMultiDayEvent:function(n){var t=this.computeDayRange(n);return t.end.diff(t.start,"days")>1}}),vu=i.Scroller=s.extend({el:null,scrollEl:null,overflowX:null,overflowY:null,constructor:function(n){n=n||{};this.overflowX=n.overflowX||n.overflow||"auto";this.overflowY=n.overflowY||n.overflow||"auto"},render:function(){this.el=this.renderEl();this.applyOverflow()},renderEl:function(){return this.scrollEl=n('<div class="fc-scroller"><\/div>')},clear:function(){this.setHeight("auto");this.applyOverflow()},destroy:function(){this.el.remove()},applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},lockOverflow:function(n){var t=this.overflowX,i=this.overflowY;n=n||this.getScrollbarWidths();t==="auto"&&(t=n.top||n.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden");i==="auto"&&(i=n.left||n.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden");this.scrollEl.css({"overflow-x":t,"overflow-y":i})},setHeight:function(n){this.scrollEl.height(n)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(n){this.scrollEl.scrollTop(n)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return dt(this.scrollEl)}}),r=i.Calendar=s.extend({dirDefaults:null,langDefaults:null,overrides:null,dynamicOverrides:null,options:null,viewSpecCache:null,view:null,header:null,loadingLevel:0,constructor:ae,initialize:function(){},populateOptionsHash:function(){var t,n,u,i;t=o(this.dynamicOverrides.lang,this.overrides.lang);n=w[t];n||(t=r.defaults.lang,n=w[t]||{});u=o(this.dynamicOverrides.isRTL,this.overrides.isRTL,n.isRTL,r.defaults.isRTL);i=u?r.rtlDefaults:{};this.dirDefaults=i;this.langDefaults=n;this.options=nt([r.defaults,i,n,this.overrides,this.dynamicOverrides]);yu(this.options)},getViewSpec:function(n){var t=this.viewSpecCache;return t[n]||(t[n]=this.buildViewSpec(n))},getUnitViewSpec:function(t){var r,u,f;if(n.inArray(t,st)!=-1)for(r=this.header.getViewsWithButtons(),n.each(i.views,function(n){r.push(n)}),u=0;u<r.length;u++)if(f=this.getViewSpec(r[u]),f&&f.singleUnit==t)return f},buildViewSpec:function(n){for(var s=this.overrides.views||{},h=[],c=[],o=[],u=n,i,f,r,e;u;)i=a[u],f=s[u],u=null,typeof i=="function"&&(i={"class":i}),i&&(h.unshift(i),c.unshift(i.defaults||{}),r=r||i.duration,u=u||i.type),f&&(o.unshift(f),r=r||f.duration,u=u||f.type);return(i=ri(h),i.type=n,!i["class"])?!1:(r&&(r=t.duration(r),r.valueOf()&&(i.duration=r,e=ti(r),r.as(e)===1&&(i.singleUnit=e,o.unshift(s[e]||{})))),i.defaults=nt(c),i.overrides=nt(o),this.buildViewSpecOptions(i),this.buildViewSpecButtonText(i,n),i)},buildViewSpecOptions:function(n){n.options=nt([r.defaults,n.defaults,this.dirDefaults,this.langDefaults,this.overrides,n.overrides,this.dynamicOverrides]);yu(n.options)},buildViewSpecButtonText:function(n,t){function i(i){var r=i.buttonText||{};return r[t]||(n.singleUnit?r[n.singleUnit]:null)}n.buttonTextOverride=i(this.dynamicOverrides)||i(this.overrides)||n.overrides.buttonText;n.buttonTextDefault=i(this.langDefaults)||i(this.dirDefaults)||n.defaults.buttonText||i(r.defaults)||(n.duration?this.humanizeDuration(n.duration):null)||t},instantiateView:function(n){var t=this.getViewSpec(n);return new t["class"](this,n,t.options,t.duration)},isValidViewType:function(n){return Boolean(this.getViewSpec(n))},pushLoading:function(){this.loadingLevel++||this.trigger("loading",null,!0,this.view)},popLoading:function(){--this.loadingLevel||this.trigger("loading",null,!1,this.view)},buildSelectSpan:function(n,t){var i=this.moment(n).stripZone(),r;return r=t?this.moment(t).stripZone():i.hasTime()?i.clone().add(this.defaultTimedEventDuration):i.clone().add(this.defaultAllDayEventDuration),{start:i,end:r}}});r.mixin(uu);r.mixin({optionHandlers:null,bindOption:function(n,t){this.bindOptions([n],t)},bindOptions:function(n,t){for(var r={func:t,names:n},i=0;i<n.length;i++)this.registerOptionHandlerObj(n[i],r);this.triggerOptionHandlerObj(r)},registerOptionHandlerObj:function(n,t){(this.optionHandlers[n]||(this.optionHandlers[n]=[])).push(t)},triggerOptionHandlers:function(n){for(var i=this.optionHandlers[n]||[],t=0;t<i.length;t++)this.triggerOptionHandlerObj(i[t])},triggerOptionHandlerObj:function(n){for(var i=n.names,r=[],t=0;t<i.length;t++)r.push(this.options[i[t]]);n.func.apply(this,r)}});r.defaults={titleRangeSeparator:" – ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",scrollTime:"06:00:00",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventOrder:"title",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3};r.englishDefaults={dayPopoverFormat:"dddd, MMMM D"};r.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}};w=i.langs={};i.datepickerLang=function(t,i,r){var u=w[t]||(w[t]={});u.isRTL=r.isRTL;u.weekNumberTitle=r.weekHeader;n.each(ve,function(n,t){u[n]=t(r)});n.datepicker&&(n.datepicker.regional[i]=n.datepicker.regional[t]=r,n.datepicker.regional.en=n.datepicker.regional[""],n.datepicker.setDefaults(r))};i.lang=function(t,i){var u,f;u=w[t]||(w[t]={});i&&(u=w[t]=nt([u,i]));f=pu(t);n.each(ye,function(n,t){u[n]==null&&(u[n]=t(f,u))});r.defaults.lang=t};var ve={buttonText:function(n){return{prev:fi(n.prevText),next:fi(n.nextText),today:fi(n.currentText)}},monthYearFormat:function(n){return n.showMonthAfterYear?"YYYY["+n.yearSuffix+"] MMMM":"MMMM YYYY["+n.yearSuffix+"]"}},ye={dayOfMonthFormat:function(n,t){var i=n.longDateFormat("l");return i=i.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),t.isRTL?i+=" ddd":i="ddd "+i,i},mediumTimeFormat:function(n){return n.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(n){return n.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(n){return n.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(n){return n.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(n){return n.longDateFormat("LT").replace(/\s*a$/i,"")}},pe={smallDayDateFormat:function(n){return n.isRTL?"D dd":"dd D"},weekFormat:function(n){return n.isRTL?"w[ "+n.weekNumberTitle+"]":"["+n.weekNumberTitle+" ]w"},smallWeekFormat:function(n){return n.isRTL?"w["+n.weekNumberTitle+"]":"["+n.weekNumberTitle+"]w"}};i.lang("en",r.englishDefaults);i.sourceNormalizers=[];i.sourceFetchers=[];wu={dataType:"json",cache:!1};bu=1;r.prototype.normalizeEvent=function(){};r.prototype.spanContainsSpan=function(n,t){var i=n.start.clone().stripZone(),r=this.getEventEnd(n).stripZone();return t.start>=i&&t.end<=r};r.prototype.getPeerEvents=function(n,t){for(var u=this.getEventCache(),f=[],r,i=0;i<u.length;i++)r=u[i],t&&t._id===r._id||f.push(r);return f};pi={id:"_fcBusinessHours",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"};r.prototype.getCurrentBusinessHourEvents=function(n){return this.computeBusinessHourEvents(n,this.options.businessHours)};r.prototype.computeBusinessHourEvents=function(t,i){return i===!0?this.expandBusinessHourEvents(t,[{}]):n.isPlainObject(i)?this.expandBusinessHourEvents(t,[i]):n.isArray(i)?this.expandBusinessHourEvents(t,i,!0):[]};r.prototype.expandBusinessHourEvents=function(t,i,r){for(var o=this.getView(),e=[],u,f=0;f<i.length;f++)(u=i[f],!r||u.dow)&&(u=n.extend({},pi,u),t&&(u.start=null,u.end=null),e.push.apply(e,this.expandEvent(this.buildEventFromInput(u),o.start,o.end)));return e};var wi=i.BasicView=g.extend({scroller:null,dayGridClass:rt,dayGrid:null,dayNumbersVisible:!1,weekNumbersVisible:!1,weekNumberWidth:null,headContainerEl:null,headRowEl:null,initialize:function(){this.dayGrid=this.instantiateDayGrid();this.scroller=new vu({overflowX:"hidden",overflowY:"auto"})},instantiateDayGrid:function(){var n=this.dayGridClass.extend(ke);return new n(this)},setRange:function(n){g.prototype.setRange.call(this,n);this.dayGrid.breakOnWeeks=/year|month|week/.test(this.intervalUnit);this.dayGrid.setRange(n)},computeRange:function(n){var t=g.prototype.computeRange.call(this,n);return/year|month/.test(t.intervalUnit)&&(t.start.startOf("week"),t.start=this.skipHiddenDays(t.start),t.end.weekday()&&(t.end.add(1,"week").startOf("week"),t.end=this.skipHiddenDays(t.end,-1,!0))),t},renderDates:function(){this.dayNumbersVisible=this.dayGrid.rowCnt>1;this.weekNumbersVisible=this.opt("weekNumbers");this.dayGrid.numbersVisible=this.dayNumbersVisible||this.weekNumbersVisible;this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml());this.renderHead();this.scroller.render();var t=this.scroller.el.addClass("fc-day-grid-container"),i=n('<div class="fc-day-grid" />').appendTo(t);this.el.find(".fc-body > tr > td").append(t);this.dayGrid.setElement(i);this.dayGrid.renderDates(this.hasRigidRows())},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml());this.headRowEl=this.headContainerEl.find(".fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates();this.dayGrid.removeElement();this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.dayGrid.unrenderBusinessHours()},renderSkeletonHtml:function(){return'<table><thead class="fc-head"><tr><td class="fc-head-container '+this.widgetHeaderClass+'"><\/td><\/tr><\/thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'"><\/td><\/tr><\/tbody><\/table>'},weekNumberStyleAttr:function(){return this.weekNumberWidth!==null?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var n=this.opt("eventLimit");return n&&typeof n!="number"},updateWidth:function(){this.weekNumbersVisible&&(this.weekNumberWidth=nr(this.el.find(".fc-week-number")))},setHeight:function(n,t){var i=this.opt("eventLimit"),r,u;this.scroller.clear();ki(this.headRowEl);this.dayGrid.removeSegPopover();i&&typeof i=="number"&&this.dayGrid.limitRows(i);r=this.computeScrollerHeight(n);this.setGridHeight(r,t);i&&typeof i!="number"&&this.dayGrid.limitRows(i);t||(this.scroller.setHeight(r),u=this.scroller.getScrollbarWidths(),(u.left||u.right)&&(bi(this.headRowEl,u),r=this.computeScrollerHeight(n),this.scroller.setHeight(r)),this.scroller.lockOverflow(u))},computeScrollerHeight:function(n){return n-tr(this.el,this.scroller.el)},setGridHeight:function(n,t){t?gi(this.dayGrid.rowEls):di(this.dayGrid.rowEls,n,!0)},queryScroll:function(){return this.scroller.getScrollTop()},setScroll:function(n){this.scroller.setScrollTop(n)},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(n,t){return this.dayGrid.queryHit(n,t)},getHitSpan:function(n){return this.dayGrid.getHitSpan(n)},getHitEl:function(n){return this.dayGrid.getHitEl(n)},renderEvents:function(n){this.dayGrid.renderEvents(n);this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(n,t){return this.dayGrid.renderDrag(n,t)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(n){this.dayGrid.renderSelection(n)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),ke={renderHeadIntroHtml:function(){var n=this.view;return n.weekNumbersVisible?'<th class="fc-week-number '+n.widgetHeaderClass+'" '+n.weekNumberStyleAttr()+"><span>"+f(n.opt("weekNumberTitle"))+"<\/span><\/th>":""},renderNumberIntroHtml:function(n){var t=this.view;return t.weekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+"><span>"+this.getCellDate(n,0).format("w")+"<\/span><\/td>":""},renderBgIntroHtml:function(){var n=this.view;return n.weekNumbersVisible?'<td class="fc-week-number '+n.widgetContentClass+'" '+n.weekNumberStyleAttr()+"><\/td>":""},renderIntroHtml:function(){var n=this.view;return n.weekNumbersVisible?'<td class="fc-week-number" '+n.weekNumberStyleAttr()+"><\/td>":""}},de=i.MonthView=wi.extend({computeRange:function(n){var t=wi.prototype.computeRange.call(this,n),i;return this.isFixedWeeks()&&(i=Math.ceil(t.end.diff(t.start,"weeks",!0)),t.end.add(6-i,"weeks")),t},setGridHeight:function(n,t){t=t||this.opt("weekMode")==="variable";t&&(n*=this.rowCnt/6);di(this.dayGrid.rowEls,n,!t)},isFixedWeeks:function(){var n=this.opt("weekMode");return n?n==="fixed":this.opt("fixedWeekCount")}});a.basic={"class":wi};a.basicDay={type:"basic",duration:{days:1}};a.basicWeek={type:"basic",duration:{weeks:1}};a.month={"class":de,duration:{months:1},defaults:{fixedWeekCount:!0}};var ge=i.AgendaView=g.extend({scroller:null,timeGridClass:yi,timeGrid:null,dayGridClass:rt,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid();this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid());this.scroller=new vu({overflowX:"hidden",overflowY:"auto"})},instantiateTimeGrid:function(){var n=this.timeGridClass.extend(no);return new n(this)},instantiateDayGrid:function(){var n=this.dayGridClass.extend(to);return new n(this)},setRange:function(n){g.prototype.setRange.call(this,n);this.timeGrid.setRange(n);this.dayGrid&&this.dayGrid.setRange(n)},renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml());this.renderHead();this.scroller.render();var t=this.scroller.el.addClass("fc-time-grid-container"),i=n('<div class="fc-time-grid" />').appendTo(t);this.el.find(".fc-body > tr > td").append(t);this.timeGrid.setElement(i);this.timeGrid.renderDates();this.bottomRuleEl=n('<hr class="fc-divider '+this.widgetHeaderClass+'"/>').appendTo(this.timeGrid.el);this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight());this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},unrenderDates:function(){this.timeGrid.unrenderDates();this.timeGrid.removeElement();this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement());this.scroller.destroy()},renderSkeletonHtml:function(){return'<table><thead class="fc-head"><tr><td class="fc-head-container '+this.widgetHeaderClass+'"><\/td><\/tr><\/thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+this.widgetHeaderClass+'"/>':"")+"<\/td><\/tr><\/tbody><\/table>"},axisStyleAttr:function(){return this.axisWidth!==null?'style="width:'+this.axisWidth+'px"':""},renderBusinessHours:function(){this.timeGrid.renderBusinessHours();this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours();this.dayGrid&&this.dayGrid.unrenderBusinessHours()},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(n){this.timeGrid.renderNowIndicator(n)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(n){this.timeGrid.updateSize(n);g.prototype.updateSize.call(this,n)},updateWidth:function(){this.axisWidth=nr(this.el.find(".fc-axis"))},setHeight:function(n,t){var i,r,u;this.bottomRuleEl.hide();this.scroller.clear();ki(this.noScrollRowEls);this.dayGrid&&(this.dayGrid.removeSegPopover(),i=this.opt("eventLimit"),i&&typeof i!="number"&&(i=io),i&&this.dayGrid.limitRows(i));t||(r=this.computeScrollerHeight(n),this.scroller.setHeight(r),u=this.scroller.getScrollbarWidths(),(u.left||u.right)&&(bi(this.noScrollRowEls,u),r=this.computeScrollerHeight(n),this.scroller.setHeight(r)),this.scroller.lockOverflow(u),this.timeGrid.getTotalSlatHeight()<r&&this.bottomRuleEl.show())},computeScrollerHeight:function(n){return n-tr(this.el,this.scroller.el)},computeInitialScroll:function(){var i=t.duration(this.opt("scrollTime")),n=this.timeGrid.computeTimeTop(i);return n=Math.ceil(n),n&&n++,n},queryScroll:function(){return this.scroller.getScrollTop()},setScroll:function(n){this.scroller.setScrollTop(n)},prepareHits:function(){this.timeGrid.prepareHits();this.dayGrid&&this.dayGrid.prepareHits()},releaseHits:function(){this.timeGrid.releaseHits();this.dayGrid&&this.dayGrid.releaseHits()},queryHit:function(n,t){var i=this.timeGrid.queryHit(n,t);return!i&&this.dayGrid&&(i=this.dayGrid.queryHit(n,t)),i},getHitSpan:function(n){return n.component.getHitSpan(n)},getHitEl:function(n){return n.component.getHitEl(n)},renderEvents:function(n){for(var i=[],r=[],u=[],f,t=0;t<n.length;t++)n[t].allDay?i.push(n[t]):r.push(n[t]);f=this.timeGrid.renderEvents(r);this.dayGrid&&(u=this.dayGrid.renderEvents(i));this.updateHeight()},getEventSegs:function(){return this.timeGrid.getEventSegs().concat(this.dayGrid?this.dayGrid.getEventSegs():[])},unrenderEvents:function(){this.timeGrid.unrenderEvents();this.dayGrid&&this.dayGrid.unrenderEvents()},renderDrag:function(n,t){return n.start.hasTime()?this.timeGrid.renderDrag(n,t):this.dayGrid?this.dayGrid.renderDrag(n,t):void 0},unrenderDrag:function(){this.timeGrid.unrenderDrag();this.dayGrid&&this.dayGrid.unrenderDrag()},renderSelection:function(n){n.start.hasTime()||n.end.hasTime()?this.timeGrid.renderSelection(n):this.dayGrid&&this.dayGrid.renderSelection(n)},unrenderSelection:function(){this.timeGrid.unrenderSelection();this.dayGrid&&this.dayGrid.unrenderSelection()}}),no={renderHeadIntroHtml:function(){var n=this.view,t;return n.opt("weekNumbers")?(t=this.start.format(n.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+n.widgetHeaderClass+'" '+n.axisStyleAttr()+"><span>"+f(t)+"<\/span><\/th>"):'<th class="fc-axis '+n.widgetHeaderClass+'" '+n.axisStyleAttr()+"><\/th>"},renderBgIntroHtml:function(){var n=this.view;return'<td class="fc-axis '+n.widgetContentClass+'" '+n.axisStyleAttr()+"><\/td>"},renderIntroHtml:function(){var n=this.view;return'<td class="fc-axis" '+n.axisStyleAttr()+"><\/td>"}},to={renderBgIntroHtml:function(){var n=this.view;return'<td class="fc-axis '+n.widgetContentClass+'" '+n.axisStyleAttr()+"><span>"+(n.opt("allDayHtml")||f(n.opt("allDayText")))+"<\/span><\/td>"},renderIntroHtml:function(){var n=this.view;return'<td class="fc-axis" '+n.axisStyleAttr()+"><\/td>"}},io=5,ku=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];return a.agenda={"class":ge,defaults:{allDaySlot:!0,allDayText:"all-day",slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},a.agendaDay={type:"agenda",duration:{days:1}},a.agendaWeek={type:"agenda",duration:{weeks:1}},i});
function loadVideoJSAndCSS(n,t){$("body").find('script[src$="videojs-seek-buttons.js"]').length==0&&($("body").append('<script src="/Scripts/Helpers/Util.js"/><\/script>').append('<script src="/Scripts/videoplayer/videojs/7.0.5/video.js"/><\/script>').append('<script src="/Scripts/videoplayer/videojs/videojs-contrib-hls/5.14.1/videojs-contrib-hls.js"/><\/script>').append('<script src="/Scripts/videoplayer/videojs/quality-levels/2.0.5/videojs-contrib-quality-levels.js"/><\/script>').append('<script src="/Scripts/videoplayer/videojs/videojs-errors/videojs-errors.js"/><\/script>').append('<script src="/Scripts/videoplayer/videojs/videojs-seek-buttons/videojs-seek-buttons.js"><\/script>'),$("head").append("<link href='/Scripts/videoplayer/videojs/7.0.5/video-js.min.css' rel='stylesheet'/>").append("<link href='/Scripts/videoplayer/videojs/videojs-seek-buttons/videojs-seek-buttons.css' rel='stylesheet' />").append("<link href='/Scripts/videoplayer/videojs/videojs-errors/videojs-errors.css' rel='stylesheet' />"));checkVideoJsInitilize(n,t)}function checkVideoJsInitilize(n,t){if(videoJsInitilized||typeof videojs!="undefined"){videoJsInitilized=!0;var i=PlayDemoVideoModel(t,n)}else setTimeout(function(){checkVideoJsInitilize(n,t)},500)}function secondsToTimeFormat(n){return n.toString().toHHMMSS()}var videoJsInitilized=!1,PlayDemoVideoModel;$("body").on("click",".btnPlayDemoVideo",function(){var t=$(this).closest(".divImageThumbnail").prev(".clsPlayDemoVideo"),n;$(this).closest(".divImageThumbnail").find(".btnPlayDemoVideo").hide();$(this).closest(".divImageThumbnail").find(".demoVideoSpinner").show();n=$(this).attr("data-seminarId");setTimeout(function(){loadVideoJSAndCSS(t,n)},100)});PlayDemoVideoModel=function(n,t){var i=this,r;i.seminarId=n;i.targetElement=t;i.demoMediaClip=null;i.demoStartTime=null;i.curMediaClip=null;i.playerInitialized=!1;i.hls;i.init=function(){typeof vidPlayer!="undefined"&&(vidPlayer.dispose(),$(".divImageThumbnail").show());$.ajax({type:"GET",url:"/ShowtimeWidget/GetDemoViewSeminar",dataType:"json",global:!1,data:{SeminarId:i.seminarId},success:function(n){if($(".demoVideoSpinner").hide(),$(".btnPlayDemoVideo").show(),n!=null&&n.mediaClip!=null&&n.mediaClip.length>0)i.demoMediaClip=n.mediaClip,i.demoStartTime=n.DemoStartTime!=undefined&&n.DemoStartTime!=null?n.DemoStartTime:0,i.compositionCompleteForDemoVideo();else{alert("Video not configured yet, please try later.");return}},error:function(){$(".demoVideoSpinner").hide();$(".btnPlayDemoVideo").show();console.log("error: getting seminar")}})};i.demoGetMediaclipByStartTime=function(){var n,t;i.demoMediaClip!=null&&i.demoMediaClip!=undefined&&i.demoMediaClip.length>0&&(n=jQuery.grep(i.demoMediaClip,function(n){return n.TotalDurationByOrder+n.TotalDuration>=i.demoStartTime}),n=n.sort(function(n,t){return t.TotalDurationByOrder+t.TotalDuration-(n.TotalDurationByOrder+n.TotalDuration)}).pop(),n?(t=i.demoStartTime-n.TotalDurationByOrder+n.InPoint,i.curMediaClip!=null&&i.curMediaClip==n&&vidPlayer?vidPlayer.currentTime(t):i.gotoMediaClipForDemoVideo(n,t)):i.handleCompleteForDemoVideo())};i.gotoMediaClipForDemoVideo=function(n,t){i.playerInitialized&&(t=t||null,i.curMediaClip!=null&&i.curMediaClip===n?togoPos=t:(i.curMediaClip=n,i.curMediaClip!=null&&(curVidMediaClipId=i.curMediaClip.MediaClipId,vidPlayer.reset(),Helper.VIDEOJS.removeAllRemoteTextTrack(vidPlayer),i.curMediaClip.Media.Ttml!=null?vidPlayer.src({src:Helper.VIDEOJS.prepareMediaURL(i.curMediaClip.Media.Source),type:Helper.VIDEOJS.getType(i.curMediaClip.Media.Source)}):vidPlayer.src({src:Helper.VIDEOJS.prepareMediaURL(i.curMediaClip.Media.Source),type:Helper.VIDEOJS.getType(i.curMediaClip.Media.Source)}),togoPos=t)))};r=!1;i.intializeMediaForDemo=function(){r||(r=!0,vidPlayer.volume(1),i.demoGetMediaclipByStartTime())};i.updateState=function(){curVidState=typeof vidPlayer.getCurrentState=="function"?vidPlayer.getCurrentState():Helper.VIDEOJS.getCurrentState(vidPlayer)||"Idle";curVidState!==getLastState()&&vidPlayerProcess.push({state:curVidState,time:new Date})};i.compositionCompleteForDemoVideo=function(){var t,n,r;$(i.targetElement).find("#media-video").length||(t='<video id="media-video" class="video-js vjs-default-skin vjs-big-play-centered vjs-fluid" crossorigin="anonymous"><\/video>',$(i.targetElement).html(t),$(i.targetElement).next(".divImageThumbnail").hide(),$(i.targetElement).show());$(i.targetElement).show();i.demoMediaClip!=null&&(allmediaTotalDuration=i.sumOfMediaClipTotalDuration(i.demoMediaClip,0),(allmediaTotalDuration===0||i.demoStartTime>allmediaTotalDuration)&&i.handleCompleteForDemoVideo(),n="https://ce21media.streaming.mediaservices.windows.net/885966dd-dedf-4ccc-bd96-f85257d9d7ae/test_169_v2.ism/Manifest(format=m3u8-aapl-v3)",videojs("media-video",{techOrder:["html5"],aspectRatio:"16:9",preload:"auto",autoplay:!0,controls:!0,controlBar:{audioTrackButton:!1,playToggle:!0,remainingTimeDisplay:!1,progressControl:!1,volumeMenuButton:{inline:!1,vertical:!0},fullscreenToggle:!1},sources:[{src:Helper.VIDEOJS.prepareMediaURL(n),type:Helper.VIDEOJS.getType(n)}]}).ready(function(){vidPlayer=this;this.on("error",function(){var n=this.error().message,t=this.error().code,i=this.duration();t=="4"&&i=="0"&&n.toLowerCase()=="no compatible source was found for this media."&&!1&&setErrorHtml()});i.hls=this.tech({IWillNotUseThisInPlugins:!0}).hls;i.playerInitialized=!0;i.intializeMediaForDemo();i.updateState;this.on("timeupdate",function(){var n,t,r;if(i.curMediaClip!=null){if(vidPlayer.getCurrentState()!=="IDLE"){n=0;try{n=this.tech_.readyState()}catch(u){}if(togoPos){if(togoPos>vidPlayer.duration()&&vidPlayer.duration()>0){i.handleCompleteForDemoVideo();togoPos=null;return}try{console.log("seeked: togoPos"+togoPos);this.tech_.setCurrentTime(togoPos);i.curMediaClip&&togoPos>=curMediaClip.InPoint&&togoPos<=curMediaClip.OutPoint&&(seekBlock=!0);togoPos=null}catch(u){}}curVidTimeCode=curMediaClip.TriggerTime+(this.currentTime()-curMediaClip.InPoint);t=curMediaClip.TotalDurationByOrder+(this.currentTime()-curMediaClip.InPoint);r=i.demoStartTime+180-t;r<=0&&i.handleCompleteForDemoVideo()}i.curMediaClip&&curMediaClip.OutPoint&&this.currentTime()>Number(curMediaClip.OutPoint)&&i.nextPlayDemoVideo();i.curMediaClip&&curMediaClip.InPoint&&(this.currentTime()<Number(curMediaClip.InPoint)?seekBlock||(seekBlock=!0,vidPlayer.currentTime(Number(curMediaClip.InPoint))):seekBlock=!1)}});this.on("ended",function(){i.updateState;i.nextPlayDemoVideo()});this.on("loadeddata",function(){i.updateState;i.playerInitialized&&(seekBlock=!1,setTimeout(function(){vidPlayer.getCurrentState()==="IDLE"&&vidPlayer.play()},100))});this.on("pause",function(){});this.getCurrentQuality=function(){return hls.selectPlaylist().attributes.RESOLUTION.height+"p"};this.setCurrentQuality=function(){};this.getRenderingMode=function(){return vidPlayer.techName_.toLowerCase()};this.getCurrentState=function(){return vidPlayer.paused()?vidPlayer.paused()?"PAUSED":vidPlayer.seeking()&&vidPlayer.bufferedPercent()>0?"BUFFERING":vidPlayer.readyState()>1?"IDLE":undefined:"PLAYING"}}));$(window).resize(function(){clearTimeout(r);vidPlayer&&(r=setTimeout(vidPlayer.resizePlayer,500))})};i.sumOfMediaClipTotalDuration=function(n,t){var i=0;return n!=null&&n!=undefined&&n.length>0&&(t>0?jQuery.each(n,function(n,t){i+=t.TotalDuration}):jQuery.each(n,function(n,t){i+=t.TotalDuration})),i};i.handleCompleteForDemoVideo=function(){i.playerInitialized&&vidPlayer.paused();$(i.targetElement).next(".divImageThumbnail").show();$(i.targetElement).hide().html("")};i.nextPlayDemoVideo=function(){demoMediaClip!=null&&demoMediaClip.indexOf(curMediaClip)+1<demoMediaClip.length?i.gotoMediaClipForDemoVideo(demoMediaClip[demoMediaClip.indexOf(curMediaClip)+1],null):i.handleCompleteForDemoVideo()};init()};String.prototype.toHHMMSS=function(){var r=parseInt(this,10),n=Math.floor(r/3600),t=Math.floor((r-n*3600)/60),i=r-n*3600-t*60,u;return n<10&&(n="0"+n),t<10&&(t="0"+t),i<10&&(i="0"+i),u="",n>0?n+":"+t+":"+i:t+":"+i};
var googleAnalytics={sendToGTag:function(n,t){var i=$("#hdnGoogleAnalyticsId").val(),r=$("#hdnEnhancedEcommerceGoogleAnalytics").val();typeof gtag=="function"&&i&&r&&gtag("event",n,t)},sendToTagManager:function(n,t){var r=$("#hdnGoogleTagManagerId").val(),i;typeof dataLayer=="object"&&typeof dataLayer.push=="function"&&r&&(i={event:n,ecommerce:t},dataLayer.push(i))},itemViewEvent:function(){var t=$("#itemViewDetail").val(),n;t&&(n=JSON.parse(t),n&&n.analytics&&this.sendToGTag("view_item",n.analytics),n&&n.tagManagerEcommerce&&this.sendToTagManager("",n.tagManagerEcommerce))},addToCartEvent:function(n){n&&n.analytics&&this.sendToGTag("add_to_cart",n.analytics);n&&n.tagManagerEcommerce&&this.sendToTagManager("addToCart",n.tagManagerEcommerce)},removeFromCartItemEvent:function(n){n&&n.analytics&&this.sendToGTag("remove_from_cart",n.analytics);n&&n.tagManagerEcommerce&&this.sendToTagManager("removeFromCart",n.tagManagerEcommerce)},beginCheckoutEvent:function(){var t=$("#checkoutItemDetails").val(),n;t&&(n=JSON.parse($("#checkoutItemDetails").val()),n&&n.analytics&&this.sendToGTag("begin_checkout",n.analytics),n&&n.tagManagerEcommerce&&this.sendToTagManager("checkout",n.tagManagerEcommerce))},purchaseEvent:function(){var t=$("#analyticsPurchaseDetails").val(),n;t&&(n=JSON.parse($("#analyticsPurchaseDetails").val()),n&&n.analytics&&this.sendToGTag("purchase",n.analytics),n&&n.tagManagerEcommerce&&this.sendToTagManager("",n.tagManagerEcommerce))}};$(document).ready(function(){googleAnalytics.itemViewEvent();setTimeout(function(){googleAnalytics.purchaseEvent()},900);setTimeout(function(){googleAnalytics.beginCheckoutEvent()},900)});
var faceBookAnalytics={sendToFBAnalytic:function(n,t){var i=$("#hdnFacebookAnalyticId").val();typeof fbq=="function"&&i&&fbq("track",n,t)},itemViewEvent:function(){var t=$("#itemViewDetail").val(),n;t&&(n=JSON.parse(t),n&&n.dataFBAnalytics&&this.sendToFBAnalytic("ViewContent",n.dataFBAnalytics))},addToCartEvent:function(n){n&&n.dataFBAnalytics&&$.each(n.dataFBAnalytics,function(n,t){faceBookAnalytics.sendToFBAnalytic("AddToCart",t)})},removeFromCartItemEvent:function(n){n&&n.dataFBAnalytics&&this.sendToFBAnalytic("RemoveFromCart",n.dataFBAnalytics)},beginCheckoutEvent:function(){var t=$("#checkoutItemDetails").val(),n;t&&(n=JSON.parse($("#checkoutItemDetails").val()),n&&n.dataFBAnalytics&&this.sendToFBAnalytic("InitiateCheckout",n.dataFBAnalytics))},purchaseEvent:function(){var t=$("#analyticsPurchaseDetails").val(),n;t&&(n=JSON.parse($("#analyticsPurchaseDetails").val()),n&&n.dataFBAnalytics&&this.sendToFBAnalytic("Purchase",n.dataFBAnalytics))}};$(document).ready(function(){var n=$("#hdnFacebookAnalyticId").val();typeof fbq=="function"&&n&&(faceBookAnalytics.itemViewEvent(),setTimeout(function(){faceBookAnalytics.purchaseEvent()},900),setTimeout(function(){faceBookAnalytics.beginCheckoutEvent()},900))});
Util=function(){if(typeof Util!="undefined")return Util;return new function(){function t(n){var t=n.substring(n.indexOf("(")+1,n.indexOf(")"));return n=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),new Function(t,n)}var n=this;n.ConvertToUtc=function(n){var r=7-(new Date).getTimezoneOffset()/60,t=new Date(n),i=t.getTime();return i+=r*36e5,t.setTime(i),t};n.ConvertToUserTimeZone=function(n){var u=n.split(" "),t=u[0].split("-"),i=u[1].split(":"),e=7-(new Date).getTimezoneOffset()/60,r=new Date(t[0],t[1]-1,t[2],i[0],i[1],i[2]),f=r.getTime();return f+=-36e5*e,r.setTime(f),r};n.stringToHex=function(n){for(var i="",t=0;t<n.length;t++)i+=""+n.charCodeAt(t).toString(16);return i};n.padZero=function(n,t){var i="00000000000000000000000000"+n;return i.substr(i.length-t)};n.ConvertTo24HourTime=function(n){var t=n.getHours(),i=n.getMinutes();return t<10&&(t="0"+t),i<10&&(i="0"+i),t+":"+i};n.Inherit=function(){for(var n=1;n<arguments.length;n++);};n.GetQueryStringParam=function(n){for(var i,u=location.search.slice(1).split("&"),t={},r=0;r<u.length;r++)i=u[r].split("="),!i[0]||(t[i[0]]=decodeURIComponent(i[1]||""));return n!=null&&(t=t[n]),t};n.ConvertLocalToUTC=function(n){var t=n.getTimezoneOffset()*6e4,i=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),r=i+t*2;return n.setTime(r),n};n.ConvertUTCToLocal=function(n){var t=n.getTimezoneOffset()*6e4,i=n.getTime(),r=i-t;return n.setTime(r),n};n.getCurrentDateTime=function(){return n.getDateTimeString(new Date)};n.getDateTimeString=function(t){if(!t)return"";var i=n.getDateString(t,"{YYYY}-{MM}-{DD}"),r=n.getTimeString(t);return i+" "+r};n.getDateString=function(t,i){if(!t)return"";var r=t.getFullYear(),u=n.getZeroPaddedString(t.getMonth()+1,2),f=n.getZeroPaddedString(t.getDate(),2);return n.format(i,{YYYY:r,MM:u,DD:f,YY:r%100})};n.getTimeString=function(t){if(!t)return"";var i=n.getZeroPaddedString(t.getHours(),2),r=n.getZeroPaddedString(t.getMinutes(),2),u=n.getZeroPaddedString(t.getSeconds(),2);return i+":"+r+":"+u};n.getDaysCount=function(t){var o=new Date,i,r,u,f,e;if(t){if(e=t,t=n.ConvertUTCToLocal(new Date(t)),t=="Invalid Date")return e}else return n.getDateTimeString();return i=Math.abs(o-t)/1e3,r=Math.floor(i/86400),i-=r*86400,u=Math.floor(i/3600)%24,i-=u*3600,f=Math.floor(i/60)%60,i-=f*60,r+" Days "+u+" Hours "+f+" Minutes"};n.getMinsAndSecFromSec=function(n){if(n){var t=0,i=0;return n>=60?(t=Math.floor(n/60),i=n-t*60):i=n,{minutes:t,seconds:i}}return null};n.getZeroPaddedString=function(n,t){var r,i;for(n=n.toString(),r=t-n.length,i=0;i<r;i++)n="0"+n;return n};n.makeNativeArray=function(n){var i,t;if(null==n||n.length==null)return null;for(i=[],t=0;t<n.length;t++)i.push(n[t]);return i};n.getErrorObj=function(n){return{message:n.message,name:n.name,fileName:n.fileName,lineNumber:n.lineNumber,columnNumber:n.columnNumber,description:n.description,number:n.number,stack:n.stack}};n.getPropertyByString=function(n,t){var f,i,u,r;for(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),f=t.split(".");f.length;)if(i=f.shift(),n&&i in n)n=n[i]&&typeof n[i]=="function"?n[i]():n[i];else if(n instanceof Array&&isNaN(parseInt(i))){for(u=[],r=0;r<n.length;r++)n[r][i]&&u.push(n[r][i]);if(u.length>0)n=u;else return}else return;return n};n.getCurrentDateForService=function(){var t=new Date,i=t.getFullYear(),r=n.getZeroPaddedString(t.getMonth()+1,2),u=n.getZeroPaddedString(t.getDate(),2);return r+"/"+u+"/"+i};n.sortFunction=function(n,i){var r="function (item1, item2) {";return r+="var returnVal = 0, sortItem1, sortItem2;",i=="desc"?(r+="sortItem1 = item1."+n+";",r+="sortItem2 = item2."+n+";"):i=="asc"&&(r+="sortItem1 = item2."+n+";",r+="sortItem2 = item1."+n+";"),r+="return (sortItem2 > sortItem1 ? 1 : (sortItem2 < sortItem1 ? -1 : 0)); // to handle both string and integer.",r+="}",t(r)};n.NumericOnly=function(n){var t=window.event?n.keyCode:n.which;return n.keyCode==8||n.keyCode==37||n.keyCode==39?!0:t<48||t>57?!1:!0};n.isSessionStorageSupported=function(){try{return window.sessionStorage&&typeof sessionStorage!=undefined}catch(n){return!1}};n.isLocalStorageSupported=function(){try{return window.localStorage&&typeof localStorage!=undefined}catch(n){return!1}};n.stripHtml=function(n){try{var t=document.createElement("div");return t.innerHTML=n,t.textContent||t.innerText||""}catch(i){return n}};n.hexToRGB=function(n){let t=0,i=0,r=0;return n.length==4?(t="0x"+n[1]+n[1],i="0x"+n[2]+n[2],r="0x"+n[3]+n[3]):n.length==7&&(t="0x"+n[1]+n[2],i="0x"+n[3]+n[4],r="0x"+n[5]+n[6]),"rgb("+ +t+", "+ +i+", "+ +r+")"};Object.freeze&&Object.freeze(n)}}();Array.prototype.diff==undefined&&(Array.prototype.diff=function(n){return this.filter(function(t){return n.indexOf(t)<0})});Array.prototype.unique==undefined&&(Array.prototype.unique=function(n){for(var i,t=this.concat(n),r=0;r<t.length;++r)for(i=r+1;i<t.length;++i)t[r]===t[i]&&t.splice(i--,1);return t});Number.prototype.between==undefined&&(Number.prototype.between=function(n,t){var i=Math.min.apply(Math,[n,t]),r=Math.max.apply(Math,[n,t]);return this>=i&&this<=r}),function(){Helper=new function(){var n=this}}(),function(){Helper.Common=new function(){function t(n,t){$(t).tooltip("hide").attr("data-original-title",n).tooltip("show")}function i(n){setTimeout(function(){$(n).attr("data-original-title","").tooltip("destroy")},1e3)}var n=this;n.HtmlEncode=function(n){return $("<div/>").text(n).html()};n.HtmlDecode=function(n){return $("<div/>").html(n).text()};n.UrlEncode=function(n){return encodeURIComponent(n)};n.UrlDecode=function(n){return decodeURIComponent(n)};n.QueryParamFromUri=function(n,t){var u=n.indexOf("?"),f=n.length,r,i;return n=n.substring(u,f),t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),r=new RegExp("[\\?&]"+t+"=([^&#]*)"),i=r.exec(n),i===null?"":decodeURIComponent(i[1].replace(/\+/g," "))};n.HashParamFromUri=function(n,t){var i=n.split("#");return i.length>t?i[t]:null};n.Linkify=function(n,t){return n.replace(/(https?:\/\/[^\s]+)(\.?\b)/gi,'<a target="'+(t?t:"_blank")+'" href="$1">$1<\/a>$2')};n.ReplaceAll=function(n,t,i){var u,r;if(n)for(u=n.length,r=0;r<u;r++)n.indexOf(t)!==-1?n=n.replace(t,i):r=u;return n};n.GetUserTimeZone=function(){return/\((.*)\)/.exec((new Date).toString())[1]};n.IsDayLightSaving=function(){return(new Date).getTimezoneOffset()<Math.max(new Date((new Date).getFullYear(),0,1).getTimezoneOffset(),new Date((new Date).getFullYear(),6,1).getTimezoneOffset())};n.GetUserTimeZoneOffset=function(){return(new Date).getTimezoneOffset()};n.FormatToISOAndGetLocaDateTime=function(n){return n?new Date(new Date(n).toISOString()):new Date((new Date).toISOString())};n.CreateCookie=function(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/"};n.ReadCookie=function(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1,t.length);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return null};n.EraseCookie=function(t){n.CreateCookie(t,"",-1)};n.GenerateKey=function(n,t){var i,r,u;for(t=t||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+=",i="",r=0;r<n;r++)u=Math.floor(Math.random()*t.length),i+=t.substring(u,u+1);return i};n.JSON2XML=function(n,t){var i=function(n,t,r){var u="",e,s,o,f;if(n instanceof Array)for(e=0,s=n.length;e<s;e++)u+=r+i(n[e],t,r+"\t")+"\n";else if(typeof n=="object"){o=!1;u+=r+"<"+t;for(f in n)f.charAt(0)=="@"?u+=" "+f.substr(1)+'="'+n[f].toString()+'"':o=!0;if(u+=o?">":"/>",o){for(f in n)f=="#text"?u+=n[f]:f=="#cdata"?u+="<![CDATA["+n[f]+"]\]>":f.charAt(0)!="@"&&(u+=i(n[f],f,r+"\t"));u+=(u.charAt(u.length-1)=="\n"?r:"")+"<\/"+t+">"}}else u+=r+"<"+t+">"+n.toString()+"<\/"+t+">";return u},r="";for(var u in n)r+=i(n[u],u,"");return t?r.replace(/\t/g,t):r.replace(/\t|\n/g,"")};n.copyToClipBoard=function(n,r){var u,f;if(n){u=document.createElement("textarea");u.style.position="fixed";u.style.top=0;u.style.left=0;u.style.width="1em";u.style.height="1em";u.style.padding=0;u.style.border="none";u.style.outline="none";u.style.boxShadow="none";u.style.background="transparent";u.value=n;document.body.appendChild(u);u.select();try{f=document.execCommand("copy");f&&typeof r!="undefined"&&r&&(t("Copied!",r),i(r))}catch(e){typeof r!="undefined"&&r&&(t("Failed!",r),i(r))}document.body.removeChild(u)}}}}(),function(){Helper.VIDEOJS=new function(){var n=this;n.removeAllRemoteTextTrack=function(n){if(n)for(var t=n.remoteTextTracks(),i=!1;t&&t.length>0&&!i;)try{n.removeRemoteTextTrack(t[0])}catch(r){console.log("Exception when remove text track",r);i=!0}};n.prepareMediaURL=function(n){return n?n.replace("http://","https://").replace("//ce21media.streaming.mediaservices.windows.net/","//cdn-ce21media.streaming.mediaservices.windows.net/").replace("live4.ce21dispatch.com","ce21-live-04.azureedge.net").replace("live3.ce21dispatch.com","az826477.vo.msecnd.net").replace("live2.ce21dispatch.com","az826585.vo.msecnd.net").replace("live1.ce21dispatch.com","az832127.vo.msecnd.net"):""};n.getType=function(n){var t="video/mp4";return n&&n.indexOf("m3u8")>-1&&(t="application/x-mpegurl"),n&&n.indexOf(".mp3")>-1&&(t="audio/mpeg"),n&&n.indexOf(".m4a")>-1&&(t=null),t};n.compareVideoSources=function(t,i){return n.prepareMediaURL(i)==n.prepareMediaURL(t)};n.addRemoteTextTrack=function(n,t){n&&t&&n.addRemoteTextTrack(t)};n.getCurrentState=function(n){if(n){if(!n.paused())return"PLAYING";if(n.paused())return"PAUSED";if(n.seeking()&&n.bufferedPercent()>0)return"BUFFERING";if(n.readyState()>1)return"IDLE"}return undefined};n.saveVidPlayerSettings=function(n){if(n){var t={volume:n.volume(),muted:n.muted()};try{Util.isSessionStorageSupported()?sessionStorage.setItem("vidPlayerSettings",JSON.stringify(t)):window.sessionStorage={vidPlayerSettings:t}}catch(i){}}};n.setVidPlayerSettings=function(n){if(n){var t={};if(Util.isSessionStorageSupported())t=JSON.parse(sessionStorage.getItem("vidPlayerSettings"))||{volume:1,muted:!1};else try{t=window.sessionStorage.vidPlayerSettings||{}}catch(i){}n.volume(t.volume||1);n.muted(t.muted||!1)}};n.disposePlayer=function(n){if(n)try{n.player_?n.dispose():n.reset()}catch(t){}};n.saveCCSettings=function(n){var t,i,r;if(n)try{!Helper.Viewer.isUnauthenticatedUser()&&this.hasRemoteTextTrack(n)&&Util.isLocalStorageSupported()&&(n.cache_&&n.cache_.selectedLanguage?(i=n.cache_.selectedLanguage,t={language:i.language||"en",mode:i.enabled?"showing":"disabled"}):(r=this.getActiveRemoteTextTrack(n)||{language:"en",mode:"disabled"},t={language:r.language,mode:r.mode}),localStorage.setItem(this.getCCLocalStorageKey(),JSON.stringify(t)))}catch(u){}};n.getCCSettings=function(n){if(n){var t={language:"en",mode:"disabled"};try{if(Util.isLocalStorageSupported())return JSON.parse(localStorage.getItem(this.getCCLocalStorageKey()))||t}catch(i){return t}}};n.hasRemoteTextTrack=function(n){if(!n||n.remoteTextTracks().length==0||!n.remoteTextTracks()[0].src)return!1;var t=n.remoteTextTracks()[0].src||"";return t!==""};n.getActiveRemoteTextTrack=function(n){var t,i;if(!n||!this.hasRemoteTextTrack(n))return null;for(t=0;t<n.remoteTextTracks().length;t++)if(i=n.remoteTextTracks()[t],i&&i.mode=="showing")return i;return null};n.setActiveRemoteTextTrack=function(n,t){var i,r;if(n&&this.hasRemoteTextTrack(n)){for(t||(t=this.getCCSettings(n)),i=0;i<n.remoteTextTracks().length;i++)if(r=n.remoteTextTracks()[i],r&&r.language==t.language){r.mode=t.mode;return}n.remoteTextTracks()[0]&&(n.remoteTextTracks()[0].mode=t.mode)}};n.getCCLocalStorageKey=function(){return"CCSettings-"+Helper.Viewer.getCustomerId()}}}(),function(){Helper.Interval=new function(){var n=this;n.keys={};n.set=function(t,i,r){r||(r=0);n.keys[t]&&clearInterval(n.keys[t]);n.keys[t]=setInterval(i,r*1e3)};n.clear=function(t){n.keys[t]&&clearInterval(n.keys[t])}};Helper.TimeOut=new function(){var n=this;n.keys={};n.set=function(t,i,r){r||(r=0);n.keys[t]&&clearTimeout(n.keys[t]);n.keys[t]=setTimeout(i,r*1e3)};n.clear=function(t){n.keys[t]&&clearTimeout(n.keys[t])}}}(),function(){Helper.WebVTT=new function(){var n=this;n.doCaptions=function(n,t){if(typeof WebVTT=="function"){var r=[],u=[],i=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder());i.oncue=function(n){r.push(n)};i.onregion=function(n){u.push(n)};i.onparsingerror=function(n){console.log(n)};i.parse(n);i.flush();t&&t(r)}};n.getCaptions=function(t,i){$.get(t,function(t){n.doCaptions(t,i)})}}}(),function(){Helper.Viewer=new function(){var n=this;n.getCustomerId=function(){return typeof u=="string"?Number(u):0};n.isUnauthenticatedUser=function(){return this.getCustomerId()<=0}}}(),function(){Helper.Timer=new function(){var n=this;n.offset=typeof timeInfo!="undefined"&&timeInfo?timeInfo.local-timeInfo.server:0;n.curServerTime=function(){return new Date((new Date).getTime()-n.offset)};n.diff=function(t){return(t-n.curServerTime())/1e3};n.readableDiff=function(t){return n.toDDHHMM(n.diff(t))};n.getDiffInObject=function(t){var r=parseInt(n.diff(t),10),i=Math.floor(r/3600),u=Math.floor(i/24),f=Math.floor((r-i*3600)/60),e=r-i*3600-f*60;return u>0&&(i-=u*24),{seconds:e,minutes:f,hours:i,days:u}};n.toTwoDigit=function(n){return n.toString().length===1&&(n="0"+n),n};n.toDDHHMM=function(n){var r=parseInt(n,10),t=Math.floor(r/3600),u=Math.floor(t/24),f=Math.floor((r-t*3600)/60),e=r-t*3600-f*60,i="";return u>0?(t=Math.floor(t-u*24),i=u+" day(s) ",t>0&&(i+=t+" hr ")):i=t+" hr "+f+" min "+e+" secs",i}}}();
var BANNER_CLICK_COUNT="/Home/UpdateClickCountForBannerAdvert",BANNER_SHOWN_COUNT="/Home/UpdateBannerShownCount",CENCEL_PURCHASECE="/Items/CancelPurchaseForPurchaseCE",bannerAdsTracking={getLocalStorageValue:function(n){var i=localStorage.getItem(n),t=JSON.parse(i);return t?(new Date).getTime()>t.expiry?(localStorage.removeItem(n),null):t.value:null},setLocalStorageValue:function(n,t){var i=t.length>0?t.join(","):"",r={value:i,expiry:(new Date).setHours(23,59,59,999)};localStorage.setItem(n,JSON.stringify(r))},updateBannerShownCount:function(n){var r=bannerAdsTracking.getLocalStorageValue("singleadverts"),u=bannerAdsTracking.getLocalStorageValue("advertgroups"),f=bannerAdsTracking.getLocalStorageValue("videoadverts"),e=r?r.split(","):[],o=u?u.split(","):[],s=f?f.split(","):[],i=[],h,c,t;(n===!0&&$(".clsSingleAdvertImage").find(".hdnBannerAdsTypes[data-displayentitytype=AdvertIndividual]").each(function(){i.push($(this).attr("data-advertid"))}),h=n!==!0?[]:$(".clsVideoAdvert").find(".hdnBannerAdsTypes[data-displayentitytype=VideoAdvert]").map(function(){return $(this).attr("data-advertid")}).get(),c=$(".clsBannerAdWidget").find(".owl-item.active").find(".hdnBannerAdsTypes[data-displayentitytype=AdvertGroup]").map(function(){return $(this).attr("data-advertgroupid")}).get(),$(".clsBannerAdWidget").find(".owl-item.active").find(".hdnBannerAdsTypes[data-displayentitytype=AdvertGroup]").each(function(){i.push($(this).attr("data-advertid"))}),t={advertIds:bannerAdsTracking.filterAdvertData(i,e),advertGroupIds:bannerAdsTracking.filterAdvertData(c,o),videoAdvertIds:bannerAdsTracking.filterAdvertData(h,s)},t.advertIds.length<=0&&t.advertGroupIds.length<=0&&t.videoAdvertIds.length<=0)||(t.advertIds.length>0&&bannerAdsTracking.setLocalStorageValue("singleadverts",e),t.advertGroupIds.length>0&&bannerAdsTracking.setLocalStorageValue("advertgroups",o),t.videoAdvertIds.length>0&&bannerAdsTracking.setLocalStorageValue("videoadverts",s),$.ajax({type:"POST",url:BANNER_SHOWN_COUNT,dataType:"json",global:!1,data:{advertIds:t.advertIds,advertGroupIds:t.advertGroupIds,videoAdvertIds:t.videoAdvertIds},success:function(){$("#divProgress").hide()},error:function(){$("#divProgress").hide()}}))},updatebannerClikCount:function(n){var t=n.attr("data-advertid"),i=n.attr("data-advertgroupid"),r=n.attr("data-displayentitytype");if(t<=0)return!1;$.ajax({type:"POST",url:BANNER_CLICK_COUNT,dataType:"json",global:!1,data:{advertIndividualId:t,advertGroupId:i,advertDisplayEntityType:r},success:function(){$("#divProgress").hide()},error:function(){$("#divProgress").hide()}})},filterAdvertData:function(n,t){var i=[];return $.each(n,function(n,r){t.indexOf(r)<=-1&&i.push(r);t.push(r)}),i},setBannerImages:function(){$(".imgAdvertBannerGroup").length>0&&(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)?bannerAdsTracking.setBannerContents("data-mobile-img",!0):bannerAdsTracking.setBannerContents("src",!1))},bannerAdWidgetSetCarousal:function(){bannerAdsTracking.setBannerImages();$(".clsBannerAdWidget").each(function(n,t){var i=$(this).attr("data-columncount")||1,f=i>2?i-1:i,l=f>2?f-1:1,a=$(t).find(".item").length>1&&$(this).attr("data-autoplayinterval")||!1,e=$(this).attr("data-rowcount"),s=$(this).attr("data-displaymode"),o=s&&s=="Dynamic"?!0:!1,v=o,y=o?!1:!0,p=o?["",""]:["<i class='fa fa-angle-left'><\/i>","<i class='fa fa-angle-right'><\/i>"],h=$(t).find(".item"),c,u,r;if(e&&e>1&&h.length>1)for(c=Math.ceil(h.length/e),u=0;u<c;u++){if(r=$(t).find(".item:nth-of-type("+(u+1)+")"),r.next().length==0)break;r.next().find(".inner-item").appendTo(r);r.next().remove()}$(t).owlCarousel({items:i,lazyLoad:!0,loop:!0,autoPlay:a,pagination:!1,addClassActive:!0,itemsDesktop:[1199,i],itemsDesktopSmall:[979,f],itemsTablet:[768,l],itemsMobile:[479,1],navigation:y,navigationText:p,singleItem:v,transitionStyle:"goDown",afterMove:bannerAdsTracking.updateBannerShownCount})})},setBannerContents:function(n,t){$(".imgAdvertBannerGroup").each(function(i,r){t&&$(r).attr("src",$(r).attr("data-mobile-img"));$(r).attr(n)?($(r).closest(".item").show(),$(r).closest(".clsSingleAdvertImage").find(".divBannerLableText").show()):($(r).closest(".item").hide(),$(r).closest(".clsSingleAdvertImage").find(".divBannerLableText").hide())})}};$(document).ready(function(){bannerAdsTracking.bannerAdWidgetSetCarousal()});$("body").on("click",".clsAdvertLable",function(){bannerAdsTracking.updatebannerClikCount($(this))});$(window).load(function(){bannerAdsTracking.updateBannerShownCount(!0)});
function lazyLoadImages(){var n=$(".lazy > source, img.lazy").filter(function(){var n=$(window).scrollTop(),i=$(window).height(),t=$(this).offset().top,r=$(this).height();return t+r>=n&&t<=n+i});n.each(function(){$(this).attr("data-srcset")&&($(this).attr("srcset",$(this).attr("data-srcset")),$(this).attr("data-srcset",""),$(this).closest("picture.lazy").removeClass("lazy"));$(this).attr("data-src")&&($(this).attr("src",$(this).attr("data-src")),$(this).attr("data-src",""),$(this).removeClass("lazy"))})}$(window).scroll(function(){lazyLoadImages()});$(document).ready(function(){var n=!!window.HTMLPictureElement;!n&&$("picture").length>0?($("picture").each(function(){if($(this).find("img").length>0){var n=$(this).find("img");n.attr("data-src")&&$(n).attr("src",n.attr("data-src"));$(this).replaceWith(n)}}),$("img[data-src]").each(function(){var n=$(this);$(this).attr("data-src")&&$(this).attr("src",n.attr("data-src"))})):lazyLoadImages()});
