text: /*!
   * FullCalendar v2.3.1
   * Docs & License: http://fullcalendar.io/
   * (c) 2015 Adam Shaw
   */
  (function(t){'function'==typeof define&&define.amd?define(['jquery','moment'],t):'object'==typeof exports?module.exports=t(require('jquery'),require('moment')):t(jQuery,moment)})(function(t,e){function y(){var i,o,e,r,s,n=Array.prototype.slice.call(arguments),l={};for(i=0;z.length>i;i++){for(o=z[i],e=null,r=0;n.length>r;r++)s=n[r][o],t.isPlainObject(s)?e=t.extend(e||{},s):null!=s&&(e=null);null!==e&&(l[o]=e)};return n.unshift({}),n.push(l),t.extend.apply(t,n)};function jt(e){var n,i={views:e.views||{}};return t.each(e,function(e,r){'views'!=e&&(t.isPlainObject(r)&&!/(time|duration|interval)$/i.test(e)&&-1==t.inArray(e,z)?(n=null,t.each(r,function(t,r){/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(t)?(i.views[t]||(i.views[t]={}),i.views[t][e]=r):(n||(n={}),n[t]=r)}),n&&(i[e]=n)):i[e]=r)}),i};function et(t,e){e.left&&t.css({'border-left-width':1,'margin-left':e.left-1}),e.right&&t.css({'border-right-width':1,'margin-right':e.right-1})};function nt(t){t.css({'margin-left':'','margin-right':'','border-left-width':'','border-right-width':''})};function b(){t('body').addClass('fc-not-allowed')};function m(){t('body').removeClass('fc-not-allowed')};function it(e,n,i){var r=Math.floor(n/e.length),o=Math.floor(n-r*(e.length-1)),s=[],l=[],a=[],u=0;rt(e),e.each(function(n,i){var d=n===e.length-1?o:r,c=t(i).outerHeight(!0);d>c?(s.push(i),l.push(c),a.push(t(i).height())):u+=c}),i&&(n-=u,r=Math.floor(n/s.length),o=Math.floor(n-r*(s.length-1))),t(s).each(function(e,n){var i=e===s.length-1?o:r,u=l[e],c=a[e],d=i-(u-c);i>u&&t(n).height(d)})};function rt(t){t.height('')};function st(e){var n=0;return e.find('> *').each(function(e,i){var r=t(i).outerWidth();r>n&&(n=r)}),n++,e.width(n),n};function ot(t,e){return t.height(e).addClass('fc-scroller'),t[0].scrollHeight-1>t[0].clientHeight?!0:(G(t),!1)};function G(t){t.height('').removeClass('fc-scroller')};function lt(e){var i=e.css('position'),n=e.parents().filter(function(){var e=t(this);return/(auto|scroll)/.test(e.css('overflow')+e.css('overflow-y')+e.css('overflow-x'))}).eq(0);return'fixed'!==i&&n.length?n:t(e[0].ownerDocument||document)};function at(t){var e=t.offset();return{left:e.left,right:e.left+t.outerWidth(),top:e.top,bottom:e.top+t.outerHeight()}};function ut(t){var e=t.offset(),n=D(t),i=e.left+v(t,'border-left-width')+n.left,r=e.top+v(t,'border-top-width')+n.top;return{left:i,right:i+t[0].clientWidth,top:r,bottom:r+t[0].clientHeight}};function Ut(t){var e=t.offset(),n=e.left+v(t,'border-left-width')+v(t,'padding-left'),i=e.top+v(t,'border-top-width')+v(t,'padding-top');return{left:n,right:n+t.width(),top:i,bottom:i+t.height()}};function D(t){var n=t.innerWidth()-t[0].clientWidth,e={left:0,right:0,top:0,bottom:t.innerHeight()-t[0].clientHeight};return qt()&&'rtl'==t.css('direction')?e.left=n:e.right=n,e};function qt(){return null===F&&(F=Xt()),F};function Xt(){var e=t('<div><div/></div>').css({position:'absolute',top:-1e3,left:0,border:0,padding:0,overflow:'scroll',direction:'rtl'}).appendTo('body'),n=e.children(),i=n.offset().left>e.offset().left;return e.remove(),i};function v(t,e){return parseFloat(t.css(e))||0};function ct(t){return 1==t.which&&!t.ctrlKey};function Kt(t,e){var n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1};function Qt(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}};function te(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}};function ee(t,e){return{left:t.left-e.left,top:t.top-e.top}};function L(t,e){var n,i,r,s,o=t.start,l=t.end,a=e.start,u=e.end;return l>a&&u>o?(o>=a?(n=o.clone(),r=!0):(n=a.clone(),r=!1),u>=l?(i=l.clone(),s=!0):(i=u.clone(),s=!1),{start:n,end:i,isStart:r,isEnd:s}):void 0};function dt(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),'days'),ms:t.time()-n.time()})};function ne(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),'days')})};function ht(t,n,i){return e.duration(Math.round(t.diff(n,i,!0)),i)};function P(t,e){var n,i,r;for(n=0;M.length>n&&(i=M[n],r=ie(i,t,e),!(r>=1&&pt(r)));n++);return i};function ie(t,n,i){return null!=i?i.diff(n,t,!0):e.isDuration(n)?n.as(t):n.end.diff(n.start,t,!0)};function V(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())};function re(t){return'[object Date]'===Object.prototype.toString.call(t)||t instanceof Date};function ft(t){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t)};function C(t){var e=function(){};return e.prototype=t,new e};function A(t,e){for(var n in t)gt(t,n)&&(e[n]=t[n])};function se(t,e){var i,n,r=['constructor','toString','valueOf'];for(i=0;r.length>i;i++)n=r[i],t[n]!==Object.prototype[n]&&(e[n]=t[n])};function gt(t,e){return It.call(t,e)};function oe(e){return/undefined|null|boolean|number|string/.test(t.type(e))};function T(e,n,i){if(t.isFunction(e)&&(e=[e]),e){var r,s;for(r=0;e.length>r;r++)s=e[r].apply(n,i)||s;return s}};function l(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t]};function r(t){return(t+'').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/'/g,'&#039;').replace(/"/g,'&quot;').replace(/\n/g,'<br />')};function O(t){return t.replace(/&.*?;/g,'')};function H(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+':'+e)}),n.join(';')};function le(t){return t.charAt(0).toUpperCase()+t.slice(1)};function ae(t,e){return t-e};function pt(t){return 0===t%1};function c(t,e){var n=t[e];return function(){return n.apply(t,arguments)}};function N(t,e){var n,i,r,s,o=function(){var l=+new Date-s;e>l&&l>0?n=setTimeout(o,e-l):(n=null,t.apply(r,i),n||(r=i=null))};return function(){r=this,i=arguments,s=+new Date,n||(n=setTimeout(o,e))}};function B(n,i,r){var l,a,u,s,o=n[0],c=1==n.length&&'string'==typeof o;return e.isMoment(o)?(s=e.apply(null,n),mt(o,s)):re(o)||void 0===o?s=e.apply(null,n):(l=!1,a=!1,c?Wt.test(o)?(o+='-01',n=[o],l=!0,a=!0):(u=Zt.exec(o))&&(l=!u[5],a=!0):t.isArray(o)&&(a=!0),s=i||l?e.utc.apply(e,n):e.apply(null,n),l?(s._ambigTime=!0,s._ambigZone=!0):r&&(a?s._ambigZone=!0:c&&(s.utcOffset?s.utcOffset(o):s.zone(o)))),s._fullCalendar=!0,s};function Y(t,i){var s,r,l=!1,a=!1,u=t.length,o=[];for(s=0;u>s;s++)r=t[s],e.isMoment(r)||(r=n.moment.parseZone(r)),l=l||r._ambigTime,a=a||r._ambigZone,o.push(r);for(s=0;u>s;s++)r=o[s],i||!l||r._ambigTime?a&&!r._ambigZone&&(o[s]=r.clone().stripZone()):o[s]=r.clone().stripTime();return o};function mt(t,e){t._ambigTime?e._ambigTime=!0:e._ambigTime&&(e._ambigTime=!1),t._ambigZone?e._ambigZone=!0:e._ambigZone&&(e._ambigZone=!1)};function vt(t,e){t.year(e[0]||0).month(e[1]||0).date(e[2]||0).hours(e[3]||0).minutes(e[4]||0).seconds(e[5]||0).milliseconds(e[6]||0)};function f(t,e){return s.format.call(t,e)};function ue(t,e){return yt(t,St(e))};function yt(t,e){var n,i='';for(n=0;e.length>n;n++)i+=I(t,e[n]);return i};function I(t,e){var n,i;return'string'==typeof e?e:(n=e.token)?K[n]?K[n](t):f(t,n):e.maybe&&(i=yt(t,e.maybe),i.match(/[1-9]/))?i:''};function wt(t,e,i,r,s){var o;return t=n.moment.parseZone(t),e=n.moment.parseZone(e),o=(t.localeData||t.lang).call(t),i=o.longDateFormat(i)||i,r=r||' - ',ce(t,e,St(i),r,s)};function ce(t,e,n,i,r){var s,o,l,a,h='',d='',u='',c='',f='';for(o=0;n.length>o&&(s=Et(t,e,n[o]),s!==!1);o++)h+=s;for(l=n.length-1;l>o&&(s=Et(t,e,n[l]),s!==!1);l--)d=s+d;for(a=o;l>=a;a++)u+=I(t,n[a]),c+=I(e,n[a]);return(u||c)&&(f=r?c+i+u:u+i+c),h+f+d};function Et(t,e,n){var i,r;return'string'==typeof n?n:(i=n.token)&&(r=Yt[i.charAt(0)],r&&t.isSame(e,r))?f(t,i):!1};function St(t){return t in x?x[t]:x[t]=bt(t)};function bt(t){for(var e,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;e=i.exec(t);)e[1]?n.push(e[1]):e[2]?n.push({maybe:bt(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push(e[5]);return n};function a(){};function Dt(t,e){return t||e?t&&e?t.grid===e.grid&&t.row===e.row&&t.col===e.col:!1:!0};function de(t){var e=Ct(t);return'background'===e||'inverse-background'===e};function he(t){return'inverse-background'===Ct(t)};function Ct(t){return l((t.source||{}).rendering,t.rendering)};function fe(t){var e,n,i={};for(e=0;t.length>e;e++)n=t[e],(i[n._id]||(i[n._id]=[])).push(n);return i};function ge(t,e){return t.eventStartMS-e.eventStartMS};function w(t,e){return t.eventStartMS-e.eventStartMS||e.eventDurationMS-t.eventDurationMS||e.event.allDay-t.event.allDay||(t.event.title||'').localeCompare(e.event.title)};function pe(i){var r,s,o,a,l=n.dataAttrPrefix;return l&&(l+='-'),r=i.data(l+'event')||null,r&&(r='object'==typeof r?t.extend({},r):{},s=r.start,null==s&&(s=r.time),o=r.duration,a=r.stick,delete r.start,delete r.time,delete r.duration,delete r.stick),null==s&&(s=i.data(l+'start')),null==s&&(s=i.data(l+'time')),null==o&&(o=i.data(l+'duration')),null==a&&(a=i.data(l+'stick')),s=null!=s?e.duration(s):null,o=null!=o?e.duration(o):null,a=Boolean(a),{eventProps:r,startTime:s,duration:o,stick:a}};function me(t,e){var n,i;for(n=0;e.length>n;n++)if(i=e[n],i.leftCol<=t.rightCol&&i.rightCol>=t.leftCol)return!0;return!1};function ve(t,e){return t.leftCol-e.leftCol};function ye(t){var i,n,e;if(t.sort(w),i=we(t),Ee(i),n=i[0]){for(e=0;n.length>e;e++)Tt(n[e]);for(e=0;n.length>e;e++)W(n[e],0,0)}};function we(t){var i,r,e,n=[];for(i=0;t.length>i;i++){for(r=t[i],e=0;n.length>e&&Ht(r,n[e]).length;e++);r.level=e,(n[e]||(n[e]=[])).push(r)};return n};function Ee(t){var e,s,n,i,r;for(e=0;t.length>e;e++)for(s=t[e],n=0;s.length>n;n++)for(i=s[n],i.forwardSegs=[],r=e+1;t.length>r;r++)Ht(i,t[r],i.forwardSegs)};function Tt(t){var e,n,r=t.forwardSegs,i=0;if(void 0===t.forwardPressure){for(e=0;r.length>e;e++)n=r[e],Tt(n),i=Math.max(i,1+n.forwardPressure);t.forwardPressure=i}};function W(t,e,n){var r,i=t.forwardSegs;if(void 0===t.forwardCoord)for(i.length?(i.sort(be),W(i[0],e+1,n),t.forwardCoord=i[0].backwardCoord):t.forwardCoord=1,t.backwardCoord=t.forwardCoord-(t.forwardCoord-n)/(e+1),r=0;i.length>r;r++)W(i[r],0,t.forwardCoord)};function Ht(t,e,n){n=n||[];for(var i=0;e.length>i;i++)Se(t,e[i])&&n.push(e[i]);return n};function Se(t,e){return t.bottom>e.top&&t.top<e.bottom};function be(t,e){return e.forwardPressure-t.forwardPressure||(t.backwardCoord||0)-(e.backwardCoord||0)||w(t,e)};function De(i,r){function G(){h?p()&&(x(),u()):L()};function L(){M=o.theme?'ui':'fc',i.addClass('fc'),o.isRTL?i.addClass('fc-rtl'):i.addClass('fc-ltr'),o.theme?i.addClass('ui-widget'):i.addClass('fc-unthemed'),h=t('<div class=\'fc-view-container\'/>').prependTo(i),d=s.header=new Ce(s,o),f=d.render(),f&&i.prepend(f),u(o.defaultView),o.handleWindowResize&&(m=N(V,o.windowResizeDelay),t(window).resize(m))};function P(){l&&l.removeElement(),d.destroy(),h.remove(),i.removeClass('fc fc-ltr fc-rtl fc-unthemed ui-widget'),m&&t(window).unbind('resize',m)};function p(){return i.is(':visible')};function u(e){g++,l&&e&&l.type!==e&&(d.deactivateButton(l.type),y(),l.removeElement(),l=s.view=null),!l&&e&&(l=s.view=b[e]||(b[e]=s.instantiateView(e)),l.setElement(t('<div class=\'fc-view fc-'+e+'-view\' />').appendTo(h)),d.activateButton(e)),l&&(a=l.massageCurrentDate(a),l.isDisplayed&&a.isWithin(l.intervalStart,l.intervalEnd)||p()&&(y(),l.display(a),w(),W(),Z(),B())),w(),g--};function H(t){return p()?(t&&R(),g++,l.updateSize(!0),g--,!0):void 0};function x(){p()&&R()};function R(){E='number'==typeof o.contentHeight?o.contentHeight:'number'==typeof o.height?o.height-(f?f.outerHeight(!0):0):Math.round(h.width()/Math.max(o.aspectRatio,.5))};function V(t){!g&&t.target===window&&l.start&&H(!0)&&l.trigger('windowResize',S)};function A(){O(),k()};function v(){p()&&(y(),l.displayEvents(D),w())};function O(){y(),l.clearEvents(),w()};function B(){!o.lazyFetching||F(l.start,l.end)?k():v()};function k(){z(l.start,l.end)};function Y(t){D=t,v()};function I(){v()};function W(){d.updateTitle(l.title)};function Z(){var t=s.getNow();t.isWithin(l.intervalStart,l.intervalEnd)?d.disableButton('today'):d.enableButton('today')};function j(t,e){t=s.moment(t),e=e?s.moment(e):t.hasTime()?t.clone().add(s.defaultTimedEventDuration):t.clone().add(s.defaultAllDayEventDuration),l.select({start:t,end:e})};function U(){l&&l.unselect()};function q(){a=l.computePrevDate(a),u()};function X(){a=l.computeNextDate(a),u()};function K(){a.add(-1,'years'),u()};function Q(){a.add(1,'years'),u()};function tt(){a=s.getNow(),u()};function et(t){a=s.moment(t),u()};function nt(t){a.add(e.duration(t)),u()};function it(t,e){var n;e=e||'day',n=s.getViewSpec(e)||s.getUnitViewSpec(e),a=t,u(n?n.type:null)};function rt(){return a.clone()};function y(){h.css({width:'100%',height:h.height(),overflow:'hidden'})};function w(){h.css({width:'',height:'',overflow:''})};function st(){return s};function ot(){return l};function lt(t,e){return void 0===e?o[t]:(('height'==t||'contentHeight'==t||'aspectRatio'==t)&&(o[t]=e,H(!0)),void 0)};function at(t,e){return o[t]?o[t].apply(e||S,Array.prototype.slice.call(arguments,2)):void 0};var s=this;s.initOptions(r||{});var o=this.options;s.render=G,s.destroy=P,s.refetchEvents=A,s.reportEvents=Y,s.reportEventChange=I,s.rerenderEvents=v,s.changeView=u,s.select=j,s.unselect=U,s.prev=q,s.next=X,s.prevYear=K,s.nextYear=Q,s.today=tt,s.gotoDate=et,s.incrementDate=nt,s.zoomTo=it,s.getDate=rt,s.getCalendar=st,s.getView=ot,s.option=lt,s.trigger=at;var c=C(Rt(o.lang));if(o.monthNames&&(c._months=o.monthNames),o.monthNamesShort&&(c._monthsShort=o.monthNamesShort),o.dayNames&&(c._weekdays=o.dayNames),o.dayNamesShort&&(c._weekdaysShort=o.dayNamesShort),null!=o.firstDay){var T=C(c._week);T.dow=o.firstDay,c._week=T};c._fullCalendar_weekCalc=function(t){return'function'==typeof t?t:'local'===t?t:'iso'===t||'ISO'===t?'ISO':void 0}(o.weekNumberCalculation),s.defaultAllDayEventDuration=e.duration(o.defaultAllDayEventDuration),s.defaultTimedEventDuration=e.duration(o.defaultTimedEventDuration),s.moment=function(){var t;return'local'===o.timezone?(t=n.moment.apply(null,arguments),t.hasTime()&&t.local()):t='UTC'===o.timezone?n.moment.utc.apply(null,arguments):n.moment.parseZone.apply(null,arguments),'_locale'in t?t._locale=c:t._lang=c,t},s.getIsAmbigTimezone=function(){return'local'!==o.timezone&&'UTC'!==o.timezone},s.rezoneDate=function(t){return s.moment(t.toArray())},s.getNow=function(){var t=o.now;return'function'==typeof t&&(t=t()),s.moment(t)},s.getEventEnd=function(t){return t.end?t.end.clone():s.getDefaultEventEnd(t.allDay,t.start)},s.getDefaultEventEnd=function(t,e){var n=e.clone();return t?n.stripTime().add(s.defaultAllDayEventDuration):n.add(s.defaultTimedEventDuration),s.getIsAmbigTimezone()&&n.stripZone(),n},s.humanizeDuration=function(t){return(t.locale||t.lang).call(t,o.lang).humanize()},Te.call(s,o);var d,f,h,M,l,E,m,a,F=s.isFetchNeeded,z=s.fetchEvents,S=i[0],b={},g=0,D=[];a=null!=o.defaultDate?s.moment(o.defaultDate):s.getNow(),s.getSuggestedViewHeight=function(){return void 0===E&&x(),E},s.isHeightAuto=function(){return'auto'===o.contentHeight||'auto'===o.height}};function xt(e){t.each(Vt,function(t,n){null==e[t]&&(e[t]=n(e))})};function Rt(t){var n=e.localeData||e.langData;return n.call(e,t)||n.call(e,'en')};function Ce(e,n){function u(){var e=n.header;return i=n.theme?'ui':'fc',e?o=t('<div class=\'fc-toolbar\'/>').append(l('left')).append(l('right')).append(l('center')).append('<div class="fc-clear"/>'):void 0};function c(){o.remove()};function l(s){var o=t('<div class="fc-'+s+'"/>'),l=n.header[s];return l&&t.each(l.split(' '),function(){var l,s=t(),u=!0;t.each(this.split(','),function(o,l){var d,h,f,g,p,m,v,y,c;'title'==l?(s=s.add(t('<h2>&nbsp;</h2>')),u=!1):(d=e.getViewSpec(l),d?(h=function(){e.changeView(l)},a.push(l),f=d.buttonTextOverride,g=d.buttonTextDefault):e[l]&&(h=function(){e[l]()},f=(e.overrides.buttonText||{})[l],g=n.buttonText[l]),h&&(p=n.themeButtonIcons[l],m=n.buttonIcons[l],v=f?r(f):p&&n.theme?'<span class=\'ui-icon ui-icon-'+p+'\'></span>':m&&!n.theme?'<span class=\'fc-icon fc-icon-'+m+'\'></span>':r(g),y=['fc-'+l+'-button',i+'-button',i+'-state-default'],c=t('<button type="button" class="'+y.join(' ')+'">'+v+'</button>').click(function(){c.hasClass(i+'-state-disabled')||(h(),(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')}),s=s.add(c)))}),u&&s.first().addClass(i+'-corner-left').end().last().addClass(i+'-corner-right').end(),s.length>1?(l=t('<div/>'),u&&l.addClass('fc-button-group'),l.append(s),o.append(l)):o.append(s)}),o};function d(t){o.find('h2').text(t)};function h(t){o.find('.fc-'+t+'-button').addClass(i+'-state-active')};function f(t){o.find('.fc-'+t+'-button').removeClass(i+'-state-active')};function g(t){o.find('.fc-'+t+'-button').attr('disabled','disabled').addClass(i+'-state-disabled')};function p(t){o.find('.fc-'+t+'-button').removeAttr('disabled').removeClass(i+'-state-disabled')};function m(){return a};var s=this;s.render=u,s.destroy=c,s.updateTitle=d,s.activateButton=h,s.deactivateButton=f,s.disableButton=g,s.enableButton=p,s.getViewsWithButtons=m;var i,o=t(),a=[]};function Te(i){function O(t,e){return!a||t.clone().stripZone()<a.clone().stripZone()||e.clone().stripZone()>u.clone().stripZone()};function N(t,e){a=t,u=e,s=[];var r=++m,i=o.length;g=i;for(var n=0;i>n;n++)b(o[n],r)};function b(e,n){D(e,function(i){var r,o,l,a=t.isArray(e.events);if(n==m){if(i)for(r=0;i.length>r;r++)o=i[r],l=a?o:c(o,e),l&&s.push.apply(s,f(l));g--,g||d(s)}})};function D(e,s){var d,h,m=n.sourceFetchers;for(d=0;m.length>d;d++){if(h=m[d].call(r,e,a.clone(),u.clone(),i.timezone,s),h===!0)return;if('object'==typeof h)return D(h,s),void 0};var o=e.events;if(o)t.isFunction(o)?(k(),o.call(r,a.clone(),u.clone(),i.timezone,function(t){s(t),M()})):t.isArray(o)?s(o):s();else{var S=e.url;if(S){var p,y=e.success,w=e.error,E=e.complete;p=t.isFunction(e.data)?e.data():e.data;var c=t.extend({},p||{}),f=l(e.startParam,i.startParam),g=l(e.endParam,i.endParam),v=l(e.timezoneParam,i.timezoneParam);f&&(c[f]=a.format()),g&&(c[g]=u.format()),i.timezone&&'local'!=i.timezone&&(c[v]=i.timezone),k(),t.ajax(t.extend({},zt,e,{data:c,success:function(e){e=e||[];var n=T(y,this,arguments);t.isArray(n)&&(e=n),s(e)},error:function(){T(w,this,arguments),s()},complete:function(){T(E,this,arguments),M()}}))}
  else s()}};function B(t){var e=C(t);e&&(o.push(e),g++,b(e,m))};function C(e){var i,s,o=n.sourceNormalizers;if(t.isFunction(e)||t.isArray(e)?i={events:e}:'string'==typeof e?i={url:e}:'object'==typeof e&&(i=t.extend({},e)),i){for(i.className?'string'==typeof i.className&&(i.className=i.className.split(/\s+/)):i.className=[],t.isArray(i.events)&&(i.origArray=i.events,i.events=t.map(i.events,function(t){return c(t,i)})),s=0;o.length>s;s++)o[s].call(r,i);return i}};function Y(e){o=t.grep(o,function(t){return!H(t,e)}),s=t.grep(s,function(t){return!H(t.source,e)}),d(s)};function H(t,e){return t&&e&&x(t)==x(e)};function x(t){return('object'==typeof t?t.origArray||t.googleCalendarId||t.url||t.events:null)||t};function I(t){t.start=r.moment(t.start),t.end=t.end?r.moment(t.end):null,G(t,W(t)),d(s)};function W(e){var n={};return t.each(e,function(t,e){R(t)&&void 0!==e&&oe(e)&&(n[t]=e)}),n};function R(t){return!/^_|^(id|allDay|start|end)$/.test(t)};function j(t,e){var i,r,n,o=c(t);if(o){for(i=f(o),r=0;i.length>r;r++)n=i[r],n.source||(e&&(p.events.push(n),n.source=p),s.push(n));return d(s),i};return[]};function U(e){var i,n;for(null==e?e=function(){return!0}:t.isFunction(e)||(i=e+'',e=function(t){return t._id==i}),s=t.grep(s,e,!0),n=0;o.length>n;n++)t.isArray(o[n].events)&&(o[n].events=t.grep(o[n].events,e,!0));d(s)};function v(e){return t.isFunction(e)?t.grep(s,e):null!=e?(e+='',t.grep(s,function(t){return t._id==e})):s};function k(){S++||w('loading',null,!0,E())};function M(){--S||w('loading',null,!1,E())};function c(n,s){var a,o,c,u={};if(i.eventDataTransform&&(n=i.eventDataTransform(n)),s&&s.eventDataTransform&&(n=s.eventDataTransform(n)),t.extend(u,n),s&&(u.source=s),u._id=n._id||(void 0===n.id?'_fc'+Gt++:n.id+''),u.className=n.className?'string'==typeof n.className?n.className.split(/\s+/):n.className:[],a=n.start||n.date,o=n.end,ft(a)&&(a=e.duration(a)),ft(o)&&(o=e.duration(o)),n.dow||e.isDuration(a)||e.isDuration(o))u.start=a?e.duration(a):null,u.end=o?e.duration(o):null,u._recurring=!0;else{if(a&&(a=r.moment(a),!a.isValid()))return!1;o&&(o=r.moment(o),o.isValid()||(o=null)),c=n.allDay,void 0===c&&(c=l(s?s.allDayDefault:void 0,i.allDayDefault)),F(a,o,c,u)};return u};function F(t,e,n,i){i.start=t,i.end=e,i.allDay=n,h(i),Z(i)};function h(t){z(t),t.end&&!t.end.isAfter(t.start)&&(t.end=null),t.end||(t.end=i.forceEventDuration?r.getDefaultEventEnd(t.allDay,t.start):null)};function z(t){null==t.allDay&&(t.allDay=!(t.start.hasTime()||t.end&&t.end.hasTime())),t.allDay?(t.start.stripTime(),t.end&&t.end.stripTime()):(t.start.hasTime()||(t.start=r.rezoneDate(t.start)),t.end&&!t.end.hasTime()&&(t.end=r.rezoneDate(t.end)))};function y(e){var n;return e.end||(n=e.allDay,null==n&&(n=!e.start.hasTime()),e=t.extend({},e),e.end=r.getDefaultEventEnd(n,e.start)),e};function f(e,n,i){var s,h,o,r,l,c,d,f,g,p=[];if(n=n||a,i=i||u,e)if(e._recurring){if(h=e.dow)for(s={},o=0;h.length>o;o++)s[h[o]]=!0;for(r=n.clone().stripTime();r.isBefore(i);)(!s||s[r.day()])&&(l=e.start,c=e.end,d=r.clone(),f=null,l&&(d=d.time(l)),c&&(f=r.clone().time(c)),g=t.extend({},e),F(d,f,!l&&!c,g),p.push(g)),r.add(1,'days')}
  else p.push(e);return p};function G(e,n,i){function f(t,e){return i?ht(t,e,i):n.allDay?ne(t,e):dt(t,e)};var s,a,o,u,l,c,d={};return n=n||{},n.start||(n.start=e.start.clone()),void 0===n.end&&(n.end=e.end?e.end.clone():null),null==n.allDay&&(n.allDay=e.allDay),h(n),s={start:e._start.clone(),end:e._end?e._end.clone():r.getDefaultEventEnd(e._allDay,e._start),allDay:n.allDay},h(s),a=null!==e._end&&null===n.end,o=f(n.start,s.start),n.end?(u=f(n.end,s.end),l=u.subtract(o)):l=null,t.each(n,function(t,e){R(t)&&void 0!==e&&(d[t]=e)}),c=q(v(e._id),a,n.allDay,o,l,d),{dateDelta:o,durationDelta:l,undo:c}};function q(e,n,i,s,o,a){var u=r.getIsAmbigTimezone(),l=[];return s&&!s.valueOf()&&(s=null),o&&!o.valueOf()&&(o=null),t.each(e,function(e,c){var f,d;f={start:c.start.clone(),end:c.end?c.end.clone():null,allDay:c.allDay},t.each(a,function(t){f[t]=c[t]}),d={start:c._start,end:c._end,allDay:i},h(d),n?d.end=null:o&&!d.end&&(d.end=r.getDefaultEventEnd(d.allDay,d.start)),s&&(d.start.add(s),d.end&&d.end.add(s)),o&&d.end.add(o),u&&!d.allDay&&(s||o)&&(d.start.stripZone(),d.end&&d.end.stripZone()),t.extend(c,a,d),Z(c),l.push(function(){t.extend(c,f),Z(c)})}),function(){for(var t=0;l.length>t;t++)l[t]()}};function L(e){var n,s=i.businessHours,l={className:'fc-nonbusiness',start:'09:00',end:'17:00',dow:[1,2,3,4,5],rendering:'inverse-background'},o=r.getView();return s&&(n=t.extend({},l,'object'==typeof s?s:{})),n?(e&&(n.start=null,n.end=null),f(c(n),o.start,o.end)):[]};function P(t,e){var n=e.source||{},r=l(e.constraint,n.constraint,i.eventConstraint),s=l(e.overlap,n.overlap,i.eventOverlap);return t=y(t),A(t,r,s,e)};function V(t){return A(t,i.selectConstraint,i.selectOverlap)};function X(e,n){var r,i;return n&&(r=t.extend({},n,e),i=f(c(r))[0]),i?P(e,i):(e=y(e),V(e))};function A(e,n,i,s){var c,d,h,o,a,u;if(e=t.extend({},e),e.start=e.start.clone().stripZone(),e.end=e.end.clone().stripZone(),null!=n){for(c=K(n),d=!1,o=0;c.length>o;o++)if(Q(c[o],e)){d=!0;break};if(!d)return!1};for(h=r.getPeerEvents(s,e),o=0;h.length>o;o++)if(a=h[o],tt(a,e)){if(i===!1)return!1;if('function'==typeof i&&!i(a,s))return!1;if(s){if(u=l(a.overlap,(a.source||{}).overlap),u===!1)return!1;if('function'==typeof u&&!u(s,a))return!1}};return!0};function K(t){return'businessHours'===t?L():'object'==typeof t?f(c(t)):v(t)};function Q(t,e){var n=t.start.clone().stripZone(),i=r.getEventEnd(t).stripZone();return e.start>=n&&i>=e.end};function tt(t,e){var n=t.start.clone().stripZone(),i=r.getEventEnd(t).stripZone();return i>e.start&&e.end>n};var r=this;r.isFetchNeeded=O,r.fetchEvents=N,r.addEventSource=B,r.removeEventSource=Y,r.updateEvent=I,r.renderEvent=j,r.removeEvents=U,r.clientEvents=v,r.mutateEvent=G,r.normalizeEventRange=h,r.normalizeEventRangeTimes=z,r.ensureVisibleEventRange=y;var a,u,w=r.trigger,E=r.getView,d=r.reportEvents,p={events:[]},o=[p],m=0,g=0,S=0,s=[];t.each((i.events?[i.events]:[]).concat(i.eventSources||[]),function(t,e){var n=C(e);n&&o.push(n)}),r.getBusinessHoursEvents=L,r.isEventRangeAllowed=P,r.isSelectionRangeAllowed=V,r.isExternalDropRangeAllowed=X,r.getEventCache=function(){return s}};function Z(t){t._allDay=t.allDay,t._start=t.start.clone(),t._end=t.end?t.end.clone():null};var n=t.fullCalendar={version:'2.3.1'},h=n.views={};t.fn.fullCalendar=function(e){var r=Array.prototype.slice.call(arguments,1),i=this;return this.each(function(s,o){var u,a=t(o),l=a.data('fullCalendar');'string'==typeof e?l&&t.isFunction(l[e])&&(u=l[e].apply(l,r),s||(i=u),'destroy'===e&&a.removeData('fullCalendar')):l||(l=new n.CalendarBase(a,e),a.data('fullCalendar',l),l.render())}),i};var z=['header','buttonText','buttonIcons','themeButtonIcons'];n.intersectionToSeg=L,n.applyAll=T,n.debounce=N,n.isInt=pt,n.htmlEscape=r,n.cssToStr=H,n.proxy=c,n.getClientRect=ut,n.getContentRect=Ut,n.getScrollbarWidths=D;var F=null;n.computeIntervalUnit=P,n.durationHasTime=V;var R,k,Q,tt=['sun','mon','tue','wed','thu','fri','sat'],M=['year','month','week','day','hour','minute','second','millisecond'],It={}.hasOwnProperty,Wt=/^\s*\d{4}-\d\d$/,Zt=/^\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+)?)?)?)?)?$/,i=e.fn,s=t.extend({},i);n.moment=function(){return B(arguments)},n.moment.utc=function(){var t=B(arguments,!0);return t.hasTime()&&t.utc(),t},n.moment.parseZone=function(){return B(arguments,!0,!0)},i.clone=function(){var t=s.clone.apply(this,arguments);return mt(this,t),this._fullCalendar&&(t._fullCalendar=!0),t},i.week=i.weeks=function(t){var e=(this._locale||this._lang)._fullCalendar_weekCalc;return null==t&&'function'==typeof e?e(this):'ISO'===e?s.isoWeek.apply(this,arguments):s.week.apply(this,arguments)},i.time=function(t){if(!this._fullCalendar)return s.time.apply(this,arguments);if(null==t)return e.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,e.isDuration(t)||e.isMoment(t)||(t=e.duration(t));var n=0;return e.isDuration(t)&&(n=24*Math.floor(t.asDays())),this.hours(n+t.hours()).minutes(t.minutes()).seconds(t.seconds()).milliseconds(t.milliseconds())},i.stripTime=function(){var t;return this._ambigTime||(t=this.toArray(),this.utc(),k(this,t.slice(0,3)),this._ambigTime=!0,this._ambigZone=!0),this},i.hasTime=function(){return!this._ambigTime},i.stripZone=function(){var t,e;return this._ambigZone||(t=this.toArray(),e=this._ambigTime,this.utc(),k(this,t),this._ambigTime=e||!1,this._ambigZone=!0),this},i.hasZone=function(){return!this._ambigZone},i.local=function(){var t=this.toArray(),e=this._ambigZone;return s.local.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,e&&Q(this,t),this},i.utc=function(){return s.utc.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,this},t.each(['zone','utcOffset'],function(t,e){s[e]&&(i[e]=function(t){return null!=t&&(this._ambigTime=!1,this._ambigZone=!1),s[e].apply(this,arguments)})}),i.format=function(){return this._fullCalendar&&arguments[0]?ue(this,arguments[0]):this._ambigTime?f(this,'YYYY-MM-DD'):this._ambigZone?f(this,'YYYY-MM-DD[T]HH:mm:ss'):s.format.apply(this,arguments)},i.toISOString=function(){return this._ambigTime?f(this,'YYYY-MM-DD'):this._ambigZone?f(this,'YYYY-MM-DD[T]HH:mm:ss'):s.toISOString.apply(this,arguments)},i.isWithin=function(t,e){var n=Y([this,t,e]);return n[0]>=n[1]&&n[0]<n[2]},i.isSame=function(t,e){var i;return this._fullCalendar?e?(i=Y([this,t],!0),s.isSame.call(i[0],i[1],e)):(t=n.moment.parseZone(t),s.isSame.call(this,t)&&Boolean(this._ambigTime)===Boolean(t._ambigTime)&&Boolean(this._ambigZone)===Boolean(t._ambigZone)):s.isSame.apply(this,arguments)},t.each(['isBefore','isAfter'],function(t,e){i[e]=function(t,n){var i;return this._fullCalendar?(i=Y([this,t]),s[e].call(i[0],i[1],n)):s[e].apply(this,arguments)}}),R='_d'in e()&&'updateOffset'in e,k=R?function(t,n){t._d.setTime(Date.UTC.apply(Date,n)),e.updateOffset(t,!1)}:vt,Q=R?function(t,n){t._d.setTime(+new Date(n[0]||0,n[1]||0,n[2]||0,n[3]||0,n[4]||0,n[5]||0,n[6]||0)),e.updateOffset(t,!1)}:vt;var K={t:function(t){return f(t,'a').charAt(0)},T:function(t){return f(t,'A').charAt(0)}};n.formatRange=wt;var Yt={Y:'year',M:'month',D:'day',d:'day',A:'second',a:'second',T:'second',t:'second',H:'second',h:'second',m:'second',s:'second'},x={};n.Class=a,a.extend=function(t){var e,n=this;return t=t||{},gt(t,'constructor')&&(e=t.constructor),'function'!=typeof e&&(e=t.constructor=function(){n.apply(this,arguments)}),e.prototype=C(n.prototype),A(t,e.prototype),se(t,e.prototype),A(n,e),e},a.mixin=function(t){A(t.prototype||t,this.prototype)};var At=a.extend({isHidden:!0,options:null,el:null,documentMousedownProxy:null,margin:10,constructor:function(t){this.options=t||{}},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 n=this,e=this.options;this.el=t('<div class="fc-popover"/>').addClass(e.className||'').css({top:0,left:0}).append(e.content).appendTo(e.parentEl),this.el.on('click','.fc-close',function(){n.hide()}),e.autoHide&&t(document).on('mousedown',this.documentMousedownProxy=c(this,'documentMousedown'))},documentMousedown:function(e){this.el&&!t(e.target).closest(this.el).length&&this.hide()},destroy:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),t(document).off('mousedown',this.documentMousedownProxy)},position:function(){var s,o,l,e,n,i=this.options,u=this.el.offsetParent().offset(),c=this.el.outerWidth(),d=this.el.outerHeight(),a=t(window),r=lt(this.el);e=i.top||0,n=void 0!==i.left?i.left:void 0!==i.right?i.right-c:0,r.is(window)||r.is(document)?(r=a,s=0,o=0):(l=r.offset(),s=l.top,o=l.left),s+=a.scrollTop(),o+=a.scrollLeft(),i.viewportConstrain!==!1&&(e=Math.min(e,s+r.outerHeight()-d-this.margin),e=Math.max(e,s+this.margin),n=Math.min(n,o+r.outerWidth()-c-this.margin),n=Math.max(n,o+this.margin)),this.el.css({top:e-u.top,left:n-u.left})},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))}}),Ot=a.extend({grid:null,rowCoords:null,colCoords:null,containerEl:null,bounds:null,constructor:function(t){this.grid=t},build:function(){this.rowCoords=this.grid.computeRowCoords(),this.colCoords=this.grid.computeColCoords(),this.computeBounds()},clear:function(){this.rowCoords=null,this.colCoords=null},getCell:function(e,n){var i,r,s,a=this.rowCoords,c=a.length,u=this.colCoords,d=u.length,o=null,l=null;if(this.inBounds(e,n)){for(i=0;c>i;i++)if(r=a[i],n>=r.top&&r.bottom>n){o=i;break};for(i=0;d>i;i++)if(r=u[i],e>=r.left&&r.right>e){l=i;break};if(null!==o&&null!==l)return s=this.grid.getCell(o,l),s.grid=this.grid,t.extend(s,a[o],u[l]),s};return null},computeBounds:function(){this.bounds=this.containerEl?ut(this.containerEl):null},inBounds:function(t,e){var n=this.bounds;return n?t>=n.left&&n.right>t&&e>=n.top&&n.bottom>e:!0}}),Nt=a.extend({coordMaps:null,constructor:function(t){this.coordMaps=t},build:function(){var t,e=this.coordMaps;for(t=0;e.length>t;t++)e[t].build()},getCell:function(t,e){var n,r=this.coordMaps,i=null;for(n=0;r.length>n&&!i;n++)i=r[n].getCell(t,e);return i},clear:function(){var t,e=this.coordMaps;for(t=0;e.length>t;t++)e[t].clear()}}),d=n.DragListener=a.extend({options:null,isListening:!1,isDragging:!1,originX:null,originY:null,mousemoveProxy:null,mouseupProxy:null,subjectEl:null,subjectHref:null,scrollEl:null,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollHandlerProxy:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,constructor:function(t){t=t||{},this.options=t,this.subjectEl=t.subjectEl},mousedown:function(t){ct(t)&&(t.preventDefault(),this.startListening(t),this.options.distance||this.startDrag(t))},startListening:function(e){var n;this.isListening||(e&&this.options.scroll&&(n=lt(t(e.target)),n.is(window)||n.is(document)||(this.scrollEl=n,this.scrollHandlerProxy=N(c(this,'scrollHandler'),100),this.scrollEl.on('scroll',this.scrollHandlerProxy))),t(document).on('mousemove',this.mousemoveProxy=c(this,'mousemove')).on('mouseup',this.mouseupProxy=c(this,'mouseup')).on('selectstart',this.preventDefault),e?(this.originX=e.pageX,this.originY=e.pageY):(this.originX=0,this.originY=0),this.isListening=!0,this.listenStart(e))},listenStart:function(t){this.trigger('listenStart',t)},mousemove:function(t){var e,r,n=t.pageX-this.originX,i=t.pageY-this.originY;this.isDragging||(e=this.options.distance||1,r=n*n+i*i,r>=e*e&&this.startDrag(t)),this.isDragging&&this.drag(n,i,t)},startDrag:function(t){this.isListening||this.startListening(),this.isDragging||(this.isDragging=!0,this.dragStart(t))},dragStart:function(t){var e=this.subjectEl;this.trigger('dragStart',t),(this.subjectHref=e?e.attr('href'):null)&&e.removeAttr('href')},drag:function(t,e,n){this.trigger('drag',t,e,n),this.updateScroll(n)},mouseup:function(t){this.stopListening(t)},stopDrag:function(t){this.isDragging&&(this.stopScrolling(),this.dragStop(t),this.isDragging=!1)},dragStop:function(t){var e=this;this.trigger('dragStop',t),setTimeout(function(){e.subjectHref&&e.subjectEl.attr('href',e.subjectHref)},0)},stopListening:function(e){this.stopDrag(e),this.isListening&&(this.scrollEl&&(this.scrollEl.off('scroll',this.scrollHandlerProxy),this.scrollHandlerProxy=null),t(document).off('mousemove',this.mousemoveProxy).off('mouseup',this.mouseupProxy).off('selectstart',this.preventDefault),this.mousemoveProxy=null,this.mouseupProxy=null,this.isListening=!1,this.listenStop(e))},listenStop:function(t){this.trigger('listenStop',t)},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))},preventDefault:function(t){t.preventDefault()},computeScrollBounds:function(){var t=this.scrollEl;this.scrollBounds=t?at(t):null},updateScroll:function(t){var i,r,s,o,e=this.scrollSensitivity,n=this.scrollBounds,l=0,a=0;n&&(i=(e-(t.pageY-n.top))/e,r=(e-(n.bottom-t.pageY))/e,s=(e-(t.pageX-n.left))/e,o=(e-(n.right-t.pageX))/e,i>=0&&1>=i?l=-1*i*this.scrollSpeed:r>=0&&1>=r&&(l=r*this.scrollSpeed),s>=0&&1>=s?a=-1*s*this.scrollSpeed:o>=0&&1>=o&&(a=o*this.scrollSpeed)),this.setScrollVel(l,a)},setScrollVel:function(t,e){this.scrollTopVel=t,this.scrollLeftVel=e,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(c(this,'scrollIntervalFunc'),this.scrollIntervalMs))},constrainScrollVel:function(){var t=this.scrollEl;0>this.scrollTopVel?0>=t.scrollTop()&&(this.scrollTopVel=0):this.scrollTopVel>0&&t.scrollTop()+t[0].clientHeight>=t[0].scrollHeight&&(this.scrollTopVel=0),0>this.scrollLeftVel?0>=t.scrollLeft()&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&t.scrollLeft()+t[0].clientWidth>=t[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var t=this.scrollEl,e=this.scrollIntervalMs/1e3;this.scrollTopVel&&t.scrollTop(t.scrollTop()+this.scrollTopVel*e),this.scrollLeftVel&&t.scrollLeft(t.scrollLeft()+this.scrollLeftVel*e),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.stopScrolling()},stopScrolling:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.scrollStop())},scrollHandler:function(){this.scrollIntervalId||this.scrollStop()},scrollStop:function(){}}),S=d.extend({coordMap:null,origCell:null,cell:null,coordAdjust:null,constructor:function(t,e){d.prototype.constructor.call(this,e),this.coordMap=t},listenStart:function(t){var n,i,e,r=this.subjectEl;d.prototype.listenStart.apply(this,arguments),this.computeCoords(),t?(i={left:t.pageX,top:t.pageY},e=i,r&&(n=at(r),e=Qt(e,n)),this.origCell=this.getCell(e.left,e.top),r&&this.options.subjectCenter&&(this.origCell&&(n=Kt(this.origCell,n)||n),e=te(n)),this.coordAdjust=ee(e,i)):(this.origCell=null,this.coordAdjust=null)},computeCoords:function(){this.coordMap.build(),this.computeScrollBounds()},dragStart:function(t){var e;d.prototype.dragStart.apply(this,arguments),e=this.getCell(t.pageX,t.pageY),e&&this.cellOver(e)},drag:function(t,e,n){var i;d.prototype.drag.apply(this,arguments),i=this.getCell(n.pageX,n.pageY),Dt(i,this.cell)||(this.cell&&this.cellOut(),i&&this.cellOver(i))},dragStop:function(){this.cellDone(),d.prototype.dragStop.apply(this,arguments)},cellOver:function(t){this.cell=t,this.trigger('cellOver',t,Dt(t,this.origCell),this.origCell)},cellOut:function(){this.cell&&(this.trigger('cellOut',this.cell),this.cellDone(),this.cell=null)},cellDone:function(){this.cell&&this.trigger('cellDone',this.cell)},listenStop:function(){d.prototype.listenStop.apply(this,arguments),this.origCell=this.cell=null,this.coordMap.clear()},scrollStop:function(){d.prototype.scrollStop.apply(this,arguments),this.computeCoords()},getCell:function(t,e){return this.coordAdjust&&(t+=this.coordAdjust.left,e+=this.coordAdjust.top),this.coordMap.getCell(t,e)}}),Bt=a.extend({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,constructor:function(e,n){this.options=n=n||{},this.sourceEl=e,this.parentEl=n.parentEl?t(n.parentEl):e.parent()},start:function(e){this.isFollowing||(this.isFollowing=!0,this.mouseY0=e.pageY,this.mouseX0=e.pageX,this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),t(document).on('mousemove',this.mousemoveProxy=c(this,'mousemove')))},stop:function(e,n){function r(){this.isAnimating=!1,s.destroyEl(),this.top0=this.left0=null,n&&n()};var s=this,i=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,t(document).off('mousemove',this.mousemoveProxy),e&&i&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:i,complete:r})):r())},getEl:function(){var t=this.el;return t||(this.sourceEl.width(),t=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)),t},destroyEl:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var t,e;this.getEl(),null===this.top0&&(this.sourceEl.width(),t=this.sourceEl.offset(),e=this.el.offsetParent().offset(),this.top0=t.top-e.top,this.left0=t.left-e.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},mousemove:function(t){this.topDelta=t.pageY-this.mouseY0,this.leftDelta=t.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())}}),X=a.extend({view:null,isRTL:null,cellHtml:'<td/>',constructor:function(t){this.view=t,this.isRTL=t.opt('isRTL')},rowHtml:function(t,e){var n,r,s=this.getHtmlRenderer('cell',t),i='';for(e=e||0,n=0;this.colCnt>n;n++)r=this.getCell(e,n),i+=s(r);return i=this.bookendCells(i,t,e),'<tr>'+i+'</tr>'},bookendCells:function(t,e,n){var i=this.getHtmlRenderer('intro',e)(n||0),r=this.getHtmlRenderer('outro',e)(n||0),s=this.isRTL?r:i,o=this.isRTL?i:r;return'string'==typeof t?s+t+o:t.prepend(s).append(o)},getHtmlRenderer:function(t,e){var o,i,r,n,s=this.view;return o=t+'Html',e&&(i=e+le(t)+'Html'),i&&(n=s[i])?r=s:i&&(n=this[i])?r=this:(n=s[o])?r=s:(n=this[o])&&(r=this),'function'==typeof n?function(){return n.apply(r,arguments)||''}:function(){return n||''}}}),u=n.Grid=X.extend({start:null,end:null,rowCnt:0,colCnt:0,rowData:null,colData:null,el:null,coordMap:null,elsByFill:null,externalDragStartProxy:null,colHeadFormat:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,cellDuration:null,largeUnit:null,constructor:function(){X.apply(this,arguments),this.coordMap=new Ot(this),this.elsByFill={},this.externalDragStartProxy=c(this,'externalDragStart')},computeColHeadFormat:function(){},computeEventTimeFormat:function(){return this.view.opt('smallTimeFormat')},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(t){var n,i,e=this.view;this.start=t.start.clone(),this.end=t.end.clone(),this.rowData=[],this.colData=[],this.updateCells(),this.colHeadFormat=e.opt('columnFormat')||this.computeColHeadFormat(),this.eventTimeFormat=e.opt('eventTimeFormat')||e.opt('timeFormat')||this.computeEventTimeFormat(),n=e.opt('displayEventTime'),null==n&&(n=this.computeDisplayEventTime()),i=e.opt('displayEventEnd'),null==i&&(i=this.computeDisplayEventEnd()),this.displayEventTime=n,this.displayEventEnd=i},updateCells:function(){},rangeToSegs:function(){},diffDates:function(t,e){return this.largeUnit?ht(t,e,this.largeUnit):dt(t,e)},getCell:function(e,n){var i;return null==n&&('number'==typeof e?(n=e%this.colCnt,e=Math.floor(e/this.colCnt)):(n=e.col,e=e.row)),i={row:e,col:n},t.extend(i,this.getRowData(e),this.getColData(n)),t.extend(i,this.computeCellRange(i)),i},computeCellRange:function(t){var e=this.computeCellDate(t);return{start:e,end:e.clone().add(this.cellDuration)}},computeCellDate:function(){},getRowData:function(t){return this.rowData[t]||{}},getColData:function(t){return this.colData[t]||{}},getRowEl:function(){},getColEl:function(){},getCellDayEl:function(t){return this.getColEl(t.col)||this.getRowEl(t.row)},computeRowCoords:function(){var t,e,n,i=[];for(t=0;this.rowCnt>t;t++)e=this.getRowEl(t),n=e.offset().top,i.push({top:n,bottom:n+e.outerHeight()});return i},computeColCoords:function(){var t,e,n,i=[];for(t=0;this.colCnt>t;t++)e=this.getColEl(t),n=e.offset().left,i.push({left:n,right:n+e.outerWidth()});return i},setElement:function(e){var n=this;this.el=e,e.on('mousedown',function(e){t(e.target).is('.fc-event-container *, .fc-more')||t(e.target).closest('.fc-popover').length||n.dayMousedown(e)}),this.bindSegHandlers(),this.bindGlobalHandlers()},removeElement:function(){this.unbindGlobalHandlers(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},destroyDates:function(){},bindGlobalHandlers:function(){t(document).on('dragstart sortstart',this.externalDragStartProxy)},unbindGlobalHandlers:function(){t(document).off('dragstart sortstart',this.externalDragStartProxy)},dayMousedown:function(t){var n,e,r=this,i=this.view,s=i.opt('selectable'),o=new S(this.coordMap,{scroll:i.opt('dragScroll'),dragStart:function(){i.unselect()},cellOver:function(t,i,o){o&&(n=i?t:null,s&&(e=r.computeSelection(o,t),e?r.renderSelection(e):b()))},cellOut:function(){n=null,e=null,r.destroySelection(),m()},listenStop:function(t){n&&i.trigger('dayClick',r.getCellDayEl(n),n.start,t),e&&i.reportSelection(e,t),m()}});o.mousedown(t)},renderRangeHelper:function(t,e){var n=this.fabricateHelperEvent(t,e);this.renderHelper(n,e)},fabricateHelperEvent:function(t,e){var n=e?C(e.event):{};return n.start=t.start.clone(),n.end=t.end?t.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventRange(n),n.className=(n.className||[]).concat('fc-helper'),e||(n.editable=!1),n},renderHelper:function(){},destroyHelper:function(){},renderSelection:function(t){this.renderHighlight(t)},destroySelection:function(){this.destroyHighlight()},computeSelection:function(t,e){var n,i=[t.start,t.end,e.start,e.end];return i.sort(ae),n={start:i[0].clone(),end:i[3].clone()},this.view.calendar.isSelectionRangeAllowed(n)?n:null},renderHighlight:function(t){this.renderFill('highlight',this.rangeToSegs(t))},destroyHighlight:function(){this.destroyFill('highlight')},highlightSegClasses:function(){return['fc-highlight']},renderFill:function(){},destroyFill:function(t){var e=this.elsByFill[t];e&&(e.remove(),delete this.elsByFill[t])},renderFillSegEls:function(e,n){var i,r=this,s=this[e+'SegEl'],o='',l=[];if(n.length){for(i=0;n.length>i;i++)o+=this.fillSegHtml(e,n[i]);t(o).each(function(e,i){var a=n[e],o=t(i);s&&(o=s.call(r,a,o)),o&&(o=t(o),o.is(r.fillSegTag)&&(a.el=o,l.push(a)))})};return l},fillSegTag:'div',fillSegHtml:function(t,e){var n=this[t+'SegClasses'],i=this[t+'SegCss'],r=n?n.call(this,e):[],s=H(i?i.call(this,e):{});return'<'+this.fillSegTag+(r.length?' class="'+r.join(' ')+'"':'')+(s?' style="'+s+'"':'')+' />'},headHtml:function(){return'<div class="fc-row '+this.view.widgetHeaderClass+'"><table><thead>'+this.rowHtml('head')+'</thead></table></div>'},headCellHtml:function(t){var n=this.view,e=t.start;return'<th class="fc-day-header '+n.widgetHeaderClass+' fc-'+tt[e.day()]+'">'+r(e.format(this.colHeadFormat))+'</th>'},bgCellHtml:function(t){var i=this.view,e=t.start,n=this.getDayClasses(e);return n.unshift('fc-day',i.widgetContentClass),'<td class="'+n.join(' ')+'" data-date="'+e.format('YYYY-MM-DD')+'"></td>'},getDayClasses:function(t){var n=this.view,i=n.calendar.getNow().stripTime(),e=['fc-'+tt[t.day()]];return 1==n.intervalDuration.as('months')&&t.month()!=n.intervalStart.month()&&e.push('fc-other-month'),t.isSame(i,'day')?e.push('fc-today',n.highlightStateClass):i>t?e.push('fc-past'):e.push('fc-future'),e}});u.mixin({mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(t){var i,r,s=this.eventsToSegs(t),e=[],n=[];for(i=0;s.length>i;i++)r=s[i],de(r.event)?e.push(r):n.push(r);e=this.renderBgSegs(e)||e,n=this.renderFgSegs(n)||n,this.segs=e.concat(n)},destroyEvents:function(){this.triggerSegMouseout(),this.destroyFgSegs(),this.destroyBgSegs(),this.segs=null},getEventSegs:function(){return this.segs||[]},renderFgSegs:function(){},destroyFgSegs:function(){},renderFgSegEls:function(e,n){var i,o=this.view,r='',s=[];if(e.length){for(i=0;e.length>i;i++)r+=this.fgSegHtml(e[i],n);t(r).each(function(n,i){var r=e[n],l=o.resolveEventEl(r.event,t(i));l&&(l.data('fc-seg',r),r.el=l,s.push(r))})};return s},fgSegHtml:function(){},renderBgSegs:function(t){return this.renderFill('bgEvent',t)},destroyBgSegs:function(){this.destroyFill('bgEvent')},bgEventSegEl:function(t,e){return this.view.resolveEventEl(t.event,e)},bgEventSegClasses:function(t){var e=t.event,n=e.source||{};return['fc-bgevent'].concat(e.className,n.className||[])},bgEventSegCss:function(t){var n=this.view,e=t.event,i=e.source||{};return{'background-color':e.backgroundColor||e.color||i.backgroundColor||i.color||n.opt('eventBackgroundColor')||n.opt('eventColor')}},businessHoursSegClasses:function(){return['fc-nonbusiness','fc-bgevent']},bindSegHandlers:function(){var e=this,n=this.view;t.each({mouseenter:function(t,n){e.triggerSegMouseover(t,n)},mouseleave:function(t,n){e.triggerSegMouseout(t,n)},click:function(t,e){return n.trigger('eventClick',this,t.event,e)},mousedown:function(i,r){t(r.target).is('.fc-resizer')&&n.isEventResizable(i.event)?e.segResizeMousedown(i,r,t(r.target).is('.fc-start-resizer')):n.isEventDraggable(i.event)&&e.segDragMousedown(i,r)}},function(n,i){e.el.on(n,'.fc-event-container > *',function(n){var r=t(this).data('fc-seg');return!r||e.isDraggingSeg||e.isResizingSeg?void 0:i.call(this,r,n)})})},triggerSegMouseover:function(t,e){this.mousedOverSeg||(this.mousedOverSeg=t,this.view.trigger('eventMouseover',t.el[0],t.event,e))},triggerSegMouseout:function(t,e){e=e||{},this.mousedOverSeg&&(t=t||this.mousedOverSeg,this.mousedOverSeg=null,this.view.trigger('eventMouseout',t.el[0],t.event,e))},segDragMousedown:function(t,e){var i,o=this,n=this.view,a=n.calendar,l=t.el,s=t.event,r=new Bt(t.el,{parentEl:n.el,opacity:n.opt('dragOpacity'),revertDuration:n.opt('dragRevertDuration'),zIndex:2}),u=new S(n.coordMap,{distance:5,scroll:n.opt('dragScroll'),subjectEl:l,subjectCenter:!0,listenStart:function(t){r.hide(),r.start(t)},dragStart:function(e){o.triggerSegMouseout(t,e),o.segDragStart(t,e),n.hideEvent(s)},cellOver:function(e,l,u){t.cell&&(u=t.cell),i=o.computeEventDrop(u,e,s),i&&!a.isEventRangeAllowed(i,s)&&(b(),i=null),i&&n.renderDrag(i,t)?r.hide():r.show(),l&&(i=null)},cellOut:function(){n.destroyDrag(),r.show(),i=null},cellDone:function(){m()},dragStop:function(e){r.stop(!i,function(){n.destroyDrag(),n.showEvent(s),o.segDragStop(t,e),i&&n.reportEventDrop(s,i,this.largeUnit,l,e)})},listenStop:function(){r.stop()}});u.mousedown(e)},segDragStart:function(t,e){this.isDraggingSeg=!0,this.view.trigger('eventDragStart',t.el[0],t.event,e,{})},segDragStop:function(t,e){this.isDraggingSeg=!1,this.view.trigger('eventDragStop',t.el[0],t.event,e,{})},computeEventDrop:function(t,e,n){var r,i,o=this.view.calendar,l=t.start,s=e.start;return l.hasTime()===s.hasTime()?(r=this.diffDates(s,l),n.allDay&&V(r)?(i={start:n.start.clone(),end:o.getEventEnd(n),allDay:!1},o.normalizeEventRangeTimes(i)):i={start:n.start.clone(),end:n.end?n.end.clone():null,allDay:n.allDay},i.start.add(r),i.end&&i.end.add(r)):i={start:s.clone(),end:null,allDay:!s.hasTime()},i},applyDragOpacity:function(t){var e=this.view.opt('dragOpacity');null!=e&&t.each(function(t,n){n.style.opacity=e})},externalDragStart:function(e,n){var i,r,s=this.view;s.opt('droppable')&&(i=t((n?n.item:null)||e.target),r=s.opt('dropAccept'),(t.isFunction(r)?r.call(i[0],i):i.is(r))&&(this.isDraggingExternal||this.listenToExternalDrag(i,e,n)))},listenToExternalDrag:function(t,e,n){var s,r,i=this,o=pe(t);s=new S(this.coordMap,{listenStart:function(){i.isDraggingExternal=!0},cellOver:function(t){r=i.computeExternalDrop(t,o),r?i.renderDrag(r):b()},cellOut:function(){r=null,i.destroyDrag(),m()},dragStop:function(){i.destroyDrag(),m(),r&&i.view.reportExternalDrop(o,r,t,e,n)},listenStop:function(){i.isDraggingExternal=!1}}),s.startDrag(e)},computeExternalDrop:function(t,e){var n={start:t.start.clone(),end:null};return e.startTime&&!n.start.hasTime()&&n.start.time(e.startTime),e.duration&&(n.end=n.start.clone().add(e.duration)),this.view.calendar.isExternalDropRangeAllowed(n,e.eventProps)?n:null},renderDrag:function(){},destroyDrag:function(){},segResizeMousedown:function(t,e,n){var l,i,s=this,o=this.view,a=o.calendar,u=t.el,r=t.event,c=a.getEventEnd(r);l=new S(this.coordMap,{distance:5,scroll:o.opt('dragScroll'),subjectEl:u,dragStart:function(e){s.triggerSegMouseout(t,e),s.segResizeStart(t,e)},cellOver:function(e,l,u){i=n?s.computeEventStartResize(u,e,r):s.computeEventEndResize(u,e,r),i&&(a.isEventRangeAllowed(i,r)?i.start.isSame(r.start)&&i.end.isSame(c)&&(i=null):(b(),i=null)),i&&(o.hideEvent(r),s.renderEventResize(i,t))},cellOut:function(){i=null},cellDone:function(){s.destroyEventResize(),o.showEvent(r),m()},dragStop:function(e){s.segResizeStop(t,e),i&&o.reportEventResize(r,i,this.largeUnit,u,e)}}),l.mousedown(e)},segResizeStart:function(t,e){this.isResizingSeg=!0,this.view.trigger('eventResizeStart',t.el[0],t.event,e,{})},segResizeStop:function(t,e){this.isResizingSeg=!1,this.view.trigger('eventResizeStop',t.el[0],t.event,e,{})},computeEventStartResize:function(t,e,n){return this.computeEventResize('start',t,e,n)},computeEventEndResize:function(t,e,n){return this.computeEventResize('end',t,e,n)},computeEventResize:function(t,e,n,i){var r,s,o=this.view.calendar,l=this.diffDates(n[t],e[t]);return r={start:i.start.clone(),end:o.getEventEnd(i),allDay:i.allDay},r.allDay&&V(l)&&(r.allDay=!1,o.normalizeEventRangeTimes(r)),r[t].add(l),r.start.isBefore(r.end)||(s=i.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration,this.cellDuration&&s>this.cellDuration&&(s=this.cellDuration),'start'==t?r.start=r.end.clone().subtract(s):r.end=r.start.clone().add(s)),r},renderEventResize:function(){},destroyEventResize:function(){},getEventTimeText:function(t,e,n){return null==e&&(e=this.eventTimeFormat),null==n&&(n=this.displayEventEnd),this.displayEventTime&&t.start.hasTime()?n&&t.end?this.view.formatRange(t,e):t.start.format(e):''},getSegClasses:function(t,e,n){var i=t.event,r=['fc-event',t.isStart?'fc-start':'fc-not-start',t.isEnd?'fc-end':'fc-not-end'].concat(i.className,i.source?i.source.className:[]);return e&&r.push('fc-draggable'),n&&r.push('fc-resizable'),r},getEventSkinCss:function(t){var e=this.view,n=t.source||{},i=t.color,r=n.color,s=e.opt('eventColor');return{'background-color':t.backgroundColor||i||n.backgroundColor||r||e.opt('eventBackgroundColor')||s,'border-color':t.borderColor||i||n.borderColor||r||e.opt('eventBorderColor')||s,color:t.textColor||n.textColor||e.opt('eventTextColor')}},eventsToSegs:function(t,e){var n,r=this.eventsToRanges(t),i=[];for(n=0;r.length>n;n++)i.push.apply(i,this.eventRangeToSegs(r[n],e));return i},eventsToRanges:function(e){var i=this,r=fe(e),n=[];return t.each(r,function(t,e){e.length&&n.push.apply(n,he(e[0])?i.eventsToInverseRanges(e):i.eventsToNormalRanges(e))}),n},eventsToNormalRanges:function(t){var e,n,i,r,o=this.view.calendar,s=[];for(e=0;t.length>e;e++)n=t[e],i=n.start.clone().stripZone(),r=o.getEventEnd(n).stripZone(),s.push({event:n,start:i,end:r,eventStartMS:+i,eventDurationMS:r-i});return s},eventsToInverseRanges:function(t){var n,i,o=this.view,u=o.start.clone().stripZone(),l=o.end.clone().stripZone(),r=this.eventsToNormalRanges(t),s=[],a=t[0],e=u;for(r.sort(ge),n=0;r.length>n;n++)i=r[n],i.start>e&&s.push({event:a,start:e,end:i.start}),e=i.end;return l>e&&s.push({event:a,start:e,end:l}),s},eventRangeToSegs:function(t,e){var n,i,r;for(n=e?e(t):this.rangeToSegs(t),i=0;n.length>i;i++)r=n[i],r.event=t.event,r.eventStartMS=t.eventStartMS,r.eventDurationMS=t.eventDurationMS;return n}}),n.compareSegs=w,n.dataAttrPrefix='';var E=u.extend({numbersVisible:!1,bottomCoordPadding:0,breakOnWeeks:null,cellDates:null,dayToCellOffsets:null,rowEls:null,dayEls:null,helperEls:null,constructor:function(){u.apply(this,arguments),this.cellDuration=e.duration(1,'day')},renderDates:function(t){var n,e,i,o=this.view,r=this.rowCnt,l=this.colCnt,a=r*l,s='';for(n=0;r>n;n++)s+=this.dayRowHtml(n,t);for(this.el.html(s),this.rowEls=this.el.find('.fc-row'),this.dayEls=this.el.find('.fc-day'),e=0;a>e;e++)i=this.getCell(e),o.trigger('dayRender',null,i.start,this.dayEls.eq(e))},destroyDates:function(){this.destroySegPopover()},renderBusinessHours:function(){var t=this.view.calendar.getBusinessHoursEvents(!0),e=this.eventsToSegs(t);this.renderFill('businessHours',e,'bgevent')},dayRowHtml:function(t,e){var i=this.view,n=['fc-row','fc-week',i.widgetContentClass];return e&&n.push('fc-rigid'),'<div class="'+n.join(' ')+'"><div class="fc-bg"><table>'+this.rowHtml('day',t)+'</table></div><div class="fc-content-skeleton"><table>'+(this.numbersVisible?'<thead>'+this.rowHtml('number',t)+'</thead>':'')+'</table></div></div>'},dayCellHtml:function(t){return this.bgCellHtml(t)},computeColHeadFormat:function(){return this.rowCnt>1?'ddd':this.colCnt>1?this.view.opt('dayOfMonthFormat'):'dddd'},computeEventTimeFormat:function(){return this.view.opt('extraSmallTimeFormat')},computeDisplayEventEnd:function(){return 1==this.colCnt},updateCells:function(){var e,i,n,t;if(this.updateCellDates(),e=this.cellDates,this.breakOnWeeks){for(i=e[0].day(),t=1;e.length>t&&e[t].day()!=i;t++);n=Math.ceil(e.length/t)}
  else n=1,t=e.length;this.rowCnt=n,this.colCnt=t},updateCellDates:function(){for(var r=this.view,t=this.start.clone(),i=[],e=-1,n=[];t.isBefore(this.end);)r.isHiddenDay(t)?n.push(e+.5):(e++,n.push(e),i.push(t.clone())),t.add(1,'days');this.cellDates=i,this.dayToCellOffsets=n},computeCellDate:function(t){var e=this.colCnt,n=t.row*e+(this.isRTL?e-t.col-1:t.col);return this.cellDates[n].clone()},getRowEl:function(t){return this.rowEls.eq(t)},getColEl:function(t){return this.dayEls.eq(t)},getCellDayEl:function(t){return this.dayEls.eq(t.row*this.colCnt+t.col)},computeRowCoords:function(){var t=u.prototype.computeRowCoords.call(this);return t[t.length-1].bottom+=this.bottomCoordPadding,t},rangeToSegs:function(t){var l,a,r,s,u,c,d,e,n,i,f=this.isRTL,g=this.rowCnt,o=this.colCnt,h=[];for(t=this.view.computeDayRange(t),l=this.dateToCellOffset(t.start),a=this.dateToCellOffset(t.end.subtract(1,'days')),r=0;g>r;r++)s=r*o,u=s+o-1,e=Math.max(s,l),n=Math.min(u,a),e=Math.ceil(e),n=Math.floor(n),n>=e&&(c=e===l,d=n===a,e-=s,n-=s,i={row:r,isStart:c,isEnd:d},f?(i.leftCol=o-n-1,i.rightCol=o-e-1):(i.leftCol=e,i.rightCol=n),h.push(i));return h},dateToCellOffset:function(t){var e=this.dayToCellOffsets,n=t.diff(this.start,'days');return 0>n?e[0]-1:n>=e.length?e[e.length-1]+1:e[n]},renderDrag:function(t,e){return this.renderHighlight(this.view.calendar.ensureVisibleEventRange(t)),e&&!e.el.closest(this.el).length?(this.renderRangeHelper(t,e),this.applyDragOpacity(this.helperEls),!0):void 0},destroyDrag:function(){this.destroyHighlight(),this.destroyHelper()},renderEventResize:function(t,e){this.renderHighlight(t),this.renderRangeHelper(t,e)},destroyEventResize:function(){this.destroyHighlight(),this.destroyHelper()},renderHelper:function(e,n){var r,s=[],i=this.eventsToSegs([e]);i=this.renderFgSegEls(i),r=this.renderSegRows(i),this.rowEls.each(function(e,i){var l,a=t(i),o=t('<div class="fc-helper-skeleton"><table/></div>');l=n&&n.row===e?n.el.position().top:a.find('.fc-content-skeleton tbody').position().top,o.css('top',l).find('table').append(r[e].tbodyEl),a.append(o),s.push(o[0])}),this.helperEls=t(s)},destroyHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:'td',renderFill:function(e,n,i){var r,s,o,l=[];for(n=this.renderFillSegEls(e,n),r=0;n.length>r;r++)s=n[r],o=this.renderFillRow(e,s,i),this.rowEls.eq(s.row).append(o),l.push(o[0]);return this.elsByFill[e]=t(l),n},renderFillRow:function(e,n,i){var s,r,a=this.colCnt,o=n.leftCol,l=n.rightCol+1;return i=i||e.toLowerCase(),s=t('<div class="fc-'+i+'-skeleton"><table><tr/></table></div>'),r=s.find('tr'),o>0&&r.append('<td colspan="'+o+'"/>'),r.append(n.el.attr('colspan',l-o)),a>l&&r.append('<td colspan="'+(a-l)+'"/>'),this.bookendCells(r,e),s}});E.mixin({rowStructs:null,destroyEvents:function(){this.destroySegPopover(),u.prototype.destroyEvents.apply(this,arguments)},getEventSegs:function(){return u.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var n=t.grep(e,function(t){return t.event.allDay});return u.prototype.renderBgSegs.call(this,n)},renderFgSegs:function(e){var n;return e=this.renderFgSegEls(e),n=this.rowStructs=this.renderSegRows(e),this.rowEls.each(function(e,i){t(i).find('.fc-content-skeleton > table').append(n[e].tbodyEl)}),e},destroyFgSegs:function(){for(var t,e=this.rowStructs||[];t=e.pop();)t.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(t){var n,e,i=[];for(n=this.groupSegRows(t),e=0;n.length>e;e++)i.push(this.renderSegRow(e,n[e]));return i},fgSegHtml:function(t,e){var i,s,o=this.view,n=t.event,h=o.isEventDraggable(n),a=!e&&n.allDay&&t.isStart&&o.isEventResizableFromStart(n),u=!e&&n.allDay&&t.isEnd&&o.isEventResizableFromEnd(n),c=this.getSegClasses(t,h,a||u),d=H(this.getEventSkinCss(n)),l='';return c.unshift('fc-day-grid-event','fc-h-event'),t.isStart&&(i=this.getEventTimeText(n),i&&(l='<span class="fc-time">'+r(i)+'</span>')),s='<span class="fc-title">'+(r(n.title||'')||'&nbsp;')+'</span>','<a class="'+c.join(' ')+'"'+(n.url?' href="'+r(n.url)+'"':'')+(d?' style="'+d+'"':'')+'><div class="fc-content">'+(this.isRTL?s+' '+l:l+' '+s)+'</div>'+(a?'<div class="fc-resizer fc-start-resizer" />':'')+(u?'<div class="fc-resizer fc-end-resizer" />':'')+'</a>'},renderSegRow:function(e,n){function p(e){for(;e>r;)i=(d[s-1]||[])[r],i?i.attr('rowspan',parseInt(i.attr('rowspan')||1,10)+1):(i=t('<td/>'),l.append(i)),c[s][r]=i,d[s][r]=i,r++};var s,a,r,l,u,o,i,m=this.colCnt,h=this.buildSegLevels(n),v=Math.max(1,h.length),g=t('<tbody/>'),f=[],c=[],d=[];for(s=0;v>s;s++){if(a=h[s],r=0,l=t('<tr/>'),f.push([]),c.push([]),d.push([]),a)for(u=0;a.length>u;u++){for(o=a[u],p(o.leftCol),i=t('<td class="fc-event-container"/>').append(o.el),o.leftCol!=o.rightCol?i.attr('colspan',o.rightCol-o.leftCol+1):d[s][r]=i;o.rightCol>=r;)c[s][r]=i,f[s][r]=o,r++;l.append(i)};p(m),this.bookendCells(l,'eventSkeleton'),g.append(l)};return{row:e,tbodyEl:g,cellMatrix:c,segMatrix:f,segLevels:h,segs:n}},buildSegLevels:function(t){var i,r,e,n=[];for(t.sort(w),i=0;t.length>i;i++){for(r=t[i],e=0;n.length>e&&me(r,n[e]);e++);r.level=e,(n[e]||(n[e]=[])).push(r)};for(e=0;n.length>e;e++)n[e].sort(ve);return n},groupSegRows:function(t){var e,n=[];for(e=0;this.rowCnt>e;e++)n.push([]);for(e=0;t.length>e;e++)n[t[e].row].push(t[e]);return n}}),E.mixin({segPopover:null,popoverSegs:null,destroySegPopover:function(){this.segPopover&&this.segPopover.hide()},limitRows:function(t){var e,n,i=this.rowStructs||[];for(e=0;i.length>e;e++)this.unlimitRow(e),n=t?'number'==typeof t?t:this.computeRowLevelLimit(e):!1,n!==!1&&this.limitRow(e,n)},computeRowLevelLimit:function(e){function a(e,n){i=Math.max(i,t(n).outerHeight())};var n,r,i,o=this.rowEls.eq(e),l=o.height(),s=this.rowStructs[e].tbodyEl.children();for(n=0;s.length>n;n++)if(r=s.eq(n).removeClass('fc-limited'),i=0,r.find('> td > :first-child').each(a),r.position().top+i>l)return n;return!1},limitRow:function(e,n){function D(o){for(;o>s;)r=E.getCell(e,s),i=E.getCellSegs(r,n),i.length&&(l=m[n-1][s],g=E.renderMoreLink(r,i),c=t('<div/>').append(g),l.append(c),S.push(c[0])),s++};var r,p,m,v,d,o,i,y,h,l,b,w,u,f,c,g,E=this,a=this.rowStructs[e],S=[],s=0;if(n&&a.segLevels.length>n){for(p=a.segLevels[n-1],m=a.cellMatrix,v=a.tbodyEl.children().slice(n).addClass('fc-limited').get(),d=0;p.length>d;d++){for(o=p[d],D(o.leftCol),h=[],y=0;o.rightCol>=s;)r=this.getCell(e,s),i=this.getCellSegs(r,n),h.push(i),y+=i.length,s++;if(y){for(l=m[n-1][o.leftCol],b=l.attr('rowspan')||1,w=[],u=0;h.length>u;u++)f=t('<td class="fc-more-cell"/>').attr('rowspan',b),i=h[u],r=this.getCell(e,o.leftCol+u),g=this.renderMoreLink(r,[o].concat(i)),c=t('<div/>').append(g),f.append(c),w.push(f[0]),S.push(f[0]);l.addClass('fc-limited').after(t(w)),v.push(l[0])}};D(this.colCnt),a.moreEls=t(S),a.limitedEls=t(v)}},unlimitRow:function(t){var e=this.rowStructs[t];e.moreEls&&(e.moreEls.remove(),e.moreEls=null),e.limitedEls&&(e.limitedEls.removeClass('fc-limited'),e.limitedEls=null)},renderMoreLink:function(e,n){var i=this,r=this.view;return t('<a class="fc-more"/>').text(this.getMoreLinkText(n.length)).on('click',function(s){var o=r.opt('eventLimitClick'),l=e.start,a=t(this),c=i.getCellDayEl(e),d=i.getCellSegs(e),u=i.resliceDaySegs(d,l),h=i.resliceDaySegs(n,l);'function'==typeof o&&(o=r.trigger('eventLimitClick',null,{date:l,dayEl:c,moreEl:a,segs:u,hiddenSegs:h},s)),'popover'===o?i.showSegPopover(e,a,u):'string'==typeof o&&r.calendar.zoomTo(l,o)})},showSegPopover:function(t,e,n){var o,i,r=this,l=this.view,s=e.parent();o=1==this.rowCnt?l.el:this.rowEls.eq(t.row),i={className:'fc-more-popover',content:this.renderSegPopoverContent(t,n),parentEl:this.el,top:o.offset().top,autoHide:!0,viewportConstrain:l.opt('popoverViewportConstrain'),hide:function(){r.segPopover.destroy(),r.segPopover=null,r.popoverSegs=null}},this.isRTL?i.right=s.offset().left+s.outerWidth()+1:i.left=s.offset().left-1,this.segPopover=new At(i),this.segPopover.show()},renderSegPopoverContent:function(e,n){var i,s=this.view,l=s.opt('theme'),a=e.start.format(s.opt('dayPopoverFormat')),o=t('<div class="fc-header '+s.widgetHeaderClass+'"><span class="fc-close '+(l?'ui-icon ui-icon-closethick':'fc-icon fc-icon-x')+'"></span><span class="fc-title">'+r(a)+'</span><div class="fc-clear"/></div><div class="fc-body '+s.widgetContentClass+'"><div class="fc-event-container"></div></div>'),u=o.find('.fc-event-container');for(n=this.renderFgSegEls(n,!0),this.popoverSegs=n,i=0;n.length>i;i++)n[i].cell=e,u.append(n[i].el);return o},resliceDaySegs:function(e,n){var r=t.map(e,function(t){return t.event}),i=n.clone().stripTime(),s=i.clone().add(1,'days'),o={start:i,end:s};return e=this.eventsToSegs(r,function(t){var e=L(t,o);return e?[e]:[]}),e.sort(w),e},getMoreLinkText:function(t){var e=this.view.opt('eventLimitText');return'function'==typeof e?e(t):'+'+t+' '+e},getCellSegs:function(t,e){for(var n,r=this.rowStructs[t.row].segMatrix,i=e||0,s=[];r.length>i;)n=r[i][t.col],n&&s.push(n),i++;return s}});var q=u.extend({slotDuration:null,snapDuration:null,minTime:null,maxTime:null,axisFormat:null,dayEls:null,slatEls:null,slatTops:null,helperEl:null,businessHourSegs:null,constructor:function(){u.apply(this,arguments),this.processOptions()},renderDates:function(){this.el.html(this.renderHtml()),this.dayEls=this.el.find('.fc-day'),this.slatEls=this.el.find('.fc-slats tr')},renderBusinessHours:function(){var t=this.view.calendar.getBusinessHoursEvents();this.businessHourSegs=this.renderFill('businessHours',this.eventsToSegs(t),'bgevent')},renderHtml:function(){return'<div class="fc-bg"><table>'+this.rowHtml('slotBg')+'</table></div><div class="fc-slats"><table>'+this.slatRowHtml()+'</table></div>'},slotBgCellHtml:function(t){return this.bgCellHtml(t)},slatRowHtml:function(){for(var t,n,i,s=this.view,l=this.isRTL,a='',u=0===this.slotDuration.asMinutes()%15,o=e.duration(+this.minTime);this.maxTime>o;)t=this.start.clone().time(o),n=t.minutes(),i='<td class="fc-axis fc-time '+s.widgetContentClass+'" '+s.axisStyleAttr()+'>'+(u&&n?'':'<span>'+r(t.format(this.axisFormat))+'</span>')+'</td>',a+='<tr '+(n?'class="fc-minor"':'')+'>'+(l?'':i)+'<td class="'+s.widgetContentClass+'"/>'+(l?i:'')+'</tr>',o.add(this.slotDuration);return a},processOptions:function(){var t=this.view,i=t.opt('slotDuration'),n=t.opt('snapDuration');i=e.duration(i),n=n?e.duration(n):i,this.slotDuration=i,this.snapDuration=n,this.cellDuration=n,this.minTime=e.duration(t.opt('minTime')),this.maxTime=e.duration(t.opt('maxTime')),this.axisFormat=t.opt('axisFormat')||t.opt('smallTimeFormat')},computeColHeadFormat:function(){return this.colCnt>1?this.view.opt('dayOfMonthFormat'):'dddd'},computeEventTimeFormat:function(){return this.view.opt('noMeridiemTimeFormat')},computeDisplayEventEnd:function(){return!0},updateCells:function(){var t,n=this.view,e=[];for(t=this.start.clone();t.isBefore(this.end);)e.push({day:t.clone()}),t.add(1,'day'),t=n.skipHiddenDays(t);this.isRTL&&e.reverse(),this.colData=e,this.colCnt=e.length,this.rowCnt=Math.ceil((this.maxTime-this.minTime)/this.snapDuration)},computeCellDate:function(t){var e=this.computeSnapTime(t.row);return this.view.calendar.rezoneDate(t.day).time(e)},getColEl:function(t){return this.dayEls.eq(t)},computeSnapTime:function(t){return e.duration(this.minTime+this.snapDuration*t)},rangeToSegs:function(t){var n,e,i,r,o=this.colCnt,s=[];for(t={start:t.start.clone().stripZone(),end:t.end.clone().stripZone()},e=0;o>e;e++)i=this.colData[e].day,r={start:i.clone().time(this.minTime),end:i.clone().time(this.maxTime)},n=L(t,r),n&&(n.col=e,s.push(n));return s},updateSize:function(t){this.computeSlatTops(),t&&this.updateSegVerticals()},computeRowCoords:function(){var t,e,i=this.el.offset().top,n=[];for(t=0;this.rowCnt>t;t++)e={top:i+this.computeTimeTop(this.computeSnapTime(t))},t>0&&(n[t-1].bottom=e.top),n.push(e);return e.bottom=e.top+this.computeTimeTop(this.computeSnapTime(t)),n},computeDateTop:function(t,n){return this.computeTimeTop(e.duration(t.clone().stripZone()-n.clone().stripTime()))},computeTimeTop:function(t){var n,r,i,s,e=(t-this.minTime)/this.slotDuration;return e=Math.max(0,e),e=Math.min(this.slatEls.length,e),n=Math.floor(e),r=e-n,i=this.slatTops[n],r?(s=this.slatTops[n+1],i+(s-i)*r):i},computeSlatTops:function(){var e,n=[];this.slatEls.each(function(i,r){e=t(r).position().top,n.push(e)}),n.push(e+this.slatEls.last().outerHeight()),this.slatTops=n},renderDrag:function(t,e){return e?(this.renderRangeHelper(t,e),this.applyDragOpacity(this.helperEl),!0):(this.renderHighlight(this.view.calendar.ensureVisibleEventRange(t)),void 0)},destroyDrag:function(){this.destroyHelper(),this.destroyHighlight()},renderEventResize:function(t,e){this.renderRangeHelper(t,e)},destroyEventResize:function(){this.destroyHelper()},renderHelper:function(e,n){var l,s,o,i,r=this.eventsToSegs([e]);for(r=this.renderFgSegEls(r),l=this.renderSegTable(r),s=0;r.length>s;s++)o=r[s],n&&n.col===o.col&&(i=n.el,o.el.css({left:i.css('left'),right:i.css('right'),'margin-left':i.css('margin-left'),'margin-right':i.css('margin-right')}));this.helperEl=t('<div class="fc-helper-skeleton"/>').append(l).appendTo(this.el)},destroyHelper:function(){this.helperEl&&(this.helperEl.remove(),this.helperEl=null)},renderSelection:function(t){this.view.opt('selectHelper')?this.renderRangeHelper(t):this.renderHighlight(t)},destroySelection:function(){this.destroyHelper(),this.destroyHighlight()},renderFill:function(e,n,i){var u,s,c,r,o,h,f,d,l,a;if(n.length){for(n=this.renderFillSegEls(e,n),u=this.groupSegCols(n),i=i||e.toLowerCase(),s=t('<div class="fc-'+i+'-skeleton"><table><tr/></table></div>'),c=s.find('tr'),r=0;u.length>r;r++)if(o=u[r],h=t('<td/>').appendTo(c),o.length)for(f=t('<div class="fc-'+i+'-container"/>').appendTo(h),d=this.colData[r].day,l=0;o.length>l;l++)a=o[l],f.append(a.el.css({top:this.computeDateTop(a.start,d),bottom:-this.computeDateTop(a.end,d)}));this.bookendCells(c,e),this.el.append(s),this.elsByFill[e]=s};return n}});q.mixin({eventSkeletonEl:null,renderFgSegs:function(e){return e=this.renderFgSegEls(e),this.el.append(this.eventSkeletonEl=t('<div class="fc-content-skeleton"/>').append(this.renderSegTable(e))),e},destroyFgSegs:function(){this.eventSkeletonEl&&(this.eventSkeletonEl.remove(),this.eventSkeletonEl=null)},renderSegTable:function(e){var o,i,n,r,s,l,a=t('<table><tr/></table>'),u=a.find('tr');for(o=this.groupSegCols(e),this.computeSegVerticals(e),r=0;o.length>r;r++){for(s=o[r],ye(s),l=t('<div class="fc-event-container"/>'),i=0;s.length>i;i++)n=s[i],n.el.css(this.generateSegPositionCss(n)),30>n.bottom-n.top&&n.el.addClass('fc-short'),l.append(n.el);u.append(t('<td/>').append(l))};return this.bookendCells(u,'eventSkeleton'),a},updateSegVerticals:function(){var t,e=(this.segs||[]).concat(this.businessHourSegs||[]);for(this.computeSegVerticals(e),t=0;e.length>t;t++)e[t].el.css(this.generateSegVerticalCss(e[t]))},computeSegVerticals:function(t){var n,e;for(n=0;t.length>n;n++)e=t[n],e.top=this.computeDateTop(e.start,e.start),e.bottom=this.computeDateTop(e.end,e.start)},fgSegHtml:function(t,e){var i,o,l,s=this.view,n=t.event,d=s.isEventDraggable(n),h=!e&&t.isStart&&s.isEventResizableFromStart(n),a=!e&&t.isEnd&&s.isEventResizableFromEnd(n),u=this.getSegClasses(t,d,h||a),c=H(this.getEventSkinCss(n));return u.unshift('fc-time-grid-event','fc-v-event'),s.isMultiDayEvent(n)?(t.isStart||t.isEnd)&&(i=this.getEventTimeText(t),o=this.getEventTimeText(t,'LT'),l=this.getEventTimeText(t,null,!1)):(i=this.getEventTimeText(n),o=this.getEventTimeText(n,'LT'),l=this.getEventTimeText(n,null,!1)),'<a class="'+u.join(' ')+'"'+(n.url?' href="'+r(n.url)+'"':'')+(c?' style="'+c+'"':'')+'><div class="fc-content">'+(i?'<div class="fc-time" data-start="'+r(l)+'" data-full="'+r(o)+'"><span>'+r(i)+'</span></div>':'')+(n.title?'<div class="fc-title">'+r(n.title)+'</div>':'')+'</div><div class="fc-bg"/>'+(a?'<div class="fc-resizer fc-end-resizer" />':'')+'</a>'},generateSegPositionCss:function(t){var r,s,o=this.view.opt('slotEventOverlap'),n=t.backwardCoord,i=t.forwardCoord,e=this.generateSegVerticalCss(t);return o&&(i=Math.min(1,n+2*(i-n))),this.isRTL?(r=1-i,s=n):(r=n,s=1-i),e.zIndex=t.level+1,e.left=100*r+'%',e.right=100*s+'%',o&&t.forwardPressure&&(e[this.isRTL?'marginLeft':'marginRight']=20),e},generateSegVerticalCss:function(t){return{top:t.top,bottom:-t.bottom}},groupSegCols:function(t){var e,n=[];for(e=0;this.colCnt>e;e++)n.push([]);for(e=0;t.length>e;e++)n[t[e].col].push(t[e]);return n}});var p=n.View=a.extend({type:null,name:null,title:null,calendar:null,options:null,coordMap:null,el:null,isDisplayed:!1,isSkeletonRendered:!1,isEventsRendered:!1,start:null,end:null,intervalStart:null,intervalEnd:null,intervalDuration:null,intervalUnit:null,isSelected:!1,scrollerEl:null,scrollTop:null,widgetHeaderClass:null,widgetContentClass:null,highlightStateClass:null,nextDayThreshold:null,isHiddenDayHash:null,documentMousedownProxy:null,constructor:function(t,n,i,r){this.calendar=t,this.type=this.name=n,this.options=i,this.intervalDuration=r||e.duration(1,'day'),this.nextDayThreshold=e.duration(this.opt('nextDayThreshold')),this.initThemingProps(),this.initHiddenDays(),this.documentMousedownProxy=c(this,'documentMousedown'),this.initialize()},initialize:function(){},opt:function(t){return this.options[t]},trigger:function(t,e){var n=this.calendar;return n.trigger.apply(n,[t,e||this].concat(Array.prototype.slice.call(arguments,2),[this]))},setDate:function(t){this.setRange(this.computeRange(t))},setRange:function(e){t.extend(this,e),this.updateTitle()},computeRange:function(t){var i,r,s=P(this.intervalDuration),e=t.clone().startOf(s),n=e.clone().add(this.intervalDuration);return/year|month|week|day/.test(s)?(e.stripTime(),n.stripTime()):(e.hasTime()||(e=this.calendar.rezoneDate(e)),n.hasTime()||(n=this.calendar.rezoneDate(n))),i=e.clone(),i=this.skipHiddenDays(i),r=n.clone(),r=this.skipHiddenDays(r,-1,!0),{intervalUnit:s,intervalStart:e,intervalEnd:n,start:i,end:r}},computePrevDate:function(t){return this.massageCurrentDate(t.clone().startOf(this.intervalUnit).subtract(this.intervalDuration),-1)},computeNextDate:function(t){return this.massageCurrentDate(t.clone().startOf(this.intervalUnit).add(this.intervalDuration))},massageCurrentDate:function(t,e){return 1>=this.intervalDuration.as('days')&&this.isHiddenDay(t)&&(t=this.skipHiddenDays(t,e),t.startOf('day')),t},updateTitle:function(){this.title=this.computeTitle()},computeTitle:function(){return this.formatRange({start:this.intervalStart,end:this.intervalEnd},this.opt('titleFormat')||this.computeTitleFormat(),this.opt('titleRangeSeparator'))},computeTitleFormat:function(){return'year'==this.intervalUnit?'YYYY':'month'==this.intervalUnit?this.opt('monthYearFormat'):this.intervalDuration.as('days')>1?'ll':'LL'},formatRange:function(t,e,n){var i=t.end;return i.hasTime()||(i=i.clone().subtract(1)),wt(t.start,i,e,n,this.opt('isRTL'))},setElement:function(t){this.el=t,this.bindGlobalHandlers()},removeElement:function(){this.clear(),this.isSkeletonRendered&&(this.destroySkeleton(),this.isSkeletonRendered=!1),this.unbindGlobalHandlers(),this.el.remove()},display:function(t){var e=null;this.isDisplayed&&(e=this.queryScroll()),this.clear(),this.setDate(t),this.render(),this.updateSize(),this.renderBusinessHours(),this.isDisplayed=!0,e=this.computeInitialScroll(e),this.forceScroll(e),this.triggerRender()},clear:function(){this.isDisplayed&&(this.unselect(),this.clearEvents(),this.triggerDestroy(),this.destroyBusinessHours(),this.destroy(),this.isDisplayed=!1)},render:function(){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0),this.renderDates()},destroy:function(){this.destroyDates()},renderSkeleton:function(){},destroySkeleton:function(){},renderDates:function(){},destroyDates:function(){},renderBusinessHours:function(){},destroyBusinessHours:function(){},triggerRender:function(){this.trigger('viewRender',this,this,this.el)},triggerDestroy:function(){this.trigger('viewDestroy',this,this,this.el)},bindGlobalHandlers:function(){t(document).on('mousedown',this.documentMousedownProxy)},unbindGlobalHandlers:function(){t(document).off('mousedown',this.documentMousedownProxy)},initThemingProps:function(){var t=this.opt('theme')?'ui':'fc';this.widgetHeaderClass=t+'-widget-header',this.widgetContentClass=t+'-widget-content',this.highlightStateClass=t+'-state-highlight'},updateSize:function(t){var e;t&&(e=this.queryScroll()),this.updateHeight(),this.updateWidth(),t&&this.setScroll(e)},updateWidth:function(){},updateHeight:function(){var t=this.calendar;this.setHeight(t.getSuggestedViewHeight(),t.isHeightAuto())},setHeight:function(){},computeScrollerHeight:function(t){var e,n,i=this.scrollerEl;return e=this.el.add(i),e.css({position:'relative',left:-1}),n=this.el.outerHeight()-i.height(),e.css({position:'',left:''}),t-n},computeInitialScroll:function(){return 0},queryScroll:function(){return this.scrollerEl?this.scrollerEl.scrollTop():void 0},setScroll:function(t){return this.scrollerEl?this.scrollerEl.scrollTop(t):void 0},forceScroll:function(t){var e=this;this.setScroll(t),setTimeout(function(){e.setScroll(t)},0)},displayEvents:function(t){var e=this.queryScroll();this.clearEvents(),this.renderEvents(t),this.isEventsRendered=!0,this.setScroll(e),this.triggerEventRender()},clearEvents:function(){this.isEventsRendered&&(this.triggerEventDestroy(),this.destroyEvents(),this.isEventsRendered=!1)},renderEvents:function(){},destroyEvents:function(){},triggerEventRender:function(){this.renderedEventSegEach(function(t){this.trigger('eventAfterRender',t.event,t.event,t.el)}),this.trigger('eventAfterAllRender')},triggerEventDestroy:function(){this.renderedEventSegEach(function(t){this.trigger('eventDestroy',t.event,t.event,t.el)})},resolveEventEl:function(e,n){var i=this.trigger('eventRender',e,e,n);return i===!1?n=null:i&&i!==!0&&(n=t(i)),n},showEvent:function(t){this.renderedEventSegEach(function(t){t.el.css('visibility','')},t)},hideEvent:function(t){this.renderedEventSegEach(function(t){t.el.css('visibility','hidden')},t)},renderedEventSegEach:function(t,e){var n,i=this.getEventSegs();for(n=0;i.length>n;n++)e&&i[n].event._id!==e._id||i[n].el&&t.call(this,i[n])},getEventSegs:function(){return[]},isEventDraggable:function(t){var e=t.source||{};return l(t.startEditable,e.startEditable,this.opt('eventStartEditable'),t.editable,e.editable,this.opt('editable'))},reportEventDrop:function(t,e,n,i,r){var s=this.calendar,o=s.mutateEvent(t,e,n),l=function(){o.undo(),s.reportEventChange()};this.triggerEventDrop(t,o.dateDelta,l,i,r),s.reportEventChange()},triggerEventDrop:function(t,e,n,i,r){this.trigger('eventDrop',i[0],t,e,n,r,{})},reportExternalDrop:function(e,n,i,r,s){var o,l,a=e.eventProps;a&&(o=t.extend({},a,n),l=this.calendar.renderEvent(o,e.stick)[0]),this.triggerExternalDrop(l,n,i,r,s)},triggerExternalDrop:function(t,e,n,i,r){this.trigger('drop',n[0],e.start,i,r),t&&this.trigger('eventReceive',null,t)},renderDrag:function(){},destroyDrag:function(){},isEventResizableFromStart:function(t){return this.opt('eventResizableFromStart')&&this.isEventResizable(t)},isEventResizableFromEnd:function(t){return this.isEventResizable(t)},isEventResizable:function(t){var e=t.source||{};return l(t.durationEditable,e.durationEditable,this.opt('eventDurationEditable'),t.editable,e.editable,this.opt('editable'))},reportEventResize:function(t,e,n,i,r){var s=this.calendar,o=s.mutateEvent(t,e,n),l=function(){o.undo(),s.reportEventChange()};this.triggerEventResize(t,o.durationDelta,l,i,r),s.reportEventChange()},triggerEventResize:function(t,e,n,i,r){this.trigger('eventResize',i[0],t,e,n,r,{})},select:function(t,e){this.unselect(e),this.renderSelection(t),this.reportSelection(t,e)},renderSelection:function(){},reportSelection:function(t,e){this.isSelected=!0,this.trigger('select',null,t.start,t.end,e)},unselect:function(t){this.isSelected&&(this.isSelected=!1,this.destroySelection(),this.trigger('unselect',null,t))},destroySelection:function(){},documentMousedown:function(e){var n;this.isSelected&&this.opt('unselectAuto')&&ct(e)&&(n=this.opt('unselectCancel'),n&&t(e.target).closest(n).length||this.unselect(e))},initHiddenDays:function(){var e,n=this.opt('hiddenDays')||[],i=[],r=0;for(this.opt('weekends')===!1&&n.push(0,6),e=0;7>e;e++)(i[e]=-1!==t.inArray(e,n))||r++;if(!r)throw'invalid hiddenDays';this.isHiddenDayHash=i},isHiddenDay:function(t){return e.isMoment(t)&&(t=t.day()),this.isHiddenDayHash[t]},skipHiddenDays:function(t,e,n){var i=t.clone();for(e=e||1;this.isHiddenDayHash[(i.day()+(n?e:0)+7)%7];)i.add(e,'days');return i},computeDayRange:function(t){var i,r=t.start.clone().stripTime(),n=t.end,e=null;return n&&(e=n.clone().stripTime(),i=+n.time(),i&&i>=this.nextDayThreshold&&e.add(1,'days')),(!n||r>=e)&&(e=r.clone().add(1,'days')),{start:r,end:e}},isMultiDayEvent:function(t){var e=this.computeDayRange(t);return e.end.diff(e.start,'days')>1}}),o=n.Calendar=n.CalendarBase=a.extend({dirDefaults:null,langDefaults:null,overrides:null,options:null,viewSpecCache:null,view:null,header:null,constructor:De,initOptions:function(t){var n,e,r,i;t=jt(t),n=t.lang,e=g[n],e||(n=o.defaults.lang,e=g[n]||{}),r=l(t.isRTL,e.isRTL,o.defaults.isRTL),i=r?o.rtlDefaults:{},this.dirDefaults=i,this.langDefaults=e,this.overrides=t,this.options=y(o.defaults,i,e,t),xt(this.options),this.viewSpecCache={}},getViewSpec:function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},getUnitViewSpec:function(e){var i,r,s;if(-1!=t.inArray(e,M))for(i=this.header.getViewsWithButtons(),t.each(n.views,function(t){i.push(t)}),r=0;i.length>r;r++)if(s=this.getViewSpec(i[r]),s&&s.singleUnit==e)return s},buildViewSpec:function(t){for(var s,r,o,n,l,i,d=this.overrides.views||{},u=[],c=[],a=t;a&&!s;)r=h[a]||{},o=d[a]||{},n=n||o.duration||r.duration,a=o.type||r.type,'function'==typeof r?(s=r,u.unshift(s.defaults||{})):u.unshift(r),c.unshift(o);return s?(i={'class':s,type:t},n&&(n=e.duration(n),n.valueOf()||(n=null)),n&&(i.duration=n,l=P(n),1===n.as(l)&&(i.singleUnit=l,c.unshift(d[l]||{}))),i.defaults=y.apply(null,u),i.overrides=y.apply(null,c),this.buildViewSpecOptions(i),this.buildViewSpecButtonText(i,t),i):void 0},buildViewSpecOptions:function(t){t.options=y(o.defaults,t.defaults,this.dirDefaults,this.langDefaults,this.overrides,t.overrides),xt(t.options)},buildViewSpecButtonText:function(t,e){function n(n){var i=n.buttonText||{};return i[e]||(t.singleUnit?i[t.singleUnit]:null)};t.buttonTextOverride=n(this.overrides)||t.overrides.buttonText,t.buttonTextDefault=n(this.langDefaults)||n(this.dirDefaults)||t.defaults.buttonText||n(o.defaults)||(t.duration?this.humanizeDuration(t.duration):null)||e},instantiateView:function(t){var e=this.getViewSpec(t);return new e['class'](this,t,e.options,e.duration)},isValidViewType:function(t){return Boolean(this.getViewSpec(t))}});o.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',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:'*',eventLimit:!1,eventLimitText:'more',eventLimitClick:'popover',dayPopoverFormat:'LL',handleWindowResize:!0,windowResizeDelay:200},o.englishDefaults={dayPopoverFormat:'dddd, MMMM D'},o.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'}};var g=n.langs={};n.datepickerLang=function(e,n,i){var r=g[e]||(g[e]={});r.isRTL=i.isRTL,r.weekNumberTitle=i.weekHeader,t.each(Lt,function(t,e){r[t]=e(i)}),t.datepicker&&(t.datepicker.regional[n]=t.datepicker.regional[e]=i,t.datepicker.regional.en=t.datepicker.regional[''],t.datepicker.setDefaults(i))},n.lang=function(e,n){var i,r;i=g[e]||(g[e]={}),n&&(i=g[e]=y(i,n)),r=Rt(e),t.each(Pt,function(t,e){null==i[t]&&(i[t]=e(r,i))}),o.defaults.lang=e};var Lt={buttonText:function(t){return{prev:O(t.prevText),next:O(t.nextText),today:O(t.currentText)}},monthYearFormat:function(t){return t.showMonthAfterYear?'YYYY['+t.yearSuffix+'] MMMM':'MMMM YYYY['+t.yearSuffix+']'}},Pt={dayOfMonthFormat:function(t,e){var n=t.longDateFormat('l');return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,''),e.isRTL?n+=' ddd':n='ddd '+n,n},mediumTimeFormat:function(t){return t.longDateFormat('LT').replace(/\s*a$/i,'a')},smallTimeFormat:function(t){return t.longDateFormat('LT').replace(':mm','(:mm)').replace(/(\Wmm)$/,'($1)').replace(/\s*a$/i,'a')},extraSmallTimeFormat:function(t){return t.longDateFormat('LT').replace(':mm','(:mm)').replace(/(\Wmm)$/,'($1)').replace(/\s*a$/i,'t')},hourFormat:function(t){return t.longDateFormat('LT').replace(':mm','').replace(/(\Wmm)$/,'').replace(/\s*a$/i,'a')},noMeridiemTimeFormat:function(t){return t.longDateFormat('LT').replace(/\s*a$/i,'')}},Vt={smallDayDateFormat:function(t){return t.isRTL?'D dd':'dd D'},weekFormat:function(t){return t.isRTL?'w[ '+t.weekNumberTitle+']':'['+t.weekNumberTitle+' ]w'},smallWeekFormat:function(t){return t.isRTL?'w['+t.weekNumberTitle+']':'['+t.weekNumberTitle+']w'}};n.lang('en',o.englishDefaults),n.sourceNormalizers=[],n.sourceFetchers=[];var zt={dataType:'json',cache:!1},Gt=1;o.prototype.getPeerEvents=function(t){var e,n,i=this.getEventCache(),r=[];for(e=0;i.length>e;e++)n=i[e],t&&t._id===n._id||r.push(n);return r};var j=h.basic=p.extend({dayGrid:null,dayNumbersVisible:!1,weekNumbersVisible:!1,weekNumberWidth:null,headRowEl:null,initialize:function(){this.dayGrid=new E(this),this.coordMap=this.dayGrid.coordMap},setRange:function(t){p.prototype.setRange.call(this,t),this.dayGrid.breakOnWeeks=/year|month|week/.test(this.intervalUnit),this.dayGrid.setRange(t)},computeRange:function(t){var e=p.prototype.computeRange.call(this,t);return/year|month/.test(e.intervalUnit)&&(e.start.startOf('week'),e.start=this.skipHiddenDays(e.start),e.end.weekday()&&(e.end.add(1,'week').startOf('week'),e.end=this.skipHiddenDays(e.end,-1,!0))),e},render: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.renderHtml()),this.headRowEl=this.el.find('thead .fc-row'),this.scrollerEl=this.el.find('.fc-day-grid-container'),this.dayGrid.coordMap.containerEl=this.scrollerEl,this.dayGrid.setElement(this.el.find('.fc-day-grid')),this.dayGrid.renderDates(this.hasRigidRows())},destroy:function(){this.dayGrid.destroyDates(),this.dayGrid.removeElement()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},renderHtml:function(){return'<table><thead class="fc-head"><tr><td class="'+this.widgetHeaderClass+'">'+this.dayGrid.headHtml()+'</td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'"><div class="fc-day-grid-container"><div class="fc-day-grid"/></div></td></tr></tbody></table>'},headIntroHtml:function(){return this.weekNumbersVisible?'<th class="fc-week-number '+this.widgetHeaderClass+'" '+this.weekNumberStyleAttr()+'><span>'+r(this.opt('weekNumberTitle'))+'</span></th>':void 0},numberIntroHtml:function(t){return this.weekNumbersVisible?'<td class="fc-week-number" '+this.weekNumberStyleAttr()+'><span>'+this.dayGrid.getCell(t,0).start.format('w')+'</span></td>':void 0},dayIntroHtml:function(){return this.weekNumbersVisible?'<td class="fc-week-number '+this.widgetContentClass+'" '+this.weekNumberStyleAttr()+'></td>':void 0},introHtml:function(){return this.weekNumbersVisible?'<td class="fc-week-number" '+this.weekNumberStyleAttr()+'></td>':void 0},numberCellHtml:function(t){var e,n=t.start;return this.dayNumbersVisible?(e=this.dayGrid.getDayClasses(n),e.unshift('fc-day-number'),'<td class="'+e.join(' ')+'" data-date="'+n.format()+'">'+n.date()+'</td>'):'<td/>'},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':''},hasRigidRows:function(){var t=this.opt('eventLimit');return t&&'number'!=typeof t},updateWidth:function(){this.weekNumbersVisible&&(this.weekNumberWidth=st(this.el.find('.fc-week-number')))},setHeight:function(t,e){var i,n=this.opt('eventLimit');G(this.scrollerEl),nt(this.headRowEl),this.dayGrid.destroySegPopover(),n&&'number'==typeof n&&this.dayGrid.limitRows(n),i=this.computeScrollerHeight(t),this.setGridHeight(i,e),n&&'number'!=typeof n&&this.dayGrid.limitRows(n),!e&&ot(this.scrollerEl,i)&&(et(this.headRowEl,D(this.scrollerEl)),i=this.computeScrollerHeight(t),this.scrollerEl.height(i))},setGridHeight:function(t,e){e?rt(this.dayGrid.rowEls):it(this.dayGrid.rowEls,t,!0)},renderEvents:function(t){this.dayGrid.renderEvents(t),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},destroyEvents:function(){this.dayGrid.destroyEvents()},renderDrag:function(t,e){return this.dayGrid.renderDrag(t,e)},destroyDrag:function(){this.dayGrid.destroyDrag()},renderSelection:function(t){this.dayGrid.renderSelection(t)},destroySelection:function(){this.dayGrid.destroySelection()}}),U=h.month=j.extend({computeRange:function(t){var n,e=j.prototype.computeRange.call(this,t);return this.isFixedWeeks()&&(n=Math.ceil(e.end.diff(e.start,'weeks',!0)),e.end.add(6-n,'weeks')),e},setGridHeight:function(t,e){e=e||'variable'===this.opt('weekMode'),e&&(t*=this.rowCnt/6),it(this.dayGrid.rowEls,t,!e)},isFixedWeeks:function(){var t=this.opt('weekMode');return t?'fixed'===t:this.opt('fixedWeekCount')}});U.duration={months:1},U.defaults={fixedWeekCount:!0},h.basicWeek={type:'basic',duration:{weeks:1}},h.basicDay={type:'basic',duration:{days:1}};var kt={allDaySlot:!0,allDayText:'all-day',scrollTime:'06:00:00',slotDuration:'00:30:00',minTime:'00:00:00',maxTime:'24:00:00',slotEventOverlap:!0},Mt=5,Ft=h.agenda=p.extend({timeGrid:null,dayGrid:null,axisWidth:null,noScrollRowEls:null,bottomRuleEl:null,bottomRuleHeight:null,initialize:function(){this.timeGrid=new q(this),this.opt('allDaySlot')?(this.dayGrid=new E(this),this.coordMap=new Nt([this.dayGrid.coordMap,this.timeGrid.coordMap])):this.coordMap=this.timeGrid.coordMap},setRange:function(t){p.prototype.setRange.call(this,t),this.timeGrid.setRange(t),this.dayGrid&&this.dayGrid.setRange(t)},render:function(){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.setElement(this.el.find('.fc-time-grid')),this.timeGrid.renderDates(),this.bottomRuleEl=t('<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 *)')},destroy:function(){this.timeGrid.destroyDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.destroyDates(),this.dayGrid.removeElement())},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},renderHtml:function(){return'<table><thead class="fc-head"><tr><td class="'+this.widgetHeaderClass+'">'+this.timeGrid.headHtml()+'</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+'"/>':'')+'<div class="fc-time-grid-container"><div class="fc-time-grid"/></div></td></tr></tbody></table>'},headIntroHtml:function(){var t,e;return this.opt('weekNumbers')?(t=this.timeGrid.getCell(0).start,e=t.format(this.opt('smallWeekFormat')),'<th class="fc-axis fc-week-number '+this.widgetHeaderClass+'" '+this.axisStyleAttr()+'><span>'+r(e)+'</span></th>'):'<th class="fc-axis '+this.widgetHeaderClass+'" '+this.axisStyleAttr()+'></th>'},dayIntroHtml:function(){return'<td class="fc-axis '+this.widgetContentClass+'" '+this.axisStyleAttr()+'><span>'+(this.opt('allDayHtml')||r(this.opt('allDayText')))+'</span></td>'},slotBgIntroHtml:function(){return'<td class="fc-axis '+this.widgetContentClass+'" '+this.axisStyleAttr()+'></td>'},introHtml:function(){return'<td class="fc-axis" '+this.axisStyleAttr()+'></td>'},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':''},updateSize:function(t){this.timeGrid.updateSize(t),p.prototype.updateSize.call(this,t)},updateWidth:function(){this.axisWidth=st(this.el.find('.fc-axis'))},setHeight:function(t,e){var n,i;null===this.bottomRuleHeight&&(this.bottomRuleHeight=this.bottomRuleEl.outerHeight()),this.bottomRuleEl.hide(),this.scrollerEl.css('overflow',''),G(this.scrollerEl),nt(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.destroySegPopover(),n=this.opt('eventLimit'),n&&'number'!=typeof n&&(n=Mt),n&&this.dayGrid.limitRows(n)),e||(i=this.computeScrollerHeight(t),ot(this.scrollerEl,i)?(et(this.noScrollRowEls,D(this.scrollerEl)),i=this.computeScrollerHeight(t),this.scrollerEl.height(i)):(this.scrollerEl.height(i).css('overflow','hidden'),this.bottomRuleEl.show()))},computeInitialScroll:function(){var n=e.duration(this.opt('scrollTime')),t=this.timeGrid.computeTimeTop(n);return t=Math.ceil(t),t&&t++,t},renderEvents:function(t){var r,e,n=[],i=[],s=[];for(e=0;t.length>e;e++)t[e].allDay?n.push(t[e]):i.push(t[e]);r=this.timeGrid.renderEvents(i),this.dayGrid&&(s=this.dayGrid.renderEvents(n)),this.updateHeight()},getEventSegs:function(){return this.timeGrid.getEventSegs().concat(this.dayGrid?this.dayGrid.getEventSegs():[])},destroyEvents:function(){this.timeGrid.destroyEvents(),this.dayGrid&&this.dayGrid.destroyEvents()},renderDrag:function(t,e){return t.start.hasTime()?this.timeGrid.renderDrag(t,e):this.dayGrid?this.dayGrid.renderDrag(t,e):void 0},destroyDrag:function(){this.timeGrid.destroyDrag(),this.dayGrid&&this.dayGrid.destroyDrag()},renderSelection:function(t){t.start.hasTime()||t.end.hasTime()?this.timeGrid.renderSelection(t):this.dayGrid&&this.dayGrid.renderSelection(t)},destroySelection:function(){this.timeGrid.destroySelection(),this.dayGrid&&this.dayGrid.destroySelection()}});return Ft.defaults=kt,h.agendaWeek={type:'agenda',duration:{weeks:1}},h.agendaDay={type:'agenda',duration:{days:1}},n});