/*!
* FullCalendar v2.1.1
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):a(jQuery,moment)}(function(a,b){function c(a,b){return b.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")}function d(a,b){var c=b.longDateFormat("L");return c=c.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),a.isRTL?c+=" ddd":c="ddd "+c,c}function e(a){f(xb,a)}function f(b){function c(c,d){a.isPlainObject(d)&&a.isPlainObject(b[c])&&!g(c)?b[c]=f({},b[c],d):void 0!==d&&(b[c]=d)}for(var d=1;d").prependTo(c),ab=new i(X,Z),bb=ab.render(),bb&&c.prepend(bb),m(Z.defaultView),Z.handleWindowResize&&(gb=H(r,Z.windowResizeDelay),a(window).resize(gb))}function k(){eb&&eb.destroy(),ab.destroy(),cb.remove(),c.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),a(window).unbind("resize",gb)}function l(){return c.is(":visible")}function m(a){n(0,a)}function n(b,c){lb++,eb&&c&&eb.name!==c&&(ab.deactivateButton(eb.name),R(),eb.start&&eb.destroy(),eb.el.remove(),eb=null),!eb&&c&&(eb=new Bb[c](X),eb.el=a("
").appendTo(cb),ab.activateButton(c)),eb&&(b&&(hb=eb.incrementDate(hb,b)),eb.start&&!b&&hb.isWithin(eb.intervalStart,eb.intervalEnd)||l()&&(R(),eb.start&&eb.destroy(),eb.render(hb),S(),z(),B(),v())),S(),lb--}function o(a){return l()?(a&&q(),lb++,eb.updateSize(!0),lb--,!0):void 0}function p(){l()&&q()}function q(){fb="number"==typeof Z.contentHeight?Z.contentHeight:"number"==typeof Z.height?Z.height-(bb?bb.outerHeight(!0):0):Math.round(cb.width()/Math.max(Z.aspectRatio,.5))}function r(a){!lb&&a.target===window&&eb.start&&o(!0)&&eb.trigger("windowResize",kb)}function s(){u(),w()}function t(){l()&&(R(),eb.destroyEvents(),eb.renderEvents(mb),S())}function u(){R(),eb.destroyEvents(),S()}function v(){!Z.lazyFetching||ib(eb.start,eb.end)?w():t()}function w(){jb(eb.start,eb.end)}function x(a){mb=a,t()}function y(){t()}function z(){ab.updateTitle(eb.title)}function B(){var a=X.getNow();a.isWithin(eb.intervalStart,eb.intervalEnd)?ab.disableButton("today"):ab.enableButton("today")}function C(a,b){a=X.moment(a),b=b?X.moment(b):a.clone().add(a.hasTime()?X.defaultTimedEventDuration:X.defaultAllDayEventDuration),eb.select(a,b)}function D(){eb&&eb.unselect()}function E(){n(-1)}function F(){n(1)}function I(){hb.add(-1,"years"),n()}function J(){hb.add(1,"years"),n()}function K(){hb=X.getNow(),n()}function L(a){hb=X.moment(a),n()}function N(a){hb.add(b.duration(a)),n()}function O(a,b){var c,d;b&&void 0!==Bb[b]||(b=b||"day",c=ab.getViewsWithButtons().join(" "),d=c.match(new RegExp("\\w+"+G(b))),d||(d=c.match(/\w+Day/)),b=d?d[0]:"agendaDay"),hb=a,m(b)}function Q(){return hb.clone()}function R(){cb.css({width:"100%",height:cb.height(),overflow:"hidden"})}function S(){cb.css({width:"",height:"",overflow:""})}function T(){return X}function U(){return eb}function V(a,b){return void 0===b?Z[a]:void(("height"==a||"contentHeight"==a||"aspectRatio"==a)&&(Z[a]=b,o(!0)))}function W(a,b){return Z[a]?Z[a].apply(b||kb,Array.prototype.slice.call(arguments,2)):void 0}var X=this;d=d||{};var Y,Z=f({},xb,d);Y=Z.lang in yb?yb[Z.lang]:yb[xb.lang],Y&&(Z=f({},xb,Y,d)),Z.isRTL&&(Z=f({},xb,zb,Y||{},d)),X.options=Z,X.render=g,X.destroy=k,X.refetchEvents=s,X.reportEvents=x,X.reportEventChange=y,X.rerenderEvents=t,X.changeView=m,X.select=C,X.unselect=D,X.prev=E,X.next=F,X.prevYear=I,X.nextYear=J,X.today=K,X.gotoDate=L,X.incrementDate=N,X.zoomTo=O,X.getDate=Q,X.getCalendar=T,X.getView=U,X.option=V,X.trigger=W;var $=A(e(Z.lang));if(Z.monthNames&&($._months=Z.monthNames),Z.monthNamesShort&&($._monthsShort=Z.monthNamesShort),Z.dayNames&&($._weekdays=Z.dayNames),Z.dayNamesShort&&($._weekdaysShort=Z.dayNamesShort),null!=Z.firstDay){var _=A($._week);_.dow=Z.firstDay,$._week=_}X.defaultAllDayEventDuration=b.duration(Z.defaultAllDayEventDuration),X.defaultTimedEventDuration=b.duration(Z.defaultTimedEventDuration),X.moment=function(){var a;return"local"===Z.timezone?(a=Ab.moment.apply(null,arguments),a.hasTime()&&a.local()):a="UTC"===Z.timezone?Ab.moment.utc.apply(null,arguments):Ab.moment.parseZone.apply(null,arguments),"_locale"in a?a._locale=$:a._lang=$,a},X.getIsAmbigTimezone=function(){return"local"!==Z.timezone&&"UTC"!==Z.timezone},X.rezoneDate=function(a){return X.moment(a.toArray())},X.getNow=function(){var a=Z.now;return"function"==typeof a&&(a=a()),X.moment(a)},X.calculateWeekNumber=function(a){var b=Z.weekNumberCalculation;return"function"==typeof b?b(a):"local"===b?a.week():"ISO"===b.toUpperCase()?a.isoWeek():void 0},X.getEventEnd=function(a){return a.end?a.end.clone():X.getDefaultEventEnd(a.allDay,a.start)},X.getDefaultEventEnd=function(a,b){var c=b.clone();return a?c.stripTime().add(X.defaultAllDayEventDuration):c.add(X.defaultTimedEventDuration),X.getIsAmbigTimezone()&&c.stripZone(),c},X.formatRange=function(a,b,c){return"function"==typeof c&&(c=c.call(X,Z,$)),P(a,b,c,null,Z.isRTL)},X.formatDate=function(a,b){return"function"==typeof b&&(b=b.call(X,Z,$)),M(a,b)},j.call(X,Z);var ab,bb,cb,db,eb,fb,gb,hb,ib=X.isFetchNeeded,jb=X.fetchEvents,kb=c[0],lb=0,mb=[];hb=null!=Z.defaultDate?X.moment(Z.defaultDate):X.getNow(),X.getSuggestedViewHeight=function(){return void 0===fb&&p(),fb},X.isHeightAuto=function(){return"auto"===Z.contentHeight||"auto"===Z.height}}function i(b,c){function d(){var b=c.header;return n=c.theme?"ui":"fc",b?o=a("").append(f("left")).append(f("right")).append(f("center")).append(''):void 0}function e(){o.remove()}function f(d){var e=a(''),f=c.header[d];return f&&a.each(f.split(" "),function(){var d,f=a(),g=!0;a.each(this.split(","),function(d,e){var h,i,j,k,l,m,o,q;"title"==e?(f=f.add(a("
")),g=!1):(b[e]?h=function(){b[e]()}:Bb[e]&&(h=function(){b.changeView(e)},p.push(e)),h&&(i=w(c.themeButtonIcons,e),j=w(c.buttonIcons,e),k=w(c.defaultButtonText,e),l=w(c.buttonText,e),m=l?E(l):i&&c.theme?"":j&&!c.theme?"":E(k||e),o=["fc-"+e+"-button",n+"-button",n+"-state-default"],q=a('").click(function(){q.hasClass(n+"-state-disabled")||(h(),(q.hasClass(n+"-state-active")||q.hasClass(n+"-state-disabled"))&&q.removeClass(n+"-state-hover"))}).mousedown(function(){q.not("."+n+"-state-active").not("."+n+"-state-disabled").addClass(n+"-state-down")}).mouseup(function(){q.removeClass(n+"-state-down")}).hover(function(){q.not("."+n+"-state-active").not("."+n+"-state-disabled").addClass(n+"-state-hover")},function(){q.removeClass(n+"-state-hover").removeClass(n+"-state-down")}),f=f.add(q)))}),g&&f.first().addClass(n+"-corner-left").end().last().addClass(n+"-corner-right").end(),f.length>1?(d=a(""),g&&d.addClass("fc-button-group"),d.append(f),e.append(d)):e.append(f)}),e}function g(a){o.find("h2").text(a)}function h(a){o.find(".fc-"+a+"-button").addClass(n+"-state-active")}function i(a){o.find(".fc-"+a+"-button").removeClass(n+"-state-active")}function j(a){o.find(".fc-"+a+"-button").attr("disabled","disabled").addClass(n+"-state-disabled")}function k(a){o.find(".fc-"+a+"-button").removeAttr("disabled").removeClass(n+"-state-disabled")}function l(){return p}var m=this;m.render=d,m.destroy=e,m.updateTitle=g,m.activateButton=h,m.deactivateButton=i,m.disableButton=j,m.enableButton=k,m.getViewsWithButtons=l;var n,o=a(),p=[]}function j(b){function c(a,b){return!y||a.clone().stripZone()z.clone().stripZone()}function d(a,b){y=a,z=b,L=[];var c=++I,d=H.length;J=d;for(var f=0;d>f;f++)e(H[f],c)}function e(b,c){f(b,function(d){var e,f,g=a.isArray(b.events);if(c==I){if(d)for(e=0;el?(g.push(d),h.push(l),i.push(a(d).height())):j+=l}),d&&(c-=j,e=Math.floor(c/g.length),f=Math.floor(c-e*(g.length-1))),a(g).each(function(b,c){var d=b===g.length-1?f:e,j=h[b],k=i[b],l=d-(j-k);d>j&&a(c).height(l)})}function o(a){a.height("")}function p(b){var c=0;return b.find("> *").each(function(b,d){var e=a(d).outerWidth();e>c&&(c=e)}),c++,b.width(c),c}function q(a,b){return a.height(b).addClass("fc-scroller"),a[0].scrollHeight-1>a[0].clientHeight?!0:(r(a),!1)}function r(a){a.height("").removeClass("fc-scroller")}function s(b){var c=b.css("position"),d=b.parents().filter(function(){var b=a(this);return/(auto|scroll)/.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&d.length?d:a(b[0].ownerDocument||document)}function t(a){var b=a.offset().left,c=b+a.width(),d=a.children(),e=d.offset().left,f=e+d.outerWidth();return{left:e-b,right:c-f}}function u(a){return 1==a.which&&!a.ctrlKey}function v(a,b,c,d){var e,f,g,h;return b>c&&d>a?(a>=c?(e=a.clone(),g=!0):(e=c.clone(),g=!1),d>=b?(f=b.clone(),h=!0):(f=d.clone(),h=!1),{start:e,end:f,isStart:g,isEnd:h}):void 0}function w(a,b){if(a=a||{},void 0!==a[b])return a[b];for(var c,d=b.split(/(?=[A-Z])/),e=d.length-1;e>=0;e--)if(c=a[d[e].toLowerCase()],void 0!==c)return c;return a["default"]}function x(a,c){return b.duration({days:a.clone().stripTime().diff(c.clone().stripTime(),"days"),ms:a.time()-c.time()})}function y(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function z(a,b){return a-b}function A(a){var b=function(){};return b.prototype=a,new b}function B(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function C(b,c,d){if(a.isFunction(b)&&(b=[b]),b){var e,f;for(e=0;e/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function F(a){return a.replace(/&.*?;/g,"")}function G(a){return a.charAt(0).toUpperCase()+a.slice(1)}function H(a,b){var c,d,e,f,g=function(){var h=+new Date-f;b>h&&h>0?c=setTimeout(g,b-h):(c=null,a.apply(e,d),c||(e=d=null))};return function(){e=this,d=arguments,f=+new Date,c||(c=setTimeout(g,b))}}function I(c,d,e){var f,g,h,i,j=c[0],k=1==c.length&&"string"==typeof j;return b.isMoment(j)?(i=b.apply(null,c),j._ambigTime&&(i._ambigTime=!0),j._ambigZone&&(i._ambigZone=!0)):y(j)||void 0===j?i=b.apply(null,c):(f=!1,g=!1,k?Fb.test(j)?(j+="-01",c=[j],f=!0,g=!0):(h=Gb.exec(j))&&(f=!h[5],g=!0):a.isArray(j)&&(g=!0),i=d?b.utc.apply(b,c):b.apply(null,c),f?(i._ambigTime=!0,i._ambigZone=!0):e&&(g?i._ambigZone=!0:k&&i.zone(j))),new J(i)}function J(a){B(this,a)}function K(a,b){var c,d=[],e=!1,f=!1;for(c=0;cg&&(f=R(a,b,c[h]),f!==!1);h--)k=f+k;for(i=g;h>=i;i++)l+=O(a,c[i]),m+=O(b,c[i]);return(l||m)&&(n=e?m+d+l:l+d+m),j+n+k}function R(a,b,c){var d,e;return"string"==typeof c?c:(d=c.token)&&(e=Ib[d.charAt(0)],e&&a.isSame(b,e))?L(a,d):!1}function S(a){return a in Jb?Jb[a]:Jb[a]=T(a)}function T(a){for(var b,c=[],d=/\[([^\]]*)\]|\(([^\)]*)\)|(LT|(\w)\4*o?)|([^\w\[\(]+)/g;b=d.exec(a);)b[1]?c.push(b[1]):b[2]?c.push({maybe:T(b[2])}):b[3]?c.push({token:b[3]}):b[5]&&c.push(b[5]);return c}function U(a){this.options=a||{}}function V(a){this.grid=a}function W(a){this.coordMaps=a}function X(a,b){this.coordMap=a,this.options=b||{}}function Y(a,b){return a||b?a&&b?a.grid===b.grid&&a.row===b.row&&a.col===b.col:!1:!0}function Z(b,c){this.options=c=c||{},this.sourceEl=b,this.parentEl=c.parentEl?a(c.parentEl):b.parent()}function $(a){this.view=a}function _(a){$.call(this,a),this.coordMap=new V(this)}function ab(a,b){return a.eventStartMS-b.eventStartMS||b.eventDurationMS-a.eventDurationMS||b.event.allDay-a.event.allDay||(a.event.title||"").localeCompare(b.event.title)}function bb(a){_.call(this,a)}function cb(a,b){var c,d;for(c=0;c=a.leftCol)return!0;return!1}function db(a,b){return a.leftCol-b.leftCol}function eb(a){_.call(this,a)}function fb(a){var b,c,d;if(a.sort(ab),b=gb(a),hb(b),c=b[0]){for(d=0;db.top&&a.topk;k++){var l=k*d,m=l+d-1,n=Math.max(i,l),o=Math.min(j,m);if(o>=n){var q=u(n),r=u(o),v=[q.col,r.col].sort(),w=p(n)==g,y=p(o)+1==h;e.push({row:k,leftCol:v[0],rightCol:v[1],isStart:w,isEnd:y})}}return e}function x(a,b){var c,d,e=a.clone().stripTime();return b&&(c=b.clone().stripTime(),d=+b.time(),d&&d>=C&&c.add(1,"days")),(!b||e>=c)&&(c=e.clone().add(1,"days")),{start:e,end:c}}function y(a){var b=x(a.start,a.end);return b.end.diff(b.start,"days")>1}var z=this;z.calendar=c,z.opt=d,z.trigger=e,z.isEventDraggable=f,z.isEventResizable=h,z.eventDrop=i,z.eventResize=j;var A=c.reportEventChange,B=c.options,C=b.duration(B.nextDayThreshold);z.init(),z.getEventTimeText=function(a,b){var e,f;return"object"==typeof a&&"object"==typeof b?(e=a,f=b,b=arguments[2]):(e=a.start,f=a.end),b=b||d("timeFormat"),f&&d("displayEventEnd")?c.formatRange(e,f,b):c.formatDate(e,b)},z.isHiddenDay=k,z.skipHiddenDays=m,z.getCellsPerWeek=l,z.dateToCell=r,z.dateToDayOffset=s,z.dayOffsetToCellOffset=t,z.cellOffsetToCell=u,z.cellToDate=n,z.cellToCellOffset=o,z.cellOffsetToDayOffset=p,z.dayOffsetToDate=q,z.rangeToSegments=v,z.isMultiDayEvent=y;var E,F=d("hiddenDays")||[],G=[],H=[],I=[],J=d("isRTL");!function(){d("weekends")===!1&&F.push(0,6);for(var b=0,c=0;7>b;b++)H[b]=c,G[b]=-1!=a.inArray(b,F),G[b]||(I[c]=b,c++);if(E=c,!E)throw"invalid hiddenDays"}()}function ob(a){nb.call(this,a),this.dayGrid=new bb(this),this.coordMap=this.dayGrid.coordMap}function pb(a){ob.call(this,a)}function qb(a){ob.call(this,a)}function rb(a){ob.call(this,a)}function sb(a,b){return b.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")}function tb(a,b){return b.longDateFormat("LT").replace(/\s*a$/i,"")}function ub(a){nb.call(this,a),this.timeGrid=new eb(this),this.opt("allDaySlot")?(this.dayGrid=new bb(this),this.coordMap=new W([this.dayGrid.coordMap,this.timeGrid.coordMap])):this.coordMap=this.timeGrid.coordMap}function vb(a){ub.call(this,a)}function wb(a){ub.call(this,a)}var xb={lang:"en",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",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,titleFormat:{month:"MMMM YYYY",week:"ll",day:"LL"},columnFormat:{month:"ddd",week:d,day:"dddd"},timeFormat:{"default":c},displayEventEnd:{month:!1,basicWeek:!1,"default":!0},isRTL:!1,defaultButtonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next 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:"*",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:200},yb={en:{columnFormat:{week:"ddd M/D"},dayPopoverFormat:"dddd, MMMM D"}},zb={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"}},Ab=a.fullCalendar={version:"2.1.1"},Bb=Ab.views={};a.fn.fullCalendar=function(b){var c=Array.prototype.slice.call(arguments,1),d=this;return this.each(function(e,f){var g,i=a(f),j=i.data("fullCalendar");"string"==typeof b?j&&a.isFunction(j[b])&&(g=j[b].apply(j,c),e||(d=g),"destroy"===b&&i.removeData("fullCalendar")):j||(j=new h(i,b),i.data("fullCalendar",j),j.render())}),d},Ab.langs=yb,Ab.datepickerLang=function(b,c,d){var e=yb[b];e||(e=yb[b]={}),f(e,{isRTL:d.isRTL,weekNumberTitle:d.weekHeader,titleFormat:{month:d.showMonthAfterYear?"YYYY["+d.yearSuffix+"] MMMM":"MMMM YYYY["+d.yearSuffix+"]"},defaultButtonText:{prev:F(d.prevText),next:F(d.nextText),today:F(d.currentText)}}),a.datepicker&&(a.datepicker.regional[c]=a.datepicker.regional[b]=d,a.datepicker.regional.en=a.datepicker.regional[""],a.datepicker.setDefaults(d))},Ab.lang=function(a,b){var c;b&&(c=yb[a],c||(c=yb[a]={}),f(c,b||{})),xb.lang=a},Ab.sourceNormalizers=[],Ab.sourceFetchers=[];var Cb={dataType:"json",cache:!1},Db=1,Eb=["sun","mon","tue","wed","thu","fri","sat"];Ab.applyAll=C;var Fb=/^\s*\d{4}-\d\d$/,Gb=/^\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+)?)?)?)?)?$/;Ab.moment=function(){return I(arguments)},Ab.moment.utc=function(){var a=I(arguments,!0);return a.hasTime()&&a.utc(),a},Ab.moment.parseZone=function(){return I(arguments,!0,!0)},J.prototype=A(b.fn),J.prototype.clone=function(){return I([this])},J.prototype.time=function(a){if(null==a)return b.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});delete this._ambigTime,b.isDuration(a)||b.isMoment(a)||(a=b.duration(a));var c=0;return b.isDuration(a)&&(c=24*Math.floor(a.asDays())),this.hours(c+a.hours()).minutes(a.minutes()).seconds(a.seconds()).milliseconds(a.milliseconds())},J.prototype.stripTime=function(){var a=this.toArray();return b.fn.utc.call(this),this.year(a[0]).month(a[1]).date(a[2]).hours(0).minutes(0).seconds(0).milliseconds(0),this._ambigTime=!0,this._ambigZone=!0,this},J.prototype.hasTime=function(){return!this._ambigTime},J.prototype.stripZone=function(){var a=this.toArray(),c=this._ambigTime;return b.fn.utc.call(this),this.year(a[0]).month(a[1]).date(a[2]).hours(a[3]).minutes(a[4]).seconds(a[5]).milliseconds(a[6]),c&&(this._ambigTime=!0),this._ambigZone=!0,this},J.prototype.hasZone=function(){return!this._ambigZone},J.prototype.zone=function(a){return null!=a&&(delete this._ambigTime,delete this._ambigZone),b.fn.zone.apply(this,arguments)},J.prototype.local=function(){var a=this.toArray(),c=this._ambigZone;return delete this._ambigTime,delete this._ambigZone,b.fn.local.apply(this,arguments),c&&this.year(a[0]).month(a[1]).date(a[2]).hours(a[3]).minutes(a[4]).seconds(a[5]).milliseconds(a[6]),this},J.prototype.utc=function(){return delete this._ambigTime,delete this._ambigZone,b.fn.utc.apply(this,arguments)},J.prototype.format=function(){return arguments[0]?M(this,arguments[0]):this._ambigTime?L(this,"YYYY-MM-DD"):this._ambigZone?L(this,"YYYY-MM-DD[T]HH:mm:ss"):L(this)},J.prototype.toISOString=function(){return this._ambigTime?L(this,"YYYY-MM-DD"):this._ambigZone?L(this,"YYYY-MM-DD[T]HH:mm:ss"):b.fn.toISOString.apply(this,arguments)},J.prototype.isWithin=function(a,b){var c=K([this,a,b]);return c[0]>=c[1]&&c[0]').addClass(c.className||"").css({top:0,left:0}).append(c.content).appendTo(c.parentEl),this.el.on("click",".fc-close",function(){b.hide()}),c.autoHide&&a(document).on("mousedown",this.documentMousedownProxy=a.proxy(this,"documentMousedown"))},documentMousedown:function(b){this.el&&!a(b.target).closest(this.el).length&&this.hide()},destroy:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),a(document).off("mousedown",this.documentMousedownProxy)},position:function(){var b,c,d,e,f,g=this.options,h=this.el.offsetParent().offset(),i=this.el.outerWidth(),j=this.el.outerHeight(),k=a(window),l=s(this.el);e=g.top||0,f=void 0!==g.left?g.left:void 0!==g.right?g.right-i:0,l.is(window)||l.is(document)?(l=k,b=0,c=0):(d=l.offset(),b=d.top,c=d.left),b+=k.scrollTop(),c+=k.scrollLeft(),g.viewportConstrain!==!1&&(e=Math.min(e,b+l.outerHeight()-j-this.margin),e=Math.max(e,b+this.margin),f=Math.min(f,c+l.outerWidth()-i-this.margin),f=Math.max(f,c+this.margin)),this.el.css({top:e-h.top,left:f-h.left})},trigger:function(a){this.options[a]&&this.options[a].apply(this,Array.prototype.slice.call(arguments,1))}},V.prototype={grid:null,rows:null,cols:null,containerEl:null,minX:null,maxX:null,minY:null,maxY:null,build:function(){this.grid.buildCoords(this.rows=[],this.cols=[]),this.computeBounds()},getCell:function(a,b){var c,d=null,e=this.rows,f=this.cols,g=-1,h=-1;if(this.inBounds(a,b)){for(c=0;c=e[c][0]&&b=f[c][0]&&a=0&&h>=0&&(d={row:g,col:h},d.grid=this.grid,d.date=this.grid.getCellDate(d))}return d},computeBounds:function(){var a;this.containerEl&&(a=this.containerEl.offset(),this.minX=a.left,this.maxX=a.left+this.containerEl.outerWidth(),this.minY=a.top,this.maxY=a.top+this.containerEl.outerHeight())},inBounds:function(a,b){return this.containerEl?a>=this.minX&&a=this.minY&&b=b*b&&this.startDrag(a)),this.isDragging&&this.drag(a)},startDrag:function(a){var b;this.isListening||this.startListening(),this.isDragging||(this.isDragging=!0,this.trigger("dragStart",a),b=this.getCell(a),b&&this.cellOver(b,!0))
},drag:function(a){var b;this.isDragging&&(b=this.getCell(a),Y(b,this.cell)||(this.cell&&this.cellOut(),b&&this.cellOver(b)),this.dragScroll(a))},cellOver:function(a){this.cell=a,this.date=a.date,this.trigger("cellOver",a,a.date)},cellOut:function(){this.cell&&(this.trigger("cellOut",this.cell),this.cell=null,this.date=null)},mouseup:function(a){this.stopDrag(a),this.stopListening(a)},stopDrag:function(a){this.isDragging&&(this.stopScrolling(),this.trigger("dragStop",a),this.isDragging=!1)},stopListening:function(b){this.isListening&&(this.scrollEl&&(this.scrollEl.off("scroll",this.scrollHandlerProxy),this.scrollHandlerProxy=null),a(document).off("mousemove",this.mousemoveProxy).off("mouseup",this.mouseupProxy).off("selectstart",this.preventDefault),this.mousemoveProxy=null,this.mouseupProxy=null,this.isListening=!1,this.trigger("listenStop",b),this.origCell=this.cell=null,this.origDate=this.date=null)},getCell:function(a){return this.coordMap.getCell(a.pageX,a.pageY)},trigger:function(a){this.options[a]&&this.options[a].apply(this,Array.prototype.slice.call(arguments,1))},preventDefault:function(a){a.preventDefault()},computeScrollBounds:function(){var a,b=this.scrollEl;b&&(a=b.offset(),this.scrollBounds={top:a.top,left:a.left,bottom:a.top+b.outerHeight(),right:a.left+b.outerWidth()})},dragScroll:function(a){var b,c,d,e,f=this.scrollSensitivity,g=this.scrollBounds,h=0,i=0;g&&(b=(f-(a.pageY-g.top))/f,c=(f-(g.bottom-a.pageY))/f,d=(f-(a.pageX-g.left))/f,e=(f-(g.right-a.pageX))/f,b>=0&&1>=b?h=b*this.scrollSpeed*-1:c>=0&&1>=c&&(h=c*this.scrollSpeed),d>=0&&1>=d?i=d*this.scrollSpeed*-1:e>=0&&1>=e&&(i=e*this.scrollSpeed)),this.setScrollVel(h,i)},setScrollVel:function(b,c){this.scrollTopVel=b,this.scrollLeftVel=c,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(a.proxy(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var a=this.scrollEl;this.scrollTopVel<0?a.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&a.scrollTop()+a[0].clientHeight>=a[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?a.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&a.scrollLeft()+a[0].clientWidth>=a[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var a=this.scrollEl,b=this.scrollIntervalMs/1e3;this.scrollTopVel&&a.scrollTop(a.scrollTop()+this.scrollTopVel*b),this.scrollLeftVel&&a.scrollLeft(a.scrollLeft()+this.scrollLeftVel*b),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.stopScrolling()},stopScrolling:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.computeCoords())},scrollHandler:function(){this.scrollIntervalId||this.computeCoords()}},Z.prototype={options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,mouseY0:null,mouseX0:null,topDelta:null,leftDelta:null,mousemoveProxy:null,isFollowing:!1,isHidden:!1,isAnimating:!1,start:function(b){this.isFollowing||(this.isFollowing=!0,this.mouseY0=b.pageY,this.mouseX0=b.pageX,this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),a(document).on("mousemove",this.mousemoveProxy=a.proxy(this,"mousemove")))},stop:function(b,c){function d(){this.isAnimating=!1,e.destroyEl(),this.top0=this.left0=null,c&&c()}var e=this,f=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,a(document).off("mousemove",this.mousemoveProxy),b&&f&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:f,complete:d})):d())},getEl:function(){var a=this.el;return a||(this.sourceEl.width(),a=this.el=this.sourceEl.clone().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}).appendTo(this.parentEl)),a},destroyEl:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var a,b;this.getEl(),null===this.top0&&(this.sourceEl.width(),a=this.sourceEl.offset(),b=this.el.offsetParent().offset(),this.top0=a.top-b.top,this.left0=a.left-b.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},mousemove:function(a){this.topDelta=a.pageY-this.mouseY0,this.leftDelta=a.pageX-this.mouseX0,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())}},$.prototype={view:null,cellHtml:" | ",rowHtml:function(a,b){var c,d,e=this.view,f=this.getHtmlRenderer("cell",a),g="";for(b=b||0,c=0;c"+g+""},bookendCells:function(a,b,c){var d=this.view,e=this.getHtmlRenderer("intro",b)(c||0),f=this.getHtmlRenderer("outro",b)(c||0),g=d.opt("isRTL"),h=g?f:e,i=g?e:f;return"string"==typeof a?h+a+i:a.prepend(h).append(i)},getHtmlRenderer:function(a,b){var c,d,e,f,g=this.view;return c=a+"Html",b&&(d=b+G(a)+"Html"),d&&(f=g[d])?e=g:d&&(f=this[d])?e=this:(f=g[c])?e=g:(f=this[c])&&(e=this),"function"==typeof f?function(){return f.apply(e,arguments)||""}:function(){return f||""}}},_.prototype=A($.prototype),a.extend(_.prototype,{el:null,coordMap:null,cellDuration:null,render:function(){this.bindHandlers()},destroy:function(){},buildCoords:function(){},getCellDate:function(){},getCellDayEl:function(){},rangeToSegs:function(){},bindHandlers:function(){var b=this;this.el.on("mousedown",function(c){a(c.target).is(".fc-event-container *, .fc-more")||a(c.target).closest(".fc-popover").length||b.dayMousedown(c)}),this.bindSegHandlers()},dayMousedown:function(a){var b,c,d,e=this,f=this.view,g=f.opt("selectable"),h=null,i=new X(this.coordMap,{scroll:f.opt("dragScroll"),dragStart:function(){f.unselect()},cellOver:function(a,f){i.origDate&&(d=e.getCellDayEl(a),h=[f,i.origDate].sort(z),b=h[0],c=h[1].clone().add(e.cellDuration),g&&e.renderSelection(b,c))},cellOut:function(){h=null,e.destroySelection()},listenStop:function(a){h&&(h[0].isSame(h[1])&&f.trigger("dayClick",d[0],b,a),g&&f.reportSelection(b,c,a))}});i.mousedown(a)},renderDrag:function(){},destroyDrag:function(){},renderResize:function(){},destroyResize:function(){},renderRangeHelper:function(a,b,c){var d,e=this.view;!b&&e.opt("forceEventDuration")&&(b=e.calendar.getDefaultEventEnd(!a.hasTime(),a)),d=c?A(c.event):{},d.start=a,d.end=b,d.allDay=!(a.hasTime()||b&&b.hasTime()),d.className=(d.className||[]).concat("fc-helper"),c||(d.editable=!1),this.renderHelper(d,c)},renderHelper:function(){},destroyHelper:function(){},renderSelection:function(a,b){this.renderHighlight(a,b)},destroySelection:function(){this.destroyHighlight()},renderHighlight:function(){},destroyHighlight:function(){},headHtml:function(){return'"},headCellHtml:function(a,b,c){var d=this.view,e=d.calendar,f=d.opt("columnFormat");return'"},bgCellHtml:function(a,b,c){var d=this.view,e=this.getDayClasses(c);return e.unshift("fc-day",d.widgetContentClass),' | '},getDayClasses:function(a){var b=this.view,c=b.calendar.getNow().stripTime(),d=["fc-"+Eb[a.day()]];return"month"===b.name&&a.month()!=b.intervalStart.month()&&d.push("fc-other-month"),a.isSame(c,"day")?d.push("fc-today",b.highlightStateClass):d.push(c>a?"fc-past":"fc-future"),d}}),a.extend(_.prototype,{mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,renderEvents:function(){},getSegs:function(){},destroyEvents:function(){this.triggerSegMouseout()},renderSegs:function(b,c){var d,e=this.view,f="",g=[];for(d=0;d *",function(c){var e=a(this).data("fc-seg");return!e||b.isDraggingSeg||b.isResizingSeg?void 0:d.call(this,e,c)})})},triggerSegMouseover:function(a,b){this.mousedOverSeg||(this.mousedOverSeg=a,this.view.trigger("eventMouseover",a.el[0],a.event,b))},triggerSegMouseout:function(a,b){b=b||{},this.mousedOverSeg&&(a=a||this.mousedOverSeg,this.mousedOverSeg=null,this.view.trigger("eventMouseout",a.el[0],a.event,b))},segDragMousedown:function(a,b){var c,d,e=this,f=this.view,g=a.el,h=a.event,i=new Z(a.el,{parentEl:f.el,opacity:f.opt("dragOpacity"),revertDuration:f.opt("dragRevertDuration"),zIndex:2}),j=new X(f.coordMap,{distance:5,scroll:f.opt("dragScroll"),listenStart:function(a){i.hide(),i.start(a)},dragStart:function(b){e.triggerSegMouseout(a,b),e.isDraggingSeg=!0,f.hideEvent(h),f.trigger("eventDragStart",g[0],h,b,{})},cellOver:function(b,g){var h=a.cellDate||j.origDate,k=e.computeDraggedEventDates(a,h,g);c=k.start,d=k.end,f.renderDrag(c,d,a)?i.hide():i.show()},cellOut:function(){c=null,f.destroyDrag(),i.show()},dragStop:function(a){var b=c&&!c.isSame(h.start);i.stop(!b,function(){e.isDraggingSeg=!1,f.destroyDrag(),f.showEvent(h),f.trigger("eventDragStop",g[0],h,a,{}),b&&f.eventDrop(g[0],h,c,a)})},listenStop:function(){i.stop()}});j.mousedown(b)},computeDraggedEventDates:function(a,b,c){var d,e,f,g=this.view,h=a.event,i=h.start,j=g.calendar.getEventEnd(h);return c.hasTime()===b.hasTime()?(d=x(c,b),e=i.clone().add(d),f=null===h.end?null:j.clone().add(d)):(e=c,f=null),{start:e,end:f}},segResizeMousedown:function(a,b){function c(){e.destroyResize(),f.showEvent(h)}var d,e=this,f=this.view,g=a.el,h=a.event,i=h.start,j=f.calendar.getEventEnd(h),k=null;d=new X(this.coordMap,{distance:5,scroll:f.opt("dragScroll"),dragStart:function(b){e.triggerSegMouseout(a,b),e.isResizingSeg=!0,f.trigger("eventResizeStart",g[0],h,b,{})},cellOver:function(b,d){d.isBefore(i)&&(d=i),k=d.clone().add(e.cellDuration),k.isSame(j)?(k=null,c()):(e.renderResize(i,k,a),f.hideEvent(h))},cellOut:function(){k=null,c()},dragStop:function(a){e.isResizingSeg=!1,c(),f.trigger("eventResizeStop",g[0],h,a,{}),k&&f.eventResize(g[0],h,k,a)}}),d.mousedown(b)},getSegClasses:function(a,b,c){var d=a.event,e=["fc-event",a.isStart?"fc-start":"fc-not-start",a.isEnd?"fc-end":"fc-not-end"].concat(d.className,d.source?d.source.className:[]);return b&&e.push("fc-draggable"),c&&e.push("fc-resizable"),e},getEventSkinCss:function(a){var b=this.view,c=a.source||{},d=a.color,e=c.color,f=b.opt("eventColor"),g=a.backgroundColor||d||c.backgroundColor||e||b.opt("eventBackgroundColor")||f,h=a.borderColor||d||c.borderColor||e||b.opt("eventBorderColor")||f,i=a.textColor||c.textColor||b.opt("eventTextColor"),j=[];return g&&j.push("background-color:"+g),h&&j.push("border-color:"+h),i&&j.push("color:"+i),j.join(";")}}),bb.prototype=A(_.prototype),a.extend(bb.prototype,{numbersVisible:!1,cellDuration:b.duration({days:1}),bottomCoordPadding:0,rowEls:null,dayEls:null,helperEls:null,highlightEls:null,render:function(b){var c,d=this.view,e="";for(c=0;c'+this.rowHtml("day",a)+'
'+(this.numbersVisible?""+this.rowHtml("number",a)+"":"")+"
"},dayCellHtml:function(a,b,c){return this.bgCellHtml(a,b,c)},buildCoords:function(b,c){var d,e,f,g=this.view.colCnt;this.dayEls.slice(0,g).each(function(b,g){d=a(g),e=d.offset().left,b&&(f[1]=e),f=[e],c[b]=f}),f[1]=e+d.outerWidth(),this.rowEls.each(function(c,g){d=a(g),e=d.offset().top,c&&(f[1]=e),f=[e],b[c]=f}),f[1]=e+d.outerHeight()+this.bottomCoordPadding},getCellDate:function(a){return this.view.cellToDate(a)},getCellDayEl:function(a){return this.dayEls.eq(a.row*this.view.colCnt+a.col)},rangeToSegs:function(a,b){return this.view.rangeToSegments(a,b)},renderDrag:function(a,b,c){var d;return this.renderHighlight(a,b||this.view.calendar.getDefaultEventEnd(!0,a)),c&&!c.el.closest(this.el).length?(this.renderRangeHelper(a,b,c),d=this.view.opt("dragOpacity"),void 0!==d&&this.helperEls.css("opacity",d),!0):void 0},destroyDrag:function(){this.destroyHighlight(),this.destroyHelper()},renderResize:function(a,b,c){this.renderHighlight(a,b),this.renderRangeHelper(a,b,c)},destroyResize:function(){this.destroyHighlight(),this.destroyHelper()},renderHelper:function(b,c){var d=[],e=this.renderEventRows([b]);this.rowEls.each(function(b,f){var g,h=a(f),i=a('');g=c&&c.row===b?c.el.position().top:h.find(".fc-content-skeleton tbody").position().top,i.css("top",g).find("table").append(e[b].tbodyEl),h.append(i),d.push(i[0])}),this.helperEls=a(d)},destroyHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},renderHighlight:function(b,c){var d,e,f,g=this.rangeToSegs(b,c),h=[];for(d=0;d0&&(d+=' | '),b>a&&(d+=' | '),c>b&&(d+=' | '),d=this.bookendCells(d,"highlight"),'"}}),a.extend(bb.prototype,{segs:null,rowStructs:null,renderEvents:function(b){var c=this.rowStructs=this.renderEventRows(b),d=[];this.rowEls.each(function(b,e){a(e).find(".fc-content-skeleton > table").append(c[b].tbodyEl),d.push.apply(d,c[b].segs)}),this.segs=d},getSegs:function(){return(this.segs||[]).concat(this.popoverSegs||[])},destroyEvents:function(){var a,b;for(_.prototype.destroyEvents.call(this),a=this.rowStructs||[];b=a.pop();)b.tbodyEl.remove();this.segs=null,this.destroySegPopover()},renderEventRows:function(a){var b,c,d=this.eventsToSegs(a),e=[];for(d=this.renderSegs(d),b=this.groupSegRows(d),c=0;c'+E(d.getEventTimeText(f))+""),c=''+(E(f.title||"")||" ")+"",''+(e?c+" "+k:k+" "+c)+"
"+(h?'':"")+""},renderEventRow:function(b,c){function d(b){for(;b>g;)k=(s[e-1]||[])[g],k?k.attr("rowspan",parseInt(k.attr("rowspan")||1,10)+1):(k=a(" | "),h.append(k)),r[e][g]=k,s[e][g]=k,g++}var e,f,g,h,i,j,k,l=this.view,m=l.colCnt,n=this.buildSegLevels(c),o=Math.max(1,n.length),p=a(""),q=[],r=[],s=[];for(e=0;o>e;e++){if(f=n[e],g=0,h=a("
"),q.push([]),r.push([]),s.push([]),f)for(i=0;i').append(j.el),j.leftCol!=j.rightCol?k.attr("colspan",j.rightCol-j.leftCol+1):s[e][g]=k;g<=j.rightCol;)r[e][g]=k,q[e][g]=j,g++;h.append(k)}d(m),this.bookendCells(h,"eventSkeleton"),p.append(h)}return{row:b,tbodyEl:p,cellMatrix:r,segMatrix:q,segLevels:n,segs:c}},buildSegLevels:function(a){var b,c,d,e=[];for(a.sort(ab),b=0;be)return b;return!1},limitRow:function(b,c){function d(d){for(;d>y;)e={row:b,col:y},k=u.getCellSegs(e,c),k.length&&(n=g[c-1][y],t=u.renderMoreLink(e,k),s=a("").append(t),n.append(s),x.push(s[0])),y++}var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=this,v=this.view,w=this.rowStructs[b],x=[],y=0;if(c&&c').attr("rowspan",o),k=m[q],e={row:b,col:j.leftCol+q},t=this.renderMoreLink(e,[j].concat(k)),s=a("").append(t),r.append(s),p.push(r[0]),x.push(r[0]);n.addClass("fc-limited").after(a(p)),h.push(n[0])}}d(v.colCnt),w.moreEls=a(x),w.limitedEls=a(h)}},unlimitRow:function(a){var b=this.rowStructs[a];b.moreEls&&(b.moreEls.remove(),b.moreEls=null),b.limitedEls&&(b.limitedEls.removeClass("fc-limited"),b.limitedEls=null)},renderMoreLink:function(b,c){var d=this,e=this.view;return a('').text(this.getMoreLinkText(c.length)).on("click",function(f){var g=e.opt("eventLimitClick"),h=e.cellToDate(b),i=a(this),j=d.getCellDayEl(b),k=d.getCellSegs(b),l=d.resliceDaySegs(k,h),m=d.resliceDaySegs(c,h);"function"==typeof g&&(g=e.trigger("eventLimitClick",null,{date:h,dayEl:j,moreEl:i,segs:l,hiddenSegs:m},f)),"popover"===g?d.showSegPopover(h,b,i,l):"string"==typeof g&&e.calendar.zoomTo(h,g)})},showSegPopover:function(a,b,c,d){var e,f,g=this,h=this.view,i=c.parent();e=1==h.rowCnt?this.view.el:this.rowEls.eq(b.row),f={className:"fc-more-popover",content:this.renderSegPopoverContent(a,d),parentEl:this.el,top:e.offset().top,autoHide:!0,viewportConstrain:h.opt("popoverViewportConstrain"),hide:function(){g.segPopover.destroy(),g.segPopover=null,g.popoverSegs=null}},h.opt("isRTL")?f.right=i.offset().left+i.outerWidth()+1:f.left=i.offset().left-1,this.segPopover=new U(f),this.segPopover.show()},renderSegPopoverContent:function(b,c){var d,e=this.view,f=e.opt("theme"),g=b.format(e.opt("dayPopoverFormat")),h=a(''),i=h.find(".fc-event-container");for(c=this.renderSegs(c,!0),this.popoverSegs=c,d=0;d'+this.rowHtml("slotBg")+'
"},slotBgCellHtml:function(a,b,c){return this.bgCellHtml(a,b,c)},slatRowHtml:function(){for(var a,c,d,e=this.view,f=e.calendar,g=e.opt("isRTL"),h="",i=this.slotDuration.asMinutes()%15===0,j=b.duration(+this.minTime);j"+(i&&c?"":""+E(f.formatDate(a,e.opt("axisFormat")))+"")+"",h+=""+(g?"":d)+' | '+(g?d:"")+"
",j.add(this.slotDuration);return h},processOptions:function(){var a=this.view,c=a.opt("slotDuration"),d=a.opt("snapDuration");c=b.duration(c),d=d?b.duration(d):c,this.slotDuration=c,this.snapDuration=d,this.cellDuration=d,this.minTime=b.duration(a.opt("minTime")),this.maxTime=b.duration(a.opt("maxTime"))},rangeToSegs:function(a,b){var c,d,e,f,g,h=this.view,i=[];for(a=a.clone().stripZone(),b=b.clone().stripZone(),d=0;d').append(h).appendTo(this.el)},destroyHelper:function(){this.helperEl&&(this.helperEl.remove(),this.helperEl=null)},renderSelection:function(a,b){this.view.opt("selectHelper")?this.renderRangeHelper(a,b):this.renderHighlight(a,b)},destroySelection:function(){this.destroyHelper(),this.destroyHighlight()},renderHighlight:function(b,c){this.highlightEl=a(this.highlightSkeletonHtml(b,c)).appendTo(this.el)},destroyHighlight:function(){this.highlightEl&&(this.highlightEl.remove(),this.highlightEl=null)},highlightSkeletonHtml:function(a,b){var c,d,e,f,g,h=this.view,i=this.rangeToSegs(a,b),j="",k=0;for(c=0;c',k=d.col),e=h.cellToDate(0,k),f=this.computeDateTop(d.start,e),g=this.computeDateTop(d.end,e),j+=' | ',k++;return k'),j=this.bookendCells(j,"highlight"),'"}}),a.extend(eb.prototype,{segs:null,eventSkeletonEl:null,renderEvents:function(b){var c=this.renderEventTable(b);this.eventSkeletonEl=a('').append(c.tableEl),this.el.append(this.eventSkeletonEl),this.segs=c.segs},getSegs:function(){return this.segs||[]},destroyEvents:function(){_.prototype.destroyEvents.call(this),this.eventSkeletonEl&&(this.eventSkeletonEl.remove(),this.eventSkeletonEl=null),this.segs=null},renderEventTable:function(b){var c,d,e,f,g,h,i=a(""),j=i.find("tr"),k=this.eventsToSegs(b);for(k=this.renderSegs(k),c=this.groupSegCols(k),this.computeSegVerticals(k),f=0;f'),d=0;d").append(h))}return this.bookendCells(j,"eventSkeleton"),{tableEl:i,segs:k}},updateSegVerticals:function(){var a,b=this.segs;if(b)for(this.computeSegVerticals(b),a=0;a'+(c?'
'+E(c)+"
":"")+(g.title?'
'+E(g.title)+"
":"")+'
'+(i?'':"")+""},generateSegPositionCss:function(a){var b,c,d=this.view,e=d.opt("isRTL"),f=d.opt("slotEventOverlap"),g=a.backwardCoord,h=a.forwardCoord,i=this.generateSegVerticalCss(a);return f&&(h=Math.min(1,g+2*(h-g))),e?(b=1-h,c=g):(b=g,c=1-h),i.zIndex=a.level+1,i.left=100*b+"%",i.right=100*c+"%",f&&a.forwardPressure&&(i[e?"marginLeft":"marginRight"]=20),i},generateSegVerticalCss:function(a){return{top:a.top,bottom:-a.bottom}},groupSegCols:function(a){var b,c=this.view,d=[];for(b=0;b|
|
'},headIntroHtml:function(){return this.weekNumbersVisible?'":void 0
},numberIntroHtml:function(a){return this.weekNumbersVisible?'"+this.calendar.calculateWeekNumber(this.cellToDate(a,0))+" | ":void 0},dayIntroHtml:function(){return this.weekNumbersVisible?' | ":void 0},introHtml:function(){return this.weekNumbersVisible?' | ":void 0},numberCellHtml:function(a,b,c){var d;return this.dayNumbersVisible?(d=this.dayGrid.getDayClasses(c),d.unshift("fc-day-number"),''+c.date()+" | "):" | "},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var a=this.opt("eventLimit");return a&&"number"!=typeof a},updateWidth:function(){this.weekNumbersVisible&&(this.weekNumberWidth=p(this.el.find(".fc-week-number")))},setHeight:function(a,b){var c,d=this.opt("eventLimit");r(this.scrollerEl),m(this.headRowEl),this.dayGrid.destroySegPopover(),d&&"number"==typeof d&&this.dayGrid.limitRows(d),c=this.computeScrollerHeight(a),this.setGridHeight(c,b),d&&"number"!=typeof d&&this.dayGrid.limitRows(d),!b&&q(this.scrollerEl,c)&&(l(this.headRowEl,t(this.scrollerEl)),c=this.computeScrollerHeight(a),this.scrollerEl.height(c),this.restoreScroll())},setGridHeight:function(a,b){b?o(this.dayGrid.rowEls):n(this.dayGrid.rowEls,a,!0)},renderEvents:function(a){this.dayGrid.renderEvents(a),this.updateHeight(),nb.prototype.renderEvents.call(this,a)},getSegs:function(){return this.dayGrid.getSegs()},destroyEvents:function(){nb.prototype.destroyEvents.call(this),this.recordScroll(),this.dayGrid.destroyEvents()},renderDrag:function(a,b,c){return this.dayGrid.renderDrag(a,b,c)},destroyDrag:function(){this.dayGrid.destroyDrag()},renderSelection:function(a,b){this.dayGrid.renderSelection(a,b)},destroySelection:function(){this.dayGrid.destroySelection()}}),e({fixedWeekCount:!0}),Bb.month=pb,pb.prototype=A(ob.prototype),a.extend(pb.prototype,{name:"month",incrementDate:function(a,b){return a.clone().stripTime().add(b,"months").startOf("month")},render:function(a){var b;this.intervalStart=a.clone().stripTime().startOf("month"),this.intervalEnd=this.intervalStart.clone().add(1,"months"),this.start=this.intervalStart.clone(),this.start=this.skipHiddenDays(this.start),this.start.startOf("week"),this.start=this.skipHiddenDays(this.start),this.end=this.intervalEnd.clone(),this.end=this.skipHiddenDays(this.end,-1,!0),this.end.add((7-this.end.weekday())%7,"days"),this.end=this.skipHiddenDays(this.end,-1,!0),b=Math.ceil(this.end.diff(this.start,"weeks",!0)),this.isFixedWeeks()&&(this.end.add(6-b,"weeks"),b=6),this.title=this.calendar.formatDate(this.intervalStart,this.opt("titleFormat")),ob.prototype.render.call(this,b,this.getCellsPerWeek(),!0)},setGridHeight:function(a,b){b=b||"variable"===this.opt("weekMode"),b&&(a*=this.rowCnt/6),n(this.dayGrid.rowEls,a,!b)},isFixedWeeks:function(){var a=this.opt("weekMode");return a?"fixed"===a:this.opt("fixedWeekCount")}}),Bb.basicWeek=qb,qb.prototype=A(ob.prototype),a.extend(qb.prototype,{name:"basicWeek",incrementDate:function(a,b){return a.clone().stripTime().add(b,"weeks").startOf("week")},render:function(a){this.intervalStart=a.clone().stripTime().startOf("week"),this.intervalEnd=this.intervalStart.clone().add(1,"weeks"),this.start=this.skipHiddenDays(this.intervalStart),this.end=this.skipHiddenDays(this.intervalEnd,-1,!0),this.title=this.calendar.formatRange(this.start,this.end.clone().subtract(1),this.opt("titleFormat")," — "),ob.prototype.render.call(this,1,this.getCellsPerWeek(),!1)}}),Bb.basicDay=rb,rb.prototype=A(ob.prototype),a.extend(rb.prototype,{name:"basicDay",incrementDate:function(a,b){var c=a.clone().stripTime().add(b,"days");return c=this.skipHiddenDays(c,0>b?-1:1)},render:function(a){this.start=this.intervalStart=a.clone().stripTime(),this.end=this.intervalEnd=this.start.clone().add(1,"days"),this.title=this.calendar.formatDate(this.start,this.opt("titleFormat")),ob.prototype.render.call(this,1,1,!1)}}),e({allDaySlot:!0,allDayText:"all-day",scrollTime:"06:00:00",slotDuration:"00:30:00",axisFormat:sb,timeFormat:{agenda:tb},minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0});var Kb=5;ub.prototype=A(nb.prototype),a.extend(ub.prototype,{timeGrid:null,dayGrid:null,axisWidth:null,noScrollRowEls:null,bottomRuleEl:null,bottomRuleHeight:null,render:function(b){this.rowCnt=1,this.colCnt=b,this.el.addClass("fc-agenda-view").html(this.renderHtml()),this.scrollerEl=this.el.find(".fc-time-grid-container"),this.timeGrid.coordMap.containerEl=this.scrollerEl,this.timeGrid.el=this.el.find(".fc-time-grid"),this.timeGrid.render(),this.bottomRuleEl=a('').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.el=this.el.find(".fc-day-grid"),this.dayGrid.render(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)"),nb.prototype.render.call(this),this.resetScroll()},destroy:function(){this.timeGrid.destroy(),this.dayGrid&&this.dayGrid.destroy(),nb.prototype.destroy.call(this)},renderHtml:function(){return''},headIntroHtml:function(){var a,b,c,d;return this.opt("weekNumbers")?(a=this.cellToDate(0,0),b=this.calendar.calculateWeekNumber(a),c=this.opt("weekNumberTitle"),d=this.opt("isRTL")?b+c:c+b,'"):'"},dayIntroHtml:function(){return'"+(this.opt("allDayHtml")||E(this.opt("allDayText")))+" | "},slotBgIntroHtml:function(){return' | "},introHtml:function(){return' | "},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},updateSize:function(a){a&&this.timeGrid.resize(),nb.prototype.updateSize.call(this,a)},updateWidth:function(){this.axisWidth=p(this.el.find(".fc-axis"))},setHeight:function(a,b){var c,d;null===this.bottomRuleHeight&&(this.bottomRuleHeight=this.bottomRuleEl.outerHeight()),this.bottomRuleEl.hide(),this.scrollerEl.css("overflow",""),r(this.scrollerEl),m(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.destroySegPopover(),c=this.opt("eventLimit"),c&&"number"!=typeof c&&(c=Kb),c&&this.dayGrid.limitRows(c)),b||(d=this.computeScrollerHeight(a),q(this.scrollerEl,d)?(l(this.noScrollRowEls,t(this.scrollerEl)),d=this.computeScrollerHeight(a),this.scrollerEl.height(d),this.restoreScroll()):(this.scrollerEl.height(d).css("overflow","hidden"),this.bottomRuleEl.show()))},resetScroll:function(){function a(){c.scrollerEl.scrollTop(e)}var c=this,d=b.duration(this.opt("scrollTime")),e=this.timeGrid.computeTimeTop(d);e=Math.ceil(e),e&&e++,a(),setTimeout(a,0)},renderEvents:function(a){var b,c,d=[],e=[],f=[];for(c=0;cb?-1:1)},render:function(a){this.start=this.intervalStart=a.clone().stripTime(),this.end=this.intervalEnd=this.start.clone().add(1,"days"),this.title=this.calendar.formatDate(this.start,this.opt("titleFormat")),ub.prototype.render.call(this,1)}})});