]> git.mxchange.org Git - friendica.git/commitdiff
update to fullCalendar 3.0.1, frio: cal list view, frio: cal month hover
authorrabuzarus <>
Sun, 16 Oct 2016 14:04:53 +0000 (16:04 +0200)
committerrabuzarus <>
Sun, 16 Oct 2016 14:04:53 +0000 (16:04 +0200)
38 files changed:
include/event.php
library/fullcalendar/CHANGELOG.txt [new file with mode: 0644]
library/fullcalendar/CONTRIBUTING.txt [new file with mode: 0644]
library/fullcalendar/LICENSE.txt [new file with mode: 0644]
library/fullcalendar/changelog.txt [deleted file]
library/fullcalendar/fullcalendar.css
library/fullcalendar/fullcalendar.js
library/fullcalendar/fullcalendar.min.css [new file with mode: 0644]
library/fullcalendar/fullcalendar.min.js
library/fullcalendar/fullcalendar.print.css
library/fullcalendar/gcal.js
library/fullcalendar/license.txt [deleted file]
library/fullcalendar/locale-all.js [new file with mode: 0644]
library/moment/CHANGELOG.md [new file with mode: 0644]
library/moment/LICENSE [new file with mode: 0644]
library/moment/README.md [new file with mode: 0644]
library/moment/locales.min.js [new file with mode: 0644]
library/moment/moment.js [new file with mode: 0644]
library/moment/moment.min.js [new file with mode: 0644]
mod/cal.php
mod/events.php
view/templates/event_head.tpl
view/templates/events-js.tpl [deleted file]
view/templates/events_js.tpl [new file with mode: 0644]
view/theme/frio/css/mod_events.css [new file with mode: 0644]
view/theme/frio/css/style.css
view/theme/frio/js/event.js [deleted file]
view/theme/frio/js/event_edit.js [new file with mode: 0644]
view/theme/frio/js/mod_events.js [new file with mode: 0644]
view/theme/frio/templates/event.tpl
view/theme/frio/templates/event_form.tpl
view/theme/frio/templates/event_head.tpl
view/theme/frio/templates/events-js.tpl [deleted file]
view/theme/frio/templates/events_js.tpl [new file with mode: 0644]
view/theme/frost-mobile/js/theme.js
view/theme/frost-mobile/templates/event_end.tpl
view/theme/frost/js/theme.js
view/theme/frost/templates/event_end.tpl

index a68e1c4626d37cf523711387fbd9539511317135..7c305767e449e4f76cbcb6a80fcb8f7ebc68ca20 100644 (file)
@@ -480,6 +480,13 @@ function get_event_strings() {
                        "month" => t("month"),
                        "week" => t("week"),
                        "day" => t("day"),
+                       "allday" => t("all-day"),
+
+                       "noevent" => t("No events to display"),
+
+                       "dtstart_label" => t("Starts:"),
+                       "dtend_label" => t("Finishes:"),
+                       "location_label" => t("Location:")
                );
 
        return $i18n;
diff --git a/library/fullcalendar/CHANGELOG.txt b/library/fullcalendar/CHANGELOG.txt
new file mode 100644 (file)
index 0000000..e91ce3b
--- /dev/null
@@ -0,0 +1,1063 @@
+
+v3.0.1 (2016-09-26)
+-------------------
+
+Bugfixes:
+- list view rendering event times incorrectly (#3334)
+- list view rendering events/days out of order (#3347)
+- events with no title rendering as "undefined"
+- add .fc scope to table print styles (#3343)
+- "display no events" text fix for German (#3354)
+
+
+v3.0.0 (2016-09-04)
+-------------------
+
+Features:
+- List View (#560)
+       - new views: `listDay`, `listWeek`, `listMonth`, `listYear`, and simply `list`
+       - `listDayFormat`
+       - `listDayAltFormat`
+       - `noEventsMessage`
+- Clickable day/week numbers for easier navigation (#424)
+       - `navLinks`
+       - `navLinkDayClick`
+       - `navLinkWeekClick`
+- Programmatically allow/disallow user interactions:
+       - `eventAllow` (#2740)
+       - `selectAllow` (#2511)
+- Option to display week numbers in cells (#3024)
+       - `weekNumbersWithinDays` (set to `true` to activate)
+- When week calc is ISO, default first day-of-week to Monday (#3255)
+- Macedonian locale (#2739)
+- Malay locale
+
+Breaking Changes:
+- IE8 support dropped
+- jQuery: minimum support raised to v2.0.0
+- MomentJS: minimum support raised to v2.9.0
+- `lang` option renamed to `locale`
+- dist files have been renamed to be more consistent with MomentJS:
+       - `lang/` -> `locale/`
+       - `lang-all.js` -> `locale-all.js`
+- behavior of moment methods no longer affected by ambiguousness:
+       - `isSame`
+       - `isBefore`
+       - `isAfter`
+- View-Option-Hashes no longer supported (deprecated in 2.2.4)
+- removed `weekMode` setting
+- removed `axisFormat` setting
+- DOM structure of month/basic-view day cell numbers changed
+
+Bugfixes:
+- `$.fullCalendar.version` incorrect (#3292)
+
+Build System:
+- using gulp instead of grunt (faster)
+- using npm internally for dependencies instead of bower
+- changed repo directory structure
+
+
+v2.9.1 (2016-07-31)
+-------------------
+
+- multiple definitions for businessHours (#2686)
+- businessHours for single day doesn't display weekends (#2944)
+- height/contentHeight can accept a function or 'parent' for dynamic value (#3271)
+- fix +more popover clipped by overflow (#3232)
+- fix +more popover positioned incorrectly when scrolled (#3137)
+- Norwegian Nynorsk translation (#3246)
+- fix isAnimating JS error (#3285)
+
+
+v2.9.0 (2016-07-10)
+-------------------
+
+- Setters for (almost) all options (#564).
+  See [docs](http://fullcalendar.io/docs/utilities/dynamic_options/) for more info.
+- Travis CI improvements (#3266)
+
+
+v2.8.0 (2016-06-19)
+-------------------
+
+- getEventSources method (#3103, #2433)
+- getEventSourceById method (#3223)
+- refetchEventSources method (#3103, #1328, #254)
+- removeEventSources method (#3165, #948)
+- prevent flicker when refetchEvents is called (#3123, #2558)
+- fix for removing event sources that share same URL (#3209)
+- jQuery 3 support (#3197, #3124)
+- Travis CI integration (#3218)
+- EditorConfig for promoting consistent code style (#141)
+- use en dash when formatting ranges (#3077)
+- height:auto always shows scrollbars in month view on FF (#3202)
+- new languages:
+       - Basque (#2992)
+       - Galician (#194)
+       - Luxembourgish (#2979)
+
+
+v2.7.3 (2016-06-02)
+-------------------
+
+internal enhancements that plugins can benefit from:
+- EventEmitter not correctly working with stopListeningTo
+- normalizeEvent hook for manipulating event data
+
+
+v2.7.2 (2016-05-20)
+-------------------
+
+- fixed desktops/laptops with touch support not accepting mouse events for
+  dayClick/dragging/resizing (#3154, #3149)
+- fixed dayClick incorrectly triggered on touch scroll (#3152)
+- fixed touch event dragging wrongfully beginning upon scrolling document (#3160)
+- fixed minified JS still contained comments
+- UI change: mouse users must hover over an event to reveal its resizers
+
+
+v2.7.1 (2016-05-01)
+-------------------
+
+- dayClick not firing on touch devices (#3138)
+- icons for prev/next not working in MS Edge (#2852)
+- fix bad languages troubles with firewalls (#3133, #3132)
+- update all dev dependencies (#3145, #3010, #2901, #251)
+- git-ignore npm debug logs (#3011)
+- misc automated test updates (#3139, #3147)
+- Google Calendar htmlLink not always defined (#2844)
+
+
+v2.7.0 (2016-04-23)
+-------------------
+
+touch device support (#994):
+       - smoother scrolling
+       - interactions initiated via "long press":
+               - event drag-n-drop
+               - event resize
+               - time-range selecting
+       - `longPressDelay`
+
+
+v2.6.1 (2016-02-17)
+-------------------
+
+- make `nowIndicator` positioning refresh on window resize
+
+
+v2.6.0 (2016-01-07)
+-------------------
+
+- current time indicator (#414)
+- bundled with most recent version of moment (2.11.0)
+- UMD wrapper around lang files now handles commonjs (#2918)
+- fix bug where external event dragging would not respect eventOverlap
+- fix bug where external event dropping would not render the whole-day highlight
+
+
+v2.5.0 (2015-11-30)
+-------------------
+
+- internal timezone refactor. fixes #2396, #2900, #2945, #2711
+- internal "grid" system refactor. improved API for plugins.
+
+
+v2.4.0 (2015-08-16)
+-------------------
+
+- add new buttons to the header via `customButtons` ([225])
+- control stacking order of events via `eventOrder` ([364])
+- control frequency of slot text via `slotLabelInterval` ([946])
+- `displayEventTime` ([1904])
+- `on` and `off` methods ([1910])
+- renamed `axisFormat` to `slotLabelFormat`
+
+[225]: https://code.google.com/p/fullcalendar/issues/detail?id=225
+[364]: https://code.google.com/p/fullcalendar/issues/detail?id=364
+[946]: https://code.google.com/p/fullcalendar/issues/detail?id=946
+[1904]: https://code.google.com/p/fullcalendar/issues/detail?id=1904
+[1910]: https://code.google.com/p/fullcalendar/issues/detail?id=1910
+
+
+v2.3.2 (2015-06-14)
+-------------------
+
+- minor code adjustment in preparation for plugins
+
+
+v2.3.1 (2015-03-08)
+-------------------
+
+- Fix week view column title for en-gb ([PR220])
+- Publish to NPM ([2447])
+- Detangle bower from npm package ([PR179])
+
+[PR220]: https://github.com/arshaw/fullcalendar/pull/220
+[2447]: https://code.google.com/p/fullcalendar/issues/detail?id=2447
+[PR179]: https://github.com/arshaw/fullcalendar/pull/179
+
+
+v2.3.0 (2015-02-21)
+-------------------
+
+- internal refactoring in preparation for other views
+- businessHours now renders on whole-days in addition to timed areas
+- events in "more" popover not sorted by time ([2385])
+- avoid using moment's deprecated zone method ([2443])
+- destroying the calendar sometimes causes all window resize handlers to be unbound ([2432])
+- multiple calendars on one page, can't accept external elements after navigating ([2433])
+- accept external events from jqui sortable ([1698])
+- external jqui drop processed before reverting ([1661])
+- IE8 fix: month view renders incorrectly ([2428])
+- IE8 fix: eventLimit:true wouldn't activate "more" link ([2330])
+- IE8 fix: dragging an event with an href
+- IE8 fix: invisible element while dragging agenda view events
+- IE8 fix: erratic external element dragging
+
+[2385]: https://code.google.com/p/fullcalendar/issues/detail?id=2385
+[2443]: https://code.google.com/p/fullcalendar/issues/detail?id=2443
+[2432]: https://code.google.com/p/fullcalendar/issues/detail?id=2432
+[2433]: https://code.google.com/p/fullcalendar/issues/detail?id=2433
+[1698]: https://code.google.com/p/fullcalendar/issues/detail?id=1698
+[1661]: https://code.google.com/p/fullcalendar/issues/detail?id=1661
+[2428]: https://code.google.com/p/fullcalendar/issues/detail?id=2428
+[2330]: https://code.google.com/p/fullcalendar/issues/detail?id=2330
+
+
+v2.2.7 (2015-02-10)
+-------------------
+
+- view.title wasn't defined in viewRender callback ([2407])
+- FullCalendar versions >= 2.2.5 brokenness with Moment versions <= 2.8.3 ([2417])
+- Support Bokmal Norwegian language specifically ([2427])
+
+[2407]: https://code.google.com/p/fullcalendar/issues/detail?id=2407
+[2417]: https://code.google.com/p/fullcalendar/issues/detail?id=2417
+[2427]: https://code.google.com/p/fullcalendar/issues/detail?id=2427
+
+
+v2.2.6 (2015-01-11)
+-------------------
+
+- Compatibility with Moment v2.9. Was breaking GCal plugin ([2408])
+- View object's `title` property mistakenly omitted ([2407])
+- Single-day views with hiddens days could cause prev/next misbehavior ([2406])
+- Don't let the current date ever be a hidden day (solves [2395])
+- Hebrew locale ([2157])
+
+[2408]: https://code.google.com/p/fullcalendar/issues/detail?id=2408
+[2407]: https://code.google.com/p/fullcalendar/issues/detail?id=2407
+[2406]: https://code.google.com/p/fullcalendar/issues/detail?id=2406
+[2395]: https://code.google.com/p/fullcalendar/issues/detail?id=2395
+[2157]: https://code.google.com/p/fullcalendar/issues/detail?id=2157
+
+
+v2.2.5 (2014-12-30)
+-------------------
+
+- `buttonText` specified for custom views via the `views` option
+       - bugfix: wrong default value, couldn't override default
+       - feature: default value taken from locale
+
+
+v2.2.4 (2014-12-29)
+-------------------
+
+- Arbitrary durations for basic/agenda views with the `views` option ([692])
+- Specify view-specific options using the `views` option. fixes [2283]
+- Deprecate view-option-hashes
+- Formalize and expose View API ([1055])
+- updateEvent method, more intuitive behavior. fixes [2194]
+
+[692]: https://code.google.com/p/fullcalendar/issues/detail?id=692
+[2283]: https://code.google.com/p/fullcalendar/issues/detail?id=2283
+[1055]: https://code.google.com/p/fullcalendar/issues/detail?id=1055
+[2194]: https://code.google.com/p/fullcalendar/issues/detail?id=2194
+
+
+v2.2.3 (2014-11-26)
+-------------------
+
+- removeEventSource with Google Calendar object source, would not remove ([2368])
+- Events with invalid end dates are still accepted and rendered ([2350], [2237], [2296])
+- Bug when rendering business hours and navigating away from original view ([2365])
+- Links to Google Calendar events will use current timezone ([2122])
+- Google Calendar plugin works with timezone names that have spaces
+- Google Calendar plugin accepts person email addresses as calendar IDs
+- Internally use numeric sort instead of alphanumeric sort ([2370])
+
+[2368]: https://code.google.com/p/fullcalendar/issues/detail?id=2368
+[2350]: https://code.google.com/p/fullcalendar/issues/detail?id=2350
+[2237]: https://code.google.com/p/fullcalendar/issues/detail?id=2237
+[2296]: https://code.google.com/p/fullcalendar/issues/detail?id=2296
+[2365]: https://code.google.com/p/fullcalendar/issues/detail?id=2365
+[2122]: https://code.google.com/p/fullcalendar/issues/detail?id=2122
+[2370]: https://code.google.com/p/fullcalendar/issues/detail?id=2370
+
+
+v2.2.2 (2014-11-19)
+-------------------
+
+- Fixes to Google Calendar API V3 code
+       - wouldn't recognize a lone-string Google Calendar ID if periods before the @ symbol
+       - removeEventSource wouldn't work when given a Google Calendar ID
+
+
+v2.2.1 (2014-11-19)
+-------------------
+
+- Migrate Google Calendar plugin to use V3 of the API ([1526])
+
+[1526]: https://code.google.com/p/fullcalendar/issues/detail?id=1526
+
+
+v2.2.0 (2014-11-14)
+-------------------
+
+- Background events. Event object's `rendering` property ([144], [1286])
+- `businessHours` option ([144])
+- Controlling where events can be dragged/resized and selections can go ([396], [1286], [2253])
+       - `eventOverlap`, `selectOverlap`, and similar
+       - `eventConstraint`, `selectConstraint`, and similar
+- Improvements to dragging and dropping external events ([2004])
+       - Associating with real event data. used with `eventReceive`
+       - Associating a `duration`
+- Performance boost for moment creation
+       - Be aware, FullCalendar-specific methods now attached directly to global moment.fn
+       - Helps with [issue 2259][2259]
+- Reintroduced forgotten `dropAccept` option ([2312])
+
+[144]: https://code.google.com/p/fullcalendar/issues/detail?id=144
+[396]: https://code.google.com/p/fullcalendar/issues/detail?id=396
+[1286]: https://code.google.com/p/fullcalendar/issues/detail?id=1286
+[2004]: https://code.google.com/p/fullcalendar/issues/detail?id=2004
+[2253]: https://code.google.com/p/fullcalendar/issues/detail?id=2253
+[2259]: https://code.google.com/p/fullcalendar/issues/detail?id=2259
+[2312]: https://code.google.com/p/fullcalendar/issues/detail?id=2312
+
+
+v2.1.1 (2014-08-29)
+-------------------
+
+- removeEventSource not working with array ([2203])
+- mouseout not triggered after mouseover+updateEvent ([829])
+- agenda event's render with no <a> href, not clickable ([2263])
+
+[2203]: https://code.google.com/p/fullcalendar/issues/detail?id=2203
+[829]: https://code.google.com/p/fullcalendar/issues/detail?id=829
+[2263]: https://code.google.com/p/fullcalendar/issues/detail?id=2263
+
+
+v2.1.0 (2014-08-25)
+-------------------
+
+Large code refactor with better OOP, better code reuse, and more comments.
+**No more reliance on jQuery UI** for event dragging, resizing, or anything else.
+
+Significant changes to HTML/CSS skeleton:
+- Leverages tables for liquid rendering of days and events. No costly manual repositioning ([809])
+- **Backwards-incompatibilities**:
+       - **Many classNames have changed. Custom CSS will likely need to be adjusted.**
+       - IE7 definitely not supported anymore
+       - In `eventRender` callback, `element` will not be attached to DOM yet
+       - Events are styled to be one line by default ([1992]). Can be undone through custom CSS,
+         but not recommended (might get gaps [like this][111] in certain situations).
+
+A "more..." link when there are too many events on a day ([304]). Works with month and basic views
+as well as the all-day section of the agenda views. New options:
+- `eventLimit`. a number or `true`
+- `eventLimitClick`. the `"popover`" value will reveal all events in a raised panel (the default)
+- `eventLimitText`
+- `dayPopoverFormat`
+
+Changes related to height and scrollbars:
+- `aspectRatio`/`height`/`contentHeight` values will be honored *no matter what*
+       - If too many events causing too much vertical space, scrollbars will be used ([728]).
+         This is default behavior for month view (**backwards-incompatibility**)
+       - If too few slots in agenda view, view will stretch to be the correct height ([2196])
+- `'auto'` value for `height`/`contentHeight` options. If content is too tall, the view will
+  vertically stretch to accomodate and no scrollbars will be used ([521]).
+- Tall weeks in month view will borrow height from other weeks ([243])
+- Automatically scroll the view then dragging/resizing an event ([1025], [2078])
+- New `fixedWeekCount` option to determines the number of weeks in month view
+       - Supersedes `weekMode` (**deprecated**). Instead, use a combination of `fixedWeekCount` and
+         one of the height options, possibly with an `'auto'` value
+
+Much nicer, glitch-free rendering of calendar *for printers* ([35]). Things you might not expect:
+- Buttons will become hidden
+- Agenda views display a flat list of events where the time slots would be
+
+Other issues resolved along the way:
+- Space on right side of agenda events configurable through CSS ([204])
+- Problem with window resize ([259])
+- Events sorting stays consistent across weeks ([510])
+- Agenda's columns misaligned on wide screens ([511])
+- Run `selectHelper` through `eventRender` callbacks ([629])
+- Keyboard access, tabbing ([637])
+- Run resizing events through `eventRender` ([714])
+- Resize an event to a different day in agenda views ([736])
+- Allow selection across days in agenda views ([778])
+- Mouseenter delegated event not working on event elements ([936])
+- Agenda event dragging, snapping to different columns is erratic ([1101])
+- Android browser cuts off Day view at 8 PM with no scroll bar ([1203])
+- Don't fire `eventMouseover`/`eventMouseout` while dragging/resizing ([1297])
+- Customize the resize handle text ("=") ([1326])
+- If agenda event is too short, don't overwrite `.fc-event-time` ([1700])
+- Zooming calendar causes events to misalign ([1996])
+- Event destroy callback on event removal ([2017])
+- Agenda views, when RTL, should have axis on right ([2132])
+- Make header buttons more accessibile ([2151])
+- daySelectionMousedown should interpret OSX ctrl+click as a right mouse click ([2169])
+- Best way to display time text on multi-day events *with times* ([2172])
+- Eliminate table use for header layout ([2186])
+- Event delegation used for event-related callbacks (like `eventClick`). Speedier.
+
+[35]: https://code.google.com/p/fullcalendar/issues/detail?id=35
+[204]: https://code.google.com/p/fullcalendar/issues/detail?id=204
+[243]: https://code.google.com/p/fullcalendar/issues/detail?id=243
+[259]: https://code.google.com/p/fullcalendar/issues/detail?id=259
+[304]: https://code.google.com/p/fullcalendar/issues/detail?id=304
+[510]: https://code.google.com/p/fullcalendar/issues/detail?id=510
+[511]: https://code.google.com/p/fullcalendar/issues/detail?id=511
+[521]: https://code.google.com/p/fullcalendar/issues/detail?id=521
+[629]: https://code.google.com/p/fullcalendar/issues/detail?id=629
+[637]: https://code.google.com/p/fullcalendar/issues/detail?id=637
+[714]: https://code.google.com/p/fullcalendar/issues/detail?id=714
+[728]: https://code.google.com/p/fullcalendar/issues/detail?id=728
+[736]: https://code.google.com/p/fullcalendar/issues/detail?id=736
+[778]: https://code.google.com/p/fullcalendar/issues/detail?id=778
+[809]: https://code.google.com/p/fullcalendar/issues/detail?id=809
+[936]: https://code.google.com/p/fullcalendar/issues/detail?id=936
+[1025]: https://code.google.com/p/fullcalendar/issues/detail?id=1025
+[1101]: https://code.google.com/p/fullcalendar/issues/detail?id=1101
+[1203]: https://code.google.com/p/fullcalendar/issues/detail?id=1203
+[1297]: https://code.google.com/p/fullcalendar/issues/detail?id=1297
+[1326]: https://code.google.com/p/fullcalendar/issues/detail?id=1326
+[1700]: https://code.google.com/p/fullcalendar/issues/detail?id=1700
+[1992]: https://code.google.com/p/fullcalendar/issues/detail?id=1992
+[1996]: https://code.google.com/p/fullcalendar/issues/detail?id=1996
+[2017]: https://code.google.com/p/fullcalendar/issues/detail?id=2017
+[2078]: https://code.google.com/p/fullcalendar/issues/detail?id=2078
+[2132]: https://code.google.com/p/fullcalendar/issues/detail?id=2132
+[2151]: https://code.google.com/p/fullcalendar/issues/detail?id=2151
+[2169]: https://code.google.com/p/fullcalendar/issues/detail?id=2169
+[2172]: https://code.google.com/p/fullcalendar/issues/detail?id=2172
+[2186]: https://code.google.com/p/fullcalendar/issues/detail?id=2186
+[2196]: https://code.google.com/p/fullcalendar/issues/detail?id=2196
+[111]: https://code.google.com/p/fullcalendar/issues/detail?id=111
+
+
+v2.0.3 (2014-08-15)
+-------------------
+
+- moment-2.8.1 compatibility ([2221])
+- relative path in bower.json ([PR 117])
+- upgraded jquery-ui and misc dev dependencies
+
+[2221]: https://code.google.com/p/fullcalendar/issues/detail?id=2221
+[PR 117]: https://github.com/arshaw/fullcalendar/pull/177
+
+
+v2.0.2 (2014-06-24)
+-------------------
+
+- bug with persisting addEventSource calls ([2191])
+- bug with persisting removeEvents calls with an array source ([2187])
+- bug with removeEvents method when called with 0 removes all events ([2082])
+
+[2191]: https://code.google.com/p/fullcalendar/issues/detail?id=2191
+[2187]: https://code.google.com/p/fullcalendar/issues/detail?id=2187
+[2082]: https://code.google.com/p/fullcalendar/issues/detail?id=2082
+
+
+v2.0.1 (2014-06-15)
+-------------------
+
+- `delta` parameters reintroduced in `eventDrop` and `eventResize` handlers ([2156])
+  - **Note**: this changes the argument order for `revertFunc`
+- wrongfully triggering a windowResize when resizing an agenda view event ([1116])
+- `this` values in event drag-n-drop/resize handlers consistently the DOM node ([1177])
+- `displayEventEnd` - v2 workaround to force display of an end time ([2090])
+- don't modify passed-in eventSource items ([954])
+- destroy method now removes fc-ltr class ([2033])
+- weeks of last/next month still visible when weekends are hidden ([2095])
+- fixed memory leak when destroying calendar with selectable/droppable ([2137])
+- Icelandic language ([2180])
+- Bahasa Indonesia language ([PR 172])
+
+[1116]: https://code.google.com/p/fullcalendar/issues/detail?id=1116
+[1177]: https://code.google.com/p/fullcalendar/issues/detail?id=1177
+[2090]: https://code.google.com/p/fullcalendar/issues/detail?id=2090
+[954]: https://code.google.com/p/fullcalendar/issues/detail?id=954
+[2033]: https://code.google.com/p/fullcalendar/issues/detail?id=2033
+[2095]: https://code.google.com/p/fullcalendar/issues/detail?id=2095
+[2137]: https://code.google.com/p/fullcalendar/issues/detail?id=2137
+[2156]: https://code.google.com/p/fullcalendar/issues/detail?id=2156
+[2180]: https://code.google.com/p/fullcalendar/issues/detail?id=2180
+[PR 172]: https://github.com/arshaw/fullcalendar/pull/172
+
+
+v2.0.0 (2014-06-01)
+-------------------
+
+Internationalization support, timezone support, and [MomentJS] integration. Extensive changes, many
+of which are backwards incompatible.
+
+[Full list of changes][Upgrading-to-v2] | [Affected Issues][Date-Milestone]
+
+An automated testing framework has been set up ([Karma] + [Jasmine]) and tests have been written
+which cover about half of FullCalendar's functionality. Special thanks to @incre-d, @vidbina, and
+@sirrocco for the help.
+
+In addition, the main development repo has been repurposed to also include the built distributable
+JS/CSS for the project and will serve as the new [Bower] endpoint.
+
+[MomentJS]: http://momentjs.com/
+[Upgrading-to-v2]: http://arshaw.com/fullcalendar/wiki/Upgrading-to-v2/
+[Date-Milestone]: https://code.google.com/p/fullcalendar/issues/list?can=1&q=milestone%3Ddate
+[Karma]: http://karma-runner.github.io/
+[Jasmine]: http://jasmine.github.io/
+[Bower]: http://bower.io/
+
+
+v1.6.4 (2013-09-01)
+-------------------
+
+- better algorithm for positioning timed agenda events ([1115])
+- `slotEventOverlap` option to tweak timed agenda event overlapping ([218])
+- selection bug when slot height is customized ([1035])
+- supply view argument in `loading` callback ([1018])
+- fixed week number not displaying in agenda views ([1951])
+- fixed fullCalendar not initializing with no options ([1356])
+- NPM's `package.json`, no more warnings or errors ([1762])
+- building the bower component should output `bower.json` instead of `component.json` ([PR 125])
+- use bower internally for fetching new versions of jQuery and jQuery UI
+
+[1115]: https://code.google.com/p/fullcalendar/issues/detail?id=1115
+[218]: https://code.google.com/p/fullcalendar/issues/detail?id=218
+[1035]: https://code.google.com/p/fullcalendar/issues/detail?id=1035
+[1018]: https://code.google.com/p/fullcalendar/issues/detail?id=1018
+[1951]: https://code.google.com/p/fullcalendar/issues/detail?id=1951
+[1356]: https://code.google.com/p/fullcalendar/issues/detail?id=1356
+[1762]: https://code.google.com/p/fullcalendar/issues/detail?id=1762
+[PR 125]: https://github.com/arshaw/fullcalendar/pull/125
+
+
+v1.6.3 (2013-08-10)
+-------------------
+
+- `viewRender` callback ([PR 15])
+- `viewDestroy` callback ([PR 15])
+- `eventDestroy` callback ([PR 111])
+- `handleWindowResize` option ([PR 54])
+- `eventStartEditable`/`startEditable` options ([PR 49])
+- `eventDurationEditable`/`durationEditable` options ([PR 49])
+- specify function for `$.ajax` `data` parameter for JSON event sources ([PR 59])
+- fixed bug with agenda event dropping in wrong column ([PR 55])
+- easier event element z-index customization ([PR 58])
+- classNames on past/future days ([PR 88])
+- allow `null`/`undefined` event titles ([PR 84])
+- small optimize for agenda event rendering ([PR 56])
+- deprecated:
+       - `viewDisplay`
+       - `disableDragging`
+       - `disableResizing`
+- bundled with latest jQuery (1.10.2) and jQuery UI (1.10.3)
+
+[PR 15]: https://github.com/arshaw/fullcalendar/pull/15
+[PR 111]: https://github.com/arshaw/fullcalendar/pull/111
+[PR 54]: https://github.com/arshaw/fullcalendar/pull/54
+[PR 49]: https://github.com/arshaw/fullcalendar/pull/49
+[PR 59]: https://github.com/arshaw/fullcalendar/pull/59
+[PR 55]: https://github.com/arshaw/fullcalendar/pull/55
+[PR 58]: https://github.com/arshaw/fullcalendar/pull/58
+[PR 88]: https://github.com/arshaw/fullcalendar/pull/88
+[PR 84]: https://github.com/arshaw/fullcalendar/pull/84
+[PR 56]: https://github.com/arshaw/fullcalendar/pull/56
+
+
+v1.6.2 (2013-07-18)
+-------------------
+
+- `hiddenDays` option ([686])
+- bugfix: when `eventRender` returns `false`, incorrect stacking of events ([762])
+- bugfix: couldn't change `event.backgroundImage` when calling `updateEvent` (thx @stephenharris)
+
+[686]: https://code.google.com/p/fullcalendar/issues/detail?id=686
+[762]: https://code.google.com/p/fullcalendar/issues/detail?id=762
+
+
+v1.6.1 (2013-04-14)
+-------------------
+
+- fixed event inner content overflow bug ([1783])
+- fixed table header className bug [1772]
+- removed text-shadow on events (better for general use, thx @tkrotoff)
+
+[1783]: https://code.google.com/p/fullcalendar/issues/detail?id=1783
+[1772]: https://code.google.com/p/fullcalendar/issues/detail?id=1772
+
+
+v1.6.0 (2013-03-18)
+-------------------
+
+- visual facelift, with bootstrap-inspired buttons and colors
+- simplified HTML/CSS for events and buttons
+- `dayRender`, for modifying a day cell ([191], thx @althaus)
+- week numbers on side of calendar ([295])
+       - `weekNumber`
+       - `weekNumberCalculation`
+       - `weekNumberTitle`
+       - `W` formatting variable
+- finer snapping granularity for agenda view events ([495], thx @ms-doodle-com)
+- `eventAfterAllRender` ([753], thx @pdrakeweb)
+- `eventDataTransform` (thx @joeyspo)
+- `data-date` attributes on cells (thx @Jae)
+- expose `$.fullCalendar.dateFormatters`
+- when clicking fast on buttons, prevent text selection
+- bundled with latest jQuery (1.9.1) and jQuery UI (1.10.2)
+- Grunt/Lumbar build system for internal development
+- build for Bower package manager
+- build for jQuery plugin site
+
+[191]: https://code.google.com/p/fullcalendar/issues/detail?id=191
+[295]: https://code.google.com/p/fullcalendar/issues/detail?id=295
+[495]: https://code.google.com/p/fullcalendar/issues/detail?id=495
+[753]: https://code.google.com/p/fullcalendar/issues/detail?id=753
+
+
+v1.5.4 (2012-09-05)
+-------------------
+
+- made compatible with jQuery 1.8.* (thx @archaeron)
+- bundled with jQuery 1.8.1 and jQuery UI 1.8.23
+
+
+v1.5.3 (2012-02-06)
+-------------------
+
+- fixed dragging issue with jQuery UI 1.8.16 ([1168])
+- bundled with jQuery 1.7.1 and jQuery UI 1.8.17
+
+[1168]: https://code.google.com/p/fullcalendar/issues/detail?id=1168
+
+
+v1.5.2 (2011-08-21)
+-------------------
+
+- correctly process UTC "Z" ISO8601 date strings ([750])
+
+[750]: https://code.google.com/p/fullcalendar/issues/detail?id=750
+
+
+v1.5.1 (2011-04-09)
+-------------------
+
+- more flexible ISO8601 date parsing ([814])
+- more flexible parsing of UNIX timestamps ([826])
+- FullCalendar now buildable from source on a Mac ([795])
+- FullCalendar QA'd in FF4 ([883])
+- upgraded to jQuery 1.5.2 (which supports IE9) and jQuery UI 1.8.11
+
+[814]: https://code.google.com/p/fullcalendar/issues/detail?id=814
+[826]: https://code.google.com/p/fullcalendar/issues/detail?id=826
+[795]: https://code.google.com/p/fullcalendar/issues/detail?id=795
+[883]: https://code.google.com/p/fullcalendar/issues/detail?id=883
+
+
+v1.5 (2011-03-19)
+-----------------
+
+- slicker default styling for buttons
+- reworked a lot of the calendar's HTML and accompanying CSS (solves [327] and [395])
+- more printer-friendly (fullcalendar-print.css)
+- fullcalendar now inherits styles from jquery-ui themes differently.
+  styles for buttons are distinct from styles for calendar cells.
+  (solves [299])
+- can now color events through FullCalendar options and Event-Object properties ([117])
+  THIS IS NOW THE PREFERRED METHOD OF COLORING EVENTS (as opposed to using className and CSS)
+       - FullCalendar options:
+               - eventColor (changes both background and border)
+               - eventBackgroundColor
+               - eventBorderColor
+               - eventTextColor
+       - Event-Object options:
+               - color (changes both background and border)
+               - backgroundColor
+               - borderColor
+               - textColor
+- can now specify an event source as an *object* with a `url` property (json feed) or
+  an `events` property (function or array) with additional properties that will
+  be applied to the entire event source:
+       - color (changes both background and border)
+       - backgroudColor
+       - borderColor
+       - textColor
+       - className
+       - editable
+       - allDayDefault
+       - ignoreTimezone
+       - startParam (for a feed)
+       - endParam   (for a feed)
+       - ANY OF THE JQUERY $.ajax OPTIONS
+         allows for easily changing from GET to POST and sending additional parameters ([386])
+         allows for easily attaching ajax handlers such as `error` ([754])
+         allows for turning caching on ([355])
+- Google Calendar feeds are now specified differently:
+       - specify a simple string of your feed's URL
+       - specify an *object* with a `url` property of your feed's URL.
+         you can include any of the new Event-Source options in this object.
+       - the old `$.fullCalendar.gcalFeed` method still works
+- no more IE7 SSL popup ([504])
+- remove `cacheParam` - use json event source `cache` option instead
+- latest jquery/jquery-ui
+
+[327]: https://code.google.com/p/fullcalendar/issues/detail?id=327
+[395]: https://code.google.com/p/fullcalendar/issues/detail?id=395
+[299]: https://code.google.com/p/fullcalendar/issues/detail?id=299
+[117]: https://code.google.com/p/fullcalendar/issues/detail?id=117
+[386]: https://code.google.com/p/fullcalendar/issues/detail?id=386
+[754]: https://code.google.com/p/fullcalendar/issues/detail?id=754
+[355]: https://code.google.com/p/fullcalendar/issues/detail?id=355
+[504]: https://code.google.com/p/fullcalendar/issues/detail?id=504
+
+
+v1.4.11 (2011-02-22)
+--------------------
+
+- fixed rerenderEvents bug ([790])
+- fixed bug with faulty dragging of events from all-day slot in agenda views
+- bundled with jquery 1.5 and jquery-ui 1.8.9
+
+[790]: https://code.google.com/p/fullcalendar/issues/detail?id=790
+
+
+v1.4.10 (2011-01-02)
+--------------------
+
+- fixed bug with resizing event to different week in 5-day month view ([740])
+- fixed bug with events not sticking after a removeEvents call ([757])
+- fixed bug with underlying parseTime method, and other uses of parseInt ([688])
+
+[740]: https://code.google.com/p/fullcalendar/issues/detail?id=740
+[757]: https://code.google.com/p/fullcalendar/issues/detail?id=757
+[688]: https://code.google.com/p/fullcalendar/issues/detail?id=688
+
+
+v1.4.9 (2010-11-16)
+-------------------
+
+- new algorithm for vertically stacking events ([111])
+- resizing an event to a different week ([306])
+- bug: some events not rendered with consecutive calls to addEventSource ([679])
+
+[111]: https://code.google.com/p/fullcalendar/issues/detail?id=111
+[306]: https://code.google.com/p/fullcalendar/issues/detail?id=306
+[679]: https://code.google.com/p/fullcalendar/issues/detail?id=679
+
+
+v1.4.8 (2010-10-16)
+-------------------
+
+- ignoreTimezone option (set to `false` to process UTC offsets in ISO8601 dates)
+- bugfixes
+       - event refetching not being called under certain conditions ([417], [554])
+       - event refetching being called multiple times under certain conditions ([586], [616])
+       - selection cannot be triggered by right mouse button ([558])
+       - agenda view left axis sized incorrectly ([465])
+       - IE js error when calendar is too narrow ([517])
+       - agenda view looks strange when no scrollbars ([235])
+       - improved parsing of ISO8601 dates with UTC offsets
+- $.fullCalendar.version
+- an internal refactor of the code, for easier future development and modularity
+
+[417]: https://code.google.com/p/fullcalendar/issues/detail?id=417
+[554]: https://code.google.com/p/fullcalendar/issues/detail?id=554
+[586]: https://code.google.com/p/fullcalendar/issues/detail?id=586
+[616]: https://code.google.com/p/fullcalendar/issues/detail?id=616
+[558]: https://code.google.com/p/fullcalendar/issues/detail?id=558
+[465]: https://code.google.com/p/fullcalendar/issues/detail?id=465
+[517]: https://code.google.com/p/fullcalendar/issues/detail?id=517
+[235]: https://code.google.com/p/fullcalendar/issues/detail?id=235
+
+
+v1.4.7 (2010-07-05)
+-------------------
+
+- "dropping" external objects onto the calendar
+       - droppable (boolean, to turn on/off)
+       - dropAccept (to filter which events the calendar will accept)
+       - drop (trigger)
+- selectable options can now be specified with a View Option Hash
+- bugfixes
+       - dragged & reverted events having wrong time text ([406])
+       - bug rendering events that have an endtime with seconds, but no hours/minutes ([477])
+       - gotoDate date overflow bug ([429])
+       - wrong date reported when clicking on edge of last column in agenda views [412]
+- support newlines in event titles
+- select/unselect callbacks now passes native js event
+
+[406]: https://code.google.com/p/fullcalendar/issues/detail?id=406
+[477]: https://code.google.com/p/fullcalendar/issues/detail?id=477
+[429]: https://code.google.com/p/fullcalendar/issues/detail?id=429
+[412]: https://code.google.com/p/fullcalendar/issues/detail?id=412
+
+
+v1.4.6 (2010-05-31)
+-------------------
+
+- "selecting" days or timeslots
+       - options: selectable, selectHelper, unselectAuto, unselectCancel
+       - callbacks: select, unselect
+       - methods: select, unselect
+- when dragging an event, the highlighting reflects the duration of the event
+- code compressing by Google Closure Compiler
+- bundled with jQuery 1.4.2 and jQuery UI 1.8.1
+
+
+v1.4.5 (2010-02-21)
+-------------------
+
+- lazyFetching option, which can force the calendar to fetch events on every view/date change
+- scroll state of agenda views are preserved when switching back to view
+- bugfixes
+       - calling methods on an uninitialized fullcalendar throws error
+       - IE6/7 bug where an entire view becomes invisible ([320])
+       - error when rendering a hidden calendar (in jquery ui tabs for example) in IE ([340])
+       - interconnected bugs related to calendar resizing and scrollbars
+               - when switching views or clicking prev/next, calendar would "blink" ([333])
+               - liquid-width calendar's events shifted (depending on initial height of browser) ([341])
+               - more robust underlying algorithm for calendar resizing
+
+[320]: https://code.google.com/p/fullcalendar/issues/detail?id=320
+[340]: https://code.google.com/p/fullcalendar/issues/detail?id=340
+[333]: https://code.google.com/p/fullcalendar/issues/detail?id=333
+[341]: https://code.google.com/p/fullcalendar/issues/detail?id=341
+
+
+v1.4.4 (2010-02-03)
+-------------------
+
+- optimized event rendering in all views (events render in 1/10 the time)
+- gotoDate() does not force the calendar to unnecessarily rerender
+- render() method now correctly readjusts height
+
+
+v1.4.3 (2009-12-22)
+-------------------
+
+- added destroy method
+- Google Calendar event pages respect currentTimezone
+- caching now handled by jQuery's ajax 
+- protection from setting aspectRatio to zero
+- bugfixes
+       - parseISO8601 and DST caused certain events to display day before
+       - button positioning problem in IE6
+       - ajax event source removed after recently being added, events still displayed
+       - event not displayed when end is an empty string
+       - dynamically setting calendar height when no events have been fetched, throws error
+
+
+v1.4.2 (2009-12-02)
+-------------------
+
+- eventAfterRender trigger
+- getDate & getView methods
+- height & contentHeight options (explicitly sets the pixel height)
+- minTime & maxTime options (restricts shown hours in agenda view)
+- getters [for all options] and setters [for height, contentHeight, and aspectRatio ONLY! stay tuned..]
+- render method now readjusts calendar's size
+- bugfixes
+       - lightbox scripts that use iframes (like fancybox)
+       - day-of-week classNames were off when firstDay=1
+       - guaranteed space on right side of agenda events (even when stacked)
+       - accepts ISO8601 dates with a space (instead of 'T')
+
+
+v1.4.1 (2009-10-31)
+-------------------
+
+- can exclude weekends with new 'weekends' option
+- gcal feed 'currentTimezone' option
+- bugfixes
+       - year/month/date option sometimes wouldn't set correctly (depending on current date)
+       - daylight savings issue caused agenda views to start at 1am (for BST users)
+- cleanup of gcal.js code
+
+
+v1.4 (2009-10-19)
+-----------------
+
+- agendaWeek and agendaDay views
+- added some options for agenda views:
+       - allDaySlot
+       - allDayText
+       - firstHour
+       - slotMinutes
+       - defaultEventMinutes
+       - axisFormat
+- modified some existing options/triggers to work with agenda views:
+       - dragOpacity and timeFormat can now accept a "View Hash" (a new concept)
+       - dayClick now has an allDay parameter
+       - eventDrop now has an an allDay parameter
+         (this will affect those who use revertFunc, adjust parameter list)
+- added 'prevYear' and 'nextYear' for buttons in header
+- minor change for theme users, ui-state-hover not applied to active/inactive buttons
+- added event-color-changing example in docs
+- better defaults for right-to-left themed button icons
+
+
+v1.3.2 (2009-10-13)
+-------------------
+
+- Bugfixes (please upgrade from 1.3.1!)
+       - squashed potential infinite loop when addMonths and addDays
+         is called with an invalid date
+       - $.fullCalendar.parseDate() now correctly parses IETF format
+       - when switching views, the 'today' button sticks inactive, fixed
+- gotoDate now can accept a single Date argument
+- documentation for changes in 1.3.1 and 1.3.2 now on website
+
+
+v1.3.1 (2009-09-30)
+-------------------
+
+- Important Bugfixes (please upgrade from 1.3!)
+       - When current date was late in the month, for long months, and prev/next buttons
+         were clicked in month-view, some months would be skipped/repeated
+       - In certain time zones, daylight savings time would cause certain days
+         to be misnumbered in month-view
+- Subtle change in way week interval is chosen when switching from month to basicWeek/basicDay view
+- Added 'allDayDefault' option
+- Added 'changeView' and 'render' methods
+
+
+v1.3 (2009-09-21)
+-----------------
+
+- different 'views': month/basicWeek/basicDay
+- more flexible 'header' system for buttons
+- themable by jQuery UI themes
+- resizable events (require jQuery UI resizable plugin)
+- rescoped & rewritten CSS, enhanced default look
+- cleaner css & rendering techniques for right-to-left
+- reworked options & API to support multiple views / be consistent with jQuery UI
+- refactoring of entire codebase
+       - broken into different JS & CSS files, assembled w/ build scripts
+       - new test suite for new features, uses firebug-lite
+- refactored docs
+- Options
+       - + date
+       - + defaultView
+       - + aspectRatio
+       - + disableResizing
+       - + monthNames      (use instead of $.fullCalendar.monthNames)
+       - + monthNamesShort (use instead of $.fullCalendar.monthAbbrevs)
+       - + dayNames        (use instead of $.fullCalendar.dayNames)
+       - + dayNamesShort   (use instead of $.fullCalendar.dayAbbrevs)
+       - + theme
+       - + buttonText
+       - + buttonIcons
+       - x draggable           -> editable/disableDragging
+       - x fixedWeeks          -> weekMode
+       - x abbrevDayHeadings   -> columnFormat
+       - x buttons/title       -> header
+       - x eventDragOpacity    -> dragOpacity
+       - x eventRevertDuration -> dragRevertDuration
+       - x weekStart           -> firstDay
+       - x rightToLeft         -> isRTL
+       - x showTime (use 'allDay' CalEvent property instead)
+- Triggered Actions
+       - + eventResizeStart
+       - + eventResizeStop
+       - + eventResize
+       - x monthDisplay -> viewDisplay
+       - x resize       -> windowResize
+       - 'eventDrop' params changed, can revert if ajax cuts out
+- CalEvent Properties
+       - x showTime  -> allDay
+       - x draggable -> editable
+       - 'end' is now INCLUSIVE when allDay=true
+       - 'url' now produces a real <a> tag, more native clicking/tab behavior
+- Methods:
+       - + renderEvent
+       - x prevMonth         -> prev
+       - x nextMonth         -> next
+       - x prevYear/nextYear -> moveDate
+       - x refresh           -> rerenderEvents/refetchEvents
+       - x removeEvent       -> removeEvents
+       - x getEventsByID     -> clientEvents
+- Utilities:
+       - 'formatDate' format string completely changed (inspired by jQuery UI datepicker + datejs)
+       - 'formatDates' added to support date-ranges
+- Google Calendar Options:
+       - x draggable -> editable
+- Bugfixes
+       - gcal extension fetched 25 results max, now fetches all
+
+
+v1.2.1 (2009-06-29)
+-------------------
+
+- bugfixes
+       - allows and corrects invalid end dates for events
+       - doesn't throw an error in IE while rendering when display:none
+       - fixed 'loading' callback when used w/ multiple addEventSource calls
+       - gcal className can now be an array
+
+
+v1.2 (2009-05-31)
+-----------------
+
+- expanded API
+       - 'className' CalEvent attribute
+       - 'source' CalEvent attribute
+       - dynamically get/add/remove/update events of current month
+       - locale improvements: change month/day name text
+       - better date formatting ($.fullCalendar.formatDate)
+       - multiple 'event sources' allowed
+               - dynamically add/remove event sources
+- options for prevYear and nextYear buttons
+- docs have been reworked (include addition of Google Calendar docs)
+- changed behavior of parseDate for number strings
+  (now interpets as unix timestamp, not MS times)
+- bugfixes
+       - rightToLeft month start bug
+       - off-by-one errors with month formatting commands
+       - events from previous months sticking when clicking prev/next quickly
+- Google Calendar API changed to work w/ multiple event sources
+       - can also provide 'className' and 'draggable' options
+- date utilties moved from $ to $.fullCalendar
+- more documentation in source code
+- minified version of fullcalendar.js
+- test suit (available from svn)
+- top buttons now use `<button>` w/ an inner `<span>` for better css cusomization
+       - thus CSS has changed. IF UPGRADING FROM PREVIOUS VERSIONS,
+         UPGRADE YOUR FULLCALENDAR.CSS FILE
+
+
+v1.1 (2009-05-10)
+-----------------
+
+- Added the following options:
+       - weekStart
+       - rightToLeft
+       - titleFormat
+       - timeFormat
+       - cacheParam
+       - resize
+- Fixed rendering bugs
+       - Opera 9.25 (events placement & window resizing)
+       - IE6 (window resizing)
+- Optimized window resizing for ALL browsers
+- Events on same day now sorted by start time (but first by timespan)
+- Correct z-index when dragging
+- Dragging contained in overflow DIV for IE6
+- Modified fullcalendar.css
+       - for right-to-left support
+       - for variable start-of-week
+       - for IE6 resizing bug
+       - for THEAD and TBODY (in 1.0, just used TBODY, restructured in 1.1)
+       - IF UPGRADING FROM FULLCALENDAR 1.0, YOU MUST UPGRADE FULLCALENDAR.CSS
diff --git a/library/fullcalendar/CONTRIBUTING.txt b/library/fullcalendar/CONTRIBUTING.txt
new file mode 100644 (file)
index 0000000..7408451
--- /dev/null
@@ -0,0 +1,127 @@
+
+## Reporting Bugs
+
+Each bug report MUST have a [JSFiddle/JSBin] recreation before any work can begin. [further instructions &raquo;](http://fullcalendar.io/wiki/Reporting-Bugs/)
+
+
+## Requesting Features
+
+Please search the [Issue Tracker] to see if your feature has already been requested, and if so, subscribe to it. Otherwise, read these [further instructions &raquo;](http://fullcalendar.io/wiki/Requesting-Features/)
+
+
+## Contributing Features
+
+The FullCalendar project welcomes [Pull Requests][Using Pull Requests] for new features, but because there are so many feature requests (over 100), and because every new feature requires refinement and maintenance, each PR will be prioritized against the project's other demands and might take a while to make it to an official release.
+
+Furthermore, each new feature should be designed as robustly as possible and be useful beyond the immediate usecase it was initially designed for. Feel free to start a ticket discussing the feature's specs before coding.
+
+
+## Contributing Bugfixes
+
+In the description of your [Pull Request][Using Pull Requests], please include recreation steps for the bug as well as a [JSFiddle/JSBin] demo. Communicating the buggy behavior is a requirement before a merge can happen.
+
+
+## Contributing Locales
+
+Please edit the original files in the `locale/` directory. DO NOT edit anything in the `dist/` directory. The build system will responsible for merging FullCalendar's `locale/` data with the [MomentJS locale data].
+
+
+## Other Ways to Contribute
+
+[Read about other ways to contribute &raquo;](http://fullcalendar.io/wiki/Contributing/)
+
+
+## Getting Set Up
+
+You will need [Git][git], [Node][node], and NPM installed. For clarification, please view the [jQuery readme][jq-readme], which requires a similar setup.
+
+Also, you will need the [gulp-cli][gulp-cli] package installed globally (`-g`) on your system:
+
+       npm install -g gulp-cli
+
+Then, clone FullCalendar's git repo:
+
+       git clone git://github.com/fullcalendar/fullcalendar.git
+
+Enter the directory and install FullCalendar's dependencies:
+
+       cd fullcalendar
+       npm install
+
+
+## What to edit
+
+When modifying files, please do not edit the generated or minified files in the `dist/` directory. Please edit the original `src/` files.
+
+
+## Development Workflow
+
+After you make code changes, you'll want to compile the JS/CSS so that it can be previewed from the tests and demos. You can either manually rebuild each time you make a change:
+
+       gulp dev
+
+Or, you can run a script that automatically rebuilds whenever you save a source file:
+
+       gulp watch
+
+When you are finished, run the following command to write the distributable files into the `./dist/` directory:
+
+       gulp dist
+
+If you want to clean up the generated files, run:
+
+       gulp clean
+
+
+## Style Guide
+
+Please follow the [Google JavaScript Style Guide] as closely as possible. With the following exceptions:
+
+```js
+if (true) {
+}
+else { // please put else, else if, and catch on a separate line
+}
+
+// please write one-line array literals with a one-space padding inside
+var a = [ 1, 2, 3 ];
+
+// please write one-line object literals with a one-space padding inside
+var o = { a: 1, b: 2, c: 3 };
+```
+
+Other exceptions:
+
+- please ignore anything about Google Closure Compiler or the `goog` library
+- please do not write JSDoc comments
+
+Notes about whitespace:
+
+- **use *tabs* instead of spaces**
+- separate functions with *2* blank lines
+- separate logical blocks within functions with *1* blank line
+
+Run the command line tool to automatically check your style:
+
+       gulp lint
+
+
+## Before Submitting your Code
+
+If you have edited code (including **tests** and **translations**) and would like to submit a pull request, please make sure you have done the following:
+
+1. Conformed to the style guide (successfully run `gulp lint`)
+
+2. Written automated tests. View the [Automated Test Readme]
+
+
+[JSFiddle/JSBin]: http://fullcalendar.io/wiki/Reporting-Bugs/
+[Issue Tracker]: https://github.com/fullcalendar/fullcalendar/issues
+[Using Pull Requests]: https://help.github.com/articles/using-pull-requests/
+[MomentJS locale data]: https://github.com/moment/moment/tree/develop/locale
+[git]: http://git-scm.com/
+[node]: http://nodejs.org/
+[gulp-cli]: https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md
+[jq-readme]: https://github.com/jquery/jquery/blob/master/README.md#what-you-need-to-build-your-own-jquery
+[Google JavaScript Style Guide]: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
+[Automated Test Readme]: https://github.com/fullcalendar/fullcalendar/wiki/Automated-Tests
diff --git a/library/fullcalendar/LICENSE.txt b/library/fullcalendar/LICENSE.txt
new file mode 100644 (file)
index 0000000..eafaf97
--- /dev/null
@@ -0,0 +1,20 @@
+Copyright (c) 2015 Adam Shaw
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/library/fullcalendar/changelog.txt b/library/fullcalendar/changelog.txt
deleted file mode 100644 (file)
index 8299714..0000000
+++ /dev/null
@@ -1,382 +0,0 @@
-
-version 1.6.4 (9/1/13)
-       - better algorithm for positioning timed agenda events (issue 1115)
-       - `slotEventOverlap` option to tweak timed agenda event overlapping (issue 218)
-       - selection bug when slot height is customized (issue 1035)
-       - supply view argument in `loading` callback (issue 1018)
-       - fixed week number not displaying in agenda views (issue 1951)
-       - fixed fullCalendar not initializing with no options (issue 1356)
-       - NPM's package.json, no more warnings or errors (issue 1762)
-       - building the bower component should output bower.json instead of component.json (PR 125)
-       - use bower internally for fetching new versions of jQuery and jQuery UI
-
-version 1.6.3 (8/10/13)
-       - viewRender callback (PR 15)
-       - viewDestroy callback (PR 15)
-       - eventDestroy callback (PR 111)
-       - handleWindowResize option (PR 54)
-       - eventStartEditable/startEditable options (PR 49)
-       - eventDurationEditable/durationEditable options (PR 49)
-       - specify function for $.ajax `data` parameter for JSON event sources (PR 59)
-       - fixed bug with agenda event dropping in wrong column (PR 55)
-       - easier event element z-index customization (PR 58)
-       - classNames on past/future days (PR 88)
-       - allow null/undefined event titles (PR 84)
-       - small optimize for agenda event rendering (PR 56)
-       - deprecated:
-               - viewDisplay
-               - disableDragging
-               - disableResizing
-       - bundled with latest jQuery (1.10.2) and jQuery UI (1.10.3)
-
-version 1.6.2 (7/18/13)
-       - hiddenDays option (issue 686)
-       - bugfix: when eventRender returns false, incorrect stacking of events (issue 762)
-       - bugfix: couldn't change event.backgroundImage when calling updateEvent (thx stephenharris)
-
-version 1.6.1 (4/14/13)
-       - fixed event inner content overflow bug (issue 1783)
-       - fixed table header className bug (1772)
-       - removed text-shadow on events (better for general use, thx tkrotoff)
-
-version 1.6.0 (3/18/13)
-       - visual facelift, with bootstrap-inspired buttons and colors
-       - simplified HTML/CSS for events and buttons
-       - dayRender, for modifying a day cell (issue 191, thx althaus)
-       - week numbers on side of calendar (issue 295)
-               - weekNumber
-               - weekNumberCalculation
-               - weekNumberTitle
-               - "W" formatting variable
-       - finer snapping granularity for agenda view events (issue 495, thx ms-doodle-com)
-       - eventAfterAllRender (issue 753, thx pdrakeweb)
-       - eventDataTransform (thx joeyspo)
-       - data-date attributes on cells (thx Jae)
-       - expose $.fullCalendar.dateFormatters
-       - when clicking fast on buttons, prevent text selection
-       - bundled with latest jQuery (1.9.1) and jQuery UI (1.10.2)
-       - Grunt/Lumbar build system for internal development
-       - build for Bower package manager
-       - build for jQuery plugin site
-
-version 1.5.4 (9/5/12)
-       - made compatible with jQuery 1.8.* (thx archaeron)
-       - bundled with jQuery 1.8.1 and jQuery UI 1.8.23
-
-version 1.5.3 (2/6/12)
-       - fixed dragging issue with jQuery UI 1.8.16 (issue 1168)
-       - bundled with jQuery 1.7.1 and jQuery UI 1.8.17
-
-version 1.5.2 (8/21/11)
-       - correctly process UTC "Z" ISO8601 date strings (issue 750)
-
-version 1.5.1 (4/9/11)
-       - more flexible ISO8601 date parsing (issue 814)
-       - more flexible parsing of UNIX timestamps (issue 826)
-       - FullCalendar now buildable from source on a Mac (issue 795)
-       - FullCalendar QA'd in FF4 (issue 883)
-       - upgraded to jQuery 1.5.2 (which supports IE9) and jQuery UI 1.8.11
-
-version 1.5 (3/19/11)
-       - slicker default styling for buttons
-       - reworked a lot of the calendar's HTML and accompanying CSS
-         (solves issues 327 and 395)
-       - more printer-friendly (fullcalendar-print.css)
-       - fullcalendar now inherits styles from jquery-ui themes differently.
-         styles for buttons are distinct from styles for calendar cells.
-         (solves issue 299)
-       - can now color events through FullCalendar options and Event-Object properties (issue 117)
-         THIS IS NOW THE PREFERRED METHOD OF COLORING EVENTS (as opposed to using className and CSS)
-               - FullCalendar options:
-                       - eventColor (changes both background and border)
-                       - eventBackgroundColor
-                       - eventBorderColor
-                       - eventTextColor
-               - Event-Object options:
-                       - color (changes both background and border)
-                       - backgroundColor
-                       - borderColor
-                       - textColor
-       - can now specify an event source as an *object* with a `url` property (json feed) or
-         an `events` property (function or array) with additional properties that will
-         be applied to the entire event source:
-               - color (changes both background and border)
-               - backgroudColor
-               - borderColor
-               - textColor
-               - className
-               - editable
-               - allDayDefault
-               - ignoreTimezone
-               - startParam (for a feed)
-               - endParam   (for a feed)
-               - ANY OF THE JQUERY $.ajax OPTIONS
-                 allows for easily changing from GET to POST and sending additional parameters (issue 386)
-                 allows for easily attaching ajax handlers such as `error` (issue 754)
-                 allows for turning caching on (issue 355)
-       - Google Calendar feeds are now specified differently:
-               - specify a simple string of your feed's URL
-               - specify an *object* with a `url` property of your feed's URL.
-                 you can include any of the new Event-Source options in this object.
-               - the old `$.fullCalendar.gcalFeed` method still works
-       - no more IE7 SSL popup (issue 504)
-       - remove `cacheParam` - use json event source `cache` option instead
-       - latest jquery/jquery-ui
-
-version 1.4.11 (2/22/11)
-       - fixed rerenderEvents bug (issue 790)
-       - fixed bug with faulty dragging of events from all-day slot in agenda views
-       - bundled with jquery 1.5 and jquery-ui 1.8.9
-
-version 1.4.10 (1/2/11)
-       - fixed bug with resizing event to different week in 5-day month view (issue 740)
-       - fixed bug with events not sticking after a removeEvents call (issue 757)
-       - fixed bug with underlying parseTime method, and other uses of parseInt (issue 688)
-
-version 1.4.9 (11/16/10)
-       - new algorithm for vertically stacking events (issue 111)
-       - resizing an event to a different week (issue 306)
-       - bug: some events not rendered with consecutive calls to addEventSource (issue 679)
-
-version 1.4.8 (10/16/10)
-       - ignoreTimezone option (set to `false` to process UTC offsets in ISO8601 dates)
-       - bugfixes
-               - event refetching not being called under certain conditions (issues 417, 554)
-               - event refetching being called multiple times under certain conditions (issues 586, 616)
-               - selection cannot be triggered by right mouse button (issue 558)
-               - agenda view left axis sized incorrectly (issue 465)
-               - IE js error when calendar is too narrow (issue 517)
-               - agenda view looks strange when no scrollbars (issue 235)
-               - improved parsing of ISO8601 dates with UTC offsets
-       - $.fullCalendar.version
-       - an internal refactor of the code, for easier future development and modularity
-
-version 1.4.7 (7/5/10)
-       - "dropping" external objects onto the calendar
-               - droppable (boolean, to turn on/off)
-               - dropAccept (to filter which events the calendar will accept)
-               - drop (trigger)
-       - selectable options can now be specified with a View Option Hash
-       - bugfixes
-               - dragged & reverted events having wrong time text (issue 406)
-               - bug rendering events that have an endtime with seconds, but no hours/minutes (issue 477)
-               - gotoDate date overflow bug (issue 429)
-               - wrong date reported when clicking on edge of last column in agenda views (412)
-       - support newlines in event titles
-       - select/unselect callbacks now passes native js event
-
-version 1.4.6 (5/31/10)
-       - "selecting" days or timeslots
-               - options: selectable, selectHelper, unselectAuto, unselectCancel
-               - callbacks: select, unselect
-               - methods: select, unselect
-       - when dragging an event, the highlighting reflects the duration of the event
-       - code compressing by Google Closure Compiler
-       - bundled with jQuery 1.4.2 and jQuery UI 1.8.1
-
-version 1.4.5 (2/21/10)
-       - lazyFetching option, which can force the calendar to fetch events on every view/date change
-       - scroll state of agenda views are preserved when switching back to view
-       - bugfixes
-               - calling methods on an uninitialized fullcalendar throws error
-               - IE6/7 bug where an entire view becomes invisible (issue 320)
-               - error when rendering a hidden calendar (in jquery ui tabs for example) in IE (issue 340)
-               - interconnected bugs related to calendar resizing and scrollbars
-                       - when switching views or clicking prev/next, calendar would "blink" (issue 333)
-                       - liquid-width calendar's events shifted (depending on initial height of browser) (issue 341)
-                       - more robust underlying algorithm for calendar resizing
-
-version 1.4.4 (2/3/10)
-       - optimized event rendering in all views (events render in 1/10 the time)
-       - gotoDate() does not force the calendar to unnecessarily rerender
-       - render() method now correctly readjusts height
-
-version 1.4.3 (12/22/09)
-       - added destroy method
-       - Google Calendar event pages respect currentTimezone
-       - caching now handled by jQuery's ajax  
-       - protection from setting aspectRatio to zero
-       - bugfixes
-               - parseISO8601 and DST caused certain events to display day before
-               - button positioning problem in IE6
-               - ajax event source removed after recently being added, events still displayed
-               - event not displayed when end is an empty string
-               - dynamically setting calendar height when no events have been fetched, throws error
-
-version 1.4.2 (12/02/09)
-       - eventAfterRender trigger
-       - getDate & getView methods
-       - height & contentHeight options (explicitly sets the pixel height)
-       - minTime & maxTime options (restricts shown hours in agenda view)
-       - getters [for all options] and setters [for height, contentHeight, and aspectRatio ONLY! stay tuned..]
-       - render method now readjusts calendar's size
-       - bugfixes
-               - lightbox scripts that use iframes (like fancybox)
-               - day-of-week classNames were off when firstDay=1
-               - guaranteed space on right side of agenda events (even when stacked)
-               - accepts ISO8601 dates with a space (instead of 'T')
-
-version 1.4.1 (10/31/09)
-       - can exclude weekends with new 'weekends' option
-       - gcal feed 'currentTimezone' option
-       - bugfixes
-               - year/month/date option sometimes wouldn't set correctly (depending on current date)
-               - daylight savings issue caused agenda views to start at 1am (for BST users)
-       - cleanup of gcal.js code
-
-version 1.4 (10/19/09)
-       - agendaWeek and agendaDay views
-       - added some options for agenda views:
-               - allDaySlot
-               - allDayText
-               - firstHour
-               - slotMinutes
-               - defaultEventMinutes
-               - axisFormat
-       - modified some existing options/triggers to work with agenda views:
-               - dragOpacity and timeFormat can now accept a "View Hash" (a new concept)
-               - dayClick now has an allDay parameter
-               - eventDrop now has an an allDay parameter
-                 (this will affect those who use revertFunc, adjust parameter list)
-       - added 'prevYear' and 'nextYear' for buttons in header
-       - minor change for theme users, ui-state-hover not applied to active/inactive buttons
-       - added event-color-changing example in docs
-       - better defaults for right-to-left themed button icons
-
-version 1.3.2 (10/13/09)
-       - Bugfixes (please upgrade from 1.3.1!)
-               - squashed potential infinite loop when addMonths and addDays
-                 is called with an invalid date
-               - $.fullCalendar.parseDate() now correctly parses IETF format
-               - when switching views, the 'today' button sticks inactive, fixed
-       - gotoDate now can accept a single Date argument
-       - documentation for changes in 1.3.1 and 1.3.2 now on website
-
-version 1.3.1 (9/30/09)
-       - Important Bugfixes (please upgrade from 1.3!)
-               - When current date was late in the month, for long months, and prev/next buttons
-                 were clicked in month-view, some months would be skipped/repeated
-               - In certain time zones, daylight savings time would cause certain days
-                 to be misnumbered in month-view
-       - Subtle change in way week interval is chosen when switching from month to basicWeek/basicDay view
-       - Added 'allDayDefault' option
-       - Added 'changeView' and 'render' methods
-
-version 1.3 (9/21/09)
-       - different 'views': month/basicWeek/basicDay
-       - more flexible 'header' system for buttons
-       - themable by jQuery UI themes
-       - resizable events (require jQuery UI resizable plugin)
-       - rescoped & rewritten CSS, enhanced default look
-       - cleaner css & rendering techniques for right-to-left
-       - reworked options & API to support multiple views / be consistent with jQuery UI
-       - refactoring of entire codebase
-               - broken into different JS & CSS files, assembled w/ build scripts
-               - new test suite for new features, uses firebug-lite
-       - refactored docs
-       - Options
-               + date
-               + defaultView
-               + aspectRatio
-               + disableResizing
-               + monthNames      (use instead of $.fullCalendar.monthNames)
-               + monthNamesShort (use instead of $.fullCalendar.monthAbbrevs)
-               + dayNames        (use instead of $.fullCalendar.dayNames)
-               + dayNamesShort   (use instead of $.fullCalendar.dayAbbrevs)
-               + theme
-               + buttonText
-               + buttonIcons
-               x draggable           -> editable/disableDragging
-               x fixedWeeks          -> weekMode
-               x abbrevDayHeadings   -> columnFormat
-               x buttons/title       -> header
-               x eventDragOpacity    -> dragOpacity
-               x eventRevertDuration -> dragRevertDuration
-               x weekStart           -> firstDay
-               x rightToLeft         -> isRTL
-               x showTime (use 'allDay' CalEvent property instead)
-       - Triggered Actions
-               + eventResizeStart
-               + eventResizeStop
-               + eventResize
-               x monthDisplay -> viewDisplay
-               x resize       -> windowResize
-               'eventDrop' params changed, can revert if ajax cuts out
-       - CalEvent Properties
-               x showTime  -> allDay
-               x draggable -> editable
-               'end' is now INCLUSIVE when allDay=true
-               'url' now produces a real <a> tag, more native clicking/tab behavior
-       - Methods:
-               + renderEvent
-               x prevMonth         -> prev
-               x nextMonth         -> next
-               x prevYear/nextYear -> moveDate
-               x refresh           -> rerenderEvents/refetchEvents
-               x removeEvent       -> removeEvents
-               x getEventsByID     -> clientEvents
-       - Utilities:
-               'formatDate' format string completely changed (inspired by jQuery UI datepicker + datejs)
-               'formatDates' added to support date-ranges
-       - Google Calendar Options:
-               x draggable -> editable
-       - Bugfixes
-               - gcal extension fetched 25 results max, now fetches all
-
-version 1.2.1 (6/29/09)
-       - bugfixes
-               - allows and corrects invalid end dates for events
-               - doesn't throw an error in IE while rendering when display:none
-               - fixed 'loading' callback when used w/ multiple addEventSource calls
-               - gcal className can now be an array
-
-version 1.2 (5/31/09)
-       - expanded API
-               - 'className' CalEvent attribute
-               - 'source' CalEvent attribute
-               - dynamically get/add/remove/update events of current month
-               - locale improvements: change month/day name text
-               - better date formatting ($.fullCalendar.formatDate)
-               - multiple 'event sources' allowed
-                       - dynamically add/remove event sources
-       - options for prevYear and nextYear buttons
-       - docs have been reworked (include addition of Google Calendar docs)
-       - changed behavior of parseDate for number strings
-         (now interpets as unix timestamp, not MS times)
-       - bugfixes
-               - rightToLeft month start bug
-               - off-by-one errors with month formatting commands
-               - events from previous months sticking when clicking prev/next quickly
-       - Google Calendar API changed to work w/ multiple event sources
-               - can also provide 'className' and 'draggable' options
-       - date utilties moved from $ to $.fullCalendar
-       - more documentation in source code
-       - minified version of fullcalendar.js
-       - test suit (available from svn)
-       - top buttons now use <button> w/ an inner <span> for better css cusomization
-               - thus CSS has changed. IF UPGRADING FROM PREVIOUS VERSIONS,
-                 UPGRADE YOUR FULLCALENDAR.CSS FILE!!!
-
-version 1.1 (5/10/09)
-       - Added the following options:
-               - weekStart
-               - rightToLeft
-               - titleFormat
-               - timeFormat
-               - cacheParam
-               - resize
-       - Fixed rendering bugs
-               - Opera 9.25 (events placement & window resizing)
-               - IE6 (window resizing)
-       - Optimized window resizing for ALL browsers
-       - Events on same day now sorted by start time (but first by timespan)
-       - Correct z-index when dragging
-       - Dragging contained in overflow DIV for IE6
-       - Modified fullcalendar.css
-               - for right-to-left support
-               - for variable start-of-week
-               - for IE6 resizing bug
-               - for THEAD and TBODY (in 1.0, just used TBODY, restructured in 1.1)
-               - IF UPGRADING FROM FULLCALENDAR 1.0, YOU MUST UPGRADE FULLCALENDAR.CSS
-                 !!!!!!!!!!!
-                 
index 92fe47f2029408792e7fd9adb9c0f0ec833c9667..7a3f399238999d146ab481201450aec3a7ea33ec 100644 (file)
 /*!
- * FullCalendar v1.6.4 Stylesheet
- * Docs & License: http://arshaw.com/fullcalendar/
- * (c) 2013 Adam Shaw
+ * FullCalendar v3.0.1 Stylesheet
+ * Docs & License: http://fullcalendar.io/
+ * (c) 2016 Adam Shaw
  */
 
 
 .fc {
        direction: ltr;
        text-align: left;
-       }
-       
-.fc table {
-       border-collapse: collapse;
-       border-spacing: 0;
-       }
-       
-html .fc,
-.fc table {
-       font-size: 1em;
-       }
-       
-.fc td,
-.fc th {
-       padding: 0;
-       vertical-align: top;
-       }
+}
 
+.fc-rtl {
+       text-align: right;
+}
 
+body .fc { /* extra precedence to overcome jqui */
+       font-size: 1em;
+}
 
-/* Header
-------------------------------------------------------------------------*/
 
-.fc-header td {
-       white-space: nowrap;
-       }
+/* Colors
+--------------------------------------------------------------------------------------------------*/
 
-.fc-header-left {
-       width: 25%;
-       text-align: left;
-       }
-       
-.fc-header-center {
-       text-align: center;
-       }
-       
-.fc-header-right {
-       width: 25%;
-       text-align: right;
-       }
-       
-.fc-header-title {
-       display: inline-block;
-       vertical-align: top;
-       }
-       
-.fc-header-title h2 {
-       margin-top: 0;
-       white-space: nowrap;
-       }
-       
-.fc .fc-header-space {
-       padding-left: 10px;
-       }
-       
-.fc-header .fc-button {
-       margin-bottom: 1em;
-       vertical-align: top;
-       }
-       
-/* buttons edges butting together */
+.fc-unthemed th,
+.fc-unthemed td,
+.fc-unthemed thead,
+.fc-unthemed tbody,
+.fc-unthemed .fc-divider,
+.fc-unthemed .fc-row,
+.fc-unthemed .fc-content, /* for gutter border */
+.fc-unthemed .fc-popover,
+.fc-unthemed .fc-list-view,
+.fc-unthemed .fc-list-heading td {
+       border-color: #ddd;
+}
 
-.fc-header .fc-button {
-       margin-right: -1px;
-       }
-       
-.fc-header .fc-corner-right,  /* non-theme */
-.fc-header .ui-corner-right { /* theme */
-       margin-right: 0; /* back to normal */
-       }
-       
-/* button layering (for border precedence) */
-       
-.fc-header .fc-state-hover,
-.fc-header .ui-state-hover {
-       z-index: 2;
-       }
-       
-.fc-header .fc-state-down {
-       z-index: 3;
-       }
+.fc-unthemed .fc-popover {
+       background-color: #fff;
+}
 
-.fc-header .fc-state-active,
-.fc-header .ui-state-active {
-       z-index: 4;
-       }
-       
-       
-       
-/* Content
-------------------------------------------------------------------------*/
-       
-.fc-content {
-       clear: both;
-       zoom: 1; /* for IE7, gives accurate coordinates for [un]freezeContentHeight */
-       }
-       
-.fc-view {
-       width: 100%;
-       overflow: hidden;
-       }
-       
-       
+.fc-unthemed .fc-divider,
+.fc-unthemed .fc-popover .fc-header,
+.fc-unthemed .fc-list-heading td {
+       background: #eee;
+}
 
-/* Cell Styles
-------------------------------------------------------------------------*/
+.fc-unthemed .fc-popover .fc-header .fc-close {
+       color: #666;
+}
 
-.fc-widget-header,    /* <th>, usually */
-.fc-widget-content {  /* <td>, usually */
-       border: 1px solid #ddd;
-       }
-       
-.fc-state-highlight { /* <td> today cell */ /* TODO: add .fc-today to <th> */
+.fc-unthemed .fc-today {
        background: #fcf8e3;
-       }
-       
-.fc-cell-overlay { /* semi-transparent rectangle while dragging */
+}
+
+.fc-highlight { /* when user is selecting cells */
        background: #bce8f1;
        opacity: .3;
-       filter: alpha(opacity=30); /* for IE */
+}
+
+.fc-bgevent { /* default look for background events */
+       background: rgb(143, 223, 130);
+       opacity: .3;
+}
+
+.fc-nonbusiness { /* default look for non-business-hours areas */
+       /* will inherit .fc-bgevent's styles */
+       background: #d7d7d7;
+}
+
+
+/* Icons (inline elements with styled text that mock arrow icons)
+--------------------------------------------------------------------------------------------------*/
+
+.fc-icon {
+       display: inline-block;
+       height: 1em;
+       line-height: 1em;
+       font-size: 1em;
+       text-align: center;
+       overflow: hidden;
+       font-family: "Courier New", Courier, monospace;
+
+       /* don't allow browser text-selection */
+       -webkit-touch-callout: none;
+       -webkit-user-select: none;
+       -khtml-user-select: none;
+       -moz-user-select: none;
+       -ms-user-select: none;
+       user-select: none;
        }
-       
 
+/*
+Acceptable font-family overrides for individual icons:
+       "Arial", sans-serif
+       "Times New Roman", serif
 
-/* Buttons
-------------------------------------------------------------------------*/
+NOTE: use percentage font sizes or else old IE chokes
+*/
 
-.fc-button {
+.fc-icon:after {
        position: relative;
-       display: inline-block;
+}
+
+.fc-icon-left-single-arrow:after {
+       content: "\02039";
+       font-weight: bold;
+       font-size: 200%;
+       top: -7%;
+}
+
+.fc-icon-right-single-arrow:after {
+       content: "\0203A";
+       font-weight: bold;
+       font-size: 200%;
+       top: -7%;
+}
+
+.fc-icon-left-double-arrow:after {
+       content: "\000AB";
+       font-size: 160%;
+       top: -7%;
+}
+
+.fc-icon-right-double-arrow:after {
+       content: "\000BB";
+       font-size: 160%;
+       top: -7%;
+}
+
+.fc-icon-left-triangle:after {
+       content: "\25C4";
+       font-size: 125%;
+       top: 3%;
+}
+
+.fc-icon-right-triangle:after {
+       content: "\25BA";
+       font-size: 125%;
+       top: 3%;
+}
+
+.fc-icon-down-triangle:after {
+       content: "\25BC";
+       font-size: 125%;
+       top: 2%;
+}
+
+.fc-icon-x:after {
+       content: "\000D7";
+       font-size: 200%;
+       top: 6%;
+}
+
+
+/* Buttons (styled <button> tags, normalized to work cross-browser)
+--------------------------------------------------------------------------------------------------*/
+
+.fc button {
+       /* force height to include the border and padding */
+       -moz-box-sizing: border-box;
+       -webkit-box-sizing: border-box;
+       box-sizing: border-box;
+
+       /* dimensions */
+       margin: 0;
+       height: 2.1em;
        padding: 0 .6em;
-       overflow: hidden;
-       height: 1.9em;
-       line-height: 1.9em;
+
+       /* text & cursor */
+       font-size: 1em; /* normalize */
        white-space: nowrap;
        cursor: pointer;
-       }
+}
+
+/* Firefox has an annoying inner border */
+.fc button::-moz-focus-inner { margin: 0; padding: 0; }
        
 .fc-state-default { /* non-theme */
        border: 1px solid;
-       }
+}
 
 .fc-state-default.fc-corner-left { /* non-theme */
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
-       }
+}
 
 .fc-state-default.fc-corner-right { /* non-theme */
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
-       }
-
-/*
-       Our default prev/next buttons use HTML entities like &lsaquo; &rsaquo; &laquo; &raquo;
-       and we'll try to make them look good cross-browser.
-*/
+}
 
-.fc-text-arrow {
-       margin: 0 .1em;
-       font-size: 2em;
-       font-family: "Courier New", Courier, monospace;
-       vertical-align: baseline; /* for IE7 */
-       }
+/* icons in buttons */
 
-.fc-button-prev .fc-text-arrow,
-.fc-button-next .fc-text-arrow { /* for &lsaquo; &rsaquo; */
-       font-weight: bold;
-       }
-       
-/* icon (for jquery ui) */
-       
-.fc-button .fc-icon-wrap {
-       position: relative;
-       float: left;
-       top: 50%;
-       }
-       
-.fc-button .ui-icon {
+.fc button .fc-icon { /* non-theme */
        position: relative;
-       float: left;
-       margin-top: -50%;
-       *margin-top: 0;
-       *top: -50%;
-       }
+       top: -0.05em; /* seems to be a good adjustment across browsers */
+       margin: 0 .2em;
+       vertical-align: middle;
+}
        
 /*
   button states
@@ -211,7 +217,7 @@ html .fc,
        color: #333;
        text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-       }
+}
 
 .fc-state-hover,
 .fc-state-down,
@@ -219,7 +225,7 @@ html .fc,
 .fc-state-disabled {
        color: #333333;
        background-color: #e6e6e6;
-       }
+}
 
 .fc-state-hover {
        color: #333333;
@@ -229,361 +235,1163 @@ html .fc,
           -moz-transition: background-position 0.1s linear;
             -o-transition: background-position 0.1s linear;
                transition: background-position 0.1s linear;
-       }
+}
 
 .fc-state-down,
 .fc-state-active {
        background-color: #cccccc;
        background-image: none;
-       outline: 0;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-       }
+}
 
 .fc-state-disabled {
        cursor: default;
        background-image: none;
        opacity: 0.65;
-       filter: alpha(opacity=65);
        box-shadow: none;
-       }
+}
 
-       
 
-/* Global Event Styles
-------------------------------------------------------------------------*/
+/* Buttons Groups
+--------------------------------------------------------------------------------------------------*/
 
-.fc-event-container > * {
-       z-index: 8;
-       }
+.fc-button-group {
+       display: inline-block;
+}
 
-.fc-event-container > .ui-draggable-dragging,
-.fc-event-container > .ui-resizable-resizing {
-       z-index: 9;
-       }
-        
-.fc-event {
-       border: 1px solid #3a87ad; /* default BORDER color */
-       background-color: #3a87ad; /* default BACKGROUND color */
-       color: #fff;               /* default TEXT color */
-       font-size: .85em;
-       cursor: default;
-       }
+/*
+every button that is not first in a button group should scootch over one pixel and cover the
+previous button's border...
+*/
 
-a.fc-event {
-       text-decoration: none;
-       }
-       
-a.fc-event,
-.fc-event-draggable {
-       cursor: pointer;
-       }
-       
-.fc-rtl .fc-event {
-       text-align: right;
-       }
+.fc .fc-button-group > * { /* extra precedence b/c buttons have margin set to zero */
+       float: left;
+       margin: 0 0 0 -1px;
+}
 
-.fc-event-inner {
-       width: 100%;
-       height: 100%;
-       overflow: hidden;
-       }
-       
-.fc-event-time,
-.fc-event-title {
-       padding: 0 1px;
-       }
-       
-.fc .ui-resizable-handle {
-       display: block;
-       position: absolute;
-       z-index: 99999;
-       overflow: hidden; /* hacky spaces (IE6/7) */
-       font-size: 300%;  /* */
-       line-height: 50%; /* */
-       }
-       
-       
-       
-/* Horizontal Events
-------------------------------------------------------------------------*/
+.fc .fc-button-group > :first-child { /* same */
+       margin-left: 0;
+}
 
-.fc-event-hori {
-       border-width: 1px 0;
-       margin-bottom: 1px;
-       }
 
-.fc-ltr .fc-event-hori.fc-event-start,
-.fc-rtl .fc-event-hori.fc-event-end {
-       border-left-width: 1px;
-       border-top-left-radius: 3px;
-       border-bottom-left-radius: 3px;
-       }
+/* Popover
+--------------------------------------------------------------------------------------------------*/
 
-.fc-ltr .fc-event-hori.fc-event-end,
-.fc-rtl .fc-event-hori.fc-event-start {
-       border-right-width: 1px;
-       border-top-right-radius: 3px;
-       border-bottom-right-radius: 3px;
-       }
-       
-/* resizable */
-       
-.fc-event-hori .ui-resizable-e {
-       top: 0           !important; /* importants override pre jquery ui 1.7 styles */
-       right: -3px      !important;
-       width: 7px       !important;
-       height: 100%     !important;
-       cursor: e-resize;
-       }
-       
-.fc-event-hori .ui-resizable-w {
-       top: 0           !important;
-       left: -3px       !important;
-       width: 7px       !important;
-       height: 100%     !important;
-       cursor: w-resize;
-       }
-       
-.fc-event-hori .ui-resizable-handle {
-       _padding-bottom: 14px; /* IE6 had 0 height */
-       }
-       
-       
-       
-/* Reusable Separate-border Table
-------------------------------------------------------------*/
+.fc-popover {
+       position: absolute;
+       box-shadow: 0 2px 6px rgba(0,0,0,.15);
+}
 
-table.fc-border-separate {
-       border-collapse: separate;
-       }
-       
-.fc-border-separate th,
-.fc-border-separate td {
-       border-width: 1px 0 0 1px;
-       }
-       
-.fc-border-separate th.fc-last,
-.fc-border-separate td.fc-last {
-       border-right-width: 1px;
-       }
-       
-.fc-border-separate tr.fc-last th,
-.fc-border-separate tr.fc-last td {
-       border-bottom-width: 1px;
-       }
-       
-.fc-border-separate tbody tr.fc-first td,
-.fc-border-separate tbody tr.fc-first th {
-       border-top-width: 0;
-       }
-       
-       
+.fc-popover .fc-header { /* TODO: be more consistent with fc-head/fc-body */
+       padding: 2px 4px;
+}
 
-/* Month View, Basic Week View, Basic Day View
-------------------------------------------------------------------------*/
+.fc-popover .fc-header .fc-title {
+       margin: 0 2px;
+}
 
-.fc-grid th {
-       text-align: center;
-       }
+.fc-popover .fc-header .fc-close {
+       cursor: pointer;
+}
 
-.fc .fc-week-number {
-       width: 22px;
-       text-align: center;
-       }
+.fc-ltr .fc-popover .fc-header .fc-title,
+.fc-rtl .fc-popover .fc-header .fc-close {
+       float: left;
+}
 
-.fc .fc-week-number div {
-       padding: 0 2px;
-       }
-       
-.fc-grid .fc-day-number {
+.fc-rtl .fc-popover .fc-header .fc-title,
+.fc-ltr .fc-popover .fc-header .fc-close {
        float: right;
-       padding: 0 2px;
-       }
-       
-.fc-grid .fc-other-month .fc-day-number {
-       opacity: 0.3;
-       filter: alpha(opacity=30); /* for IE */
-       /* opacity with small font can sometimes look too faded
-          might want to set the 'color' property instead
-          making day-numbers bold also fixes the problem */
-       }
-       
-.fc-grid .fc-day-content {
+}
+
+/* unthemed */
+
+.fc-unthemed .fc-popover {
+       border-width: 1px;
+       border-style: solid;
+}
+
+.fc-unthemed .fc-popover .fc-header .fc-close {
+       font-size: .9em;
+       margin-top: 2px;
+}
+
+/* jqui themed */
+
+.fc-popover > .ui-widget-header + .ui-widget-content {
+       border-top: 0; /* where they meet, let the header have the border */
+}
+
+
+/* Misc Reusable Components
+--------------------------------------------------------------------------------------------------*/
+
+.fc-divider {
+       border-style: solid;
+       border-width: 1px;
+}
+
+hr.fc-divider {
+       height: 0;
+       margin: 0;
+       padding: 0 0 2px; /* height is unreliable across browsers, so use padding */
+       border-width: 1px 0;
+}
+
+.fc-clear {
        clear: both;
-       padding: 2px 2px 1px; /* distance between events and day edges */
-       }
-       
-/* event styles */
-       
-.fc-grid .fc-event-time {
-       font-weight: bold;
-       }
-       
-/* right-to-left */
-       
-.fc-rtl .fc-grid .fc-day-number {
-       float: left;
-       }
-       
-.fc-rtl .fc-grid .fc-event-time {
-       float: right;
-       }
-       
-       
+}
 
-/* Agenda Week View, Agenda Day View
-------------------------------------------------------------------------*/
+.fc-bg,
+.fc-bgevent-skeleton,
+.fc-highlight-skeleton,
+.fc-helper-skeleton {
+       /* these element should always cling to top-left/right corners */
+       position: absolute;
+       top: 0;
+       left: 0;
+       right: 0;
+}
 
-.fc-agenda table {
-       border-collapse: separate;
-       }
-       
-.fc-agenda-days th {
-       text-align: center;
-       }
-       
-.fc-agenda .fc-agenda-axis {
-       width: 50px;
-       padding: 0 4px;
-       vertical-align: middle;
-       text-align: right;
-       white-space: nowrap;
-       font-weight: normal;
-       }
+.fc-bg {
+       bottom: 0; /* strech bg to bottom edge */
+}
 
-.fc-agenda .fc-week-number {
-       font-weight: bold;
-       }
-       
-.fc-agenda .fc-day-content {
-       padding: 2px 2px 1px;
-       }
-       
-/* make axis border take precedence */
-       
-.fc-agenda-days .fc-agenda-axis {
-       border-right-width: 1px;
-       }
-       
-.fc-agenda-days .fc-col0 {
+.fc-bg table {
+       height: 100%; /* strech bg to bottom edge */
+}
+
+
+/* Tables
+--------------------------------------------------------------------------------------------------*/
+
+.fc table {
+       width: 100%;
+       box-sizing: border-box; /* fix scrollbar issue in firefox */
+       table-layout: fixed;
+       border-collapse: collapse;
+       border-spacing: 0;
+       font-size: 1em; /* normalize cross-browser */
+}
+
+.fc th {
+       text-align: center;
+}
+
+.fc th,
+.fc td {
+       border-style: solid;
+       border-width: 1px;
+       padding: 0;
+       vertical-align: top;
+}
+
+.fc td.fc-today {
+       border-style: double; /* overcome neighboring borders */
+}
+
+
+/* Internal Nav Links
+--------------------------------------------------------------------------------------------------*/
+
+a[data-goto] {
+       cursor: pointer;
+}
+
+a[data-goto]:hover {
+       text-decoration: underline;
+}
+
+
+/* Fake Table Rows
+--------------------------------------------------------------------------------------------------*/
+
+.fc .fc-row { /* extra precedence to overcome themes w/ .ui-widget-content forcing a 1px border */
+       /* no visible border by default. but make available if need be (scrollbar width compensation) */
+       border-style: solid;
+       border-width: 0;
+}
+
+.fc-row table {
+       /* don't put left/right border on anything within a fake row.
+          the outer tbody will worry about this */
+       border-left: 0 hidden transparent;
+       border-right: 0 hidden transparent;
+
+       /* no bottom borders on rows */
+       border-bottom: 0 hidden transparent; 
+}
+
+.fc-row:first-child table {
+       border-top: 0 hidden transparent; /* no top border on first row */
+}
+
+
+/* Day Row (used within the header and the DayGrid)
+--------------------------------------------------------------------------------------------------*/
+
+.fc-row {
+       position: relative;
+}
+
+.fc-row .fc-bg {
+       z-index: 1;
+}
+
+/* highlighting cells & background event skeleton */
+
+.fc-row .fc-bgevent-skeleton,
+.fc-row .fc-highlight-skeleton {
+       bottom: 0; /* stretch skeleton to bottom of row */
+}
+
+.fc-row .fc-bgevent-skeleton table,
+.fc-row .fc-highlight-skeleton table {
+       height: 100%; /* stretch skeleton to bottom of row */
+}
+
+.fc-row .fc-highlight-skeleton td,
+.fc-row .fc-bgevent-skeleton td {
+       border-color: transparent;
+}
+
+.fc-row .fc-bgevent-skeleton {
+       z-index: 2;
+
+}
+
+.fc-row .fc-highlight-skeleton {
+       z-index: 3;
+}
+
+/*
+row content (which contains day/week numbers and events) as well as "helper" (which contains
+temporary rendered events).
+*/
+
+.fc-row .fc-content-skeleton {
+       position: relative;
+       z-index: 4;
+       padding-bottom: 2px; /* matches the space above the events */
+}
+
+.fc-row .fc-helper-skeleton {
+       z-index: 5;
+}
+
+.fc-row .fc-content-skeleton td,
+.fc-row .fc-helper-skeleton td {
+       /* see-through to the background below */
+       background: none; /* in case <td>s are globally styled */
+       border-color: transparent;
+
+       /* don't put a border between events and/or the day number */
+       border-bottom: 0;
+}
+
+.fc-row .fc-content-skeleton tbody td, /* cells with events inside (so NOT the day number cell) */
+.fc-row .fc-helper-skeleton tbody td {
+       /* don't put a border between event cells */
+       border-top: 0;
+}
+
+
+/* Scrolling Container
+--------------------------------------------------------------------------------------------------*/
+
+.fc-scroller {
+       -webkit-overflow-scrolling: touch;
+}
+
+/* TODO: move to agenda/basic */
+.fc-scroller > .fc-day-grid,
+.fc-scroller > .fc-time-grid {
+       position: relative; /* re-scope all positions */
+       width: 100%; /* hack to force re-sizing this inner element when scrollbars appear/disappear */
+}
+
+
+/* Global Event Styles
+--------------------------------------------------------------------------------------------------*/
+
+.fc-event {
+       position: relative; /* for resize handle and other inner positioning */
+       display: block; /* make the <a> tag block */
+       font-size: .85em;
+       line-height: 1.3;
+       border-radius: 3px;
+       border: 1px solid #3a87ad; /* default BORDER color */
+       font-weight: normal; /* undo jqui's ui-widget-header bold */
+}
+
+.fc-event,
+.fc-event-dot {
+       background-color: #3a87ad; /* default BACKGROUND color */
+}
+
+/* overpower some of bootstrap's and jqui's styles on <a> tags */
+.fc-event,
+.fc-event:hover,
+.ui-widget .fc-event {
+       color: #fff; /* default TEXT color */
+       text-decoration: none; /* if <a> has an href */
+}
+
+.fc-event[href],
+.fc-event.fc-draggable {
+       cursor: pointer; /* give events with links and draggable events a hand mouse pointer */
+}
+
+.fc-not-allowed, /* causes a "warning" cursor. applied on body */
+.fc-not-allowed .fc-event { /* to override an event's custom cursor */
+       cursor: not-allowed;
+}
+
+.fc-event .fc-bg { /* the generic .fc-bg already does position */
+       z-index: 1;
+       background: #fff;
+       opacity: .25;
+}
+
+.fc-event .fc-content {
+       position: relative;
+       z-index: 2;
+}
+
+/* resizer (cursor AND touch devices) */
+
+.fc-event .fc-resizer {
+       position: absolute;
+       z-index: 4;
+}
+
+/* resizer (touch devices) */
+
+.fc-event .fc-resizer {
+       display: none;
+}
+
+.fc-event.fc-allow-mouse-resize .fc-resizer,
+.fc-event.fc-selected .fc-resizer {
+       /* only show when hovering or selected (with touch) */
+       display: block;
+}
+
+/* hit area */
+
+.fc-event.fc-selected .fc-resizer:before {
+       /* 40x40 touch area */
+       content: "";
+       position: absolute;
+       z-index: 9999; /* user of this util can scope within a lower z-index */
+       top: 50%;
+       left: 50%;
+       width: 40px;
+       height: 40px;
+       margin-left: -20px;
+       margin-top: -20px;
+}
+
+
+/* Event Selection (only for touch devices)
+--------------------------------------------------------------------------------------------------*/
+
+.fc-event.fc-selected {
+       z-index: 9999 !important; /* overcomes inline z-index */
+       box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
+}
+
+.fc-event.fc-selected.fc-dragging {
+       box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
+}
+
+
+/* Horizontal Events
+--------------------------------------------------------------------------------------------------*/
+
+/* bigger touch area when selected */
+.fc-h-event.fc-selected:before {
+       content: "";
+       position: absolute;
+       z-index: 3; /* below resizers */
+       top: -10px;
+       bottom: -10px;
+       left: 0;
+       right: 0;
+}
+
+/* events that are continuing to/from another week. kill rounded corners and butt up against edge */
+
+.fc-ltr .fc-h-event.fc-not-start,
+.fc-rtl .fc-h-event.fc-not-end {
+       margin-left: 0;
        border-left-width: 0;
-       }
-       
-/* all-day area */
-       
-.fc-agenda-allday th {
-       border-width: 0 1px;
-       }
-       
-.fc-agenda-allday .fc-day-content {
-       min-height: 34px; /* TODO: doesnt work well in quirksmode */
-       _height: 34px;
-       }
-       
-/* divider (between all-day and slots) */
-       
-.fc-agenda-divider-inner {
-       height: 2px;
+       padding-left: 1px; /* replace the border with padding */
+       border-top-left-radius: 0;
+       border-bottom-left-radius: 0;
+}
+
+.fc-ltr .fc-h-event.fc-not-end,
+.fc-rtl .fc-h-event.fc-not-start {
+       margin-right: 0;
+       border-right-width: 0;
+       padding-right: 1px; /* replace the border with padding */
+       border-top-right-radius: 0;
+       border-bottom-right-radius: 0;
+}
+
+/* resizer (cursor AND touch devices) */
+
+/* left resizer  */
+.fc-ltr .fc-h-event .fc-start-resizer,
+.fc-rtl .fc-h-event .fc-end-resizer {
+       cursor: w-resize;
+       left: -1px; /* overcome border */
+}
+
+/* right resizer */
+.fc-ltr .fc-h-event .fc-end-resizer,
+.fc-rtl .fc-h-event .fc-start-resizer {
+       cursor: e-resize;
+       right: -1px; /* overcome border */
+}
+
+/* resizer (mouse devices) */
+
+.fc-h-event.fc-allow-mouse-resize .fc-resizer {
+       width: 7px;
+       top: -1px; /* overcome top border */
+       bottom: -1px; /* overcome bottom border */
+}
+
+/* resizer (touch devices) */
+
+.fc-h-event.fc-selected .fc-resizer {
+       /* 8x8 little dot */
+       border-radius: 4px;
+       border-width: 1px;
+       width: 6px;
+       height: 6px;
+       border-style: solid;
+       border-color: inherit;
+       background: #fff;
+       /* vertically center */
+       top: 50%;
+       margin-top: -4px;
+}
+
+/* left resizer  */
+.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,
+.fc-rtl .fc-h-event.fc-selected .fc-end-resizer {
+       margin-left: -4px; /* centers the 8x8 dot on the left edge */
+}
+
+/* right resizer */
+.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,
+.fc-rtl .fc-h-event.fc-selected .fc-start-resizer {
+       margin-right: -4px; /* centers the 8x8 dot on the right edge */
+}
+
+
+/* DayGrid events
+----------------------------------------------------------------------------------------------------
+We use the full "fc-day-grid-event" class instead of using descendants because the event won't
+be a descendant of the grid when it is being dragged.
+*/
+
+.fc-day-grid-event {
+       margin: 1px 2px 0; /* spacing between events and edges */
+       padding: 0 1px;
+}
+
+tr:first-child > td > .fc-day-grid-event {
+       margin-top: 2px; /* a little bit more space before the first event */
+}
+
+.fc-day-grid-event.fc-selected:after {
+       content: "";
+       position: absolute;
+       z-index: 1; /* same z-index as fc-bg, behind text */
+       /* overcome the borders */
+       top: -1px;
+       right: -1px;
+       bottom: -1px;
+       left: -1px;
+       /* darkening effect */
+       background: #000;
+       opacity: .25;
+}
+
+.fc-day-grid-event .fc-content { /* force events to be one-line tall */
+       white-space: nowrap;
        overflow: hidden;
-       }
-       
-.fc-widget-header .fc-agenda-divider-inner {
-       background: #eee;
-       }
-       
-/* slot rows */
-       
-.fc-agenda-slots th {
-       border-width: 1px 1px 0;
-       }
-       
-.fc-agenda-slots td {
-       border-width: 1px 0 0;
-       background: none;
-       }
-       
-.fc-agenda-slots td div {
-       height: 20px;
-       }
-       
-.fc-agenda-slots tr.fc-slot0 th,
-.fc-agenda-slots tr.fc-slot0 td {
-       border-top-width: 0;
-       }
+}
 
-.fc-agenda-slots tr.fc-minor th,
-.fc-agenda-slots tr.fc-minor td {
-       border-top-style: dotted;
-       }
+.fc-day-grid-event .fc-time {
+       font-weight: bold;
+}
+
+/* resizer (cursor devices) */
+
+/* left resizer  */
+.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,
+.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer {
+       margin-left: -2px; /* to the day cell's edge */
+}
+
+/* right resizer */
+.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,
+.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer {
+       margin-right: -2px; /* to the day cell's edge */
+}
+
+
+/* Event Limiting
+--------------------------------------------------------------------------------------------------*/
+
+/* "more" link that represents hidden events */
+
+a.fc-more {
+       margin: 1px 3px;
+       font-size: .85em;
+       cursor: pointer;
+       text-decoration: none;
+}
+
+a.fc-more:hover {
+       text-decoration: underline;
+}
+
+.fc-limited { /* rows and cells that are hidden because of a "more" link */
+       display: none;
+}
+
+/* popover that appears when "more" link is clicked */
+
+.fc-day-grid .fc-row {
+       z-index: 1; /* make the "more" popover one higher than this */
+}
+
+.fc-more-popover {
+       z-index: 2;
+       width: 220px;
+}
+
+.fc-more-popover .fc-event-container {
+       padding: 10px;
+}
+
+
+/* Now Indicator
+--------------------------------------------------------------------------------------------------*/
+
+.fc-now-indicator {
+       position: absolute;
+       border: 0 solid red;
+}
+
+
+/* Utilities
+--------------------------------------------------------------------------------------------------*/
+
+.fc-unselectable {
+       -webkit-user-select: none;
+        -khtml-user-select: none;
+          -moz-user-select: none;
+           -ms-user-select: none;
+               user-select: none;
+       -webkit-touch-callout: none;
+       -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+
+
+/* Toolbar
+--------------------------------------------------------------------------------------------------*/
+
+.fc-toolbar {
+       text-align: center;
+       margin-bottom: 1em;
+}
+
+.fc-toolbar .fc-left {
+       float: left;
+}
+
+.fc-toolbar .fc-right {
+       float: right;
+}
+
+.fc-toolbar .fc-center {
+       display: inline-block;
+}
+
+/* the things within each left/right/center section */
+.fc .fc-toolbar > * > * { /* extra precedence to override button border margins */
+       float: left;
+       margin-left: .75em;
+}
+
+/* the first thing within each left/center/right section */
+.fc .fc-toolbar > * > :first-child { /* extra precedence to override button border margins */
+       margin-left: 0;
+}
        
-.fc-agenda-slots tr.fc-minor th.ui-widget-header {
-       *border-top-style: solid; /* doesn't work with background in IE6/7 */
-       }
+/* title text */
+
+.fc-toolbar h2 {
+       margin: 0;
+}
+
+/* button layering (for border precedence) */
+
+.fc-toolbar button {
+       position: relative;
+}
+
+.fc-toolbar .fc-state-hover,
+.fc-toolbar .ui-state-hover {
+       z-index: 2;
+}
        
+.fc-toolbar .fc-state-down {
+       z-index: 3;
+}
 
+.fc-toolbar .fc-state-active,
+.fc-toolbar .ui-state-active {
+       z-index: 4;
+}
 
-/* Vertical Events
-------------------------------------------------------------------------*/
+.fc-toolbar button:focus {
+       z-index: 5;
+}
 
-.fc-event-vert {
-       border-width: 0 1px;
-       }
 
-.fc-event-vert.fc-event-start {
-       border-top-width: 1px;
-       border-top-left-radius: 3px;
-       border-top-right-radius: 3px;
-       }
+/* View Structure
+--------------------------------------------------------------------------------------------------*/
 
-.fc-event-vert.fc-event-end {
-       border-bottom-width: 1px;
-       border-bottom-left-radius: 3px;
-       border-bottom-right-radius: 3px;
-       }
-       
-.fc-event-vert .fc-event-time {
+/* undo twitter bootstrap's box-sizing rules. normalizes positioning techniques */
+/* don't do this for the toolbar because we'll want bootstrap to style those buttons as some pt */
+.fc-view-container *,
+.fc-view-container *:before,
+.fc-view-container *:after {
+       -webkit-box-sizing: content-box;
+          -moz-box-sizing: content-box;
+               box-sizing: content-box;
+}
+
+.fc-view, /* scope positioning and z-index's for everything within the view */
+.fc-view > table { /* so dragged elements can be above the view's main element */
+       position: relative;
+       z-index: 1;
+}
+
+
+
+/* BasicView
+--------------------------------------------------------------------------------------------------*/
+
+/* day row structure */
+
+.fc-basicWeek-view .fc-content-skeleton,
+.fc-basicDay-view .fc-content-skeleton {
+       /* there may be week numbers in these views, so no padding-top */
+       padding-bottom: 1em; /* ensure a space at bottom of cell for user selecting/clicking */
+}
+
+.fc-basic-view .fc-body .fc-row {
+       min-height: 4em; /* ensure that all rows are at least this tall */
+}
+
+/* a "rigid" row will take up a constant amount of height because content-skeleton is absolute */
+
+.fc-row.fc-rigid {
+       overflow: hidden;
+}
+
+.fc-row.fc-rigid .fc-content-skeleton {
+       position: absolute;
+       top: 0;
+       left: 0;
+       right: 0;
+}
+
+/* week and day number styling */
+
+.fc-day-top.fc-other-month {
+       opacity: 0.3;
+}
+
+.fc-basic-view .fc-week-number,
+.fc-basic-view .fc-day-number {
+       padding: 2px;
+}
+
+.fc-basic-view th.fc-week-number,
+.fc-basic-view th.fc-day-number {
+       padding: 0 2px; /* column headers can't have as much v space */
+}
+
+.fc-ltr .fc-basic-view .fc-day-top .fc-day-number { float: right; }
+.fc-rtl .fc-basic-view .fc-day-top .fc-day-number { float: left; }
+
+.fc-ltr .fc-basic-view .fc-day-top .fc-week-number { float: left; border-radius: 0 0 3px 0; }
+.fc-rtl .fc-basic-view .fc-day-top .fc-week-number { float: right; border-radius: 0 0 0 3px; }
+
+.fc-basic-view .fc-day-top .fc-week-number {
+       min-width: 1.5em;
+       text-align: center;
+       background-color: #f2f2f2;
+       color: #808080;
+}
+
+/* when week/day number have own column */
+
+.fc-basic-view td.fc-week-number {
+       text-align: center;
+}
+
+.fc-basic-view td.fc-week-number > * {
+       /* work around the way we do column resizing and ensure a minimum width */
+       display: inline-block;
+       min-width: 1.25em;
+}
+
+
+/* AgendaView all-day area
+--------------------------------------------------------------------------------------------------*/
+
+.fc-agenda-view .fc-day-grid {
+       position: relative;
+       z-index: 2; /* so the "more.." popover will be over the time grid */
+}
+
+.fc-agenda-view .fc-day-grid .fc-row {
+       min-height: 3em; /* all-day section will never get shorter than this */
+}
+
+.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton {
+       padding-bottom: 1em; /* give space underneath events for clicking/selecting days */
+}
+
+
+/* TimeGrid axis running down the side (for both the all-day area and the slot area)
+--------------------------------------------------------------------------------------------------*/
+
+.fc .fc-axis { /* .fc to overcome default cell styles */
+       vertical-align: middle;
+       padding: 0 4px;
        white-space: nowrap;
-       font-size: 10px;
-       }
+}
+
+.fc-ltr .fc-axis {
+       text-align: right;
+}
 
-.fc-event-vert .fc-event-inner {
+.fc-rtl .fc-axis {
+       text-align: left;
+}
+
+.ui-widget td.fc-axis {
+       font-weight: normal; /* overcome jqui theme making it bold */
+}
+
+
+/* TimeGrid Structure
+--------------------------------------------------------------------------------------------------*/
+
+.fc-time-grid-container, /* so scroll container's z-index is below all-day */
+.fc-time-grid { /* so slats/bg/content/etc positions get scoped within here */
+       position: relative;
+       z-index: 1;
+}
+
+.fc-time-grid {
+       min-height: 100%; /* so if height setting is 'auto', .fc-bg stretches to fill height */
+}
+
+.fc-time-grid table { /* don't put outer borders on slats/bg/content/etc */
+       border: 0 hidden transparent;
+}
+
+.fc-time-grid > .fc-bg {
+       z-index: 1;
+}
+
+.fc-time-grid .fc-slats,
+.fc-time-grid > hr { /* the <hr> AgendaView injects when grid is shorter than scroller */
        position: relative;
        z-index: 2;
-       }
-       
-.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay  */
+}
+
+.fc-time-grid .fc-content-col {
+       position: relative; /* because now-indicator lives directly inside */
+}
+
+.fc-time-grid .fc-content-skeleton {
        position: absolute;
+       z-index: 3;
+       top: 0;
+       left: 0;
+       right: 0;
+}
+
+/* divs within a cell within the fc-content-skeleton */
+
+.fc-time-grid .fc-business-container {
+       position: relative;
        z-index: 1;
+}
+
+.fc-time-grid .fc-bgevent-container {
+       position: relative;
+       z-index: 2;
+}
+
+.fc-time-grid .fc-highlight-container {
+       position: relative;
+       z-index: 3;
+}
+
+.fc-time-grid .fc-event-container {
+       position: relative;
+       z-index: 4;
+}
+
+.fc-time-grid .fc-now-indicator-line {
+       z-index: 5;
+}
+
+.fc-time-grid .fc-helper-container { /* also is fc-event-container */
+       position: relative;
+       z-index: 6;
+}
+
+
+/* TimeGrid Slats (lines that run horizontally)
+--------------------------------------------------------------------------------------------------*/
+
+.fc-time-grid .fc-slats td {
+       height: 1.5em;
+       border-bottom: 0; /* each cell is responsible for its top border */
+}
+
+.fc-time-grid .fc-slats .fc-minor td {
+       border-top-style: dotted;
+}
+
+.fc-time-grid .fc-slats .ui-widget-content { /* for jqui theme */
+       background: none; /* see through to fc-bg */
+}
+
+
+/* TimeGrid Highlighting Slots
+--------------------------------------------------------------------------------------------------*/
+
+.fc-time-grid .fc-highlight-container { /* a div within a cell within the fc-highlight-skeleton */
+       position: relative; /* scopes the left/right of the fc-highlight to be in the column */
+}
+
+.fc-time-grid .fc-highlight {
+       position: absolute;
+       left: 0;
+       right: 0;
+       /* top and bottom will be in by JS */
+}
+
+
+/* TimeGrid Event Containment
+--------------------------------------------------------------------------------------------------*/
+
+.fc-ltr .fc-time-grid .fc-event-container { /* space on the sides of events for LTR (default) */
+       margin: 0 2.5% 0 2px;
+}
+
+.fc-rtl .fc-time-grid .fc-event-container { /* space on the sides of events for RTL */
+       margin: 0 2px 0 2.5%;
+}
+
+.fc-time-grid .fc-event,
+.fc-time-grid .fc-bgevent {
+       position: absolute;
+       z-index: 1; /* scope inner z-index's */
+}
+
+.fc-time-grid .fc-bgevent {
+       /* background events always span full width */
+       left: 0;
+       right: 0;
+}
+
+
+/* Generic Vertical Event
+--------------------------------------------------------------------------------------------------*/
+
+.fc-v-event.fc-not-start { /* events that are continuing from another day */
+       /* replace space made by the top border with padding */
+       border-top-width: 0;
+       padding-top: 1px;
+
+       /* remove top rounded corners */
+       border-top-left-radius: 0;
+       border-top-right-radius: 0;
+}
+
+.fc-v-event.fc-not-end {
+       /* replace space made by the top border with padding */
+       border-bottom-width: 0;
+       padding-bottom: 1px;
+
+       /* remove bottom rounded corners */
+       border-bottom-left-radius: 0;
+       border-bottom-right-radius: 0;
+}
+
+
+/* TimeGrid Event Styling
+----------------------------------------------------------------------------------------------------
+We use the full "fc-time-grid-event" class instead of using descendants because the event won't
+be a descendant of the grid when it is being dragged.
+*/
+
+.fc-time-grid-event {
+       overflow: hidden; /* don't let the bg flow over rounded corners */
+}
+
+.fc-time-grid-event.fc-selected {
+       /* need to allow touch resizers to extend outside event's bounding box */
+       /* common fc-selected styles hide the fc-bg, so don't need this anyway */
+       overflow: visible;
+}
+
+.fc-time-grid-event.fc-selected .fc-bg {
+       display: none; /* hide semi-white background, to appear darker */
+}
+
+.fc-time-grid-event .fc-content {
+       overflow: hidden; /* for when .fc-selected */
+}
+
+.fc-time-grid-event .fc-time,
+.fc-time-grid-event .fc-title {
+       padding: 0 1px;
+}
+
+.fc-time-grid-event .fc-time {
+       font-size: .85em;
+       white-space: nowrap;
+}
+
+/* short mode, where time and title are on the same line */
+
+.fc-time-grid-event.fc-short .fc-content {
+       /* don't wrap to second line (now that contents will be inline) */
+       white-space: nowrap;
+}
+
+.fc-time-grid-event.fc-short .fc-time,
+.fc-time-grid-event.fc-short .fc-title {
+       /* put the time and title on the same line */
+       display: inline-block;
+       vertical-align: top;
+}
+
+.fc-time-grid-event.fc-short .fc-time span {
+       display: none; /* don't display the full time text... */
+}
+
+.fc-time-grid-event.fc-short .fc-time:before {
+       content: attr(data-start); /* ...instead, display only the start time */
+}
+
+.fc-time-grid-event.fc-short .fc-time:after {
+       content: "\000A0-\000A0"; /* seperate with a dash, wrapped in nbsp's */
+}
+
+.fc-time-grid-event.fc-short .fc-title {
+       font-size: .85em; /* make the title text the same size as the time */
+       padding: 0; /* undo padding from above */
+}
+
+/* resizer (cursor device) */
+
+.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer {
+       left: 0;
+       right: 0;
+       bottom: 0;
+       height: 8px;
+       overflow: hidden;
+       line-height: 8px;
+       font-size: 11px;
+       font-family: monospace;
+       text-align: center;
+       cursor: s-resize;
+}
+
+.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after {
+       content: "=";
+}
+
+/* resizer (touch device) */
+
+.fc-time-grid-event.fc-selected .fc-resizer {
+       /* 10x10 dot */
+       border-radius: 5px;
+       border-width: 1px;
+       width: 8px;
+       height: 8px;
+       border-style: solid;
+       border-color: inherit;
+       background: #fff;
+       /* horizontally center */
+       left: 50%;
+       margin-left: -5px;
+       /* center on the bottom edge */
+       bottom: -5px;
+}
+
+
+/* Now Indicator
+--------------------------------------------------------------------------------------------------*/
+
+.fc-time-grid .fc-now-indicator-line {
+       border-top-width: 1px;
+       left: 0;
+       right: 0;
+}
+
+/* arrow on axis */
+
+.fc-time-grid .fc-now-indicator-arrow {
+       margin-top: -5px; /* vertically center on top coordinate */
+}
+
+.fc-ltr .fc-time-grid .fc-now-indicator-arrow {
+       left: 0;
+       /* triangle pointing right... */
+       border-width: 5px 0 5px 6px;
+       border-top-color: transparent;
+       border-bottom-color: transparent;
+}
+
+.fc-rtl .fc-time-grid .fc-now-indicator-arrow {
+       right: 0;
+       /* triangle pointing left... */
+       border-width: 5px 6px 5px 0;
+       border-top-color: transparent;
+       border-bottom-color: transparent;
+}
+
+
+
+/* List View
+--------------------------------------------------------------------------------------------------*/
+
+/* possibly reusable */
+
+.fc-event-dot {
+       display: inline-block;
+       width: 10px;
+       height: 10px;
+       border-radius: 5px;
+}
+
+/* view wrapper */
+
+.fc-rtl .fc-list-view {
+       direction: rtl; /* unlike core views, leverage browser RTL */
+}
+
+.fc-list-view {
+       border-width: 1px;
+       border-style: solid;
+}
+
+/* table resets */
+
+.fc .fc-list-table {
+       table-layout: auto; /* for shrinkwrapping cell content */
+}
+
+.fc-list-table td {
+       border-width: 1px 0 0;
+       padding: 8px 14px;
+}
+
+.fc-list-table tr:first-child td {
+       border-top-width: 0;
+}
+
+/* day headings with the list */
+
+.fc-list-heading {
+       border-bottom-width: 1px;
+}
+
+.fc-list-heading td {
+       font-weight: bold;
+}
+
+.fc-ltr .fc-list-heading-main { float: left; }
+.fc-ltr .fc-list-heading-alt { float: right; }
+
+.fc-rtl .fc-list-heading-main { float: right; }
+.fc-rtl .fc-list-heading-alt { float: left; }
+
+/* event list items */
+
+.fc-list-item.fc-has-url {
+       cursor: pointer; /* whole row will be clickable */
+}
+
+.fc-list-item:hover td {
+       background-color: #f5f5f5;
+}
+
+.fc-list-item-marker,
+.fc-list-item-time {
+       white-space: nowrap;
+       width: 1px;
+}
+
+/* make the dot closer to the event title */
+.fc-ltr .fc-list-item-marker { padding-right: 0; }
+.fc-rtl .fc-list-item-marker { padding-left: 0; }
+
+.fc-list-item-title a {
+       /* every event title cell has an <a> tag */
+       text-decoration: none;
+       color: inherit;
+}
+
+.fc-list-item-title a[href]:hover {
+       /* hover effect only on titles with hrefs */
+       text-decoration: underline;
+}
+
+/* message when no events */
+
+.fc-list-empty-wrap2 {
+       position: absolute;
        top: 0;
        left: 0;
+       right: 0;
+       bottom: 0;
+}
+
+.fc-list-empty-wrap1 {
        width: 100%;
        height: 100%;
-       background: #fff;
-       opacity: .25;
-       filter: alpha(opacity=25);
-       }
-       
-.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */
-.fc-select-helper .fc-event-bg {
-       display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */
-       }
-       
-/* resizable */
-       
-.fc-event-vert .ui-resizable-s {
-       bottom: 0        !important; /* importants override pre jquery ui 1.7 styles */
-       width: 100%      !important;
-       height: 8px      !important;
-       overflow: hidden !important;
-       line-height: 8px !important;
-       font-size: 11px  !important;
-       font-family: monospace;
+       display: table;
+}
+
+.fc-list-empty {
+       display: table-cell;
+       vertical-align: middle;
        text-align: center;
-       cursor: s-resize;
-       }
-       
-.fc-agenda .ui-resizable-resizing { /* TODO: better selector */
-       _overflow: hidden;
-       }
-       
-       
+}
+
+.fc-unthemed .fc-list-empty { /* theme will provide own background */
+       background-color: #eee;
+}
index 41c50856cf4f181f4cbcd34f923e9dec0eabe708..3c2c380bcdc52544f60cd69b6ba83a4ce1eb8b06 100644 (file)
 /*!
- * FullCalendar v1.6.4
- * Docs & License: http://arshaw.com/fullcalendar/
- * (c) 2013 Adam Shaw
+ * FullCalendar v3.0.1
+ * Docs & License: http://fullcalendar.io/
+ * (c) 2016 Adam Shaw
  */
 
-/*
- * Use fullcalendar.css for basic styling.
- * For event drag & drop, requires jQuery UI draggable.
- * For event resizing, requires jQuery UI resizable.
- */
-(function($, undefined) {
-
+(function(factory) {
+       if (typeof define === 'function' && define.amd) {
+               define([ 'jquery', 'moment' ], factory);
+       }
+       else if (typeof exports === 'object') { // Node/CommonJS
+               module.exports = factory(require('jquery'), require('moment'));
+       }
+       else {
+               factory(jQuery, moment);
+       }
+})(function($, moment) {
 
 ;;
 
-var defaults = {
+var FC = $.fullCalendar = {
+       version: "3.0.1",
+       internalApiVersion: 6
+};
+var fcViews = FC.views = {};
 
-       // display
-       defaultView: 'month',
-       aspectRatio: 1.35,
-       header: {
-               left: 'title',
-               center: '',
-               right: 'today prev,next'
-       },
-       weekends: true,
-       weekNumbers: false,
-       weekNumberCalculation: 'iso',
-       weekNumberTitle: 'W',
-       
-       // editing
-       //editable: false,
-       //disableDragging: false,
-       //disableResizing: false,
-       
-       allDayDefault: true,
-       ignoreTimezone: true,
-       
-       // event ajax
-       lazyFetching: true,
-       startParam: 'start',
-       endParam: 'end',
-       
-       // time formats
-       titleFormat: {
-               month: 'MMMM yyyy',
-               week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
-               day: 'dddd, MMM d, yyyy'
-       },
-       columnFormat: {
-               month: 'ddd',
-               week: 'ddd M/d',
-               day: 'dddd M/d'
-       },
-       timeFormat: { // for event elements
-               '': 'h(:mm)t' // default
-       },
-       
-       // locale
-       isRTL: false,
-       firstDay: 0,
-       monthNames: ['January','February','March','April','May','June','July','August','September','October','November','December'],
-       monthNamesShort: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
-       dayNames: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
-       dayNamesShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],
-       buttonText: {
-               prev: "<span class='fc-text-arrow'>&lsaquo;</span>",
-               next: "<span class='fc-text-arrow'>&rsaquo;</span>",
-               prevYear: "<span class='fc-text-arrow'>&laquo;</span>",
-               nextYear: "<span class='fc-text-arrow'>&raquo;</span>",
-               today: 'today',
-               month: 'month',
-               week: 'week',
-               day: 'day'
-       },
-       
-       // jquery-ui theming
-       theme: false,
-       buttonIcons: {
-               prev: 'circle-triangle-w',
-               next: 'circle-triangle-e'
-       },
-       
-       //selectable: false,
-       unselectAuto: true,
-       
-       dropAccept: '*',
-       
-       handleWindowResize: true
+
+$.fn.fullCalendar = function(options) {
+       var args = Array.prototype.slice.call(arguments, 1); // for a possible method call
+       var res = this; // what this function will return (this jQuery object by default)
+
+       this.each(function(i, _element) { // loop each DOM element involved
+               var element = $(_element);
+               var calendar = element.data('fullCalendar'); // get the existing calendar object (if any)
+               var singleRes; // the returned value of this single method call
+
+               // a method call
+               if (typeof options === 'string') {
+                       if (calendar && $.isFunction(calendar[options])) {
+                               singleRes = calendar[options].apply(calendar, args);
+                               if (!i) {
+                                       res = singleRes; // record the first method call result
+                               }
+                               if (options === 'destroy') { // for the destroy method, must remove Calendar object data
+                                       element.removeData('fullCalendar');
+                               }
+                       }
+               }
+               // a new calendar initialization
+               else if (!calendar) { // don't initialize twice
+                       calendar = new Calendar(element, options);
+                       element.data('fullCalendar', calendar);
+                       calendar.render();
+               }
+       });
        
+       return res;
 };
 
-// right-to-left defaults
-var rtlDefaults = {
-       header: {
-               left: 'next,prev today',
-               center: '',
-               right: 'title'
-       },
-       buttonText: {
-               prev: "<span class='fc-text-arrow'>&rsaquo;</span>",
-               next: "<span class='fc-text-arrow'>&lsaquo;</span>",
-               prevYear: "<span class='fc-text-arrow'>&raquo;</span>",
-               nextYear: "<span class='fc-text-arrow'>&laquo;</span>"
-       },
-       buttonIcons: {
-               prev: 'circle-triangle-e',
-               next: 'circle-triangle-w'
-       }
-};
+
+var complexOptions = [ // names of options that are objects whose properties should be combined
+       'header',
+       'buttonText',
+       'buttonIcons',
+       'themeButtonIcons'
+];
 
 
+// Merges an array of option objects into a single object
+function mergeOptions(optionObjs) {
+       return mergeProps(optionObjs, complexOptions);
+}
 
 ;;
 
-var fc = $.fullCalendar = { version: "1.6.4" };
-var fcViews = fc.views = {};
+// exports
+FC.intersectRanges = intersectRanges;
+FC.applyAll = applyAll;
+FC.debounce = debounce;
+FC.isInt = isInt;
+FC.htmlEscape = htmlEscape;
+FC.cssToStr = cssToStr;
+FC.proxy = proxy;
+FC.capitaliseFirstLetter = capitaliseFirstLetter;
 
 
-$.fn.fullCalendar = function(options) {
+/* FullCalendar-specific DOM Utilities
+----------------------------------------------------------------------------------------------------------------------*/
 
 
-       // method calling
-       if (typeof options == 'string') {
-               var args = Array.prototype.slice.call(arguments, 1);
-               var res;
-               this.each(function() {
-                       var calendar = $.data(this, 'fullCalendar');
-                       if (calendar && $.isFunction(calendar[options])) {
-                               var r = calendar[options].apply(calendar, args);
-                               if (res === undefined) {
-                                       res = r;
-                               }
-                               if (options == 'destroy') {
-                                       $.removeData(this, 'fullCalendar');
-                               }
-                       }
+// Given the scrollbar widths of some other container, create borders/margins on rowEls in order to match the left
+// and right space that was offset by the scrollbars. A 1-pixel border first, then margin beyond that.
+function compensateScroll(rowEls, scrollbarWidths) {
+       if (scrollbarWidths.left) {
+               rowEls.css({
+                       'border-left-width': 1,
+                       'margin-left': scrollbarWidths.left - 1
                });
-               if (res !== undefined) {
-                       return res;
-               }
-               return this;
        }
-
-       options = options || {};
-       
-       // would like to have this logic in EventManager, but needs to happen before options are recursively extended
-       var eventSources = options.eventSources || [];
-       delete options.eventSources;
-       if (options.events) {
-               eventSources.push(options.events);
-               delete options.events;
+       if (scrollbarWidths.right) {
+               rowEls.css({
+                       'border-right-width': 1,
+                       'margin-right': scrollbarWidths.right - 1
+               });
        }
-       
+}
 
-       options = $.extend(true, {},
-               defaults,
-               (options.isRTL || options.isRTL===undefined && defaults.isRTL) ? rtlDefaults : {},
-               options
-       );
-       
-       
-       this.each(function(i, _element) {
-               var element = $(_element);
-               var calendar = new Calendar(element, options, eventSources);
-               element.data('fullCalendar', calendar); // TODO: look into memory leak implications
-               calendar.render();
+
+// Undoes compensateScroll and restores all borders/margins
+function uncompensateScroll(rowEls) {
+       rowEls.css({
+               'margin-left': '',
+               'margin-right': '',
+               'border-left-width': '',
+               'border-right-width': ''
        });
-       
-       
-       return this;
-       
-};
+}
 
 
-// function for adding/overriding defaults
-function setDefaults(d) {
-       $.extend(true, defaults, d);
+// Make the mouse cursor express that an event is not allowed in the current area
+function disableCursor() {
+       $('body').addClass('fc-not-allowed');
 }
 
 
+// Returns the mouse cursor to its original look
+function enableCursor() {
+       $('body').removeClass('fc-not-allowed');
+}
 
-;;
 
-function Calendar(element, options, eventSources) {
-       var t = this;
-       
-       
-       // exports
-       t.options = options;
-       t.render = render;
-       t.destroy = destroy;
-       t.refetchEvents = refetchEvents;
-       t.reportEvents = reportEvents;
-       t.reportEventChange = reportEventChange;
-       t.rerenderEvents = rerenderEvents;
-       t.changeView = changeView;
-       t.select = select;
-       t.unselect = unselect;
-       t.prev = prev;
-       t.next = next;
-       t.prevYear = prevYear;
-       t.nextYear = nextYear;
-       t.today = today;
-       t.gotoDate = gotoDate;
-       t.incrementDate = incrementDate;
-       t.formatDate = function(format, date) { return formatDate(format, date, options) };
-       t.formatDates = function(format, date1, date2) { return formatDates(format, date1, date2, options) };
-       t.getDate = getDate;
-       t.getView = getView;
-       t.option = option;
-       t.trigger = trigger;
-       
-       
-       // imports
-       EventManager.call(t, options, eventSources);
-       var isFetchNeeded = t.isFetchNeeded;
-       var fetchEvents = t.fetchEvents;
-       
-       
-       // locals
-       var _element = element[0];
-       var header;
-       var headerElement;
-       var content;
-       var tm; // for making theme classes
-       var currentView;
-       var elementOuterWidth;
-       var suggestedViewHeight;
-       var resizeUID = 0;
-       var ignoreWindowResize = 0;
-       var date = new Date();
-       var events = [];
-       var _dragElement;
-       
-       
-       
-       /* Main Rendering
-       -----------------------------------------------------------------------------*/
-       
-       
-       setYMD(date, options.year, options.month, options.date);
-       
-       
-       function render(inc) {
-               if (!content) {
-                       initialRender();
-               }
-               else if (elementVisible()) {
-                       // mainly for the public API
-                       calcSize();
-                       _renderView(inc);
-               }
-       }
-       
-       
-       function initialRender() {
-               tm = options.theme ? 'ui' : 'fc';
-               element.addClass('fc');
-               if (options.isRTL) {
-                       element.addClass('fc-rtl');
+// Given a total available height to fill, have `els` (essentially child rows) expand to accomodate.
+// By default, all elements that are shorter than the recommended height are expanded uniformly, not considering
+// any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and 
+// reduces the available height.
+function distributeHeight(els, availableHeight, shouldRedistribute) {
+
+       // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,
+       // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.
+
+       var minOffset1 = Math.floor(availableHeight / els.length); // for non-last element
+       var minOffset2 = Math.floor(availableHeight - minOffset1 * (els.length - 1)); // for last element *FLOORING NOTE*
+       var flexEls = []; // elements that are allowed to expand. array of DOM nodes
+       var flexOffsets = []; // amount of vertical space it takes up
+       var flexHeights = []; // actual css height
+       var usedHeight = 0;
+
+       undistributeHeight(els); // give all elements their natural height
+
+       // find elements that are below the recommended height (expandable).
+       // important to query for heights in a single first pass (to avoid reflow oscillation).
+       els.each(function(i, el) {
+               var minOffset = i === els.length - 1 ? minOffset2 : minOffset1;
+               var naturalOffset = $(el).outerHeight(true);
+
+               if (naturalOffset < minOffset) {
+                       flexEls.push(el);
+                       flexOffsets.push(naturalOffset);
+                       flexHeights.push($(el).height());
                }
                else {
-                       element.addClass('fc-ltr');
-               }
-               if (options.theme) {
-                       element.addClass('ui-widget');
+                       // this element stretches past recommended height (non-expandable). mark the space as occupied.
+                       usedHeight += naturalOffset;
                }
+       });
+
+       // readjust the recommended height to only consider the height available to non-maxed-out rows.
+       if (shouldRedistribute) {
+               availableHeight -= usedHeight;
+               minOffset1 = Math.floor(availableHeight / flexEls.length);
+               minOffset2 = Math.floor(availableHeight - minOffset1 * (flexEls.length - 1)); // *FLOORING NOTE*
+       }
 
-               content = $("<div class='fc-content' style='position:relative'/>")
-                       .prependTo(element);
+       // assign heights to all expandable elements
+       $(flexEls).each(function(i, el) {
+               var minOffset = i === flexEls.length - 1 ? minOffset2 : minOffset1;
+               var naturalOffset = flexOffsets[i];
+               var naturalHeight = flexHeights[i];
+               var newHeight = minOffset - (naturalOffset - naturalHeight); // subtract the margin/padding
 
-               header = new Header(t, options);
-               headerElement = header.render();
-               if (headerElement) {
-                       element.prepend(headerElement);
+               if (naturalOffset < minOffset) { // we check this again because redistribution might have changed things
+                       $(el).height(newHeight);
                }
+       });
+}
 
-               changeView(options.defaultView);
 
-               if (options.handleWindowResize) {
-                       $(window).resize(windowResize);
-               }
+// Undoes distrubuteHeight, restoring all els to their natural height
+function undistributeHeight(els) {
+       els.height('');
+}
 
-               // needed for IE in a 0x0 iframe, b/c when it is resized, never triggers a windowResize
-               if (!bodyVisible()) {
-                       lateRender();
-               }
-       }
-       
-       
-       // called when we know the calendar couldn't be rendered when it was initialized,
-       // but we think it's ready now
-       function lateRender() {
-               setTimeout(function() { // IE7 needs this so dimensions are calculated correctly
-                       if (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once
-                               renderView();
-                       }
-               },0);
-       }
-       
-       
-       function destroy() {
 
-               if (currentView) {
-                       trigger('viewDestroy', currentView, currentView, currentView.element);
-                       currentView.triggerEventDestroy();
+// Given `els`, a jQuery set of <td> cells, find the cell with the largest natural width and set the widths of all the
+// cells to be that width.
+// PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline
+function matchCellWidths(els) {
+       var maxInnerWidth = 0;
+
+       els.find('> *').each(function(i, innerEl) {
+               var innerWidth = $(innerEl).outerWidth();
+               if (innerWidth > maxInnerWidth) {
+                       maxInnerWidth = innerWidth;
                }
+       });
 
-               $(window).unbind('resize', windowResize);
+       maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance
 
-               header.destroy();
-               content.remove();
-               element.removeClass('fc fc-rtl ui-widget');
-       }
-       
-       
-       function elementVisible() {
-               return element.is(':visible');
-       }
-       
-       
-       function bodyVisible() {
-               return $('body').is(':visible');
-       }
-       
-       
-       
-       /* View Rendering
-       -----------------------------------------------------------------------------*/
-       
+       els.width(maxInnerWidth);
 
-       function changeView(newViewName) {
-               if (!currentView || newViewName != currentView.name) {
-                       _changeView(newViewName);
-               }
-       }
+       return maxInnerWidth;
+}
 
 
-       function _changeView(newViewName) {
-               ignoreWindowResize++;
+// Given one element that resides inside another,
+// Subtracts the height of the inner element from the outer element.
+function subtractInnerElHeight(outerEl, innerEl) {
+       var both = outerEl.add(innerEl);
+       var diff;
 
-               if (currentView) {
-                       trigger('viewDestroy', currentView, currentView, currentView.element);
-                       unselect();
-                       currentView.triggerEventDestroy(); // trigger 'eventDestroy' for each event
-                       freezeContentHeight();
-                       currentView.element.remove();
-                       header.deactivateButton(currentView.name);
-               }
+       // effin' IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked
+       both.css({
+               position: 'relative', // cause a reflow, which will force fresh dimension recalculation
+               left: -1 // ensure reflow in case the el was already relative. negative is less likely to cause new scroll
+       });
+       diff = outerEl.outerHeight() - innerEl.outerHeight(); // grab the dimensions
+       both.css({ position: '', left: '' }); // undo hack
 
-               header.activateButton(newViewName);
+       return diff;
+}
 
-               currentView = new fcViews[newViewName](
-                       $("<div class='fc-view fc-view-" + newViewName + "' style='position:relative'/>")
-                               .appendTo(content),
-                       t // the calendar object
-               );
 
-               renderView();
-               unfreezeContentHeight();
+/* Element Geom Utilities
+----------------------------------------------------------------------------------------------------------------------*/
 
-               ignoreWindowResize--;
-       }
+FC.getOuterRect = getOuterRect;
+FC.getClientRect = getClientRect;
+FC.getContentRect = getContentRect;
+FC.getScrollbarWidths = getScrollbarWidths;
 
 
-       function renderView(inc) {
-               if (
-                       !currentView.start || // never rendered before
-                       inc || date < currentView.start || date >= currentView.end // or new date range
-               ) {
-                       if (elementVisible()) {
-                               _renderView(inc);
-                       }
-               }
-       }
+// borrowed from https://github.com/jquery/jquery-ui/blob/1.11.0/ui/core.js#L51
+function getScrollParent(el) {
+       var position = el.css('position'),
+               scrollParent = el.parents().filter(function() {
+                       var parent = $(this);
+                       return (/(auto|scroll)/).test(
+                               parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x')
+                       );
+               }).eq(0);
 
+       return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;
+}
 
-       function _renderView(inc) { // assumes elementVisible
-               ignoreWindowResize++;
 
-               if (currentView.start) { // already been rendered?
-                       trigger('viewDestroy', currentView, currentView, currentView.element);
-                       unselect();
-                       clearEvents();
-               }
+// Queries the outer bounding area of a jQuery element.
+// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).
+// Origin is optional.
+function getOuterRect(el, origin) {
+       var offset = el.offset();
+       var left = offset.left - (origin ? origin.left : 0);
+       var top = offset.top - (origin ? origin.top : 0);
 
-               freezeContentHeight();
-               currentView.render(date, inc || 0); // the view's render method ONLY renders the skeleton, nothing else
-               setSize();
-               unfreezeContentHeight();
-               (currentView.afterRender || noop)();
+       return {
+               left: left,
+               right: left + el.outerWidth(),
+               top: top,
+               bottom: top + el.outerHeight()
+       };
+}
 
-               updateTitle();
-               updateTodayButton();
 
-               trigger('viewRender', currentView, currentView, currentView.element);
-               currentView.trigger('viewDisplay', _element); // deprecated
+// Queries the area within the margin/border/scrollbars of a jQuery element. Does not go within the padding.
+// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).
+// Origin is optional.
+// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.
+function getClientRect(el, origin) {
+       var offset = el.offset();
+       var scrollbarWidths = getScrollbarWidths(el);
+       var left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left - (origin ? origin.left : 0);
+       var top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top - (origin ? origin.top : 0);
+
+       return {
+               left: left,
+               right: left + el[0].clientWidth, // clientWidth includes padding but NOT scrollbars
+               top: top,
+               bottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars
+       };
+}
 
-               ignoreWindowResize--;
 
-               getAndRenderEvents();
-       }
-       
-       
+// Queries the area within the margin/border/padding of a jQuery element. Assumed not to have scrollbars.
+// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).
+// Origin is optional.
+function getContentRect(el, origin) {
+       var offset = el.offset(); // just outside of border, margin not included
+       var left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -
+               (origin ? origin.left : 0);
+       var top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -
+               (origin ? origin.top : 0);
+
+       return {
+               left: left,
+               right: left + el.width(),
+               top: top,
+               bottom: top + el.height()
+       };
+}
 
-       /* Resizing
-       -----------------------------------------------------------------------------*/
-       
-       
-       function updateSize() {
-               if (elementVisible()) {
-                       unselect();
-                       clearEvents();
-                       calcSize();
-                       setSize();
-                       renderEvents();
-               }
+
+// Returns the computed left/right/top/bottom scrollbar widths for the given jQuery element.
+// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.
+function getScrollbarWidths(el) {
+       var leftRightWidth = el.innerWidth() - el[0].clientWidth; // the paddings cancel out, leaving the scrollbars
+       var widths = {
+               left: 0,
+               right: 0,
+               top: 0,
+               bottom: el.innerHeight() - el[0].clientHeight // the paddings cancel out, leaving the bottom scrollbar
+       };
+
+       if (getIsLeftRtlScrollbars() && el.css('direction') == 'rtl') { // is the scrollbar on the left side?
+               widths.left = leftRightWidth;
        }
-       
-       
-       function calcSize() { // assumes elementVisible
-               if (options.contentHeight) {
-                       suggestedViewHeight = options.contentHeight;
-               }
-               else if (options.height) {
-                       suggestedViewHeight = options.height - (headerElement ? headerElement.height() : 0) - vsides(content);
-               }
-               else {
-                       suggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5));
-               }
+       else {
+               widths.right = leftRightWidth;
        }
-       
-       
-       function setSize() { // assumes elementVisible
 
-               if (suggestedViewHeight === undefined) {
-                       calcSize(); // for first time
-                               // NOTE: we don't want to recalculate on every renderView because
-                               // it could result in oscillating heights due to scrollbars.
-               }
+       return widths;
+}
 
-               ignoreWindowResize++;
-               currentView.setHeight(suggestedViewHeight);
-               currentView.setWidth(content.width());
-               ignoreWindowResize--;
 
-               elementOuterWidth = element.outerWidth();
-       }
-       
-       
-       function windowResize() {
-               if (!ignoreWindowResize) {
-                       if (currentView.start) { // view has already been rendered
-                               var uid = ++resizeUID;
-                               setTimeout(function() { // add a delay
-                                       if (uid == resizeUID && !ignoreWindowResize && elementVisible()) {
-                                               if (elementOuterWidth != (elementOuterWidth = element.outerWidth())) {
-                                                       ignoreWindowResize++; // in case the windowResize callback changes the height
-                                                       updateSize();
-                                                       currentView.trigger('windowResize', _element);
-                                                       ignoreWindowResize--;
-                                               }
-                                       }
-                               }, 200);
-                       }else{
-                               // calendar must have been initialized in a 0x0 iframe that has just been resized
-                               lateRender();
-                       }
-               }
-       }
-       
-       
-       
-       /* Event Fetching/Rendering
-       -----------------------------------------------------------------------------*/
-       // TODO: going forward, most of this stuff should be directly handled by the view
+// Logic for determining if, when the element is right-to-left, the scrollbar appears on the left side
 
+var _isLeftRtlScrollbars = null;
 
-       function refetchEvents() { // can be called as an API method
-               clearEvents();
-               fetchAndRenderEvents();
+function getIsLeftRtlScrollbars() { // responsible for caching the computation
+       if (_isLeftRtlScrollbars === null) {
+               _isLeftRtlScrollbars = computeIsLeftRtlScrollbars();
        }
+       return _isLeftRtlScrollbars;
+}
 
+function computeIsLeftRtlScrollbars() { // creates an offscreen test element, then removes it
+       var el = $('<div><div/></div>')
+               .css({
+                       position: 'absolute',
+                       top: -1000,
+                       left: 0,
+                       border: 0,
+                       padding: 0,
+                       overflow: 'scroll',
+                       direction: 'rtl'
+               })
+               .appendTo('body');
+       var innerEl = el.children();
+       var res = innerEl.offset().left > el.offset().left; // is the inner div shifted to accommodate a left scrollbar?
+       el.remove();
+       return res;
+}
 
-       function rerenderEvents(modifiedEventID) { // can be called as an API method
-               clearEvents();
-               renderEvents(modifiedEventID);
-       }
+
+// Retrieves a jQuery element's computed CSS value as a floating-point number.
+// If the queried value is non-numeric (ex: IE can return "medium" for border width), will just return zero.
+function getCssFloat(el, prop) {
+       return parseFloat(el.css(prop)) || 0;
+}
 
 
-       function renderEvents(modifiedEventID) { // TODO: remove modifiedEventID hack
-               if (elementVisible()) {
-                       currentView.setEventData(events); // for View.js, TODO: unify with renderEvents
-                       currentView.renderEvents(events, modifiedEventID); // actually render the DOM elements
-                       currentView.trigger('eventAfterAllRender');
-               }
-       }
+/* Mouse / Touch Utilities
+----------------------------------------------------------------------------------------------------------------------*/
+
+FC.preventDefault = preventDefault;
+
+
+// Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac)
+function isPrimaryMouseButton(ev) {
+       return ev.which == 1 && !ev.ctrlKey;
+}
 
 
-       function clearEvents() {
-               currentView.triggerEventDestroy(); // trigger 'eventDestroy' for each event
-               currentView.clearEvents(); // actually remove the DOM elements
-               currentView.clearEventData(); // for View.js, TODO: unify with clearEvents
+function getEvX(ev) {
+       if (ev.pageX !== undefined) {
+               return ev.pageX;
        }
-       
+       var touches = ev.originalEvent.touches;
+       if (touches) {
+               return touches[0].pageX;
+       }
+}
 
-       function getAndRenderEvents() {
-               if (!options.lazyFetching || isFetchNeeded(currentView.visStart, currentView.visEnd)) {
-                       fetchAndRenderEvents();
-               }
-               else {
-                       renderEvents();
-               }
+
+function getEvY(ev) {
+       if (ev.pageY !== undefined) {
+               return ev.pageY;
        }
+       var touches = ev.originalEvent.touches;
+       if (touches) {
+               return touches[0].pageY;
+       }
+}
 
 
-       function fetchAndRenderEvents() {
-               fetchEvents(currentView.visStart, currentView.visEnd);
-                       // ... will call reportEvents
-                       // ... which will call renderEvents
+function getEvIsTouch(ev) {
+       return /^touch/.test(ev.type);
+}
+
+
+function preventSelection(el) {
+       el.addClass('fc-unselectable')
+               .on('selectstart', preventDefault);
+}
+
+
+// Stops a mouse/touch event from doing it's native browser action
+function preventDefault(ev) {
+       ev.preventDefault();
+}
+
+
+// attach a handler to get called when ANY scroll action happens on the page.
+// this was impossible to do with normal on/off because 'scroll' doesn't bubble.
+// http://stackoverflow.com/a/32954565/96342
+// returns `true` on success.
+function bindAnyScroll(handler) {
+       if (window.addEventListener) {
+               window.addEventListener('scroll', handler, true); // useCapture=true
+               return true;
        }
+       return false;
+}
 
-       
-       // called when event data arrives
-       function reportEvents(_events) {
-               events = _events;
-               renderEvents();
+
+// undoes bindAnyScroll. must pass in the original function.
+// returns `true` on success.
+function unbindAnyScroll(handler) {
+       if (window.removeEventListener) {
+               window.removeEventListener('scroll', handler, true); // useCapture=true
+               return true;
        }
+       return false;
+}
 
 
-       // called when a single event's data has been changed
-       function reportEventChange(eventID) {
-               rerenderEvents(eventID);
+/* General Geometry Utils
+----------------------------------------------------------------------------------------------------------------------*/
+
+FC.intersectRects = intersectRects;
+
+// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false
+function intersectRects(rect1, rect2) {
+       var res = {
+               left: Math.max(rect1.left, rect2.left),
+               right: Math.min(rect1.right, rect2.right),
+               top: Math.max(rect1.top, rect2.top),
+               bottom: Math.min(rect1.bottom, rect2.bottom)
+       };
+
+       if (res.left < res.right && res.top < res.bottom) {
+               return res;
        }
+       return false;
+}
 
 
+// Returns a new point that will have been moved to reside within the given rectangle
+function constrainPoint(point, rect) {
+       return {
+               left: Math.min(Math.max(point.left, rect.left), rect.right),
+               top: Math.min(Math.max(point.top, rect.top), rect.bottom)
+       };
+}
 
-       /* Header Updating
-       -----------------------------------------------------------------------------*/
 
+// Returns a point that is the center of the given rectangle
+function getRectCenter(rect) {
+       return {
+               left: (rect.left + rect.right) / 2,
+               top: (rect.top + rect.bottom) / 2
+       };
+}
 
-       function updateTitle() {
-               header.updateTitle(currentView.title);
+
+// Subtracts point2's coordinates from point1's coordinates, returning a delta
+function diffPoints(point1, point2) {
+       return {
+               left: point1.left - point2.left,
+               top: point1.top - point2.top
+       };
+}
+
+
+/* Object Ordering by Field
+----------------------------------------------------------------------------------------------------------------------*/
+
+FC.parseFieldSpecs = parseFieldSpecs;
+FC.compareByFieldSpecs = compareByFieldSpecs;
+FC.compareByFieldSpec = compareByFieldSpec;
+FC.flexibleCompare = flexibleCompare;
+
+
+function parseFieldSpecs(input) {
+       var specs = [];
+       var tokens = [];
+       var i, token;
+
+       if (typeof input === 'string') {
+               tokens = input.split(/\s*,\s*/);
+       }
+       else if (typeof input === 'function') {
+               tokens = [ input ];
+       }
+       else if ($.isArray(input)) {
+               tokens = input;
        }
 
+       for (i = 0; i < tokens.length; i++) {
+               token = tokens[i];
 
-       function updateTodayButton() {
-               var today = new Date();
-               if (today >= currentView.start && today < currentView.end) {
-                       header.disableButton('today');
+               if (typeof token === 'string') {
+                       specs.push(
+                               token.charAt(0) == '-' ?
+                                       { field: token.substring(1), order: -1 } :
+                                       { field: token, order: 1 }
+                       );
                }
-               else {
-                       header.enableButton('today');
+               else if (typeof token === 'function') {
+                       specs.push({ func: token });
                }
        }
-       
 
+       return specs;
+}
 
-       /* Selection
-       -----------------------------------------------------------------------------*/
-       
 
-       function select(start, end, allDay) {
-               currentView.select(start, end, allDay===undefined ? true : allDay);
-       }
-       
+function compareByFieldSpecs(obj1, obj2, fieldSpecs) {
+       var i;
+       var cmp;
 
-       function unselect() { // safe to be called before renderView
-               if (currentView) {
-                       currentView.unselect();
+       for (i = 0; i < fieldSpecs.length; i++) {
+               cmp = compareByFieldSpec(obj1, obj2, fieldSpecs[i]);
+               if (cmp) {
+                       return cmp;
                }
        }
-       
-       
-       
-       /* Date
-       -----------------------------------------------------------------------------*/
-       
-       
-       function prev() {
-               renderView(-1);
+
+       return 0;
+}
+
+
+function compareByFieldSpec(obj1, obj2, fieldSpec) {
+       if (fieldSpec.func) {
+               return fieldSpec.func(obj1, obj2);
        }
-       
-       
-       function next() {
-               renderView(1);
+       return flexibleCompare(obj1[fieldSpec.field], obj2[fieldSpec.field]) *
+               (fieldSpec.order || 1);
+}
+
+
+function flexibleCompare(a, b) {
+       if (!a && !b) {
+               return 0;
        }
-       
-       
-       function prevYear() {
-               addYears(date, -1);
-               renderView();
+       if (b == null) {
+               return -1;
        }
-       
-       
-       function nextYear() {
-               addYears(date, 1);
-               renderView();
+       if (a == null) {
+               return 1;
        }
-       
-       
-       function today() {
-               date = new Date();
-               renderView();
+       if ($.type(a) === 'string' || $.type(b) === 'string') {
+               return String(a).localeCompare(String(b));
        }
-       
-       
-       function gotoDate(year, month, dateOfMonth) {
-               if (year instanceof Date) {
-                       date = cloneDate(year); // provided 1 argument, a Date
-               }else{
-                       setYMD(date, year, month, dateOfMonth);
+       return a - b;
+}
+
+
+/* FullCalendar-specific Misc Utilities
+----------------------------------------------------------------------------------------------------------------------*/
+
+
+// Computes the intersection of the two ranges. Will return fresh date clones in a range.
+// Returns undefined if no intersection.
+// Expects all dates to be normalized to the same timezone beforehand.
+// TODO: move to date section?
+function intersectRanges(subjectRange, constraintRange) {
+       var subjectStart = subjectRange.start;
+       var subjectEnd = subjectRange.end;
+       var constraintStart = constraintRange.start;
+       var constraintEnd = constraintRange.end;
+       var segStart, segEnd;
+       var isStart, isEnd;
+
+       if (subjectEnd > constraintStart && subjectStart < constraintEnd) { // in bounds at all?
+
+               if (subjectStart >= constraintStart) {
+                       segStart = subjectStart.clone();
+                       isStart = true;
                }
-               renderView();
-       }
-       
-       
-       function incrementDate(years, months, days) {
-               if (years !== undefined) {
-                       addYears(date, years);
+               else {
+                       segStart = constraintStart.clone();
+                       isStart =  false;
                }
-               if (months !== undefined) {
-                       addMonths(date, months);
+
+               if (subjectEnd <= constraintEnd) {
+                       segEnd = subjectEnd.clone();
+                       isEnd = true;
                }
-               if (days !== undefined) {
-                       addDays(date, days);
+               else {
+                       segEnd = constraintEnd.clone();
+                       isEnd = false;
                }
-               renderView();
-       }
-       
-       
-       function getDate() {
-               return cloneDate(date);
+
+               return {
+                       start: segStart,
+                       end: segEnd,
+                       isStart: isStart,
+                       isEnd: isEnd
+               };
        }
+}
 
 
+/* Date Utilities
+----------------------------------------------------------------------------------------------------------------------*/
 
-       /* Height "Freezing"
-       -----------------------------------------------------------------------------*/
+FC.computeIntervalUnit = computeIntervalUnit;
+FC.divideRangeByDuration = divideRangeByDuration;
+FC.divideDurationByDuration = divideDurationByDuration;
+FC.multiplyDuration = multiplyDuration;
+FC.durationHasTime = durationHasTime;
 
+var dayIDs = [ 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat' ];
+var intervalUnits = [ 'year', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond' ];
 
-       function freezeContentHeight() {
-               content.css({
-                       width: '100%',
-                       height: content.height(),
-                       overflow: 'hidden'
-               });
+
+// Diffs the two moments into a Duration where full-days are recorded first, then the remaining time.
+// Moments will have their timezones normalized.
+function diffDayTime(a, b) {
+       return moment.duration({
+               days: a.clone().stripTime().diff(b.clone().stripTime(), 'days'),
+               ms: a.time() - b.time() // time-of-day from day start. disregards timezone
+       });
+}
+
+
+// Diffs the two moments via their start-of-day (regardless of timezone). Produces whole-day durations.
+function diffDay(a, b) {
+       return moment.duration({
+               days: a.clone().stripTime().diff(b.clone().stripTime(), 'days')
+       });
+}
+
+
+// Diffs two moments, producing a duration, made of a whole-unit-increment of the given unit. Uses rounding.
+function diffByUnit(a, b, unit) {
+       return moment.duration(
+               Math.round(a.diff(b, unit, true)), // returnFloat=true
+               unit
+       );
+}
+
+
+// Computes the unit name of the largest whole-unit period of time.
+// For example, 48 hours will be "days" whereas 49 hours will be "hours".
+// Accepts start/end, a range object, or an original duration object.
+function computeIntervalUnit(start, end) {
+       var i, unit;
+       var val;
+
+       for (i = 0; i < intervalUnits.length; i++) {
+               unit = intervalUnits[i];
+               val = computeRangeAs(unit, start, end);
+
+               if (val >= 1 && isInt(val)) {
+                       break;
+               }
        }
 
+       return unit; // will be "milliseconds" if nothing else matches
+}
 
-       function unfreezeContentHeight() {
-               content.css({
-                       width: '',
-                       height: '',
-                       overflow: ''
-               });
+
+// Computes the number of units (like "hours") in the given range.
+// Range can be a {start,end} object, separate start/end args, or a Duration.
+// Results are based on Moment's .as() and .diff() methods, so results can depend on internal handling
+// of month-diffing logic (which tends to vary from version to version).
+function computeRangeAs(unit, start, end) {
+
+       if (end != null) { // given start, end
+               return end.diff(start, unit, true);
        }
-       
-       
-       
-       /* Misc
-       -----------------------------------------------------------------------------*/
-       
-       
-       function getView() {
-               return currentView;
+       else if (moment.isDuration(start)) { // given duration
+               return start.as(unit);
        }
-       
-       
-       function option(name, value) {
-               if (value === undefined) {
-                       return options[name];
-               }
-               if (name == 'height' || name == 'contentHeight' || name == 'aspectRatio') {
-                       options[name] = value;
-                       updateSize();
-               }
+       else { // given { start, end } range object
+               return start.end.diff(start.start, unit, true);
        }
-       
-       
-       function trigger(name, thisObj) {
-               if (options[name]) {
-                       return options[name].apply(
-                               thisObj || _element,
-                               Array.prototype.slice.call(arguments, 2)
-                       );
-               }
+}
+
+
+// Intelligently divides a range (specified by a start/end params) by a duration
+function divideRangeByDuration(start, end, dur) {
+       var months;
+
+       if (durationHasTime(dur)) {
+               return (end - start) / dur;
        }
-       
-       
-       
-       /* External Dragging
-       ------------------------------------------------------------------------*/
-       
-       if (options.droppable) {
-               $(document)
-                       .bind('dragstart', function(ev, ui) {
-                               var _e = ev.target;
-                               var e = $(_e);
-                               if (!e.parents('.fc').length) { // not already inside a calendar
-                                       var accept = options.dropAccept;
-                                       if ($.isFunction(accept) ? accept.call(_e, e) : e.is(accept)) {
-                                               _dragElement = _e;
-                                               currentView.dragStart(_dragElement, ev, ui);
-                                       }
-                               }
-                       })
-                       .bind('dragstop', function(ev, ui) {
-                               if (_dragElement) {
-                                       currentView.dragStop(_dragElement, ev, ui);
-                                       _dragElement = null;
-                               }
-                       });
+       months = dur.asMonths();
+       if (Math.abs(months) >= 1 && isInt(months)) {
+               return end.diff(start, 'months', true) / months;
        }
-       
+       return end.diff(start, 'days', true) / dur.asDays();
+}
+
+
+// Intelligently divides one duration by another
+function divideDurationByDuration(dur1, dur2) {
+       var months1, months2;
 
+       if (durationHasTime(dur1) || durationHasTime(dur2)) {
+               return dur1 / dur2;
+       }
+       months1 = dur1.asMonths();
+       months2 = dur2.asMonths();
+       if (
+               Math.abs(months1) >= 1 && isInt(months1) &&
+               Math.abs(months2) >= 1 && isInt(months2)
+       ) {
+               return months1 / months2;
+       }
+       return dur1.asDays() / dur2.asDays();
 }
 
-;;
 
-function Header(calendar, options) {
-       var t = this;
-       
-       
-       // exports
-       t.render = render;
-       t.destroy = destroy;
-       t.updateTitle = updateTitle;
-       t.activateButton = activateButton;
-       t.deactivateButton = deactivateButton;
-       t.disableButton = disableButton;
-       t.enableButton = enableButton;
-       
-       
-       // locals
-       var element = $([]);
-       var tm;
-       
+// Intelligently multiplies a duration by a number
+function multiplyDuration(dur, n) {
+       var months;
 
+       if (durationHasTime(dur)) {
+               return moment.duration(dur * n);
+       }
+       months = dur.asMonths();
+       if (Math.abs(months) >= 1 && isInt(months)) {
+               return moment.duration({ months: months * n });
+       }
+       return moment.duration({ days: dur.asDays() * n });
+}
 
-       function render() {
-               tm = options.theme ? 'ui' : 'fc';
-               var sections = options.header;
-               if (sections) {
-                       element = $("<table class='fc-header' style='width:100%'/>")
-                               .append(
-                                       $("<tr/>")
-                                               .append(renderSection('left'))
-                                               .append(renderSection('center'))
-                                               .append(renderSection('right'))
+
+// Returns a boolean about whether the given duration has any time parts (hours/minutes/seconds/ms)
+function durationHasTime(dur) {
+       return Boolean(dur.hours() || dur.minutes() || dur.seconds() || dur.milliseconds());
+}
+
+
+function isNativeDate(input) {
+       return  Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date;
+}
+
+
+// Returns a boolean about whether the given input is a time string, like "06:40:00" or "06:00"
+function isTimeString(str) {
+       return /^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(str);
+}
+
+
+/* Logging and Debug
+----------------------------------------------------------------------------------------------------------------------*/
+
+FC.log = function() {
+       var console = window.console;
+
+       if (console && console.log) {
+               return console.log.apply(console, arguments);
+       }
+};
+
+FC.warn = function() {
+       var console = window.console;
+
+       if (console && console.warn) {
+               return console.warn.apply(console, arguments);
+       }
+       else {
+               return FC.log.apply(FC, arguments);
+       }
+};
+
+
+/* General Utilities
+----------------------------------------------------------------------------------------------------------------------*/
+
+var hasOwnPropMethod = {}.hasOwnProperty;
+
+
+// Merges an array of objects into a single object.
+// The second argument allows for an array of property names who's object values will be merged together.
+function mergeProps(propObjs, complexProps) {
+       var dest = {};
+       var i, name;
+       var complexObjs;
+       var j, val;
+       var props;
+
+       if (complexProps) {
+               for (i = 0; i < complexProps.length; i++) {
+                       name = complexProps[i];
+                       complexObjs = [];
+
+                       // collect the trailing object values, stopping when a non-object is discovered
+                       for (j = propObjs.length - 1; j >= 0; j--) {
+                               val = propObjs[j][name];
+
+                               if (typeof val === 'object') {
+                                       complexObjs.unshift(val);
+                               }
+                               else if (val !== undefined) {
+                                       dest[name] = val; // if there were no objects, this value will be used
+                                       break;
+                               }
+                       }
+
+                       // if the trailing values were objects, use the merged value
+                       if (complexObjs.length) {
+                               dest[name] = mergeProps(complexObjs);
+                       }
+               }
+       }
+
+       // copy values into the destination, going from last to first
+       for (i = propObjs.length - 1; i >= 0; i--) {
+               props = propObjs[i];
+
+               for (name in props) {
+                       if (!(name in dest)) { // if already assigned by previous props or complex props, don't reassign
+                               dest[name] = props[name];
+                       }
+               }
+       }
+
+       return dest;
+}
+
+
+// Create an object that has the given prototype. Just like Object.create
+function createObject(proto) {
+       var f = function() {};
+       f.prototype = proto;
+       return new f();
+}
+
+
+function copyOwnProps(src, dest) {
+       for (var name in src) {
+               if (hasOwnProp(src, name)) {
+                       dest[name] = src[name];
+               }
+       }
+}
+
+
+function hasOwnProp(obj, name) {
+       return hasOwnPropMethod.call(obj, name);
+}
+
+
+// Is the given value a non-object non-function value?
+function isAtomic(val) {
+       return /undefined|null|boolean|number|string/.test($.type(val));
+}
+
+
+function applyAll(functions, thisObj, args) {
+       if ($.isFunction(functions)) {
+               functions = [ functions ];
+       }
+       if (functions) {
+               var i;
+               var ret;
+               for (i=0; i<functions.length; i++) {
+                       ret = functions[i].apply(thisObj, args) || ret;
+               }
+               return ret;
+       }
+}
+
+
+function firstDefined() {
+       for (var i=0; i<arguments.length; i++) {
+               if (arguments[i] !== undefined) {
+                       return arguments[i];
+               }
+       }
+}
+
+
+function htmlEscape(s) {
+       return (s + '').replace(/&/g, '&amp;')
+               .replace(/</g, '&lt;')
+               .replace(/>/g, '&gt;')
+               .replace(/'/g, '&#039;')
+               .replace(/"/g, '&quot;')
+               .replace(/\n/g, '<br />');
+}
+
+
+function stripHtmlEntities(text) {
+       return text.replace(/&.*?;/g, '');
+}
+
+
+// Given a hash of CSS properties, returns a string of CSS.
+// Uses property names as-is (no camel-case conversion). Will not make statements for null/undefined values.
+function cssToStr(cssProps) {
+       var statements = [];
+
+       $.each(cssProps, function(name, val) {
+               if (val != null) {
+                       statements.push(name + ':' + val);
+               }
+       });
+
+       return statements.join(';');
+}
+
+
+// Given an object hash of HTML attribute names to values,
+// generates a string that can be injected between < > in HTML
+function attrsToStr(attrs) {
+       var parts = [];
+
+       $.each(attrs, function(name, val) {
+               if (val != null) {
+                       parts.push(name + '="' + htmlEscape(val) + '"');
+               }
+       });
+
+       return parts.join(' ');
+}
+
+
+function capitaliseFirstLetter(str) {
+       return str.charAt(0).toUpperCase() + str.slice(1);
+}
+
+
+function compareNumbers(a, b) { // for .sort()
+       return a - b;
+}
+
+
+function isInt(n) {
+       return n % 1 === 0;
+}
+
+
+// Returns a method bound to the given object context.
+// Just like one of the jQuery.proxy signatures, but without the undesired behavior of treating the same method with
+// different contexts as identical when binding/unbinding events.
+function proxy(obj, methodName) {
+       var method = obj[methodName];
+
+       return function() {
+               return method.apply(obj, arguments);
+       };
+}
+
+
+// Returns a function, that, as long as it continues to be invoked, will not
+// be triggered. The function will be called after it stops being called for
+// N milliseconds. If `immediate` is passed, trigger the function on the
+// leading edge, instead of the trailing.
+// https://github.com/jashkenas/underscore/blob/1.6.0/underscore.js#L714
+function debounce(func, wait, immediate) {
+       var timeout, args, context, timestamp, result;
+
+       var later = function() {
+               var last = +new Date() - timestamp;
+               if (last < wait) {
+                       timeout = setTimeout(later, wait - last);
+               }
+               else {
+                       timeout = null;
+                       if (!immediate) {
+                               result = func.apply(context, args);
+                               context = args = null;
+                       }
+               }
+       };
+
+       return function() {
+               context = this;
+               args = arguments;
+               timestamp = +new Date();
+               var callNow = immediate && !timeout;
+               if (!timeout) {
+                       timeout = setTimeout(later, wait);
+               }
+               if (callNow) {
+                       result = func.apply(context, args);
+                       context = args = null;
+               }
+               return result;
+       };
+}
+
+
+// HACK around jQuery's now A+ promises: execute callback synchronously if already resolved.
+// thenFunc shouldn't accept args.
+// similar to whenResources in Scheduler plugin.
+function syncThen(promise, thenFunc) {
+       // not a promise, or an already-resolved promise?
+       if (!promise || !promise.then || promise.state() === 'resolved') {
+               return $.when(thenFunc()); // resolve immediately
+       }
+       else if (thenFunc) {
+               return promise.then(thenFunc);
+       }
+}
+
+;;
+
+/*
+GENERAL NOTE on moments throughout the *entire rest* of the codebase:
+All moments are assumed to be ambiguously-zoned unless otherwise noted,
+with the NOTABLE EXCEOPTION of start/end dates that live on *Event Objects*.
+Ambiguously-TIMED moments are assumed to be ambiguously-zoned by nature.
+*/
+
+var ambigDateOfMonthRegex = /^\s*\d{4}-\d\d$/;
+var ambigTimeOrZoneRegex =
+       /^\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+)?)?)?)?)?$/;
+var newMomentProto = moment.fn; // where we will attach our new methods
+var oldMomentProto = $.extend({}, newMomentProto); // copy of original moment methods
+
+// tell momentjs to transfer these properties upon clone
+var momentProperties = moment.momentProperties;
+momentProperties.push('_fullCalendar');
+momentProperties.push('_ambigTime');
+momentProperties.push('_ambigZone');
+
+
+// Creating
+// -------------------------------------------------------------------------------------------------
+
+// Creates a new moment, similar to the vanilla moment(...) constructor, but with
+// extra features (ambiguous time, enhanced formatting). When given an existing moment,
+// it will function as a clone (and retain the zone of the moment). Anything else will
+// result in a moment in the local zone.
+FC.moment = function() {
+       return makeMoment(arguments);
+};
+
+// Sames as FC.moment, but forces the resulting moment to be in the UTC timezone.
+FC.moment.utc = function() {
+       var mom = makeMoment(arguments, true);
+
+       // Force it into UTC because makeMoment doesn't guarantee it
+       // (if given a pre-existing moment for example)
+       if (mom.hasTime()) { // don't give ambiguously-timed moments a UTC zone
+               mom.utc();
+       }
+
+       return mom;
+};
+
+// Same as FC.moment, but when given an ISO8601 string, the timezone offset is preserved.
+// ISO8601 strings with no timezone offset will become ambiguously zoned.
+FC.moment.parseZone = function() {
+       return makeMoment(arguments, true, true);
+};
+
+// Builds an enhanced moment from args. When given an existing moment, it clones. When given a
+// native Date, or called with no arguments (the current time), the resulting moment will be local.
+// Anything else needs to be "parsed" (a string or an array), and will be affected by:
+//    parseAsUTC - if there is no zone information, should we parse the input in UTC?
+//    parseZone - if there is zone information, should we force the zone of the moment?
+function makeMoment(args, parseAsUTC, parseZone) {
+       var input = args[0];
+       var isSingleString = args.length == 1 && typeof input === 'string';
+       var isAmbigTime;
+       var isAmbigZone;
+       var ambigMatch;
+       var mom;
+
+       if (moment.isMoment(input) || isNativeDate(input) || input === undefined) {
+               mom = moment.apply(null, args);
+       }
+       else { // "parsing" is required
+               isAmbigTime = false;
+               isAmbigZone = false;
+
+               if (isSingleString) {
+                       if (ambigDateOfMonthRegex.test(input)) {
+                               // accept strings like '2014-05', but convert to the first of the month
+                               input += '-01';
+                               args = [ input ]; // for when we pass it on to moment's constructor
+                               isAmbigTime = true;
+                               isAmbigZone = true;
+                       }
+                       else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {
+                               isAmbigTime = !ambigMatch[5]; // no time part?
+                               isAmbigZone = true;
+                       }
+               }
+               else if ($.isArray(input)) {
+                       // arrays have no timezone information, so assume ambiguous zone
+                       isAmbigZone = true;
+               }
+               // otherwise, probably a string with a format
+
+               if (parseAsUTC || isAmbigTime) {
+                       mom = moment.utc.apply(moment, args);
+               }
+               else {
+                       mom = moment.apply(null, args);
+               }
+
+               if (isAmbigTime) {
+                       mom._ambigTime = true;
+                       mom._ambigZone = true; // ambiguous time always means ambiguous zone
+               }
+               else if (parseZone) { // let's record the inputted zone somehow
+                       if (isAmbigZone) {
+                               mom._ambigZone = true;
+                       }
+                       else if (isSingleString) {
+                               mom.utcOffset(input); // if not a valid zone, will assign UTC
+                       }
+               }
+       }
+
+       mom._fullCalendar = true; // flag for extended functionality
+
+       return mom;
+}
+
+
+// Week Number
+// -------------------------------------------------------------------------------------------------
+
+
+// Returns the week number, considering the locale's custom week number calcuation
+// `weeks` is an alias for `week`
+newMomentProto.week = newMomentProto.weeks = function(input) {
+       var weekCalc = this._locale._fullCalendar_weekCalc;
+
+       if (input == null && typeof weekCalc === 'function') { // custom function only works for getter
+               return weekCalc(this);
+       }
+       else if (weekCalc === 'ISO') {
+               return oldMomentProto.isoWeek.apply(this, arguments); // ISO getter/setter
+       }
+
+       return oldMomentProto.week.apply(this, arguments); // local getter/setter
+};
+
+
+// Time-of-day
+// -------------------------------------------------------------------------------------------------
+
+// GETTER
+// Returns a Duration with the hours/minutes/seconds/ms values of the moment.
+// If the moment has an ambiguous time, a duration of 00:00 will be returned.
+//
+// SETTER
+// You can supply a Duration, a Moment, or a Duration-like argument.
+// When setting the time, and the moment has an ambiguous time, it then becomes unambiguous.
+newMomentProto.time = function(time) {
+
+       // Fallback to the original method (if there is one) if this moment wasn't created via FullCalendar.
+       // `time` is a generic enough method name where this precaution is necessary to avoid collisions w/ other plugins.
+       if (!this._fullCalendar) {
+               return oldMomentProto.time.apply(this, arguments);
+       }
+
+       if (time == null) { // getter
+               return moment.duration({
+                       hours: this.hours(),
+                       minutes: this.minutes(),
+                       seconds: this.seconds(),
+                       milliseconds: this.milliseconds()
+               });
+       }
+       else { // setter
+
+               this._ambigTime = false; // mark that the moment now has a time
+
+               if (!moment.isDuration(time) && !moment.isMoment(time)) {
+                       time = moment.duration(time);
+               }
+
+               // The day value should cause overflow (so 24 hours becomes 00:00:00 of next day).
+               // Only for Duration times, not Moment times.
+               var dayHours = 0;
+               if (moment.isDuration(time)) {
+                       dayHours = Math.floor(time.asDays()) * 24;
+               }
+
+               // We need to set the individual fields.
+               // Can't use startOf('day') then add duration. In case of DST at start of day.
+               return this.hours(dayHours + time.hours())
+                       .minutes(time.minutes())
+                       .seconds(time.seconds())
+                       .milliseconds(time.milliseconds());
+       }
+};
+
+// Converts the moment to UTC, stripping out its time-of-day and timezone offset,
+// but preserving its YMD. A moment with a stripped time will display no time
+// nor timezone offset when .format() is called.
+newMomentProto.stripTime = function() {
+
+       if (!this._ambigTime) {
+
+               this.utc(true); // keepLocalTime=true (for keeping *date* value)
+
+               // set time to zero
+               this.set({
+                       hours: 0,
+                       minutes: 0,
+                       seconds: 0,
+                       ms: 0
+               });
+
+               // Mark the time as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(),
+               // which clears all ambig flags.
+               this._ambigTime = true;
+               this._ambigZone = true; // if ambiguous time, also ambiguous timezone offset
+       }
+
+       return this; // for chaining
+};
+
+// Returns if the moment has a non-ambiguous time (boolean)
+newMomentProto.hasTime = function() {
+       return !this._ambigTime;
+};
+
+
+// Timezone
+// -------------------------------------------------------------------------------------------------
+
+// Converts the moment to UTC, stripping out its timezone offset, but preserving its
+// YMD and time-of-day. A moment with a stripped timezone offset will display no
+// timezone offset when .format() is called.
+newMomentProto.stripZone = function() {
+       var wasAmbigTime;
+
+       if (!this._ambigZone) {
+
+               wasAmbigTime = this._ambigTime;
+
+               this.utc(true); // keepLocalTime=true (for keeping date and time values)
+
+               // the above call to .utc()/.utcOffset() unfortunately might clear the ambig flags, so restore
+               this._ambigTime = wasAmbigTime || false;
+
+               // Mark the zone as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(),
+               // which clears the ambig flags.
+               this._ambigZone = true;
+       }
+
+       return this; // for chaining
+};
+
+// Returns of the moment has a non-ambiguous timezone offset (boolean)
+newMomentProto.hasZone = function() {
+       return !this._ambigZone;
+};
+
+
+// implicitly marks a zone
+newMomentProto.local = function(keepLocalTime) {
+
+       // for when converting from ambiguously-zoned to local,
+       // keep the time values when converting from UTC -> local
+       oldMomentProto.local.call(this, this._ambigZone || keepLocalTime);
+
+       // ensure non-ambiguous
+       // this probably already happened via local() -> utcOffset(), but don't rely on Moment's internals
+       this._ambigTime = false;
+       this._ambigZone = false;
+
+       return this; // for chaining
+};
+
+
+// implicitly marks a zone
+newMomentProto.utc = function(keepLocalTime) {
+
+       oldMomentProto.utc.call(this, keepLocalTime);
+
+       // ensure non-ambiguous
+       // this probably already happened via utc() -> utcOffset(), but don't rely on Moment's internals
+       this._ambigTime = false;
+       this._ambigZone = false;
+
+       return this;
+};
+
+
+// implicitly marks a zone (will probably get called upon .utc() and .local())
+newMomentProto.utcOffset = function(tzo) {
+
+       if (tzo != null) { // setter
+               // these assignments needs to happen before the original zone method is called.
+               // I forget why, something to do with a browser crash.
+               this._ambigTime = false;
+               this._ambigZone = false;
+       }
+
+       return oldMomentProto.utcOffset.apply(this, arguments);
+};
+
+
+// Formatting
+// -------------------------------------------------------------------------------------------------
+
+newMomentProto.format = function() {
+       if (this._fullCalendar && arguments[0]) { // an enhanced moment? and a format string provided?
+               return formatDate(this, arguments[0]); // our extended formatting
+       }
+       if (this._ambigTime) {
+               return oldMomentFormat(this, 'YYYY-MM-DD');
+       }
+       if (this._ambigZone) {
+               return oldMomentFormat(this, 'YYYY-MM-DD[T]HH:mm:ss');
+       }
+       return oldMomentProto.format.apply(this, arguments);
+};
+
+newMomentProto.toISOString = function() {
+       if (this._ambigTime) {
+               return oldMomentFormat(this, 'YYYY-MM-DD');
+       }
+       if (this._ambigZone) {
+               return oldMomentFormat(this, 'YYYY-MM-DD[T]HH:mm:ss');
+       }
+       return oldMomentProto.toISOString.apply(this, arguments);
+};
+
+;;
+
+// Single Date Formatting
+// -------------------------------------------------------------------------------------------------
+
+
+// call this if you want Moment's original format method to be used
+function oldMomentFormat(mom, formatStr) {
+       return oldMomentProto.format.call(mom, formatStr); // oldMomentProto defined in moment-ext.js
+}
+
+
+// Formats `date` with a Moment formatting string, but allow our non-zero areas and
+// additional token.
+function formatDate(date, formatStr) {
+       return formatDateWithChunks(date, getFormatStringChunks(formatStr));
+}
+
+
+function formatDateWithChunks(date, chunks) {
+       var s = '';
+       var i;
+
+       for (i=0; i<chunks.length; i++) {
+               s += formatDateWithChunk(date, chunks[i]);
+       }
+
+       return s;
+}
+
+
+// addition formatting tokens we want recognized
+var tokenOverrides = {
+       t: function(date) { // "a" or "p"
+               return oldMomentFormat(date, 'a').charAt(0);
+       },
+       T: function(date) { // "A" or "P"
+               return oldMomentFormat(date, 'A').charAt(0);
+       }
+};
+
+
+function formatDateWithChunk(date, chunk) {
+       var token;
+       var maybeStr;
+
+       if (typeof chunk === 'string') { // a literal string
+               return chunk;
+       }
+       else if ((token = chunk.token)) { // a token, like "YYYY"
+               if (tokenOverrides[token]) {
+                       return tokenOverrides[token](date); // use our custom token
+               }
+               return oldMomentFormat(date, token);
+       }
+       else if (chunk.maybe) { // a grouping of other chunks that must be non-zero
+               maybeStr = formatDateWithChunks(date, chunk.maybe);
+               if (maybeStr.match(/[1-9]/)) {
+                       return maybeStr;
+               }
+       }
+
+       return '';
+}
+
+
+// Date Range Formatting
+// -------------------------------------------------------------------------------------------------
+// TODO: make it work with timezone offset
+
+// Using a formatting string meant for a single date, generate a range string, like
+// "Sep 2 - 9 2013", that intelligently inserts a separator where the dates differ.
+// If the dates are the same as far as the format string is concerned, just return a single
+// rendering of one date, without any separator.
+function formatRange(date1, date2, formatStr, separator, isRTL) {
+       var localeData;
+
+       date1 = FC.moment.parseZone(date1);
+       date2 = FC.moment.parseZone(date2);
+
+       localeData = date1.localeData();
+
+       // Expand localized format strings, like "LL" -> "MMMM D YYYY"
+       formatStr = localeData.longDateFormat(formatStr) || formatStr;
+       // BTW, this is not important for `formatDate` because it is impossible to put custom tokens
+       // or non-zero areas in Moment's localized format strings.
+
+       separator = separator || ' - ';
+
+       return formatRangeWithChunks(
+               date1,
+               date2,
+               getFormatStringChunks(formatStr),
+               separator,
+               isRTL
+       );
+}
+FC.formatRange = formatRange; // expose
+
+
+function formatRangeWithChunks(date1, date2, chunks, separator, isRTL) {
+       var unzonedDate1 = date1.clone().stripZone(); // for formatSimilarChunk
+       var unzonedDate2 = date2.clone().stripZone(); // "
+       var chunkStr; // the rendering of the chunk
+       var leftI;
+       var leftStr = '';
+       var rightI;
+       var rightStr = '';
+       var middleI;
+       var middleStr1 = '';
+       var middleStr2 = '';
+       var middleStr = '';
+
+       // Start at the leftmost side of the formatting string and continue until you hit a token
+       // that is not the same between dates.
+       for (leftI=0; leftI<chunks.length; leftI++) {
+               chunkStr = formatSimilarChunk(date1, date2, unzonedDate1, unzonedDate2, chunks[leftI]);
+               if (chunkStr === false) {
+                       break;
+               }
+               leftStr += chunkStr;
+       }
+
+       // Similarly, start at the rightmost side of the formatting string and move left
+       for (rightI=chunks.length-1; rightI>leftI; rightI--) {
+               chunkStr = formatSimilarChunk(date1, date2, unzonedDate1, unzonedDate2,  chunks[rightI]);
+               if (chunkStr === false) {
+                       break;
+               }
+               rightStr = chunkStr + rightStr;
+       }
+
+       // The area in the middle is different for both of the dates.
+       // Collect them distinctly so we can jam them together later.
+       for (middleI=leftI; middleI<=rightI; middleI++) {
+               middleStr1 += formatDateWithChunk(date1, chunks[middleI]);
+               middleStr2 += formatDateWithChunk(date2, chunks[middleI]);
+       }
+
+       if (middleStr1 || middleStr2) {
+               if (isRTL) {
+                       middleStr = middleStr2 + separator + middleStr1;
+               }
+               else {
+                       middleStr = middleStr1 + separator + middleStr2;
+               }
+       }
+
+       return leftStr + middleStr + rightStr;
+}
+
+
+var similarUnitMap = {
+       Y: 'year',
+       M: 'month',
+       D: 'day', // day of month
+       d: 'day', // day of week
+       // prevents a separator between anything time-related...
+       A: 'second', // AM/PM
+       a: 'second', // am/pm
+       T: 'second', // A/P
+       t: 'second', // a/p
+       H: 'second', // hour (24)
+       h: 'second', // hour (12)
+       m: 'second', // minute
+       s: 'second' // second
+};
+// TODO: week maybe?
+
+
+// Given a formatting chunk, and given that both dates are similar in the regard the
+// formatting chunk is concerned, format date1 against `chunk`. Otherwise, return `false`.
+function formatSimilarChunk(date1, date2, unzonedDate1, unzonedDate2, chunk) {
+       var token;
+       var unit;
+
+       if (typeof chunk === 'string') { // a literal string
+               return chunk;
+       }
+       else if ((token = chunk.token)) {
+               unit = similarUnitMap[token.charAt(0)];
+
+               // are the dates the same for this unit of measurement?
+               // use the unzoned dates for this calculation because unreliable when near DST (bug #2396)
+               if (unit && unzonedDate1.isSame(unzonedDate2, unit)) {
+                       return oldMomentFormat(date1, token); // would be the same if we used `date2`
+                       // BTW, don't support custom tokens
+               }
+       }
+
+       return false; // the chunk is NOT the same for the two dates
+       // BTW, don't support splitting on non-zero areas
+}
+
+
+// Chunking Utils
+// -------------------------------------------------------------------------------------------------
+
+
+var formatStringChunkCache = {};
+
+
+function getFormatStringChunks(formatStr) {
+       if (formatStr in formatStringChunkCache) {
+               return formatStringChunkCache[formatStr];
+       }
+       return (formatStringChunkCache[formatStr] = chunkFormatString(formatStr));
+}
+
+
+// Break the formatting string into an array of chunks
+function chunkFormatString(formatStr) {
+       var chunks = [];
+       var chunker = /\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g; // TODO: more descrimination
+       var match;
+
+       while ((match = chunker.exec(formatStr))) {
+               if (match[1]) { // a literal string inside [ ... ]
+                       chunks.push(match[1]);
+               }
+               else if (match[2]) { // non-zero formatting inside ( ... )
+                       chunks.push({ maybe: chunkFormatString(match[2]) });
+               }
+               else if (match[3]) { // a formatting token
+                       chunks.push({ token: match[3] });
+               }
+               else if (match[5]) { // an unenclosed literal string
+                       chunks.push(match[5]);
+               }
+       }
+
+       return chunks;
+}
+
+
+// Misc Utils
+// -------------------------------------------------------------------------------------------------
+
+
+// granularity only goes up until day
+// TODO: unify with similarUnitMap
+var tokenGranularities = {
+       Y: { value: 1, unit: 'year' },
+       M: { value: 2, unit: 'month' },
+       W: { value: 3, unit: 'week' },
+       w: { value: 3, unit: 'week' },
+       D: { value: 4, unit: 'day' }, // day of month
+       d: { value: 4, unit: 'day' } // day of week
+};
+
+// returns a unit string, either 'year', 'month', 'day', or null
+// for the most granular formatting token in the string.
+FC.queryMostGranularFormatUnit = function(formatStr) {
+       var chunks = getFormatStringChunks(formatStr);
+       var i, chunk;
+       var candidate;
+       var best;
+
+       for (i = 0; i < chunks.length; i++) {
+               chunk = chunks[i];
+               if (chunk.token) {
+                       candidate = tokenGranularities[chunk.token.charAt(0)];
+                       if (candidate) {
+                               if (!best || candidate.value > best.value) {
+                                       best = candidate;
+                               }
+                       }
+               }
+       }
+
+       if (best) {
+               return best.unit;
+       }
+
+       return null;
+};
+
+;;
+
+FC.Class = Class; // export
+
+// Class that all other classes will inherit from
+function Class() { }
+
+
+// Called on a class to create a subclass.
+// Last argument contains instance methods. Any argument before the last are considered mixins.
+Class.extend = function() {
+       var len = arguments.length;
+       var i;
+       var members;
+
+       for (i = 0; i < len; i++) {
+               members = arguments[i];
+               if (i < len - 1) { // not the last argument?
+                       mixIntoClass(this, members);
+               }
+       }
+
+       return extendClass(this, members || {}); // members will be undefined if no arguments
+};
+
+
+// Adds new member variables/methods to the class's prototype.
+// Can be called with another class, or a plain object hash containing new members.
+Class.mixin = function(members) {
+       mixIntoClass(this, members);
+};
+
+
+function extendClass(superClass, members) {
+       var subClass;
+
+       // ensure a constructor for the subclass, forwarding all arguments to the super-constructor if it doesn't exist
+       if (hasOwnProp(members, 'constructor')) {
+               subClass = members.constructor;
+       }
+       if (typeof subClass !== 'function') {
+               subClass = members.constructor = function() {
+                       superClass.apply(this, arguments);
+               };
+       }
+
+       // build the base prototype for the subclass, which is an new object chained to the superclass's prototype
+       subClass.prototype = createObject(superClass.prototype);
+
+       // copy each member variable/method onto the the subclass's prototype
+       copyOwnProps(members, subClass.prototype);
+
+       // copy over all class variables/methods to the subclass, such as `extend` and `mixin`
+       copyOwnProps(superClass, subClass);
+
+       return subClass;
+}
+
+
+function mixIntoClass(theClass, members) {
+       copyOwnProps(members, theClass.prototype);
+}
+;;
+
+var EmitterMixin = FC.EmitterMixin = {
+
+       // jQuery-ification via $(this) allows a non-DOM object to have
+       // the same event handling capabilities (including namespaces).
+
+
+       on: function(types, handler) {
+
+               // handlers are always called with an "event" object as their first param.
+               // sneak the `this` context and arguments into the extra parameter object
+               // and forward them on to the original handler.
+               var intercept = function(ev, extra) {
+                       return handler.apply(
+                               extra.context || this,
+                               extra.args || []
+                       );
+               };
+
+               // mimick jQuery's internal "proxy" system (risky, I know)
+               // causing all functions with the same .guid to appear to be the same.
+               // https://github.com/jquery/jquery/blob/2.2.4/src/core.js#L448
+               // this is needed for calling .off with the original non-intercept handler.
+               if (!handler.guid) {
+                       handler.guid = $.guid++;
+               }
+               intercept.guid = handler.guid;
+
+               $(this).on(types, intercept);
+
+               return this; // for chaining
+       },
+
+
+       off: function(types, handler) {
+               $(this).off(types, handler);
+
+               return this; // for chaining
+       },
+
+
+       trigger: function(types) {
+               var args = Array.prototype.slice.call(arguments, 1); // arguments after the first
+
+               // pass in "extra" info to the intercept
+               $(this).triggerHandler(types, { args: args });
+
+               return this; // for chaining
+       },
+
+
+       triggerWith: function(types, context, args) {
+
+               // `triggerHandler` is less reliant on the DOM compared to `trigger`.
+               // pass in "extra" info to the intercept.
+               $(this).triggerHandler(types, { context: context, args: args });
+
+               return this; // for chaining
+       }
+
+};
+
+;;
+
+/*
+Utility methods for easily listening to events on another object,
+and more importantly, easily unlistening from them.
+*/
+var ListenerMixin = FC.ListenerMixin = (function() {
+       var guid = 0;
+       var ListenerMixin = {
+
+               listenerId: null,
+
+               /*
+               Given an `other` object that has on/off methods, bind the given `callback` to an event by the given name.
+               The `callback` will be called with the `this` context of the object that .listenTo is being called on.
+               Can be called:
+                       .listenTo(other, eventName, callback)
+               OR
+                       .listenTo(other, {
+                               eventName1: callback1,
+                               eventName2: callback2
+                       })
+               */
+               listenTo: function(other, arg, callback) {
+                       if (typeof arg === 'object') { // given dictionary of callbacks
+                               for (var eventName in arg) {
+                                       if (arg.hasOwnProperty(eventName)) {
+                                               this.listenTo(other, eventName, arg[eventName]);
+                                       }
+                               }
+                       }
+                       else if (typeof arg === 'string') {
+                               other.on(
+                                       arg + '.' + this.getListenerNamespace(), // use event namespacing to identify this object
+                                       $.proxy(callback, this) // always use `this` context
+                                               // the usually-undesired jQuery guid behavior doesn't matter,
+                                               // because we always unbind via namespace
+                               );
+                       }
+               },
+
+               /*
+               Causes the current object to stop listening to events on the `other` object.
+               `eventName` is optional. If omitted, will stop listening to ALL events on `other`.
+               */
+               stopListeningTo: function(other, eventName) {
+                       other.off((eventName || '') + '.' + this.getListenerNamespace());
+               },
+
+               /*
+               Returns a string, unique to this object, to be used for event namespacing
+               */
+               getListenerNamespace: function() {
+                       if (this.listenerId == null) {
+                               this.listenerId = guid++;
+                       }
+                       return '_listener' + this.listenerId;
+               }
+
+       };
+       return ListenerMixin;
+})();
+;;
+
+// simple class for toggle a `isIgnoringMouse` flag on delay
+// initMouseIgnoring must first be called, with a millisecond delay setting.
+var MouseIgnorerMixin = {
+
+       isIgnoringMouse: false, // bool
+       delayUnignoreMouse: null, // method
+
+
+       initMouseIgnoring: function(delay) {
+               this.delayUnignoreMouse = debounce(proxy(this, 'unignoreMouse'), delay || 1000);
+       },
+
+
+       // temporarily ignore mouse actions on segments
+       tempIgnoreMouse: function() {
+               this.isIgnoringMouse = true;
+               this.delayUnignoreMouse();
+       },
+
+
+       // delayUnignoreMouse eventually calls this
+       unignoreMouse: function() {
+               this.isIgnoringMouse = false;
+       }
+
+};
+
+;;
+
+/* A rectangular panel that is absolutely positioned over other content
+------------------------------------------------------------------------------------------------------------------------
+Options:
+       - className (string)
+       - content (HTML string or jQuery element set)
+       - parentEl
+       - top
+       - left
+       - right (the x coord of where the right edge should be. not a "CSS" right)
+       - autoHide (boolean)
+       - show (callback)
+       - hide (callback)
+*/
+
+var Popover = Class.extend(ListenerMixin, {
+
+       isHidden: true,
+       options: null,
+       el: null, // the container element for the popover. generated by this object
+       margin: 10, // the space required between the popover and the edges of the scroll container
+
+
+       constructor: function(options) {
+               this.options = options || {};
+       },
+
+
+       // Shows the popover on the specified position. Renders it if not already
+       show: function() {
+               if (this.isHidden) {
+                       if (!this.el) {
+                               this.render();
+                       }
+                       this.el.show();
+                       this.position();
+                       this.isHidden = false;
+                       this.trigger('show');
+               }
+       },
+
+
+       // Hides the popover, through CSS, but does not remove it from the DOM
+       hide: function() {
+               if (!this.isHidden) {
+                       this.el.hide();
+                       this.isHidden = true;
+                       this.trigger('hide');
+               }
+       },
+
+
+       // Creates `this.el` and renders content inside of it
+       render: function() {
+               var _this = this;
+               var options = this.options;
+
+               this.el = $('<div class="fc-popover"/>')
+                       .addClass(options.className || '')
+                       .css({
+                               // position initially to the top left to avoid creating scrollbars
+                               top: 0,
+                               left: 0
+                       })
+                       .append(options.content)
+                       .appendTo(options.parentEl);
+
+               // when a click happens on anything inside with a 'fc-close' className, hide the popover
+               this.el.on('click', '.fc-close', function() {
+                       _this.hide();
+               });
+
+               if (options.autoHide) {
+                       this.listenTo($(document), 'mousedown', this.documentMousedown);
+               }
+       },
+
+
+       // Triggered when the user clicks *anywhere* in the document, for the autoHide feature
+       documentMousedown: function(ev) {
+               // only hide the popover if the click happened outside the popover
+               if (this.el && !$(ev.target).closest(this.el).length) {
+                       this.hide();
+               }
+       },
+
+
+       // Hides and unregisters any handlers
+       removeElement: function() {
+               this.hide();
+
+               if (this.el) {
+                       this.el.remove();
+                       this.el = null;
+               }
+
+               this.stopListeningTo($(document), 'mousedown');
+       },
+
+
+       // Positions the popover optimally, using the top/left/right options
+       position: function() {
+               var options = this.options;
+               var origin = this.el.offsetParent().offset();
+               var width = this.el.outerWidth();
+               var height = this.el.outerHeight();
+               var windowEl = $(window);
+               var viewportEl = getScrollParent(this.el);
+               var viewportTop;
+               var viewportLeft;
+               var viewportOffset;
+               var top; // the "position" (not "offset") values for the popover
+               var left; //
+
+               // compute top and left
+               top = options.top || 0;
+               if (options.left !== undefined) {
+                       left = options.left;
+               }
+               else if (options.right !== undefined) {
+                       left = options.right - width; // derive the left value from the right value
+               }
+               else {
+                       left = 0;
+               }
+
+               if (viewportEl.is(window) || viewportEl.is(document)) { // normalize getScrollParent's result
+                       viewportEl = windowEl;
+                       viewportTop = 0; // the window is always at the top left
+                       viewportLeft = 0; // (and .offset() won't work if called here)
+               }
+               else {
+                       viewportOffset = viewportEl.offset();
+                       viewportTop = viewportOffset.top;
+                       viewportLeft = viewportOffset.left;
+               }
+
+               // if the window is scrolled, it causes the visible area to be further down
+               viewportTop += windowEl.scrollTop();
+               viewportLeft += windowEl.scrollLeft();
+
+               // constrain to the view port. if constrained by two edges, give precedence to top/left
+               if (options.viewportConstrain !== false) {
+                       top = Math.min(top, viewportTop + viewportEl.outerHeight() - height - this.margin);
+                       top = Math.max(top, viewportTop + this.margin);
+                       left = Math.min(left, viewportLeft + viewportEl.outerWidth() - width - this.margin);
+                       left = Math.max(left, viewportLeft + this.margin);
+               }
+
+               this.el.css({
+                       top: top - origin.top,
+                       left: left - origin.left
+               });
+       },
+
+
+       // Triggers a callback. Calls a function in the option hash of the same name.
+       // Arguments beyond the first `name` are forwarded on.
+       // TODO: better code reuse for this. Repeat code
+       trigger: function(name) {
+               if (this.options[name]) {
+                       this.options[name].apply(this, Array.prototype.slice.call(arguments, 1));
+               }
+       }
+
+});
+
+;;
+
+/*
+A cache for the left/right/top/bottom/width/height values for one or more elements.
+Works with both offset (from topleft document) and position (from offsetParent).
+
+options:
+- els
+- isHorizontal
+- isVertical
+*/
+var CoordCache = FC.CoordCache = Class.extend({
+
+       els: null, // jQuery set (assumed to be siblings)
+       forcedOffsetParentEl: null, // options can override the natural offsetParent
+       origin: null, // {left,top} position of offsetParent of els
+       boundingRect: null, // constrain cordinates to this rectangle. {left,right,top,bottom} or null
+       isHorizontal: false, // whether to query for left/right/width
+       isVertical: false, // whether to query for top/bottom/height
+
+       // arrays of coordinates (offsets from topleft of document)
+       lefts: null,
+       rights: null,
+       tops: null,
+       bottoms: null,
+
+
+       constructor: function(options) {
+               this.els = $(options.els);
+               this.isHorizontal = options.isHorizontal;
+               this.isVertical = options.isVertical;
+               this.forcedOffsetParentEl = options.offsetParent ? $(options.offsetParent) : null;
+       },
+
+
+       // Queries the els for coordinates and stores them.
+       // Call this method before using and of the get* methods below.
+       build: function() {
+               var offsetParentEl = this.forcedOffsetParentEl || this.els.eq(0).offsetParent();
+
+               this.origin = offsetParentEl.offset();
+               this.boundingRect = this.queryBoundingRect();
+
+               if (this.isHorizontal) {
+                       this.buildElHorizontals();
+               }
+               if (this.isVertical) {
+                       this.buildElVerticals();
+               }
+       },
+
+
+       // Destroys all internal data about coordinates, freeing memory
+       clear: function() {
+               this.origin = null;
+               this.boundingRect = null;
+               this.lefts = null;
+               this.rights = null;
+               this.tops = null;
+               this.bottoms = null;
+       },
+
+
+       // When called, if coord caches aren't built, builds them
+       ensureBuilt: function() {
+               if (!this.origin) {
+                       this.build();
+               }
+       },
+
+
+       // Populates the left/right internal coordinate arrays
+       buildElHorizontals: function() {
+               var lefts = [];
+               var rights = [];
+
+               this.els.each(function(i, node) {
+                       var el = $(node);
+                       var left = el.offset().left;
+                       var width = el.outerWidth();
+
+                       lefts.push(left);
+                       rights.push(left + width);
+               });
+
+               this.lefts = lefts;
+               this.rights = rights;
+       },
+
+
+       // Populates the top/bottom internal coordinate arrays
+       buildElVerticals: function() {
+               var tops = [];
+               var bottoms = [];
+
+               this.els.each(function(i, node) {
+                       var el = $(node);
+                       var top = el.offset().top;
+                       var height = el.outerHeight();
+
+                       tops.push(top);
+                       bottoms.push(top + height);
+               });
+
+               this.tops = tops;
+               this.bottoms = bottoms;
+       },
+
+
+       // Given a left offset (from document left), returns the index of the el that it horizontally intersects.
+       // If no intersection is made, returns undefined.
+       getHorizontalIndex: function(leftOffset) {
+               this.ensureBuilt();
+
+               var lefts = this.lefts;
+               var rights = this.rights;
+               var len = lefts.length;
+               var i;
+
+               for (i = 0; i < len; i++) {
+                       if (leftOffset >= lefts[i] && leftOffset < rights[i]) {
+                               return i;
+                       }
+               }
+       },
+
+
+       // Given a top offset (from document top), returns the index of the el that it vertically intersects.
+       // If no intersection is made, returns undefined.
+       getVerticalIndex: function(topOffset) {
+               this.ensureBuilt();
+
+               var tops = this.tops;
+               var bottoms = this.bottoms;
+               var len = tops.length;
+               var i;
+
+               for (i = 0; i < len; i++) {
+                       if (topOffset >= tops[i] && topOffset < bottoms[i]) {
+                               return i;
+                       }
+               }
+       },
+
+
+       // Gets the left offset (from document left) of the element at the given index
+       getLeftOffset: function(leftIndex) {
+               this.ensureBuilt();
+               return this.lefts[leftIndex];
+       },
+
+
+       // Gets the left position (from offsetParent left) of the element at the given index
+       getLeftPosition: function(leftIndex) {
+               this.ensureBuilt();
+               return this.lefts[leftIndex] - this.origin.left;
+       },
+
+
+       // Gets the right offset (from document left) of the element at the given index.
+       // This value is NOT relative to the document's right edge, like the CSS concept of "right" would be.
+       getRightOffset: function(leftIndex) {
+               this.ensureBuilt();
+               return this.rights[leftIndex];
+       },
+
+
+       // Gets the right position (from offsetParent left) of the element at the given index.
+       // This value is NOT relative to the offsetParent's right edge, like the CSS concept of "right" would be.
+       getRightPosition: function(leftIndex) {
+               this.ensureBuilt();
+               return this.rights[leftIndex] - this.origin.left;
+       },
+
+
+       // Gets the width of the element at the given index
+       getWidth: function(leftIndex) {
+               this.ensureBuilt();
+               return this.rights[leftIndex] - this.lefts[leftIndex];
+       },
+
+
+       // Gets the top offset (from document top) of the element at the given index
+       getTopOffset: function(topIndex) {
+               this.ensureBuilt();
+               return this.tops[topIndex];
+       },
+
+
+       // Gets the top position (from offsetParent top) of the element at the given position
+       getTopPosition: function(topIndex) {
+               this.ensureBuilt();
+               return this.tops[topIndex] - this.origin.top;
+       },
+
+       // Gets the bottom offset (from the document top) of the element at the given index.
+       // This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of "bottom" would be.
+       getBottomOffset: function(topIndex) {
+               this.ensureBuilt();
+               return this.bottoms[topIndex];
+       },
+
+
+       // Gets the bottom position (from the offsetParent top) of the element at the given index.
+       // This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of "bottom" would be.
+       getBottomPosition: function(topIndex) {
+               this.ensureBuilt();
+               return this.bottoms[topIndex] - this.origin.top;
+       },
+
+
+       // Gets the height of the element at the given index
+       getHeight: function(topIndex) {
+               this.ensureBuilt();
+               return this.bottoms[topIndex] - this.tops[topIndex];
+       },
+
+
+       // Bounding Rect
+       // TODO: decouple this from CoordCache
+
+       // Compute and return what the elements' bounding rectangle is, from the user's perspective.
+       // Right now, only returns a rectangle if constrained by an overflow:scroll element.
+       queryBoundingRect: function() {
+               var scrollParentEl = getScrollParent(this.els.eq(0));
+
+               if (!scrollParentEl.is(document)) {
+                       return getClientRect(scrollParentEl);
+               }
+       },
+
+       isPointInBounds: function(leftOffset, topOffset) {
+               return this.isLeftInBounds(leftOffset) && this.isTopInBounds(topOffset);
+       },
+
+       isLeftInBounds: function(leftOffset) {
+               return !this.boundingRect || (leftOffset >= this.boundingRect.left && leftOffset < this.boundingRect.right);
+       },
+
+       isTopInBounds: function(topOffset) {
+               return !this.boundingRect || (topOffset >= this.boundingRect.top && topOffset < this.boundingRect.bottom);
+       }
+
+});
+
+;;
+
+/* Tracks a drag's mouse movement, firing various handlers
+----------------------------------------------------------------------------------------------------------------------*/
+// TODO: use Emitter
+
+var DragListener = FC.DragListener = Class.extend(ListenerMixin, MouseIgnorerMixin, {
+
+       options: null,
+       subjectEl: null,
+
+       // coordinates of the initial mousedown
+       originX: null,
+       originY: null,
+
+       // the wrapping element that scrolls, or MIGHT scroll if there's overflow.
+       // TODO: do this for wrappers that have overflow:hidden as well.
+       scrollEl: null,
+
+       isInteracting: false,
+       isDistanceSurpassed: false,
+       isDelayEnded: false,
+       isDragging: false,
+       isTouch: false,
+
+       delay: null,
+       delayTimeoutId: null,
+       minDistance: null,
+
+       handleTouchScrollProxy: null, // calls handleTouchScroll, always bound to `this`
+
+
+       constructor: function(options) {
+               this.options = options || {};
+               this.handleTouchScrollProxy = proxy(this, 'handleTouchScroll');
+               this.initMouseIgnoring(500);
+       },
+
+
+       // Interaction (high-level)
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       startInteraction: function(ev, extraOptions) {
+               var isTouch = getEvIsTouch(ev);
+
+               if (ev.type === 'mousedown') {
+                       if (this.isIgnoringMouse) {
+                               return;
+                       }
+                       else if (!isPrimaryMouseButton(ev)) {
+                               return;
+                       }
+                       else {
+                               ev.preventDefault(); // prevents native selection in most browsers
+                       }
+               }
+
+               if (!this.isInteracting) {
+
+                       // process options
+                       extraOptions = extraOptions || {};
+                       this.delay = firstDefined(extraOptions.delay, this.options.delay, 0);
+                       this.minDistance = firstDefined(extraOptions.distance, this.options.distance, 0);
+                       this.subjectEl = this.options.subjectEl;
+
+                       this.isInteracting = true;
+                       this.isTouch = isTouch;
+                       this.isDelayEnded = false;
+                       this.isDistanceSurpassed = false;
+
+                       this.originX = getEvX(ev);
+                       this.originY = getEvY(ev);
+                       this.scrollEl = getScrollParent($(ev.target));
+
+                       this.bindHandlers();
+                       this.initAutoScroll();
+                       this.handleInteractionStart(ev);
+                       this.startDelay(ev);
+
+                       if (!this.minDistance) {
+                               this.handleDistanceSurpassed(ev);
+                       }
+               }
+       },
+
+
+       handleInteractionStart: function(ev) {
+               this.trigger('interactionStart', ev);
+       },
+
+
+       endInteraction: function(ev, isCancelled) {
+               if (this.isInteracting) {
+                       this.endDrag(ev);
+
+                       if (this.delayTimeoutId) {
+                               clearTimeout(this.delayTimeoutId);
+                               this.delayTimeoutId = null;
+                       }
+
+                       this.destroyAutoScroll();
+                       this.unbindHandlers();
+
+                       this.isInteracting = false;
+                       this.handleInteractionEnd(ev, isCancelled);
+
+                       // a touchstart+touchend on the same element will result in the following addition simulated events:
+                       // mouseover + mouseout + click
+                       // let's ignore these bogus events
+                       if (this.isTouch) {
+                               this.tempIgnoreMouse();
+                       }
+               }
+       },
+
+
+       handleInteractionEnd: function(ev, isCancelled) {
+               this.trigger('interactionEnd', ev, isCancelled || false);
+       },
+
+
+       // Binding To DOM
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       bindHandlers: function() {
+               var _this = this;
+               var touchStartIgnores = 1;
+
+               if (this.isTouch) {
+                       this.listenTo($(document), {
+                               touchmove: this.handleTouchMove,
+                               touchend: this.endInteraction,
+                               touchcancel: this.endInteraction,
+
+                               // Sometimes touchend doesn't fire
+                               // (can't figure out why. touchcancel doesn't fire either. has to do with scrolling?)
+                               // If another touchstart happens, we know it's bogus, so cancel the drag.
+                               // touchend will continue to be broken until user does a shorttap/scroll, but this is best we can do.
+                               touchstart: function(ev) {
+                                       if (touchStartIgnores) { // bindHandlers is called from within a touchstart,
+                                               touchStartIgnores--; // and we don't want this to fire immediately, so ignore.
+                                       }
+                                       else {
+                                               _this.endInteraction(ev, true); // isCancelled=true
+                                       }
+                               }
+                       });
+
+                       // listen to ALL scroll actions on the page
+                       if (
+                               !bindAnyScroll(this.handleTouchScrollProxy) && // hopefully this works and short-circuits the rest
+                               this.scrollEl // otherwise, attach a single handler to this
+                       ) {
+                               this.listenTo(this.scrollEl, 'scroll', this.handleTouchScroll);
+                       }
+               }
+               else {
+                       this.listenTo($(document), {
+                               mousemove: this.handleMouseMove,
+                               mouseup: this.endInteraction
+                       });
+               }
+
+               this.listenTo($(document), {
+                       selectstart: preventDefault, // don't allow selection while dragging
+                       contextmenu: preventDefault // long taps would open menu on Chrome dev tools
+               });
+       },
+
+
+       unbindHandlers: function() {
+               this.stopListeningTo($(document));
+
+               // unbind scroll listening
+               unbindAnyScroll(this.handleTouchScrollProxy);
+               if (this.scrollEl) {
+                       this.stopListeningTo(this.scrollEl, 'scroll');
+               }
+       },
+
+
+       // Drag (high-level)
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       // extraOptions ignored if drag already started
+       startDrag: function(ev, extraOptions) {
+               this.startInteraction(ev, extraOptions); // ensure interaction began
+
+               if (!this.isDragging) {
+                       this.isDragging = true;
+                       this.handleDragStart(ev);
+               }
+       },
+
+
+       handleDragStart: function(ev) {
+               this.trigger('dragStart', ev);
+       },
+
+
+       handleMove: function(ev) {
+               var dx = getEvX(ev) - this.originX;
+               var dy = getEvY(ev) - this.originY;
+               var minDistance = this.minDistance;
+               var distanceSq; // current distance from the origin, squared
+
+               if (!this.isDistanceSurpassed) {
+                       distanceSq = dx * dx + dy * dy;
+                       if (distanceSq >= minDistance * minDistance) { // use pythagorean theorem
+                               this.handleDistanceSurpassed(ev);
+                       }
+               }
+
+               if (this.isDragging) {
+                       this.handleDrag(dx, dy, ev);
+               }
+       },
+
+
+       // Called while the mouse is being moved and when we know a legitimate drag is taking place
+       handleDrag: function(dx, dy, ev) {
+               this.trigger('drag', dx, dy, ev);
+               this.updateAutoScroll(ev); // will possibly cause scrolling
+       },
+
+
+       endDrag: function(ev) {
+               if (this.isDragging) {
+                       this.isDragging = false;
+                       this.handleDragEnd(ev);
+               }
+       },
+
+
+       handleDragEnd: function(ev) {
+               this.trigger('dragEnd', ev);
+       },
+
+
+       // Delay
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       startDelay: function(initialEv) {
+               var _this = this;
+
+               if (this.delay) {
+                       this.delayTimeoutId = setTimeout(function() {
+                               _this.handleDelayEnd(initialEv);
+                       }, this.delay);
+               }
+               else {
+                       this.handleDelayEnd(initialEv);
+               }
+       },
+
+
+       handleDelayEnd: function(initialEv) {
+               this.isDelayEnded = true;
+
+               if (this.isDistanceSurpassed) {
+                       this.startDrag(initialEv);
+               }
+       },
+
+
+       // Distance
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       handleDistanceSurpassed: function(ev) {
+               this.isDistanceSurpassed = true;
+
+               if (this.isDelayEnded) {
+                       this.startDrag(ev);
+               }
+       },
+
+
+       // Mouse / Touch
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       handleTouchMove: function(ev) {
+               // prevent inertia and touchmove-scrolling while dragging
+               if (this.isDragging) {
+                       ev.preventDefault();
+               }
+
+               this.handleMove(ev);
+       },
+
+
+       handleMouseMove: function(ev) {
+               this.handleMove(ev);
+       },
+
+
+       // Scrolling (unrelated to auto-scroll)
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       handleTouchScroll: function(ev) {
+               // if the drag is being initiated by touch, but a scroll happens before
+               // the drag-initiating delay is over, cancel the drag
+               if (!this.isDragging) {
+                       this.endInteraction(ev, true); // isCancelled=true
+               }
+       },
+
+
+       // Utils
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       // Triggers a callback. Calls a function in the option hash of the same name.
+       // Arguments beyond the first `name` are forwarded on.
+       trigger: function(name) {
+               if (this.options[name]) {
+                       this.options[name].apply(this, Array.prototype.slice.call(arguments, 1));
+               }
+               // makes _methods callable by event name. TODO: kill this
+               if (this['_' + name]) {
+                       this['_' + name].apply(this, Array.prototype.slice.call(arguments, 1));
+               }
+       }
+
+
+});
+
+;;
+/*
+this.scrollEl is set in DragListener
+*/
+DragListener.mixin({
+
+       isAutoScroll: false,
+
+       scrollBounds: null, // { top, bottom, left, right }
+       scrollTopVel: null, // pixels per second
+       scrollLeftVel: null, // pixels per second
+       scrollIntervalId: null, // ID of setTimeout for scrolling animation loop
+
+       // defaults
+       scrollSensitivity: 30, // pixels from edge for scrolling to start
+       scrollSpeed: 200, // pixels per second, at maximum speed
+       scrollIntervalMs: 50, // millisecond wait between scroll increment
+
+
+       initAutoScroll: function() {
+               var scrollEl = this.scrollEl;
+
+               this.isAutoScroll =
+                       this.options.scroll &&
+                       scrollEl &&
+                       !scrollEl.is(window) &&
+                       !scrollEl.is(document);
+
+               if (this.isAutoScroll) {
+                       // debounce makes sure rapid calls don't happen
+                       this.listenTo(scrollEl, 'scroll', debounce(this.handleDebouncedScroll, 100));
+               }
+       },
+
+
+       destroyAutoScroll: function() {
+               this.endAutoScroll(); // kill any animation loop
+
+               // remove the scroll handler if there is a scrollEl
+               if (this.isAutoScroll) {
+                       this.stopListeningTo(this.scrollEl, 'scroll'); // will probably get removed by unbindHandlers too :(
+               }
+       },
+
+
+       // Computes and stores the bounding rectangle of scrollEl
+       computeScrollBounds: function() {
+               if (this.isAutoScroll) {
+                       this.scrollBounds = getOuterRect(this.scrollEl);
+                       // TODO: use getClientRect in future. but prevents auto scrolling when on top of scrollbars
+               }
+       },
+
+
+       // Called when the dragging is in progress and scrolling should be updated
+       updateAutoScroll: function(ev) {
+               var sensitivity = this.scrollSensitivity;
+               var bounds = this.scrollBounds;
+               var topCloseness, bottomCloseness;
+               var leftCloseness, rightCloseness;
+               var topVel = 0;
+               var leftVel = 0;
+
+               if (bounds) { // only scroll if scrollEl exists
+
+                       // compute closeness to edges. valid range is from 0.0 - 1.0
+                       topCloseness = (sensitivity - (getEvY(ev) - bounds.top)) / sensitivity;
+                       bottomCloseness = (sensitivity - (bounds.bottom - getEvY(ev))) / sensitivity;
+                       leftCloseness = (sensitivity - (getEvX(ev) - bounds.left)) / sensitivity;
+                       rightCloseness = (sensitivity - (bounds.right - getEvX(ev))) / sensitivity;
+
+                       // translate vertical closeness into velocity.
+                       // mouse must be completely in bounds for velocity to happen.
+                       if (topCloseness >= 0 && topCloseness <= 1) {
+                               topVel = topCloseness * this.scrollSpeed * -1; // negative. for scrolling up
+                       }
+                       else if (bottomCloseness >= 0 && bottomCloseness <= 1) {
+                               topVel = bottomCloseness * this.scrollSpeed;
+                       }
+
+                       // translate horizontal closeness into velocity
+                       if (leftCloseness >= 0 && leftCloseness <= 1) {
+                               leftVel = leftCloseness * this.scrollSpeed * -1; // negative. for scrolling left
+                       }
+                       else if (rightCloseness >= 0 && rightCloseness <= 1) {
+                               leftVel = rightCloseness * this.scrollSpeed;
+                       }
+               }
+
+               this.setScrollVel(topVel, leftVel);
+       },
+
+
+       // Sets the speed-of-scrolling for the scrollEl
+       setScrollVel: function(topVel, leftVel) {
+
+               this.scrollTopVel = topVel;
+               this.scrollLeftVel = leftVel;
+
+               this.constrainScrollVel(); // massages into realistic values
+
+               // if there is non-zero velocity, and an animation loop hasn't already started, then START
+               if ((this.scrollTopVel || this.scrollLeftVel) && !this.scrollIntervalId) {
+                       this.scrollIntervalId = setInterval(
+                               proxy(this, 'scrollIntervalFunc'), // scope to `this`
+                               this.scrollIntervalMs
+                       );
+               }
+       },
+
+
+       // Forces scrollTopVel and scrollLeftVel to be zero if scrolling has already gone all the way
+       constrainScrollVel: function() {
+               var el = this.scrollEl;
+
+               if (this.scrollTopVel < 0) { // scrolling up?
+                       if (el.scrollTop() <= 0) { // already scrolled all the way up?
+                               this.scrollTopVel = 0;
+                       }
+               }
+               else if (this.scrollTopVel > 0) { // scrolling down?
+                       if (el.scrollTop() + el[0].clientHeight >= el[0].scrollHeight) { // already scrolled all the way down?
+                               this.scrollTopVel = 0;
+                       }
+               }
+
+               if (this.scrollLeftVel < 0) { // scrolling left?
+                       if (el.scrollLeft() <= 0) { // already scrolled all the left?
+                               this.scrollLeftVel = 0;
+                       }
+               }
+               else if (this.scrollLeftVel > 0) { // scrolling right?
+                       if (el.scrollLeft() + el[0].clientWidth >= el[0].scrollWidth) { // already scrolled all the way right?
+                               this.scrollLeftVel = 0;
+                       }
+               }
+       },
+
+
+       // This function gets called during every iteration of the scrolling animation loop
+       scrollIntervalFunc: function() {
+               var el = this.scrollEl;
+               var frac = this.scrollIntervalMs / 1000; // considering animation frequency, what the vel should be mult'd by
+
+               // change the value of scrollEl's scroll
+               if (this.scrollTopVel) {
+                       el.scrollTop(el.scrollTop() + this.scrollTopVel * frac);
+               }
+               if (this.scrollLeftVel) {
+                       el.scrollLeft(el.scrollLeft() + this.scrollLeftVel * frac);
+               }
+
+               this.constrainScrollVel(); // since the scroll values changed, recompute the velocities
+
+               // if scrolled all the way, which causes the vels to be zero, stop the animation loop
+               if (!this.scrollTopVel && !this.scrollLeftVel) {
+                       this.endAutoScroll();
+               }
+       },
+
+
+       // Kills any existing scrolling animation loop
+       endAutoScroll: function() {
+               if (this.scrollIntervalId) {
+                       clearInterval(this.scrollIntervalId);
+                       this.scrollIntervalId = null;
+
+                       this.handleScrollEnd();
+               }
+       },
+
+
+       // Get called when the scrollEl is scrolled (NOTE: this is delayed via debounce)
+       handleDebouncedScroll: function() {
+               // recompute all coordinates, but *only* if this is *not* part of our scrolling animation
+               if (!this.scrollIntervalId) {
+                       this.handleScrollEnd();
+               }
+       },
+
+
+       // Called when scrolling has stopped, whether through auto scroll, or the user scrolling
+       handleScrollEnd: function() {
+       }
+
+});
+;;
+
+/* Tracks mouse movements over a component and raises events about which hit the mouse is over.
+------------------------------------------------------------------------------------------------------------------------
+options:
+- subjectEl
+- subjectCenter
+*/
+
+var HitDragListener = DragListener.extend({
+
+       component: null, // converts coordinates to hits
+               // methods: prepareHits, releaseHits, queryHit
+
+       origHit: null, // the hit the mouse was over when listening started
+       hit: null, // the hit the mouse is over
+       coordAdjust: null, // delta that will be added to the mouse coordinates when computing collisions
+
+
+       constructor: function(component, options) {
+               DragListener.call(this, options); // call the super-constructor
+
+               this.component = component;
+       },
+
+
+       // Called when drag listening starts (but a real drag has not necessarily began).
+       // ev might be undefined if dragging was started manually.
+       handleInteractionStart: function(ev) {
+               var subjectEl = this.subjectEl;
+               var subjectRect;
+               var origPoint;
+               var point;
+
+               this.computeCoords();
+
+               if (ev) {
+                       origPoint = { left: getEvX(ev), top: getEvY(ev) };
+                       point = origPoint;
+
+                       // constrain the point to bounds of the element being dragged
+                       if (subjectEl) {
+                               subjectRect = getOuterRect(subjectEl); // used for centering as well
+                               point = constrainPoint(point, subjectRect);
+                       }
+
+                       this.origHit = this.queryHit(point.left, point.top);
+
+                       // treat the center of the subject as the collision point?
+                       if (subjectEl && this.options.subjectCenter) {
+
+                               // only consider the area the subject overlaps the hit. best for large subjects.
+                               // TODO: skip this if hit didn't supply left/right/top/bottom
+                               if (this.origHit) {
+                                       subjectRect = intersectRects(this.origHit, subjectRect) ||
+                                               subjectRect; // in case there is no intersection
+                               }
+
+                               point = getRectCenter(subjectRect);
+                       }
+
+                       this.coordAdjust = diffPoints(point, origPoint); // point - origPoint
+               }
+               else {
+                       this.origHit = null;
+                       this.coordAdjust = null;
+               }
+
+               // call the super-method. do it after origHit has been computed
+               DragListener.prototype.handleInteractionStart.apply(this, arguments);
+       },
+
+
+       // Recomputes the drag-critical positions of elements
+       computeCoords: function() {
+               this.component.prepareHits();
+               this.computeScrollBounds(); // why is this here??????
+       },
+
+
+       // Called when the actual drag has started
+       handleDragStart: function(ev) {
+               var hit;
+
+               DragListener.prototype.handleDragStart.apply(this, arguments); // call the super-method
+
+               // might be different from this.origHit if the min-distance is large
+               hit = this.queryHit(getEvX(ev), getEvY(ev));
+
+               // report the initial hit the mouse is over
+               // especially important if no min-distance and drag starts immediately
+               if (hit) {
+                       this.handleHitOver(hit);
+               }
+       },
+
+
+       // Called when the drag moves
+       handleDrag: function(dx, dy, ev) {
+               var hit;
+
+               DragListener.prototype.handleDrag.apply(this, arguments); // call the super-method
+
+               hit = this.queryHit(getEvX(ev), getEvY(ev));
+
+               if (!isHitsEqual(hit, this.hit)) { // a different hit than before?
+                       if (this.hit) {
+                               this.handleHitOut();
+                       }
+                       if (hit) {
+                               this.handleHitOver(hit);
+                       }
+               }
+       },
+
+
+       // Called when dragging has been stopped
+       handleDragEnd: function() {
+               this.handleHitDone();
+               DragListener.prototype.handleDragEnd.apply(this, arguments); // call the super-method
+       },
+
+
+       // Called when a the mouse has just moved over a new hit
+       handleHitOver: function(hit) {
+               var isOrig = isHitsEqual(hit, this.origHit);
+
+               this.hit = hit;
+
+               this.trigger('hitOver', this.hit, isOrig, this.origHit);
+       },
+
+
+       // Called when the mouse has just moved out of a hit
+       handleHitOut: function() {
+               if (this.hit) {
+                       this.trigger('hitOut', this.hit);
+                       this.handleHitDone();
+                       this.hit = null;
+               }
+       },
+
+
+       // Called after a hitOut. Also called before a dragStop
+       handleHitDone: function() {
+               if (this.hit) {
+                       this.trigger('hitDone', this.hit);
+               }
+       },
+
+
+       // Called when the interaction ends, whether there was a real drag or not
+       handleInteractionEnd: function() {
+               DragListener.prototype.handleInteractionEnd.apply(this, arguments); // call the super-method
+
+               this.origHit = null;
+               this.hit = null;
+
+               this.component.releaseHits();
+       },
+
+
+       // Called when scrolling has stopped, whether through auto scroll, or the user scrolling
+       handleScrollEnd: function() {
+               DragListener.prototype.handleScrollEnd.apply(this, arguments); // call the super-method
+
+               this.computeCoords(); // hits' absolute positions will be in new places. recompute
+       },
+
+
+       // Gets the hit underneath the coordinates for the given mouse event
+       queryHit: function(left, top) {
+
+               if (this.coordAdjust) {
+                       left += this.coordAdjust.left;
+                       top += this.coordAdjust.top;
+               }
+
+               return this.component.queryHit(left, top);
+       }
+
+});
+
+
+// Returns `true` if the hits are identically equal. `false` otherwise. Must be from the same component.
+// Two null values will be considered equal, as two "out of the component" states are the same.
+function isHitsEqual(hit0, hit1) {
+
+       if (!hit0 && !hit1) {
+               return true;
+       }
+
+       if (hit0 && hit1) {
+               return hit0.component === hit1.component &&
+                       isHitPropsWithin(hit0, hit1) &&
+                       isHitPropsWithin(hit1, hit0); // ensures all props are identical
+       }
+
+       return false;
+}
+
+
+// Returns true if all of subHit's non-standard properties are within superHit
+function isHitPropsWithin(subHit, superHit) {
+       for (var propName in subHit) {
+               if (!/^(component|left|right|top|bottom)$/.test(propName)) {
+                       if (subHit[propName] !== superHit[propName]) {
+                               return false;
+                       }
+               }
+       }
+       return true;
+}
+
+;;
+
+/* Creates a clone of an element and lets it track the mouse as it moves
+----------------------------------------------------------------------------------------------------------------------*/
+
+var MouseFollower = Class.extend(ListenerMixin, {
+
+       options: null,
+
+       sourceEl: null, // the element that will be cloned and made to look like it is dragging
+       el: null, // the clone of `sourceEl` that will track the mouse
+       parentEl: null, // the element that `el` (the clone) will be attached to
+
+       // the initial position of el, relative to the offset parent. made to match the initial offset of sourceEl
+       top0: null,
+       left0: null,
+
+       // the absolute coordinates of the initiating touch/mouse action
+       y0: null,
+       x0: null,
+
+       // the number of pixels the mouse has moved from its initial position
+       topDelta: null,
+       leftDelta: null,
+
+       isFollowing: false,
+       isHidden: false,
+       isAnimating: false, // doing the revert animation?
+
+       constructor: function(sourceEl, options) {
+               this.options = options = options || {};
+               this.sourceEl = sourceEl;
+               this.parentEl = options.parentEl ? $(options.parentEl) : sourceEl.parent(); // default to sourceEl's parent
+       },
+
+
+       // Causes the element to start following the mouse
+       start: function(ev) {
+               if (!this.isFollowing) {
+                       this.isFollowing = true;
+
+                       this.y0 = getEvY(ev);
+                       this.x0 = getEvX(ev);
+                       this.topDelta = 0;
+                       this.leftDelta = 0;
+
+                       if (!this.isHidden) {
+                               this.updatePosition();
+                       }
+
+                       if (getEvIsTouch(ev)) {
+                               this.listenTo($(document), 'touchmove', this.handleMove);
+                       }
+                       else {
+                               this.listenTo($(document), 'mousemove', this.handleMove);
+                       }
+               }
+       },
+
+
+       // Causes the element to stop following the mouse. If shouldRevert is true, will animate back to original position.
+       // `callback` gets invoked when the animation is complete. If no animation, it is invoked immediately.
+       stop: function(shouldRevert, callback) {
+               var _this = this;
+               var revertDuration = this.options.revertDuration;
+
+               function complete() { // might be called by .animate(), which might change `this` context
+                       _this.isAnimating = false;
+                       _this.removeElement();
+
+                       _this.top0 = _this.left0 = null; // reset state for future updatePosition calls
+
+                       if (callback) {
+                               callback();
+                       }
+               }
+
+               if (this.isFollowing && !this.isAnimating) { // disallow more than one stop animation at a time
+                       this.isFollowing = false;
+
+                       this.stopListeningTo($(document));
+
+                       if (shouldRevert && revertDuration && !this.isHidden) { // do a revert animation?
+                               this.isAnimating = true;
+                               this.el.animate({
+                                       top: this.top0,
+                                       left: this.left0
+                               }, {
+                                       duration: revertDuration,
+                                       complete: complete
+                               });
+                       }
+                       else {
+                               complete();
+                       }
+               }
+       },
+
+
+       // Gets the tracking element. Create it if necessary
+       getEl: function() {
+               var el = this.el;
+
+               if (!el) {
+                       el = this.el = this.sourceEl.clone()
+                               .addClass(this.options.additionalClass || '')
+                               .css({
+                                       position: 'absolute',
+                                       visibility: '', // in case original element was hidden (commonly through hideEvents())
+                                       display: this.isHidden ? 'none' : '', // for when initially hidden
+                                       margin: 0,
+                                       right: 'auto', // erase and set width instead
+                                       bottom: 'auto', // erase and set height instead
+                                       width: this.sourceEl.width(), // explicit height in case there was a 'right' value
+                                       height: this.sourceEl.height(), // explicit width in case there was a 'bottom' value
+                                       opacity: this.options.opacity || '',
+                                       zIndex: this.options.zIndex
+                               });
+
+                       // we don't want long taps or any mouse interaction causing selection/menus.
+                       // would use preventSelection(), but that prevents selectstart, causing problems.
+                       el.addClass('fc-unselectable');
+
+                       el.appendTo(this.parentEl);
+               }
+
+               return el;
+       },
+
+
+       // Removes the tracking element if it has already been created
+       removeElement: function() {
+               if (this.el) {
+                       this.el.remove();
+                       this.el = null;
+               }
+       },
+
+
+       // Update the CSS position of the tracking element
+       updatePosition: function() {
+               var sourceOffset;
+               var origin;
+
+               this.getEl(); // ensure this.el
+
+               // make sure origin info was computed
+               if (this.top0 === null) {
+                       sourceOffset = this.sourceEl.offset();
+                       origin = this.el.offsetParent().offset();
+                       this.top0 = sourceOffset.top - origin.top;
+                       this.left0 = sourceOffset.left - origin.left;
+               }
+
+               this.el.css({
+                       top: this.top0 + this.topDelta,
+                       left: this.left0 + this.leftDelta
+               });
+       },
+
+
+       // Gets called when the user moves the mouse
+       handleMove: function(ev) {
+               this.topDelta = getEvY(ev) - this.y0;
+               this.leftDelta = getEvX(ev) - this.x0;
+
+               if (!this.isHidden) {
+                       this.updatePosition();
+               }
+       },
+
+
+       // Temporarily makes the tracking element invisible. Can be called before following starts
+       hide: function() {
+               if (!this.isHidden) {
+                       this.isHidden = true;
+                       if (this.el) {
+                               this.el.hide();
+                       }
+               }
+       },
+
+
+       // Show the tracking element after it has been temporarily hidden
+       show: function() {
+               if (this.isHidden) {
+                       this.isHidden = false;
+                       this.updatePosition();
+                       this.getEl().show();
+               }
+       }
+
+});
+
+;;
+
+/* An abstract class comprised of a "grid" of areas that each represent a specific datetime
+----------------------------------------------------------------------------------------------------------------------*/
+
+var Grid = FC.Grid = Class.extend(ListenerMixin, MouseIgnorerMixin, {
+
+       // self-config, overridable by subclasses
+       hasDayInteractions: true, // can user click/select ranges of time?
+
+       view: null, // a View object
+       isRTL: null, // shortcut to the view's isRTL option
+
+       start: null,
+       end: null,
+
+       el: null, // the containing element
+       elsByFill: null, // a hash of jQuery element sets used for rendering each fill. Keyed by fill name.
+
+       // derived from options
+       eventTimeFormat: null,
+       displayEventTime: null,
+       displayEventEnd: null,
+
+       minResizeDuration: null, // TODO: hack. set by subclasses. minumum event resize duration
+
+       // if defined, holds the unit identified (ex: "year" or "month") that determines the level of granularity
+       // of the date areas. if not defined, assumes to be day and time granularity.
+       // TODO: port isTimeScale into same system?
+       largeUnit: null,
+
+       dayDragListener: null,
+       segDragListener: null,
+       segResizeListener: null,
+       externalDragListener: null,
+
+
+       constructor: function(view) {
+               this.view = view;
+               this.isRTL = view.opt('isRTL');
+               this.elsByFill = {};
+
+               this.dayDragListener = this.buildDayDragListener();
+               this.initMouseIgnoring();
+       },
+
+
+       /* Options
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Generates the format string used for event time text, if not explicitly defined by 'timeFormat'
+       computeEventTimeFormat: function() {
+               return this.view.opt('smallTimeFormat');
+       },
+
+
+       // Determines whether events should have their end times displayed, if not explicitly defined by 'displayEventTime'.
+       // Only applies to non-all-day events.
+       computeDisplayEventTime: function() {
+               return true;
+       },
+
+
+       // Determines whether events should have their end times displayed, if not explicitly defined by 'displayEventEnd'
+       computeDisplayEventEnd: function() {
+               return true;
+       },
+
+
+       /* Dates
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Tells the grid about what period of time to display.
+       // Any date-related internal data should be generated.
+       setRange: function(range) {
+               this.start = range.start.clone();
+               this.end = range.end.clone();
+
+               this.rangeUpdated();
+               this.processRangeOptions();
+       },
+
+
+       // Called when internal variables that rely on the range should be updated
+       rangeUpdated: function() {
+       },
+
+
+       // Updates values that rely on options and also relate to range
+       processRangeOptions: function() {
+               var view = this.view;
+               var displayEventTime;
+               var displayEventEnd;
+
+               this.eventTimeFormat =
+                       view.opt('eventTimeFormat') ||
+                       view.opt('timeFormat') || // deprecated
+                       this.computeEventTimeFormat();
+
+               displayEventTime = view.opt('displayEventTime');
+               if (displayEventTime == null) {
+                       displayEventTime = this.computeDisplayEventTime(); // might be based off of range
+               }
+
+               displayEventEnd = view.opt('displayEventEnd');
+               if (displayEventEnd == null) {
+                       displayEventEnd = this.computeDisplayEventEnd(); // might be based off of range
+               }
+
+               this.displayEventTime = displayEventTime;
+               this.displayEventEnd = displayEventEnd;
+       },
+
+
+       // Converts a span (has unzoned start/end and any other grid-specific location information)
+       // into an array of segments (pieces of events whose format is decided by the grid).
+       spanToSegs: function(span) {
+               // subclasses must implement
+       },
+
+
+       // Diffs the two dates, returning a duration, based on granularity of the grid
+       // TODO: port isTimeScale into this system?
+       diffDates: function(a, b) {
+               if (this.largeUnit) {
+                       return diffByUnit(a, b, this.largeUnit);
+               }
+               else {
+                       return diffDayTime(a, b);
+               }
+       },
+
+
+       /* Hit Area
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Called before one or more queryHit calls might happen. Should prepare any cached coordinates for queryHit
+       prepareHits: function() {
+       },
+
+
+       // Called when queryHit calls have subsided. Good place to clear any coordinate caches.
+       releaseHits: function() {
+       },
+
+
+       // Given coordinates from the topleft of the document, return data about the date-related area underneath.
+       // Can return an object with arbitrary properties (although top/right/left/bottom are encouraged).
+       // Must have a `grid` property, a reference to this current grid. TODO: avoid this
+       // The returned object will be processed by getHitSpan and getHitEl.
+       queryHit: function(leftOffset, topOffset) {
+       },
+
+
+       // Given position-level information about a date-related area within the grid,
+       // should return an object with at least a start/end date. Can provide other information as well.
+       getHitSpan: function(hit) {
+       },
+
+
+       // Given position-level information about a date-related area within the grid,
+       // should return a jQuery element that best represents it. passed to dayClick callback.
+       getHitEl: function(hit) {
+       },
+
+
+       /* Rendering
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Sets the container element that the grid should render inside of.
+       // Does other DOM-related initializations.
+       setElement: function(el) {
+               this.el = el;
+
+               if (this.hasDayInteractions) {
+                       preventSelection(el);
+
+                       this.bindDayHandler('touchstart', this.dayTouchStart);
+                       this.bindDayHandler('mousedown', this.dayMousedown);
+               }
+
+               // attach event-element-related handlers. in Grid.events
+               // same garbage collection note as above.
+               this.bindSegHandlers();
+
+               this.bindGlobalHandlers();
+       },
+
+
+       bindDayHandler: function(name, handler) {
+               var _this = this;
+
+               // attach a handler to the grid's root element.
+               // jQuery will take care of unregistering them when removeElement gets called.
+               this.el.on(name, function(ev) {
+                       if (
+                               !$(ev.target).is(
+                                       _this.segSelector + ',' + // directly on an event element
+                                       _this.segSelector + ' *,' + // within an event element
+                                       '.fc-more,' + // a "more.." link
+                                       'a[data-goto]' // a clickable nav link
+                               )
+                       ) {
+                               return handler.call(_this, ev);
+                       }
+               });
+       },
+
+
+       // Removes the grid's container element from the DOM. Undoes any other DOM-related attachments.
+       // DOES NOT remove any content beforehand (doesn't clear events or call unrenderDates), unlike View
+       removeElement: function() {
+               this.unbindGlobalHandlers();
+               this.clearDragListeners();
+
+               this.el.remove();
+
+               // NOTE: we don't null-out this.el for the same reasons we don't do it within View::removeElement
+       },
+
+
+       // Renders the basic structure of grid view before any content is rendered
+       renderSkeleton: function() {
+               // subclasses should implement
+       },
+
+
+       // Renders the grid's date-related content (like areas that represent days/times).
+       // Assumes setRange has already been called and the skeleton has already been rendered.
+       renderDates: function() {
+               // subclasses should implement
+       },
+
+
+       // Unrenders the grid's date-related content
+       unrenderDates: function() {
+               // subclasses should implement
+       },
+
+
+       /* Handlers
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Binds DOM handlers to elements that reside outside the grid, such as the document
+       bindGlobalHandlers: function() {
+               this.listenTo($(document), {
+                       dragstart: this.externalDragStart, // jqui
+                       sortstart: this.externalDragStart // jqui
+               });
+       },
+
+
+       // Unbinds DOM handlers from elements that reside outside the grid
+       unbindGlobalHandlers: function() {
+               this.stopListeningTo($(document));
+       },
+
+
+       // Process a mousedown on an element that represents a day. For day clicking and selecting.
+       dayMousedown: function(ev) {
+               if (!this.isIgnoringMouse) {
+                       this.dayDragListener.startInteraction(ev, {
+                               //distance: 5, // needs more work if we want dayClick to fire correctly
+                       });
+               }
+       },
+
+
+       dayTouchStart: function(ev) {
+               var view = this.view;
+
+               // HACK to prevent a user's clickaway for unselecting a range or an event
+               // from causing a dayClick.
+               if (view.isSelected || view.selectedEvent) {
+                       this.tempIgnoreMouse();
+               }
+
+               this.dayDragListener.startInteraction(ev, {
+                       delay: this.view.opt('longPressDelay')
+               });
+       },
+
+
+       // Creates a listener that tracks the user's drag across day elements.
+       // For day clicking and selecting.
+       buildDayDragListener: function() {
+               var _this = this;
+               var view = this.view;
+               var isSelectable = view.opt('selectable');
+               var dayClickHit; // null if invalid dayClick
+               var selectionSpan; // null if invalid selection
+
+               // this listener tracks a mousedown on a day element, and a subsequent drag.
+               // if the drag ends on the same day, it is a 'dayClick'.
+               // if 'selectable' is enabled, this listener also detects selections.
+               var dragListener = new HitDragListener(this, {
+                       scroll: view.opt('dragScroll'),
+                       interactionStart: function() {
+                               dayClickHit = dragListener.origHit; // for dayClick, where no dragging happens
+                               selectionSpan = null;
+                       },
+                       dragStart: function() {
+                               view.unselect(); // since we could be rendering a new selection, we want to clear any old one
+                       },
+                       hitOver: function(hit, isOrig, origHit) {
+                               if (origHit) { // click needs to have started on a hit
+
+                                       // if user dragged to another cell at any point, it can no longer be a dayClick
+                                       if (!isOrig) {
+                                               dayClickHit = null;
+                                       }
+
+                                       if (isSelectable) {
+                                               selectionSpan = _this.computeSelection(
+                                                       _this.getHitSpan(origHit),
+                                                       _this.getHitSpan(hit)
+                                               );
+                                               if (selectionSpan) {
+                                                       _this.renderSelection(selectionSpan);
+                                               }
+                                               else if (selectionSpan === false) {
+                                                       disableCursor();
+                                               }
+                                       }
+                               }
+                       },
+                       hitOut: function() { // called before mouse moves to a different hit OR moved out of all hits
+                               dayClickHit = null;
+                               selectionSpan = null;
+                               _this.unrenderSelection();
+                       },
+                       hitDone: function() { // called after a hitOut OR before a dragEnd
+                               enableCursor();
+                       },
+                       interactionEnd: function(ev, isCancelled) {
+                               if (!isCancelled) {
+                                       if (
+                                               dayClickHit &&
+                                               !_this.isIgnoringMouse // see hack in dayTouchStart
+                                       ) {
+                                               view.triggerDayClick(
+                                                       _this.getHitSpan(dayClickHit),
+                                                       _this.getHitEl(dayClickHit),
+                                                       ev
+                                               );
+                                       }
+                                       if (selectionSpan) {
+                                               // the selection will already have been rendered. just report it
+                                               view.reportSelection(selectionSpan, ev);
+                                       }
+                               }
+                       }
+               });
+
+               return dragListener;
+       },
+
+
+       // Kills all in-progress dragging.
+       // Useful for when public API methods that result in re-rendering are invoked during a drag.
+       // Also useful for when touch devices misbehave and don't fire their touchend.
+       clearDragListeners: function() {
+               this.dayDragListener.endInteraction();
+
+               if (this.segDragListener) {
+                       this.segDragListener.endInteraction(); // will clear this.segDragListener
+               }
+               if (this.segResizeListener) {
+                       this.segResizeListener.endInteraction(); // will clear this.segResizeListener
+               }
+               if (this.externalDragListener) {
+                       this.externalDragListener.endInteraction(); // will clear this.externalDragListener
+               }
+       },
+
+
+       /* Event Helper
+       ------------------------------------------------------------------------------------------------------------------*/
+       // TODO: should probably move this to Grid.events, like we did event dragging / resizing
+
+
+       // Renders a mock event at the given event location, which contains zoned start/end properties.
+       // Returns all mock event elements.
+       renderEventLocationHelper: function(eventLocation, sourceSeg) {
+               var fakeEvent = this.fabricateHelperEvent(eventLocation, sourceSeg);
+
+               return this.renderHelper(fakeEvent, sourceSeg); // do the actual rendering
+       },
+
+
+       // Builds a fake event given zoned event date properties and a segment is should be inspired from.
+       // The range's end can be null, in which case the mock event that is rendered will have a null end time.
+       // `sourceSeg` is the internal segment object involved in the drag. If null, something external is dragging.
+       fabricateHelperEvent: function(eventLocation, sourceSeg) {
+               var fakeEvent = sourceSeg ? createObject(sourceSeg.event) : {}; // mask the original event object if possible
+
+               fakeEvent.start = eventLocation.start.clone();
+               fakeEvent.end = eventLocation.end ? eventLocation.end.clone() : null;
+               fakeEvent.allDay = null; // force it to be freshly computed by normalizeEventDates
+               this.view.calendar.normalizeEventDates(fakeEvent);
+
+               // this extra className will be useful for differentiating real events from mock events in CSS
+               fakeEvent.className = (fakeEvent.className || []).concat('fc-helper');
+
+               // if something external is being dragged in, don't render a resizer
+               if (!sourceSeg) {
+                       fakeEvent.editable = false;
+               }
+
+               return fakeEvent;
+       },
+
+
+       // Renders a mock event. Given zoned event date properties.
+       // Must return all mock event elements.
+       renderHelper: function(eventLocation, sourceSeg) {
+               // subclasses must implement
+       },
+
+
+       // Unrenders a mock event
+       unrenderHelper: function() {
+               // subclasses must implement
+       },
+
+
+       /* Selection
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a visual indication of a selection. Will highlight by default but can be overridden by subclasses.
+       // Given a span (unzoned start/end and other misc data)
+       renderSelection: function(span) {
+               this.renderHighlight(span);
+       },
+
+
+       // Unrenders any visual indications of a selection. Will unrender a highlight by default.
+       unrenderSelection: function() {
+               this.unrenderHighlight();
+       },
+
+
+       // Given the first and last date-spans of a selection, returns another date-span object.
+       // Subclasses can override and provide additional data in the span object. Will be passed to renderSelection().
+       // Will return false if the selection is invalid and this should be indicated to the user.
+       // Will return null/undefined if a selection invalid but no error should be reported.
+       computeSelection: function(span0, span1) {
+               var span = this.computeSelectionSpan(span0, span1);
+
+               if (span && !this.view.calendar.isSelectionSpanAllowed(span)) {
+                       return false;
+               }
+
+               return span;
+       },
+
+
+       // Given two spans, must return the combination of the two.
+       // TODO: do this separation of concerns (combining VS validation) for event dnd/resize too.
+       computeSelectionSpan: function(span0, span1) {
+               var dates = [ span0.start, span0.end, span1.start, span1.end ];
+
+               dates.sort(compareNumbers); // sorts chronologically. works with Moments
+
+               return { start: dates[0].clone(), end: dates[3].clone() };
+       },
+
+
+       /* Highlight
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders an emphasis on the given date range. Given a span (unzoned start/end and other misc data)
+       renderHighlight: function(span) {
+               this.renderFill('highlight', this.spanToSegs(span));
+       },
+
+
+       // Unrenders the emphasis on a date range
+       unrenderHighlight: function() {
+               this.unrenderFill('highlight');
+       },
+
+
+       // Generates an array of classNames for rendering the highlight. Used by the fill system.
+       highlightSegClasses: function() {
+               return [ 'fc-highlight' ];
+       },
+
+
+       /* Business Hours
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderBusinessHours: function() {
+       },
+
+
+       unrenderBusinessHours: function() {
+       },
+
+
+       /* Now Indicator
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       getNowIndicatorUnit: function() {
+       },
+
+
+       renderNowIndicator: function(date) {
+       },
+
+
+       unrenderNowIndicator: function() {
+       },
+
+
+       /* Fill System (highlight, background events, business hours)
+       --------------------------------------------------------------------------------------------------------------------
+       TODO: remove this system. like we did in TimeGrid
+       */
+
+
+       // Renders a set of rectangles over the given segments of time.
+       // MUST RETURN a subset of segs, the segs that were actually rendered.
+       // Responsible for populating this.elsByFill. TODO: better API for expressing this requirement
+       renderFill: function(type, segs) {
+               // subclasses must implement
+       },
+
+
+       // Unrenders a specific type of fill that is currently rendered on the grid
+       unrenderFill: function(type) {
+               var el = this.elsByFill[type];
+
+               if (el) {
+                       el.remove();
+                       delete this.elsByFill[type];
+               }
+       },
+
+
+       // Renders and assigns an `el` property for each fill segment. Generic enough to work with different types.
+       // Only returns segments that successfully rendered.
+       // To be harnessed by renderFill (implemented by subclasses).
+       // Analagous to renderFgSegEls.
+       renderFillSegEls: function(type, segs) {
+               var _this = this;
+               var segElMethod = this[type + 'SegEl'];
+               var html = '';
+               var renderedSegs = [];
+               var i;
+
+               if (segs.length) {
+
+                       // build a large concatenation of segment HTML
+                       for (i = 0; i < segs.length; i++) {
+                               html += this.fillSegHtml(type, segs[i]);
+                       }
+
+                       // Grab individual elements from the combined HTML string. Use each as the default rendering.
+                       // Then, compute the 'el' for each segment.
+                       $(html).each(function(i, node) {
+                               var seg = segs[i];
+                               var el = $(node);
+
+                               // allow custom filter methods per-type
+                               if (segElMethod) {
+                                       el = segElMethod.call(_this, seg, el);
+                               }
+
+                               if (el) { // custom filters did not cancel the render
+                                       el = $(el); // allow custom filter to return raw DOM node
+
+                                       // correct element type? (would be bad if a non-TD were inserted into a table for example)
+                                       if (el.is(_this.fillSegTag)) {
+                                               seg.el = el;
+                                               renderedSegs.push(seg);
+                                       }
+                               }
+                       });
+               }
+
+               return renderedSegs;
+       },
+
+
+       fillSegTag: 'div', // subclasses can override
+
+
+       // Builds the HTML needed for one fill segment. Generic enough to work with different types.
+       fillSegHtml: function(type, seg) {
+
+               // custom hooks per-type
+               var classesMethod = this[type + 'SegClasses'];
+               var cssMethod = this[type + 'SegCss'];
+
+               var classes = classesMethod ? classesMethod.call(this, seg) : [];
+               var css = cssToStr(cssMethod ? cssMethod.call(this, seg) : {});
+
+               return '<' + this.fillSegTag +
+                       (classes.length ? ' class="' + classes.join(' ') + '"' : '') +
+                       (css ? ' style="' + css + '"' : '') +
+                       ' />';
+       },
+
+
+
+       /* Generic rendering utilities for subclasses
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Computes HTML classNames for a single-day element
+       getDayClasses: function(date) {
+               var view = this.view;
+               var today = view.calendar.getNow();
+               var classes = [ 'fc-' + dayIDs[date.day()] ];
+
+               if (
+                       view.intervalDuration.as('months') == 1 &&
+                       date.month() != view.intervalStart.month()
+               ) {
+                       classes.push('fc-other-month');
+               }
+
+               if (date.isSame(today, 'day')) {
+                       classes.push(
+                               'fc-today',
+                               view.highlightStateClass
+                       );
+               }
+               else if (date < today) {
+                       classes.push('fc-past');
+               }
+               else {
+                       classes.push('fc-future');
+               }
+
+               return classes;
+       }
+
+});
+
+;;
+
+/* Event-rendering and event-interaction methods for the abstract Grid class
+----------------------------------------------------------------------------------------------------------------------*/
+
+Grid.mixin({
+
+       // self-config, overridable by subclasses
+       segSelector: '.fc-event-container > *', // what constitutes an event element?
+
+       mousedOverSeg: null, // the segment object the user's mouse is over. null if over nothing
+       isDraggingSeg: false, // is a segment being dragged? boolean
+       isResizingSeg: false, // is a segment being resized? boolean
+       isDraggingExternal: false, // jqui-dragging an external element? boolean
+       segs: null, // the *event* segments currently rendered in the grid. TODO: rename to `eventSegs`
+
+
+       // Renders the given events onto the grid
+       renderEvents: function(events) {
+               var bgEvents = [];
+               var fgEvents = [];
+               var i;
+
+               for (i = 0; i < events.length; i++) {
+                       (isBgEvent(events[i]) ? bgEvents : fgEvents).push(events[i]);
+               }
+
+               this.segs = [].concat( // record all segs
+                       this.renderBgEvents(bgEvents),
+                       this.renderFgEvents(fgEvents)
+               );
+       },
+
+
+       renderBgEvents: function(events) {
+               var segs = this.eventsToSegs(events);
+
+               // renderBgSegs might return a subset of segs, segs that were actually rendered
+               return this.renderBgSegs(segs) || segs;
+       },
+
+
+       renderFgEvents: function(events) {
+               var segs = this.eventsToSegs(events);
+
+               // renderFgSegs might return a subset of segs, segs that were actually rendered
+               return this.renderFgSegs(segs) || segs;
+       },
+
+
+       // Unrenders all events currently rendered on the grid
+       unrenderEvents: function() {
+               this.handleSegMouseout(); // trigger an eventMouseout if user's mouse is over an event
+               this.clearDragListeners();
+
+               this.unrenderFgSegs();
+               this.unrenderBgSegs();
+
+               this.segs = null;
+       },
+
+
+       // Retrieves all rendered segment objects currently rendered on the grid
+       getEventSegs: function() {
+               return this.segs || [];
+       },
+
+
+       /* Foreground Segment Rendering
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders foreground event segments onto the grid. May return a subset of segs that were rendered.
+       renderFgSegs: function(segs) {
+               // subclasses must implement
+       },
+
+
+       // Unrenders all currently rendered foreground segments
+       unrenderFgSegs: function() {
+               // subclasses must implement
+       },
+
+
+       // Renders and assigns an `el` property for each foreground event segment.
+       // Only returns segments that successfully rendered.
+       // A utility that subclasses may use.
+       renderFgSegEls: function(segs, disableResizing) {
+               var view = this.view;
+               var html = '';
+               var renderedSegs = [];
+               var i;
+
+               if (segs.length) { // don't build an empty html string
+
+                       // build a large concatenation of event segment HTML
+                       for (i = 0; i < segs.length; i++) {
+                               html += this.fgSegHtml(segs[i], disableResizing);
+                       }
+
+                       // Grab individual elements from the combined HTML string. Use each as the default rendering.
+                       // Then, compute the 'el' for each segment. An el might be null if the eventRender callback returned false.
+                       $(html).each(function(i, node) {
+                               var seg = segs[i];
+                               var el = view.resolveEventEl(seg.event, $(node));
+
+                               if (el) {
+                                       el.data('fc-seg', seg); // used by handlers
+                                       seg.el = el;
+                                       renderedSegs.push(seg);
+                               }
+                       });
+               }
+
+               return renderedSegs;
+       },
+
+
+       // Generates the HTML for the default rendering of a foreground event segment. Used by renderFgSegEls()
+       fgSegHtml: function(seg, disableResizing) {
+               // subclasses should implement
+       },
+
+
+       /* Background Segment Rendering
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders the given background event segments onto the grid.
+       // Returns a subset of the segs that were actually rendered.
+       renderBgSegs: function(segs) {
+               return this.renderFill('bgEvent', segs);
+       },
+
+
+       // Unrenders all the currently rendered background event segments
+       unrenderBgSegs: function() {
+               this.unrenderFill('bgEvent');
+       },
+
+
+       // Renders a background event element, given the default rendering. Called by the fill system.
+       bgEventSegEl: function(seg, el) {
+               return this.view.resolveEventEl(seg.event, el); // will filter through eventRender
+       },
+
+
+       // Generates an array of classNames to be used for the default rendering of a background event.
+       // Called by fillSegHtml.
+       bgEventSegClasses: function(seg) {
+               var event = seg.event;
+               var source = event.source || {};
+
+               return [ 'fc-bgevent' ].concat(
+                       event.className,
+                       source.className || []
+               );
+       },
+
+
+       // Generates a semicolon-separated CSS string to be used for the default rendering of a background event.
+       // Called by fillSegHtml.
+       bgEventSegCss: function(seg) {
+               return {
+                       'background-color': this.getSegSkinCss(seg)['background-color']
+               };
+       },
+
+
+       // Generates an array of classNames to be used for the rendering business hours overlay. Called by the fill system.
+       // Called by fillSegHtml.
+       businessHoursSegClasses: function(seg) {
+               return [ 'fc-nonbusiness', 'fc-bgevent' ];
+       },
+
+
+       /* Business Hours
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Compute business hour segs for the grid's current date range.
+       // Caller must ask if whole-day business hours are needed.
+       buildBusinessHourSegs: function(wholeDay) {
+               var events = this.view.calendar.getCurrentBusinessHourEvents(wholeDay);
+
+               // HACK. Eventually refactor business hours "events" system.
+               // If no events are given, but businessHours is activated, this means the entire visible range should be
+               // marked as *not* business-hours, via inverse-background rendering.
+               if (
+                       !events.length &&
+                       this.view.calendar.options.businessHours // don't access view option. doesn't update with dynamic options
+               ) {
+                       events = [
+                               $.extend({}, BUSINESS_HOUR_EVENT_DEFAULTS, {
+                                       start: this.view.end, // guaranteed out-of-range
+                                       end: this.view.end,   // "
+                                       dow: null
+                               })
+                       ];
+               }
+
+               return this.eventsToSegs(events);
+       },
+
+
+       /* Handlers
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Attaches event-element-related handlers for *all* rendered event segments of the view.
+       bindSegHandlers: function() {
+               this.bindSegHandlersToEl(this.el);
+       },
+
+
+       // Attaches event-element-related handlers to an arbitrary container element. leverages bubbling.
+       bindSegHandlersToEl: function(el) {
+               this.bindSegHandlerToEl(el, 'touchstart', this.handleSegTouchStart);
+               this.bindSegHandlerToEl(el, 'touchend', this.handleSegTouchEnd);
+               this.bindSegHandlerToEl(el, 'mouseenter', this.handleSegMouseover);
+               this.bindSegHandlerToEl(el, 'mouseleave', this.handleSegMouseout);
+               this.bindSegHandlerToEl(el, 'mousedown', this.handleSegMousedown);
+               this.bindSegHandlerToEl(el, 'click', this.handleSegClick);
+       },
+
+
+       // Executes a handler for any a user-interaction on a segment.
+       // Handler gets called with (seg, ev), and with the `this` context of the Grid
+       bindSegHandlerToEl: function(el, name, handler) {
+               var _this = this;
+
+               el.on(name, this.segSelector, function(ev) {
+                       var seg = $(this).data('fc-seg'); // grab segment data. put there by View::renderEvents
+
+                       // only call the handlers if there is not a drag/resize in progress
+                       if (seg && !_this.isDraggingSeg && !_this.isResizingSeg) {
+                               return handler.call(_this, seg, ev); // context will be the Grid
+                       }
+               });
+       },
+
+
+       handleSegClick: function(seg, ev) {
+               var res = this.view.trigger('eventClick', seg.el[0], seg.event, ev); // can return `false` to cancel
+               if (res === false) {
+                       ev.preventDefault();
+               }
+       },
+
+
+       // Updates internal state and triggers handlers for when an event element is moused over
+       handleSegMouseover: function(seg, ev) {
+               if (
+                       !this.isIgnoringMouse &&
+                       !this.mousedOverSeg
+               ) {
+                       this.mousedOverSeg = seg;
+                       if (this.view.isEventResizable(seg.event)) {
+                               seg.el.addClass('fc-allow-mouse-resize');
+                       }
+                       this.view.trigger('eventMouseover', seg.el[0], seg.event, ev);
+               }
+       },
+
+
+       // Updates internal state and triggers handlers for when an event element is moused out.
+       // Can be given no arguments, in which case it will mouseout the segment that was previously moused over.
+       handleSegMouseout: function(seg, ev) {
+               ev = ev || {}; // if given no args, make a mock mouse event
+
+               if (this.mousedOverSeg) {
+                       seg = seg || this.mousedOverSeg; // if given no args, use the currently moused-over segment
+                       this.mousedOverSeg = null;
+                       if (this.view.isEventResizable(seg.event)) {
+                               seg.el.removeClass('fc-allow-mouse-resize');
+                       }
+                       this.view.trigger('eventMouseout', seg.el[0], seg.event, ev);
+               }
+       },
+
+
+       handleSegMousedown: function(seg, ev) {
+               var isResizing = this.startSegResize(seg, ev, { distance: 5 });
+
+               if (!isResizing && this.view.isEventDraggable(seg.event)) {
+                       this.buildSegDragListener(seg)
+                               .startInteraction(ev, {
+                                       distance: 5
+                               });
+               }
+       },
+
+
+       handleSegTouchStart: function(seg, ev) {
+               var view = this.view;
+               var event = seg.event;
+               var isSelected = view.isEventSelected(event);
+               var isDraggable = view.isEventDraggable(event);
+               var isResizable = view.isEventResizable(event);
+               var isResizing = false;
+               var dragListener;
+
+               if (isSelected && isResizable) {
+                       // only allow resizing of the event is selected
+                       isResizing = this.startSegResize(seg, ev);
+               }
+
+               if (!isResizing && (isDraggable || isResizable)) { // allowed to be selected?
+
+                       dragListener = isDraggable ?
+                               this.buildSegDragListener(seg) :
+                               this.buildSegSelectListener(seg); // seg isn't draggable, but still needs to be selected
+
+                       dragListener.startInteraction(ev, { // won't start if already started
+                               delay: isSelected ? 0 : this.view.opt('longPressDelay') // do delay if not already selected
+                       });
+               }
+
+               // a long tap simulates a mouseover. ignore this bogus mouseover.
+               this.tempIgnoreMouse();
+       },
+
+
+       handleSegTouchEnd: function(seg, ev) {
+               // touchstart+touchend = click, which simulates a mouseover.
+               // ignore this bogus mouseover.
+               this.tempIgnoreMouse();
+       },
+
+
+       // returns boolean whether resizing actually started or not.
+       // assumes the seg allows resizing.
+       // `dragOptions` are optional.
+       startSegResize: function(seg, ev, dragOptions) {
+               if ($(ev.target).is('.fc-resizer')) {
+                       this.buildSegResizeListener(seg, $(ev.target).is('.fc-start-resizer'))
+                               .startInteraction(ev, dragOptions);
+                       return true;
+               }
+               return false;
+       },
+
+
+
+       /* Event Dragging
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Builds a listener that will track user-dragging on an event segment.
+       // Generic enough to work with any type of Grid.
+       // Has side effect of setting/unsetting `segDragListener`
+       buildSegDragListener: function(seg) {
+               var _this = this;
+               var view = this.view;
+               var calendar = view.calendar;
+               var el = seg.el;
+               var event = seg.event;
+               var isDragging;
+               var mouseFollower; // A clone of the original element that will move with the mouse
+               var dropLocation; // zoned event date properties
+
+               if (this.segDragListener) {
+                       return this.segDragListener;
+               }
+
+               // Tracks mouse movement over the *view's* coordinate map. Allows dragging and dropping between subcomponents
+               // of the view.
+               var dragListener = this.segDragListener = new HitDragListener(view, {
+                       scroll: view.opt('dragScroll'),
+                       subjectEl: el,
+                       subjectCenter: true,
+                       interactionStart: function(ev) {
+                               seg.component = _this; // for renderDrag
+                               isDragging = false;
+                               mouseFollower = new MouseFollower(seg.el, {
+                                       additionalClass: 'fc-dragging',
+                                       parentEl: view.el,
+                                       opacity: dragListener.isTouch ? null : view.opt('dragOpacity'),
+                                       revertDuration: view.opt('dragRevertDuration'),
+                                       zIndex: 2 // one above the .fc-view
+                               });
+                               mouseFollower.hide(); // don't show until we know this is a real drag
+                               mouseFollower.start(ev);
+                       },
+                       dragStart: function(ev) {
+                               if (dragListener.isTouch && !view.isEventSelected(event)) {
+                                       // if not previously selected, will fire after a delay. then, select the event
+                                       view.selectEvent(event);
+                               }
+                               isDragging = true;
+                               _this.handleSegMouseout(seg, ev); // ensure a mouseout on the manipulated event has been reported
+                               _this.segDragStart(seg, ev);
+                               view.hideEvent(event); // hide all event segments. our mouseFollower will take over
+                       },
+                       hitOver: function(hit, isOrig, origHit) {
+                               var dragHelperEls;
+
+                               // starting hit could be forced (DayGrid.limit)
+                               if (seg.hit) {
+                                       origHit = seg.hit;
+                               }
+
+                               // since we are querying the parent view, might not belong to this grid
+                               dropLocation = _this.computeEventDrop(
+                                       origHit.component.getHitSpan(origHit),
+                                       hit.component.getHitSpan(hit),
+                                       event
+                               );
+
+                               if (dropLocation && !calendar.isEventSpanAllowed(_this.eventToSpan(dropLocation), event)) {
+                                       disableCursor();
+                                       dropLocation = null;
+                               }
+
+                               // if a valid drop location, have the subclass render a visual indication
+                               if (dropLocation && (dragHelperEls = view.renderDrag(dropLocation, seg))) {
+
+                                       dragHelperEls.addClass('fc-dragging');
+                                       if (!dragListener.isTouch) {
+                                               _this.applyDragOpacity(dragHelperEls);
+                                       }
+
+                                       mouseFollower.hide(); // if the subclass is already using a mock event "helper", hide our own
+                               }
+                               else {
+                                       mouseFollower.show(); // otherwise, have the helper follow the mouse (no snapping)
+                               }
+
+                               if (isOrig) {
+                                       dropLocation = null; // needs to have moved hits to be a valid drop
+                               }
+                       },
+                       hitOut: function() { // called before mouse moves to a different hit OR moved out of all hits
+                               view.unrenderDrag(); // unrender whatever was done in renderDrag
+                               mouseFollower.show(); // show in case we are moving out of all hits
+                               dropLocation = null;
+                       },
+                       hitDone: function() { // Called after a hitOut OR before a dragEnd
+                               enableCursor();
+                       },
+                       interactionEnd: function(ev) {
+                               delete seg.component; // prevent side effects
+
+                               // do revert animation if hasn't changed. calls a callback when finished (whether animation or not)
+                               mouseFollower.stop(!dropLocation, function() {
+                                       if (isDragging) {
+                                               view.unrenderDrag();
+                                               view.showEvent(event);
+                                               _this.segDragStop(seg, ev);
+                                       }
+                                       if (dropLocation) {
+                                               view.reportEventDrop(event, dropLocation, this.largeUnit, el, ev);
+                                       }
+                               });
+                               _this.segDragListener = null;
+                       }
+               });
+
+               return dragListener;
+       },
+
+
+       // seg isn't draggable, but let's use a generic DragListener
+       // simply for the delay, so it can be selected.
+       // Has side effect of setting/unsetting `segDragListener`
+       buildSegSelectListener: function(seg) {
+               var _this = this;
+               var view = this.view;
+               var event = seg.event;
+
+               if (this.segDragListener) {
+                       return this.segDragListener;
+               }
+
+               var dragListener = this.segDragListener = new DragListener({
+                       dragStart: function(ev) {
+                               if (dragListener.isTouch && !view.isEventSelected(event)) {
+                                       // if not previously selected, will fire after a delay. then, select the event
+                                       view.selectEvent(event);
+                               }
+                       },
+                       interactionEnd: function(ev) {
+                               _this.segDragListener = null;
+                       }
+               });
+
+               return dragListener;
+       },
+
+
+       // Called before event segment dragging starts
+       segDragStart: function(seg, ev) {
+               this.isDraggingSeg = true;
+               this.view.trigger('eventDragStart', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy
+       },
+
+
+       // Called after event segment dragging stops
+       segDragStop: function(seg, ev) {
+               this.isDraggingSeg = false;
+               this.view.trigger('eventDragStop', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy
+       },
+
+
+       // Given the spans an event drag began, and the span event was dropped, calculates the new zoned start/end/allDay
+       // values for the event. Subclasses may override and set additional properties to be used by renderDrag.
+       // A falsy returned value indicates an invalid drop.
+       // DOES NOT consider overlap/constraint.
+       computeEventDrop: function(startSpan, endSpan, event) {
+               var calendar = this.view.calendar;
+               var dragStart = startSpan.start;
+               var dragEnd = endSpan.start;
+               var delta;
+               var dropLocation; // zoned event date properties
+
+               if (dragStart.hasTime() === dragEnd.hasTime()) {
+                       delta = this.diffDates(dragEnd, dragStart);
+
+                       // if an all-day event was in a timed area and it was dragged to a different time,
+                       // guarantee an end and adjust start/end to have times
+                       if (event.allDay && durationHasTime(delta)) {
+                               dropLocation = {
+                                       start: event.start.clone(),
+                                       end: calendar.getEventEnd(event), // will be an ambig day
+                                       allDay: false // for normalizeEventTimes
+                               };
+                               calendar.normalizeEventTimes(dropLocation);
+                       }
+                       // othewise, work off existing values
+                       else {
+                               dropLocation = pluckEventDateProps(event);
+                       }
+
+                       dropLocation.start.add(delta);
+                       if (dropLocation.end) {
+                               dropLocation.end.add(delta);
+                       }
+               }
+               else {
+                       // if switching from day <-> timed, start should be reset to the dropped date, and the end cleared
+                       dropLocation = {
+                               start: dragEnd.clone(),
+                               end: null, // end should be cleared
+                               allDay: !dragEnd.hasTime()
+                       };
+               }
+
+               return dropLocation;
+       },
+
+
+       // Utility for apply dragOpacity to a jQuery set
+       applyDragOpacity: function(els) {
+               var opacity = this.view.opt('dragOpacity');
+
+               if (opacity != null) {
+                       els.css('opacity', opacity);
+               }
+       },
+
+
+       /* External Element Dragging
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Called when a jQuery UI drag is initiated anywhere in the DOM
+       externalDragStart: function(ev, ui) {
+               var view = this.view;
+               var el;
+               var accept;
+
+               if (view.opt('droppable')) { // only listen if this setting is on
+                       el = $((ui ? ui.item : null) || ev.target);
+
+                       // Test that the dragged element passes the dropAccept selector or filter function.
+                       // FYI, the default is "*" (matches all)
+                       accept = view.opt('dropAccept');
+                       if ($.isFunction(accept) ? accept.call(el[0], el) : el.is(accept)) {
+                               if (!this.isDraggingExternal) { // prevent double-listening if fired twice
+                                       this.listenToExternalDrag(el, ev, ui);
+                               }
+                       }
+               }
+       },
+
+
+       // Called when a jQuery UI drag starts and it needs to be monitored for dropping
+       listenToExternalDrag: function(el, ev, ui) {
+               var _this = this;
+               var calendar = this.view.calendar;
+               var meta = getDraggedElMeta(el); // extra data about event drop, including possible event to create
+               var dropLocation; // a null value signals an unsuccessful drag
+
+               // listener that tracks mouse movement over date-associated pixel regions
+               var dragListener = _this.externalDragListener = new HitDragListener(this, {
+                       interactionStart: function() {
+                               _this.isDraggingExternal = true;
+                       },
+                       hitOver: function(hit) {
+                               dropLocation = _this.computeExternalDrop(
+                                       hit.component.getHitSpan(hit), // since we are querying the parent view, might not belong to this grid
+                                       meta
+                               );
+
+                               if ( // invalid hit?
+                                       dropLocation &&
+                                       !calendar.isExternalSpanAllowed(_this.eventToSpan(dropLocation), dropLocation, meta.eventProps)
+                               ) {
+                                       disableCursor();
+                                       dropLocation = null;
+                               }
+
+                               if (dropLocation) {
+                                       _this.renderDrag(dropLocation); // called without a seg parameter
+                               }
+                       },
+                       hitOut: function() {
+                               dropLocation = null; // signal unsuccessful
+                       },
+                       hitDone: function() { // Called after a hitOut OR before a dragEnd
+                               enableCursor();
+                               _this.unrenderDrag();
+                       },
+                       interactionEnd: function(ev) {
+                               if (dropLocation) { // element was dropped on a valid hit
+                                       _this.view.reportExternalDrop(meta, dropLocation, el, ev, ui);
+                               }
+                               _this.isDraggingExternal = false;
+                               _this.externalDragListener = null;
+                       }
+               });
+
+               dragListener.startDrag(ev); // start listening immediately
+       },
+
+
+       // Given a hit to be dropped upon, and misc data associated with the jqui drag (guaranteed to be a plain object),
+       // returns the zoned start/end dates for the event that would result from the hypothetical drop. end might be null.
+       // Returning a null value signals an invalid drop hit.
+       // DOES NOT consider overlap/constraint.
+       computeExternalDrop: function(span, meta) {
+               var calendar = this.view.calendar;
+               var dropLocation = {
+                       start: calendar.applyTimezone(span.start), // simulate a zoned event start date
+                       end: null
+               };
+
+               // if dropped on an all-day span, and element's metadata specified a time, set it
+               if (meta.startTime && !dropLocation.start.hasTime()) {
+                       dropLocation.start.time(meta.startTime);
+               }
+
+               if (meta.duration) {
+                       dropLocation.end = dropLocation.start.clone().add(meta.duration);
+               }
+
+               return dropLocation;
+       },
+
+
+
+       /* Drag Rendering (for both events and an external elements)
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a visual indication of an event or external element being dragged.
+       // `dropLocation` contains hypothetical start/end/allDay values the event would have if dropped. end can be null.
+       // `seg` is the internal segment object that is being dragged. If dragging an external element, `seg` is null.
+       // A truthy returned value indicates this method has rendered a helper element.
+       // Must return elements used for any mock events.
+       renderDrag: function(dropLocation, seg) {
+               // subclasses must implement
+       },
+
+
+       // Unrenders a visual indication of an event or external element being dragged
+       unrenderDrag: function() {
+               // subclasses must implement
+       },
+
+
+       /* Resizing
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Creates a listener that tracks the user as they resize an event segment.
+       // Generic enough to work with any type of Grid.
+       buildSegResizeListener: function(seg, isStart) {
+               var _this = this;
+               var view = this.view;
+               var calendar = view.calendar;
+               var el = seg.el;
+               var event = seg.event;
+               var eventEnd = calendar.getEventEnd(event);
+               var isDragging;
+               var resizeLocation; // zoned event date properties. falsy if invalid resize
+
+               // Tracks mouse movement over the *grid's* coordinate map
+               var dragListener = this.segResizeListener = new HitDragListener(this, {
+                       scroll: view.opt('dragScroll'),
+                       subjectEl: el,
+                       interactionStart: function() {
+                               isDragging = false;
+                       },
+                       dragStart: function(ev) {
+                               isDragging = true;
+                               _this.handleSegMouseout(seg, ev); // ensure a mouseout on the manipulated event has been reported
+                               _this.segResizeStart(seg, ev);
+                       },
+                       hitOver: function(hit, isOrig, origHit) {
+                               var origHitSpan = _this.getHitSpan(origHit);
+                               var hitSpan = _this.getHitSpan(hit);
+
+                               resizeLocation = isStart ?
+                                       _this.computeEventStartResize(origHitSpan, hitSpan, event) :
+                                       _this.computeEventEndResize(origHitSpan, hitSpan, event);
+
+                               if (resizeLocation) {
+                                       if (!calendar.isEventSpanAllowed(_this.eventToSpan(resizeLocation), event)) {
+                                               disableCursor();
+                                               resizeLocation = null;
+                                       }
+                                       // no change? (FYI, event dates might have zones)
+                                       else if (
+                                               resizeLocation.start.isSame(event.start.clone().stripZone()) &&
+                                               resizeLocation.end.isSame(eventEnd.clone().stripZone())
+                                       ) {
+                                               resizeLocation = null;
+                                       }
+                               }
+
+                               if (resizeLocation) {
+                                       view.hideEvent(event);
+                                       _this.renderEventResize(resizeLocation, seg);
+                               }
+                       },
+                       hitOut: function() { // called before mouse moves to a different hit OR moved out of all hits
+                               resizeLocation = null;
+                       },
+                       hitDone: function() { // resets the rendering to show the original event
+                               _this.unrenderEventResize();
+                               view.showEvent(event);
+                               enableCursor();
+                       },
+                       interactionEnd: function(ev) {
+                               if (isDragging) {
+                                       _this.segResizeStop(seg, ev);
+                               }
+                               if (resizeLocation) { // valid date to resize to?
+                                       view.reportEventResize(event, resizeLocation, this.largeUnit, el, ev);
+                               }
+                               _this.segResizeListener = null;
+                       }
+               });
+
+               return dragListener;
+       },
+
+
+       // Called before event segment resizing starts
+       segResizeStart: function(seg, ev) {
+               this.isResizingSeg = true;
+               this.view.trigger('eventResizeStart', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy
+       },
+
+
+       // Called after event segment resizing stops
+       segResizeStop: function(seg, ev) {
+               this.isResizingSeg = false;
+               this.view.trigger('eventResizeStop', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy
+       },
+
+
+       // Returns new date-information for an event segment being resized from its start
+       computeEventStartResize: function(startSpan, endSpan, event) {
+               return this.computeEventResize('start', startSpan, endSpan, event);
+       },
+
+
+       // Returns new date-information for an event segment being resized from its end
+       computeEventEndResize: function(startSpan, endSpan, event) {
+               return this.computeEventResize('end', startSpan, endSpan, event);
+       },
+
+
+       // Returns new zoned date information for an event segment being resized from its start OR end
+       // `type` is either 'start' or 'end'.
+       // DOES NOT consider overlap/constraint.
+       computeEventResize: function(type, startSpan, endSpan, event) {
+               var calendar = this.view.calendar;
+               var delta = this.diffDates(endSpan[type], startSpan[type]);
+               var resizeLocation; // zoned event date properties
+               var defaultDuration;
+
+               // build original values to work from, guaranteeing a start and end
+               resizeLocation = {
+                       start: event.start.clone(),
+                       end: calendar.getEventEnd(event),
+                       allDay: event.allDay
+               };
+
+               // if an all-day event was in a timed area and was resized to a time, adjust start/end to have times
+               if (resizeLocation.allDay && durationHasTime(delta)) {
+                       resizeLocation.allDay = false;
+                       calendar.normalizeEventTimes(resizeLocation);
+               }
+
+               resizeLocation[type].add(delta); // apply delta to start or end
+
+               // if the event was compressed too small, find a new reasonable duration for it
+               if (!resizeLocation.start.isBefore(resizeLocation.end)) {
+
+                       defaultDuration =
+                               this.minResizeDuration || // TODO: hack
+                               (event.allDay ?
+                                       calendar.defaultAllDayEventDuration :
+                                       calendar.defaultTimedEventDuration);
+
+                       if (type == 'start') { // resizing the start?
+                               resizeLocation.start = resizeLocation.end.clone().subtract(defaultDuration);
+                       }
+                       else { // resizing the end?
+                               resizeLocation.end = resizeLocation.start.clone().add(defaultDuration);
+                       }
+               }
+
+               return resizeLocation;
+       },
+
+
+       // Renders a visual indication of an event being resized.
+       // `range` has the updated dates of the event. `seg` is the original segment object involved in the drag.
+       // Must return elements used for any mock events.
+       renderEventResize: function(range, seg) {
+               // subclasses must implement
+       },
+
+
+       // Unrenders a visual indication of an event being resized.
+       unrenderEventResize: function() {
+               // subclasses must implement
+       },
+
+
+       /* Rendering Utils
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Compute the text that should be displayed on an event's element.
+       // `range` can be the Event object itself, or something range-like, with at least a `start`.
+       // If event times are disabled, or the event has no time, will return a blank string.
+       // If not specified, formatStr will default to the eventTimeFormat setting,
+       // and displayEnd will default to the displayEventEnd setting.
+       getEventTimeText: function(range, formatStr, displayEnd) {
+
+               if (formatStr == null) {
+                       formatStr = this.eventTimeFormat;
+               }
+
+               if (displayEnd == null) {
+                       displayEnd = this.displayEventEnd;
+               }
+
+               if (this.displayEventTime && range.start.hasTime()) {
+                       if (displayEnd && range.end) {
+                               return this.view.formatRange(range, formatStr);
+                       }
+                       else {
+                               return range.start.format(formatStr);
+                       }
+               }
+
+               return '';
+       },
+
+
+       // Generic utility for generating the HTML classNames for an event segment's element
+       getSegClasses: function(seg, isDraggable, isResizable) {
+               var view = this.view;
+               var classes = [
+                       'fc-event',
+                       seg.isStart ? 'fc-start' : 'fc-not-start',
+                       seg.isEnd ? 'fc-end' : 'fc-not-end'
+               ].concat(this.getSegCustomClasses(seg));
+
+               if (isDraggable) {
+                       classes.push('fc-draggable');
+               }
+               if (isResizable) {
+                       classes.push('fc-resizable');
+               }
+
+               // event is currently selected? attach a className.
+               if (view.isEventSelected(seg.event)) {
+                       classes.push('fc-selected');
+               }
+
+               return classes;
+       },
+
+
+       // List of classes that were defined by the caller of the API in some way
+       getSegCustomClasses: function(seg) {
+               var event = seg.event;
+
+               return [].concat(
+                       event.className, // guaranteed to be an array
+                       event.source ? event.source.className : []
+               );
+       },
+
+
+       // Utility for generating event skin-related CSS properties
+       getSegSkinCss: function(seg) {
+               return {
+                       'background-color': this.getSegBackgroundColor(seg),
+                       'border-color': this.getSegBorderColor(seg),
+                       color: this.getSegTextColor(seg)
+               };
+       },
+
+
+       // Queries for caller-specified color, then falls back to default
+       getSegBackgroundColor: function(seg) {
+               return seg.event.backgroundColor ||
+                       seg.event.color ||
+                       this.getSegDefaultBackgroundColor(seg);
+       },
+
+
+       getSegDefaultBackgroundColor: function(seg) {
+               var source = seg.event.source || {};
+
+               return source.backgroundColor ||
+                       source.color ||
+                       this.view.opt('eventBackgroundColor') ||
+                       this.view.opt('eventColor');
+       },
+
+
+       // Queries for caller-specified color, then falls back to default
+       getSegBorderColor: function(seg) {
+               return seg.event.borderColor ||
+                       seg.event.color ||
+                       this.getSegDefaultBorderColor(seg);
+       },
+
+
+       getSegDefaultBorderColor: function(seg) {
+               var source = seg.event.source || {};
+
+               return source.borderColor ||
+                       source.color ||
+                       this.view.opt('eventBorderColor') ||
+                       this.view.opt('eventColor');
+       },
+
+
+       // Queries for caller-specified color, then falls back to default
+       getSegTextColor: function(seg) {
+               return seg.event.textColor ||
+                       this.getSegDefaultTextColor(seg);
+       },
+
+
+       getSegDefaultTextColor: function(seg) {
+               var source = seg.event.source || {};
+
+               return source.textColor ||
+                       this.view.opt('eventTextColor');
+       },
+
+
+       /* Converting events -> eventRange -> eventSpan -> eventSegs
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Generates an array of segments for the given single event
+       // Can accept an event "location" as well (which only has start/end and no allDay)
+       eventToSegs: function(event) {
+               return this.eventsToSegs([ event ]);
+       },
+
+
+       eventToSpan: function(event) {
+               return this.eventToSpans(event)[0];
+       },
+
+
+       // Generates spans (always unzoned) for the given event.
+       // Does not do any inverting for inverse-background events.
+       // Can accept an event "location" as well (which only has start/end and no allDay)
+       eventToSpans: function(event) {
+               var range = this.eventToRange(event);
+               return this.eventRangeToSpans(range, event);
+       },
+
+
+
+       // Converts an array of event objects into an array of event segment objects.
+       // A custom `segSliceFunc` may be given for arbitrarily slicing up events.
+       // Doesn't guarantee an order for the resulting array.
+       eventsToSegs: function(allEvents, segSliceFunc) {
+               var _this = this;
+               var eventsById = groupEventsById(allEvents);
+               var segs = [];
+
+               $.each(eventsById, function(id, events) {
+                       var ranges = [];
+                       var i;
+
+                       for (i = 0; i < events.length; i++) {
+                               ranges.push(_this.eventToRange(events[i]));
+                       }
+
+                       // inverse-background events (utilize only the first event in calculations)
+                       if (isInverseBgEvent(events[0])) {
+                               ranges = _this.invertRanges(ranges);
+
+                               for (i = 0; i < ranges.length; i++) {
+                                       segs.push.apply(segs, // append to
+                                               _this.eventRangeToSegs(ranges[i], events[0], segSliceFunc));
+                               }
+                       }
+                       // normal event ranges
+                       else {
+                               for (i = 0; i < ranges.length; i++) {
+                                       segs.push.apply(segs, // append to
+                                               _this.eventRangeToSegs(ranges[i], events[i], segSliceFunc));
+                               }
+                       }
+               });
+
+               return segs;
+       },
+
+
+       // Generates the unzoned start/end dates an event appears to occupy
+       // Can accept an event "location" as well (which only has start/end and no allDay)
+       eventToRange: function(event) {
+               var calendar = this.view.calendar;
+               var start = event.start.clone().stripZone();
+               var end = (
+                               event.end ?
+                                       event.end.clone() :
+                                       // derive the end from the start and allDay. compute allDay if necessary
+                                       calendar.getDefaultEventEnd(
+                                               event.allDay != null ?
+                                                       event.allDay :
+                                                       !event.start.hasTime(),
+                                               event.start
+                                       )
+                       ).stripZone();
+
+               // hack: dynamic locale change forgets to upate stored event localed
+               calendar.localizeMoment(start);
+               calendar.localizeMoment(end);
+
+               return { start: start, end: end };
+       },
+
+
+       // Given an event's range (unzoned start/end), and the event itself,
+       // slice into segments (using the segSliceFunc function if specified)
+       eventRangeToSegs: function(range, event, segSliceFunc) {
+               var spans = this.eventRangeToSpans(range, event);
+               var segs = [];
+               var i;
+
+               for (i = 0; i < spans.length; i++) {
+                       segs.push.apply(segs, // append to
+                               this.eventSpanToSegs(spans[i], event, segSliceFunc));
+               }
+
+               return segs;
+       },
+
+
+       // Given an event's unzoned date range, return an array of "span" objects.
+       // Subclasses can override.
+       eventRangeToSpans: function(range, event) {
+               return [ $.extend({}, range) ]; // copy into a single-item array
+       },
+
+
+       // Given an event's span (unzoned start/end and other misc data), and the event itself,
+       // slices into segments and attaches event-derived properties to them.
+       eventSpanToSegs: function(span, event, segSliceFunc) {
+               var segs = segSliceFunc ? segSliceFunc(span) : this.spanToSegs(span);
+               var i, seg;
+
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+                       seg.event = event;
+                       seg.eventStartMS = +span.start; // TODO: not the best name after making spans unzoned
+                       seg.eventDurationMS = span.end - span.start;
+               }
+
+               return segs;
+       },
+
+
+       // Produces a new array of range objects that will cover all the time NOT covered by the given ranges.
+       // SIDE EFFECT: will mutate the given array and will use its date references.
+       invertRanges: function(ranges) {
+               var view = this.view;
+               var viewStart = view.start.clone(); // need a copy
+               var viewEnd = view.end.clone(); // need a copy
+               var inverseRanges = [];
+               var start = viewStart; // the end of the previous range. the start of the new range
+               var i, range;
+
+               // ranges need to be in order. required for our date-walking algorithm
+               ranges.sort(compareRanges);
+
+               for (i = 0; i < ranges.length; i++) {
+                       range = ranges[i];
+
+                       // add the span of time before the event (if there is any)
+                       if (range.start > start) { // compare millisecond time (skip any ambig logic)
+                               inverseRanges.push({
+                                       start: start,
+                                       end: range.start
+                               });
+                       }
+
+                       start = range.end;
+               }
+
+               // add the span of time after the last event (if there is any)
+               if (start < viewEnd) { // compare millisecond time (skip any ambig logic)
+                       inverseRanges.push({
+                               start: start,
+                               end: viewEnd
+                       });
+               }
+
+               return inverseRanges;
+       },
+
+
+       sortEventSegs: function(segs) {
+               segs.sort(proxy(this, 'compareEventSegs'));
+       },
+
+
+       // A cmp function for determining which segments should take visual priority
+       compareEventSegs: function(seg1, seg2) {
+               return seg1.eventStartMS - seg2.eventStartMS || // earlier events go first
+                       seg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first
+                       seg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1)
+                       compareByFieldSpecs(seg1.event, seg2.event, this.view.eventOrderSpecs);
+       }
+
+});
+
+
+/* Utilities
+----------------------------------------------------------------------------------------------------------------------*/
+
+
+function pluckEventDateProps(event) {
+       return {
+               start: event.start.clone(),
+               end: event.end ? event.end.clone() : null,
+               allDay: event.allDay // keep it the same
+       };
+}
+FC.pluckEventDateProps = pluckEventDateProps;
+
+
+function isBgEvent(event) { // returns true if background OR inverse-background
+       var rendering = getEventRendering(event);
+       return rendering === 'background' || rendering === 'inverse-background';
+}
+FC.isBgEvent = isBgEvent; // export
+
+
+function isInverseBgEvent(event) {
+       return getEventRendering(event) === 'inverse-background';
+}
+
+
+function getEventRendering(event) {
+       return firstDefined((event.source || {}).rendering, event.rendering);
+}
+
+
+function groupEventsById(events) {
+       var eventsById = {};
+       var i, event;
+
+       for (i = 0; i < events.length; i++) {
+               event = events[i];
+               (eventsById[event._id] || (eventsById[event._id] = [])).push(event);
+       }
+
+       return eventsById;
+}
+
+
+// A cmp function for determining which non-inverted "ranges" (see above) happen earlier
+function compareRanges(range1, range2) {
+       return range1.start - range2.start; // earlier ranges go first
+}
+
+
+/* External-Dragging-Element Data
+----------------------------------------------------------------------------------------------------------------------*/
+
+// Require all HTML5 data-* attributes used by FullCalendar to have this prefix.
+// A value of '' will query attributes like data-event. A value of 'fc' will query attributes like data-fc-event.
+FC.dataAttrPrefix = '';
+
+// Given a jQuery element that might represent a dragged FullCalendar event, returns an intermediate data structure
+// to be used for Event Object creation.
+// A defined `.eventProps`, even when empty, indicates that an event should be created.
+function getDraggedElMeta(el) {
+       var prefix = FC.dataAttrPrefix;
+       var eventProps; // properties for creating the event, not related to date/time
+       var startTime; // a Duration
+       var duration;
+       var stick;
+
+       if (prefix) { prefix += '-'; }
+       eventProps = el.data(prefix + 'event') || null;
+
+       if (eventProps) {
+               if (typeof eventProps === 'object') {
+                       eventProps = $.extend({}, eventProps); // make a copy
+               }
+               else { // something like 1 or true. still signal event creation
+                       eventProps = {};
+               }
+
+               // pluck special-cased date/time properties
+               startTime = eventProps.start;
+               if (startTime == null) { startTime = eventProps.time; } // accept 'time' as well
+               duration = eventProps.duration;
+               stick = eventProps.stick;
+               delete eventProps.start;
+               delete eventProps.time;
+               delete eventProps.duration;
+               delete eventProps.stick;
+       }
+
+       // fallback to standalone attribute values for each of the date/time properties
+       if (startTime == null) { startTime = el.data(prefix + 'start'); }
+       if (startTime == null) { startTime = el.data(prefix + 'time'); } // accept 'time' as well
+       if (duration == null) { duration = el.data(prefix + 'duration'); }
+       if (stick == null) { stick = el.data(prefix + 'stick'); }
+
+       // massage into correct data types
+       startTime = startTime != null ? moment.duration(startTime) : null;
+       duration = duration != null ? moment.duration(duration) : null;
+       stick = Boolean(stick);
+
+       return { eventProps: eventProps, startTime: startTime, duration: duration, stick: stick };
+}
+
+
+;;
+
+/*
+A set of rendering and date-related methods for a visual component comprised of one or more rows of day columns.
+Prerequisite: the object being mixed into needs to be a *Grid*
+*/
+var DayTableMixin = FC.DayTableMixin = {
+
+       breakOnWeeks: false, // should create a new row for each week?
+       dayDates: null, // whole-day dates for each column. left to right
+       dayIndices: null, // for each day from start, the offset
+       daysPerRow: null,
+       rowCnt: null,
+       colCnt: null,
+       colHeadFormat: null,
+
+
+       // Populates internal variables used for date calculation and rendering
+       updateDayTable: function() {
+               var view = this.view;
+               var date = this.start.clone();
+               var dayIndex = -1;
+               var dayIndices = [];
+               var dayDates = [];
+               var daysPerRow;
+               var firstDay;
+               var rowCnt;
+
+               while (date.isBefore(this.end)) { // loop each day from start to end
+                       if (view.isHiddenDay(date)) {
+                               dayIndices.push(dayIndex + 0.5); // mark that it's between indices
+                       }
+                       else {
+                               dayIndex++;
+                               dayIndices.push(dayIndex);
+                               dayDates.push(date.clone());
+                       }
+                       date.add(1, 'days');
+               }
+
+               if (this.breakOnWeeks) {
+                       // count columns until the day-of-week repeats
+                       firstDay = dayDates[0].day();
+                       for (daysPerRow = 1; daysPerRow < dayDates.length; daysPerRow++) {
+                               if (dayDates[daysPerRow].day() == firstDay) {
+                                       break;
+                               }
+                       }
+                       rowCnt = Math.ceil(dayDates.length / daysPerRow);
+               }
+               else {
+                       rowCnt = 1;
+                       daysPerRow = dayDates.length;
+               }
+
+               this.dayDates = dayDates;
+               this.dayIndices = dayIndices;
+               this.daysPerRow = daysPerRow;
+               this.rowCnt = rowCnt;
+               
+               this.updateDayTableCols();
+       },
+
+
+       // Computes and assigned the colCnt property and updates any options that may be computed from it
+       updateDayTableCols: function() {
+               this.colCnt = this.computeColCnt();
+               this.colHeadFormat = this.view.opt('columnFormat') || this.computeColHeadFormat();
+       },
+
+
+       // Determines how many columns there should be in the table
+       computeColCnt: function() {
+               return this.daysPerRow;
+       },
+
+
+       // Computes the ambiguously-timed moment for the given cell
+       getCellDate: function(row, col) {
+               return this.dayDates[
+                               this.getCellDayIndex(row, col)
+                       ].clone();
+       },
+
+
+       // Computes the ambiguously-timed date range for the given cell
+       getCellRange: function(row, col) {
+               var start = this.getCellDate(row, col);
+               var end = start.clone().add(1, 'days');
+
+               return { start: start, end: end };
+       },
+
+
+       // Returns the number of day cells, chronologically, from the first of the grid (0-based)
+       getCellDayIndex: function(row, col) {
+               return row * this.daysPerRow + this.getColDayIndex(col);
+       },
+
+
+       // Returns the numner of day cells, chronologically, from the first cell in *any given row*
+       getColDayIndex: function(col) {
+               if (this.isRTL) {
+                       return this.colCnt - 1 - col;
+               }
+               else {
+                       return col;
+               }
+       },
+
+
+       // Given a date, returns its chronolocial cell-index from the first cell of the grid.
+       // If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets.
+       // If before the first offset, returns a negative number.
+       // If after the last offset, returns an offset past the last cell offset.
+       // Only works for *start* dates of cells. Will not work for exclusive end dates for cells.
+       getDateDayIndex: function(date) {
+               var dayIndices = this.dayIndices;
+               var dayOffset = date.diff(this.start, 'days');
+
+               if (dayOffset < 0) {
+                       return dayIndices[0] - 1;
+               }
+               else if (dayOffset >= dayIndices.length) {
+                       return dayIndices[dayIndices.length - 1] + 1;
+               }
+               else {
+                       return dayIndices[dayOffset];
+               }
+       },
+
+
+       /* Options
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Computes a default column header formatting string if `colFormat` is not explicitly defined
+       computeColHeadFormat: function() {
+               // if more than one week row, or if there are a lot of columns with not much space,
+               // put just the day numbers will be in each cell
+               if (this.rowCnt > 1 || this.colCnt > 10) {
+                       return 'ddd'; // "Sat"
+               }
+               // multiple days, so full single date string WON'T be in title text
+               else if (this.colCnt > 1) {
+                       return this.view.opt('dayOfMonthFormat'); // "Sat 12/10"
+               }
+               // single day, so full single date string will probably be in title text
+               else {
+                       return 'dddd'; // "Saturday"
+               }
+       },
+
+
+       /* Slicing
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Slices up a date range into a segment for every week-row it intersects with
+       sliceRangeByRow: function(range) {
+               var daysPerRow = this.daysPerRow;
+               var normalRange = this.view.computeDayRange(range); // make whole-day range, considering nextDayThreshold
+               var rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index
+               var rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index
+               var segs = [];
+               var row;
+               var rowFirst, rowLast; // inclusive day-index range for current row
+               var segFirst, segLast; // inclusive day-index range for segment
+
+               for (row = 0; row < this.rowCnt; row++) {
+                       rowFirst = row * daysPerRow;
+                       rowLast = rowFirst + daysPerRow - 1;
+
+                       // intersect segment's offset range with the row's
+                       segFirst = Math.max(rangeFirst, rowFirst);
+                       segLast = Math.min(rangeLast, rowLast);
+
+                       // deal with in-between indices
+                       segFirst = Math.ceil(segFirst); // in-between starts round to next cell
+                       segLast = Math.floor(segLast); // in-between ends round to prev cell
+
+                       if (segFirst <= segLast) { // was there any intersection with the current row?
+                               segs.push({
+                                       row: row,
+
+                                       // normalize to start of row
+                                       firstRowDayIndex: segFirst - rowFirst,
+                                       lastRowDayIndex: segLast - rowFirst,
+
+                                       // must be matching integers to be the segment's start/end
+                                       isStart: segFirst === rangeFirst,
+                                       isEnd: segLast === rangeLast
+                               });
+                       }
+               }
+
+               return segs;
+       },
+
+
+       // Slices up a date range into a segment for every day-cell it intersects with.
+       // TODO: make more DRY with sliceRangeByRow somehow.
+       sliceRangeByDay: function(range) {
+               var daysPerRow = this.daysPerRow;
+               var normalRange = this.view.computeDayRange(range); // make whole-day range, considering nextDayThreshold
+               var rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index
+               var rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index
+               var segs = [];
+               var row;
+               var rowFirst, rowLast; // inclusive day-index range for current row
+               var i;
+               var segFirst, segLast; // inclusive day-index range for segment
+
+               for (row = 0; row < this.rowCnt; row++) {
+                       rowFirst = row * daysPerRow;
+                       rowLast = rowFirst + daysPerRow - 1;
+
+                       for (i = rowFirst; i <= rowLast; i++) {
+
+                               // intersect segment's offset range with the row's
+                               segFirst = Math.max(rangeFirst, i);
+                               segLast = Math.min(rangeLast, i);
+
+                               // deal with in-between indices
+                               segFirst = Math.ceil(segFirst); // in-between starts round to next cell
+                               segLast = Math.floor(segLast); // in-between ends round to prev cell
+
+                               if (segFirst <= segLast) { // was there any intersection with the current row?
+                                       segs.push({
+                                               row: row,
+
+                                               // normalize to start of row
+                                               firstRowDayIndex: segFirst - rowFirst,
+                                               lastRowDayIndex: segLast - rowFirst,
+
+                                               // must be matching integers to be the segment's start/end
+                                               isStart: segFirst === rangeFirst,
+                                               isEnd: segLast === rangeLast
+                                       });
+                               }
+                       }
+               }
+
+               return segs;
+       },
+
+
+       /* Header Rendering
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderHeadHtml: function() {
+               var view = this.view;
+
+               return '' +
+                       '<div class="fc-row ' + view.widgetHeaderClass + '">' +
+                               '<table>' +
+                                       '<thead>' +
+                                               this.renderHeadTrHtml() +
+                                       '</thead>' +
+                               '</table>' +
+                       '</div>';
+       },
+
+
+       renderHeadIntroHtml: function() {
+               return this.renderIntroHtml(); // fall back to generic
+       },
+
+
+       renderHeadTrHtml: function() {
+               return '' +
+                       '<tr>' +
+                               (this.isRTL ? '' : this.renderHeadIntroHtml()) +
+                               this.renderHeadDateCellsHtml() +
+                               (this.isRTL ? this.renderHeadIntroHtml() : '') +
+                       '</tr>';
+       },
+
+
+       renderHeadDateCellsHtml: function() {
+               var htmls = [];
+               var col, date;
+
+               for (col = 0; col < this.colCnt; col++) {
+                       date = this.getCellDate(0, col);
+                       htmls.push(this.renderHeadDateCellHtml(date));
+               }
+
+               return htmls.join('');
+       },
+
+
+       // TODO: when internalApiVersion, accept an object for HTML attributes
+       // (colspan should be no different)
+       renderHeadDateCellHtml: function(date, colspan, otherAttrs) {
+               var view = this.view;
+
+               return '' +
+                       '<th class="fc-day-header ' + view.widgetHeaderClass + ' fc-' + dayIDs[date.day()] + '"' +
+                               (this.rowCnt === 1 ?
+                                       ' data-date="' + date.format('YYYY-MM-DD') + '"' :
+                                       '') +
+                               (colspan > 1 ?
+                                       ' colspan="' + colspan + '"' :
+                                       '') +
+                               (otherAttrs ?
+                                       ' ' + otherAttrs :
+                                       '') +
+                               '>' +
+                               // don't make a link if the heading could represent multiple days, or if there's only one day (forceOff)
+                               view.buildGotoAnchorHtml(
+                                       { date: date, forceOff: this.rowCnt > 1 || this.colCnt === 1 },
+                                       htmlEscape(date.format(this.colHeadFormat)) // inner HTML
+                               ) +
+                       '</th>';
+       },
+
+
+       /* Background Rendering
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderBgTrHtml: function(row) {
+               return '' +
+                       '<tr>' +
+                               (this.isRTL ? '' : this.renderBgIntroHtml(row)) +
+                               this.renderBgCellsHtml(row) +
+                               (this.isRTL ? this.renderBgIntroHtml(row) : '') +
+                       '</tr>';
+       },
+
+
+       renderBgIntroHtml: function(row) {
+               return this.renderIntroHtml(); // fall back to generic
+       },
+
+
+       renderBgCellsHtml: function(row) {
+               var htmls = [];
+               var col, date;
+
+               for (col = 0; col < this.colCnt; col++) {
+                       date = this.getCellDate(row, col);
+                       htmls.push(this.renderBgCellHtml(date));
+               }
+
+               return htmls.join('');
+       },
+
+
+       renderBgCellHtml: function(date, otherAttrs) {
+               var view = this.view;
+               var classes = this.getDayClasses(date);
+
+               classes.unshift('fc-day', view.widgetContentClass);
+
+               return '<td class="' + classes.join(' ') + '"' +
+                       ' data-date="' + date.format('YYYY-MM-DD') + '"' + // if date has a time, won't format it
+                       (otherAttrs ?
+                               ' ' + otherAttrs :
+                               '') +
+                       '></td>';
+       },
+
+
+       /* Generic
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Generates the default HTML intro for any row. User classes should override
+       renderIntroHtml: function() {
+       },
+
+
+       // TODO: a generic method for dealing with <tr>, RTL, intro
+       // when increment internalApiVersion
+       // wrapTr (scheduler)
+
+
+       /* Utils
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Applies the generic "intro" and "outro" HTML to the given cells.
+       // Intro means the leftmost cell when the calendar is LTR and the rightmost cell when RTL. Vice-versa for outro.
+       bookendCells: function(trEl) {
+               var introHtml = this.renderIntroHtml();
+
+               if (introHtml) {
+                       if (this.isRTL) {
+                               trEl.append(introHtml);
+                       }
+                       else {
+                               trEl.prepend(introHtml);
+                       }
+               }
+       }
+
+};
+
+;;
+
+/* A component that renders a grid of whole-days that runs horizontally. There can be multiple rows, one per week.
+----------------------------------------------------------------------------------------------------------------------*/
+
+var DayGrid = FC.DayGrid = Grid.extend(DayTableMixin, {
+
+       numbersVisible: false, // should render a row for day/week numbers? set by outside view. TODO: make internal
+       bottomCoordPadding: 0, // hack for extending the hit area for the last row of the coordinate grid
+
+       rowEls: null, // set of fake row elements
+       cellEls: null, // set of whole-day elements comprising the row's background
+       helperEls: null, // set of cell skeleton elements for rendering the mock event "helper"
+
+       rowCoordCache: null,
+       colCoordCache: null,
+
+
+       // Renders the rows and columns into the component's `this.el`, which should already be assigned.
+       // isRigid determins whether the individual rows should ignore the contents and be a constant height.
+       // Relies on the view's colCnt and rowCnt. In the future, this component should probably be self-sufficient.
+       renderDates: function(isRigid) {
+               var view = this.view;
+               var rowCnt = this.rowCnt;
+               var colCnt = this.colCnt;
+               var html = '';
+               var row;
+               var col;
+
+               for (row = 0; row < rowCnt; row++) {
+                       html += this.renderDayRowHtml(row, isRigid);
+               }
+               this.el.html(html);
+
+               this.rowEls = this.el.find('.fc-row');
+               this.cellEls = this.el.find('.fc-day');
+
+               this.rowCoordCache = new CoordCache({
+                       els: this.rowEls,
+                       isVertical: true
+               });
+               this.colCoordCache = new CoordCache({
+                       els: this.cellEls.slice(0, this.colCnt), // only the first row
+                       isHorizontal: true
+               });
+
+               // trigger dayRender with each cell's element
+               for (row = 0; row < rowCnt; row++) {
+                       for (col = 0; col < colCnt; col++) {
+                               view.trigger(
+                                       'dayRender',
+                                       null,
+                                       this.getCellDate(row, col),
+                                       this.getCellEl(row, col)
                                );
-                       return element;
+                       }
+               }
+       },
+
+
+       unrenderDates: function() {
+               this.removeSegPopover();
+       },
+
+
+       renderBusinessHours: function() {
+               var segs = this.buildBusinessHourSegs(true); // wholeDay=true
+               this.renderFill('businessHours', segs, 'bgevent');
+       },
+
+
+       unrenderBusinessHours: function() {
+               this.unrenderFill('businessHours');
+       },
+
+
+       // Generates the HTML for a single row, which is a div that wraps a table.
+       // `row` is the row number.
+       renderDayRowHtml: function(row, isRigid) {
+               var view = this.view;
+               var classes = [ 'fc-row', 'fc-week', view.widgetContentClass ];
+
+               if (isRigid) {
+                       classes.push('fc-rigid');
+               }
+
+               return '' +
+                       '<div class="' + classes.join(' ') + '">' +
+                               '<div class="fc-bg">' +
+                                       '<table>' +
+                                               this.renderBgTrHtml(row) +
+                                       '</table>' +
+                               '</div>' +
+                               '<div class="fc-content-skeleton">' +
+                                       '<table>' +
+                                               (this.numbersVisible ?
+                                                       '<thead>' +
+                                                               this.renderNumberTrHtml(row) +
+                                                       '</thead>' :
+                                                       ''
+                                                       ) +
+                                       '</table>' +
+                               '</div>' +
+                       '</div>';
+       },
+
+
+       /* Grid Number Rendering
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderNumberTrHtml: function(row) {
+               return '' +
+                       '<tr>' +
+                               (this.isRTL ? '' : this.renderNumberIntroHtml(row)) +
+                               this.renderNumberCellsHtml(row) +
+                               (this.isRTL ? this.renderNumberIntroHtml(row) : '') +
+                       '</tr>';
+       },
+
+
+       renderNumberIntroHtml: function(row) {
+               return this.renderIntroHtml();
+       },
+
+
+       renderNumberCellsHtml: function(row) {
+               var htmls = [];
+               var col, date;
+
+               for (col = 0; col < this.colCnt; col++) {
+                       date = this.getCellDate(row, col);
+                       htmls.push(this.renderNumberCellHtml(date));
+               }
+
+               return htmls.join('');
+       },
+
+
+       // Generates the HTML for the <td>s of the "number" row in the DayGrid's content skeleton.
+       // The number row will only exist if either day numbers or week numbers are turned on.
+       renderNumberCellHtml: function(date) {
+               var html = '';
+               var classes;
+               var weekCalcFirstDoW;
+
+               if (!this.view.dayNumbersVisible && !this.view.cellWeekNumbersVisible) {
+                       // no numbers in day cell (week number must be along the side)
+                       return '<td/>'; //  will create an empty space above events :(
+               }
+
+               classes = this.getDayClasses(date);
+               classes.unshift('fc-day-top');
+
+               if (this.view.cellWeekNumbersVisible) {
+                       // To determine the day of week number change under ISO, we cannot
+                       // rely on moment.js methods such as firstDayOfWeek() or weekday(),
+                       // because they rely on the locale's dow (possibly overridden by
+                       // our firstDay option), which may not be Monday. We cannot change
+                       // dow, because that would affect the calendar start day as well.
+                       if (date._locale._fullCalendar_weekCalc === 'ISO') {
+                               weekCalcFirstDoW = 1;  // Monday by ISO 8601 definition
+                       }
+                       else {
+                               weekCalcFirstDoW = date._locale.firstDayOfWeek();
+                       }
+               }
+
+               html += '<td class="' + classes.join(' ') + '" data-date="' + date.format() + '">';
+
+               if (this.view.cellWeekNumbersVisible && (date.day() == weekCalcFirstDoW)) {
+                       html += this.view.buildGotoAnchorHtml(
+                               { date: date, type: 'week' },
+                               { 'class': 'fc-week-number' },
+                               date.format('w') // inner HTML
+                       );
+               }
+
+               if (this.view.dayNumbersVisible) {
+                       html += this.view.buildGotoAnchorHtml(
+                               date,
+                               { 'class': 'fc-day-number' },
+                               date.date() // inner HTML
+                       );
+               }
+
+               html += '</td>';
+
+               return html;
+       },
+
+
+       /* Options
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Computes a default event time formatting string if `timeFormat` is not explicitly defined
+       computeEventTimeFormat: function() {
+               return this.view.opt('extraSmallTimeFormat'); // like "6p" or "6:30p"
+       },
+
+
+       // Computes a default `displayEventEnd` value if one is not expliclty defined
+       computeDisplayEventEnd: function() {
+               return this.colCnt == 1; // we'll likely have space if there's only one day
+       },
+
+
+       /* Dates
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       rangeUpdated: function() {
+               this.updateDayTable();
+       },
+
+
+       // Slices up the given span (unzoned start/end with other misc data) into an array of segments
+       spanToSegs: function(span) {
+               var segs = this.sliceRangeByRow(span);
+               var i, seg;
+
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+                       if (this.isRTL) {
+                               seg.leftCol = this.daysPerRow - 1 - seg.lastRowDayIndex;
+                               seg.rightCol = this.daysPerRow - 1 - seg.firstRowDayIndex;
+                       }
+                       else {
+                               seg.leftCol = seg.firstRowDayIndex;
+                               seg.rightCol = seg.lastRowDayIndex;
+                       }
+               }
+
+               return segs;
+       },
+
+
+       /* Hit System
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       prepareHits: function() {
+               this.colCoordCache.build();
+               this.rowCoordCache.build();
+               this.rowCoordCache.bottoms[this.rowCnt - 1] += this.bottomCoordPadding; // hack
+       },
+
+
+       releaseHits: function() {
+               this.colCoordCache.clear();
+               this.rowCoordCache.clear();
+       },
+
+
+       queryHit: function(leftOffset, topOffset) {
+               if (this.colCoordCache.isLeftInBounds(leftOffset) && this.rowCoordCache.isTopInBounds(topOffset)) {
+                       var col = this.colCoordCache.getHorizontalIndex(leftOffset);
+                       var row = this.rowCoordCache.getVerticalIndex(topOffset);
+
+                       if (row != null && col != null) {
+                               return this.getCellHit(row, col);
+                       }
+               }
+       },
+
+
+       getHitSpan: function(hit) {
+               return this.getCellRange(hit.row, hit.col);
+       },
+
+
+       getHitEl: function(hit) {
+               return this.getCellEl(hit.row, hit.col);
+       },
+
+
+       /* Cell System
+       ------------------------------------------------------------------------------------------------------------------*/
+       // FYI: the first column is the leftmost column, regardless of date
+
+
+       getCellHit: function(row, col) {
+               return {
+                       row: row,
+                       col: col,
+                       component: this, // needed unfortunately :(
+                       left: this.colCoordCache.getLeftOffset(col),
+                       right: this.colCoordCache.getRightOffset(col),
+                       top: this.rowCoordCache.getTopOffset(row),
+                       bottom: this.rowCoordCache.getBottomOffset(row)
+               };
+       },
+
+
+       getCellEl: function(row, col) {
+               return this.cellEls.eq(row * this.colCnt + col);
+       },
+
+
+       /* Event Drag Visualization
+       ------------------------------------------------------------------------------------------------------------------*/
+       // TODO: move to DayGrid.event, similar to what we did with Grid's drag methods
+
+
+       // Renders a visual indication of an event or external element being dragged.
+       // `eventLocation` has zoned start and end (optional)
+       renderDrag: function(eventLocation, seg) {
+
+               // always render a highlight underneath
+               this.renderHighlight(this.eventToSpan(eventLocation));
+
+               // if a segment from the same calendar but another component is being dragged, render a helper event
+               if (seg && seg.component !== this) {
+                       return this.renderEventLocationHelper(eventLocation, seg); // returns mock event elements
+               }
+       },
+
+
+       // Unrenders any visual indication of a hovering event
+       unrenderDrag: function() {
+               this.unrenderHighlight();
+               this.unrenderHelper();
+       },
+
+
+       /* Event Resize Visualization
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a visual indication of an event being resized
+       renderEventResize: function(eventLocation, seg) {
+               this.renderHighlight(this.eventToSpan(eventLocation));
+               return this.renderEventLocationHelper(eventLocation, seg); // returns mock event elements
+       },
+
+
+       // Unrenders a visual indication of an event being resized
+       unrenderEventResize: function() {
+               this.unrenderHighlight();
+               this.unrenderHelper();
+       },
+
+
+       /* Event Helper
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a mock "helper" event. `sourceSeg` is the associated internal segment object. It can be null.
+       renderHelper: function(event, sourceSeg) {
+               var helperNodes = [];
+               var segs = this.eventToSegs(event);
+               var rowStructs;
+
+               segs = this.renderFgSegEls(segs); // assigns each seg's el and returns a subset of segs that were rendered
+               rowStructs = this.renderSegRows(segs);
+
+               // inject each new event skeleton into each associated row
+               this.rowEls.each(function(row, rowNode) {
+                       var rowEl = $(rowNode); // the .fc-row
+                       var skeletonEl = $('<div class="fc-helper-skeleton"><table/></div>'); // will be absolutely positioned
+                       var skeletonTop;
+
+                       // If there is an original segment, match the top position. Otherwise, put it at the row's top level
+                       if (sourceSeg && sourceSeg.row === row) {
+                               skeletonTop = sourceSeg.el.position().top;
+                       }
+                       else {
+                               skeletonTop = rowEl.find('.fc-content-skeleton tbody').position().top;
+                       }
+
+                       skeletonEl.css('top', skeletonTop)
+                               .find('table')
+                                       .append(rowStructs[row].tbodyEl);
+
+                       rowEl.append(skeletonEl);
+                       helperNodes.push(skeletonEl[0]);
+               });
+
+               return ( // must return the elements rendered
+                       this.helperEls = $(helperNodes) // array -> jQuery set
+               );
+       },
+
+
+       // Unrenders any visual indication of a mock helper event
+       unrenderHelper: function() {
+               if (this.helperEls) {
+                       this.helperEls.remove();
+                       this.helperEls = null;
+               }
+       },
+
+
+       /* Fill System (highlight, background events, business hours)
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       fillSegTag: 'td', // override the default tag name
+
+
+       // Renders a set of rectangles over the given segments of days.
+       // Only returns segments that successfully rendered.
+       renderFill: function(type, segs, className) {
+               var nodes = [];
+               var i, seg;
+               var skeletonEl;
+
+               segs = this.renderFillSegEls(type, segs); // assignes `.el` to each seg. returns successfully rendered segs
+
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+                       skeletonEl = this.renderFillRow(type, seg, className);
+                       this.rowEls.eq(seg.row).append(skeletonEl);
+                       nodes.push(skeletonEl[0]);
+               }
+
+               this.elsByFill[type] = $(nodes);
+
+               return segs;
+       },
+
+
+       // Generates the HTML needed for one row of a fill. Requires the seg's el to be rendered.
+       renderFillRow: function(type, seg, className) {
+               var colCnt = this.colCnt;
+               var startCol = seg.leftCol;
+               var endCol = seg.rightCol + 1;
+               var skeletonEl;
+               var trEl;
+
+               className = className || type.toLowerCase();
+
+               skeletonEl = $(
+                       '<div class="fc-' + className + '-skeleton">' +
+                               '<table><tr/></table>' +
+                       '</div>'
+               );
+               trEl = skeletonEl.find('tr');
+
+               if (startCol > 0) {
+                       trEl.append('<td colspan="' + startCol + '"/>');
+               }
+
+               trEl.append(
+                       seg.el.attr('colspan', endCol - startCol)
+               );
+
+               if (endCol < colCnt) {
+                       trEl.append('<td colspan="' + (colCnt - endCol) + '"/>');
+               }
+
+               this.bookendCells(trEl);
+
+               return skeletonEl;
+       }
+
+});
+
+;;
+
+/* Event-rendering methods for the DayGrid class
+----------------------------------------------------------------------------------------------------------------------*/
+
+DayGrid.mixin({
+
+       rowStructs: null, // an array of objects, each holding information about a row's foreground event-rendering
+
+
+       // Unrenders all events currently rendered on the grid
+       unrenderEvents: function() {
+               this.removeSegPopover(); // removes the "more.." events popover
+               Grid.prototype.unrenderEvents.apply(this, arguments); // calls the super-method
+       },
+
+
+       // Retrieves all rendered segment objects currently rendered on the grid
+       getEventSegs: function() {
+               return Grid.prototype.getEventSegs.call(this) // get the segments from the super-method
+                       .concat(this.popoverSegs || []); // append the segments from the "more..." popover
+       },
+
+
+       // Renders the given background event segments onto the grid
+       renderBgSegs: function(segs) {
+
+               // don't render timed background events
+               var allDaySegs = $.grep(segs, function(seg) {
+                       return seg.event.allDay;
+               });
+
+               return Grid.prototype.renderBgSegs.call(this, allDaySegs); // call the super-method
+       },
+
+
+       // Renders the given foreground event segments onto the grid
+       renderFgSegs: function(segs) {
+               var rowStructs;
+
+               // render an `.el` on each seg
+               // returns a subset of the segs. segs that were actually rendered
+               segs = this.renderFgSegEls(segs);
+
+               rowStructs = this.rowStructs = this.renderSegRows(segs);
+
+               // append to each row's content skeleton
+               this.rowEls.each(function(i, rowNode) {
+                       $(rowNode).find('.fc-content-skeleton > table').append(
+                               rowStructs[i].tbodyEl
+                       );
+               });
+
+               return segs; // return only the segs that were actually rendered
+       },
+
+
+       // Unrenders all currently rendered foreground event segments
+       unrenderFgSegs: function() {
+               var rowStructs = this.rowStructs || [];
+               var rowStruct;
+
+               while ((rowStruct = rowStructs.pop())) {
+                       rowStruct.tbodyEl.remove();
+               }
+
+               this.rowStructs = null;
+       },
+
+
+       // Uses the given events array to generate <tbody> elements that should be appended to each row's content skeleton.
+       // Returns an array of rowStruct objects (see the bottom of `renderSegRow`).
+       // PRECONDITION: each segment shoud already have a rendered and assigned `.el`
+       renderSegRows: function(segs) {
+               var rowStructs = [];
+               var segRows;
+               var row;
+
+               segRows = this.groupSegRows(segs); // group into nested arrays
+
+               // iterate each row of segment groupings
+               for (row = 0; row < segRows.length; row++) {
+                       rowStructs.push(
+                               this.renderSegRow(row, segRows[row])
+                       );
+               }
+
+               return rowStructs;
+       },
+
+
+       // Builds the HTML to be used for the default element for an individual segment
+       fgSegHtml: function(seg, disableResizing) {
+               var view = this.view;
+               var event = seg.event;
+               var isDraggable = view.isEventDraggable(event);
+               var isResizableFromStart = !disableResizing && event.allDay &&
+                       seg.isStart && view.isEventResizableFromStart(event);
+               var isResizableFromEnd = !disableResizing && event.allDay &&
+                       seg.isEnd && view.isEventResizableFromEnd(event);
+               var classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);
+               var skinCss = cssToStr(this.getSegSkinCss(seg));
+               var timeHtml = '';
+               var timeText;
+               var titleHtml;
+
+               classes.unshift('fc-day-grid-event', 'fc-h-event');
+
+               // Only display a timed events time if it is the starting segment
+               if (seg.isStart) {
+                       timeText = this.getEventTimeText(event);
+                       if (timeText) {
+                               timeHtml = '<span class="fc-time">' + htmlEscape(timeText) + '</span>';
+                       }
+               }
+
+               titleHtml =
+                       '<span class="fc-title">' +
+                               (htmlEscape(event.title || '') || '&nbsp;') + // we always want one line of height
+                       '</span>';
+               
+               return '<a class="' + classes.join(' ') + '"' +
+                               (event.url ?
+                                       ' href="' + htmlEscape(event.url) + '"' :
+                                       ''
+                                       ) +
+                               (skinCss ?
+                                       ' style="' + skinCss + '"' :
+                                       ''
+                                       ) +
+                       '>' +
+                               '<div class="fc-content">' +
+                                       (this.isRTL ?
+                                               titleHtml + ' ' + timeHtml : // put a natural space in between
+                                               timeHtml + ' ' + titleHtml   //
+                                               ) +
+                               '</div>' +
+                               (isResizableFromStart ?
+                                       '<div class="fc-resizer fc-start-resizer" />' :
+                                       ''
+                                       ) +
+                               (isResizableFromEnd ?
+                                       '<div class="fc-resizer fc-end-resizer" />' :
+                                       ''
+                                       ) +
+                       '</a>';
+       },
+
+
+       // Given a row # and an array of segments all in the same row, render a <tbody> element, a skeleton that contains
+       // the segments. Returns object with a bunch of internal data about how the render was calculated.
+       // NOTE: modifies rowSegs
+       renderSegRow: function(row, rowSegs) {
+               var colCnt = this.colCnt;
+               var segLevels = this.buildSegLevels(rowSegs); // group into sub-arrays of levels
+               var levelCnt = Math.max(1, segLevels.length); // ensure at least one level
+               var tbody = $('<tbody/>');
+               var segMatrix = []; // lookup for which segments are rendered into which level+col cells
+               var cellMatrix = []; // lookup for all <td> elements of the level+col matrix
+               var loneCellMatrix = []; // lookup for <td> elements that only take up a single column
+               var i, levelSegs;
+               var col;
+               var tr;
+               var j, seg;
+               var td;
+
+               // populates empty cells from the current column (`col`) to `endCol`
+               function emptyCellsUntil(endCol) {
+                       while (col < endCol) {
+                               // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell
+                               td = (loneCellMatrix[i - 1] || [])[col];
+                               if (td) {
+                                       td.attr(
+                                               'rowspan',
+                                               parseInt(td.attr('rowspan') || 1, 10) + 1
+                                       );
+                               }
+                               else {
+                                       td = $('<td/>');
+                                       tr.append(td);
+                               }
+                               cellMatrix[i][col] = td;
+                               loneCellMatrix[i][col] = td;
+                               col++;
+                       }
+               }
+
+               for (i = 0; i < levelCnt; i++) { // iterate through all levels
+                       levelSegs = segLevels[i];
+                       col = 0;
+                       tr = $('<tr/>');
+
+                       segMatrix.push([]);
+                       cellMatrix.push([]);
+                       loneCellMatrix.push([]);
+
+                       // levelCnt might be 1 even though there are no actual levels. protect against this.
+                       // this single empty row is useful for styling.
+                       if (levelSegs) {
+                               for (j = 0; j < levelSegs.length; j++) { // iterate through segments in level
+                                       seg = levelSegs[j];
+
+                                       emptyCellsUntil(seg.leftCol);
+
+                                       // create a container that occupies or more columns. append the event element.
+                                       td = $('<td class="fc-event-container"/>').append(seg.el);
+                                       if (seg.leftCol != seg.rightCol) {
+                                               td.attr('colspan', seg.rightCol - seg.leftCol + 1);
+                                       }
+                                       else { // a single-column segment
+                                               loneCellMatrix[i][col] = td;
+                                       }
+
+                                       while (col <= seg.rightCol) {
+                                               cellMatrix[i][col] = td;
+                                               segMatrix[i][col] = seg;
+                                               col++;
+                                       }
+
+                                       tr.append(td);
+                               }
+                       }
+
+                       emptyCellsUntil(colCnt); // finish off the row
+                       this.bookendCells(tr);
+                       tbody.append(tr);
+               }
+
+               return { // a "rowStruct"
+                       row: row, // the row number
+                       tbodyEl: tbody,
+                       cellMatrix: cellMatrix,
+                       segMatrix: segMatrix,
+                       segLevels: segLevels,
+                       segs: rowSegs
+               };
+       },
+
+
+       // Stacks a flat array of segments, which are all assumed to be in the same row, into subarrays of vertical levels.
+       // NOTE: modifies segs
+       buildSegLevels: function(segs) {
+               var levels = [];
+               var i, seg;
+               var j;
+
+               // Give preference to elements with certain criteria, so they have
+               // a chance to be closer to the top.
+               this.sortEventSegs(segs);
+               
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+
+                       // loop through levels, starting with the topmost, until the segment doesn't collide with other segments
+                       for (j = 0; j < levels.length; j++) {
+                               if (!isDaySegCollision(seg, levels[j])) {
+                                       break;
+                               }
+                       }
+                       // `j` now holds the desired subrow index
+                       seg.level = j;
+
+                       // create new level array if needed and append segment
+                       (levels[j] || (levels[j] = [])).push(seg);
+               }
+
+               // order segments left-to-right. very important if calendar is RTL
+               for (j = 0; j < levels.length; j++) {
+                       levels[j].sort(compareDaySegCols);
+               }
+
+               return levels;
+       },
+
+
+       // Given a flat array of segments, return an array of sub-arrays, grouped by each segment's row
+       groupSegRows: function(segs) {
+               var segRows = [];
+               var i;
+
+               for (i = 0; i < this.rowCnt; i++) {
+                       segRows.push([]);
+               }
+
+               for (i = 0; i < segs.length; i++) {
+                       segRows[segs[i].row].push(segs[i]);
+               }
+
+               return segRows;
+       }
+
+});
+
+
+// Computes whether two segments' columns collide. They are assumed to be in the same row.
+function isDaySegCollision(seg, otherSegs) {
+       var i, otherSeg;
+
+       for (i = 0; i < otherSegs.length; i++) {
+               otherSeg = otherSegs[i];
+
+               if (
+                       otherSeg.leftCol <= seg.rightCol &&
+                       otherSeg.rightCol >= seg.leftCol
+               ) {
+                       return true;
+               }
+       }
+
+       return false;
+}
+
+
+// A cmp function for determining the leftmost event
+function compareDaySegCols(a, b) {
+       return a.leftCol - b.leftCol;
+}
+
+;;
+
+/* Methods relate to limiting the number events for a given day on a DayGrid
+----------------------------------------------------------------------------------------------------------------------*/
+// NOTE: all the segs being passed around in here are foreground segs
+
+DayGrid.mixin({
+
+       segPopover: null, // the Popover that holds events that can't fit in a cell. null when not visible
+       popoverSegs: null, // an array of segment objects that the segPopover holds. null when not visible
+
+
+       removeSegPopover: function() {
+               if (this.segPopover) {
+                       this.segPopover.hide(); // in handler, will call segPopover's removeElement
+               }
+       },
+
+
+       // Limits the number of "levels" (vertically stacking layers of events) for each row of the grid.
+       // `levelLimit` can be false (don't limit), a number, or true (should be computed).
+       limitRows: function(levelLimit) {
+               var rowStructs = this.rowStructs || [];
+               var row; // row #
+               var rowLevelLimit;
+
+               for (row = 0; row < rowStructs.length; row++) {
+                       this.unlimitRow(row);
+
+                       if (!levelLimit) {
+                               rowLevelLimit = false;
+                       }
+                       else if (typeof levelLimit === 'number') {
+                               rowLevelLimit = levelLimit;
+                       }
+                       else {
+                               rowLevelLimit = this.computeRowLevelLimit(row);
+                       }
+
+                       if (rowLevelLimit !== false) {
+                               this.limitRow(row, rowLevelLimit);
+                       }
+               }
+       },
+
+
+       // Computes the number of levels a row will accomodate without going outside its bounds.
+       // Assumes the row is "rigid" (maintains a constant height regardless of what is inside).
+       // `row` is the row number.
+       computeRowLevelLimit: function(row) {
+               var rowEl = this.rowEls.eq(row); // the containing "fake" row div
+               var rowHeight = rowEl.height(); // TODO: cache somehow?
+               var trEls = this.rowStructs[row].tbodyEl.children();
+               var i, trEl;
+               var trHeight;
+
+               function iterInnerHeights(i, childNode) {
+                       trHeight = Math.max(trHeight, $(childNode).outerHeight());
+               }
+
+               // Reveal one level <tr> at a time and stop when we find one out of bounds
+               for (i = 0; i < trEls.length; i++) {
+                       trEl = trEls.eq(i).removeClass('fc-limited'); // reset to original state (reveal)
+
+                       // with rowspans>1 and IE8, trEl.outerHeight() would return the height of the largest cell,
+                       // so instead, find the tallest inner content element.
+                       trHeight = 0;
+                       trEl.find('> td > :first-child').each(iterInnerHeights);
+
+                       if (trEl.position().top + trHeight > rowHeight) {
+                               return i;
+                       }
+               }
+
+               return false; // should not limit at all
+       },
+
+
+       // Limits the given grid row to the maximum number of levels and injects "more" links if necessary.
+       // `row` is the row number.
+       // `levelLimit` is a number for the maximum (inclusive) number of levels allowed.
+       limitRow: function(row, levelLimit) {
+               var _this = this;
+               var rowStruct = this.rowStructs[row];
+               var moreNodes = []; // array of "more" <a> links and <td> DOM nodes
+               var col = 0; // col #, left-to-right (not chronologically)
+               var levelSegs; // array of segment objects in the last allowable level, ordered left-to-right
+               var cellMatrix; // a matrix (by level, then column) of all <td> jQuery elements in the row
+               var limitedNodes; // array of temporarily hidden level <tr> and segment <td> DOM nodes
+               var i, seg;
+               var segsBelow; // array of segment objects below `seg` in the current `col`
+               var totalSegsBelow; // total number of segments below `seg` in any of the columns `seg` occupies
+               var colSegsBelow; // array of segment arrays, below seg, one for each column (offset from segs's first column)
+               var td, rowspan;
+               var segMoreNodes; // array of "more" <td> cells that will stand-in for the current seg's cell
+               var j;
+               var moreTd, moreWrap, moreLink;
+
+               // Iterates through empty level cells and places "more" links inside if need be
+               function emptyCellsUntil(endCol) { // goes from current `col` to `endCol`
+                       while (col < endCol) {
+                               segsBelow = _this.getCellSegs(row, col, levelLimit);
+                               if (segsBelow.length) {
+                                       td = cellMatrix[levelLimit - 1][col];
+                                       moreLink = _this.renderMoreLink(row, col, segsBelow);
+                                       moreWrap = $('<div/>').append(moreLink);
+                                       td.append(moreWrap);
+                                       moreNodes.push(moreWrap[0]);
+                               }
+                               col++;
+                       }
+               }
+
+               if (levelLimit && levelLimit < rowStruct.segLevels.length) { // is it actually over the limit?
+                       levelSegs = rowStruct.segLevels[levelLimit - 1];
+                       cellMatrix = rowStruct.cellMatrix;
+
+                       limitedNodes = rowStruct.tbodyEl.children().slice(levelLimit) // get level <tr> elements past the limit
+                               .addClass('fc-limited').get(); // hide elements and get a simple DOM-nodes array
+
+                       // iterate though segments in the last allowable level
+                       for (i = 0; i < levelSegs.length; i++) {
+                               seg = levelSegs[i];
+                               emptyCellsUntil(seg.leftCol); // process empty cells before the segment
+
+                               // determine *all* segments below `seg` that occupy the same columns
+                               colSegsBelow = [];
+                               totalSegsBelow = 0;
+                               while (col <= seg.rightCol) {
+                                       segsBelow = this.getCellSegs(row, col, levelLimit);
+                                       colSegsBelow.push(segsBelow);
+                                       totalSegsBelow += segsBelow.length;
+                                       col++;
+                               }
+
+                               if (totalSegsBelow) { // do we need to replace this segment with one or many "more" links?
+                                       td = cellMatrix[levelLimit - 1][seg.leftCol]; // the segment's parent cell
+                                       rowspan = td.attr('rowspan') || 1;
+                                       segMoreNodes = [];
+
+                                       // make a replacement <td> for each column the segment occupies. will be one for each colspan
+                                       for (j = 0; j < colSegsBelow.length; j++) {
+                                               moreTd = $('<td class="fc-more-cell"/>').attr('rowspan', rowspan);
+                                               segsBelow = colSegsBelow[j];
+                                               moreLink = this.renderMoreLink(
+                                                       row,
+                                                       seg.leftCol + j,
+                                                       [ seg ].concat(segsBelow) // count seg as hidden too
+                                               );
+                                               moreWrap = $('<div/>').append(moreLink);
+                                               moreTd.append(moreWrap);
+                                               segMoreNodes.push(moreTd[0]);
+                                               moreNodes.push(moreTd[0]);
+                                       }
+
+                                       td.addClass('fc-limited').after($(segMoreNodes)); // hide original <td> and inject replacements
+                                       limitedNodes.push(td[0]);
+                               }
+                       }
+
+                       emptyCellsUntil(this.colCnt); // finish off the level
+                       rowStruct.moreEls = $(moreNodes); // for easy undoing later
+                       rowStruct.limitedEls = $(limitedNodes); // for easy undoing later
+               }
+       },
+
+
+       // Reveals all levels and removes all "more"-related elements for a grid's row.
+       // `row` is a row number.
+       unlimitRow: function(row) {
+               var rowStruct = this.rowStructs[row];
+
+               if (rowStruct.moreEls) {
+                       rowStruct.moreEls.remove();
+                       rowStruct.moreEls = null;
+               }
+
+               if (rowStruct.limitedEls) {
+                       rowStruct.limitedEls.removeClass('fc-limited');
+                       rowStruct.limitedEls = null;
+               }
+       },
+
+
+       // Renders an <a> element that represents hidden event element for a cell.
+       // Responsible for attaching click handler as well.
+       renderMoreLink: function(row, col, hiddenSegs) {
+               var _this = this;
+               var view = this.view;
+
+               return $('<a class="fc-more"/>')
+                       .text(
+                               this.getMoreLinkText(hiddenSegs.length)
+                       )
+                       .on('click', function(ev) {
+                               var clickOption = view.opt('eventLimitClick');
+                               var date = _this.getCellDate(row, col);
+                               var moreEl = $(this);
+                               var dayEl = _this.getCellEl(row, col);
+                               var allSegs = _this.getCellSegs(row, col);
+
+                               // rescope the segments to be within the cell's date
+                               var reslicedAllSegs = _this.resliceDaySegs(allSegs, date);
+                               var reslicedHiddenSegs = _this.resliceDaySegs(hiddenSegs, date);
+
+                               if (typeof clickOption === 'function') {
+                                       // the returned value can be an atomic option
+                                       clickOption = view.trigger('eventLimitClick', null, {
+                                               date: date,
+                                               dayEl: dayEl,
+                                               moreEl: moreEl,
+                                               segs: reslicedAllSegs,
+                                               hiddenSegs: reslicedHiddenSegs
+                                       }, ev);
+                               }
+
+                               if (clickOption === 'popover') {
+                                       _this.showSegPopover(row, col, moreEl, reslicedAllSegs);
+                               }
+                               else if (typeof clickOption === 'string') { // a view name
+                                       view.calendar.zoomTo(date, clickOption);
+                               }
+                       });
+       },
+
+
+       // Reveals the popover that displays all events within a cell
+       showSegPopover: function(row, col, moreLink, segs) {
+               var _this = this;
+               var view = this.view;
+               var moreWrap = moreLink.parent(); // the <div> wrapper around the <a>
+               var topEl; // the element we want to match the top coordinate of
+               var options;
+
+               if (this.rowCnt == 1) {
+                       topEl = view.el; // will cause the popover to cover any sort of header
+               }
+               else {
+                       topEl = this.rowEls.eq(row); // will align with top of row
+               }
+
+               options = {
+                       className: 'fc-more-popover',
+                       content: this.renderSegPopoverContent(row, col, segs),
+                       parentEl: this.view.el, // attach to root of view. guarantees outside of scrollbars.
+                       top: topEl.offset().top,
+                       autoHide: true, // when the user clicks elsewhere, hide the popover
+                       viewportConstrain: view.opt('popoverViewportConstrain'),
+                       hide: function() {
+                               // kill everything when the popover is hidden
+                               _this.segPopover.removeElement();
+                               _this.segPopover = null;
+                               _this.popoverSegs = null;
+                       }
+               };
+
+               // Determine horizontal coordinate.
+               // We use the moreWrap instead of the <td> to avoid border confusion.
+               if (this.isRTL) {
+                       options.right = moreWrap.offset().left + moreWrap.outerWidth() + 1; // +1 to be over cell border
+               }
+               else {
+                       options.left = moreWrap.offset().left - 1; // -1 to be over cell border
+               }
+
+               this.segPopover = new Popover(options);
+               this.segPopover.show();
+
+               // the popover doesn't live within the grid's container element, and thus won't get the event
+               // delegated-handlers for free. attach event-related handlers to the popover.
+               this.bindSegHandlersToEl(this.segPopover.el);
+       },
+
+
+       // Builds the inner DOM contents of the segment popover
+       renderSegPopoverContent: function(row, col, segs) {
+               var view = this.view;
+               var isTheme = view.opt('theme');
+               var title = this.getCellDate(row, col).format(view.opt('dayPopoverFormat'));
+               var content = $(
+                       '<div class="fc-header ' + view.widgetHeaderClass + '">' +
+                               '<span class="fc-close ' +
+                                       (isTheme ? 'ui-icon ui-icon-closethick' : 'fc-icon fc-icon-x') +
+                               '"></span>' +
+                               '<span class="fc-title">' +
+                                       htmlEscape(title) +
+                               '</span>' +
+                               '<div class="fc-clear"/>' +
+                       '</div>' +
+                       '<div class="fc-body ' + view.widgetContentClass + '">' +
+                               '<div class="fc-event-container"></div>' +
+                       '</div>'
+               );
+               var segContainer = content.find('.fc-event-container');
+               var i;
+
+               // render each seg's `el` and only return the visible segs
+               segs = this.renderFgSegEls(segs, true); // disableResizing=true
+               this.popoverSegs = segs;
+
+               for (i = 0; i < segs.length; i++) {
+
+                       // because segments in the popover are not part of a grid coordinate system, provide a hint to any
+                       // grids that want to do drag-n-drop about which cell it came from
+                       this.prepareHits();
+                       segs[i].hit = this.getCellHit(row, col);
+                       this.releaseHits();
+
+                       segContainer.append(segs[i].el);
+               }
+
+               return content;
+       },
+
+
+       // Given the events within an array of segment objects, reslice them to be in a single day
+       resliceDaySegs: function(segs, dayDate) {
+
+               // build an array of the original events
+               var events = $.map(segs, function(seg) {
+                       return seg.event;
+               });
+
+               var dayStart = dayDate.clone();
+               var dayEnd = dayStart.clone().add(1, 'days');
+               var dayRange = { start: dayStart, end: dayEnd };
+
+               // slice the events with a custom slicing function
+               segs = this.eventsToSegs(
+                       events,
+                       function(range) {
+                               var seg = intersectRanges(range, dayRange); // undefind if no intersection
+                               return seg ? [ seg ] : []; // must return an array of segments
+                       }
+               );
+
+               // force an order because eventsToSegs doesn't guarantee one
+               this.sortEventSegs(segs);
+
+               return segs;
+       },
+
+
+       // Generates the text that should be inside a "more" link, given the number of events it represents
+       getMoreLinkText: function(num) {
+               var opt = this.view.opt('eventLimitText');
+
+               if (typeof opt === 'function') {
+                       return opt(num);
+               }
+               else {
+                       return '+' + num + ' ' + opt;
+               }
+       },
+
+
+       // Returns segments within a given cell.
+       // If `startLevel` is specified, returns only events including and below that level. Otherwise returns all segs.
+       getCellSegs: function(row, col, startLevel) {
+               var segMatrix = this.rowStructs[row].segMatrix;
+               var level = startLevel || 0;
+               var segs = [];
+               var seg;
+
+               while (level < segMatrix.length) {
+                       seg = segMatrix[level][col];
+                       if (seg) {
+                               segs.push(seg);
+                       }
+                       level++;
+               }
+
+               return segs;
+       }
+
+});
+
+;;
+
+/* A component that renders one or more columns of vertical time slots
+----------------------------------------------------------------------------------------------------------------------*/
+// We mixin DayTable, even though there is only a single row of days
+
+var TimeGrid = FC.TimeGrid = Grid.extend(DayTableMixin, {
+
+       slotDuration: null, // duration of a "slot", a distinct time segment on given day, visualized by lines
+       snapDuration: null, // granularity of time for dragging and selecting
+       snapsPerSlot: null,
+       minTime: null, // Duration object that denotes the first visible time of any given day
+       maxTime: null, // Duration object that denotes the exclusive visible end time of any given day
+       labelFormat: null, // formatting string for times running along vertical axis
+       labelInterval: null, // duration of how often a label should be displayed for a slot
+
+       colEls: null, // cells elements in the day-row background
+       slatContainerEl: null, // div that wraps all the slat rows
+       slatEls: null, // elements running horizontally across all columns
+       nowIndicatorEls: null,
+
+       colCoordCache: null,
+       slatCoordCache: null,
+
+
+       constructor: function() {
+               Grid.apply(this, arguments); // call the super-constructor
+
+               this.processOptions();
+       },
+
+
+       // Renders the time grid into `this.el`, which should already be assigned.
+       // Relies on the view's colCnt. In the future, this component should probably be self-sufficient.
+       renderDates: function() {
+               this.el.html(this.renderHtml());
+               this.colEls = this.el.find('.fc-day');
+               this.slatContainerEl = this.el.find('.fc-slats');
+               this.slatEls = this.slatContainerEl.find('tr');
+
+               this.colCoordCache = new CoordCache({
+                       els: this.colEls,
+                       isHorizontal: true
+               });
+               this.slatCoordCache = new CoordCache({
+                       els: this.slatEls,
+                       isVertical: true
+               });
+
+               this.renderContentSkeleton();
+       },
+
+
+       // Renders the basic HTML skeleton for the grid
+       renderHtml: function() {
+               return '' +
+                       '<div class="fc-bg">' +
+                               '<table>' +
+                                       this.renderBgTrHtml(0) + // row=0
+                               '</table>' +
+                       '</div>' +
+                       '<div class="fc-slats">' +
+                               '<table>' +
+                                       this.renderSlatRowHtml() +
+                               '</table>' +
+                       '</div>';
+       },
+
+
+       // Generates the HTML for the horizontal "slats" that run width-wise. Has a time axis on a side. Depends on RTL.
+       renderSlatRowHtml: function() {
+               var view = this.view;
+               var isRTL = this.isRTL;
+               var html = '';
+               var slotTime = moment.duration(+this.minTime); // wish there was .clone() for durations
+               var slotDate; // will be on the view's first day, but we only care about its time
+               var isLabeled;
+               var axisHtml;
+
+               // Calculate the time for each slot
+               while (slotTime < this.maxTime) {
+                       slotDate = this.start.clone().time(slotTime);
+                       isLabeled = isInt(divideDurationByDuration(slotTime, this.labelInterval));
+
+                       axisHtml =
+                               '<td class="fc-axis fc-time ' + view.widgetContentClass + '" ' + view.axisStyleAttr() + '>' +
+                                       (isLabeled ?
+                                               '<span>' + // for matchCellWidths
+                                                       htmlEscape(slotDate.format(this.labelFormat)) +
+                                               '</span>' :
+                                               ''
+                                               ) +
+                               '</td>';
+
+                       html +=
+                               '<tr data-time="' + slotDate.format('HH:mm:ss') + '"' +
+                                       (isLabeled ? '' : ' class="fc-minor"') +
+                                       '>' +
+                                       (!isRTL ? axisHtml : '') +
+                                       '<td class="' + view.widgetContentClass + '"/>' +
+                                       (isRTL ? axisHtml : '') +
+                               "</tr>";
+
+                       slotTime.add(this.slotDuration);
+               }
+
+               return html;
+       },
+
+
+       /* Options
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Parses various options into properties of this object
+       processOptions: function() {
+               var view = this.view;
+               var slotDuration = view.opt('slotDuration');
+               var snapDuration = view.opt('snapDuration');
+               var input;
+
+               slotDuration = moment.duration(slotDuration);
+               snapDuration = snapDuration ? moment.duration(snapDuration) : slotDuration;
+
+               this.slotDuration = slotDuration;
+               this.snapDuration = snapDuration;
+               this.snapsPerSlot = slotDuration / snapDuration; // TODO: ensure an integer multiple?
+
+               this.minResizeDuration = snapDuration; // hack
+
+               this.minTime = moment.duration(view.opt('minTime'));
+               this.maxTime = moment.duration(view.opt('maxTime'));
+
+               // might be an array value (for TimelineView).
+               // if so, getting the most granular entry (the last one probably).
+               input = view.opt('slotLabelFormat');
+               if ($.isArray(input)) {
+                       input = input[input.length - 1];
+               }
+
+               this.labelFormat =
+                       input ||
+                       view.opt('smallTimeFormat'); // the computed default
+
+               input = view.opt('slotLabelInterval');
+               this.labelInterval = input ?
+                       moment.duration(input) :
+                       this.computeLabelInterval(slotDuration);
+       },
+
+
+       // Computes an automatic value for slotLabelInterval
+       computeLabelInterval: function(slotDuration) {
+               var i;
+               var labelInterval;
+               var slotsPerLabel;
+
+               // find the smallest stock label interval that results in more than one slots-per-label
+               for (i = AGENDA_STOCK_SUB_DURATIONS.length - 1; i >= 0; i--) {
+                       labelInterval = moment.duration(AGENDA_STOCK_SUB_DURATIONS[i]);
+                       slotsPerLabel = divideDurationByDuration(labelInterval, slotDuration);
+                       if (isInt(slotsPerLabel) && slotsPerLabel > 1) {
+                               return labelInterval;
+                       }
+               }
+
+               return moment.duration(slotDuration); // fall back. clone
+       },
+
+
+       // Computes a default event time formatting string if `timeFormat` is not explicitly defined
+       computeEventTimeFormat: function() {
+               return this.view.opt('noMeridiemTimeFormat'); // like "6:30" (no AM/PM)
+       },
+
+
+       // Computes a default `displayEventEnd` value if one is not expliclty defined
+       computeDisplayEventEnd: function() {
+               return true;
+       },
+
+
+       /* Hit System
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       prepareHits: function() {
+               this.colCoordCache.build();
+               this.slatCoordCache.build();
+       },
+
+
+       releaseHits: function() {
+               this.colCoordCache.clear();
+               // NOTE: don't clear slatCoordCache because we rely on it for computeTimeTop
+       },
+
+
+       queryHit: function(leftOffset, topOffset) {
+               var snapsPerSlot = this.snapsPerSlot;
+               var colCoordCache = this.colCoordCache;
+               var slatCoordCache = this.slatCoordCache;
+
+               if (colCoordCache.isLeftInBounds(leftOffset) && slatCoordCache.isTopInBounds(topOffset)) {
+                       var colIndex = colCoordCache.getHorizontalIndex(leftOffset);
+                       var slatIndex = slatCoordCache.getVerticalIndex(topOffset);
+
+                       if (colIndex != null && slatIndex != null) {
+                               var slatTop = slatCoordCache.getTopOffset(slatIndex);
+                               var slatHeight = slatCoordCache.getHeight(slatIndex);
+                               var partial = (topOffset - slatTop) / slatHeight; // floating point number between 0 and 1
+                               var localSnapIndex = Math.floor(partial * snapsPerSlot); // the snap # relative to start of slat
+                               var snapIndex = slatIndex * snapsPerSlot + localSnapIndex;
+                               var snapTop = slatTop + (localSnapIndex / snapsPerSlot) * slatHeight;
+                               var snapBottom = slatTop + ((localSnapIndex + 1) / snapsPerSlot) * slatHeight;
+
+                               return {
+                                       col: colIndex,
+                                       snap: snapIndex,
+                                       component: this, // needed unfortunately :(
+                                       left: colCoordCache.getLeftOffset(colIndex),
+                                       right: colCoordCache.getRightOffset(colIndex),
+                                       top: snapTop,
+                                       bottom: snapBottom
+                               };
+                       }
+               }
+       },
+
+
+       getHitSpan: function(hit) {
+               var start = this.getCellDate(0, hit.col); // row=0
+               var time = this.computeSnapTime(hit.snap); // pass in the snap-index
+               var end;
+
+               start.time(time);
+               end = start.clone().add(this.snapDuration);
+
+               return { start: start, end: end };
+       },
+
+
+       getHitEl: function(hit) {
+               return this.colEls.eq(hit.col);
+       },
+
+
+       /* Dates
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       rangeUpdated: function() {
+               this.updateDayTable();
+       },
+
+
+       // Given a row number of the grid, representing a "snap", returns a time (Duration) from its start-of-day
+       computeSnapTime: function(snapIndex) {
+               return moment.duration(this.minTime + this.snapDuration * snapIndex);
+       },
+
+
+       // Slices up the given span (unzoned start/end with other misc data) into an array of segments
+       spanToSegs: function(span) {
+               var segs = this.sliceRangeByTimes(span);
+               var i;
+
+               for (i = 0; i < segs.length; i++) {
+                       if (this.isRTL) {
+                               segs[i].col = this.daysPerRow - 1 - segs[i].dayIndex;
+                       }
+                       else {
+                               segs[i].col = segs[i].dayIndex;
+                       }
+               }
+
+               return segs;
+       },
+
+
+       sliceRangeByTimes: function(range) {
+               var segs = [];
+               var seg;
+               var dayIndex;
+               var dayDate;
+               var dayRange;
+
+               for (dayIndex = 0; dayIndex < this.daysPerRow; dayIndex++) {
+                       dayDate = this.dayDates[dayIndex].clone(); // TODO: better API for this?
+                       dayRange = {
+                               start: dayDate.clone().time(this.minTime),
+                               end: dayDate.clone().time(this.maxTime)
+                       };
+                       seg = intersectRanges(range, dayRange); // both will be ambig timezone
+                       if (seg) {
+                               seg.dayIndex = dayIndex;
+                               segs.push(seg);
+                       }
+               }
+
+               return segs;
+       },
+
+
+       /* Coordinates
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       updateSize: function(isResize) { // NOT a standard Grid method
+               this.slatCoordCache.build();
+
+               if (isResize) {
+                       this.updateSegVerticals(
+                               [].concat(this.fgSegs || [], this.bgSegs || [], this.businessSegs || [])
+                       );
+               }
+       },
+
+
+       getTotalSlatHeight: function() {
+               return this.slatContainerEl.outerHeight();
+       },
+
+
+       // Computes the top coordinate, relative to the bounds of the grid, of the given date.
+       // A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.
+       computeDateTop: function(date, startOfDayDate) {
+               return this.computeTimeTop(
+                       moment.duration(
+                               date - startOfDayDate.clone().stripTime()
+                       )
+               );
+       },
+
+
+       // Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration).
+       computeTimeTop: function(time) {
+               var len = this.slatEls.length;
+               var slatCoverage = (time - this.minTime) / this.slotDuration; // floating-point value of # of slots covered
+               var slatIndex;
+               var slatRemainder;
+
+               // compute a floating-point number for how many slats should be progressed through.
+               // from 0 to number of slats (inclusive)
+               // constrained because minTime/maxTime might be customized.
+               slatCoverage = Math.max(0, slatCoverage);
+               slatCoverage = Math.min(len, slatCoverage);
+
+               // an integer index of the furthest whole slat
+               // from 0 to number slats (*exclusive*, so len-1)
+               slatIndex = Math.floor(slatCoverage);
+               slatIndex = Math.min(slatIndex, len - 1);
+
+               // how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition.
+               // could be 1.0 if slatCoverage is covering *all* the slots
+               slatRemainder = slatCoverage - slatIndex;
+
+               return this.slatCoordCache.getTopPosition(slatIndex) +
+                       this.slatCoordCache.getHeight(slatIndex) * slatRemainder;
+       },
+
+
+
+       /* Event Drag Visualization
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a visual indication of an event being dragged over the specified date(s).
+       // A returned value of `true` signals that a mock "helper" event has been rendered.
+       renderDrag: function(eventLocation, seg) {
+
+               if (seg) { // if there is event information for this drag, render a helper event
+
+                       // returns mock event elements
+                       // signal that a helper has been rendered
+                       return this.renderEventLocationHelper(eventLocation, seg);
+               }
+               else {
+                       // otherwise, just render a highlight
+                       this.renderHighlight(this.eventToSpan(eventLocation));
+               }
+       },
+
+
+       // Unrenders any visual indication of an event being dragged
+       unrenderDrag: function() {
+               this.unrenderHelper();
+               this.unrenderHighlight();
+       },
+
+
+       /* Event Resize Visualization
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a visual indication of an event being resized
+       renderEventResize: function(eventLocation, seg) {
+               return this.renderEventLocationHelper(eventLocation, seg); // returns mock event elements
+       },
+
+
+       // Unrenders any visual indication of an event being resized
+       unrenderEventResize: function() {
+               this.unrenderHelper();
+       },
+
+
+       /* Event Helper
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a mock "helper" event. `sourceSeg` is the original segment object and might be null (an external drag)
+       renderHelper: function(event, sourceSeg) {
+               return this.renderHelperSegs(this.eventToSegs(event), sourceSeg); // returns mock event elements
+       },
+
+
+       // Unrenders any mock helper event
+       unrenderHelper: function() {
+               this.unrenderHelperSegs();
+       },
+
+
+       /* Business Hours
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderBusinessHours: function() {
+               this.renderBusinessSegs(
+                       this.buildBusinessHourSegs()
+               );
+       },
+
+
+       unrenderBusinessHours: function() {
+               this.unrenderBusinessSegs();
+       },
+
+
+       /* Now Indicator
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       getNowIndicatorUnit: function() {
+               return 'minute'; // will refresh on the minute
+       },
+
+
+       renderNowIndicator: function(date) {
+               // seg system might be overkill, but it handles scenario where line needs to be rendered
+               //  more than once because of columns with the same date (resources columns for example)
+               var segs = this.spanToSegs({ start: date, end: date });
+               var top = this.computeDateTop(date, date);
+               var nodes = [];
+               var i;
+
+               // render lines within the columns
+               for (i = 0; i < segs.length; i++) {
+                       nodes.push($('<div class="fc-now-indicator fc-now-indicator-line"></div>')
+                               .css('top', top)
+                               .appendTo(this.colContainerEls.eq(segs[i].col))[0]);
+               }
+
+               // render an arrow over the axis
+               if (segs.length > 0) { // is the current time in view?
+                       nodes.push($('<div class="fc-now-indicator fc-now-indicator-arrow"></div>')
+                               .css('top', top)
+                               .appendTo(this.el.find('.fc-content-skeleton'))[0]);
+               }
+
+               this.nowIndicatorEls = $(nodes);
+       },
+
+
+       unrenderNowIndicator: function() {
+               if (this.nowIndicatorEls) {
+                       this.nowIndicatorEls.remove();
+                       this.nowIndicatorEls = null;
+               }
+       },
+
+
+       /* Selection
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a visual indication of a selection. Overrides the default, which was to simply render a highlight.
+       renderSelection: function(span) {
+               if (this.view.opt('selectHelper')) { // this setting signals that a mock helper event should be rendered
+
+                       // normally acceps an eventLocation, span has a start/end, which is good enough
+                       this.renderEventLocationHelper(span);
+               }
+               else {
+                       this.renderHighlight(span);
+               }
+       },
+
+
+       // Unrenders any visual indication of a selection
+       unrenderSelection: function() {
+               this.unrenderHelper();
+               this.unrenderHighlight();
+       },
+
+
+       /* Highlight
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderHighlight: function(span) {
+               this.renderHighlightSegs(this.spanToSegs(span));
+       },
+
+
+       unrenderHighlight: function() {
+               this.unrenderHighlightSegs();
+       }
+
+});
+
+;;
+
+/* Methods for rendering SEGMENTS, pieces of content that live on the view
+ ( this file is no longer just for events )
+----------------------------------------------------------------------------------------------------------------------*/
+
+TimeGrid.mixin({
+
+       colContainerEls: null, // containers for each column
+
+       // inner-containers for each column where different types of segs live
+       fgContainerEls: null,
+       bgContainerEls: null,
+       helperContainerEls: null,
+       highlightContainerEls: null,
+       businessContainerEls: null,
+
+       // arrays of different types of displayed segments
+       fgSegs: null,
+       bgSegs: null,
+       helperSegs: null,
+       highlightSegs: null,
+       businessSegs: null,
+
+
+       // Renders the DOM that the view's content will live in
+       renderContentSkeleton: function() {
+               var cellHtml = '';
+               var i;
+               var skeletonEl;
+
+               for (i = 0; i < this.colCnt; i++) {
+                       cellHtml +=
+                               '<td>' +
+                                       '<div class="fc-content-col">' +
+                                               '<div class="fc-event-container fc-helper-container"></div>' +
+                                               '<div class="fc-event-container"></div>' +
+                                               '<div class="fc-highlight-container"></div>' +
+                                               '<div class="fc-bgevent-container"></div>' +
+                                               '<div class="fc-business-container"></div>' +
+                                       '</div>' +
+                               '</td>';
+               }
+
+               skeletonEl = $(
+                       '<div class="fc-content-skeleton">' +
+                               '<table>' +
+                                       '<tr>' + cellHtml + '</tr>' +
+                               '</table>' +
+                       '</div>'
+               );
+
+               this.colContainerEls = skeletonEl.find('.fc-content-col');
+               this.helperContainerEls = skeletonEl.find('.fc-helper-container');
+               this.fgContainerEls = skeletonEl.find('.fc-event-container:not(.fc-helper-container)');
+               this.bgContainerEls = skeletonEl.find('.fc-bgevent-container');
+               this.highlightContainerEls = skeletonEl.find('.fc-highlight-container');
+               this.businessContainerEls = skeletonEl.find('.fc-business-container');
+
+               this.bookendCells(skeletonEl.find('tr')); // TODO: do this on string level
+               this.el.append(skeletonEl);
+       },
+
+
+       /* Foreground Events
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderFgSegs: function(segs) {
+               segs = this.renderFgSegsIntoContainers(segs, this.fgContainerEls);
+               this.fgSegs = segs;
+               return segs; // needed for Grid::renderEvents
+       },
+
+
+       unrenderFgSegs: function() {
+               this.unrenderNamedSegs('fgSegs');
+       },
+
+
+       /* Foreground Helper Events
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderHelperSegs: function(segs, sourceSeg) {
+               var helperEls = [];
+               var i, seg;
+               var sourceEl;
+
+               segs = this.renderFgSegsIntoContainers(segs, this.helperContainerEls);
+
+               // Try to make the segment that is in the same row as sourceSeg look the same
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+                       if (sourceSeg && sourceSeg.col === seg.col) {
+                               sourceEl = sourceSeg.el;
+                               seg.el.css({
+                                       left: sourceEl.css('left'),
+                                       right: sourceEl.css('right'),
+                                       'margin-left': sourceEl.css('margin-left'),
+                                       'margin-right': sourceEl.css('margin-right')
+                               });
+                       }
+                       helperEls.push(seg.el[0]);
+               }
+
+               this.helperSegs = segs;
+
+               return $(helperEls); // must return rendered helpers
+       },
+
+
+       unrenderHelperSegs: function() {
+               this.unrenderNamedSegs('helperSegs');
+       },
+
+
+       /* Background Events
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderBgSegs: function(segs) {
+               segs = this.renderFillSegEls('bgEvent', segs); // TODO: old fill system
+               this.updateSegVerticals(segs);
+               this.attachSegsByCol(this.groupSegsByCol(segs), this.bgContainerEls);
+               this.bgSegs = segs;
+               return segs; // needed for Grid::renderEvents
+       },
+
+
+       unrenderBgSegs: function() {
+               this.unrenderNamedSegs('bgSegs');
+       },
+
+
+       /* Highlight
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderHighlightSegs: function(segs) {
+               segs = this.renderFillSegEls('highlight', segs); // TODO: old fill system
+               this.updateSegVerticals(segs);
+               this.attachSegsByCol(this.groupSegsByCol(segs), this.highlightContainerEls);
+               this.highlightSegs = segs;
+       },
+
+
+       unrenderHighlightSegs: function() {
+               this.unrenderNamedSegs('highlightSegs');
+       },
+
+
+       /* Business Hours
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       renderBusinessSegs: function(segs) {
+               segs = this.renderFillSegEls('businessHours', segs); // TODO: old fill system
+               this.updateSegVerticals(segs);
+               this.attachSegsByCol(this.groupSegsByCol(segs), this.businessContainerEls);
+               this.businessSegs = segs;
+       },
+
+
+       unrenderBusinessSegs: function() {
+               this.unrenderNamedSegs('businessSegs');
+       },
+
+
+       /* Seg Rendering Utils
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Given a flat array of segments, return an array of sub-arrays, grouped by each segment's col
+       groupSegsByCol: function(segs) {
+               var segsByCol = [];
+               var i;
+
+               for (i = 0; i < this.colCnt; i++) {
+                       segsByCol.push([]);
+               }
+
+               for (i = 0; i < segs.length; i++) {
+                       segsByCol[segs[i].col].push(segs[i]);
+               }
+
+               return segsByCol;
+       },
+
+
+       // Given segments grouped by column, insert the segments' elements into a parallel array of container
+       // elements, each living within a column.
+       attachSegsByCol: function(segsByCol, containerEls) {
+               var col;
+               var segs;
+               var i;
+
+               for (col = 0; col < this.colCnt; col++) { // iterate each column grouping
+                       segs = segsByCol[col];
+
+                       for (i = 0; i < segs.length; i++) {
+                               containerEls.eq(col).append(segs[i].el);
+                       }
+               }
+       },
+
+
+       // Given the name of a property of `this` object, assumed to be an array of segments,
+       // loops through each segment and removes from DOM. Will null-out the property afterwards.
+       unrenderNamedSegs: function(propName) {
+               var segs = this[propName];
+               var i;
+
+               if (segs) {
+                       for (i = 0; i < segs.length; i++) {
+                               segs[i].el.remove();
+                       }
+                       this[propName] = null;
+               }
+       },
+
+
+
+       /* Foreground Event Rendering Utils
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Given an array of foreground segments, render a DOM element for each, computes position,
+       // and attaches to the column inner-container elements.
+       renderFgSegsIntoContainers: function(segs, containerEls) {
+               var segsByCol;
+               var col;
+
+               segs = this.renderFgSegEls(segs); // will call fgSegHtml
+               segsByCol = this.groupSegsByCol(segs);
+
+               for (col = 0; col < this.colCnt; col++) {
+                       this.updateFgSegCoords(segsByCol[col]);
+               }
+
+               this.attachSegsByCol(segsByCol, containerEls);
+
+               return segs;
+       },
+
+
+       // Renders the HTML for a single event segment's default rendering
+       fgSegHtml: function(seg, disableResizing) {
+               var view = this.view;
+               var event = seg.event;
+               var isDraggable = view.isEventDraggable(event);
+               var isResizableFromStart = !disableResizing && seg.isStart && view.isEventResizableFromStart(event);
+               var isResizableFromEnd = !disableResizing && seg.isEnd && view.isEventResizableFromEnd(event);
+               var classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);
+               var skinCss = cssToStr(this.getSegSkinCss(seg));
+               var timeText;
+               var fullTimeText; // more verbose time text. for the print stylesheet
+               var startTimeText; // just the start time text
+
+               classes.unshift('fc-time-grid-event', 'fc-v-event');
+
+               if (view.isMultiDayEvent(event)) { // if the event appears to span more than one day...
+                       // Don't display time text on segments that run entirely through a day.
+                       // That would appear as midnight-midnight and would look dumb.
+                       // Otherwise, display the time text for the *segment's* times (like 6pm-midnight or midnight-10am)
+                       if (seg.isStart || seg.isEnd) {
+                               timeText = this.getEventTimeText(seg);
+                               fullTimeText = this.getEventTimeText(seg, 'LT');
+                               startTimeText = this.getEventTimeText(seg, null, false); // displayEnd=false
+                       }
+               } else {
+                       // Display the normal time text for the *event's* times
+                       timeText = this.getEventTimeText(event);
+                       fullTimeText = this.getEventTimeText(event, 'LT');
+                       startTimeText = this.getEventTimeText(event, null, false); // displayEnd=false
+               }
+
+               return '<a class="' + classes.join(' ') + '"' +
+                       (event.url ?
+                               ' href="' + htmlEscape(event.url) + '"' :
+                               ''
+                               ) +
+                       (skinCss ?
+                               ' style="' + skinCss + '"' :
+                               ''
+                               ) +
+                       '>' +
+                               '<div class="fc-content">' +
+                                       (timeText ?
+                                               '<div class="fc-time"' +
+                                               ' data-start="' + htmlEscape(startTimeText) + '"' +
+                                               ' data-full="' + htmlEscape(fullTimeText) + '"' +
+                                               '>' +
+                                                       '<span>' + htmlEscape(timeText) + '</span>' +
+                                               '</div>' :
+                                               ''
+                                               ) +
+                                       (event.title ?
+                                               '<div class="fc-title">' +
+                                                       htmlEscape(event.title) +
+                                               '</div>' :
+                                               ''
+                                               ) +
+                               '</div>' +
+                               '<div class="fc-bg"/>' +
+                               /* TODO: write CSS for this
+                               (isResizableFromStart ?
+                                       '<div class="fc-resizer fc-start-resizer" />' :
+                                       ''
+                                       ) +
+                               */
+                               (isResizableFromEnd ?
+                                       '<div class="fc-resizer fc-end-resizer" />' :
+                                       ''
+                                       ) +
+                       '</a>';
+       },
+
+
+       /* Seg Position Utils
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Refreshes the CSS top/bottom coordinates for each segment element.
+       // Works when called after initial render, after a window resize/zoom for example.
+       updateSegVerticals: function(segs) {
+               this.computeSegVerticals(segs);
+               this.assignSegVerticals(segs);
+       },
+
+
+       // For each segment in an array, computes and assigns its top and bottom properties
+       computeSegVerticals: function(segs) {
+               var i, seg;
+
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+                       seg.top = this.computeDateTop(seg.start, seg.start);
+                       seg.bottom = this.computeDateTop(seg.end, seg.start);
+               }
+       },
+
+
+       // Given segments that already have their top/bottom properties computed, applies those values to
+       // the segments' elements.
+       assignSegVerticals: function(segs) {
+               var i, seg;
+
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+                       seg.el.css(this.generateSegVerticalCss(seg));
+               }
+       },
+
+
+       // Generates an object with CSS properties for the top/bottom coordinates of a segment element
+       generateSegVerticalCss: function(seg) {
+               return {
+                       top: seg.top,
+                       bottom: -seg.bottom // flipped because needs to be space beyond bottom edge of event container
+               };
+       },
+
+
+       /* Foreground Event Positioning Utils
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Given segments that are assumed to all live in the *same column*,
+       // compute their verical/horizontal coordinates and assign to their elements.
+       updateFgSegCoords: function(segs) {
+               this.computeSegVerticals(segs); // horizontals relies on this
+               this.computeFgSegHorizontals(segs); // compute horizontal coordinates, z-index's, and reorder the array
+               this.assignSegVerticals(segs);
+               this.assignFgSegHorizontals(segs);
+       },
+
+
+       // Given an array of segments that are all in the same column, sets the backwardCoord and forwardCoord on each.
+       // NOTE: Also reorders the given array by date!
+       computeFgSegHorizontals: function(segs) {
+               var levels;
+               var level0;
+               var i;
+
+               this.sortEventSegs(segs); // order by certain criteria
+               levels = buildSlotSegLevels(segs);
+               computeForwardSlotSegs(levels);
+
+               if ((level0 = levels[0])) {
+
+                       for (i = 0; i < level0.length; i++) {
+                               computeSlotSegPressures(level0[i]);
+                       }
+
+                       for (i = 0; i < level0.length; i++) {
+                               this.computeFgSegForwardBack(level0[i], 0, 0);
+                       }
+               }
+       },
+
+
+       // Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range
+       // from 0 to 1. If the calendar is left-to-right, the seg.backwardCoord maps to "left" and
+       // seg.forwardCoord maps to "right" (via percentage). Vice-versa if the calendar is right-to-left.
+       //
+       // The segment might be part of a "series", which means consecutive segments with the same pressure
+       // who's width is unknown until an edge has been hit. `seriesBackwardPressure` is the number of
+       // segments behind this one in the current series, and `seriesBackwardCoord` is the starting
+       // coordinate of the first segment in the series.
+       computeFgSegForwardBack: function(seg, seriesBackwardPressure, seriesBackwardCoord) {
+               var forwardSegs = seg.forwardSegs;
+               var i;
+
+               if (seg.forwardCoord === undefined) { // not already computed
+
+                       if (!forwardSegs.length) {
+
+                               // if there are no forward segments, this segment should butt up against the edge
+                               seg.forwardCoord = 1;
+                       }
+                       else {
+
+                               // sort highest pressure first
+                               this.sortForwardSegs(forwardSegs);
+
+                               // this segment's forwardCoord will be calculated from the backwardCoord of the
+                               // highest-pressure forward segment.
+                               this.computeFgSegForwardBack(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);
+                               seg.forwardCoord = forwardSegs[0].backwardCoord;
+                       }
+
+                       // calculate the backwardCoord from the forwardCoord. consider the series
+                       seg.backwardCoord = seg.forwardCoord -
+                               (seg.forwardCoord - seriesBackwardCoord) / // available width for series
+                               (seriesBackwardPressure + 1); // # of segments in the series
+
+                       // use this segment's coordinates to computed the coordinates of the less-pressurized
+                       // forward segments
+                       for (i=0; i<forwardSegs.length; i++) {
+                               this.computeFgSegForwardBack(forwardSegs[i], 0, seg.forwardCoord);
+                       }
+               }
+       },
+
+
+       sortForwardSegs: function(forwardSegs) {
+               forwardSegs.sort(proxy(this, 'compareForwardSegs'));
+       },
+
+
+       // A cmp function for determining which forward segment to rely on more when computing coordinates.
+       compareForwardSegs: function(seg1, seg2) {
+               // put higher-pressure first
+               return seg2.forwardPressure - seg1.forwardPressure ||
+                       // put segments that are closer to initial edge first (and favor ones with no coords yet)
+                       (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||
+                       // do normal sorting...
+                       this.compareEventSegs(seg1, seg2);
+       },
+
+
+       // Given foreground event segments that have already had their position coordinates computed,
+       // assigns position-related CSS values to their elements.
+       assignFgSegHorizontals: function(segs) {
+               var i, seg;
+
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+                       seg.el.css(this.generateFgSegHorizontalCss(seg));
+
+                       // if the height is short, add a className for alternate styling
+                       if (seg.bottom - seg.top < 30) {
+                               seg.el.addClass('fc-short');
+                       }
+               }
+       },
+
+
+       // Generates an object with CSS properties/values that should be applied to an event segment element.
+       // Contains important positioning-related properties that should be applied to any event element, customized or not.
+       generateFgSegHorizontalCss: function(seg) {
+               var shouldOverlap = this.view.opt('slotEventOverlap');
+               var backwardCoord = seg.backwardCoord; // the left side if LTR. the right side if RTL. floating-point
+               var forwardCoord = seg.forwardCoord; // the right side if LTR. the left side if RTL. floating-point
+               var props = this.generateSegVerticalCss(seg); // get top/bottom first
+               var left; // amount of space from left edge, a fraction of the total width
+               var right; // amount of space from right edge, a fraction of the total width
+
+               if (shouldOverlap) {
+                       // double the width, but don't go beyond the maximum forward coordinate (1.0)
+                       forwardCoord = Math.min(1, backwardCoord + (forwardCoord - backwardCoord) * 2);
+               }
+
+               if (this.isRTL) {
+                       left = 1 - forwardCoord;
+                       right = backwardCoord;
+               }
+               else {
+                       left = backwardCoord;
+                       right = 1 - forwardCoord;
+               }
+
+               props.zIndex = seg.level + 1; // convert from 0-base to 1-based
+               props.left = left * 100 + '%';
+               props.right = right * 100 + '%';
+
+               if (shouldOverlap && seg.forwardPressure) {
+                       // add padding to the edge so that forward stacked events don't cover the resizer's icon
+                       props[this.isRTL ? 'marginLeft' : 'marginRight'] = 10 * 2; // 10 is a guesstimate of the icon's width
+               }
+
+               return props;
+       }
+
+});
+
+
+// Builds an array of segments "levels". The first level will be the leftmost tier of segments if the calendar is
+// left-to-right, or the rightmost if the calendar is right-to-left. Assumes the segments are already ordered by date.
+function buildSlotSegLevels(segs) {
+       var levels = [];
+       var i, seg;
+       var j;
+
+       for (i=0; i<segs.length; i++) {
+               seg = segs[i];
+
+               // go through all the levels and stop on the first level where there are no collisions
+               for (j=0; j<levels.length; j++) {
+                       if (!computeSlotSegCollisions(seg, levels[j]).length) {
+                               break;
+                       }
+               }
+
+               seg.level = j;
+
+               (levels[j] || (levels[j] = [])).push(seg);
+       }
+
+       return levels;
+}
+
+
+// For every segment, figure out the other segments that are in subsequent
+// levels that also occupy the same vertical space. Accumulate in seg.forwardSegs
+function computeForwardSlotSegs(levels) {
+       var i, level;
+       var j, seg;
+       var k;
+
+       for (i=0; i<levels.length; i++) {
+               level = levels[i];
+
+               for (j=0; j<level.length; j++) {
+                       seg = level[j];
+
+                       seg.forwardSegs = [];
+                       for (k=i+1; k<levels.length; k++) {
+                               computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);
+                       }
+               }
+       }
+}
+
+
+// Figure out which path forward (via seg.forwardSegs) results in the longest path until
+// the furthest edge is reached. The number of segments in this path will be seg.forwardPressure
+function computeSlotSegPressures(seg) {
+       var forwardSegs = seg.forwardSegs;
+       var forwardPressure = 0;
+       var i, forwardSeg;
+
+       if (seg.forwardPressure === undefined) { // not already computed
+
+               for (i=0; i<forwardSegs.length; i++) {
+                       forwardSeg = forwardSegs[i];
+
+                       // figure out the child's maximum forward path
+                       computeSlotSegPressures(forwardSeg);
+
+                       // either use the existing maximum, or use the child's forward pressure
+                       // plus one (for the forwardSeg itself)
+                       forwardPressure = Math.max(
+                               forwardPressure,
+                               1 + forwardSeg.forwardPressure
+                       );
+               }
+
+               seg.forwardPressure = forwardPressure;
+       }
+}
+
+
+// Find all the segments in `otherSegs` that vertically collide with `seg`.
+// Append into an optionally-supplied `results` array and return.
+function computeSlotSegCollisions(seg, otherSegs, results) {
+       results = results || [];
+
+       for (var i=0; i<otherSegs.length; i++) {
+               if (isSlotSegCollision(seg, otherSegs[i])) {
+                       results.push(otherSegs[i]);
+               }
+       }
+
+       return results;
+}
+
+
+// Do these segments occupy the same vertical space?
+function isSlotSegCollision(seg1, seg2) {
+       return seg1.bottom > seg2.top && seg1.top < seg2.bottom;
+}
+
+;;
+
+/* An abstract class from which other views inherit from
+----------------------------------------------------------------------------------------------------------------------*/
+
+var View = FC.View = Class.extend(EmitterMixin, ListenerMixin, {
+
+       type: null, // subclass' view name (string)
+       name: null, // deprecated. use `type` instead
+       title: null, // the text that will be displayed in the header's title
+
+       calendar: null, // owner Calendar object
+       options: null, // hash containing all options. already merged with view-specific-options
+       el: null, // the view's containing element. set by Calendar
+
+       displaying: null, // a promise representing the state of rendering. null if no render requested
+       isSkeletonRendered: false,
+       isEventsRendered: false,
+
+       // range the view is actually displaying (moments)
+       start: null,
+       end: null, // exclusive
+
+       // range the view is formally responsible for (moments)
+       // may be different from start/end. for example, a month view might have 1st-31st, excluding padded dates
+       intervalStart: null,
+       intervalEnd: null, // exclusive
+       intervalDuration: null,
+       intervalUnit: null, // name of largest unit being displayed, like "month" or "week"
+
+       isRTL: false,
+       isSelected: false, // boolean whether a range of time is user-selected or not
+       selectedEvent: null,
+
+       eventOrderSpecs: null, // criteria for ordering events when they have same date/time
+
+       // classNames styled by jqui themes
+       widgetHeaderClass: null,
+       widgetContentClass: null,
+       highlightStateClass: null,
+
+       // for date utils, computed from options
+       nextDayThreshold: null,
+       isHiddenDayHash: null,
+
+       // now indicator
+       isNowIndicatorRendered: null,
+       initialNowDate: null, // result first getNow call
+       initialNowQueriedMs: null, // ms time the getNow was called
+       nowIndicatorTimeoutID: null, // for refresh timing of now indicator
+       nowIndicatorIntervalID: null, // "
+
+
+       constructor: function(calendar, type, options, intervalDuration) {
+
+               this.calendar = calendar;
+               this.type = this.name = type; // .name is deprecated
+               this.options = options;
+               this.intervalDuration = intervalDuration || moment.duration(1, 'day');
+
+               this.nextDayThreshold = moment.duration(this.opt('nextDayThreshold'));
+               this.initThemingProps();
+               this.initHiddenDays();
+               this.isRTL = this.opt('isRTL');
+
+               this.eventOrderSpecs = parseFieldSpecs(this.opt('eventOrder'));
+
+               this.initialize();
+       },
+
+
+       // A good place for subclasses to initialize member variables
+       initialize: function() {
+               // subclasses can implement
+       },
+
+
+       // Retrieves an option with the given name
+       opt: function(name) {
+               return this.options[name];
+       },
+
+
+       // Triggers handlers that are view-related. Modifies args before passing to calendar.
+       trigger: function(name, thisObj) { // arguments beyond thisObj are passed along
+               var calendar = this.calendar;
+
+               return calendar.trigger.apply(
+                       calendar,
+                       [name, thisObj || this].concat(
+                               Array.prototype.slice.call(arguments, 2), // arguments beyond thisObj
+                               [ this ] // always make the last argument a reference to the view. TODO: deprecate
+                       )
+               );
+       },
+
+
+       /* Dates
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Updates all internal dates to center around the given current unzoned date.
+       setDate: function(date) {
+               this.setRange(this.computeRange(date));
+       },
+
+
+       // Updates all internal dates for displaying the given unzoned range.
+       setRange: function(range) {
+               $.extend(this, range); // assigns every property to this object's member variables
+               this.updateTitle();
+       },
+
+
+       // Given a single current unzoned date, produce information about what range to display.
+       // Subclasses can override. Must return all properties.
+       computeRange: function(date) {
+               var intervalUnit = computeIntervalUnit(this.intervalDuration);
+               var intervalStart = date.clone().startOf(intervalUnit);
+               var intervalEnd = intervalStart.clone().add(this.intervalDuration);
+               var start, end;
+
+               // normalize the range's time-ambiguity
+               if (/year|month|week|day/.test(intervalUnit)) { // whole-days?
+                       intervalStart.stripTime();
+                       intervalEnd.stripTime();
+               }
+               else { // needs to have a time?
+                       if (!intervalStart.hasTime()) {
+                               intervalStart = this.calendar.time(0); // give 00:00 time
+                       }
+                       if (!intervalEnd.hasTime()) {
+                               intervalEnd = this.calendar.time(0); // give 00:00 time
+                       }
+               }
+
+               start = intervalStart.clone();
+               start = this.skipHiddenDays(start);
+               end = intervalEnd.clone();
+               end = this.skipHiddenDays(end, -1, true); // exclusively move backwards
+
+               return {
+                       intervalUnit: intervalUnit,
+                       intervalStart: intervalStart,
+                       intervalEnd: intervalEnd,
+                       start: start,
+                       end: end
+               };
+       },
+
+
+       // Computes the new date when the user hits the prev button, given the current date
+       computePrevDate: function(date) {
+               return this.massageCurrentDate(
+                       date.clone().startOf(this.intervalUnit).subtract(this.intervalDuration), -1
+               );
+       },
+
+
+       // Computes the new date when the user hits the next button, given the current date
+       computeNextDate: function(date) {
+               return this.massageCurrentDate(
+                       date.clone().startOf(this.intervalUnit).add(this.intervalDuration)
+               );
+       },
+
+
+       // Given an arbitrarily calculated current date of the calendar, returns a date that is ensured to be completely
+       // visible. `direction` is optional and indicates which direction the current date was being
+       // incremented or decremented (1 or -1).
+       massageCurrentDate: function(date, direction) {
+               if (this.intervalDuration.as('days') <= 1) { // if the view displays a single day or smaller
+                       if (this.isHiddenDay(date)) {
+                               date = this.skipHiddenDays(date, direction);
+                               date.startOf('day');
+                       }
+               }
+
+               return date;
+       },
+
+
+       /* Title and Date Formatting
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Sets the view's title property to the most updated computed value
+       updateTitle: function() {
+               this.title = this.computeTitle();
+       },
+
+
+       // Computes what the title at the top of the calendar should be for this view
+       computeTitle: function() {
+               return this.formatRange(
+                       {
+                               // in case intervalStart/End has a time, make sure timezone is correct
+                               start: this.calendar.applyTimezone(this.intervalStart),
+                               end: this.calendar.applyTimezone(this.intervalEnd)
+                       },
+                       this.opt('titleFormat') || this.computeTitleFormat(),
+                       this.opt('titleRangeSeparator')
+               );
+       },
+
+
+       // Generates the format string that should be used to generate the title for the current date range.
+       // Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.
+       computeTitleFormat: function() {
+               if (this.intervalUnit == 'year') {
+                       return 'YYYY';
+               }
+               else if (this.intervalUnit == 'month') {
+                       return this.opt('monthYearFormat'); // like "September 2014"
+               }
+               else if (this.intervalDuration.as('days') > 1) {
+                       return 'll'; // multi-day range. shorter, like "Sep 9 - 10 2014"
+               }
+               else {
+                       return 'LL'; // one day. longer, like "September 9 2014"
+               }
+       },
+
+
+       // Utility for formatting a range. Accepts a range object, formatting string, and optional separator.
+       // Displays all-day ranges naturally, with an inclusive end. Takes the current isRTL into account.
+       // The timezones of the dates within `range` will be respected.
+       formatRange: function(range, formatStr, separator) {
+               var end = range.end;
+
+               if (!end.hasTime()) { // all-day?
+                       end = end.clone().subtract(1); // convert to inclusive. last ms of previous day
+               }
+
+               return formatRange(range.start, end, formatStr, separator, this.opt('isRTL'));
+       },
+
+
+       getAllDayHtml: function() {
+               return this.opt('allDayHtml') || htmlEscape(this.opt('allDayText'));
+       },
+
+
+       /* Navigation
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Generates HTML for an anchor to another view into the calendar.
+       // Will either generate an <a> tag or a non-clickable <span> tag, depending on enabled settings.
+       // `gotoOptions` can either be a moment input, or an object with the form:
+       // { date, type, forceOff }
+       // `type` is a view-type like "day" or "week". default value is "day".
+       // `attrs` and `innerHtml` are use to generate the rest of the HTML tag.
+       buildGotoAnchorHtml: function(gotoOptions, attrs, innerHtml) {
+               var date, type, forceOff;
+               var finalOptions;
+
+               if ($.isPlainObject(gotoOptions)) {
+                       date = gotoOptions.date;
+                       type = gotoOptions.type;
+                       forceOff = gotoOptions.forceOff;
+               }
+               else {
+                       date = gotoOptions; // a single moment input
+               }
+               date = FC.moment(date); // if a string, parse it
+
+               finalOptions = { // for serialization into the link
+                       date: date.format('YYYY-MM-DD'),
+                       type: type || 'day'
+               };
+
+               if (typeof attrs === 'string') {
+                       innerHtml = attrs;
+                       attrs = null;
+               }
+
+               attrs = attrs ? ' ' + attrsToStr(attrs) : ''; // will have a leading space
+               innerHtml = innerHtml || '';
+
+               if (!forceOff && this.opt('navLinks')) {
+                       return '<a' + attrs +
+                               ' data-goto="' + htmlEscape(JSON.stringify(finalOptions)) + '">' +
+                               innerHtml +
+                               '</a>';
+               }
+               else {
+                       return '<span' + attrs + '>' +
+                               innerHtml +
+                               '</span>';
+               }
+       },
+
+
+       /* Rendering
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Sets the container element that the view should render inside of.
+       // Does other DOM-related initializations.
+       setElement: function(el) {
+               this.el = el;
+               this.bindGlobalHandlers();
+       },
+
+
+       // Removes the view's container element from the DOM, clearing any content beforehand.
+       // Undoes any other DOM-related attachments.
+       removeElement: function() {
+               this.clear(); // clears all content
+
+               // clean up the skeleton
+               if (this.isSkeletonRendered) {
+                       this.unrenderSkeleton();
+                       this.isSkeletonRendered = false;
+               }
+
+               this.unbindGlobalHandlers();
+
+               this.el.remove();
+
+               // NOTE: don't null-out this.el in case the View was destroyed within an API callback.
+               // We don't null-out the View's other jQuery element references upon destroy,
+               //  so we shouldn't kill this.el either.
+       },
+
+
+       // Does everything necessary to display the view centered around the given unzoned date.
+       // Does every type of rendering EXCEPT rendering events.
+       // Is asychronous and returns a promise.
+       display: function(date, explicitScrollState) {
+               var _this = this;
+               var prevScrollState = null;
+
+               if (explicitScrollState != null && this.displaying) { // don't need prevScrollState if explicitScrollState
+                       prevScrollState = this.queryScroll();
+               }
+
+               this.calendar.freezeContentHeight();
+
+               return syncThen(this.clear(), function() { // clear the content first
+                       return (
+                               _this.displaying =
+                                       syncThen(_this.displayView(date), function() { // displayView might return a promise
+
+                                               // caller of display() wants a specific scroll state?
+                                               if (explicitScrollState != null) {
+                                                       // we make an assumption that this is NOT the initial render,
+                                                       // and thus don't need forceScroll (is inconveniently asynchronous)
+                                                       _this.setScroll(explicitScrollState);
+                                               }
+                                               else {
+                                                       _this.forceScroll(_this.computeInitialScroll(prevScrollState));
+                                               }
+
+                                               _this.calendar.unfreezeContentHeight();
+                                               _this.triggerRender();
+                                       })
+                       );
+               });
+       },
+
+
+       // Does everything necessary to clear the content of the view.
+       // Clears dates and events. Does not clear the skeleton.
+       // Is asychronous and returns a promise.
+       clear: function() {
+               var _this = this;
+               var displaying = this.displaying;
+
+               if (displaying) { // previously displayed, or in the process of being displayed?
+                       return syncThen(displaying, function() { // wait for the display to finish
+                               _this.displaying = null;
+                               _this.clearEvents();
+                               return _this.clearView(); // might return a promise. chain it
+                       });
+               }
+               else {
+                       return $.when(); // an immediately-resolved promise
+               }
+       },
+
+
+       // Displays the view's non-event content, such as date-related content or anything required by events.
+       // Renders the view's non-content skeleton if necessary.
+       // Can be asynchronous and return a promise.
+       displayView: function(date) {
+               if (!this.isSkeletonRendered) {
+                       this.renderSkeleton();
+                       this.isSkeletonRendered = true;
+               }
+               if (date) {
+                       this.setDate(date);
+               }
+               if (this.render) {
+                       this.render(); // TODO: deprecate
+               }
+               this.renderDates();
+               this.updateSize();
+               this.renderBusinessHours(); // might need coordinates, so should go after updateSize()
+               this.startNowIndicator();
+       },
+
+
+       // Unrenders the view content that was rendered in displayView.
+       // Can be asynchronous and return a promise.
+       clearView: function() {
+               this.unselect();
+               this.stopNowIndicator();
+               this.triggerUnrender();
+               this.unrenderBusinessHours();
+               this.unrenderDates();
+               if (this.destroy) {
+                       this.destroy(); // TODO: deprecate
+               }
+       },
+
+
+       // Renders the basic structure of the view before any content is rendered
+       renderSkeleton: function() {
+               // subclasses should implement
+       },
+
+
+       // Unrenders the basic structure of the view
+       unrenderSkeleton: function() {
+               // subclasses should implement
+       },
+
+
+       // Renders the view's date-related content.
+       // Assumes setRange has already been called and the skeleton has already been rendered.
+       renderDates: function() {
+               // subclasses should implement
+       },
+
+
+       // Unrenders the view's date-related content
+       unrenderDates: function() {
+               // subclasses should override
+       },
+
+
+       // Signals that the view's content has been rendered
+       triggerRender: function() {
+               this.trigger('viewRender', this, this, this.el);
+       },
+
+
+       // Signals that the view's content is about to be unrendered
+       triggerUnrender: function() {
+               this.trigger('viewDestroy', this, this, this.el);
+       },
+
+
+       // Binds DOM handlers to elements that reside outside the view container, such as the document
+       bindGlobalHandlers: function() {
+               this.listenTo($(document), 'mousedown', this.handleDocumentMousedown);
+               this.listenTo($(document), 'touchstart', this.processUnselect);
+       },
+
+
+       // Unbinds DOM handlers from elements that reside outside the view container
+       unbindGlobalHandlers: function() {
+               this.stopListeningTo($(document));
+       },
+
+
+       // Initializes internal variables related to theming
+       initThemingProps: function() {
+               var tm = this.opt('theme') ? 'ui' : 'fc';
+
+               this.widgetHeaderClass = tm + '-widget-header';
+               this.widgetContentClass = tm + '-widget-content';
+               this.highlightStateClass = tm + '-state-highlight';
+       },
+
+
+       /* Business Hours
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders business-hours onto the view. Assumes updateSize has already been called.
+       renderBusinessHours: function() {
+               // subclasses should implement
+       },
+
+
+       // Unrenders previously-rendered business-hours
+       unrenderBusinessHours: function() {
+               // subclasses should implement
+       },
+
+
+       /* Now Indicator
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Immediately render the current time indicator and begins re-rendering it at an interval,
+       // which is defined by this.getNowIndicatorUnit().
+       // TODO: somehow do this for the current whole day's background too
+       startNowIndicator: function() {
+               var _this = this;
+               var unit;
+               var update;
+               var delay; // ms wait value
+
+               if (this.opt('nowIndicator')) {
+                       unit = this.getNowIndicatorUnit();
+                       if (unit) {
+                               update = proxy(this, 'updateNowIndicator'); // bind to `this`
+
+                               this.initialNowDate = this.calendar.getNow();
+                               this.initialNowQueriedMs = +new Date();
+                               this.renderNowIndicator(this.initialNowDate);
+                               this.isNowIndicatorRendered = true;
+
+                               // wait until the beginning of the next interval
+                               delay = this.initialNowDate.clone().startOf(unit).add(1, unit) - this.initialNowDate;
+                               this.nowIndicatorTimeoutID = setTimeout(function() {
+                                       _this.nowIndicatorTimeoutID = null;
+                                       update();
+                                       delay = +moment.duration(1, unit);
+                                       delay = Math.max(100, delay); // prevent too frequent
+                                       _this.nowIndicatorIntervalID = setInterval(update, delay); // update every interval
+                               }, delay);
+                       }
+               }
+       },
+
+
+       // rerenders the now indicator, computing the new current time from the amount of time that has passed
+       // since the initial getNow call.
+       updateNowIndicator: function() {
+               if (this.isNowIndicatorRendered) {
+                       this.unrenderNowIndicator();
+                       this.renderNowIndicator(
+                               this.initialNowDate.clone().add(new Date() - this.initialNowQueriedMs) // add ms
+                       );
+               }
+       },
+
+
+       // Immediately unrenders the view's current time indicator and stops any re-rendering timers.
+       // Won't cause side effects if indicator isn't rendered.
+       stopNowIndicator: function() {
+               if (this.isNowIndicatorRendered) {
+
+                       if (this.nowIndicatorTimeoutID) {
+                               clearTimeout(this.nowIndicatorTimeoutID);
+                               this.nowIndicatorTimeoutID = null;
+                       }
+                       if (this.nowIndicatorIntervalID) {
+                               clearTimeout(this.nowIndicatorIntervalID);
+                               this.nowIndicatorIntervalID = null;
+                       }
+
+                       this.unrenderNowIndicator();
+                       this.isNowIndicatorRendered = false;
+               }
+       },
+
+
+       // Returns a string unit, like 'second' or 'minute' that defined how often the current time indicator
+       // should be refreshed. If something falsy is returned, no time indicator is rendered at all.
+       getNowIndicatorUnit: function() {
+               // subclasses should implement
+       },
+
+
+       // Renders a current time indicator at the given datetime
+       renderNowIndicator: function(date) {
+               // subclasses should implement
+       },
+
+
+       // Undoes the rendering actions from renderNowIndicator
+       unrenderNowIndicator: function() {
+               // subclasses should implement
+       },
+
+
+       /* Dimensions
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Refreshes anything dependant upon sizing of the container element of the grid
+       updateSize: function(isResize) {
+               var scrollState;
+
+               if (isResize) {
+                       scrollState = this.queryScroll();
+               }
+
+               this.updateHeight(isResize);
+               this.updateWidth(isResize);
+               this.updateNowIndicator();
+
+               if (isResize) {
+                       this.setScroll(scrollState);
+               }
+       },
+
+
+       // Refreshes the horizontal dimensions of the calendar
+       updateWidth: function(isResize) {
+               // subclasses should implement
+       },
+
+
+       // Refreshes the vertical dimensions of the calendar
+       updateHeight: function(isResize) {
+               var calendar = this.calendar; // we poll the calendar for height information
+
+               this.setHeight(
+                       calendar.getSuggestedViewHeight(),
+                       calendar.isHeightAuto()
+               );
+       },
+
+
+       // Updates the vertical dimensions of the calendar to the specified height.
+       // if `isAuto` is set to true, height becomes merely a suggestion and the view should use its "natural" height.
+       setHeight: function(height, isAuto) {
+               // subclasses should implement
+       },
+
+
+       /* Scroller
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Computes the initial pre-configured scroll state prior to allowing the user to change it.
+       // Given the scroll state from the previous rendering. If first time rendering, given null.
+       computeInitialScroll: function(previousScrollState) {
+               return 0;
+       },
+
+
+       // Retrieves the view's current natural scroll state. Can return an arbitrary format.
+       queryScroll: function() {
+               // subclasses must implement
+       },
+
+
+       // Sets the view's scroll state. Will accept the same format computeInitialScroll and queryScroll produce.
+       setScroll: function(scrollState) {
+               // subclasses must implement
+       },
+
+
+       // Sets the scroll state, making sure to overcome any predefined scroll value the browser has in mind
+       forceScroll: function(scrollState) {
+               var _this = this;
+
+               this.setScroll(scrollState);
+               setTimeout(function() {
+                       _this.setScroll(scrollState);
+               }, 0);
+       },
+
+
+       /* Event Elements / Segments
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Does everything necessary to display the given events onto the current view
+       displayEvents: function(events) {
+               var scrollState = this.queryScroll();
+
+               this.clearEvents();
+               this.renderEvents(events);
+               this.isEventsRendered = true;
+               this.setScroll(scrollState);
+               this.triggerEventRender();
+       },
+
+
+       // Does everything necessary to clear the view's currently-rendered events
+       clearEvents: function() {
+               var scrollState;
+
+               if (this.isEventsRendered) {
+
+                       // TODO: optimize: if we know this is part of a displayEvents call, don't queryScroll/setScroll
+                       scrollState = this.queryScroll();
+
+                       this.triggerEventUnrender();
+                       if (this.destroyEvents) {
+                               this.destroyEvents(); // TODO: deprecate
+                       }
+                       this.unrenderEvents();
+                       this.setScroll(scrollState);
+                       this.isEventsRendered = false;
+               }
+       },
+
+
+       // Renders the events onto the view.
+       renderEvents: function(events) {
+               // subclasses should implement
+       },
+
+
+       // Removes event elements from the view.
+       unrenderEvents: function() {
+               // subclasses should implement
+       },
+
+
+       // Signals that all events have been rendered
+       triggerEventRender: function() {
+               this.renderedEventSegEach(function(seg) {
+                       this.trigger('eventAfterRender', seg.event, seg.event, seg.el);
+               });
+               this.trigger('eventAfterAllRender');
+       },
+
+
+       // Signals that all event elements are about to be removed
+       triggerEventUnrender: function() {
+               this.renderedEventSegEach(function(seg) {
+                       this.trigger('eventDestroy', seg.event, seg.event, seg.el);
+               });
+       },
+
+
+       // Given an event and the default element used for rendering, returns the element that should actually be used.
+       // Basically runs events and elements through the eventRender hook.
+       resolveEventEl: function(event, el) {
+               var custom = this.trigger('eventRender', event, event, el);
+
+               if (custom === false) { // means don't render at all
+                       el = null;
+               }
+               else if (custom && custom !== true) {
+                       el = $(custom);
+               }
+
+               return el;
+       },
+
+
+       // Hides all rendered event segments linked to the given event
+       showEvent: function(event) {
+               this.renderedEventSegEach(function(seg) {
+                       seg.el.css('visibility', '');
+               }, event);
+       },
+
+
+       // Shows all rendered event segments linked to the given event
+       hideEvent: function(event) {
+               this.renderedEventSegEach(function(seg) {
+                       seg.el.css('visibility', 'hidden');
+               }, event);
+       },
+
+
+       // Iterates through event segments that have been rendered (have an el). Goes through all by default.
+       // If the optional `event` argument is specified, only iterates through segments linked to that event.
+       // The `this` value of the callback function will be the view.
+       renderedEventSegEach: function(func, event) {
+               var segs = this.getEventSegs();
+               var i;
+
+               for (i = 0; i < segs.length; i++) {
+                       if (!event || segs[i].event._id === event._id) {
+                               if (segs[i].el) {
+                                       func.call(this, segs[i]);
+                               }
+                       }
+               }
+       },
+
+
+       // Retrieves all the rendered segment objects for the view
+       getEventSegs: function() {
+               // subclasses must implement
+               return [];
+       },
+
+
+       /* Event Drag-n-Drop
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Computes if the given event is allowed to be dragged by the user
+       isEventDraggable: function(event) {
+               return this.isEventStartEditable(event);
+       },
+
+
+       isEventStartEditable: function(event) {
+               return firstDefined(
+                       event.startEditable,
+                       (event.source || {}).startEditable,
+                       this.opt('eventStartEditable'),
+                       this.isEventGenerallyEditable(event)
+               );
+       },
+
+
+       isEventGenerallyEditable: function(event) {
+               return firstDefined(
+                       event.editable,
+                       (event.source || {}).editable,
+                       this.opt('editable')
+               );
+       },
+
+
+       // Must be called when an event in the view is dropped onto new location.
+       // `dropLocation` is an object that contains the new zoned start/end/allDay values for the event.
+       reportEventDrop: function(event, dropLocation, largeUnit, el, ev) {
+               var calendar = this.calendar;
+               var mutateResult = calendar.mutateEvent(event, dropLocation, largeUnit);
+               var undoFunc = function() {
+                       mutateResult.undo();
+                       calendar.reportEventChange();
+               };
+
+               this.triggerEventDrop(event, mutateResult.dateDelta, undoFunc, el, ev);
+               calendar.reportEventChange(); // will rerender events
+       },
+
+
+       // Triggers event-drop handlers that have subscribed via the API
+       triggerEventDrop: function(event, dateDelta, undoFunc, el, ev) {
+               this.trigger('eventDrop', el[0], event, dateDelta, undoFunc, ev, {}); // {} = jqui dummy
+       },
+
+
+       /* External Element Drag-n-Drop
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Must be called when an external element, via jQuery UI, has been dropped onto the calendar.
+       // `meta` is the parsed data that has been embedded into the dragging event.
+       // `dropLocation` is an object that contains the new zoned start/end/allDay values for the event.
+       reportExternalDrop: function(meta, dropLocation, el, ev, ui) {
+               var eventProps = meta.eventProps;
+               var eventInput;
+               var event;
+
+               // Try to build an event object and render it. TODO: decouple the two
+               if (eventProps) {
+                       eventInput = $.extend({}, eventProps, dropLocation);
+                       event = this.calendar.renderEvent(eventInput, meta.stick)[0]; // renderEvent returns an array
+               }
+
+               this.triggerExternalDrop(event, dropLocation, el, ev, ui);
+       },
+
+
+       // Triggers external-drop handlers that have subscribed via the API
+       triggerExternalDrop: function(event, dropLocation, el, ev, ui) {
+
+               // trigger 'drop' regardless of whether element represents an event
+               this.trigger('drop', el[0], dropLocation.start, ev, ui);
+
+               if (event) {
+                       this.trigger('eventReceive', null, event); // signal an external event landed
+               }
+       },
+
+
+       /* Drag-n-Drop Rendering (for both events and external elements)
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Renders a visual indication of a event or external-element drag over the given drop zone.
+       // If an external-element, seg will be `null`.
+       // Must return elements used for any mock events.
+       renderDrag: function(dropLocation, seg) {
+               // subclasses must implement
+       },
+
+
+       // Unrenders a visual indication of an event or external-element being dragged.
+       unrenderDrag: function() {
+               // subclasses must implement
+       },
+
+
+       /* Event Resizing
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Computes if the given event is allowed to be resized from its starting edge
+       isEventResizableFromStart: function(event) {
+               return this.opt('eventResizableFromStart') && this.isEventResizable(event);
+       },
+
+
+       // Computes if the given event is allowed to be resized from its ending edge
+       isEventResizableFromEnd: function(event) {
+               return this.isEventResizable(event);
+       },
+
+
+       // Computes if the given event is allowed to be resized by the user at all
+       isEventResizable: function(event) {
+               var source = event.source || {};
+
+               return firstDefined(
+                       event.durationEditable,
+                       source.durationEditable,
+                       this.opt('eventDurationEditable'),
+                       event.editable,
+                       source.editable,
+                       this.opt('editable')
+               );
+       },
+
+
+       // Must be called when an event in the view has been resized to a new length
+       reportEventResize: function(event, resizeLocation, largeUnit, el, ev) {
+               var calendar = this.calendar;
+               var mutateResult = calendar.mutateEvent(event, resizeLocation, largeUnit);
+               var undoFunc = function() {
+                       mutateResult.undo();
+                       calendar.reportEventChange();
+               };
+
+               this.triggerEventResize(event, mutateResult.durationDelta, undoFunc, el, ev);
+               calendar.reportEventChange(); // will rerender events
+       },
+
+
+       // Triggers event-resize handlers that have subscribed via the API
+       triggerEventResize: function(event, durationDelta, undoFunc, el, ev) {
+               this.trigger('eventResize', el[0], event, durationDelta, undoFunc, ev, {}); // {} = jqui dummy
+       },
+
+
+       /* Selection (time range)
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Selects a date span on the view. `start` and `end` are both Moments.
+       // `ev` is the native mouse event that begin the interaction.
+       select: function(span, ev) {
+               this.unselect(ev);
+               this.renderSelection(span);
+               this.reportSelection(span, ev);
+       },
+
+
+       // Renders a visual indication of the selection
+       renderSelection: function(span) {
+               // subclasses should implement
+       },
+
+
+       // Called when a new selection is made. Updates internal state and triggers handlers.
+       reportSelection: function(span, ev) {
+               this.isSelected = true;
+               this.triggerSelect(span, ev);
+       },
+
+
+       // Triggers handlers to 'select'
+       triggerSelect: function(span, ev) {
+               this.trigger(
+                       'select',
+                       null,
+                       this.calendar.applyTimezone(span.start), // convert to calendar's tz for external API
+                       this.calendar.applyTimezone(span.end), // "
+                       ev
+               );
+       },
+
+
+       // Undoes a selection. updates in the internal state and triggers handlers.
+       // `ev` is the native mouse event that began the interaction.
+       unselect: function(ev) {
+               if (this.isSelected) {
+                       this.isSelected = false;
+                       if (this.destroySelection) {
+                               this.destroySelection(); // TODO: deprecate
+                       }
+                       this.unrenderSelection();
+                       this.trigger('unselect', null, ev);
+               }
+       },
+
+
+       // Unrenders a visual indication of selection
+       unrenderSelection: function() {
+               // subclasses should implement
+       },
+
+
+       /* Event Selection
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       selectEvent: function(event) {
+               if (!this.selectedEvent || this.selectedEvent !== event) {
+                       this.unselectEvent();
+                       this.renderedEventSegEach(function(seg) {
+                               seg.el.addClass('fc-selected');
+                       }, event);
+                       this.selectedEvent = event;
+               }
+       },
+
+
+       unselectEvent: function() {
+               if (this.selectedEvent) {
+                       this.renderedEventSegEach(function(seg) {
+                               seg.el.removeClass('fc-selected');
+                       }, this.selectedEvent);
+                       this.selectedEvent = null;
+               }
+       },
+
+
+       isEventSelected: function(event) {
+               // event references might change on refetchEvents(), while selectedEvent doesn't,
+               // so compare IDs
+               return this.selectedEvent && this.selectedEvent._id === event._id;
+       },
+
+
+       /* Mouse / Touch Unselecting (time range & event unselection)
+       ------------------------------------------------------------------------------------------------------------------*/
+       // TODO: move consistently to down/start or up/end?
+       // TODO: don't kill previous selection if touch scrolling
+
+
+       handleDocumentMousedown: function(ev) {
+               if (isPrimaryMouseButton(ev)) {
+                       this.processUnselect(ev);
+               }
+       },
+
+
+       processUnselect: function(ev) {
+               this.processRangeUnselect(ev);
+               this.processEventUnselect(ev);
+       },
+
+
+       processRangeUnselect: function(ev) {
+               var ignore;
+
+               // is there a time-range selection?
+               if (this.isSelected && this.opt('unselectAuto')) {
+                       // only unselect if the clicked element is not identical to or inside of an 'unselectCancel' element
+                       ignore = this.opt('unselectCancel');
+                       if (!ignore || !$(ev.target).closest(ignore).length) {
+                               this.unselect(ev);
+                       }
+               }
+       },
+
+
+       processEventUnselect: function(ev) {
+               if (this.selectedEvent) {
+                       if (!$(ev.target).closest('.fc-selected').length) {
+                               this.unselectEvent();
+                       }
+               }
+       },
+
+
+       /* Day Click
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Triggers handlers to 'dayClick'
+       // Span has start/end of the clicked area. Only the start is useful.
+       triggerDayClick: function(span, dayEl, ev) {
+               this.trigger(
+                       'dayClick',
+                       dayEl,
+                       this.calendar.applyTimezone(span.start), // convert to calendar's timezone for external API
+                       ev
+               );
+       },
+
+
+       /* Date Utils
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Initializes internal variables related to calculating hidden days-of-week
+       initHiddenDays: function() {
+               var hiddenDays = this.opt('hiddenDays') || []; // array of day-of-week indices that are hidden
+               var isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)
+               var dayCnt = 0;
+               var i;
+
+               if (this.opt('weekends') === false) {
+                       hiddenDays.push(0, 6); // 0=sunday, 6=saturday
+               }
+
+               for (i = 0; i < 7; i++) {
+                       if (
+                               !(isHiddenDayHash[i] = $.inArray(i, hiddenDays) !== -1)
+                       ) {
+                               dayCnt++;
+                       }
+               }
+
+               if (!dayCnt) {
+                       throw 'invalid hiddenDays'; // all days were hidden? bad.
+               }
+
+               this.isHiddenDayHash = isHiddenDayHash;
+       },
+
+
+       // Is the current day hidden?
+       // `day` is a day-of-week index (0-6), or a Moment
+       isHiddenDay: function(day) {
+               if (moment.isMoment(day)) {
+                       day = day.day();
+               }
+               return this.isHiddenDayHash[day];
+       },
+
+
+       // Incrementing the current day until it is no longer a hidden day, returning a copy.
+       // If the initial value of `date` is not a hidden day, don't do anything.
+       // Pass `isExclusive` as `true` if you are dealing with an end date.
+       // `inc` defaults to `1` (increment one day forward each time)
+       skipHiddenDays: function(date, inc, isExclusive) {
+               var out = date.clone();
+               inc = inc || 1;
+               while (
+                       this.isHiddenDayHash[(out.day() + (isExclusive ? inc : 0) + 7) % 7]
+               ) {
+                       out.add(inc, 'days');
+               }
+               return out;
+       },
+
+
+       // Returns the date range of the full days the given range visually appears to occupy.
+       // Returns a new range object.
+       computeDayRange: function(range) {
+               var startDay = range.start.clone().stripTime(); // the beginning of the day the range starts
+               var end = range.end;
+               var endDay = null;
+               var endTimeMS;
+
+               if (end) {
+                       endDay = end.clone().stripTime(); // the beginning of the day the range exclusively ends
+                       endTimeMS = +end.time(); // # of milliseconds into `endDay`
+
+                       // If the end time is actually inclusively part of the next day and is equal to or
+                       // beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.
+                       // Otherwise, leaving it as inclusive will cause it to exclude `endDay`.
+                       if (endTimeMS && endTimeMS >= this.nextDayThreshold) {
+                               endDay.add(1, 'days');
+                       }
+               }
+
+               // If no end was specified, or if it is within `startDay` but not past nextDayThreshold,
+               // assign the default duration of one day.
+               if (!end || endDay <= startDay) {
+                       endDay = startDay.clone().add(1, 'days');
+               }
+
+               return { start: startDay, end: endDay };
+       },
+
+
+       // Does the given event visually appear to occupy more than one day?
+       isMultiDayEvent: function(event) {
+               var range = this.computeDayRange(event); // event is range-ish
+
+               return range.end.diff(range.start, 'days') > 1;
+       }
+
+});
+
+;;
+
+/*
+Embodies a div that has potential scrollbars
+*/
+var Scroller = FC.Scroller = Class.extend({
+
+       el: null, // the guaranteed outer element
+       scrollEl: null, // the element with the scrollbars
+       overflowX: null,
+       overflowY: null,
+
+
+       constructor: function(options) {
+               options = options || {};
+               this.overflowX = options.overflowX || options.overflow || 'auto';
+               this.overflowY = options.overflowY || options.overflow || 'auto';
+       },
+
+
+       render: function() {
+               this.el = this.renderEl();
+               this.applyOverflow();
+       },
+
+
+       renderEl: function() {
+               return (this.scrollEl = $('<div class="fc-scroller"></div>'));
+       },
+
+
+       // sets to natural height, unlocks overflow
+       clear: function() {
+               this.setHeight('auto');
+               this.applyOverflow();
+       },
+
+
+       destroy: function() {
+               this.el.remove();
+       },
+
+
+       // Overflow
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       applyOverflow: function() {
+               this.scrollEl.css({
+                       'overflow-x': this.overflowX,
+                       'overflow-y': this.overflowY
+               });
+       },
+
+
+       // Causes any 'auto' overflow values to resolves to 'scroll' or 'hidden'.
+       // Useful for preserving scrollbar widths regardless of future resizes.
+       // Can pass in scrollbarWidths for optimization.
+       lockOverflow: function(scrollbarWidths) {
+               var overflowX = this.overflowX;
+               var overflowY = this.overflowY;
+
+               scrollbarWidths = scrollbarWidths || this.getScrollbarWidths();
+
+               if (overflowX === 'auto') {
+                       overflowX = (
+                                       scrollbarWidths.top || scrollbarWidths.bottom || // horizontal scrollbars?
+                                       // OR scrolling pane with massless scrollbars?
+                                       this.scrollEl[0].scrollWidth - 1 > this.scrollEl[0].clientWidth
+                                               // subtract 1 because of IE off-by-one issue
+                               ) ? 'scroll' : 'hidden';
+               }
+
+               if (overflowY === 'auto') {
+                       overflowY = (
+                                       scrollbarWidths.left || scrollbarWidths.right || // vertical scrollbars?
+                                       // OR scrolling pane with massless scrollbars?
+                                       this.scrollEl[0].scrollHeight - 1 > this.scrollEl[0].clientHeight
+                                               // subtract 1 because of IE off-by-one issue
+                               ) ? 'scroll' : 'hidden';
+               }
+
+               this.scrollEl.css({ 'overflow-x': overflowX, 'overflow-y': overflowY });
+       },
+
+
+       // Getters / Setters
+       // -----------------------------------------------------------------------------------------------------------------
+
+
+       setHeight: function(height) {
+               this.scrollEl.height(height);
+       },
+
+
+       getScrollTop: function() {
+               return this.scrollEl.scrollTop();
+       },
+
+
+       setScrollTop: function(top) {
+               this.scrollEl.scrollTop(top);
+       },
+
+
+       getClientWidth: function() {
+               return this.scrollEl[0].clientWidth;
+       },
+
+
+       getClientHeight: function() {
+               return this.scrollEl[0].clientHeight;
+       },
+
+
+       getScrollbarWidths: function() {
+               return getScrollbarWidths(this.scrollEl);
+       }
+
+});
+
+;;
+
+var Calendar = FC.Calendar = Class.extend({
+
+       dirDefaults: null, // option defaults related to LTR or RTL
+       localeDefaults: null, // option defaults related to current locale
+       overrides: null, // option overrides given to the fullCalendar constructor
+       dynamicOverrides: null, // options set with dynamic setter method. higher precedence than view overrides.
+       options: null, // all defaults combined with overrides
+       viewSpecCache: null, // cache of view definitions
+       view: null, // current View object
+       header: null,
+       loadingLevel: 0, // number of simultaneous loading tasks
+
+
+       // a lot of this class' OOP logic is scoped within this constructor function,
+       // but in the future, write individual methods on the prototype.
+       constructor: Calendar_constructor,
+
+
+       // Subclasses can override this for initialization logic after the constructor has been called
+       initialize: function() {
+       },
+
+
+       // Computes the flattened options hash for the calendar and assigns to `this.options`.
+       // Assumes this.overrides and this.dynamicOverrides have already been initialized.
+       populateOptionsHash: function() {
+               var locale, localeDefaults;
+               var isRTL, dirDefaults;
+
+               locale = firstDefined( // explicit locale option given?
+                       this.dynamicOverrides.locale,
+                       this.overrides.locale
+               );
+               localeDefaults = localeOptionHash[locale];
+               if (!localeDefaults) { // explicit locale option not given or invalid?
+                       locale = Calendar.defaults.locale;
+                       localeDefaults = localeOptionHash[locale] || {};
+               }
+
+               isRTL = firstDefined( // based on options computed so far, is direction RTL?
+                       this.dynamicOverrides.isRTL,
+                       this.overrides.isRTL,
+                       localeDefaults.isRTL,
+                       Calendar.defaults.isRTL
+               );
+               dirDefaults = isRTL ? Calendar.rtlDefaults : {};
+
+               this.dirDefaults = dirDefaults;
+               this.localeDefaults = localeDefaults;
+               this.options = mergeOptions([ // merge defaults and overrides. lowest to highest precedence
+                       Calendar.defaults, // global defaults
+                       dirDefaults,
+                       localeDefaults,
+                       this.overrides,
+                       this.dynamicOverrides
+               ]);
+               populateInstanceComputableOptions(this.options); // fill in gaps with computed options
+       },
+
+
+       // Gets information about how to create a view. Will use a cache.
+       getViewSpec: function(viewType) {
+               var cache = this.viewSpecCache;
+
+               return cache[viewType] || (cache[viewType] = this.buildViewSpec(viewType));
+       },
+
+
+       // Given a duration singular unit, like "week" or "day", finds a matching view spec.
+       // Preference is given to views that have corresponding buttons.
+       getUnitViewSpec: function(unit) {
+               var viewTypes;
+               var i;
+               var spec;
+
+               if ($.inArray(unit, intervalUnits) != -1) {
+
+                       // put views that have buttons first. there will be duplicates, but oh well
+                       viewTypes = this.header.getViewsWithButtons();
+                       $.each(FC.views, function(viewType) { // all views
+                               viewTypes.push(viewType);
+                       });
+
+                       for (i = 0; i < viewTypes.length; i++) {
+                               spec = this.getViewSpec(viewTypes[i]);
+                               if (spec) {
+                                       if (spec.singleUnit == unit) {
+                                               return spec;
+                                       }
+                               }
+                       }
+               }
+       },
+
+
+       // Builds an object with information on how to create a given view
+       buildViewSpec: function(requestedViewType) {
+               var viewOverrides = this.overrides.views || {};
+               var specChain = []; // for the view. lowest to highest priority
+               var defaultsChain = []; // for the view. lowest to highest priority
+               var overridesChain = []; // for the view. lowest to highest priority
+               var viewType = requestedViewType;
+               var spec; // for the view
+               var overrides; // for the view
+               var duration;
+               var unit;
+
+               // iterate from the specific view definition to a more general one until we hit an actual View class
+               while (viewType) {
+                       spec = fcViews[viewType];
+                       overrides = viewOverrides[viewType];
+                       viewType = null; // clear. might repopulate for another iteration
+
+                       if (typeof spec === 'function') { // TODO: deprecate
+                               spec = { 'class': spec };
+                       }
+
+                       if (spec) {
+                               specChain.unshift(spec);
+                               defaultsChain.unshift(spec.defaults || {});
+                               duration = duration || spec.duration;
+                               viewType = viewType || spec.type;
+                       }
+
+                       if (overrides) {
+                               overridesChain.unshift(overrides); // view-specific option hashes have options at zero-level
+                               duration = duration || overrides.duration;
+                               viewType = viewType || overrides.type;
+                       }
+               }
+
+               spec = mergeProps(specChain);
+               spec.type = requestedViewType;
+               if (!spec['class']) {
+                       return false;
+               }
+
+               if (duration) {
+                       duration = moment.duration(duration);
+                       if (duration.valueOf()) { // valid?
+                               spec.duration = duration;
+                               unit = computeIntervalUnit(duration);
+
+                               // view is a single-unit duration, like "week" or "day"
+                               // incorporate options for this. lowest priority
+                               if (duration.as(unit) === 1) {
+                                       spec.singleUnit = unit;
+                                       overridesChain.unshift(viewOverrides[unit] || {});
+                               }
+                       }
+               }
+
+               spec.defaults = mergeOptions(defaultsChain);
+               spec.overrides = mergeOptions(overridesChain);
+
+               this.buildViewSpecOptions(spec);
+               this.buildViewSpecButtonText(spec, requestedViewType);
+
+               return spec;
+       },
+
+
+       // Builds and assigns a view spec's options object from its already-assigned defaults and overrides
+       buildViewSpecOptions: function(spec) {
+               spec.options = mergeOptions([ // lowest to highest priority
+                       Calendar.defaults, // global defaults
+                       spec.defaults, // view's defaults (from ViewSubclass.defaults)
+                       this.dirDefaults,
+                       this.localeDefaults, // locale and dir take precedence over view's defaults!
+                       this.overrides, // calendar's overrides (options given to constructor)
+                       spec.overrides, // view's overrides (view-specific options)
+                       this.dynamicOverrides // dynamically set via setter. highest precedence
+               ]);
+               populateInstanceComputableOptions(spec.options);
+       },
+
+
+       // Computes and assigns a view spec's buttonText-related options
+       buildViewSpecButtonText: function(spec, requestedViewType) {
+
+               // given an options object with a possible `buttonText` hash, lookup the buttonText for the
+               // requested view, falling back to a generic unit entry like "week" or "day"
+               function queryButtonText(options) {
+                       var buttonText = options.buttonText || {};
+                       return buttonText[requestedViewType] ||
+                               // view can decide to look up a certain key
+                               (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||
+                               // a key like "month"
+                               (spec.singleUnit ? buttonText[spec.singleUnit] : null);
+               }
+
+               // highest to lowest priority
+               spec.buttonTextOverride =
+                       queryButtonText(this.dynamicOverrides) ||
+                       queryButtonText(this.overrides) || // constructor-specified buttonText lookup hash takes precedence
+                       spec.overrides.buttonText; // `buttonText` for view-specific options is a string
+
+               // highest to lowest priority. mirrors buildViewSpecOptions
+               spec.buttonTextDefault =
+                       queryButtonText(this.localeDefaults) ||
+                       queryButtonText(this.dirDefaults) ||
+                       spec.defaults.buttonText || // a single string. from ViewSubclass.defaults
+                       queryButtonText(Calendar.defaults) ||
+                       (spec.duration ? this.humanizeDuration(spec.duration) : null) || // like "3 days"
+                       requestedViewType; // fall back to given view name
+       },
+
+
+       // Given a view name for a custom view or a standard view, creates a ready-to-go View object
+       instantiateView: function(viewType) {
+               var spec = this.getViewSpec(viewType);
+
+               return new spec['class'](this, viewType, spec.options, spec.duration);
+       },
+
+
+       // Returns a boolean about whether the view is okay to instantiate at some point
+       isValidViewType: function(viewType) {
+               return Boolean(this.getViewSpec(viewType));
+       },
+
+
+       // Should be called when any type of async data fetching begins
+       pushLoading: function() {
+               if (!(this.loadingLevel++)) {
+                       this.trigger('loading', null, true, this.view);
+               }
+       },
+
+
+       // Should be called when any type of async data fetching completes
+       popLoading: function() {
+               if (!(--this.loadingLevel)) {
+                       this.trigger('loading', null, false, this.view);
+               }
+       },
+
+
+       // Given arguments to the select method in the API, returns a span (unzoned start/end and other info)
+       buildSelectSpan: function(zonedStartInput, zonedEndInput) {
+               var start = this.moment(zonedStartInput).stripZone();
+               var end;
+
+               if (zonedEndInput) {
+                       end = this.moment(zonedEndInput).stripZone();
+               }
+               else if (start.hasTime()) {
+                       end = start.clone().add(this.defaultTimedEventDuration);
+               }
+               else {
+                       end = start.clone().add(this.defaultAllDayEventDuration);
+               }
+
+               return { start: start, end: end };
+       }
+
+});
+
+
+Calendar.mixin(EmitterMixin);
+
+
+function Calendar_constructor(element, overrides) {
+       var t = this;
+
+
+       // Exports
+       // -----------------------------------------------------------------------------------
+
+       t.render = render;
+       t.destroy = destroy;
+       t.refetchEvents = refetchEvents;
+       t.refetchEventSources = refetchEventSources;
+       t.reportEvents = reportEvents;
+       t.reportEventChange = reportEventChange;
+       t.rerenderEvents = renderEvents; // `renderEvents` serves as a rerender. an API method
+       t.changeView = renderView; // `renderView` will switch to another view
+       t.select = select;
+       t.unselect = unselect;
+       t.prev = prev;
+       t.next = next;
+       t.prevYear = prevYear;
+       t.nextYear = nextYear;
+       t.today = today;
+       t.gotoDate = gotoDate;
+       t.incrementDate = incrementDate;
+       t.zoomTo = zoomTo;
+       t.getDate = getDate;
+       t.getCalendar = getCalendar;
+       t.getView = getView;
+       t.option = option; // getter/setter method
+       t.trigger = trigger;
+
+
+       // Options
+       // -----------------------------------------------------------------------------------
+
+       t.dynamicOverrides = {};
+       t.viewSpecCache = {};
+       t.optionHandlers = {}; // for Calendar.options.js
+       t.overrides = $.extend({}, overrides); // make a copy
+
+       t.populateOptionsHash(); // sets this.options
+
+
+
+       // Locale-data Internals
+       // -----------------------------------------------------------------------------------
+       // Apply overrides to the current locale's data
+
+       var localeData;
+
+       // Called immediately, and when any of the options change.
+       // Happens before any internal objects rebuild or rerender, because this is very core.
+       t.bindOptions([
+               'locale', 'monthNames', 'monthNamesShort', 'dayNames', 'dayNamesShort', 'firstDay', 'weekNumberCalculation'
+       ], function(locale, monthNames, monthNamesShort, dayNames, dayNamesShort, firstDay, weekNumberCalculation) {
+
+               // normalize
+               if (weekNumberCalculation === 'iso') {
+                       weekNumberCalculation = 'ISO'; // normalize
+               }
+
+               localeData = createObject( // make a cheap copy
+                       getMomentLocaleData(locale) // will fall back to en
+               );
+
+               if (monthNames) {
+                       localeData._months = monthNames;
+               }
+               if (monthNamesShort) {
+                       localeData._monthsShort = monthNamesShort;
+               }
+               if (dayNames) {
+                       localeData._weekdays = dayNames;
+               }
+               if (dayNamesShort) {
+                       localeData._weekdaysShort = dayNamesShort;
+               }
+
+               if (firstDay == null && weekNumberCalculation === 'ISO') {
+                       firstDay = 1;
+               }
+               if (firstDay != null) {
+                       var _week = createObject(localeData._week); // _week: { dow: # }
+                       _week.dow = firstDay;
+                       localeData._week = _week;
+               }
+
+               if ( // whitelist certain kinds of input
+                       weekNumberCalculation === 'ISO' ||
+                       weekNumberCalculation === 'local' ||
+                       typeof weekNumberCalculation === 'function'
+               ) {
+                       localeData._fullCalendar_weekCalc = weekNumberCalculation; // moment-ext will know what to do with it
+               }
+
+               // If the internal current date object already exists, move to new locale.
+               // We do NOT need to do this technique for event dates, because this happens when converting to "segments".
+               if (date) {
+                       localizeMoment(date); // sets to localeData
+               }
+       });
+
+
+       // Calendar-specific Date Utilities
+       // -----------------------------------------------------------------------------------
+
+
+       t.defaultAllDayEventDuration = moment.duration(t.options.defaultAllDayEventDuration);
+       t.defaultTimedEventDuration = moment.duration(t.options.defaultTimedEventDuration);
+
+
+       // Builds a moment using the settings of the current calendar: timezone and locale.
+       // Accepts anything the vanilla moment() constructor accepts.
+       t.moment = function() {
+               var mom;
+
+               if (t.options.timezone === 'local') {
+                       mom = FC.moment.apply(null, arguments);
+
+                       // Force the moment to be local, because FC.moment doesn't guarantee it.
+                       if (mom.hasTime()) { // don't give ambiguously-timed moments a local zone
+                               mom.local();
+                       }
+               }
+               else if (t.options.timezone === 'UTC') {
+                       mom = FC.moment.utc.apply(null, arguments); // process as UTC
+               }
+               else {
+                       mom = FC.moment.parseZone.apply(null, arguments); // let the input decide the zone
                }
+
+               localizeMoment(mom);
+
+               return mom;
+       };
+
+
+       // Updates the given moment's locale settings to the current calendar locale settings.
+       function localizeMoment(mom) {
+               mom._locale = localeData;
        }
+       t.localizeMoment = localizeMoment;
+
+
+       // Returns a boolean about whether or not the calendar knows how to calculate
+       // the timezone offset of arbitrary dates in the current timezone.
+       t.getIsAmbigTimezone = function() {
+               return t.options.timezone !== 'local' && t.options.timezone !== 'UTC';
+       };
+
+
+       // Returns a copy of the given date in the current timezone. Has no effect on dates without times.
+       t.applyTimezone = function(date) {
+               if (!date.hasTime()) {
+                       return date.clone();
+               }
+
+               var zonedDate = t.moment(date.toArray());
+               var timeAdjust = date.time() - zonedDate.time();
+               var adjustedZonedDate;
+
+               // Safari sometimes has problems with this coersion when near DST. Adjust if necessary. (bug #2396)
+               if (timeAdjust) { // is the time result different than expected?
+                       adjustedZonedDate = zonedDate.clone().add(timeAdjust); // add milliseconds
+                       if (date.time() - adjustedZonedDate.time() === 0) { // does it match perfectly now?
+                               zonedDate = adjustedZonedDate;
+                       }
+               }
+
+               return zonedDate;
+       };
+
+
+       // Returns a moment for the current date, as defined by the client's computer or from the `now` option.
+       // Will return an moment with an ambiguous timezone.
+       t.getNow = function() {
+               var now = t.options.now;
+               if (typeof now === 'function') {
+                       now = now();
+               }
+               return t.moment(now).stripZone();
+       };
+
+
+       // Get an event's normalized end date. If not present, calculate it from the defaults.
+       t.getEventEnd = function(event) {
+               if (event.end) {
+                       return event.end.clone();
+               }
+               else {
+                       return t.getDefaultEventEnd(event.allDay, event.start);
+               }
+       };
+
+
+       // Given an event's allDay status and start date, return what its fallback end date should be.
+       // TODO: rename to computeDefaultEventEnd
+       t.getDefaultEventEnd = function(allDay, zonedStart) {
+               var end = zonedStart.clone();
+
+               if (allDay) {
+                       end.stripTime().add(t.defaultAllDayEventDuration);
+               }
+               else {
+                       end.add(t.defaultTimedEventDuration);
+               }
+
+               if (t.getIsAmbigTimezone()) {
+                       end.stripZone(); // we don't know what the tzo should be
+               }
+
+               return end;
+       };
+
+
+       // Produces a human-readable string for the given duration.
+       // Side-effect: changes the locale of the given duration.
+       t.humanizeDuration = function(duration) {
+               return duration.locale(t.options.locale).humanize();
+       };
+
+
        
+       // Imports
+       // -----------------------------------------------------------------------------------
+
+
+       EventManager.call(t);
+       var isFetchNeeded = t.isFetchNeeded;
+       var fetchEvents = t.fetchEvents;
+       var fetchEventSources = t.fetchEventSources;
+
+
+
+       // Locals
+       // -----------------------------------------------------------------------------------
+
+
+       var _element = element[0];
+       var header;
+       var content;
+       var tm; // for making theme classes
+       var currentView; // NOTE: keep this in sync with this.view
+       var viewsByType = {}; // holds all instantiated view instances, current or not
+       var suggestedViewHeight;
+       var windowResizeProxy; // wraps the windowResize function
+       var ignoreWindowResize = 0;
+       var events = [];
+       var date; // unzoned
        
-       function destroy() {
-               element.remove();
-       }
        
        
-       function renderSection(position) {
-               var e = $("<td class='fc-header-" + position + "'/>");
-               var buttonStr = options.header[position];
-               if (buttonStr) {
-                       $.each(buttonStr.split(' '), function(i) {
-                               if (i > 0) {
-                                       e.append("<span class='fc-header-space'/>");
-                               }
-                               var prevButton;
-                               $.each(this.split(','), function(j, buttonName) {
-                                       if (buttonName == 'title') {
-                                               e.append("<span class='fc-header-title'><h2>&nbsp;</h2></span>");
-                                               if (prevButton) {
-                                                       prevButton.addClass(tm + '-corner-right');
-                                               }
-                                               prevButton = null;
-                                       }else{
-                                               var buttonClick;
-                                               if (calendar[buttonName]) {
-                                                       buttonClick = calendar[buttonName]; // calendar method
-                                               }
-                                               else if (fcViews[buttonName]) {
-                                                       buttonClick = function() {
-                                                               button.removeClass(tm + '-state-hover'); // forget why
-                                                               calendar.changeView(buttonName);
-                                                       };
-                                               }
-                                               if (buttonClick) {
-                                                       var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here?
-                                                       var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here?
-                                                       var button = $(
-                                                               "<span class='fc-button fc-button-" + buttonName + " " + tm + "-state-default'>" +
-                                                                       (icon ?
-                                                                               "<span class='fc-icon-wrap'>" +
-                                                                                       "<span class='ui-icon ui-icon-" + icon + "'/>" +
-                                                                               "</span>" :
-                                                                               text
-                                                                               ) +
-                                                               "</span>"
-                                                               )
-                                                               .click(function() {
-                                                                       if (!button.hasClass(tm + '-state-disabled')) {
-                                                                               buttonClick();
-                                                                       }
-                                                               })
-                                                               .mousedown(function() {
-                                                                       button
-                                                                               .not('.' + tm + '-state-active')
-                                                                               .not('.' + tm + '-state-disabled')
-                                                                               .addClass(tm + '-state-down');
-                                                               })
-                                                               .mouseup(function() {
-                                                                       button.removeClass(tm + '-state-down');
-                                                               })
-                                                               .hover(
-                                                                       function() {
-                                                                               button
-                                                                                       .not('.' + tm + '-state-active')
-                                                                                       .not('.' + tm + '-state-disabled')
-                                                                                       .addClass(tm + '-state-hover');
-                                                                       },
-                                                                       function() {
-                                                                               button
-                                                                                       .removeClass(tm + '-state-hover')
-                                                                                       .removeClass(tm + '-state-down');
-                                                                       }
-                                                               )
-                                                               .appendTo(e);
-                                                       disableTextSelection(button);
-                                                       if (!prevButton) {
-                                                               button.addClass(tm + '-corner-left');
-                                                       }
-                                                       prevButton = button;
-                                               }
-                                       }
-                               });
-                               if (prevButton) {
-                                       prevButton.addClass(tm + '-corner-right');
-                               }
-                       });
-               }
-               return e;
+       // Main Rendering
+       // -----------------------------------------------------------------------------------
+
+
+       // compute the initial ambig-timezone date
+       if (t.options.defaultDate != null) {
+               date = t.moment(t.options.defaultDate).stripZone();
+       }
+       else {
+               date = t.getNow(); // getNow already returns unzoned
        }
        
        
-       function updateTitle(html) {
-               element.find('h2')
-                       .html(html);
+       function render() {
+               if (!content) {
+                       initialRender();
+               }
+               else if (elementVisible()) {
+                       // mainly for the public API
+                       calcSize();
+                       renderView();
+               }
        }
        
        
-       function activateButton(buttonName) {
-               element.find('span.fc-button-' + buttonName)
-                       .addClass(tm + '-state-active');
+       function initialRender() {
+               element.addClass('fc');
+
+               // event delegation for nav links
+               element.on('click.fc', 'a[data-goto]', function(ev) {
+                       var anchorEl = $(this);
+                       var gotoOptions = anchorEl.data('goto'); // will automatically parse JSON
+                       var date = t.moment(gotoOptions.date);
+                       var viewType = gotoOptions.type;
+
+                       // property like "navLinkDayClick". might be a string or a function
+                       var customAction = currentView.opt('navLink' + capitaliseFirstLetter(viewType) + 'Click');
+
+                       if (typeof customAction === 'function') {
+                               customAction(date, ev);
+                       }
+                       else {
+                               if (typeof customAction === 'string') {
+                                       viewType = customAction;
+                               }
+                               zoomTo(date, viewType);
+                       }
+               });
+
+               // called immediately, and upon option change
+               t.bindOption('theme', function(theme) {
+                       tm = theme ? 'ui' : 'fc'; // affects a larger scope
+                       element.toggleClass('ui-widget', theme);
+                       element.toggleClass('fc-unthemed', !theme);
+               });
+
+               // called immediately, and upon option change.
+               // HACK: locale often affects isRTL, so we explicitly listen to that too.
+               t.bindOptions([ 'isRTL', 'locale' ], function(isRTL) {
+                       element.toggleClass('fc-ltr', !isRTL);
+                       element.toggleClass('fc-rtl', isRTL);
+               });
+
+               content = $("<div class='fc-view-container'/>").prependTo(element);
+
+               header = t.header = new Header(t);
+               renderHeader();
+
+               renderView(t.options.defaultView);
+
+               if (t.options.handleWindowResize) {
+                       windowResizeProxy = debounce(windowResize, t.options.windowResizeDelay); // prevents rapid calls
+                       $(window).resize(windowResizeProxy);
+               }
+       }
+
+
+       // can be called repeatedly and Header will rerender
+       function renderHeader() {
+               header.render();
+               if (header.el) {
+                       element.prepend(header.el);
+               }
        }
        
        
-       function deactivateButton(buttonName) {
-               element.find('span.fc-button-' + buttonName)
-                       .removeClass(tm + '-state-active');
+       function destroy() {
+
+               if (currentView) {
+                       currentView.removeElement();
+
+                       // NOTE: don't null-out currentView/t.view in case API methods are called after destroy.
+                       // It is still the "current" view, just not rendered.
+               }
+
+               header.removeElement();
+               content.remove();
+               element.removeClass('fc fc-ltr fc-rtl fc-unthemed ui-widget');
+
+               element.off('.fc'); // unbind nav link handlers
+
+               if (windowResizeProxy) {
+                       $(window).unbind('resize', windowResizeProxy);
+               }
        }
        
        
-       function disableButton(buttonName) {
-               element.find('span.fc-button-' + buttonName)
-                       .addClass(tm + '-state-disabled');
+       function elementVisible() {
+               return element.is(':visible');
        }
        
        
-       function enableButton(buttonName) {
-               element.find('span.fc-button-' + buttonName)
-                       .removeClass(tm + '-state-disabled');
-       }
 
+       // View Rendering
+       // -----------------------------------------------------------------------------------
 
-}
 
-;;
+       // Renders a view because of a date change, view-type change, or for the first time.
+       // If not given a viewType, keep the current view but render different dates.
+       // Accepts an optional scroll state to restore to.
+       function renderView(viewType, explicitScrollState) {
+               ignoreWindowResize++;
+
+               // if viewType is changing, remove the old view's rendering
+               if (currentView && viewType && currentView.type !== viewType) {
+                       freezeContentHeight(); // prevent a scroll jump when view element is removed
+                       clearView();
+               }
 
-fc.sourceNormalizers = [];
-fc.sourceFetchers = [];
+               // if viewType changed, or the view was never created, create a fresh view
+               if (!currentView && viewType) {
+                       currentView = t.view =
+                               viewsByType[viewType] ||
+                               (viewsByType[viewType] = t.instantiateView(viewType));
 
-var ajaxDefaults = {
-       dataType: 'json',
-       cache: false
-};
+                       currentView.setElement(
+                               $("<div class='fc-view fc-" + viewType + "-view' />").appendTo(content)
+                       );
+                       header.activateButton(viewType);
+               }
 
-var eventGUID = 1;
+               if (currentView) {
 
+                       // in case the view should render a period of time that is completely hidden
+                       date = currentView.massageCurrentDate(date);
+
+                       // render or rerender the view
+                       if (
+                               !currentView.displaying ||
+                               !( // NOT within interval range signals an implicit date window change
+                                       date >= currentView.intervalStart &&
+                                       date < currentView.intervalEnd
+                               )
+                       ) {
+                               if (elementVisible()) {
+
+                                       currentView.display(date, explicitScrollState); // will call freezeContentHeight
+                                       unfreezeContentHeight(); // immediately unfreeze regardless of whether display is async
+
+                                       // need to do this after View::render, so dates are calculated
+                                       updateHeaderTitle();
+                                       updateTodayButton();
+
+                                       getAndRenderEvents();
+                               }
+                       }
+               }
+
+               unfreezeContentHeight(); // undo any lone freezeContentHeight calls
+               ignoreWindowResize--;
+       }
+
+
+       // Unrenders the current view and reflects this change in the Header.
+       // Unregsiters the `currentView`, but does not remove from viewByType hash.
+       function clearView() {
+               header.deactivateButton(currentView.type);
+               currentView.removeElement();
+               currentView = t.view = null;
+       }
+
+
+       // Destroys the view, including the view object. Then, re-instantiates it and renders it.
+       // Maintains the same scroll state.
+       // TODO: maintain any other user-manipulated state.
+       function reinitView() {
+               ignoreWindowResize++;
+               freezeContentHeight();
+
+               var viewType = currentView.type;
+               var scrollState = currentView.queryScroll();
+               clearView();
+               renderView(viewType, scrollState);
+
+               unfreezeContentHeight();
+               ignoreWindowResize--;
+       }
 
-function EventManager(options, _sources) {
-       var t = this;
-       
-       
-       // exports
-       t.isFetchNeeded = isFetchNeeded;
-       t.fetchEvents = fetchEvents;
-       t.addEventSource = addEventSource;
-       t.removeEventSource = removeEventSource;
-       t.updateEvent = updateEvent;
-       t.renderEvent = renderEvent;
-       t.removeEvents = removeEvents;
-       t.clientEvents = clientEvents;
-       t.normalizeEvent = normalizeEvent;
-       
-       
-       // imports
-       var trigger = t.trigger;
-       var getView = t.getView;
-       var reportEvents = t.reportEvents;
-       
        
-       // locals
-       var stickySource = { events: [] };
-       var sources = [ stickySource ];
-       var rangeStart, rangeEnd;
-       var currentFetchID = 0;
-       var pendingSourceCnt = 0;
-       var loadingLevel = 0;
-       var cache = [];
+
+       // Resizing
+       // -----------------------------------------------------------------------------------
+
+
+       t.getSuggestedViewHeight = function() {
+               if (suggestedViewHeight === undefined) {
+                       calcSize();
+               }
+               return suggestedViewHeight;
+       };
+
+
+       t.isHeightAuto = function() {
+               return t.options.contentHeight === 'auto' || t.options.height === 'auto';
+       };
        
        
-       for (var i=0; i<_sources.length; i++) {
-               _addEventSource(_sources[i]);
+       function updateSize(shouldRecalc) {
+               if (elementVisible()) {
+
+                       if (shouldRecalc) {
+                               _calcSize();
+                       }
+
+                       ignoreWindowResize++;
+                       currentView.updateSize(true); // isResize=true. will poll getSuggestedViewHeight() and isHeightAuto()
+                       ignoreWindowResize--;
+
+                       return true; // signal success
+               }
+       }
+
+
+       function calcSize() {
+               if (elementVisible()) {
+                       _calcSize();
+               }
        }
        
        
-       
-       /* Fetching
-       -----------------------------------------------------------------------------*/
-       
-       
-       function isFetchNeeded(start, end) {
-               return !rangeStart || start < rangeStart || end > rangeEnd;
+       function _calcSize() { // assumes elementVisible
+               var contentHeightInput = t.options.contentHeight;
+               var heightInput = t.options.height;
+
+               if (typeof contentHeightInput === 'number') { // exists and not 'auto'
+                       suggestedViewHeight = contentHeightInput;
+               }
+               else if (typeof contentHeightInput === 'function') { // exists and is a function
+                       suggestedViewHeight = contentHeightInput();
+               }
+               else if (typeof heightInput === 'number') { // exists and not 'auto'
+                       suggestedViewHeight = heightInput - queryHeaderHeight();
+               }
+               else if (typeof heightInput === 'function') { // exists and is a function
+                       suggestedViewHeight = heightInput() - queryHeaderHeight();
+               }
+               else if (heightInput === 'parent') { // set to height of parent element
+                       suggestedViewHeight = element.parent().height() - queryHeaderHeight();
+               }
+               else {
+                       suggestedViewHeight = Math.round(content.width() / Math.max(t.options.aspectRatio, .5));
+               }
+       }
+
+
+       function queryHeaderHeight() {
+               return header.el ? header.el.outerHeight(true) : 0; // includes margin
        }
        
        
-       function fetchEvents(start, end) {
-               rangeStart = start;
-               rangeEnd = end;
-               cache = [];
-               var fetchID = ++currentFetchID;
-               var len = sources.length;
-               pendingSourceCnt = len;
-               for (var i=0; i<len; i++) {
-                       fetchEventSource(sources[i], fetchID);
+       function windowResize(ev) {
+               if (
+                       !ignoreWindowResize &&
+                       ev.target === window && // so we don't process jqui "resize" events that have bubbled up
+                       currentView.start // view has already been rendered
+               ) {
+                       if (updateSize(true)) {
+                               currentView.trigger('windowResize', _element);
+                       }
                }
        }
        
        
-       function fetchEventSource(source, fetchID) {
-               _fetchEventSource(source, function(events) {
-                       if (fetchID == currentFetchID) {
-                               if (events) {
+       
+       /* Event Fetching/Rendering
+       -----------------------------------------------------------------------------*/
+       // TODO: going forward, most of this stuff should be directly handled by the view
 
-                                       if (options.eventDataTransform) {
-                                               events = $.map(events, options.eventDataTransform);
-                                       }
-                                       if (source.eventDataTransform) {
-                                               events = $.map(events, source.eventDataTransform);
-                                       }
-                                       // TODO: this technique is not ideal for static array event sources.
-                                       //  For arrays, we'll want to process all events right in the beginning, then never again.
-                               
-                                       for (var i=0; i<events.length; i++) {
-                                               events[i].source = source;
-                                               normalizeEvent(events[i]);
-                                       }
-                                       cache = cache.concat(events);
-                               }
-                               pendingSourceCnt--;
-                               if (!pendingSourceCnt) {
-                                       reportEvents(cache);
-                               }
-                       }
-               });
+
+       function refetchEvents() { // can be called as an API method
+               fetchAndRenderEvents();
        }
-       
-       
-       function _fetchEventSource(source, callback) {
-               var i;
-               var fetchers = fc.sourceFetchers;
-               var res;
-               for (i=0; i<fetchers.length; i++) {
-                       res = fetchers[i](source, rangeStart, rangeEnd, callback);
-                       if (res === true) {
-                               // the fetcher is in charge. made its own async request
-                               return;
-                       }
-                       else if (typeof res == 'object') {
-                               // the fetcher returned a new source. process it
-                               _fetchEventSource(res, callback);
-                               return;
-                       }
-               }
-               var events = source.events;
-               if (events) {
-                       if ($.isFunction(events)) {
-                               pushLoading();
-                               events(cloneDate(rangeStart), cloneDate(rangeEnd), function(events) {
-                                       callback(events);
-                                       popLoading();
-                               });
-                       }
-                       else if ($.isArray(events)) {
-                               callback(events);
-                       }
-                       else {
-                               callback();
-                       }
-               }else{
-                       var url = source.url;
-                       if (url) {
-                               var success = source.success;
-                               var error = source.error;
-                               var complete = source.complete;
 
-                               // retrieve any outbound GET/POST $.ajax data from the options
-                               var customData;
-                               if ($.isFunction(source.data)) {
-                                       // supplied as a function that returns a key/value object
-                                       customData = source.data();
-                               }
-                               else {
-                                       // supplied as a straight key/value object
-                                       customData = source.data;
-                               }
 
-                               // use a copy of the custom data so we can modify the parameters
-                               // and not affect the passed-in object.
-                               var data = $.extend({}, customData || {});
+       // TODO: move this into EventManager?
+       function refetchEventSources(matchInputs) {
+               fetchEventSources(t.getEventSourcesByMatchArray(matchInputs));
+       }
 
-                               var startParam = firstDefined(source.startParam, options.startParam);
-                               var endParam = firstDefined(source.endParam, options.endParam);
-                               if (startParam) {
-                                       data[startParam] = Math.round(+rangeStart / 1000);
-                               }
-                               if (endParam) {
-                                       data[endParam] = Math.round(+rangeEnd / 1000);
-                               }
 
-                               pushLoading();
-                               $.ajax($.extend({}, ajaxDefaults, source, {
-                                       data: data,
-                                       success: function(events) {
-                                               events = events || [];
-                                               var res = applyAll(success, this, arguments);
-                                               if ($.isArray(res)) {
-                                                       events = res;
-                                               }
-                                               callback(events);
-                                       },
-                                       error: function() {
-                                               applyAll(error, this, arguments);
-                                               callback();
-                                       },
-                                       complete: function() {
-                                               applyAll(complete, this, arguments);
-                                               popLoading();
-                                       }
-                               }));
-                       }else{
-                               callback();
-                       }
+       function renderEvents() { // destroys old events if previously rendered
+               if (elementVisible()) {
+                       freezeContentHeight();
+                       currentView.displayEvents(events);
+                       unfreezeContentHeight();
                }
        }
        
+
+       function getAndRenderEvents() {
+               if (!t.options.lazyFetching || isFetchNeeded(currentView.start, currentView.end)) {
+                       fetchAndRenderEvents();
+               }
+               else {
+                       renderEvents();
+               }
+       }
+
+
+       function fetchAndRenderEvents() {
+               fetchEvents(currentView.start, currentView.end);
+                       // ... will call reportEvents
+                       // ... which will call renderEvents
+       }
+
        
-       
-       /* Sources
+       // called when event data arrives
+       function reportEvents(_events) {
+               events = _events;
+               renderEvents();
+       }
+
+
+       // called when a single event's data has been changed
+       function reportEventChange() {
+               renderEvents();
+       }
+
+
+
+       /* Header Updating
        -----------------------------------------------------------------------------*/
-       
 
-       function addEventSource(source) {
-               source = _addEventSource(source);
-               if (source) {
-                       pendingSourceCnt++;
-                       fetchEventSource(source, currentFetchID); // will eventually call reportEvents
+
+       function updateHeaderTitle() {
+               header.updateTitle(currentView.title);
+       }
+
+
+       function updateTodayButton() {
+               var now = t.getNow();
+
+               if (now >= currentView.intervalStart && now < currentView.intervalEnd) {
+                       header.disableButton('today');
+               }
+               else {
+                       header.enableButton('today');
                }
        }
        
+
+
+       /* Selection
+       -----------------------------------------------------------------------------*/
        
-       function _addEventSource(source) {
-               if ($.isFunction(source) || $.isArray(source)) {
-                       source = { events: source };
-               }
-               else if (typeof source == 'string') {
-                       source = { url: source };
-               }
-               if (typeof source == 'object') {
-                       normalizeSource(source);
-                       sources.push(source);
-                       return source;
-               }
+
+       // this public method receives start/end dates in any format, with any timezone
+       function select(zonedStartInput, zonedEndInput) {
+               currentView.select(
+                       t.buildSelectSpan.apply(t, arguments)
+               );
        }
        
 
-       function removeEventSource(source) {
-               sources = $.grep(sources, function(src) {
-                       return !isSourcesEqual(src, source);
-               });
-               // remove all client events from that source
-               cache = $.grep(cache, function(e) {
-                       return !isSourcesEqual(e.source, source);
-               });
-               reportEvents(cache);
+       function unselect() { // safe to be called before renderView
+               if (currentView) {
+                       currentView.unselect();
+               }
        }
        
        
        
-       /* Manipulation
+       /* Date
        -----------------------------------------------------------------------------*/
        
        
-       function updateEvent(event) { // update an existing event
-               var i, len = cache.length, e,
-                       defaultEventEnd = getView().defaultEventEnd, // getView???
-                       startDelta = event.start - event._start,
-                       endDelta = event.end ?
-                               (event.end - (event._end || defaultEventEnd(event))) // event._end would be null if event.end
-                               : 0;                                                      // was null and event was just resized
-               for (i=0; i<len; i++) {
-                       e = cache[i];
-                       if (e._id == event._id && e != event) {
-                               e.start = new Date(+e.start + startDelta);
-                               if (event.end) {
-                                       if (e.end) {
-                                               e.end = new Date(+e.end + endDelta);
-                                       }else{
-                                               e.end = new Date(+defaultEventEnd(e) + endDelta);
-                                       }
-                               }else{
-                                       e.end = null;
-                               }
-                               e.title = event.title;
-                               e.url = event.url;
-                               e.allDay = event.allDay;
-                               e.className = event.className;
-                               e.editable = event.editable;
-                               e.color = event.color;
-                               e.backgroundColor = event.backgroundColor;
-                               e.borderColor = event.borderColor;
-                               e.textColor = event.textColor;
-                               normalizeEvent(e);
-                       }
-               }
-               normalizeEvent(event);
-               reportEvents(cache);
+       function prev() {
+               date = currentView.computePrevDate(date);
+               renderView();
        }
        
        
-       function renderEvent(event, stick) {
-               normalizeEvent(event);
-               if (!event.source) {
-                       if (stick) {
-                               stickySource.events.push(event);
-                               event.source = stickySource;
-                       }
-                       cache.push(event);
-               }
-               reportEvents(cache);
+       function next() {
+               date = currentView.computeNextDate(date);
+               renderView();
        }
        
        
-       function removeEvents(filter) {
-               if (!filter) { // remove all
-                       cache = [];
-                       // clear all array sources
-                       for (var i=0; i<sources.length; i++) {
-                               if ($.isArray(sources[i].events)) {
-                                       sources[i].events = [];
-                               }
-                       }
-               }else{
-                       if (!$.isFunction(filter)) { // an event ID
-                               var id = filter + '';
-                               filter = function(e) {
-                                       return e._id == id;
-                               };
-                       }
-                       cache = $.grep(cache, filter, true);
-                       // remove events from array sources
-                       for (var i=0; i<sources.length; i++) {
-                               if ($.isArray(sources[i].events)) {
-                                       sources[i].events = $.grep(sources[i].events, filter, true);
-                               }
-                       }
-               }
-               reportEvents(cache);
+       function prevYear() {
+               date.add(-1, 'years');
+               renderView();
        }
        
        
-       function clientEvents(filter) {
-               if ($.isFunction(filter)) {
-                       return $.grep(cache, filter);
-               }
-               else if (filter) { // an event ID
-                       filter += '';
-                       return $.grep(cache, function(e) {
-                               return e._id == filter;
-                       });
-               }
-               return cache; // else, return all
+       function nextYear() {
+               date.add(1, 'years');
+               renderView();
        }
        
        
+       function today() {
+               date = t.getNow();
+               renderView();
+       }
        
-       /* Loading State
-       -----------------------------------------------------------------------------*/
        
+       function gotoDate(zonedDateInput) {
+               date = t.moment(zonedDateInput).stripZone();
+               renderView();
+       }
        
-       function pushLoading() {
-               if (!loadingLevel++) {
-                       trigger('loading', null, true, getView());
-               }
+       
+       function incrementDate(delta) {
+               date.add(moment.duration(delta));
+               renderView();
+       }
+
+
+       // Forces navigation to a view for the given date.
+       // `viewType` can be a specific view name or a generic one like "week" or "day".
+       function zoomTo(newDate, viewType) {
+               var spec;
+
+               viewType = viewType || 'day'; // day is default zoom
+               spec = t.getViewSpec(viewType) || t.getUnitViewSpec(viewType);
+
+               date = newDate.clone();
+               renderView(spec ? spec.type : null);
        }
        
        
-       function popLoading() {
-               if (!--loadingLevel) {
-                       trigger('loading', null, false, getView());
-               }
+       // for external API
+       function getDate() {
+               return t.applyTimezone(date); // infuse the calendar's timezone
+       }
+
+
+
+       /* Height "Freezing"
+       -----------------------------------------------------------------------------*/
+       // TODO: move this into the view
+
+       t.freezeContentHeight = freezeContentHeight;
+       t.unfreezeContentHeight = unfreezeContentHeight;
+
+
+       function freezeContentHeight() {
+               content.css({
+                       width: '100%',
+                       height: content.height(),
+                       overflow: 'hidden'
+               });
+       }
+
+
+       function unfreezeContentHeight() {
+               content.css({
+                       width: '',
+                       height: '',
+                       overflow: ''
+               });
        }
        
        
        
-       /* Event Normalization
-       -----------------------------------------------------------------------------*/
+       /* Misc
+       -----------------------------------------------------------------------------*/
+       
+
+       function getCalendar() {
+               return t;
+       }
+
+       
+       function getView() {
+               return currentView;
+       }
        
        
-       function normalizeEvent(event) {
-               var source = event.source || {};
-               var ignoreTimezone = firstDefined(source.ignoreTimezone, options.ignoreTimezone);
-               event._id = event._id || (event.id === undefined ? '_fc' + eventGUID++ : event.id + '');
-               if (event.date) {
-                       if (!event.start) {
-                               event.start = event.date;
+       function option(name, value) {
+               var newOptionHash;
+
+               if (typeof name === 'string') {
+                       if (value === undefined) { // getter
+                               return t.options[name];
+                       }
+                       else { // setter for individual option
+                               newOptionHash = {};
+                               newOptionHash[name] = value;
+                               setOptions(newOptionHash);
                        }
-                       delete event.date;
                }
-               event._start = cloneDate(event.start = parseDate(event.start, ignoreTimezone));
-               event.end = parseDate(event.end, ignoreTimezone);
-               if (event.end && event.end <= event.start) {
-                       event.end = null;
+               else if (typeof name === 'object') { // compound setter with object input
+                       setOptions(name);
+               }
+       }
+
+
+       function setOptions(newOptionHash) {
+               var optionCnt = 0;
+               var optionName;
+
+               for (optionName in newOptionHash) {
+                       t.dynamicOverrides[optionName] = newOptionHash[optionName];
                }
-               event._end = event.end ? cloneDate(event.end) : null;
-               if (event.allDay === undefined) {
-                       event.allDay = firstDefined(source.allDayDefault, options.allDayDefault);
+
+               t.viewSpecCache = {}; // the dynamic override invalidates the options in this cache, so just clear it
+               t.populateOptionsHash(); // this.options needs to be recomputed after the dynamic override
+
+               // trigger handlers after this.options has been updated
+               for (optionName in newOptionHash) {
+                       t.triggerOptionHandlers(optionName); // recall bindOption/bindOptions
+                       optionCnt++;
                }
-               if (event.className) {
-                       if (typeof event.className == 'string') {
-                               event.className = event.className.split(/\s+/);
+
+               // special-case handling of single option change.
+               // if only one option change, `optionName` will be its name.
+               if (optionCnt === 1) {
+                       if (optionName === 'height' || optionName === 'contentHeight' || optionName === 'aspectRatio') {
+                               updateSize(true); // true = allow recalculation of height
+                               return;
+                       }
+                       else if (optionName === 'defaultDate') {
+                               return; // can't change date this way. use gotoDate instead
+                       }
+                       else if (optionName === 'businessHours') {
+                               if (currentView) {
+                                       currentView.unrenderBusinessHours();
+                                       currentView.renderBusinessHours();
+                               }
+                               return;
+                       }
+                       else if (optionName === 'timezone') {
+                               t.rezoneArrayEventSources();
+                               refetchEvents();
+                               return;
                        }
-               }else{
-                       event.className = [];
                }
-               // TODO: if there is no start date, return false to indicate an invalid event
+
+               // catch-all. rerender the header and rebuild/rerender the current view
+               renderHeader();
+               viewsByType = {}; // even non-current views will be affected by this option change. do before rerender
+               reinitView();
        }
        
        
-       
-       /* Utils
-       ------------------------------------------------------------------------------*/
-       
-       
-       function normalizeSource(source) {
-               if (source.className) {
-                       // TODO: repeat code, same code for event classNames
-                       if (typeof source.className == 'string') {
-                               source.className = source.className.split(/\s+/);
-                       }
-               }else{
-                       source.className = [];
+       function trigger(name, thisObj) { // overrides the Emitter's trigger method :(
+               var args = Array.prototype.slice.call(arguments, 2);
+
+               thisObj = thisObj || _element;
+               this.triggerWith(name, thisObj, args); // Emitter's method
+
+               if (t.options[name]) {
+                       return t.options[name].apply(thisObj, args);
+               }
+       }
+
+       t.initialize();
+}
+
+;;
+/*
+Options binding/triggering system.
+*/
+Calendar.mixin({
+
+       // A map of option names to arrays of handler objects. Initialized to {} in Calendar.
+       // Format for a handler object:
+       // {
+       //   func // callback function to be called upon change
+       //   names // option names whose values should be given to func
+       // }
+       optionHandlers: null, 
+
+       // Calls handlerFunc immediately, and when the given option has changed.
+       // handlerFunc will be given the option value.
+       bindOption: function(optionName, handlerFunc) {
+               this.bindOptions([ optionName ], handlerFunc);
+       },
+
+       // Calls handlerFunc immediately, and when any of the given options change.
+       // handlerFunc will be given each option value as ordered function arguments.
+       bindOptions: function(optionNames, handlerFunc) {
+               var handlerObj = { func: handlerFunc, names: optionNames };
+               var i;
+
+               for (i = 0; i < optionNames.length; i++) {
+                       this.registerOptionHandlerObj(optionNames[i], handlerObj);
+               }
+
+               this.triggerOptionHandlerObj(handlerObj);
+       },
+
+       // Puts the given handler object into the internal hash
+       registerOptionHandlerObj: function(optionName, handlerObj) {
+               (this.optionHandlers[optionName] || (this.optionHandlers[optionName] = []))
+                       .push(handlerObj);
+       },
+
+       // Reports that the given option has changed, and calls all appropriate handlers.
+       triggerOptionHandlers: function(optionName) {
+               var handlerObjs = this.optionHandlers[optionName] || [];
+               var i;
+
+               for (i = 0; i < handlerObjs.length; i++) {
+                       this.triggerOptionHandlerObj(handlerObjs[i]);
                }
-               var normalizers = fc.sourceNormalizers;
-               for (var i=0; i<normalizers.length; i++) {
-                       normalizers[i](source);
+       },
+
+       // Calls the callback for a specific handler object, passing in the appropriate arguments.
+       triggerOptionHandlerObj: function(handlerObj) {
+               var optionNames = handlerObj.names;
+               var optionValues = [];
+               var i;
+
+               for (i = 0; i < optionNames.length; i++) {
+                       optionValues.push(this.options[optionNames[i]]);
                }
+
+               handlerObj.func.apply(this, optionValues); // maintain the Calendar's `this` context
        }
+
+});
+
+;;
+
+Calendar.defaults = {
+
+       titleRangeSeparator: ' \u2013 ', // en dash
+       monthYearFormat: 'MMMM YYYY', // required for en. other locales rely on datepicker computable option
+
+       defaultTimedEventDuration: '02:00:00',
+       defaultAllDayEventDuration: { days: 1 },
+       forceEventDuration: false,
+       nextDayThreshold: '09:00:00', // 9am
+
+       // display
+       defaultView: 'month',
+       aspectRatio: 1.35,
+       header: {
+               left: 'title',
+               center: '',
+               right: 'today prev,next'
+       },
+       weekends: true,
+       weekNumbers: false,
+
+       weekNumberTitle: 'W',
+       weekNumberCalculation: 'local',
        
+       //editable: false,
+
+       //nowIndicator: false,
+
+       scrollTime: '06:00:00',
        
-       function isSourcesEqual(source1, source2) {
-               return source1 && source2 && getSourcePrimitive(source1) == getSourcePrimitive(source2);
-       }
+       // event ajax
+       lazyFetching: true,
+       startParam: 'start',
+       endParam: 'end',
+       timezoneParam: 'timezone',
+
+       timezone: false,
+
+       //allDayDefault: undefined,
+
+       // locale
+       isRTL: false,
+       buttonText: {
+               prev: "prev",
+               next: "next",
+               prevYear: "prev year",
+               nextYear: "next year",
+               year: 'year', // TODO: locale files need to specify this
+               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'
+       },
+
+       allDayText: 'all-day',
+       
+       // jquery-ui theming
+       theme: false,
+       themeButtonIcons: {
+               prev: 'circle-triangle-w',
+               next: 'circle-triangle-e',
+               prevYear: 'seek-prev',
+               nextYear: 'seek-next'
+       },
+
+       //eventResizableFromStart: false,
+       dragOpacity: .75,
+       dragRevertDuration: 500,
+       dragScroll: true,
        
+       //selectable: false,
+       unselectAuto: true,
        
-       function getSourcePrimitive(source) {
-               return ((typeof source == 'object') ? (source.events || source.url) : '') || source;
-       }
+       dropAccept: '*',
 
+       eventOrder: 'title',
 
-}
+       eventLimit: false,
+       eventLimitText: 'more',
+       eventLimitClick: 'popover',
+       dayPopoverFormat: 'LL',
+       
+       handleWindowResize: true,
+       windowResizeDelay: 100, // milliseconds before an updateSize happens
+
+       longPressDelay: 1000
+       
+};
+
+
+Calendar.englishDefaults = { // used by locale.js
+       dayPopoverFormat: 'dddd, MMMM D'
+};
+
+
+Calendar.rtlDefaults = { // right-to-left defaults
+       header: { // TODO: smarter solution (first/center/last ?)
+               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 localeOptionHash = FC.locales = {}; // initialize and expose
 
-fc.addDays = addDays;
-fc.cloneDate = cloneDate;
-fc.parseDate = parseDate;
-fc.parseISO8601 = parseISO8601;
-fc.parseTime = parseTime;
-fc.formatDate = formatDate;
-fc.formatDates = formatDates;
 
+// TODO: document the structure and ordering of a FullCalendar locale file
 
 
-/* Date Math
------------------------------------------------------------------------------*/
+// Initialize jQuery UI datepicker translations while using some of the translations
+// Will set this as the default locales for datepicker.
+FC.datepickerLocale = function(localeCode, dpLocaleCode, dpOptions) {
 
-var dayIDs = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'],
-       DAY_MS = 86400000,
-       HOUR_MS = 3600000,
-       MINUTE_MS = 60000;
-       
+       // get the FullCalendar internal option hash for this locale. create if necessary
+       var fcOptions = localeOptionHash[localeCode] || (localeOptionHash[localeCode] = {});
 
-function addYears(d, n, keepTime) {
-       d.setFullYear(d.getFullYear() + n);
-       if (!keepTime) {
-               clearTime(d);
-       }
-       return d;
-}
+       // transfer some simple options from datepicker to fc
+       fcOptions.isRTL = dpOptions.isRTL;
+       fcOptions.weekNumberTitle = dpOptions.weekHeader;
 
+       // compute some more complex options from datepicker
+       $.each(dpComputableOptions, function(name, func) {
+               fcOptions[name] = func(dpOptions);
+       });
 
-function addMonths(d, n, keepTime) { // prevents day overflow/underflow
-       if (+d) { // prevent infinite looping on invalid dates
-               var m = d.getMonth() + n,
-                       check = cloneDate(d);
-               check.setDate(1);
-               check.setMonth(m);
-               d.setMonth(m);
-               if (!keepTime) {
-                       clearTime(d);
-               }
-               while (d.getMonth() != check.getMonth()) {
-                       d.setDate(d.getDate() + (d < check ? 1 : -1));
-               }
+       // is jQuery UI Datepicker is on the page?
+       if ($.datepicker) {
+
+               // Register the locale data.
+               // FullCalendar and MomentJS use locale codes like "pt-br" but Datepicker
+               // does it like "pt-BR" or if it doesn't have the locale, maybe just "pt".
+               // Make an alias so the locale can be referenced either way.
+               $.datepicker.regional[dpLocaleCode] =
+                       $.datepicker.regional[localeCode] = // alias
+                               dpOptions;
+
+               // Alias 'en' to the default locale data. Do this every time.
+               $.datepicker.regional.en = $.datepicker.regional[''];
+
+               // Set as Datepicker's global defaults.
+               $.datepicker.setDefaults(dpOptions);
        }
-       return d;
-}
+};
+
+
+// Sets FullCalendar-specific translations. Will set the locales as the global default.
+FC.locale = function(localeCode, newFcOptions) {
+       var fcOptions;
+       var momOptions;
 
+       // get the FullCalendar internal option hash for this locale. create if necessary
+       fcOptions = localeOptionHash[localeCode] || (localeOptionHash[localeCode] = {});
 
-function addDays(d, n, keepTime) { // deals with daylight savings
-       if (+d) {
-               var dd = d.getDate() + n,
-                       check = cloneDate(d);
-               check.setHours(9); // set to middle of day
-               check.setDate(dd);
-               d.setDate(dd);
-               if (!keepTime) {
-                       clearTime(d);
+       // provided new options for this locales? merge them in
+       if (newFcOptions) {
+               fcOptions = localeOptionHash[localeCode] = mergeOptions([ fcOptions, newFcOptions ]);
+       }
+
+       // compute locale options that weren't defined.
+       // always do this. newFcOptions can be undefined when initializing from i18n file,
+       // so no way to tell if this is an initialization or a default-setting.
+       momOptions = getMomentLocaleData(localeCode); // will fall back to en
+       $.each(momComputableOptions, function(name, func) {
+               if (fcOptions[name] == null) {
+                       fcOptions[name] = func(momOptions, fcOptions);
                }
-               fixDate(d, check);
+       });
+
+       // set it as the default locale for FullCalendar
+       Calendar.defaults.locale = localeCode;
+};
+
+
+// NOTE: can't guarantee any of these computations will run because not every locale has datepicker
+// configs, so make sure there are English fallbacks for these in the defaults file.
+var dpComputableOptions = {
+
+       buttonText: function(dpOptions) {
+               return {
+                       // the translations sometimes wrongly contain HTML entities
+                       prev: stripHtmlEntities(dpOptions.prevText),
+                       next: stripHtmlEntities(dpOptions.nextText),
+                       today: stripHtmlEntities(dpOptions.currentText)
+               };
+       },
+
+       // Produces format strings like "MMMM YYYY" -> "September 2014"
+       monthYearFormat: function(dpOptions) {
+               return dpOptions.showMonthAfterYear ?
+                       'YYYY[' + dpOptions.yearSuffix + '] MMMM' :
+                       'MMMM YYYY[' + dpOptions.yearSuffix + ']';
        }
-       return d;
-}
 
+};
+
+var momComputableOptions = {
+
+       // Produces format strings like "ddd M/D" -> "Fri 9/15"
+       dayOfMonthFormat: function(momOptions, fcOptions) {
+               var format = momOptions.longDateFormat('l'); // for the format like "M/D/YYYY"
 
-function fixDate(d, check) { // force d to be on check's YMD, for daylight savings purposes
-       if (+d) { // prevent infinite looping on invalid dates
-               while (d.getDate() != check.getDate()) {
-                       d.setTime(+d + (d < check ? 1 : -1) * HOUR_MS);
+               // strip the year off the edge, as well as other misc non-whitespace chars
+               format = format.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g, '');
+
+               if (fcOptions.isRTL) {
+                       format += ' ddd'; // for RTL, add day-of-week to end
+               }
+               else {
+                       format = 'ddd ' + format; // for LTR, add day-of-week to beginning
                }
+               return format;
+       },
+
+       // Produces format strings like "h:mma" -> "6:00pm"
+       mediumTimeFormat: function(momOptions) { // can't be called `timeFormat` because collides with option
+               return momOptions.longDateFormat('LT')
+                       .replace(/\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand
+       },
+
+       // Produces format strings like "h(:mm)a" -> "6pm" / "6:30pm"
+       smallTimeFormat: function(momOptions) {
+               return momOptions.longDateFormat('LT')
+                       .replace(':mm', '(:mm)')
+                       .replace(/(\Wmm)$/, '($1)') // like above, but for foreign locales
+                       .replace(/\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand
+       },
+
+       // Produces format strings like "h(:mm)t" -> "6p" / "6:30p"
+       extraSmallTimeFormat: function(momOptions) {
+               return momOptions.longDateFormat('LT')
+                       .replace(':mm', '(:mm)')
+                       .replace(/(\Wmm)$/, '($1)') // like above, but for foreign locales
+                       .replace(/\s*a$/i, 't'); // convert to AM/PM/am/pm to lowercase one-letter. remove any spaces beforehand
+       },
+
+       // Produces format strings like "ha" / "H" -> "6pm" / "18"
+       hourFormat: function(momOptions) {
+               return momOptions.longDateFormat('LT')
+                       .replace(':mm', '')
+                       .replace(/(\Wmm)$/, '') // like above, but for foreign locales
+                       .replace(/\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand
+       },
+
+       // Produces format strings like "h:mm" -> "6:30" (with no AM/PM)
+       noMeridiemTimeFormat: function(momOptions) {
+               return momOptions.longDateFormat('LT')
+                       .replace(/\s*a$/i, ''); // remove trailing AM/PM
        }
-}
 
+};
 
-function addMinutes(d, n) {
-       d.setMinutes(d.getMinutes() + n);
-       return d;
-}
 
+// options that should be computed off live calendar options (considers override options)
+// TODO: best place for this? related to locale?
+// TODO: flipping text based on isRTL is a bad idea because the CSS `direction` might want to handle it
+var instanceComputableOptions = {
 
-function clearTime(d) {
-       d.setHours(0);
-       d.setMinutes(0);
-       d.setSeconds(0); 
-       d.setMilliseconds(0);
-       return d;
-}
+       // Produces format strings for results like "Mo 16"
+       smallDayDateFormat: function(options) {
+               return options.isRTL ?
+                       'D dd' :
+                       'dd D';
+       },
 
+       // Produces format strings for results like "Wk 5"
+       weekFormat: function(options) {
+               return options.isRTL ?
+                       'w[ ' + options.weekNumberTitle + ']' :
+                       '[' + options.weekNumberTitle + ' ]w';
+       },
 
-function cloneDate(d, dontKeepTime) {
-       if (dontKeepTime) {
-               return clearTime(new Date(+d));
+       // Produces format strings for results like "Wk5"
+       smallWeekFormat: function(options) {
+               return options.isRTL ?
+                       'w[' + options.weekNumberTitle + ']' :
+                       '[' + options.weekNumberTitle + ']w';
        }
-       return new Date(+d);
-}
 
+};
 
-function zeroDate() { // returns a Date with time 00:00:00 and dateOfMonth=1
-       var i=0, d;
-       do {
-               d = new Date(1970, i++, 1);
-       } while (d.getHours()); // != 0
-       return d;
+function populateInstanceComputableOptions(options) {
+       $.each(instanceComputableOptions, function(name, func) {
+               if (options[name] == null) {
+                       options[name] = func(options);
+               }
+       });
 }
 
 
-function dayDiff(d1, d2) { // d1 - d2
-       return Math.round((cloneDate(d1, true) - cloneDate(d2, true)) / DAY_MS);
+// Returns moment's internal locale data. If doesn't exist, returns English.
+function getMomentLocaleData(localeCode) {
+       return moment.localeData(localeCode) || moment.localeData('en');
 }
 
 
-function setYMD(date, y, m, d) {
-       if (y !== undefined && y != date.getFullYear()) {
-               date.setDate(1);
-               date.setMonth(0);
-               date.setFullYear(y);
-       }
-       if (m !== undefined && m != date.getMonth()) {
-               date.setDate(1);
-               date.setMonth(m);
-       }
-       if (d !== undefined) {
-               date.setDate(d);
-       }
-}
+// Initialize English by forcing computation of moment-derived options.
+// Also, sets it as the default.
+FC.locale('en', Calendar.englishDefaults);
 
+;;
 
+/* Top toolbar area with buttons and title
+----------------------------------------------------------------------------------------------------------------------*/
+// TODO: rename all header-related things to "toolbar"
 
-/* Date Parsing
------------------------------------------------------------------------------*/
+function Header(calendar) {
+       var t = this;
+       
+       // exports
+       t.render = render;
+       t.removeElement = removeElement;
+       t.updateTitle = updateTitle;
+       t.activateButton = activateButton;
+       t.deactivateButton = deactivateButton;
+       t.disableButton = disableButton;
+       t.enableButton = enableButton;
+       t.getViewsWithButtons = getViewsWithButtons;
+       t.el = null; // mirrors local `el`
+       
+       // locals
+       var el;
+       var viewsWithButtons = [];
+       var tm;
 
 
-function parseDate(s, ignoreTimezone) { // ignoreTimezone defaults to true
-       if (typeof s == 'object') { // already a Date object
-               return s;
-       }
-       if (typeof s == 'number') { // a UNIX timestamp
-               return new Date(s * 1000);
-       }
-       if (typeof s == 'string') {
-               if (s.match(/^\d+(\.\d+)?$/)) { // a UNIX timestamp
-                       return new Date(parseFloat(s) * 1000);
-               }
-               if (ignoreTimezone === undefined) {
-                       ignoreTimezone = true;
-               }
-               return parseISO8601(s, ignoreTimezone) || (s ? new Date(s) : null);
-       }
-       // TODO: never return invalid dates (like from new Date(<string>)), return null instead
-       return null;
-}
+       // can be called repeatedly and will rerender
+       function render() {
+               var options = calendar.options;
+               var sections = options.header;
 
+               tm = options.theme ? 'ui' : 'fc';
 
-function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
-       // derived from http://delete.me.uk/2005/03/iso8601.html
-       // TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html
-       var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);
-       if (!m) {
-               return null;
-       }
-       var date = new Date(m[1], 0, 1);
-       if (ignoreTimezone || !m[13]) {
-               var check = new Date(m[1], 0, 1, 9, 0);
-               if (m[3]) {
-                       date.setMonth(m[3] - 1);
-                       check.setMonth(m[3] - 1);
-               }
-               if (m[5]) {
-                       date.setDate(m[5]);
-                       check.setDate(m[5]);
-               }
-               fixDate(date, check);
-               if (m[7]) {
-                       date.setHours(m[7]);
-               }
-               if (m[8]) {
-                       date.setMinutes(m[8]);
-               }
-               if (m[10]) {
-                       date.setSeconds(m[10]);
+               if (sections) {
+                       if (!el) {
+                               el = this.el = $("<div class='fc-toolbar'/>");
+                       }
+                       else {
+                               el.empty();
+                       }
+                       el.append(renderSection('left'))
+                               .append(renderSection('right'))
+                               .append(renderSection('center'))
+                               .append('<div class="fc-clear"/>');
                }
-               if (m[12]) {
-                       date.setMilliseconds(Number("0." + m[12]) * 1000);
+               else {
+                       removeElement();
                }
-               fixDate(date, check);
-       }else{
-               date.setUTCFullYear(
-                       m[1],
-                       m[3] ? m[3] - 1 : 0,
-                       m[5] || 1
-               );
-               date.setUTCHours(
-                       m[7] || 0,
-                       m[8] || 0,
-                       m[10] || 0,
-                       m[12] ? Number("0." + m[12]) * 1000 : 0
-               );
-               if (m[14]) {
-                       var offset = Number(m[16]) * 60 + (m[18] ? Number(m[18]) : 0);
-                       offset *= m[15] == '-' ? 1 : -1;
-                       date = new Date(+date + (offset * 60 * 1000));
+       }
+       
+       
+       function removeElement() {
+               if (el) {
+                       el.remove();
+                       el = t.el = null;
                }
        }
-       return date;
-}
+       
+       
+       function renderSection(position) {
+               var sectionEl = $('<div class="fc-' + position + '"/>');
+               var options = calendar.options;
+               var buttonStr = options.header[position];
+
+               if (buttonStr) {
+                       $.each(buttonStr.split(' '), function(i) {
+                               var groupChildren = $();
+                               var isOnlyButtons = true;
+                               var groupEl;
+
+                               $.each(this.split(','), function(j, buttonName) {
+                                       var customButtonProps;
+                                       var viewSpec;
+                                       var buttonClick;
+                                       var overrideText; // text explicitly set by calendar's constructor options. overcomes icons
+                                       var defaultText;
+                                       var themeIcon;
+                                       var normalIcon;
+                                       var innerHtml;
+                                       var classes;
+                                       var button; // the element
+
+                                       if (buttonName == 'title') {
+                                               groupChildren = groupChildren.add($('<h2>&nbsp;</h2>')); // we always want it to take up height
+                                               isOnlyButtons = false;
+                                       }
+                                       else {
+                                               if ((customButtonProps = (options.customButtons || {})[buttonName])) {
+                                                       buttonClick = function(ev) {
+                                                               if (customButtonProps.click) {
+                                                                       customButtonProps.click.call(button[0], ev);
+                                                               }
+                                                       };
+                                                       overrideText = ''; // icons will override text
+                                                       defaultText = customButtonProps.text;
+                                               }
+                                               else if ((viewSpec = calendar.getViewSpec(buttonName))) {
+                                                       buttonClick = function() {
+                                                               calendar.changeView(buttonName);
+                                                       };
+                                                       viewsWithButtons.push(buttonName);
+                                                       overrideText = viewSpec.buttonTextOverride;
+                                                       defaultText = viewSpec.buttonTextDefault;
+                                               }
+                                               else if (calendar[buttonName]) { // a calendar method
+                                                       buttonClick = function() {
+                                                               calendar[buttonName]();
+                                                       };
+                                                       overrideText = (calendar.overrides.buttonText || {})[buttonName];
+                                                       defaultText = options.buttonText[buttonName]; // everything else is considered default
+                                               }
 
+                                               if (buttonClick) {
 
-function parseTime(s) { // returns minutes since start of day
-       if (typeof s == 'number') { // an hour
-               return s * 60;
-       }
-       if (typeof s == 'object') { // a Date object
-               return s.getHours() * 60 + s.getMinutes();
-       }
-       var m = s.match(/(\d+)(?::(\d+))?\s*(\w+)?/);
-       if (m) {
-               var h = parseInt(m[1], 10);
-               if (m[3]) {
-                       h %= 12;
-                       if (m[3].toLowerCase().charAt(0) == 'p') {
-                               h += 12;
-                       }
-               }
-               return h * 60 + (m[2] ? parseInt(m[2], 10) : 0);
-       }
-}
+                                                       themeIcon =
+                                                               customButtonProps ?
+                                                                       customButtonProps.themeIcon :
+                                                                       options.themeButtonIcons[buttonName];
 
+                                                       normalIcon =
+                                                               customButtonProps ?
+                                                                       customButtonProps.icon :
+                                                                       options.buttonIcons[buttonName];
 
+                                                       if (overrideText) {
+                                                               innerHtml = htmlEscape(overrideText);
+                                                       }
+                                                       else if (themeIcon && options.theme) {
+                                                               innerHtml = "<span class='ui-icon ui-icon-" + themeIcon + "'></span>";
+                                                       }
+                                                       else if (normalIcon && !options.theme) {
+                                                               innerHtml = "<span class='fc-icon fc-icon-" + normalIcon + "'></span>";
+                                                       }
+                                                       else {
+                                                               innerHtml = htmlEscape(defaultText);
+                                                       }
 
-/* Date Formatting
------------------------------------------------------------------------------*/
-// TODO: use same function formatDate(date, [date2], format, [options])
+                                                       classes = [
+                                                               'fc-' + buttonName + '-button',
+                                                               tm + '-button',
+                                                               tm + '-state-default'
+                                                       ];
 
+                                                       button = $( // type="button" so that it doesn't submit a form
+                                                               '<button type="button" class="' + classes.join(' ') + '">' +
+                                                                       innerHtml +
+                                                               '</button>'
+                                                               )
+                                                               .click(function(ev) {
+                                                                       // don't process clicks for disabled buttons
+                                                                       if (!button.hasClass(tm + '-state-disabled')) {
 
-function formatDate(date, format, options) {
-       return formatDates(date, null, format, options);
-}
+                                                                               buttonClick(ev);
 
+                                                                               // after the click action, if the button becomes the "active" tab, or disabled,
+                                                                               // it should never have a hover class, so remove it now.
+                                                                               if (
+                                                                                       button.hasClass(tm + '-state-active') ||
+                                                                                       button.hasClass(tm + '-state-disabled')
+                                                                               ) {
+                                                                                       button.removeClass(tm + '-state-hover');
+                                                                               }
+                                                                       }
+                                                               })
+                                                               .mousedown(function() {
+                                                                       // the *down* effect (mouse pressed in).
+                                                                       // only on buttons that are not the "active" tab, or disabled
+                                                                       button
+                                                                               .not('.' + tm + '-state-active')
+                                                                               .not('.' + tm + '-state-disabled')
+                                                                               .addClass(tm + '-state-down');
+                                                               })
+                                                               .mouseup(function() {
+                                                                       // undo the *down* effect
+                                                                       button.removeClass(tm + '-state-down');
+                                                               })
+                                                               .hover(
+                                                                       function() {
+                                                                               // the *hover* effect.
+                                                                               // only on buttons that are not the "active" tab, or disabled
+                                                                               button
+                                                                                       .not('.' + tm + '-state-active')
+                                                                                       .not('.' + tm + '-state-disabled')
+                                                                                       .addClass(tm + '-state-hover');
+                                                                       },
+                                                                       function() {
+                                                                               // undo the *hover* effect
+                                                                               button
+                                                                                       .removeClass(tm + '-state-hover')
+                                                                                       .removeClass(tm + '-state-down'); // if mouseleave happens before mouseup
+                                                                       }
+                                                               );
 
-function formatDates(date1, date2, format, options) {
-       options = options || defaults;
-       var date = date1,
-               otherDate = date2,
-               i, len = format.length, c,
-               i2, formatter,
-               res = '';
-       for (i=0; i<len; i++) {
-               c = format.charAt(i);
-               if (c == "'") {
-                       for (i2=i+1; i2<len; i2++) {
-                               if (format.charAt(i2) == "'") {
-                                       if (date) {
-                                               if (i2 == i+1) {
-                                                       res += "'";
-                                               }else{
-                                                       res += format.substring(i+1, i2);
+                                                       groupChildren = groupChildren.add(button);
                                                }
-                                               i = i2;
                                        }
-                                       break;
+                               });
+
+                               if (isOnlyButtons) {
+                                       groupChildren
+                                               .first().addClass(tm + '-corner-left').end()
+                                               .last().addClass(tm + '-corner-right').end();
                                }
-                       }
-               }
-               else if (c == '(') {
-                       for (i2=i+1; i2<len; i2++) {
-                               if (format.charAt(i2) == ')') {
-                                       var subres = formatDate(date, format.substring(i+1, i2), options);
-                                       if (parseInt(subres.replace(/\D/, ''), 10)) {
-                                               res += subres;
+
+                               if (groupChildren.length > 1) {
+                                       groupEl = $('<div/>');
+                                       if (isOnlyButtons) {
+                                               groupEl.addClass('fc-button-group');
                                        }
-                                       i = i2;
-                                       break;
+                                       groupEl.append(groupChildren);
+                                       sectionEl.append(groupEl);
                                }
-                       }
-               }
-               else if (c == '[') {
-                       for (i2=i+1; i2<len; i2++) {
-                               if (format.charAt(i2) == ']') {
-                                       var subformat = format.substring(i+1, i2);
-                                       var subres = formatDate(date, subformat, options);
-                                       if (subres != formatDate(otherDate, subformat, options)) {
-                                               res += subres;
-                                       }
-                                       i = i2;
-                                       break;
+                               else {
+                                       sectionEl.append(groupChildren); // 1 or 0 children
                                }
-                       }
+                       });
                }
-               else if (c == '{') {
-                       date = date2;
-                       otherDate = date1;
+
+               return sectionEl;
+       }
+       
+       
+       function updateTitle(text) {
+               if (el) {
+                       el.find('h2').text(text);
                }
-               else if (c == '}') {
-                       date = date1;
-                       otherDate = date2;
+       }
+       
+       
+       function activateButton(buttonName) {
+               if (el) {
+                       el.find('.fc-' + buttonName + '-button')
+                               .addClass(tm + '-state-active');
                }
-               else {
-                       for (i2=len; i2>i; i2--) {
-                               if (formatter = dateFormatters[format.substring(i, i2)]) {
-                                       if (date) {
-                                               res += formatter(date, options);
-                                       }
-                                       i = i2 - 1;
-                                       break;
-                               }
-                       }
-                       if (i2 == i) {
-                               if (date) {
-                                       res += c;
-                               }
-                       }
+       }
+       
+       
+       function deactivateButton(buttonName) {
+               if (el) {
+                       el.find('.fc-' + buttonName + '-button')
+                               .removeClass(tm + '-state-active');
                }
        }
-       return res;
-};
-
-
-var dateFormatters = {
-       s       : function(d)   { return d.getSeconds() },
-       ss      : function(d)   { return zeroPad(d.getSeconds()) },
-       m       : function(d)   { return d.getMinutes() },
-       mm      : function(d)   { return zeroPad(d.getMinutes()) },
-       h       : function(d)   { return d.getHours() % 12 || 12 },
-       hh      : function(d)   { return zeroPad(d.getHours() % 12 || 12) },
-       H       : function(d)   { return d.getHours() },
-       HH      : function(d)   { return zeroPad(d.getHours()) },
-       d       : function(d)   { return d.getDate() },
-       dd      : function(d)   { return zeroPad(d.getDate()) },
-       ddd     : function(d,o) { return o.dayNamesShort[d.getDay()] },
-       dddd: function(d,o)     { return o.dayNames[d.getDay()] },
-       M       : function(d)   { return d.getMonth() + 1 },
-       MM      : function(d)   { return zeroPad(d.getMonth() + 1) },
-       MMM     : function(d,o) { return o.monthNamesShort[d.getMonth()] },
-       MMMM: function(d,o)     { return o.monthNames[d.getMonth()] },
-       yy      : function(d)   { return (d.getFullYear()+'').substring(2) },
-       yyyy: function(d)       { return d.getFullYear() },
-       t       : function(d)   { return d.getHours() < 12 ? 'a' : 'p' },
-       tt      : function(d)   { return d.getHours() < 12 ? 'am' : 'pm' },
-       T       : function(d)   { return d.getHours() < 12 ? 'A' : 'P' },
-       TT      : function(d)   { return d.getHours() < 12 ? 'AM' : 'PM' },
-       u       : function(d)   { return formatDate(d, "yyyy-MM-dd'T'HH:mm:ss'Z'") },
-       S       : function(d)   {
-               var date = d.getDate();
-               if (date > 10 && date < 20) {
-                       return 'th';
-               }
-               return ['st', 'nd', 'rd'][date%10-1] || 'th';
-       },
-       w   : function(d, o) { // local
-               return o.weekNumberCalculation(d);
-       },
-       W   : function(d) { // ISO
-               return iso8601Week(d);
+       
+       
+       function disableButton(buttonName) {
+               if (el) {
+                       el.find('.fc-' + buttonName + '-button')
+                               .prop('disabled', true)
+                               .addClass(tm + '-state-disabled');
+               }
+       }
+       
+       
+       function enableButton(buttonName) {
+               if (el) {
+                       el.find('.fc-' + buttonName + '-button')
+                               .prop('disabled', false)
+                               .removeClass(tm + '-state-disabled');
+               }
        }
-};
-fc.dateFormatters = dateFormatters;
-
 
-/* thanks jQuery UI (https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js)
- * 
- * Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
- * `date` - the date to get the week for
- * `number` - the number of the week within the year that contains this date
- */
-function iso8601Week(date) {
-       var time;
-       var checkDate = new Date(date.getTime());
 
-       // Find Thursday of this week starting on Monday
-       checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
+       function getViewsWithButtons() {
+               return viewsWithButtons;
+       }
 
-       time = checkDate.getTime();
-       checkDate.setMonth(0); // Compare with Jan 1
-       checkDate.setDate(1);
-       return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
 }
 
-
 ;;
 
-fc.applyAll = applyAll;
+FC.sourceNormalizers = [];
+FC.sourceFetchers = [];
 
+var ajaxDefaults = {
+       dataType: 'json',
+       cache: false
+};
 
-/* Event Date Math
------------------------------------------------------------------------------*/
-
-
-function exclEndDay(event) {
-       if (event.end) {
-               return _exclEndDay(event.end, event.allDay);
-       }else{
-               return addDays(cloneDate(event.start), 1);
-       }
-}
-
-
-function _exclEndDay(end, allDay) {
-       end = cloneDate(end);
-       return allDay || end.getHours() || end.getMinutes() ? addDays(end, 1) : clearTime(end);
-       // why don't we check for seconds/ms too?
-}
-
+var eventGUID = 1;
 
 
-/* Event Element Binding
------------------------------------------------------------------------------*/
+function EventManager() { // assumed to be a calendar
+       var t = this;
+       
+       
+       // exports
+       t.isFetchNeeded = isFetchNeeded;
+       t.fetchEvents = fetchEvents;
+       t.fetchEventSources = fetchEventSources;
+       t.getEventSources = getEventSources;
+       t.getEventSourceById = getEventSourceById;
+       t.getEventSourcesByMatchArray = getEventSourcesByMatchArray;
+       t.getEventSourcesByMatch = getEventSourcesByMatch;
+       t.addEventSource = addEventSource;
+       t.removeEventSource = removeEventSource;
+       t.removeEventSources = removeEventSources;
+       t.updateEvent = updateEvent;
+       t.renderEvent = renderEvent;
+       t.removeEvents = removeEvents;
+       t.clientEvents = clientEvents;
+       t.mutateEvent = mutateEvent;
+       t.normalizeEventDates = normalizeEventDates;
+       t.normalizeEventTimes = normalizeEventTimes;
+       
+       
+       // imports
+       var reportEvents = t.reportEvents;
+       
+       
+       // locals
+       var stickySource = { events: [] };
+       var sources = [ stickySource ];
+       var rangeStart, rangeEnd;
+       var pendingSourceCnt = 0; // outstanding fetch requests, max one per source
+       var cache = []; // holds events that have already been expanded
 
 
-function lazySegBind(container, segs, bindHandlers) {
-       container.unbind('mouseover').mouseover(function(ev) {
-               var parent=ev.target, e,
-                       i, seg;
-               while (parent != this) {
-                       e = parent;
-                       parent = parent.parentNode;
-               }
-               if ((i = e._fci) !== undefined) {
-                       e._fci = undefined;
-                       seg = segs[i];
-                       bindHandlers(seg.event, seg.element, seg);
-                       $(ev.target).trigger(ev);
+       $.each(
+               (t.options.events ? [ t.options.events ] : []).concat(t.options.eventSources || []),
+               function(i, sourceInput) {
+                       var source = buildEventSource(sourceInput);
+                       if (source) {
+                               sources.push(source);
+                       }
                }
-               ev.stopPropagation();
-       });
-}
-
-
-
-/* Element Dimensions
------------------------------------------------------------------------------*/
+       );
+       
+       
+       
+       /* Fetching
+       -----------------------------------------------------------------------------*/
 
 
-function setOuterWidth(element, width, includeMargins) {
-       for (var i=0, e; i<element.length; i++) {
-               e = $(element[i]);
-               e.width(Math.max(0, width - hsides(e, includeMargins)));
+       // start and end are assumed to be unzoned
+       function isFetchNeeded(start, end) {
+               return !rangeStart || // nothing has been fetched yet?
+                       start < rangeStart || end > rangeEnd; // is part of the new range outside of the old range?
        }
-}
-
-
-function setOuterHeight(element, height, includeMargins) {
-       for (var i=0, e; i<element.length; i++) {
-               e = $(element[i]);
-               e.height(Math.max(0, height - vsides(e, includeMargins)));
+       
+       
+       function fetchEvents(start, end) {
+               rangeStart = start;
+               rangeEnd = end;
+               fetchEventSources(sources, 'reset');
        }
-}
-
-
-function hsides(element, includeMargins) {
-       return hpadding(element) + hborders(element) + (includeMargins ? hmargins(element) : 0);
-}
 
 
-function hpadding(element) {
-       return (parseFloat($.css(element[0], 'paddingLeft', true)) || 0) +
-              (parseFloat($.css(element[0], 'paddingRight', true)) || 0);
-}
+       // expects an array of event source objects (the originals, not copies)
+       // `specialFetchType` is an optimization parameter that affects purging of the event cache.
+       function fetchEventSources(specificSources, specialFetchType) {
+               var i, source;
 
+               if (specialFetchType === 'reset') {
+                       cache = [];
+               }
+               else if (specialFetchType !== 'add') {
+                       cache = excludeEventsBySources(cache, specificSources);
+               }
 
-function hmargins(element) {
-       return (parseFloat($.css(element[0], 'marginLeft', true)) || 0) +
-              (parseFloat($.css(element[0], 'marginRight', true)) || 0);
-}
+               for (i = 0; i < specificSources.length; i++) {
+                       source = specificSources[i];
 
+                       // already-pending sources have already been accounted for in pendingSourceCnt
+                       if (source._status !== 'pending') {
+                               pendingSourceCnt++;
+                       }
 
-function hborders(element) {
-       return (parseFloat($.css(element[0], 'borderLeftWidth', true)) || 0) +
-              (parseFloat($.css(element[0], 'borderRightWidth', true)) || 0);
-}
+                       source._fetchId = (source._fetchId || 0) + 1;
+                       source._status = 'pending';
+               }
 
+               for (i = 0; i < specificSources.length; i++) {
+                       source = specificSources[i];
 
-function vsides(element, includeMargins) {
-       return vpadding(element) +  vborders(element) + (includeMargins ? vmargins(element) : 0);
-}
+                       tryFetchEventSource(source, source._fetchId);
+               }
+       }
 
 
-function vpadding(element) {
-       return (parseFloat($.css(element[0], 'paddingTop', true)) || 0) +
-              (parseFloat($.css(element[0], 'paddingBottom', true)) || 0);
-}
+       // fetches an event source and processes its result ONLY if it is still the current fetch.
+       // caller is responsible for incrementing pendingSourceCnt first.
+       function tryFetchEventSource(source, fetchId) {
+               _fetchEventSource(source, function(eventInputs) {
+                       var isArraySource = $.isArray(source.events);
+                       var i, eventInput;
+                       var abstractEvent;
 
+                       if (
+                               // is this the source's most recent fetch?
+                               // if not, rely on an upcoming fetch of this source to decrement pendingSourceCnt
+                               fetchId === source._fetchId &&
+                               // event source no longer valid?
+                               source._status !== 'rejected'
+                       ) {
+                               source._status = 'resolved';
 
-function vmargins(element) {
-       return (parseFloat($.css(element[0], 'marginTop', true)) || 0) +
-              (parseFloat($.css(element[0], 'marginBottom', true)) || 0);
-}
+                               if (eventInputs) {
+                                       for (i = 0; i < eventInputs.length; i++) {
+                                               eventInput = eventInputs[i];
 
+                                               if (isArraySource) { // array sources have already been convert to Event Objects
+                                                       abstractEvent = eventInput;
+                                               }
+                                               else {
+                                                       abstractEvent = buildEventFromInput(eventInput, source);
+                                               }
 
-function vborders(element) {
-       return (parseFloat($.css(element[0], 'borderTopWidth', true)) || 0) +
-              (parseFloat($.css(element[0], 'borderBottomWidth', true)) || 0);
-}
+                                               if (abstractEvent) { // not false (an invalid event)
+                                                       cache.push.apply(
+                                                               cache,
+                                                               expandEvent(abstractEvent) // add individual expanded events to the cache
+                                                       );
+                                               }
+                                       }
+                               }
 
+                               decrementPendingSourceCnt();
+                       }
+               });
+       }
 
 
-/* Misc Utils
------------------------------------------------------------------------------*/
+       function rejectEventSource(source) {
+               var wasPending = source._status === 'pending';
 
+               source._status = 'rejected';
 
-//TODO: arraySlice
-//TODO: isFunction, grep ?
+               if (wasPending) {
+                       decrementPendingSourceCnt();
+               }
+       }
 
 
-function noop() { }
+       function decrementPendingSourceCnt() {
+               pendingSourceCnt--;
+               if (!pendingSourceCnt) {
+                       reportEvents(cache);
+               }
+       }
+       
+       
+       function _fetchEventSource(source, callback) {
+               var i;
+               var fetchers = FC.sourceFetchers;
+               var res;
 
+               for (i=0; i<fetchers.length; i++) {
+                       res = fetchers[i].call(
+                               t, // this, the Calendar object
+                               source,
+                               rangeStart.clone(),
+                               rangeEnd.clone(),
+                               t.options.timezone,
+                               callback
+                       );
 
-function dateCompare(a, b) {
-       return a - b;
-}
+                       if (res === true) {
+                               // the fetcher is in charge. made its own async request
+                               return;
+                       }
+                       else if (typeof res == 'object') {
+                               // the fetcher returned a new source. process it
+                               _fetchEventSource(res, callback);
+                               return;
+                       }
+               }
 
+               var events = source.events;
+               if (events) {
+                       if ($.isFunction(events)) {
+                               t.pushLoading();
+                               events.call(
+                                       t, // this, the Calendar object
+                                       rangeStart.clone(),
+                                       rangeEnd.clone(),
+                                       t.options.timezone,
+                                       function(events) {
+                                               callback(events);
+                                               t.popLoading();
+                                       }
+                               );
+                       }
+                       else if ($.isArray(events)) {
+                               callback(events);
+                       }
+                       else {
+                               callback();
+                       }
+               }else{
+                       var url = source.url;
+                       if (url) {
+                               var success = source.success;
+                               var error = source.error;
+                               var complete = source.complete;
 
-function arrayMax(a) {
-       return Math.max.apply(Math, a);
-}
+                               // retrieve any outbound GET/POST $.ajax data from the options
+                               var customData;
+                               if ($.isFunction(source.data)) {
+                                       // supplied as a function that returns a key/value object
+                                       customData = source.data();
+                               }
+                               else {
+                                       // supplied as a straight key/value object
+                                       customData = source.data;
+                               }
 
+                               // use a copy of the custom data so we can modify the parameters
+                               // and not affect the passed-in object.
+                               var data = $.extend({}, customData || {});
 
-function zeroPad(n) {
-       return (n < 10 ? '0' : '') + n;
-}
+                               var startParam = firstDefined(source.startParam, t.options.startParam);
+                               var endParam = firstDefined(source.endParam, t.options.endParam);
+                               var timezoneParam = firstDefined(source.timezoneParam, t.options.timezoneParam);
 
+                               if (startParam) {
+                                       data[startParam] = rangeStart.format();
+                               }
+                               if (endParam) {
+                                       data[endParam] = rangeEnd.format();
+                               }
+                               if (t.options.timezone && t.options.timezone != 'local') {
+                                       data[timezoneParam] = t.options.timezone;
+                               }
 
-function smartProperty(obj, name) { // get a camel-cased/namespaced property of an object
-       if (obj[name] !== undefined) {
-               return obj[name];
-       }
-       var parts = name.split(/(?=[A-Z])/),
-               i=parts.length-1, res;
-       for (; i>=0; i--) {
-               res = obj[parts[i].toLowerCase()];
-               if (res !== undefined) {
-                       return res;
+                               t.pushLoading();
+                               $.ajax($.extend({}, ajaxDefaults, source, {
+                                       data: data,
+                                       success: function(events) {
+                                               events = events || [];
+                                               var res = applyAll(success, this, arguments);
+                                               if ($.isArray(res)) {
+                                                       events = res;
+                                               }
+                                               callback(events);
+                                       },
+                                       error: function() {
+                                               applyAll(error, this, arguments);
+                                               callback();
+                                       },
+                                       complete: function() {
+                                               applyAll(complete, this, arguments);
+                                               t.popLoading();
+                                       }
+                               }));
+                       }else{
+                               callback();
+                       }
                }
        }
-       return obj[''];
-}
-
-
-function htmlEscape(s) {
-       return s.replace(/&/g, '&amp;')
-               .replace(/</g, '&lt;')
-               .replace(/>/g, '&gt;')
-               .replace(/'/g, '&#039;')
-               .replace(/"/g, '&quot;')
-               .replace(/\n/g, '<br />');
-}
+       
+       
+       
+       /* Sources
+       -----------------------------------------------------------------------------*/
 
 
-function disableTextSelection(element) {
-       element
-               .attr('unselectable', 'on')
-               .css('MozUserSelect', 'none')
-               .bind('selectstart.ui', function() { return false; });
-}
+       function addEventSource(sourceInput) {
+               var source = buildEventSource(sourceInput);
+               if (source) {
+                       sources.push(source);
+                       fetchEventSources([ source ], 'add'); // will eventually call reportEvents
+               }
+       }
 
 
-/*
-function enableTextSelection(element) {
-       element
-               .attr('unselectable', 'off')
-               .css('MozUserSelect', '')
-               .unbind('selectstart.ui');
-}
-*/
+       function buildEventSource(sourceInput) { // will return undefined if invalid source
+               var normalizers = FC.sourceNormalizers;
+               var source;
+               var i;
 
+               if ($.isFunction(sourceInput) || $.isArray(sourceInput)) {
+                       source = { events: sourceInput };
+               }
+               else if (typeof sourceInput === 'string') {
+                       source = { url: sourceInput };
+               }
+               else if (typeof sourceInput === 'object') {
+                       source = $.extend({}, sourceInput); // shallow copy
+               }
 
-function markFirstLast(e) {
-       e.children()
-               .removeClass('fc-first fc-last')
-               .filter(':first-child')
-                       .addClass('fc-first')
-               .end()
-               .filter(':last-child')
-                       .addClass('fc-last');
-}
+               if (source) {
 
+                       // TODO: repeat code, same code for event classNames
+                       if (source.className) {
+                               if (typeof source.className === 'string') {
+                                       source.className = source.className.split(/\s+/);
+                               }
+                               // otherwise, assumed to be an array
+                       }
+                       else {
+                               source.className = [];
+                       }
 
-function setDayID(cell, date) {
-       cell.each(function(i, _cell) {
-               _cell.className = _cell.className.replace(/^fc-\w*/, 'fc-' + dayIDs[date.getDay()]);
-               // TODO: make a way that doesn't rely on order of classes
-       });
-}
+                       // for array sources, we convert to standard Event Objects up front
+                       if ($.isArray(source.events)) {
+                               source.origArray = source.events; // for removeEventSource
+                               source.events = $.map(source.events, function(eventInput) {
+                                       return buildEventFromInput(eventInput, source);
+                               });
+                       }
 
+                       for (i=0; i<normalizers.length; i++) {
+                               normalizers[i].call(t, source);
+                       }
 
-function getSkinCss(event, opt) {
-       var source = event.source || {};
-       var eventColor = event.color;
-       var sourceColor = source.color;
-       var optionColor = opt('eventColor');
-       var backgroundColor =
-               event.backgroundColor ||
-               eventColor ||
-               source.backgroundColor ||
-               sourceColor ||
-               opt('eventBackgroundColor') ||
-               optionColor;
-       var borderColor =
-               event.borderColor ||
-               eventColor ||
-               source.borderColor ||
-               sourceColor ||
-               opt('eventBorderColor') ||
-               optionColor;
-       var textColor =
-               event.textColor ||
-               source.textColor ||
-               opt('eventTextColor');
-       var statements = [];
-       if (backgroundColor) {
-               statements.push('background-color:' + backgroundColor);
-       }
-       if (borderColor) {
-               statements.push('border-color:' + borderColor);
-       }
-       if (textColor) {
-               statements.push('color:' + textColor);
+                       return source;
+               }
        }
-       return statements.join(';');
-}
 
 
-function applyAll(functions, thisObj, args) {
-       if ($.isFunction(functions)) {
-               functions = [ functions ];
-       }
-       if (functions) {
-               var i;
-               var ret;
-               for (i=0; i<functions.length; i++) {
-                       ret = functions[i].apply(thisObj, args) || ret;
-               }
-               return ret;
+       function removeEventSource(matchInput) {
+               removeSpecificEventSources(
+                       getEventSourcesByMatch(matchInput)
+               );
        }
-}
 
 
-function firstDefined() {
-       for (var i=0; i<arguments.length; i++) {
-               if (arguments[i] !== undefined) {
-                       return arguments[i];
+       // if called with no arguments, removes all.
+       function removeEventSources(matchInputs) {
+               if (matchInputs == null) {
+                       removeSpecificEventSources(sources, true); // isAll=true
+               }
+               else {
+                       removeSpecificEventSources(
+                               getEventSourcesByMatchArray(matchInputs)
+                       );
                }
        }
-}
 
 
-;;
+       function removeSpecificEventSources(targetSources, isAll) {
+               var i;
 
-fcViews.month = MonthView;
+               // cancel pending requests
+               for (i = 0; i < targetSources.length; i++) {
+                       rejectEventSource(targetSources[i]);
+               }
 
-function MonthView(element, calendar) {
-       var t = this;
-       
-       
-       // exports
-       t.render = render;
-       
-       
-       // imports
-       BasicView.call(t, element, calendar, 'month');
-       var opt = t.opt;
-       var renderBasic = t.renderBasic;
-       var skipHiddenDays = t.skipHiddenDays;
-       var getCellsPerWeek = t.getCellsPerWeek;
-       var formatDate = calendar.formatDate;
-       
-       
-       function render(date, delta) {
+               if (isAll) { // an optimization
+                       sources = [];
+                       cache = [];
+               }
+               else {
+                       // remove from persisted source list
+                       sources = $.grep(sources, function(source) {
+                               for (i = 0; i < targetSources.length; i++) {
+                                       if (source === targetSources[i]) {
+                                               return false; // exclude
+                                       }
+                               }
+                               return true; // include
+                       });
 
-               if (delta) {
-                       addMonths(date, delta);
-                       date.setDate(1);
+                       cache = excludeEventsBySources(cache, targetSources);
                }
 
-               var firstDay = opt('firstDay');
+               reportEvents(cache);
+       }
 
-               var start = cloneDate(date, true);
-               start.setDate(1);
 
-               var end = addMonths(cloneDate(start), 1);
+       function getEventSources() {
+               return sources.slice(1); // returns a shallow copy of sources with stickySource removed
+       }
+
 
-               var visStart = cloneDate(start);
-               addDays(visStart, -((visStart.getDay() - firstDay + 7) % 7));
-               skipHiddenDays(visStart);
+       function getEventSourceById(id) {
+               return $.grep(sources, function(source) {
+                       return source.id && source.id === id;
+               })[0];
+       }
 
-               var visEnd = cloneDate(end);
-               addDays(visEnd, (7 - visEnd.getDay() + firstDay) % 7);
-               skipHiddenDays(visEnd, -1, true);
 
-               var colCnt = getCellsPerWeek();
-               var rowCnt = Math.round(dayDiff(visEnd, visStart) / 7); // should be no need for Math.round
+       // like getEventSourcesByMatch, but accepts multple match criteria (like multiple IDs)
+       function getEventSourcesByMatchArray(matchInputs) {
 
-               if (opt('weekMode') == 'fixed') {
-                       addDays(visEnd, (6 - rowCnt) * 7); // add weeks to make up for it
-                       rowCnt = 6;
+               // coerce into an array
+               if (!matchInputs) {
+                       matchInputs = [];
+               }
+               else if (!$.isArray(matchInputs)) {
+                       matchInputs = [ matchInputs ];
                }
 
-               t.title = formatDate(start, opt('titleFormat'));
+               var matchingSources = [];
+               var i;
 
-               t.start = start;
-               t.end = end;
-               t.visStart = visStart;
-               t.visEnd = visEnd;
+               // resolve raw inputs to real event source objects
+               for (i = 0; i < matchInputs.length; i++) {
+                       matchingSources.push.apply( // append
+                               matchingSources,
+                               getEventSourcesByMatch(matchInputs[i])
+                       );
+               }
 
-               renderBasic(rowCnt, colCnt, true);
+               return matchingSources;
        }
-       
-       
-}
 
-;;
-
-fcViews.basicWeek = BasicWeekView;
 
-function BasicWeekView(element, calendar) {
-       var t = this;
-       
-       
-       // exports
-       t.render = render;
-       
-       
-       // imports
-       BasicView.call(t, element, calendar, 'basicWeek');
-       var opt = t.opt;
-       var renderBasic = t.renderBasic;
-       var skipHiddenDays = t.skipHiddenDays;
-       var getCellsPerWeek = t.getCellsPerWeek;
-       var formatDates = calendar.formatDates;
-       
-       
-       function render(date, delta) {
+       // matchInput can either by a real event source object, an ID, or the function/URL for the source.
+       // returns an array of matching source objects.
+       function getEventSourcesByMatch(matchInput) {
+               var i, source;
 
-               if (delta) {
-                       addDays(date, delta * 7);
+               // given an proper event source object
+               for (i = 0; i < sources.length; i++) {
+                       source = sources[i];
+                       if (source === matchInput) {
+                               return [ source ];
+                       }
                }
 
-               var start = addDays(cloneDate(date), -((date.getDay() - opt('firstDay') + 7) % 7));
-               var end = addDays(cloneDate(start), 7);
-
-               var visStart = cloneDate(start);
-               skipHiddenDays(visStart);
+               // an ID match
+               source = getEventSourceById(matchInput);
+               if (source) {
+                       return [ source ];
+               }
 
-               var visEnd = cloneDate(end);
-               skipHiddenDays(visEnd, -1, true);
+               return $.grep(sources, function(source) {
+                       return isSourcesEquivalent(matchInput, source);
+               });
+       }
 
-               var colCnt = getCellsPerWeek();
 
-               t.start = start;
-               t.end = end;
-               t.visStart = visStart;
-               t.visEnd = visEnd;
+       function isSourcesEquivalent(source1, source2) {
+               return source1 && source2 && getSourcePrimitive(source1) == getSourcePrimitive(source2);
+       }
 
-               t.title = formatDates(
-                       visStart,
-                       addDays(cloneDate(visEnd), -1),
-                       opt('titleFormat')
-               );
 
-               renderBasic(1, colCnt, false);
+       function getSourcePrimitive(source) {
+               return (
+                       (typeof source === 'object') ? // a normalized event source?
+                               (source.origArray || source.googleCalendarId || source.url || source.events) : // get the primitive
+                               null
+               ) ||
+               source; // the given argument *is* the primitive
+       }
+
+
+       // util
+       // returns a filtered array without events that are part of any of the given sources
+       function excludeEventsBySources(specificEvents, specificSources) {
+               return $.grep(specificEvents, function(event) {
+                       for (var i = 0; i < specificSources.length; i++) {
+                               if (event.source === specificSources[i]) {
+                                       return false; // exclude
+                               }
+                       }
+                       return true; // keep
+               });
        }
        
        
-}
+       
+       /* Manipulation
+       -----------------------------------------------------------------------------*/
 
-;;
 
-fcViews.basicDay = BasicDayView;
+       // Only ever called from the externally-facing API
+       function updateEvent(event) {
 
+               // massage start/end values, even if date string values
+               event.start = t.moment(event.start);
+               if (event.end) {
+                       event.end = t.moment(event.end);
+               }
+               else {
+                       event.end = null;
+               }
 
-function BasicDayView(element, calendar) {
-       var t = this;
-       
-       
-       // exports
-       t.render = render;
-       
-       
-       // imports
-       BasicView.call(t, element, calendar, 'basicDay');
-       var opt = t.opt;
-       var renderBasic = t.renderBasic;
-       var skipHiddenDays = t.skipHiddenDays;
-       var formatDate = calendar.formatDate;
-       
-       
-       function render(date, delta) {
+               mutateEvent(event, getMiscEventProps(event)); // will handle start/end/allDay normalization
+               reportEvents(cache); // reports event modifications (so we can redraw)
+       }
 
-               if (delta) {
-                       addDays(date, delta);
-               }
-               skipHiddenDays(date, delta < 0 ? -1 : 1);
 
-               var start = cloneDate(date, true);
-               var end = addDays(cloneDate(start), 1);
+       // Returns a hash of misc event properties that should be copied over to related events.
+       function getMiscEventProps(event) {
+               var props = {};
 
-               t.title = formatDate(date, opt('titleFormat'));
+               $.each(event, function(name, val) {
+                       if (isMiscEventPropName(name)) {
+                               if (val !== undefined && isAtomic(val)) { // a defined non-object
+                                       props[name] = val;
+                               }
+                       }
+               });
 
-               t.start = t.visStart = start;
-               t.end = t.visEnd = end;
+               return props;
+       }
 
-               renderBasic(1, 1, false);
+       // non-date-related, non-id-related, non-secret
+       function isMiscEventPropName(name) {
+               return !/^_|^(id|allDay|start|end)$/.test(name);
        }
+
        
-       
-}
+       // returns the expanded events that were created
+       function renderEvent(eventInput, stick) {
+               var abstractEvent = buildEventFromInput(eventInput);
+               var events;
+               var i, event;
 
-;;
+               if (abstractEvent) { // not false (a valid input)
+                       events = expandEvent(abstractEvent);
 
-setDefaults({
-       weekMode: 'fixed'
-});
+                       for (i = 0; i < events.length; i++) {
+                               event = events[i];
 
+                               if (!event.source) {
+                                       if (stick) {
+                                               stickySource.events.push(event);
+                                               event.source = stickySource;
+                                       }
+                                       cache.push(event);
+                               }
+                       }
 
-function BasicView(element, calendar, viewName) {
-       var t = this;
-       
-       
-       // exports
-       t.renderBasic = renderBasic;
-       t.setHeight = setHeight;
-       t.setWidth = setWidth;
-       t.renderDayOverlay = renderDayOverlay;
-       t.defaultSelectionEnd = defaultSelectionEnd;
-       t.renderSelection = renderSelection;
-       t.clearSelection = clearSelection;
-       t.reportDayClick = reportDayClick; // for selection (kinda hacky)
-       t.dragStart = dragStart;
-       t.dragStop = dragStop;
-       t.defaultEventEnd = defaultEventEnd;
-       t.getHoverListener = function() { return hoverListener };
-       t.colLeft = colLeft;
-       t.colRight = colRight;
-       t.colContentLeft = colContentLeft;
-       t.colContentRight = colContentRight;
-       t.getIsCellAllDay = function() { return true };
-       t.allDayRow = allDayRow;
-       t.getRowCnt = function() { return rowCnt };
-       t.getColCnt = function() { return colCnt };
-       t.getColWidth = function() { return colWidth };
-       t.getDaySegmentContainer = function() { return daySegmentContainer };
-       
-       
-       // imports
-       View.call(t, element, calendar, viewName);
-       OverlayManager.call(t);
-       SelectionManager.call(t);
-       BasicEventRenderer.call(t);
-       var opt = t.opt;
-       var trigger = t.trigger;
-       var renderOverlay = t.renderOverlay;
-       var clearOverlays = t.clearOverlays;
-       var daySelectionMousedown = t.daySelectionMousedown;
-       var cellToDate = t.cellToDate;
-       var dateToCell = t.dateToCell;
-       var rangeToSegments = t.rangeToSegments;
-       var formatDate = calendar.formatDate;
-       
-       
-       // locals
-       
-       var table;
-       var head;
-       var headCells;
-       var body;
-       var bodyRows;
-       var bodyCells;
-       var bodyFirstCells;
-       var firstRowCellInners;
-       var firstRowCellContentInners;
-       var daySegmentContainer;
-       
-       var viewWidth;
-       var viewHeight;
-       var colWidth;
-       var weekNumberWidth;
-       
-       var rowCnt, colCnt;
-       var showNumbers;
-       var coordinateGrid;
-       var hoverListener;
-       var colPositions;
-       var colContentPositions;
-       
-       var tm;
-       var colFormat;
-       var showWeekNumbers;
-       var weekNumberTitle;
-       var weekNumberFormat;
-       
-       
-       
-       /* Rendering
-       ------------------------------------------------------------*/
-       
-       
-       disableTextSelection(element.addClass('fc-grid'));
-       
-       
-       function renderBasic(_rowCnt, _colCnt, _showNumbers) {
-               rowCnt = _rowCnt;
-               colCnt = _colCnt;
-               showNumbers = _showNumbers;
-               updateOptions();
+                       reportEvents(cache);
 
-               if (!body) {
-                       buildEventContainer();
+                       return events;
                }
 
-               buildTable();
+               return [];
        }
        
        
-       function updateOptions() {
-               tm = opt('theme') ? 'ui' : 'fc';
-               colFormat = opt('columnFormat');
+       function removeEvents(filter) {
+               var eventID;
+               var i;
 
-               // week # options. (TODO: bad, logic also in other views)
-               showWeekNumbers = opt('weekNumbers');
-               weekNumberTitle = opt('weekNumberTitle');
-               if (opt('weekNumberCalculation') != 'iso') {
-                       weekNumberFormat = "w";
+               if (filter == null) { // null or undefined. remove all events
+                       filter = function() { return true; }; // will always match
                }
-               else {
-                       weekNumberFormat = "W";
+               else if (!$.isFunction(filter)) { // an event ID
+                       eventID = filter + '';
+                       filter = function(event) {
+                               return event._id == eventID;
+                       };
+               }
+
+               // Purge event(s) from our local cache
+               cache = $.grep(cache, filter, true); // inverse=true
+
+               // Remove events from array sources.
+               // This works because they have been converted to official Event Objects up front.
+               // (and as a result, event._id has been calculated).
+               for (i=0; i<sources.length; i++) {
+                       if ($.isArray(sources[i].events)) {
+                               sources[i].events = $.grep(sources[i].events, filter, true);
+                       }
                }
+
+               reportEvents(cache);
        }
+
        
-       
-       function buildEventContainer() {
-               daySegmentContainer =
-                       $("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>")
-                               .appendTo(element);
+       function clientEvents(filter) {
+               if ($.isFunction(filter)) {
+                       return $.grep(cache, filter);
+               }
+               else if (filter != null) { // not null, not undefined. an event ID
+                       filter += '';
+                       return $.grep(cache, function(e) {
+                               return e._id == filter;
+                       });
+               }
+               return cache; // else, return all
        }
-       
-       
-       function buildTable() {
-               var html = buildTableHTML();
 
-               if (table) {
-                       table.remove();
-               }
-               table = $(html).appendTo(element);
 
-               head = table.find('thead');
-               headCells = head.find('.fc-day-header');
-               body = table.find('tbody');
-               bodyRows = body.find('tr');
-               bodyCells = body.find('.fc-day');
-               bodyFirstCells = bodyRows.find('td:first-child');
+       // Makes sure all array event sources have their internal event objects
+       // converted over to the Calendar's current timezone.
+       t.rezoneArrayEventSources = function() {
+               var i;
+               var events;
+               var j;
 
-               firstRowCellInners = bodyRows.eq(0).find('.fc-day > div');
-               firstRowCellContentInners = bodyRows.eq(0).find('.fc-day-content > div');
-               
-               markFirstLast(head.add(head.find('tr'))); // marks first+last tr/th's
-               markFirstLast(bodyRows); // marks first+last td's
-               bodyRows.eq(0).addClass('fc-first');
-               bodyRows.filter(':last').addClass('fc-last');
-
-               bodyCells.each(function(i, _cell) {
-                       var date = cellToDate(
-                               Math.floor(i / colCnt),
-                               i % colCnt
-                       );
-                       trigger('dayRender', t, date, $(_cell));
-               });
+               for (i = 0; i < sources.length; i++) {
+                       events = sources[i].events;
+                       if ($.isArray(events)) {
 
-               dayBind(bodyCells);
-       }
+                               for (j = 0; j < events.length; j++) {
+                                       rezoneEventDates(events[j]);
+                               }
+                       }
+               }
+       };
 
+       function rezoneEventDates(event) {
+               event.start = t.moment(event.start);
+               if (event.end) {
+                       event.end = t.moment(event.end);
+               }
+               backupEventDates(event);
+       }
+       
+       
+       /* Event Normalization
+       -----------------------------------------------------------------------------*/
 
 
-       /* HTML Building
-       -----------------------------------------------------------*/
+       // Given a raw object with key/value properties, returns an "abstract" Event object.
+       // An "abstract" event is an event that, if recurring, will not have been expanded yet.
+       // Will return `false` when input is invalid.
+       // `source` is optional
+       function buildEventFromInput(input, source) {
+               var out = {};
+               var start, end;
+               var allDay;
 
+               if (t.options.eventDataTransform) {
+                       input = t.options.eventDataTransform(input);
+               }
+               if (source && source.eventDataTransform) {
+                       input = source.eventDataTransform(input);
+               }
 
-       function buildTableHTML() {
-               var html =
-                       "<table class='fc-border-separate' style='width:100%' cellspacing='0'>" +
-                       buildHeadHTML() +
-                       buildBodyHTML() +
-                       "</table>";
+               // Copy all properties over to the resulting object.
+               // The special-case properties will be copied over afterwards.
+               $.extend(out, input);
 
-               return html;
-       }
+               if (source) {
+                       out.source = source;
+               }
 
+               out._id = input._id || (input.id === undefined ? '_fc' + eventGUID++ : input.id + '');
 
-       function buildHeadHTML() {
-               var headerClass = tm + "-widget-header";
-               var html = '';
-               var col;
-               var date;
+               if (input.className) {
+                       if (typeof input.className == 'string') {
+                               out.className = input.className.split(/\s+/);
+                       }
+                       else { // assumed to be an array
+                               out.className = input.className;
+                       }
+               }
+               else {
+                       out.className = [];
+               }
 
-               html += "<thead><tr>";
+               start = input.start || input.date; // "date" is an alias for "start"
+               end = input.end;
 
-               if (showWeekNumbers) {
-                       html +=
-                               "<th class='fc-week-number " + headerClass + "'>" +
-                               htmlEscape(weekNumberTitle) +
-                               "</th>";
+               // parse as a time (Duration) if applicable
+               if (isTimeString(start)) {
+                       start = moment.duration(start);
+               }
+               if (isTimeString(end)) {
+                       end = moment.duration(end);
                }
 
-               for (col=0; col<colCnt; col++) {
-                       date = cellToDate(0, col);
-                       html +=
-                               "<th class='fc-day-header fc-" + dayIDs[date.getDay()] + " " + headerClass + "'>" +
-                               htmlEscape(formatDate(date, colFormat)) +
-                               "</th>";
+               if (input.dow || moment.isDuration(start) || moment.isDuration(end)) {
+
+                       // the event is "abstract" (recurring) so don't calculate exact start/end dates just yet
+                       out.start = start ? moment.duration(start) : null; // will be a Duration or null
+                       out.end = end ? moment.duration(end) : null; // will be a Duration or null
+                       out._recurring = true; // our internal marker
                }
+               else {
 
-               html += "</tr></thead>";
+                       if (start) {
+                               start = t.moment(start);
+                               if (!start.isValid()) {
+                                       return false;
+                               }
+                       }
 
-               return html;
-       }
+                       if (end) {
+                               end = t.moment(end);
+                               if (!end.isValid()) {
+                                       end = null; // let defaults take over
+                               }
+                       }
+
+                       allDay = input.allDay;
+                       if (allDay === undefined) { // still undefined? fallback to default
+                               allDay = firstDefined(
+                                       source ? source.allDayDefault : undefined,
+                                       t.options.allDayDefault
+                               );
+                               // still undefined? normalizeEventDates will calculate it
+                       }
 
+                       assignDatesToEvent(start, end, allDay, out);
+               }
 
-       function buildBodyHTML() {
-               var contentClass = tm + "-widget-content";
-               var html = '';
-               var row;
-               var col;
-               var date;
+               t.normalizeEvent(out); // hook for external use. a prototype method
+
+               return out;
+       }
+       t.buildEventFromInput = buildEventFromInput;
 
-               html += "<tbody>";
 
-               for (row=0; row<rowCnt; row++) {
+       // Normalizes and assigns the given dates to the given partially-formed event object.
+       // NOTE: mutates the given start/end moments. does not make a copy.
+       function assignDatesToEvent(start, end, allDay, event) {
+               event.start = start;
+               event.end = end;
+               event.allDay = allDay;
+               normalizeEventDates(event);
+               backupEventDates(event);
+       }
 
-                       html += "<tr class='fc-week'>";
 
-                       if (showWeekNumbers) {
-                               date = cellToDate(row, 0);
-                               html +=
-                                       "<td class='fc-week-number " + contentClass + "'>" +
-                                       "<div>" +
-                                       htmlEscape(formatDate(date, weekNumberFormat)) +
-                                       "</div>" +
-                                       "</td>";
-                       }
+       // Ensures proper values for allDay/start/end. Accepts an Event object, or a plain object with event-ish properties.
+       // NOTE: Will modify the given object.
+       function normalizeEventDates(eventProps) {
 
-                       for (col=0; col<colCnt; col++) {
-                               date = cellToDate(row, col);
-                               html += buildCellHTML(date);
-                       }
+               normalizeEventTimes(eventProps);
 
-                       html += "</tr>";
+               if (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {
+                       eventProps.end = null;
                }
 
-               html += "</tbody>";
-
-               return html;
+               if (!eventProps.end) {
+                       if (t.options.forceEventDuration) {
+                               eventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);
+                       }
+                       else {
+                               eventProps.end = null;
+                       }
+               }
        }
 
 
-       function buildCellHTML(date) {
-               var contentClass = tm + "-widget-content";
-               var month = t.start.getMonth();
-               var today = clearTime(new Date());
-               var html = '';
-               var classNames = [
-                       'fc-day',
-                       'fc-' + dayIDs[date.getDay()],
-                       contentClass
-               ];
-
-               if (date.getMonth() != month) {
-                       classNames.push('fc-other-month');
+       // Ensures the allDay property exists and the timeliness of the start/end dates are consistent
+       function normalizeEventTimes(eventProps) {
+               if (eventProps.allDay == null) {
+                       eventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));
                }
-               if (+date == +today) {
-                       classNames.push(
-                               'fc-today',
-                               tm + '-state-highlight'
-                       );
-               }
-               else if (date < today) {
-                       classNames.push('fc-past');
+
+               if (eventProps.allDay) {
+                       eventProps.start.stripTime();
+                       if (eventProps.end) {
+                               // TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment
+                               eventProps.end.stripTime();
+                       }
                }
                else {
-                       classNames.push('fc-future');
+                       if (!eventProps.start.hasTime()) {
+                               eventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time
+                       }
+                       if (eventProps.end && !eventProps.end.hasTime()) {
+                               eventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time
+                       }
                }
+       }
 
-               html +=
-                       "<td" +
-                       " class='" + classNames.join(' ') + "'" +
-                       " data-date='" + formatDate(date, 'yyyy-MM-dd') + "'" +
-                       ">" +
-                       "<div>";
 
-               if (showNumbers) {
-                       html += "<div class='fc-day-number'>" + date.getDate() + "</div>";
-               }
+       // If the given event is a recurring event, break it down into an array of individual instances.
+       // If not a recurring event, return an array with the single original event.
+       // If given a falsy input (probably because of a failed buildEventFromInput call), returns an empty array.
+       // HACK: can override the recurring window by providing custom rangeStart/rangeEnd (for businessHours).
+       function expandEvent(abstractEvent, _rangeStart, _rangeEnd) {
+               var events = [];
+               var dowHash;
+               var dow;
+               var i;
+               var date;
+               var startTime, endTime;
+               var start, end;
+               var event;
 
-               html +=
-                       "<div class='fc-day-content'>" +
-                       "<div style='position:relative'>&nbsp;</div>" +
-                       "</div>" +
-                       "</div>" +
-                       "</td>";
+               _rangeStart = _rangeStart || rangeStart;
+               _rangeEnd = _rangeEnd || rangeEnd;
 
-               return html;
-       }
+               if (abstractEvent) {
+                       if (abstractEvent._recurring) {
 
+                               // make a boolean hash as to whether the event occurs on each day-of-week
+                               if ((dow = abstractEvent.dow)) {
+                                       dowHash = {};
+                                       for (i = 0; i < dow.length; i++) {
+                                               dowHash[dow[i]] = true;
+                                       }
+                               }
 
+                               // iterate through every day in the current range
+                               date = _rangeStart.clone().stripTime(); // holds the date of the current day
+                               while (date.isBefore(_rangeEnd)) {
 
-       /* Dimensions
-       -----------------------------------------------------------*/
-       
-       
-       function setHeight(height) {
-               viewHeight = height;
-               
-               var bodyHeight = viewHeight - head.height();
-               var rowHeight;
-               var rowHeightLast;
-               var cell;
-                       
-               if (opt('weekMode') == 'variable') {
-                       rowHeight = rowHeightLast = Math.floor(bodyHeight / (rowCnt==1 ? 2 : 6));
-               }else{
-                       rowHeight = Math.floor(bodyHeight / rowCnt);
-                       rowHeightLast = bodyHeight - rowHeight * (rowCnt-1);
-               }
-               
-               bodyFirstCells.each(function(i, _cell) {
-                       if (i < rowCnt) {
-                               cell = $(_cell);
-                               cell.find('> div').css(
-                                       'min-height',
-                                       (i==rowCnt-1 ? rowHeightLast : rowHeight) - vsides(cell)
-                               );
-                       }
-               });
-               
-       }
-       
-       
-       function setWidth(width) {
-               viewWidth = width;
-               colPositions.clear();
-               colContentPositions.clear();
+                                       if (!dowHash || dowHash[date.day()]) { // if everyday, or this particular day-of-week
 
-               weekNumberWidth = 0;
-               if (showWeekNumbers) {
-                       weekNumberWidth = head.find('th.fc-week-number').outerWidth();
-               }
+                                               startTime = abstractEvent.start; // the stored start and end properties are times (Durations)
+                                               endTime = abstractEvent.end; // "
+                                               start = date.clone();
+                                               end = null;
 
-               colWidth = Math.floor((viewWidth - weekNumberWidth) / colCnt);
-               setOuterWidth(headCells.slice(0, -1), colWidth);
-       }
-       
-       
-       
-       /* Day clicking and binding
-       -----------------------------------------------------------*/
-       
-       
-       function dayBind(days) {
-               days.click(dayClick)
-                       .mousedown(daySelectionMousedown);
-       }
-       
-       
-       function dayClick(ev) {
-               if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick
-                       var date = parseISO8601($(this).data('date'));
-                       trigger('dayClick', this, date, true, ev);
+                                               if (startTime) {
+                                                       start = start.time(startTime);
+                                               }
+                                               if (endTime) {
+                                                       end = date.clone().time(endTime);
+                                               }
+
+                                               event = $.extend({}, abstractEvent); // make a copy of the original
+                                               assignDatesToEvent(
+                                                       start, end,
+                                                       !startTime && !endTime, // allDay?
+                                                       event
+                                               );
+                                               events.push(event);
+                                       }
+
+                                       date.add(1, 'days');
+                               }
+                       }
+                       else {
+                               events.push(abstractEvent); // return the original event. will be a one-item array
+                       }
                }
+
+               return events;
        }
-       
-       
-       
-       /* Semi-transparent Overlay Helpers
-       ------------------------------------------------------*/
-       // TODO: should be consolidated with AgendaView's methods
+       t.expandEvent = expandEvent;
 
 
-       function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive
 
-               if (refreshCoordinateGrid) {
-                       coordinateGrid.build();
+       /* Event Modification Math
+       -----------------------------------------------------------------------------------------*/
+
+
+       // Modifies an event and all related events by applying the given properties.
+       // Special date-diffing logic is used for manipulation of dates.
+       // If `props` does not contain start/end dates, the updated values are assumed to be the event's current start/end.
+       // All date comparisons are done against the event's pristine _start and _end dates.
+       // Returns an object with delta information and a function to undo all operations.
+       // For making computations in a granularity greater than day/time, specify largeUnit.
+       // NOTE: The given `newProps` might be mutated for normalization purposes.
+       function mutateEvent(event, newProps, largeUnit) {
+               var miscProps = {};
+               var oldProps;
+               var clearEnd;
+               var startDelta;
+               var endDelta;
+               var durationDelta;
+               var undoFunc;
+
+               // diffs the dates in the appropriate way, returning a duration
+               function diffDates(date1, date0) { // date1 - date0
+                       if (largeUnit) {
+                               return diffByUnit(date1, date0, largeUnit);
+                       }
+                       else if (newProps.allDay) {
+                               return diffDay(date1, date0);
+                       }
+                       else {
+                               return diffDayTime(date1, date0);
+                       }
                }
 
-               var segments = rangeToSegments(overlayStart, overlayEnd);
+               newProps = newProps || {};
 
-               for (var i=0; i<segments.length; i++) {
-                       var segment = segments[i];
-                       dayBind(
-                               renderCellOverlay(
-                                       segment.row,
-                                       segment.leftCol,
-                                       segment.row,
-                                       segment.rightCol
-                               )
-                       );
+               // normalize new date-related properties
+               if (!newProps.start) {
+                       newProps.start = event.start.clone();
                }
-       }
+               if (newProps.end === undefined) {
+                       newProps.end = event.end ? event.end.clone() : null;
+               }
+               if (newProps.allDay == null) { // is null or undefined?
+                       newProps.allDay = event.allDay;
+               }
+               normalizeEventDates(newProps);
 
-       
-       function renderCellOverlay(row0, col0, row1, col1) { // row1,col1 is inclusive
-               var rect = coordinateGrid.rect(row0, col0, row1, col1, element);
-               return renderOverlay(rect, element);
-       }
-       
-       
-       
-       /* Selection
-       -----------------------------------------------------------------------*/
-       
-       
-       function defaultSelectionEnd(startDate, allDay) {
-               return cloneDate(startDate);
-       }
-       
-       
-       function renderSelection(startDate, endDate, allDay) {
-               renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true); // rebuild every time???
-       }
-       
-       
-       function clearSelection() {
-               clearOverlays();
-       }
-       
-       
-       function reportDayClick(date, allDay, ev) {
-               var cell = dateToCell(date);
-               var _element = bodyCells[cell.row*colCnt + cell.col];
-               trigger('dayClick', _element, date, allDay, ev);
-       }
-       
-       
-       
-       /* External Dragging
-       -----------------------------------------------------------------------*/
-       
-       
-       function dragStart(_dragElement, ev, ui) {
-               hoverListener.start(function(cell) {
-                       clearOverlays();
-                       if (cell) {
-                               renderCellOverlay(cell.row, cell.col, cell.row, cell.col);
-                       }
-               }, ev);
-       }
-       
-       
-       function dragStop(_dragElement, ev, ui) {
-               var cell = hoverListener.stop();
-               clearOverlays();
-               if (cell) {
-                       var d = cellToDate(cell);
-                       trigger('drop', _dragElement, d, true, ev, ui);
+               // create normalized versions of the original props to compare against
+               // need a real end value, for diffing
+               oldProps = {
+                       start: event._start.clone(),
+                       end: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),
+                       allDay: newProps.allDay // normalize the dates in the same regard as the new properties
+               };
+               normalizeEventDates(oldProps);
+
+               // need to clear the end date if explicitly changed to null
+               clearEnd = event._end !== null && newProps.end === null;
+
+               // compute the delta for moving the start date
+               startDelta = diffDates(newProps.start, oldProps.start);
+
+               // compute the delta for moving the end date
+               if (newProps.end) {
+                       endDelta = diffDates(newProps.end, oldProps.end);
+                       durationDelta = endDelta.subtract(startDelta);
                }
-       }
-       
-       
-       
-       /* Utilities
-       --------------------------------------------------------*/
-       
-       
-       function defaultEventEnd(event) {
-               return cloneDate(event.start);
-       }
-       
-       
-       coordinateGrid = new CoordinateGrid(function(rows, cols) {
-               var e, n, p;
-               headCells.each(function(i, _e) {
-                       e = $(_e);
-                       n = e.offset().left;
-                       if (i) {
-                               p[1] = n;
-                       }
-                       p = [n];
-                       cols[i] = p;
-               });
-               p[1] = n + e.outerWidth();
-               bodyRows.each(function(i, _e) {
-                       if (i < rowCnt) {
-                               e = $(_e);
-                               n = e.offset().top;
-                               if (i) {
-                                       p[1] = n;
+               else {
+                       durationDelta = null;
+               }
+
+               // gather all non-date-related properties
+               $.each(newProps, function(name, val) {
+                       if (isMiscEventPropName(name)) {
+                               if (val !== undefined) {
+                                       miscProps[name] = val;
                                }
-                               p = [n];
-                               rows[i] = p;
                        }
                });
-               p[1] = n + e.outerHeight();
-       });
-       
-       
-       hoverListener = new HoverListener(coordinateGrid);
-       
-       colPositions = new HorizontalPositionCache(function(col) {
-               return firstRowCellInners.eq(col);
-       });
-
-       colContentPositions = new HorizontalPositionCache(function(col) {
-               return firstRowCellContentInners.eq(col);
-       });
 
+               // apply the operations to the event and all related events
+               undoFunc = mutateEvents(
+                       clientEvents(event._id), // get events with this ID
+                       clearEnd,
+                       newProps.allDay,
+                       startDelta,
+                       durationDelta,
+                       miscProps
+               );
 
-       function colLeft(col) {
-               return colPositions.left(col);
+               return {
+                       dateDelta: startDelta,
+                       durationDelta: durationDelta,
+                       undo: undoFunc
+               };
        }
 
 
-       function colRight(col) {
-               return colPositions.right(col);
-       }
-       
-       
-       function colContentLeft(col) {
-               return colContentPositions.left(col);
-       }
-       
-       
-       function colContentRight(col) {
-               return colContentPositions.right(col);
-       }
-       
-       
-       function allDayRow(i) {
-               return bodyRows.eq(i);
-       }
-       
-}
+       // Modifies an array of events in the following ways (operations are in order):
+       // - clear the event's `end`
+       // - convert the event to allDay
+       // - add `dateDelta` to the start and end
+       // - add `durationDelta` to the event's duration
+       // - assign `miscProps` to the event
+       //
+       // Returns a function that can be called to undo all the operations.
+       //
+       // TODO: don't use so many closures. possible memory issues when lots of events with same ID.
+       //
+       function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {
+               var isAmbigTimezone = t.getIsAmbigTimezone();
+               var undoFunctions = [];
+
+               // normalize zero-length deltas to be null
+               if (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }
+               if (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }
+
+               $.each(events, function(i, event) {
+                       var oldProps;
+                       var newProps;
+
+                       // build an object holding all the old values, both date-related and misc.
+                       // for the undo function.
+                       oldProps = {
+                               start: event.start.clone(),
+                               end: event.end ? event.end.clone() : null,
+                               allDay: event.allDay
+                       };
+                       $.each(miscProps, function(name) {
+                               oldProps[name] = event[name];
+                       });
 
-;;
+                       // new date-related properties. work off the original date snapshot.
+                       // ok to use references because they will be thrown away when backupEventDates is called.
+                       newProps = {
+                               start: event._start,
+                               end: event._end,
+                               allDay: allDay // normalize the dates in the same regard as the new properties
+                       };
+                       normalizeEventDates(newProps); // massages start/end/allDay
+
+                       // strip or ensure the end date
+                       if (clearEnd) {
+                               newProps.end = null;
+                       }
+                       else if (durationDelta && !newProps.end) { // the duration translation requires an end date
+                               newProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);
+                       }
 
-function BasicEventRenderer() {
-       var t = this;
-       
-       
-       // exports
-       t.renderEvents = renderEvents;
-       t.clearEvents = clearEvents;
-       
+                       if (dateDelta) {
+                               newProps.start.add(dateDelta);
+                               if (newProps.end) {
+                                       newProps.end.add(dateDelta);
+                               }
+                       }
 
-       // imports
-       DayEventRenderer.call(t);
+                       if (durationDelta) {
+                               newProps.end.add(durationDelta); // end already ensured above
+                       }
 
-       
-       function renderEvents(events, modifiedEventId) {
-               t.renderDayEvents(events, modifiedEventId);
-       }
-       
-       
-       function clearEvents() {
-               t.getDaySegmentContainer().empty();
+                       // if the dates have changed, and we know it is impossible to recompute the
+                       // timezone offsets, strip the zone.
+                       if (
+                               isAmbigTimezone &&
+                               !newProps.allDay &&
+                               (dateDelta || durationDelta)
+                       ) {
+                               newProps.start.stripZone();
+                               if (newProps.end) {
+                                       newProps.end.stripZone();
+                               }
+                       }
+
+                       $.extend(event, miscProps, newProps); // copy over misc props, then date-related props
+                       backupEventDates(event); // regenerate internal _start/_end/_allDay
+
+                       undoFunctions.push(function() {
+                               $.extend(event, oldProps);
+                               backupEventDates(event); // regenerate internal _start/_end/_allDay
+                       });
+               });
+
+               return function() {
+                       for (var i = 0; i < undoFunctions.length; i++) {
+                               undoFunctions[i]();
+                       }
+               };
        }
 
 
-       // TODO: have this class (and AgendaEventRenderer) be responsible for creating the event container div
+       t.getEventCache = function() {
+               return cache;
+       };
 
 }
 
-;;
 
-fcViews.agendaWeek = AgendaWeekView;
+// hook for external libs to manipulate event properties upon creation.
+// should manipulate the event in-place.
+Calendar.prototype.normalizeEvent = function(event) {
+};
 
-function AgendaWeekView(element, calendar) {
-       var t = this;
-       
-       
-       // exports
-       t.render = render;
-       
-       
-       // imports
-       AgendaView.call(t, element, calendar, 'agendaWeek');
-       var opt = t.opt;
-       var renderAgenda = t.renderAgenda;
-       var skipHiddenDays = t.skipHiddenDays;
-       var getCellsPerWeek = t.getCellsPerWeek;
-       var formatDates = calendar.formatDates;
 
-       
-       function render(date, delta) {
+// Does the given span (start, end, and other location information)
+// fully contain the other?
+Calendar.prototype.spanContainsSpan = function(outerSpan, innerSpan) {
+       var eventStart = outerSpan.start.clone().stripZone();
+       var eventEnd = this.getEventEnd(outerSpan).stripZone();
 
-               if (delta) {
-                       addDays(date, delta * 7);
-               }
+       return innerSpan.start >= eventStart && innerSpan.end <= eventEnd;
+};
 
-               var start = addDays(cloneDate(date), -((date.getDay() - opt('firstDay') + 7) % 7));
-               var end = addDays(cloneDate(start), 7);
 
-               var visStart = cloneDate(start);
-               skipHiddenDays(visStart);
+// Returns a list of events that the given event should be compared against when being considered for a move to
+// the specified span. Attached to the Calendar's prototype because EventManager is a mixin for a Calendar.
+Calendar.prototype.getPeerEvents = function(span, event) {
+       var cache = this.getEventCache();
+       var peerEvents = [];
+       var i, otherEvent;
 
-               var visEnd = cloneDate(end);
-               skipHiddenDays(visEnd, -1, true);
+       for (i = 0; i < cache.length; i++) {
+               otherEvent = cache[i];
+               if (
+                       !event ||
+                       event._id !== otherEvent._id // don't compare the event to itself or other related [repeating] events
+               ) {
+                       peerEvents.push(otherEvent);
+               }
+       }
 
-               var colCnt = getCellsPerWeek();
+       return peerEvents;
+};
 
-               t.title = formatDates(
-                       visStart,
-                       addDays(cloneDate(visEnd), -1),
-                       opt('titleFormat')
-               );
 
-               t.start = start;
-               t.end = end;
-               t.visStart = visStart;
-               t.visEnd = visEnd;
+// updates the "backup" properties, which are preserved in order to compute diffs later on.
+function backupEventDates(event) {
+       event._allDay = event.allDay;
+       event._start = event.start.clone();
+       event._end = event.end ? event.end.clone() : null;
+}
 
-               renderAgenda(colCnt);
-       }
 
-}
+/* Overlapping / Constraining
+-----------------------------------------------------------------------------------------*/
 
-;;
 
-fcViews.agendaDay = AgendaDayView;
+// Determines if the given event can be relocated to the given span (unzoned start/end with other misc data)
+Calendar.prototype.isEventSpanAllowed = function(span, event) {
+       var source = event.source || {};
 
+       var constraint = firstDefined(
+               event.constraint,
+               source.constraint,
+               this.options.eventConstraint
+       );
 
-function AgendaDayView(element, calendar) {
-       var t = this;
-       
-       
-       // exports
-       t.render = render;
-       
-       
-       // imports
-       AgendaView.call(t, element, calendar, 'agendaDay');
-       var opt = t.opt;
-       var renderAgenda = t.renderAgenda;
-       var skipHiddenDays = t.skipHiddenDays;
-       var formatDate = calendar.formatDate;
-       
-       
-       function render(date, delta) {
+       var overlap = firstDefined(
+               event.overlap,
+               source.overlap,
+               this.options.eventOverlap
+       );
 
-               if (delta) {
-                       addDays(date, delta);
-               }
-               skipHiddenDays(date, delta < 0 ? -1 : 1);
+       return this.isSpanAllowed(span, constraint, overlap, event) &&
+               (!this.options.eventAllow || this.options.eventAllow(span, event) !== false);
+};
 
-               var start = cloneDate(date, true);
-               var end = addDays(cloneDate(start), 1);
 
-               t.title = formatDate(date, opt('titleFormat'));
+// Determines if an external event can be relocated to the given span (unzoned start/end with other misc data)
+Calendar.prototype.isExternalSpanAllowed = function(eventSpan, eventLocation, eventProps) {
+       var eventInput;
+       var event;
 
-               t.start = t.visStart = start;
-               t.end = t.visEnd = end;
+       // note: very similar logic is in View's reportExternalDrop
+       if (eventProps) {
+               eventInput = $.extend({}, eventProps, eventLocation);
+               event = this.expandEvent(
+                       this.buildEventFromInput(eventInput)
+               )[0];
+       }
 
-               renderAgenda(1);
+       if (event) {
+               return this.isEventSpanAllowed(eventSpan, event);
        }
-       
+       else { // treat it as a selection
 
-}
+               return this.isSelectionSpanAllowed(eventSpan);
+       }
+};
 
-;;
 
-setDefaults({
-       allDaySlot: true,
-       allDayText: 'all-day',
-       firstHour: 6,
-       slotMinutes: 30,
-       defaultEventMinutes: 120,
-       axisFormat: 'h(:mm)tt',
-       timeFormat: {
-               agenda: 'h:mm{ - h:mm}'
-       },
-       dragOpacity: {
-               agenda: .5
-       },
-       minTime: 0,
-       maxTime: 24,
-       slotEventOverlap: true
-});
+// Determines the given span (unzoned start/end with other misc data) can be selected.
+Calendar.prototype.isSelectionSpanAllowed = function(span) {
+       return this.isSpanAllowed(span, this.options.selectConstraint, this.options.selectOverlap) &&
+               (!this.options.selectAllow || this.options.selectAllow(span) !== false);
+};
 
 
-// TODO: make it work in quirks mode (event corners, all-day height)
-// TODO: test liquid width, especially in IE6
+// Returns true if the given span (caused by an event drop/resize or a selection) is allowed to exist
+// according to the constraint/overlap settings.
+// `event` is not required if checking a selection.
+Calendar.prototype.isSpanAllowed = function(span, constraint, overlap, event) {
+       var constraintEvents;
+       var anyContainment;
+       var peerEvents;
+       var i, peerEvent;
+       var peerOverlap;
+
+       // the range must be fully contained by at least one of produced constraint events
+       if (constraint != null) {
+
+               // not treated as an event! intermediate data structure
+               // TODO: use ranges in the future
+               constraintEvents = this.constraintToEvents(constraint);
+               if (constraintEvents) { // not invalid
+
+                       anyContainment = false;
+                       for (i = 0; i < constraintEvents.length; i++) {
+                               if (this.spanContainsSpan(constraintEvents[i], span)) {
+                                       anyContainment = true;
+                                       break;
+                               }
+                       }
 
+                       if (!anyContainment) {
+                               return false;
+                       }
+               }
+       }
 
-function AgendaView(element, calendar, viewName) {
-       var t = this;
-       
-       
-       // exports
-       t.renderAgenda = renderAgenda;
-       t.setWidth = setWidth;
-       t.setHeight = setHeight;
-       t.afterRender = afterRender;
-       t.defaultEventEnd = defaultEventEnd;
-       t.timePosition = timePosition;
-       t.getIsCellAllDay = getIsCellAllDay;
-       t.allDayRow = getAllDayRow;
-       t.getCoordinateGrid = function() { return coordinateGrid }; // specifically for AgendaEventRenderer
-       t.getHoverListener = function() { return hoverListener };
-       t.colLeft = colLeft;
-       t.colRight = colRight;
-       t.colContentLeft = colContentLeft;
-       t.colContentRight = colContentRight;
-       t.getDaySegmentContainer = function() { return daySegmentContainer };
-       t.getSlotSegmentContainer = function() { return slotSegmentContainer };
-       t.getMinMinute = function() { return minMinute };
-       t.getMaxMinute = function() { return maxMinute };
-       t.getSlotContainer = function() { return slotContainer };
-       t.getRowCnt = function() { return 1 };
-       t.getColCnt = function() { return colCnt };
-       t.getColWidth = function() { return colWidth };
-       t.getSnapHeight = function() { return snapHeight };
-       t.getSnapMinutes = function() { return snapMinutes };
-       t.defaultSelectionEnd = defaultSelectionEnd;
-       t.renderDayOverlay = renderDayOverlay;
-       t.renderSelection = renderSelection;
-       t.clearSelection = clearSelection;
-       t.reportDayClick = reportDayClick; // selection mousedown hack
-       t.dragStart = dragStart;
-       t.dragStop = dragStop;
-       
-       
-       // imports
-       View.call(t, element, calendar, viewName);
-       OverlayManager.call(t);
-       SelectionManager.call(t);
-       AgendaEventRenderer.call(t);
-       var opt = t.opt;
-       var trigger = t.trigger;
-       var renderOverlay = t.renderOverlay;
-       var clearOverlays = t.clearOverlays;
-       var reportSelection = t.reportSelection;
-       var unselect = t.unselect;
-       var daySelectionMousedown = t.daySelectionMousedown;
-       var slotSegHtml = t.slotSegHtml;
-       var cellToDate = t.cellToDate;
-       var dateToCell = t.dateToCell;
-       var rangeToSegments = t.rangeToSegments;
-       var formatDate = calendar.formatDate;
-       
-       
-       // locals
-       
-       var dayTable;
-       var dayHead;
-       var dayHeadCells;
-       var dayBody;
-       var dayBodyCells;
-       var dayBodyCellInners;
-       var dayBodyCellContentInners;
-       var dayBodyFirstCell;
-       var dayBodyFirstCellStretcher;
-       var slotLayer;
-       var daySegmentContainer;
-       var allDayTable;
-       var allDayRow;
-       var slotScroller;
-       var slotContainer;
-       var slotSegmentContainer;
-       var slotTable;
-       var selectionHelper;
-       
-       var viewWidth;
-       var viewHeight;
-       var axisWidth;
-       var colWidth;
-       var gutterWidth;
-       var slotHeight; // TODO: what if slotHeight changes? (see issue 650)
-
-       var snapMinutes;
-       var snapRatio; // ratio of number of "selection" slots to normal slots. (ex: 1, 2, 4)
-       var snapHeight; // holds the pixel hight of a "selection" slot
-       
-       var colCnt;
-       var slotCnt;
-       var coordinateGrid;
-       var hoverListener;
-       var colPositions;
-       var colContentPositions;
-       var slotTopCache = {};
-       
-       var tm;
-       var rtl;
-       var minMinute, maxMinute;
-       var colFormat;
-       var showWeekNumbers;
-       var weekNumberTitle;
-       var weekNumberFormat;
-       
+       peerEvents = this.getPeerEvents(span, event);
 
-       
-       /* Rendering
-       -----------------------------------------------------------------------------*/
-       
-       
-       disableTextSelection(element.addClass('fc-agenda'));
-       
-       
-       function renderAgenda(c) {
-               colCnt = c;
-               updateOptions();
+       for (i = 0; i < peerEvents.length; i++)  {
+               peerEvent = peerEvents[i];
 
-               if (!dayTable) { // first time rendering?
-                       buildSkeleton(); // builds day table, slot area, events containers
-               }
-               else {
-                       buildDayTable(); // rebuilds day table
-               }
-       }
-       
-       
-       function updateOptions() {
+               // there needs to be an actual intersection before disallowing anything
+               if (this.eventIntersectsRange(peerEvent, span)) {
 
-               tm = opt('theme') ? 'ui' : 'fc';
-               rtl = opt('isRTL')
-               minMinute = parseTime(opt('minTime'));
-               maxMinute = parseTime(opt('maxTime'));
-               colFormat = opt('columnFormat');
+                       // evaluate overlap for the given range and short-circuit if necessary
+                       if (overlap === false) {
+                               return false;
+                       }
+                       // if the event's overlap is a test function, pass the peer event in question as the first param
+                       else if (typeof overlap === 'function' && !overlap(peerEvent, event)) {
+                               return false;
+                       }
 
-               // week # options. (TODO: bad, logic also in other views)
-               showWeekNumbers = opt('weekNumbers');
-               weekNumberTitle = opt('weekNumberTitle');
-               if (opt('weekNumberCalculation') != 'iso') {
-                       weekNumberFormat = "w";
-               }
-               else {
-                       weekNumberFormat = "W";
+                       // if we are computing if the given range is allowable for an event, consider the other event's
+                       // EventObject-specific or Source-specific `overlap` property
+                       if (event) {
+                               peerOverlap = firstDefined(
+                                       peerEvent.overlap,
+                                       (peerEvent.source || {}).overlap
+                                       // we already considered the global `eventOverlap`
+                               );
+                               if (peerOverlap === false) {
+                                       return false;
+                               }
+                               // if the peer event's overlap is a test function, pass the subject event as the first param
+                               if (typeof peerOverlap === 'function' && !peerOverlap(event, peerEvent)) {
+                                       return false;
+                               }
+                       }
                }
-
-               snapMinutes = opt('snapMinutes') || opt('slotMinutes');
        }
 
+       return true;
+};
 
 
-       /* Build DOM
-       -----------------------------------------------------------------------*/
+// Given an event input from the API, produces an array of event objects. Possible event inputs:
+// 'businessHours'
+// An event ID (number or string)
+// An object with specific start/end dates or a recurring event (like what businessHours accepts)
+Calendar.prototype.constraintToEvents = function(constraintInput) {
 
+       if (constraintInput === 'businessHours') {
+               return this.getCurrentBusinessHourEvents();
+       }
 
-       function buildSkeleton() {
-               var headerClass = tm + "-widget-header";
-               var contentClass = tm + "-widget-content";
-               var s;
-               var d;
-               var i;
-               var maxd;
-               var minutes;
-               var slotNormal = opt('slotMinutes') % 15 == 0;
-               
-               buildDayTable();
-               
-               slotLayer =
-                       $("<div style='position:absolute;z-index:2;left:0;width:100%'/>")
-                               .appendTo(element);
-                               
-               if (opt('allDaySlot')) {
-               
-                       daySegmentContainer =
-                               $("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>")
-                                       .appendTo(slotLayer);
-               
-                       s =
-                               "<table style='width:100%' class='fc-agenda-allday' cellspacing='0'>" +
-                               "<tr>" +
-                               "<th class='" + headerClass + " fc-agenda-axis'>" + opt('allDayText') + "</th>" +
-                               "<td>" +
-                               "<div class='fc-day-content'><div style='position:relative'/></div>" +
-                               "</td>" +
-                               "<th class='" + headerClass + " fc-agenda-gutter'>&nbsp;</th>" +
-                               "</tr>" +
-                               "</table>";
-                       allDayTable = $(s).appendTo(slotLayer);
-                       allDayRow = allDayTable.find('tr');
-                       
-                       dayBind(allDayRow.find('td'));
-                       
-                       slotLayer.append(
-                               "<div class='fc-agenda-divider " + headerClass + "'>" +
-                               "<div class='fc-agenda-divider-inner'/>" +
-                               "</div>"
-                       );
-                       
-               }else{
-               
-                       daySegmentContainer = $([]); // in jQuery 1.4, we can just do $()
-               
+       if (typeof constraintInput === 'object') {
+               if (constraintInput.start != null) { // needs to be event-like input
+                       return this.expandEvent(this.buildEventFromInput(constraintInput));
                }
-               
-               slotScroller =
-                       $("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>")
-                               .appendTo(slotLayer);
-                               
-               slotContainer =
-                       $("<div style='position:relative;width:100%;overflow:hidden'/>")
-                               .appendTo(slotScroller);
-                               
-               slotSegmentContainer =
-                       $("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>")
-                               .appendTo(slotContainer);
-               
-               s =
-                       "<table class='fc-agenda-slots' style='width:100%' cellspacing='0'>" +
-                       "<tbody>";
-               d = zeroDate();
-               maxd = addMinutes(cloneDate(d), maxMinute);
-               addMinutes(d, minMinute);
-               slotCnt = 0;
-               for (i=0; d < maxd; i++) {
-                       minutes = d.getMinutes();
-                       s +=
-                               "<tr class='fc-slot" + i + ' ' + (!minutes ? '' : 'fc-minor') + "'>" +
-                               "<th class='fc-agenda-axis " + headerClass + "'>" +
-                               ((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : '&nbsp;') +
-                               "</th>" +
-                               "<td class='" + contentClass + "'>" +
-                               "<div style='position:relative'>&nbsp;</div>" +
-                               "</td>" +
-                               "</tr>";
-                       addMinutes(d, opt('slotMinutes'));
-                       slotCnt++;
+               else {
+                       return null; // invalid
                }
-               s +=
-                       "</tbody>" +
-                       "</table>";
-               slotTable = $(s).appendTo(slotContainer);
-               
-               slotBind(slotTable.find('td'));
        }
 
+       return this.clientEvents(constraintInput); // probably an ID
+};
 
 
-       /* Build Day Table
-       -----------------------------------------------------------------------*/
+// Does the event's date range intersect with the given range?
+// start/end already assumed to have stripped zones :(
+Calendar.prototype.eventIntersectsRange = function(event, range) {
+       var eventStart = event.start.clone().stripZone();
+       var eventEnd = this.getEventEnd(event).stripZone();
 
+       return range.start < eventEnd && range.end > eventStart;
+};
 
-       function buildDayTable() {
-               var html = buildDayTableHTML();
 
-               if (dayTable) {
-                       dayTable.remove();
-               }
-               dayTable = $(html).appendTo(element);
+/* Business Hours
+-----------------------------------------------------------------------------------------*/
 
-               dayHead = dayTable.find('thead');
-               dayHeadCells = dayHead.find('th').slice(1, -1); // exclude gutter
-               dayBody = dayTable.find('tbody');
-               dayBodyCells = dayBody.find('td').slice(0, -1); // exclude gutter
-               dayBodyCellInners = dayBodyCells.find('> div');
-               dayBodyCellContentInners = dayBodyCells.find('.fc-day-content > div');
+var BUSINESS_HOUR_EVENT_DEFAULTS = {
+       id: '_fcBusinessHours', // will relate events from different calls to expandEvent
+       start: '09:00',
+       end: '17:00',
+       dow: [ 1, 2, 3, 4, 5 ], // monday - friday
+       rendering: 'inverse-background'
+       // classNames are defined in businessHoursSegClasses
+};
 
-               dayBodyFirstCell = dayBodyCells.eq(0);
-               dayBodyFirstCellStretcher = dayBodyCellInners.eq(0);
-               
-               markFirstLast(dayHead.add(dayHead.find('tr')));
-               markFirstLast(dayBody.add(dayBody.find('tr')));
+// Return events objects for business hours within the current view.
+// Abuse of our event system :(
+Calendar.prototype.getCurrentBusinessHourEvents = function(wholeDay) {
+       return this.computeBusinessHourEvents(wholeDay, this.options.businessHours);
+};
 
-               // TODO: now that we rebuild the cells every time, we should call dayRender
+// Given a raw input value from options, return events objects for business hours within the current view.
+Calendar.prototype.computeBusinessHourEvents = function(wholeDay, input) {
+       if (input === true) {
+               return this.expandBusinessHourEvents(wholeDay, [ {} ]);
        }
-
-
-       function buildDayTableHTML() {
-               var html =
-                       "<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>" +
-                       buildDayTableHeadHTML() +
-                       buildDayTableBodyHTML() +
-                       "</table>";
-
-               return html;
+       else if ($.isPlainObject(input)) {
+               return this.expandBusinessHourEvents(wholeDay, [ input ]);
        }
+       else if ($.isArray(input)) {
+               return this.expandBusinessHourEvents(wholeDay, input, true);
+       }
+       else {
+               return [];
+       }
+};
 
+// inputs expected to be an array of objects.
+// if ignoreNoDow is true, will ignore entries that don't specify a day-of-week (dow) key.
+Calendar.prototype.expandBusinessHourEvents = function(wholeDay, inputs, ignoreNoDow) {
+       var view = this.getView();
+       var events = [];
+       var i, input;
 
-       function buildDayTableHeadHTML() {
-               var headerClass = tm + "-widget-header";
-               var date;
-               var html = '';
-               var weekText;
-               var col;
-
-               html +=
-                       "<thead>" +
-                       "<tr>";
+       for (i = 0; i < inputs.length; i++) {
+               input = inputs[i];
 
-               if (showWeekNumbers) {
-                       date = cellToDate(0, 0);
-                       weekText = formatDate(date, weekNumberFormat);
-                       if (rtl) {
-                               weekText += weekNumberTitle;
-                       }
-                       else {
-                               weekText = weekNumberTitle + weekText;
-                       }
-                       html +=
-                               "<th class='fc-agenda-axis fc-week-number " + headerClass + "'>" +
-                               htmlEscape(weekText) +
-                               "</th>";
-               }
-               else {
-                       html += "<th class='fc-agenda-axis " + headerClass + "'>&nbsp;</th>";
+               if (ignoreNoDow && !input.dow) {
+                       continue;
                }
 
-               for (col=0; col<colCnt; col++) {
-                       date = cellToDate(0, col);
-                       html +=
-                               "<th class='fc-" + dayIDs[date.getDay()] + " fc-col" + col + ' ' + headerClass + "'>" +
-                               htmlEscape(formatDate(date, colFormat)) +
-                               "</th>";
-               }
+               // give defaults. will make a copy
+               input = $.extend({}, BUSINESS_HOUR_EVENT_DEFAULTS, input);
 
-               html +=
-                       "<th class='fc-agenda-gutter " + headerClass + "'>&nbsp;</th>" +
-                       "</tr>" +
-                       "</thead>";
+               // if a whole-day series is requested, clear the start/end times
+               if (wholeDay) {
+                       input.start = null;
+                       input.end = null;
+               }
 
-               return html;
+               events.push.apply(events, // append
+                       this.expandEvent(
+                               this.buildEventFromInput(input),
+                               view.start,
+                               view.end
+                       )
+               );
        }
 
+       return events;
+};
 
-       function buildDayTableBodyHTML() {
-               var headerClass = tm + "-widget-header"; // TODO: make these when updateOptions() called
-               var contentClass = tm + "-widget-content";
-               var date;
-               var today = clearTime(new Date());
-               var col;
-               var cellsHTML;
-               var cellHTML;
-               var classNames;
-               var html = '';
-
-               html +=
-                       "<tbody>" +
-                       "<tr>" +
-                       "<th class='fc-agenda-axis " + headerClass + "'>&nbsp;</th>";
+;;
 
-               cellsHTML = '';
+/* An abstract class for the "basic" views, as well as month view. Renders one or more rows of day cells.
+----------------------------------------------------------------------------------------------------------------------*/
+// It is a manager for a DayGrid subcomponent, which does most of the heavy lifting.
+// It is responsible for managing width/height.
 
-               for (col=0; col<colCnt; col++) {
+var BasicView = FC.BasicView = View.extend({
 
-                       date = cellToDate(0, col);
+       scroller: null,
 
-                       classNames = [
-                               'fc-col' + col,
-                               'fc-' + dayIDs[date.getDay()],
-                               contentClass
-                       ];
-                       if (+date == +today) {
-                               classNames.push(
-                                       tm + '-state-highlight',
-                                       'fc-today'
-                               );
-                       }
-                       else if (date < today) {
-                               classNames.push('fc-past');
-                       }
-                       else {
-                               classNames.push('fc-future');
-                       }
+       dayGridClass: DayGrid, // class the dayGrid will be instantiated from (overridable by subclasses)
+       dayGrid: null, // the main subcomponent that does most of the heavy lifting
 
-                       cellHTML =
-                               "<td class='" + classNames.join(' ') + "'>" +
-                               "<div>" +
-                               "<div class='fc-day-content'>" +
-                               "<div style='position:relative'>&nbsp;</div>" +
-                               "</div>" +
-                               "</div>" +
-                               "</td>";
+       dayNumbersVisible: false, // display day numbers on each day cell?
+       colWeekNumbersVisible: false, // display week numbers along the side?
+       cellWeekNumbersVisible: false, // display week numbers in day cell?
 
-                       cellsHTML += cellHTML;
-               }
+       weekNumberWidth: null, // width of all the week-number cells running down the side
 
-               html += cellsHTML;
-               html +=
-                       "<td class='fc-agenda-gutter " + contentClass + "'>&nbsp;</td>" +
-                       "</tr>" +
-                       "</tbody>";
+       headContainerEl: null, // div that hold's the dayGrid's rendered date header
+       headRowEl: null, // the fake row element of the day-of-week header
 
-               return html;
-       }
 
+       initialize: function() {
+               this.dayGrid = this.instantiateDayGrid();
 
-       // TODO: data-date on the cells
+               this.scroller = new Scroller({
+                       overflowX: 'hidden',
+                       overflowY: 'auto'
+               });
+       },
 
-       
-       
-       /* Dimensions
-       -----------------------------------------------------------------------*/
 
-       
-       function setHeight(height) {
-               if (height === undefined) {
-                       height = viewHeight;
-               }
-               viewHeight = height;
-               slotTopCache = {};
-       
-               var headHeight = dayBody.position().top;
-               var allDayHeight = slotScroller.position().top; // including divider
-               var bodyHeight = Math.min( // total body height, including borders
-                       height - headHeight,   // when scrollbars
-                       slotTable.height() + allDayHeight + 1 // when no scrollbars. +1 for bottom border
-               );
+       // Generates the DayGrid object this view needs. Draws from this.dayGridClass
+       instantiateDayGrid: function() {
+               // generate a subclass on the fly with BasicView-specific behavior
+               // TODO: cache this subclass
+               var subclass = this.dayGridClass.extend(basicDayGridMethods);
 
-               dayBodyFirstCellStretcher
-                       .height(bodyHeight - vsides(dayBodyFirstCell));
-               
-               slotLayer.css('top', headHeight);
-               
-               slotScroller.height(bodyHeight - allDayHeight - 1);
-               
-               // the stylesheet guarantees that the first row has no border.
-               // this allows .height() to work well cross-browser.
-               slotHeight = slotTable.find('tr:first').height() + 1; // +1 for bottom border
+               return new subclass(this);
+       },
 
-               snapRatio = opt('slotMinutes') / snapMinutes;
-               snapHeight = slotHeight / snapRatio;
-       }
-       
-       
-       function setWidth(width) {
-               viewWidth = width;
-               colPositions.clear();
-               colContentPositions.clear();
 
-               var axisFirstCells = dayHead.find('th:first');
-               if (allDayTable) {
-                       axisFirstCells = axisFirstCells.add(allDayTable.find('th:first'));
-               }
-               axisFirstCells = axisFirstCells.add(slotTable.find('th:first'));
-               
-               axisWidth = 0;
-               setOuterWidth(
-                       axisFirstCells
-                               .width('')
-                               .each(function(i, _cell) {
-                                       axisWidth = Math.max(axisWidth, $(_cell).outerWidth());
-                               }),
-                       axisWidth
-               );
-               
-               var gutterCells = dayTable.find('.fc-agenda-gutter');
-               if (allDayTable) {
-                       gutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter'));
-               }
+       // Sets the display range and computes all necessary dates
+       setRange: function(range) {
+               View.prototype.setRange.call(this, range); // call the super-method
 
-               var slotTableWidth = slotScroller[0].clientWidth; // needs to be done after axisWidth (for IE7)
-               
-               gutterWidth = slotScroller.width() - slotTableWidth;
-               if (gutterWidth) {
-                       setOuterWidth(gutterCells, gutterWidth);
-                       gutterCells
-                               .show()
-                               .prev()
-                               .removeClass('fc-last');
-               }else{
-                       gutterCells
-                               .hide()
-                               .prev()
-                               .addClass('fc-last');
-               }
-               
-               colWidth = Math.floor((slotTableWidth - axisWidth) / colCnt);
-               setOuterWidth(dayHeadCells.slice(0, -1), colWidth);
-       }
-       
+               this.dayGrid.breakOnWeeks = /year|month|week/.test(this.intervalUnit); // do before setRange
+               this.dayGrid.setRange(range);
+       },
 
 
-       /* Scrolling
-       -----------------------------------------------------------------------*/
+       // Compute the value to feed into setRange. Overrides superclass.
+       computeRange: function(date) {
+               var range = View.prototype.computeRange.call(this, date); // get value from the super-method
 
+               // year and month views should be aligned with weeks. this is already done for week
+               if (/year|month/.test(range.intervalUnit)) {
+                       range.start.startOf('week');
+                       range.start = this.skipHiddenDays(range.start);
 
-       function resetScroll() {
-               var d0 = zeroDate();
-               var scrollDate = cloneDate(d0);
-               scrollDate.setHours(opt('firstHour'));
-               var top = timePosition(d0, scrollDate) + 1; // +1 for the border
-               function scroll() {
-                       slotScroller.scrollTop(top);
+                       // make end-of-week if not already
+                       if (range.end.weekday()) {
+                               range.end.add(1, 'week').startOf('week');
+                               range.end = this.skipHiddenDays(range.end, -1, true); // exclusively move backwards
+                       }
                }
-               scroll();
-               setTimeout(scroll, 0); // overrides any previous scroll state made by the browser
-       }
-
 
-       function afterRender() { // after the view has been freshly rendered and sized
-               resetScroll();
-       }
-       
-       
-       
-       /* Slot/Day clicking and binding
-       -----------------------------------------------------------------------*/
-       
+               return range;
+       },
 
-       function dayBind(cells) {
-               cells.click(slotClick)
-                       .mousedown(daySelectionMousedown);
-       }
 
+       // Renders the view into `this.el`, which should already be assigned
+       renderDates: function() {
 
-       function slotBind(cells) {
-               cells.click(slotClick)
-                       .mousedown(slotSelectionMousedown);
-       }
-       
-       
-       function slotClick(ev) {
-               if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick
-                       var col = Math.min(colCnt-1, Math.floor((ev.pageX - dayTable.offset().left - axisWidth) / colWidth));
-                       var date = cellToDate(0, col);
-                       var rowMatch = this.parentNode.className.match(/fc-slot(\d+)/); // TODO: maybe use data
-                       if (rowMatch) {
-                               var mins = parseInt(rowMatch[1]) * opt('slotMinutes');
-                               var hours = Math.floor(mins/60);
-                               date.setHours(hours);
-                               date.setMinutes(mins%60 + minMinute);
-                               trigger('dayClick', dayBodyCells[col], date, false, ev);
-                       }else{
-                               trigger('dayClick', dayBodyCells[col], date, true, ev);
+               this.dayNumbersVisible = this.dayGrid.rowCnt > 1; // TODO: make grid responsible
+               if (this.opt('weekNumbers')) {
+                       if (this.opt('weekNumbersWithinDays')) {
+                               this.cellWeekNumbersVisible = true;
+                               this.colWeekNumbersVisible = false;
                        }
+                       else {
+                               this.cellWeekNumbersVisible = false;
+                               this.colWeekNumbersVisible = true;
+                       };
                }
-       }
-       
-       
-       
-       /* Semi-transparent Overlay Helpers
-       -----------------------------------------------------*/
-       // TODO: should be consolidated with BasicView's methods
+               this.dayGrid.numbersVisible = this.dayNumbersVisible ||
+                       this.cellWeekNumbersVisible || this.colWeekNumbersVisible;
 
+               this.el.addClass('fc-basic-view').html(this.renderSkeletonHtml());
+               this.renderHead();
 
-       function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive
+               this.scroller.render();
+               var dayGridContainerEl = this.scroller.el.addClass('fc-day-grid-container');
+               var dayGridEl = $('<div class="fc-day-grid" />').appendTo(dayGridContainerEl);
+               this.el.find('.fc-body > tr > td').append(dayGridContainerEl);
 
-               if (refreshCoordinateGrid) {
-                       coordinateGrid.build();
-               }
+               this.dayGrid.setElement(dayGridEl);
+               this.dayGrid.renderDates(this.hasRigidRows());
+       },
 
-               var segments = rangeToSegments(overlayStart, overlayEnd);
 
-               for (var i=0; i<segments.length; i++) {
-                       var segment = segments[i];
-                       dayBind(
-                               renderCellOverlay(
-                                       segment.row,
-                                       segment.leftCol,
-                                       segment.row,
-                                       segment.rightCol
-                               )
-                       );
-               }
-       }
-       
-       
-       function renderCellOverlay(row0, col0, row1, col1) { // only for all-day?
-               var rect = coordinateGrid.rect(row0, col0, row1, col1, slotLayer);
-               return renderOverlay(rect, slotLayer);
-       }
-       
+       // render the day-of-week headers
+       renderHead: function() {
+               this.headContainerEl =
+                       this.el.find('.fc-head-container')
+                               .html(this.dayGrid.renderHeadHtml());
+               this.headRowEl = this.headContainerEl.find('.fc-row');
+       },
 
-       function renderSlotOverlay(overlayStart, overlayEnd) {
-               for (var i=0; i<colCnt; i++) {
-                       var dayStart = cellToDate(0, i);
-                       var dayEnd = addDays(cloneDate(dayStart), 1);
-                       var stretchStart = new Date(Math.max(dayStart, overlayStart));
-                       var stretchEnd = new Date(Math.min(dayEnd, overlayEnd));
-                       if (stretchStart < stretchEnd) {
-                               var rect = coordinateGrid.rect(0, i, 0, i, slotContainer); // only use it for horizontal coords
-                               var top = timePosition(dayStart, stretchStart);
-                               var bottom = timePosition(dayStart, stretchEnd);
-                               rect.top = top;
-                               rect.height = bottom - top;
-                               slotBind(
-                                       renderOverlay(rect, slotContainer)
-                               );
-                       }
-               }
-       }
-       
-       
-       
-       /* Coordinate Utilities
-       -----------------------------------------------------------------------------*/
-       
-       
-       coordinateGrid = new CoordinateGrid(function(rows, cols) {
-               var e, n, p;
-               dayHeadCells.each(function(i, _e) {
-                       e = $(_e);
-                       n = e.offset().left;
-                       if (i) {
-                               p[1] = n;
-                       }
-                       p = [n];
-                       cols[i] = p;
-               });
-               p[1] = n + e.outerWidth();
-               if (opt('allDaySlot')) {
-                       e = allDayRow;
-                       n = e.offset().top;
-                       rows[0] = [n, n+e.outerHeight()];
-               }
-               var slotTableTop = slotContainer.offset().top;
-               var slotScrollerTop = slotScroller.offset().top;
-               var slotScrollerBottom = slotScrollerTop + slotScroller.outerHeight();
-               function constrain(n) {
-                       return Math.max(slotScrollerTop, Math.min(slotScrollerBottom, n));
-               }
-               for (var i=0; i<slotCnt*snapRatio; i++) { // adapt slot count to increased/decreased selection slot count
-                       rows.push([
-                               constrain(slotTableTop + snapHeight*i),
-                               constrain(slotTableTop + snapHeight*(i+1))
-                       ]);
-               }
-       });
-       
-       
-       hoverListener = new HoverListener(coordinateGrid);
-       
-       colPositions = new HorizontalPositionCache(function(col) {
-               return dayBodyCellInners.eq(col);
-       });
-       
-       colContentPositions = new HorizontalPositionCache(function(col) {
-               return dayBodyCellContentInners.eq(col);
-       });
-       
-       
-       function colLeft(col) {
-               return colPositions.left(col);
-       }
 
+       // Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,
+       // always completely kill the dayGrid's rendering.
+       unrenderDates: function() {
+               this.dayGrid.unrenderDates();
+               this.dayGrid.removeElement();
+               this.scroller.destroy();
+       },
 
-       function colContentLeft(col) {
-               return colContentPositions.left(col);
-       }
 
+       renderBusinessHours: function() {
+               this.dayGrid.renderBusinessHours();
+       },
 
-       function colRight(col) {
-               return colPositions.right(col);
-       }
-       
-       
-       function colContentRight(col) {
-               return colContentPositions.right(col);
-       }
 
+       unrenderBusinessHours: function() {
+               this.dayGrid.unrenderBusinessHours();
+       },
 
-       function getIsCellAllDay(cell) {
-               return opt('allDaySlot') && !cell.row;
-       }
 
+       // Builds the HTML skeleton for the view.
+       // The day-grid component will render inside of a container defined by this HTML.
+       renderSkeletonHtml: function() {
+               return '' +
+                       '<table>' +
+                               '<thead class="fc-head">' +
+                                       '<tr>' +
+                                               '<td class="fc-head-container ' + this.widgetHeaderClass + '"></td>' +
+                                       '</tr>' +
+                               '</thead>' +
+                               '<tbody class="fc-body">' +
+                                       '<tr>' +
+                                               '<td class="' + this.widgetContentClass + '"></td>' +
+                                       '</tr>' +
+                               '</tbody>' +
+                       '</table>';
+       },
 
-       function realCellToDate(cell) { // ugh "real" ... but blame it on our abuse of the "cell" system
-               var d = cellToDate(0, cell.col);
-               var slotIndex = cell.row;
-               if (opt('allDaySlot')) {
-                       slotIndex--;
-               }
-               if (slotIndex >= 0) {
-                       addMinutes(d, minMinute + slotIndex * snapMinutes);
-               }
-               return d;
-       }
-       
-       
-       // get the Y coordinate of the given time on the given day (both Date objects)
-       function timePosition(day, time) { // both date objects. day holds 00:00 of current day
-               day = cloneDate(day, true);
-               if (time < addMinutes(cloneDate(day), minMinute)) {
-                       return 0;
-               }
-               if (time >= addMinutes(cloneDate(day), maxMinute)) {
-                       return slotTable.height();
-               }
-               var slotMinutes = opt('slotMinutes'),
-                       minutes = time.getHours()*60 + time.getMinutes() - minMinute,
-                       slotI = Math.floor(minutes / slotMinutes),
-                       slotTop = slotTopCache[slotI];
-               if (slotTop === undefined) {
-                       slotTop = slotTopCache[slotI] =
-                               slotTable.find('tr').eq(slotI).find('td div')[0].offsetTop;
-                               // .eq() is faster than ":eq()" selector
-                               // [0].offsetTop is faster than .position().top (do we really need this optimization?)
-                               // a better optimization would be to cache all these divs
-               }
-               return Math.max(0, Math.round(
-                       slotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes)
-               ));
-       }
-       
-       
-       function getAllDayRow(index) {
-               return allDayRow;
-       }
-       
-       
-       function defaultEventEnd(event) {
-               var start = cloneDate(event.start);
-               if (event.allDay) {
-                       return start;
-               }
-               return addMinutes(start, opt('defaultEventMinutes'));
-       }
-       
-       
-       
-       /* Selection
-       ---------------------------------------------------------------------------------*/
-       
-       
-       function defaultSelectionEnd(startDate, allDay) {
-               if (allDay) {
-                       return cloneDate(startDate);
-               }
-               return addMinutes(cloneDate(startDate), opt('slotMinutes'));
-       }
-       
-       
-       function renderSelection(startDate, endDate, allDay) { // only for all-day
-               if (allDay) {
-                       if (opt('allDaySlot')) {
-                               renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true);
-                       }
-               }else{
-                       renderSlotSelection(startDate, endDate);
-               }
-       }
-       
-       
-       function renderSlotSelection(startDate, endDate) {
-               var helperOption = opt('selectHelper');
-               coordinateGrid.build();
-               if (helperOption) {
-                       var col = dateToCell(startDate).col;
-                       if (col >= 0 && col < colCnt) { // only works when times are on same day
-                               var rect = coordinateGrid.rect(0, col, 0, col, slotContainer); // only for horizontal coords
-                               var top = timePosition(startDate, startDate);
-                               var bottom = timePosition(startDate, endDate);
-                               if (bottom > top) { // protect against selections that are entirely before or after visible range
-                                       rect.top = top;
-                                       rect.height = bottom - top;
-                                       rect.left += 2;
-                                       rect.width -= 5;
-                                       if ($.isFunction(helperOption)) {
-                                               var helperRes = helperOption(startDate, endDate);
-                                               if (helperRes) {
-                                                       rect.position = 'absolute';
-                                                       selectionHelper = $(helperRes)
-                                                               .css(rect)
-                                                               .appendTo(slotContainer);
-                                               }
-                                       }else{
-                                               rect.isStart = true; // conside rect a "seg" now
-                                               rect.isEnd = true;   //
-                                               selectionHelper = $(slotSegHtml(
-                                                       {
-                                                               title: '',
-                                                               start: startDate,
-                                                               end: endDate,
-                                                               className: ['fc-select-helper'],
-                                                               editable: false
-                                                       },
-                                                       rect
-                                               ));
-                                               selectionHelper.css('opacity', opt('dragOpacity'));
-                                       }
-                                       if (selectionHelper) {
-                                               slotBind(selectionHelper);
-                                               slotContainer.append(selectionHelper);
-                                               setOuterWidth(selectionHelper, rect.width, true); // needs to be after appended
-                                               setOuterHeight(selectionHelper, rect.height, true);
-                                       }
-                               }
-                       }
-               }else{
-                       renderSlotOverlay(startDate, endDate);
-               }
-       }
-       
-       
-       function clearSelection() {
-               clearOverlays();
-               if (selectionHelper) {
-                       selectionHelper.remove();
-                       selectionHelper = null;
-               }
-       }
-       
-       
-       function slotSelectionMousedown(ev) {
-               if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button
-                       unselect(ev);
-                       var dates;
-                       hoverListener.start(function(cell, origCell) {
-                               clearSelection();
-                               if (cell && cell.col == origCell.col && !getIsCellAllDay(cell)) {
-                                       var d1 = realCellToDate(origCell);
-                                       var d2 = realCellToDate(cell);
-                                       dates = [
-                                               d1,
-                                               addMinutes(cloneDate(d1), snapMinutes), // calculate minutes depending on selection slot minutes 
-                                               d2,
-                                               addMinutes(cloneDate(d2), snapMinutes)
-                                       ].sort(dateCompare);
-                                       renderSlotSelection(dates[0], dates[3]);
-                               }else{
-                                       dates = null;
-                               }
-                       }, ev);
-                       $(document).one('mouseup', function(ev) {
-                               hoverListener.stop();
-                               if (dates) {
-                                       if (+dates[0] == +dates[1]) {
-                                               reportDayClick(dates[0], false, ev);
-                                       }
-                                       reportSelection(dates[0], dates[3], false, ev);
-                               }
-                       });
+
+       // Generates an HTML attribute string for setting the width of the week number column, if it is known
+       weekNumberStyleAttr: function() {
+               if (this.weekNumberWidth !== null) {
+                       return 'style="width:' + this.weekNumberWidth + 'px"';
                }
-       }
+               return '';
+       },
 
 
-       function reportDayClick(date, allDay, ev) {
-               trigger('dayClick', dayBodyCells[dateToCell(date).col], date, allDay, ev);
-       }
-       
-       
-       
-       /* External Dragging
-       --------------------------------------------------------------------------------*/
-       
-       
-       function dragStart(_dragElement, ev, ui) {
-               hoverListener.start(function(cell) {
-                       clearOverlays();
-                       if (cell) {
-                               if (getIsCellAllDay(cell)) {
-                                       renderCellOverlay(cell.row, cell.col, cell.row, cell.col);
-                               }else{
-                                       var d1 = realCellToDate(cell);
-                                       var d2 = addMinutes(cloneDate(d1), opt('defaultEventMinutes'));
-                                       renderSlotOverlay(d1, d2);
-                               }
-                       }
-               }, ev);
-       }
-       
-       
-       function dragStop(_dragElement, ev, ui) {
-               var cell = hoverListener.stop();
-               clearOverlays();
-               if (cell) {
-                       trigger('drop', _dragElement, realCellToDate(cell), getIsCellAllDay(cell), ev, ui);
+       // Determines whether each row should have a constant height
+       hasRigidRows: function() {
+               var eventLimit = this.opt('eventLimit');
+               return eventLimit && typeof eventLimit !== 'number';
+       },
+
+
+       /* Dimensions
+       ------------------------------------------------------------------------------------------------------------------*/
+
+
+       // Refreshes the horizontal dimensions of the view
+       updateWidth: function() {
+               if (this.colWeekNumbersVisible) {
+                       // Make sure all week number cells running down the side have the same width.
+                       // Record the width for cells created later.
+                       this.weekNumberWidth = matchCellWidths(
+                               this.el.find('.fc-week-number')
+                       );
                }
-       }
-       
+       },
 
-}
 
-;;
+       // Adjusts the vertical dimensions of the view to the specified values
+       setHeight: function(totalHeight, isAuto) {
+               var eventLimit = this.opt('eventLimit');
+               var scrollerHeight;
+               var scrollbarWidths;
 
-function AgendaEventRenderer() {
-       var t = this;
-       
-       
-       // exports
-       t.renderEvents = renderEvents;
-       t.clearEvents = clearEvents;
-       t.slotSegHtml = slotSegHtml;
-       
-       
-       // imports
-       DayEventRenderer.call(t);
-       var opt = t.opt;
-       var trigger = t.trigger;
-       var isEventDraggable = t.isEventDraggable;
-       var isEventResizable = t.isEventResizable;
-       var eventEnd = t.eventEnd;
-       var eventElementHandlers = t.eventElementHandlers;
-       var setHeight = t.setHeight;
-       var getDaySegmentContainer = t.getDaySegmentContainer;
-       var getSlotSegmentContainer = t.getSlotSegmentContainer;
-       var getHoverListener = t.getHoverListener;
-       var getMaxMinute = t.getMaxMinute;
-       var getMinMinute = t.getMinMinute;
-       var timePosition = t.timePosition;
-       var getIsCellAllDay = t.getIsCellAllDay;
-       var colContentLeft = t.colContentLeft;
-       var colContentRight = t.colContentRight;
-       var cellToDate = t.cellToDate;
-       var getColCnt = t.getColCnt;
-       var getColWidth = t.getColWidth;
-       var getSnapHeight = t.getSnapHeight;
-       var getSnapMinutes = t.getSnapMinutes;
-       var getSlotContainer = t.getSlotContainer;
-       var reportEventElement = t.reportEventElement;
-       var showEvents = t.showEvents;
-       var hideEvents = t.hideEvents;
-       var eventDrop = t.eventDrop;
-       var eventResize = t.eventResize;
-       var renderDayOverlay = t.renderDayOverlay;
-       var clearOverlays = t.clearOverlays;
-       var renderDayEvents = t.renderDayEvents;
-       var calendar = t.calendar;
-       var formatDate = calendar.formatDate;
-       var formatDates = calendar.formatDates;
-
-
-       // overrides
-       t.draggableDayEvent = draggableDayEvent;
+               // reset all heights to be natural
+               this.scroller.clear();
+               uncompensateScroll(this.headRowEl);
 
-       
-       
-       /* Rendering
-       ----------------------------------------------------------------------------*/
-       
+               this.dayGrid.removeSegPopover(); // kill the "more" popover if displayed
 
-       function renderEvents(events, modifiedEventId) {
-               var i, len=events.length,
-                       dayEvents=[],
-                       slotEvents=[];
-               for (i=0; i<len; i++) {
-                       if (events[i].allDay) {
-                               dayEvents.push(events[i]);
-                       }else{
-                               slotEvents.push(events[i]);
-                       }
+               // is the event limit a constant level number?
+               if (eventLimit && typeof eventLimit === 'number') {
+                       this.dayGrid.limitRows(eventLimit); // limit the levels first so the height can redistribute after
                }
 
-               if (opt('allDaySlot')) {
-                       renderDayEvents(dayEvents, modifiedEventId);
-                       setHeight(); // no params means set to viewHeight
+               // distribute the height to the rows
+               // (totalHeight is a "recommended" value if isAuto)
+               scrollerHeight = this.computeScrollerHeight(totalHeight);
+               this.setGridHeight(scrollerHeight, isAuto);
+
+               // is the event limit dynamically calculated?
+               if (eventLimit && typeof eventLimit !== 'number') {
+                       this.dayGrid.limitRows(eventLimit); // limit the levels after the grid's row heights have been set
                }
 
-               renderSlotSegs(compileSlotSegs(slotEvents), modifiedEventId);
-       }
-       
-       
-       function clearEvents() {
-               getDaySegmentContainer().empty();
-               getSlotSegmentContainer().empty();
-       }
+               if (!isAuto) { // should we force dimensions of the scroll container?
+
+                       this.scroller.setHeight(scrollerHeight);
+                       scrollbarWidths = this.scroller.getScrollbarWidths();
 
-       
-       function compileSlotSegs(events) {
-               var colCnt = getColCnt(),
-                       minMinute = getMinMinute(),
-                       maxMinute = getMaxMinute(),
-                       d,
-                       visEventEnds = $.map(events, slotEventEnd),
-                       i,
-                       j, seg,
-                       colSegs,
-                       segs = [];
-
-               for (i=0; i<colCnt; i++) {
-
-                       d = cellToDate(0, i);
-                       addMinutes(d, minMinute);
-
-                       colSegs = sliceSegs(
-                               events,
-                               visEventEnds,
-                               d,
-                               addMinutes(cloneDate(d), maxMinute-minMinute)
-                       );
+                       if (scrollbarWidths.left || scrollbarWidths.right) { // using scrollbars?
 
-                       colSegs = placeSlotSegs(colSegs); // returns a new order
+                               compensateScroll(this.headRowEl, scrollbarWidths);
 
-                       for (j=0; j<colSegs.length; j++) {
-                               seg = colSegs[j];
-                               seg.col = i;
-                               segs.push(seg);
+                               // doing the scrollbar compensation might have created text overflow which created more height. redo
+                               scrollerHeight = this.computeScrollerHeight(totalHeight);
+                               this.scroller.setHeight(scrollerHeight);
                        }
+
+                       // guarantees the same scrollbar widths
+                       this.scroller.lockOverflow(scrollbarWidths);
                }
+       },
 
-               return segs;
-       }
+
+       // given a desired total height of the view, returns what the height of the scroller should be
+       computeScrollerHeight: function(totalHeight) {
+               return totalHeight -
+                       subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller
+       },
 
 
-       function sliceSegs(events, visEventEnds, start, end) {
-               var segs = [],
-                       i, len=events.length, event,
-                       eventStart, eventEnd,
-                       segStart, segEnd,
-                       isStart, isEnd;
-               for (i=0; i<len; i++) {
-                       event = events[i];
-                       eventStart = event.start;
-                       eventEnd = visEventEnds[i];
-                       if (eventEnd > start && eventStart < end) {
-                               if (eventStart < start) {
-                                       segStart = cloneDate(start);
-                                       isStart = false;
-                               }else{
-                                       segStart = eventStart;
-                                       isStart = true;
-                               }
-                               if (eventEnd > end) {
-                                       segEnd = cloneDate(end);
-                                       isEnd = false;
-                               }else{
-                                       segEnd = eventEnd;
-                                       isEnd = true;
-                               }
-                               segs.push({
-                                       event: event,
-                                       start: segStart,
-                                       end: segEnd,
-                                       isStart: isStart,
-                                       isEnd: isEnd
-                               });
-                       }
+       // Sets the height of just the DayGrid component in this view
+       setGridHeight: function(height, isAuto) {
+               if (isAuto) {
+                       undistributeHeight(this.dayGrid.rowEls); // let the rows be their natural height with no expanding
                }
-               return segs.sort(compareSlotSegs);
-       }
+               else {
+                       distributeHeight(this.dayGrid.rowEls, height, true); // true = compensate for height-hogging rows
+               }
+       },
 
 
-       function slotEventEnd(event) {
-               if (event.end) {
-                       return cloneDate(event.end);
-               }else{
-                       return addMinutes(cloneDate(event.start), opt('defaultEventMinutes'));
-               }
-       }
-       
-       
-       // renders events in the 'time slots' at the bottom
-       // TODO: when we refactor this, when user returns `false` eventRender, don't have empty space
-       // TODO: refactor will include using pixels to detect collisions instead of dates (handy for seg cmp)
-       
-       function renderSlotSegs(segs, modifiedEventId) {
-       
-               var i, segCnt=segs.length, seg,
-                       event,
-                       top,
-                       bottom,
-                       columnLeft,
-                       columnRight,
-                       columnWidth,
-                       width,
-                       left,
-                       right,
-                       html = '',
-                       eventElements,
-                       eventElement,
-                       triggerRes,
-                       titleElement,
-                       height,
-                       slotSegmentContainer = getSlotSegmentContainer(),
-                       isRTL = opt('isRTL');
-                       
-               // calculate position/dimensions, create html
-               for (i=0; i<segCnt; i++) {
-                       seg = segs[i];
-                       event = seg.event;
-                       top = timePosition(seg.start, seg.start);
-                       bottom = timePosition(seg.start, seg.end);
-                       columnLeft = colContentLeft(seg.col);
-                       columnRight = colContentRight(seg.col);
-                       columnWidth = columnRight - columnLeft;
-
-                       // shave off space on right near scrollbars (2.5%)
-                       // TODO: move this to CSS somehow
-                       columnRight -= columnWidth * .025;
-                       columnWidth = columnRight - columnLeft;
-
-                       width = columnWidth * (seg.forwardCoord - seg.backwardCoord);
-
-                       if (opt('slotEventOverlap')) {
-                               // double the width while making sure resize handle is visible
-                               // (assumed to be 20px wide)
-                               width = Math.max(
-                                       (width - (20/2)) * 2,
-                                       width // narrow columns will want to make the segment smaller than
-                                               // the natural width. don't allow it
-                               );
-                       }
+       /* Scroll
+       ------------------------------------------------------------------------------------------------------------------*/
 
-                       if (isRTL) {
-                               right = columnRight - seg.backwardCoord * columnWidth;
-                               left = right - width;
-                       }
-                       else {
-                               left = columnLeft + seg.backwardCoord * columnWidth;
-                               right = left + width;
-                       }
 
-                       // make sure horizontal coordinates are in bounds
-                       left = Math.max(left, columnLeft);
-                       right = Math.min(right, columnRight);
-                       width = right - left;
+       queryScroll: function() {
+               return this.scroller.getScrollTop();
+       },
 
-                       seg.top = top;
-                       seg.left = left;
-                       seg.outerWidth = width;
-                       seg.outerHeight = bottom - top;
-                       html += slotSegHtml(event, seg);
-               }
 
-               slotSegmentContainer[0].innerHTML = html; // faster than html()
-               eventElements = slotSegmentContainer.children();
-               
-               // retrieve elements, run through eventRender callback, bind event handlers
-               for (i=0; i<segCnt; i++) {
-                       seg = segs[i];
-                       event = seg.event;
-                       eventElement = $(eventElements[i]); // faster than eq()
-                       triggerRes = trigger('eventRender', event, event, eventElement);
-                       if (triggerRes === false) {
-                               eventElement.remove();
-                       }else{
-                               if (triggerRes && triggerRes !== true) {
-                                       eventElement.remove();
-                                       eventElement = $(triggerRes)
-                                               .css({
-                                                       position: 'absolute',
-                                                       top: seg.top,
-                                                       left: seg.left
-                                               })
-                                               .appendTo(slotSegmentContainer);
-                               }
-                               seg.element = eventElement;
-                               if (event._id === modifiedEventId) {
-                                       bindSlotSeg(event, eventElement, seg);
-                               }else{
-                                       eventElement[0]._fci = i; // for lazySegBind
-                               }
-                               reportEventElement(event, eventElement);
-                       }
-               }
-               
-               lazySegBind(slotSegmentContainer, segs, bindSlotSeg);
-               
-               // record event sides and title positions
-               for (i=0; i<segCnt; i++) {
-                       seg = segs[i];
-                       if (eventElement = seg.element) {
-                               seg.vsides = vsides(eventElement, true);
-                               seg.hsides = hsides(eventElement, true);
-                               titleElement = eventElement.find('.fc-event-title');
-                               if (titleElement.length) {
-                                       seg.contentTop = titleElement[0].offsetTop;
-                               }
-                       }
-               }
-               
-               // set all positions/dimensions at once
-               for (i=0; i<segCnt; i++) {
-                       seg = segs[i];
-                       if (eventElement = seg.element) {
-                               eventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';
-                               height = Math.max(0, seg.outerHeight - seg.vsides);
-                               eventElement[0].style.height = height + 'px';
-                               event = seg.event;
-                               if (seg.contentTop !== undefined && height - seg.contentTop < 10) {
-                                       // not enough room for title, put it in the time (TODO: maybe make both display:inline instead)
-                                       eventElement.find('div.fc-event-time')
-                                               .text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);
-                                       eventElement.find('div.fc-event-title')
-                                               .remove();
-                               }
-                               trigger('eventAfterRender', event, event, eventElement);
-                       }
-               }
-                                       
-       }
-       
-       
-       function slotSegHtml(event, seg) {
-               var html = "<";
-               var url = event.url;
-               var skinCss = getSkinCss(event, opt);
-               var classes = ['fc-event', 'fc-event-vert'];
-               if (isEventDraggable(event)) {
-                       classes.push('fc-event-draggable');
-               }
-               if (seg.isStart) {
-                       classes.push('fc-event-start');
-               }
-               if (seg.isEnd) {
-                       classes.push('fc-event-end');
-               }
-               classes = classes.concat(event.className);
-               if (event.source) {
-                       classes = classes.concat(event.source.className || []);
-               }
-               if (url) {
-                       html += "a href='" + htmlEscape(event.url) + "'";
-               }else{
-                       html += "div";
-               }
-               html +=
-                       " class='" + classes.join(' ') + "'" +
-                       " style=" +
-                               "'" +
-                               "position:absolute;" +
-                               "top:" + seg.top + "px;" +
-                               "left:" + seg.left + "px;" +
-                               skinCss +
-                               "'" +
-                       ">" +
-                       "<div class='fc-event-inner'>" +
-                       "<div class='fc-event-time'>" +
-                       htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) +
-                       "</div>" +
-                       "<div class='fc-event-title'>" +
-                       htmlEscape(event.title || '') +
-                       "</div>" +
-                       "</div>" +
-                       "<div class='fc-event-bg'></div>";
-               if (seg.isEnd && isEventResizable(event)) {
-                       html +=
-                               "<div class='ui-resizable-handle ui-resizable-s'>=</div>";
-               }
-               html +=
-                       "</" + (url ? "a" : "div") + ">";
-               return html;
-       }
-       
-       
-       function bindSlotSeg(event, eventElement, seg) {
-               var timeElement = eventElement.find('div.fc-event-time');
-               if (isEventDraggable(event)) {
-                       draggableSlotEvent(event, eventElement, timeElement);
-               }
-               if (seg.isEnd && isEventResizable(event)) {
-                       resizableSlotEvent(event, eventElement, timeElement);
-               }
-               eventElementHandlers(event, eventElement);
-       }
-       
-       
-       
-       /* Dragging
-       -----------------------------------------------------------------------------------*/
-       
-       
-       // when event starts out FULL-DAY
-       // overrides DayEventRenderer's version because it needs to account for dragging elements
-       // to and from the slot area.
-       
-       function draggableDayEvent(event, eventElement, seg) {
-               var isStart = seg.isStart;
-               var origWidth;
-               var revert;
-               var allDay = true;
-               var dayDelta;
-               var hoverListener = getHoverListener();
-               var colWidth = getColWidth();
-               var snapHeight = getSnapHeight();
-               var snapMinutes = getSnapMinutes();
-               var minMinute = getMinMinute();
-               eventElement.draggable({
-                       opacity: opt('dragOpacity', 'month'), // use whatever the month view was using
-                       revertDuration: opt('dragRevertDuration'),
-                       start: function(ev, ui) {
-                               trigger('eventDragStart', eventElement, event, ev, ui);
-                               hideEvents(event, eventElement);
-                               origWidth = eventElement.width();
-                               hoverListener.start(function(cell, origCell) {
-                                       clearOverlays();
-                                       if (cell) {
-                                               revert = false;
-                                               var origDate = cellToDate(0, origCell.col);
-                                               var date = cellToDate(0, cell.col);
-                                               dayDelta = dayDiff(date, origDate);
-                                               if (!cell.row) {
-                                                       // on full-days
-                                                       renderDayOverlay(
-                                                               addDays(cloneDate(event.start), dayDelta),
-                                                               addDays(exclEndDay(event), dayDelta)
-                                                       );
-                                                       resetElement();
-                                               }else{
-                                                       // mouse is over bottom slots
-                                                       if (isStart) {
-                                                               if (allDay) {
-                                                                       // convert event to temporary slot-event
-                                                                       eventElement.width(colWidth - 10); // don't use entire width
-                                                                       setOuterHeight(
-                                                                               eventElement,
-                                                                               snapHeight * Math.round(
-                                                                                       (event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes')) /
-                                                                                               snapMinutes
-                                                                               )
-                                                                       );
-                                                                       eventElement.draggable('option', 'grid', [colWidth, 1]);
-                                                                       allDay = false;
-                                                               }
-                                                       }else{
-                                                               revert = true;
-                                                       }
-                                               }
-                                               revert = revert || (allDay && !dayDelta);
-                                       }else{
-                                               resetElement();
-                                               revert = true;
-                                       }
-                                       eventElement.draggable('option', 'revert', revert);
-                               }, ev, 'drag');
-                       },
-                       stop: function(ev, ui) {
-                               hoverListener.stop();
-                               clearOverlays();
-                               trigger('eventDragStop', eventElement, event, ev, ui);
-                               if (revert) {
-                                       // hasn't moved or is out of bounds (draggable has already reverted)
-                                       resetElement();
-                                       eventElement.css('filter', ''); // clear IE opacity side-effects
-                                       showEvents(event, eventElement);
-                               }else{
-                                       // changed!
-                                       var minuteDelta = 0;
-                                       if (!allDay) {
-                                               minuteDelta = Math.round((eventElement.offset().top - getSlotContainer().offset().top) / snapHeight)
-                                                       * snapMinutes
-                                                       + minMinute
-                                                       - (event.start.getHours() * 60 + event.start.getMinutes());
-                                       }
-                                       eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui);
-                               }
-                       }
-               });
-               function resetElement() {
-                       if (!allDay) {
-                               eventElement
-                                       .width(origWidth)
-                                       .height('')
-                                       .draggable('option', 'grid', null);
-                               allDay = true;
-                       }
-               }
-       }
-       
-       
-       // when event starts out IN TIMESLOTS
-       
-       function draggableSlotEvent(event, eventElement, timeElement) {
-               var coordinateGrid = t.getCoordinateGrid();
-               var colCnt = getColCnt();
-               var colWidth = getColWidth();
-               var snapHeight = getSnapHeight();
-               var snapMinutes = getSnapMinutes();
-
-               // states
-               var origPosition; // original position of the element, not the mouse
-               var origCell;
-               var isInBounds, prevIsInBounds;
-               var isAllDay, prevIsAllDay;
-               var colDelta, prevColDelta;
-               var dayDelta; // derived from colDelta
-               var minuteDelta, prevMinuteDelta;
-
-               eventElement.draggable({
-                       scroll: false,
-                       grid: [ colWidth, snapHeight ],
-                       axis: colCnt==1 ? 'y' : false,
-                       opacity: opt('dragOpacity'),
-                       revertDuration: opt('dragRevertDuration'),
-                       start: function(ev, ui) {
-
-                               trigger('eventDragStart', eventElement, event, ev, ui);
-                               hideEvents(event, eventElement);
-
-                               coordinateGrid.build();
-
-                               // initialize states
-                               origPosition = eventElement.position();
-                               origCell = coordinateGrid.cell(ev.pageX, ev.pageY);
-                               isInBounds = prevIsInBounds = true;
-                               isAllDay = prevIsAllDay = getIsCellAllDay(origCell);
-                               colDelta = prevColDelta = 0;
-                               dayDelta = 0;
-                               minuteDelta = prevMinuteDelta = 0;
+       setScroll: function(top) {
+               this.scroller.setScrollTop(top);
+       },
 
-                       },
-                       drag: function(ev, ui) {
-
-                               // NOTE: this `cell` value is only useful for determining in-bounds and all-day.
-                               // Bad for anything else due to the discrepancy between the mouse position and the
-                               // element position while snapping. (problem revealed in PR #55)
-                               //
-                               // PS- the problem exists for draggableDayEvent() when dragging an all-day event to a slot event.
-                               // We should overhaul the dragging system and stop relying on jQuery UI.
-                               var cell = coordinateGrid.cell(ev.pageX, ev.pageY);
-
-                               // update states
-                               isInBounds = !!cell;
-                               if (isInBounds) {
-                                       isAllDay = getIsCellAllDay(cell);
-
-                                       // calculate column delta
-                                       colDelta = Math.round((ui.position.left - origPosition.left) / colWidth);
-                                       if (colDelta != prevColDelta) {
-                                               // calculate the day delta based off of the original clicked column and the column delta
-                                               var origDate = cellToDate(0, origCell.col);
-                                               var col = origCell.col + colDelta;
-                                               col = Math.max(0, col);
-                                               col = Math.min(colCnt-1, col);
-                                               var date = cellToDate(0, col);
-                                               dayDelta = dayDiff(date, origDate);
-                                       }
 
-                                       // calculate minute delta (only if over slots)
-                                       if (!isAllDay) {
-                                               minuteDelta = Math.round((ui.position.top - origPosition.top) / snapHeight) * snapMinutes;
-                                       }
-                               }
+       /* Hit Areas
+       ------------------------------------------------------------------------------------------------------------------*/
+       // forward all hit-related method calls to dayGrid
 
-                               // any state changes?
-                               if (
-                                       isInBounds != prevIsInBounds ||
-                                       isAllDay != prevIsAllDay ||
-                                       colDelta != prevColDelta ||
-                                       minuteDelta != prevMinuteDelta
-                               ) {
 
-                                       updateUI();
+       prepareHits: function() {
+               this.dayGrid.prepareHits();
+       },
 
-                                       // update previous states for next time
-                                       prevIsInBounds = isInBounds;
-                                       prevIsAllDay = isAllDay;
-                                       prevColDelta = colDelta;
-                                       prevMinuteDelta = minuteDelta;
-                               }
 
-                               // if out-of-bounds, revert when done, and vice versa.
-                               eventElement.draggable('option', 'revert', !isInBounds);
+       releaseHits: function() {
+               this.dayGrid.releaseHits();
+       },
 
-                       },
-                       stop: function(ev, ui) {
 
-                               clearOverlays();
-                               trigger('eventDragStop', eventElement, event, ev, ui);
+       queryHit: function(left, top) {
+               return this.dayGrid.queryHit(left, top);
+       },
 
-                               if (isInBounds && (isAllDay || dayDelta || minuteDelta)) { // changed!
-                                       eventDrop(this, event, dayDelta, isAllDay ? 0 : minuteDelta, isAllDay, ev, ui);
-                               }
-                               else { // either no change or out-of-bounds (draggable has already reverted)
 
-                                       // reset states for next time, and for updateUI()
-                                       isInBounds = true;
-                                       isAllDay = false;
-                                       colDelta = 0;
-                                       dayDelta = 0;
-                                       minuteDelta = 0;
+       getHitSpan: function(hit) {
+               return this.dayGrid.getHitSpan(hit);
+       },
 
-                                       updateUI();
-                                       eventElement.css('filter', ''); // clear IE opacity side-effects
 
-                                       // sometimes fast drags make event revert to wrong position, so reset.
-                                       // also, if we dragged the element out of the area because of snapping,
-                                       // but the *mouse* is still in bounds, we need to reset the position.
-                                       eventElement.css(origPosition);
+       getHitEl: function(hit) {
+               return this.dayGrid.getHitEl(hit);
+       },
 
-                                       showEvents(event, eventElement);
-                               }
-                       }
-               });
 
-               function updateUI() {
-                       clearOverlays();
-                       if (isInBounds) {
-                               if (isAllDay) {
-                                       timeElement.hide();
-                                       eventElement.draggable('option', 'grid', null); // disable grid snapping
-                                       renderDayOverlay(
-                                               addDays(cloneDate(event.start), dayDelta),
-                                               addDays(exclEndDay(event), dayDelta)
-                                       );
-                               }
-                               else {
-                                       updateTimeText(minuteDelta);
-                                       timeElement.css('display', ''); // show() was causing display=inline
-                                       eventElement.draggable('option', 'grid', [colWidth, snapHeight]); // re-enable grid snapping
-                               }
-                       }
-               }
+       /* Events
+       ------------------------------------------------------------------------------------------------------------------*/
 
-               function updateTimeText(minuteDelta) {
-                       var newStart = addMinutes(cloneDate(event.start), minuteDelta);
-                       var newEnd;
-                       if (event.end) {
-                               newEnd = addMinutes(cloneDate(event.end), minuteDelta);
-                       }
-                       timeElement.text(formatDates(newStart, newEnd, opt('timeFormat')));
-               }
 
-       }
-       
-       
-       
-       /* Resizing
-       --------------------------------------------------------------------------------------*/
-       
-       
-       function resizableSlotEvent(event, eventElement, timeElement) {
-               var snapDelta, prevSnapDelta;
-               var snapHeight = getSnapHeight();
-               var snapMinutes = getSnapMinutes();
-               eventElement.resizable({
-                       handles: {
-                               s: '.ui-resizable-handle'
-                       },
-                       grid: snapHeight,
-                       start: function(ev, ui) {
-                               snapDelta = prevSnapDelta = 0;
-                               hideEvents(event, eventElement);
-                               trigger('eventResizeStart', this, event, ev, ui);
-                       },
-                       resize: function(ev, ui) {
-                               // don't rely on ui.size.height, doesn't take grid into account
-                               snapDelta = Math.round((Math.max(snapHeight, eventElement.height()) - ui.originalSize.height) / snapHeight);
-                               if (snapDelta != prevSnapDelta) {
-                                       timeElement.text(
-                                               formatDates(
-                                                       event.start,
-                                                       (!snapDelta && !event.end) ? null : // no change, so don't display time range
-                                                               addMinutes(eventEnd(event), snapMinutes*snapDelta),
-                                                       opt('timeFormat')
-                                               )
-                                       );
-                                       prevSnapDelta = snapDelta;
-                               }
-                       },
-                       stop: function(ev, ui) {
-                               trigger('eventResizeStop', this, event, ev, ui);
-                               if (snapDelta) {
-                                       eventResize(this, event, 0, snapMinutes*snapDelta, ev, ui);
-                               }else{
-                                       showEvents(event, eventElement);
-                                       // BUG: if event was really short, need to put title back in span
-                               }
-                       }
-               });
-       }
-       
+       // Renders the given events onto the view and populates the segments array
+       renderEvents: function(events) {
+               this.dayGrid.renderEvents(events);
 
-}
+               this.updateHeight(); // must compensate for events that overflow the row
+       },
 
 
+       // Retrieves all segment objects that are rendered in the view
+       getEventSegs: function() {
+               return this.dayGrid.getEventSegs();
+       },
 
-/* Agenda Event Segment Utilities
------------------------------------------------------------------------------*/
 
+       // Unrenders all event elements and clears internal segment data
+       unrenderEvents: function() {
+               this.dayGrid.unrenderEvents();
 
-// Sets the seg.backwardCoord and seg.forwardCoord on each segment and returns a new
-// list in the order they should be placed into the DOM (an implicit z-index).
-function placeSlotSegs(segs) {
-       var levels = buildSlotSegLevels(segs);
-       var level0 = levels[0];
-       var i;
+               // we DON'T need to call updateHeight() because
+               // a renderEvents() call always happens after this, which will eventually call updateHeight()
+       },
 
-       computeForwardSlotSegs(levels);
 
-       if (level0) {
+       /* Dragging (for both events and external elements)
+       ------------------------------------------------------------------------------------------------------------------*/
 
-               for (i=0; i<level0.length; i++) {
-                       computeSlotSegPressures(level0[i]);
-               }
 
-               for (i=0; i<level0.length; i++) {
-                       computeSlotSegCoords(level0[i], 0, 0);
-               }
-       }
+       // A returned value of `true` signals that a mock "helper" event has been rendered.
+       renderDrag: function(dropLocation, seg) {
+               return this.dayGrid.renderDrag(dropLocation, seg);
+       },
 
-       return flattenSlotSegLevels(levels);
-}
 
+       unrenderDrag: function() {
+               this.dayGrid.unrenderDrag();
+       },
 
-// Builds an array of segments "levels". The first level will be the leftmost tier of segments
-// if the calendar is left-to-right, or the rightmost if the calendar is right-to-left.
-function buildSlotSegLevels(segs) {
-       var levels = [];
-       var i, seg;
-       var j;
 
-       for (i=0; i<segs.length; i++) {
-               seg = segs[i];
+       /* Selection
+       ------------------------------------------------------------------------------------------------------------------*/
 
-               // go through all the levels and stop on the first level where there are no collisions
-               for (j=0; j<levels.length; j++) {
-                       if (!computeSlotSegCollisions(seg, levels[j]).length) {
-                               break;
-                       }
-               }
 
-               (levels[j] || (levels[j] = [])).push(seg);
+       // Renders a visual indication of a selection
+       renderSelection: function(span) {
+               this.dayGrid.renderSelection(span);
+       },
+
+
+       // Unrenders a visual indications of a selection
+       unrenderSelection: function() {
+               this.dayGrid.unrenderSelection();
        }
 
-       return levels;
-}
+});
 
 
-// For every segment, figure out the other segments that are in subsequent
-// levels that also occupy the same vertical space. Accumulate in seg.forwardSegs
-function computeForwardSlotSegs(levels) {
-       var i, level;
-       var j, seg;
-       var k;
+// Methods that will customize the rendering behavior of the BasicView's dayGrid
+var basicDayGridMethods = {
 
-       for (i=0; i<levels.length; i++) {
-               level = levels[i];
 
-               for (j=0; j<level.length; j++) {
-                       seg = level[j];
+       // Generates the HTML that will go before the day-of week header cells
+       renderHeadIntroHtml: function() {
+               var view = this.view;
 
-                       seg.forwardSegs = [];
-                       for (k=i+1; k<levels.length; k++) {
-                               computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);
-                       }
+               if (view.colWeekNumbersVisible) {
+                       return '' +
+                               '<th class="fc-week-number ' + view.widgetHeaderClass + '" ' + view.weekNumberStyleAttr() + '>' +
+                                       '<span>' + // needed for matchCellWidths
+                                               htmlEscape(view.opt('weekNumberTitle')) +
+                                       '</span>' +
+                               '</th>';
                }
-       }
-}
 
+               return '';
+       },
 
-// Figure out which path forward (via seg.forwardSegs) results in the longest path until
-// the furthest edge is reached. The number of segments in this path will be seg.forwardPressure
-function computeSlotSegPressures(seg) {
-       var forwardSegs = seg.forwardSegs;
-       var forwardPressure = 0;
-       var i, forwardSeg;
 
-       if (seg.forwardPressure === undefined) { // not already computed
+       // Generates the HTML that will go before content-skeleton cells that display the day/week numbers
+       renderNumberIntroHtml: function(row) {
+               var view = this.view;
+               var weekStart = this.getCellDate(row, 0);
 
-               for (i=0; i<forwardSegs.length; i++) {
-                       forwardSeg = forwardSegs[i];
+               if (view.colWeekNumbersVisible) {
+                       return '' +
+                               '<td class="fc-week-number" ' + view.weekNumberStyleAttr() + '>' +
+                                       view.buildGotoAnchorHtml( // aside from link, important for matchCellWidths
+                                               { date: weekStart, type: 'week', forceOff: this.colCnt === 1 },
+                                               weekStart.format('w') // inner HTML
+                                       ) +
+                               '</td>';
+               }
 
-                       // figure out the child's maximum forward path
-                       computeSlotSegPressures(forwardSeg);
+               return '';
+       },
 
-                       // either use the existing maximum, or use the child's forward pressure
-                       // plus one (for the forwardSeg itself)
-                       forwardPressure = Math.max(
-                               forwardPressure,
-                               1 + forwardSeg.forwardPressure
-                       );
+
+       // Generates the HTML that goes before the day bg cells for each day-row
+       renderBgIntroHtml: function() {
+               var view = this.view;
+
+               if (view.colWeekNumbersVisible) {
+                       return '<td class="fc-week-number ' + view.widgetContentClass + '" ' +
+                               view.weekNumberStyleAttr() + '></td>';
                }
 
-               seg.forwardPressure = forwardPressure;
+               return '';
+       },
+
+
+       // Generates the HTML that goes before every other type of row generated by DayGrid.
+       // Affects helper-skeleton and highlight-skeleton rows.
+       renderIntroHtml: function() {
+               var view = this.view;
+
+               if (view.colWeekNumbersVisible) {
+                       return '<td class="fc-week-number" ' + view.weekNumberStyleAttr() + '></td>';
+               }
+
+               return '';
        }
-}
 
+};
 
-// Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range
-// from 0 to 1. If the calendar is left-to-right, the seg.backwardCoord maps to "left" and
-// seg.forwardCoord maps to "right" (via percentage). Vice-versa if the calendar is right-to-left.
-//
-// The segment might be part of a "series", which means consecutive segments with the same pressure
-// who's width is unknown until an edge has been hit. `seriesBackwardPressure` is the number of
-// segments behind this one in the current series, and `seriesBackwardCoord` is the starting
-// coordinate of the first segment in the series.
-function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {
-       var forwardSegs = seg.forwardSegs;
-       var i;
+;;
 
-       if (seg.forwardCoord === undefined) { // not already computed
+/* A month view with day cells running in rows (one-per-week) and columns
+----------------------------------------------------------------------------------------------------------------------*/
 
-               if (!forwardSegs.length) {
+var MonthView = FC.MonthView = BasicView.extend({
 
-                       // if there are no forward segments, this segment should butt up against the edge
-                       seg.forwardCoord = 1;
+       // Produces information about what range to display
+       computeRange: function(date) {
+               var range = BasicView.prototype.computeRange.call(this, date); // get value from super-method
+               var rowCnt;
+
+               // ensure 6 weeks
+               if (this.isFixedWeeks()) {
+                       rowCnt = Math.ceil(range.end.diff(range.start, 'weeks', true)); // could be partial weeks due to hiddenDays
+                       range.end.add(6 - rowCnt, 'weeks');
                }
-               else {
 
-                       // sort highest pressure first
-                       forwardSegs.sort(compareForwardSlotSegs);
+               return range;
+       },
 
-                       // this segment's forwardCoord will be calculated from the backwardCoord of the
-                       // highest-pressure forward segment.
-                       computeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);
-                       seg.forwardCoord = forwardSegs[0].backwardCoord;
-               }
 
-               // calculate the backwardCoord from the forwardCoord. consider the series
-               seg.backwardCoord = seg.forwardCoord -
-                       (seg.forwardCoord - seriesBackwardCoord) / // available width for series
-                       (seriesBackwardPressure + 1); // # of segments in the series
+       // Overrides the default BasicView behavior to have special multi-week auto-height logic
+       setGridHeight: function(height, isAuto) {
 
-               // use this segment's coordinates to computed the coordinates of the less-pressurized
-               // forward segments
-               for (i=0; i<forwardSegs.length; i++) {
-                       computeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);
+               // if auto, make the height of each row the height that it would be if there were 6 weeks
+               if (isAuto) {
+                       height *= this.rowCnt / 6;
                }
+
+               distributeHeight(this.dayGrid.rowEls, height, !isAuto); // if auto, don't compensate for height-hogging rows
+       },
+
+
+       isFixedWeeks: function() {
+               return this.opt('fixedWeekCount');
        }
-}
 
+});
 
-// Outputs a flat array of segments, from lowest to highest level
-function flattenSlotSegLevels(levels) {
-       var segs = [];
-       var i, level;
-       var j;
+;;
 
-       for (i=0; i<levels.length; i++) {
-               level = levels[i];
+fcViews.basic = {
+       'class': BasicView
+};
 
-               for (j=0; j<level.length; j++) {
-                       segs.push(level[j]);
-               }
+fcViews.basicDay = {
+       type: 'basic',
+       duration: { days: 1 }
+};
+
+fcViews.basicWeek = {
+       type: 'basic',
+       duration: { weeks: 1 }
+};
+
+fcViews.month = {
+       'class': MonthView,
+       duration: { months: 1 }, // important for prev/next
+       defaults: {
+               fixedWeekCount: true
        }
+};
+;;
 
-       return segs;
-}
+/* An abstract class for all agenda-related views. Displays one more columns with time slots running vertically.
+----------------------------------------------------------------------------------------------------------------------*/
+// Is a manager for the TimeGrid subcomponent and possibly the DayGrid subcomponent (if allDaySlot is on).
+// Responsible for managing width/height.
 
+var AgendaView = FC.AgendaView = View.extend({
 
-// Find all the segments in `otherSegs` that vertically collide with `seg`.
-// Append into an optionally-supplied `results` array and return.
-function computeSlotSegCollisions(seg, otherSegs, results) {
-       results = results || [];
+       scroller: null,
 
-       for (var i=0; i<otherSegs.length; i++) {
-               if (isSlotSegCollision(seg, otherSegs[i])) {
-                       results.push(otherSegs[i]);
+       timeGridClass: TimeGrid, // class used to instantiate the timeGrid. subclasses can override
+       timeGrid: null, // the main time-grid subcomponent of this view
+
+       dayGridClass: DayGrid, // class used to instantiate the dayGrid. subclasses can override
+       dayGrid: null, // the "all-day" subcomponent. if all-day is turned off, this will be null
+
+       axisWidth: null, // the width of the time axis running down the side
+
+       headContainerEl: null, // div that hold's the timeGrid's rendered date header
+       noScrollRowEls: null, // set of fake row elements that must compensate when scroller has scrollbars
+
+       // when the time-grid isn't tall enough to occupy the given height, we render an <hr> underneath
+       bottomRuleEl: null,
+
+
+       initialize: function() {
+               this.timeGrid = this.instantiateTimeGrid();
+
+               if (this.opt('allDaySlot')) { // should we display the "all-day" area?
+                       this.dayGrid = this.instantiateDayGrid(); // the all-day subcomponent of this view
                }
-       }
 
-       return results;
-}
+               this.scroller = new Scroller({
+                       overflowX: 'hidden',
+                       overflowY: 'auto'
+               });
+       },
 
 
-// Do these segments occupy the same vertical space?
-function isSlotSegCollision(seg1, seg2) {
-       return seg1.end > seg2.start && seg1.start < seg2.end;
-}
+       // Instantiates the TimeGrid object this view needs. Draws from this.timeGridClass
+       instantiateTimeGrid: function() {
+               var subclass = this.timeGridClass.extend(agendaTimeGridMethods);
 
+               return new subclass(this);
+       },
 
-// A cmp function for determining which forward segment to rely on more when computing coordinates.
-function compareForwardSlotSegs(seg1, seg2) {
-       // put higher-pressure first
-       return seg2.forwardPressure - seg1.forwardPressure ||
-               // put segments that are closer to initial edge first (and favor ones with no coords yet)
-               (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||
-               // do normal sorting...
-               compareSlotSegs(seg1, seg2);
-}
 
+       // Instantiates the DayGrid object this view might need. Draws from this.dayGridClass
+       instantiateDayGrid: function() {
+               var subclass = this.dayGridClass.extend(agendaDayGridMethods);
 
-// A cmp function for determining which segment should be closer to the initial edge
-// (the left edge on a left-to-right calendar).
-function compareSlotSegs(seg1, seg2) {
-       return seg1.start - seg2.start || // earlier start time goes first
-               (seg2.end - seg2.start) - (seg1.end - seg1.start) || // tie? longer-duration goes first
-               (seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title
-}
+               return new subclass(this);
+       },
 
 
-;;
+       /* Rendering
+       ------------------------------------------------------------------------------------------------------------------*/
 
 
-function View(element, calendar, viewName) {
-       var t = this;
-       
-       
-       // exports
-       t.element = element;
-       t.calendar = calendar;
-       t.name = viewName;
-       t.opt = opt;
-       t.trigger = trigger;
-       t.isEventDraggable = isEventDraggable;
-       t.isEventResizable = isEventResizable;
-       t.setEventData = setEventData;
-       t.clearEventData = clearEventData;
-       t.eventEnd = eventEnd;
-       t.reportEventElement = reportEventElement;
-       t.triggerEventDestroy = triggerEventDestroy;
-       t.eventElementHandlers = eventElementHandlers;
-       t.showEvents = showEvents;
-       t.hideEvents = hideEvents;
-       t.eventDrop = eventDrop;
-       t.eventResize = eventResize;
-       // t.title
-       // t.start, t.end
-       // t.visStart, t.visEnd
-       
-       
-       // imports
-       var defaultEventEnd = t.defaultEventEnd;
-       var normalizeEvent = calendar.normalizeEvent; // in EventManager
-       var reportEventChange = calendar.reportEventChange;
-       
-       
-       // locals
-       var eventsByID = {}; // eventID mapped to array of events (there can be multiple b/c of repeating events)
-       var eventElementsByID = {}; // eventID mapped to array of jQuery elements
-       var eventElementCouples = []; // array of objects, { event, element } // TODO: unify with segment system
-       var options = calendar.options;
-       
-       
-       
-       function opt(name, viewNameOverride) {
-               var v = options[name];
-               if ($.isPlainObject(v)) {
-                       return smartProperty(v, viewNameOverride || viewName);
+       // Sets the display range and computes all necessary dates
+       setRange: function(range) {
+               View.prototype.setRange.call(this, range); // call the super-method
+
+               this.timeGrid.setRange(range);
+               if (this.dayGrid) {
+                       this.dayGrid.setRange(range);
                }
-               return v;
-       }
+       },
 
-       
-       function trigger(name, thisObj) {
-               return calendar.trigger.apply(
-                       calendar,
-                       [name, thisObj || t].concat(Array.prototype.slice.call(arguments, 2), [t])
-               );
-       }
-       
 
+       // Renders the view into `this.el`, which has already been assigned
+       renderDates: function() {
 
-       /* Event Editable Boolean Calculations
-       ------------------------------------------------------------------------------*/
+               this.el.addClass('fc-agenda-view').html(this.renderSkeletonHtml());
+               this.renderHead();
 
-       
-       function isEventDraggable(event) {
-               var source = event.source || {};
-               return firstDefined(
-                               event.startEditable,
-                               source.startEditable,
-                               opt('eventStartEditable'),
-                               event.editable,
-                               source.editable,
-                               opt('editable')
-                       )
-                       && !opt('disableDragging'); // deprecated
-       }
-       
-       
-       function isEventResizable(event) { // but also need to make sure the seg.isEnd == true
-               var source = event.source || {};
-               return firstDefined(
-                               event.durationEditable,
-                               source.durationEditable,
-                               opt('eventDurationEditable'),
-                               event.editable,
-                               source.editable,
-                               opt('editable')
-                       )
-                       && !opt('disableResizing'); // deprecated
-       }
-       
-       
-       
-       /* Event Data
-       ------------------------------------------------------------------------------*/
-       
-       
-       function setEventData(events) { // events are already normalized at this point
-               eventsByID = {};
-               var i, len=events.length, event;
-               for (i=0; i<len; i++) {
-                       event = events[i];
-                       if (eventsByID[event._id]) {
-                               eventsByID[event._id].push(event);
-                       }else{
-                               eventsByID[event._id] = [event];
-                       }
-               }
-       }
+               this.scroller.render();
+               var timeGridWrapEl = this.scroller.el.addClass('fc-time-grid-container');
+               var timeGridEl = $('<div class="fc-time-grid" />').appendTo(timeGridWrapEl);
+               this.el.find('.fc-body > tr > td').append(timeGridWrapEl);
 
+               this.timeGrid.setElement(timeGridEl);
+               this.timeGrid.renderDates();
 
-       function clearEventData() {
-               eventsByID = {};
-               eventElementsByID = {};
-               eventElementCouples = [];
-       }
-       
-       
-       // returns a Date object for an event's end
-       function eventEnd(event) {
-               return event.end ? cloneDate(event.end) : defaultEventEnd(event);
-       }
-       
-       
-       
-       /* Event Elements
-       ------------------------------------------------------------------------------*/
-       
-       
-       // report when view creates an element for an event
-       function reportEventElement(event, element) {
-               eventElementCouples.push({ event: event, element: element });
-               if (eventElementsByID[event._id]) {
-                       eventElementsByID[event._id].push(element);
-               }else{
-                       eventElementsByID[event._id] = [element];
-               }
-       }
+               // the <hr> that sometimes displays under the time-grid
+               this.bottomRuleEl = $('<hr class="fc-divider ' + this.widgetHeaderClass + '"/>')
+                       .appendTo(this.timeGrid.el); // inject it into the time-grid
 
+               if (this.dayGrid) {
+                       this.dayGrid.setElement(this.el.find('.fc-day-grid'));
+                       this.dayGrid.renderDates();
 
-       function triggerEventDestroy() {
-               $.each(eventElementCouples, function(i, couple) {
-                       t.trigger('eventDestroy', couple.event, couple.event, couple.element);
-               });
-       }
-       
-       
-       // attaches eventClick, eventMouseover, eventMouseout
-       function eventElementHandlers(event, eventElement) {
-               eventElement
-                       .click(function(ev) {
-                               if (!eventElement.hasClass('ui-draggable-dragging') &&
-                                       !eventElement.hasClass('ui-resizable-resizing')) {
-                                               return trigger('eventClick', this, event, ev);
-                                       }
-                       })
-                       .hover(
-                               function(ev) {
-                                       trigger('eventMouseover', this, event, ev);
-                               },
-                               function(ev) {
-                                       trigger('eventMouseout', this, event, ev);
-                               }
-                       );
-               // TODO: don't fire eventMouseover/eventMouseout *while* dragging is occuring (on subject element)
-               // TODO: same for resizing
-       }
-       
-       
-       function showEvents(event, exceptElement) {
-               eachEventElement(event, exceptElement, 'show');
-       }
-       
-       
-       function hideEvents(event, exceptElement) {
-               eachEventElement(event, exceptElement, 'hide');
-       }
-       
-       
-       function eachEventElement(event, exceptElement, funcName) {
-               // NOTE: there may be multiple events per ID (repeating events)
-               // and multiple segments per event
-               var elements = eventElementsByID[event._id],
-                       i, len = elements.length;
-               for (i=0; i<len; i++) {
-                       if (!exceptElement || elements[i][0] != exceptElement[0]) {
-                               elements[i][funcName]();
-                       }
-               }
-       }
-       
-       
-       
-       /* Event Modification Reporting
-       ---------------------------------------------------------------------------------*/
-       
-       
-       function eventDrop(e, event, dayDelta, minuteDelta, allDay, ev, ui) {
-               var oldAllDay = event.allDay;
-               var eventId = event._id;
-               moveEvents(eventsByID[eventId], dayDelta, minuteDelta, allDay);
-               trigger(
-                       'eventDrop',
-                       e,
-                       event,
-                       dayDelta,
-                       minuteDelta,
-                       allDay,
-                       function() {
-                               // TODO: investigate cases where this inverse technique might not work
-                               moveEvents(eventsByID[eventId], -dayDelta, -minuteDelta, oldAllDay);
-                               reportEventChange(eventId);
-                       },
-                       ev,
-                       ui
-               );
-               reportEventChange(eventId);
-       }
-       
-       
-       function eventResize(e, event, dayDelta, minuteDelta, ev, ui) {
-               var eventId = event._id;
-               elongateEvents(eventsByID[eventId], dayDelta, minuteDelta);
-               trigger(
-                       'eventResize',
-                       e,
-                       event,
-                       dayDelta,
-                       minuteDelta,
-                       function() {
-                               // TODO: investigate cases where this inverse technique might not work
-                               elongateEvents(eventsByID[eventId], -dayDelta, -minuteDelta);
-                               reportEventChange(eventId);
-                       },
-                       ev,
-                       ui
-               );
-               reportEventChange(eventId);
-       }
-       
-       
-       
-       /* Event Modification Math
-       ---------------------------------------------------------------------------------*/
-       
-       
-       function moveEvents(events, dayDelta, minuteDelta, allDay) {
-               minuteDelta = minuteDelta || 0;
-               for (var e, len=events.length, i=0; i<len; i++) {
-                       e = events[i];
-                       if (allDay !== undefined) {
-                               e.allDay = allDay;
-                       }
-                       addMinutes(addDays(e.start, dayDelta, true), minuteDelta);
-                       if (e.end) {
-                               e.end = addMinutes(addDays(e.end, dayDelta, true), minuteDelta);
-                       }
-                       normalizeEvent(e, options);
+                       // have the day-grid extend it's coordinate area over the <hr> dividing the two grids
+                       this.dayGrid.bottomCoordPadding = this.dayGrid.el.next('hr').outerHeight();
                }
-       }
-       
-       
-       function elongateEvents(events, dayDelta, minuteDelta) {
-               minuteDelta = minuteDelta || 0;
-               for (var e, len=events.length, i=0; i<len; i++) {
-                       e = events[i];
-                       e.end = addMinutes(addDays(eventEnd(e), dayDelta, true), minuteDelta);
-                       normalizeEvent(e, options);
-               }
-       }
-
 
+               this.noScrollRowEls = this.el.find('.fc-row:not(.fc-scroller *)'); // fake rows not within the scroller
+       },
 
-       // ====================================================================================================
-       // Utilities for day "cells"
-       // ====================================================================================================
-       // The "basic" views are completely made up of day cells.
-       // The "agenda" views have day cells at the top "all day" slot.
-       // This was the obvious common place to put these utilities, but they should be abstracted out into
-       // a more meaningful class (like DayEventRenderer).
-       // ====================================================================================================
 
+       // render the day-of-week headers
+       renderHead: function() {
+               this.headContainerEl =
+                       this.el.find('.fc-head-container')
+                               .html(this.timeGrid.renderHeadHtml());
+       },
 
-       // For determining how a given "cell" translates into a "date":
-       //
-       // 1. Convert the "cell" (row and column) into a "cell offset" (the # of the cell, cronologically from the first).
-       //    Keep in mind that column indices are inverted with isRTL. This is taken into account.
-       //
-       // 2. Convert the "cell offset" to a "day offset" (the # of days since the first visible day in the view).
-       //
-       // 3. Convert the "day offset" into a "date" (a JavaScript Date object).
-       //
-       // The reverse transformation happens when transforming a date into a cell.
 
+       // Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,
+       // always completely kill each grid's rendering.
+       unrenderDates: function() {
+               this.timeGrid.unrenderDates();
+               this.timeGrid.removeElement();
 
-       // exports
-       t.isHiddenDay = isHiddenDay;
-       t.skipHiddenDays = skipHiddenDays;
-       t.getCellsPerWeek = getCellsPerWeek;
-       t.dateToCell = dateToCell;
-       t.dateToDayOffset = dateToDayOffset;
-       t.dayOffsetToCellOffset = dayOffsetToCellOffset;
-       t.cellOffsetToCell = cellOffsetToCell;
-       t.cellToDate = cellToDate;
-       t.cellToCellOffset = cellToCellOffset;
-       t.cellOffsetToDayOffset = cellOffsetToDayOffset;
-       t.dayOffsetToDate = dayOffsetToDate;
-       t.rangeToSegments = rangeToSegments;
-
-
-       // internals
-       var hiddenDays = opt('hiddenDays') || []; // array of day-of-week indices that are hidden
-       var isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)
-       var cellsPerWeek;
-       var dayToCellMap = []; // hash from dayIndex -> cellIndex, for one week
-       var cellToDayMap = []; // hash from cellIndex -> dayIndex, for one week
-       var isRTL = opt('isRTL');
-
-
-       // initialize important internal variables
-       (function() {
-
-               if (opt('weekends') === false) {
-                       hiddenDays.push(0, 6); // 0=sunday, 6=saturday
+               if (this.dayGrid) {
+                       this.dayGrid.unrenderDates();
+                       this.dayGrid.removeElement();
                }
 
-               // Loop through a hypothetical week and determine which
-               // days-of-week are hidden. Record in both hashes (one is the reverse of the other).
-               for (var dayIndex=0, cellIndex=0; dayIndex<7; dayIndex++) {
-                       dayToCellMap[dayIndex] = cellIndex;
-                       isHiddenDayHash[dayIndex] = $.inArray(dayIndex, hiddenDays) != -1;
-                       if (!isHiddenDayHash[dayIndex]) {
-                               cellToDayMap[cellIndex] = dayIndex;
-                               cellIndex++;
-                       }
-               }
+               this.scroller.destroy();
+       },
 
-               cellsPerWeek = cellIndex;
-               if (!cellsPerWeek) {
-                       throw 'invalid hiddenDays'; // all days were hidden? bad.
-               }
 
-       })();
+       // Builds the HTML skeleton for the view.
+       // The day-grid and time-grid components will render inside containers defined by this HTML.
+       renderSkeletonHtml: function() {
+               return '' +
+                       '<table>' +
+                               '<thead class="fc-head">' +
+                                       '<tr>' +
+                                               '<td class="fc-head-container ' + this.widgetHeaderClass + '"></td>' +
+                                       '</tr>' +
+                               '</thead>' +
+                               '<tbody class="fc-body">' +
+                                       '<tr>' +
+                                               '<td class="' + this.widgetContentClass + '">' +
+                                                       (this.dayGrid ?
+                                                               '<div class="fc-day-grid"/>' +
+                                                               '<hr class="fc-divider ' + this.widgetHeaderClass + '"/>' :
+                                                               ''
+                                                               ) +
+                                               '</td>' +
+                                       '</tr>' +
+                               '</tbody>' +
+                       '</table>';
+       },
 
 
-       // Is the current day hidden?
-       // `day` is a day-of-week index (0-6), or a Date object
-       function isHiddenDay(day) {
-               if (typeof day == 'object') {
-                       day = day.getDay();
+       // Generates an HTML attribute string for setting the width of the axis, if it is known
+       axisStyleAttr: function() {
+               if (this.axisWidth !== null) {
+                        return 'style="width:' + this.axisWidth + 'px"';
                }
-               return isHiddenDayHash[day];
-       }
+               return '';
+       },
 
 
-       function getCellsPerWeek() {
-               return cellsPerWeek;
-       }
+       /* Business Hours
+       ------------------------------------------------------------------------------------------------------------------*/
 
 
-       // Keep incrementing the current day until it is no longer a hidden day.
-       // If the initial value of `date` is not a hidden day, don't do anything.
-       // Pass `isExclusive` as `true` if you are dealing with an end date.
-       // `inc` defaults to `1` (increment one day forward each time)
-       function skipHiddenDays(date, inc, isExclusive) {
-               inc = inc || 1;
-               while (
-                       isHiddenDayHash[ ( date.getDay() + (isExclusive ? inc : 0) + 7 ) % 7 ]
-               ) {
-                       addDays(date, inc);
+       renderBusinessHours: function() {
+               this.timeGrid.renderBusinessHours();
+
+               if (this.dayGrid) {
+                       this.dayGrid.renderBusinessHours();
                }
-       }
+       },
 
 
-       //
-       // TRANSFORMATIONS: cell -> cell offset -> day offset -> date
-       //
+       unrenderBusinessHours: function() {
+               this.timeGrid.unrenderBusinessHours();
 
-       // cell -> date (combines all transformations)
-       // Possible arguments:
-       // - row, col
-       // - { row:#, col: # }
-       function cellToDate() {
-               var cellOffset = cellToCellOffset.apply(null, arguments);
-               var dayOffset = cellOffsetToDayOffset(cellOffset);
-               var date = dayOffsetToDate(dayOffset);
-               return date;
-       }
+               if (this.dayGrid) {
+                       this.dayGrid.unrenderBusinessHours();
+               }
+       },
 
-       // cell -> cell offset
-       // Possible arguments:
-       // - row, col
-       // - { row:#, col:# }
-       function cellToCellOffset(row, col) {
-               var colCnt = t.getColCnt();
 
-               // rtl variables. wish we could pre-populate these. but where?
-               var dis = isRTL ? -1 : 1;
-               var dit = isRTL ? colCnt - 1 : 0;
+       /* Now Indicator
+       ------------------------------------------------------------------------------------------------------------------*/
 
-               if (typeof row == 'object') {
-                       col = row.col;
-                       row = row.row;
-               }
-               var cellOffset = row * colCnt + (col * dis + dit); // column, adjusted for RTL (dis & dit)
 
-               return cellOffset;
-       }
+       getNowIndicatorUnit: function() {
+               return this.timeGrid.getNowIndicatorUnit();
+       },
 
-       // cell offset -> day offset
-       function cellOffsetToDayOffset(cellOffset) {
-               var day0 = t.visStart.getDay(); // first date's day of week
-               cellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week
-               return Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks
-                       + cellToDayMap[ // # of days from partial last week
-                               (cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets
-                       ]
-                       - day0; // adjustment for beginning-of-week normalization
-       }
 
-       // day offset -> date (JavaScript Date object)
-       function dayOffsetToDate(dayOffset) {
-               var date = cloneDate(t.visStart);
-               addDays(date, dayOffset);
-               return date;
-       }
+       renderNowIndicator: function(date) {
+               this.timeGrid.renderNowIndicator(date);
+       },
 
 
-       //
-       // TRANSFORMATIONS: date -> day offset -> cell offset -> cell
-       //
+       unrenderNowIndicator: function() {
+               this.timeGrid.unrenderNowIndicator();
+       },
 
-       // date -> cell (combines all transformations)
-       function dateToCell(date) {
-               var dayOffset = dateToDayOffset(date);
-               var cellOffset = dayOffsetToCellOffset(dayOffset);
-               var cell = cellOffsetToCell(cellOffset);
-               return cell;
-       }
 
-       // date -> day offset
-       function dateToDayOffset(date) {
-               return dayDiff(date, t.visStart);
-       }
+       /* Dimensions
+       ------------------------------------------------------------------------------------------------------------------*/
 
-       // day offset -> cell offset
-       function dayOffsetToCellOffset(dayOffset) {
-               var day0 = t.visStart.getDay(); // first date's day of week
-               dayOffset += day0; // normalize dayOffset to beginning-of-week
-               return Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks
-                       + dayToCellMap[ // # of cells from partial last week
-                               (dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets
-                       ]
-                       - dayToCellMap[day0]; // adjustment for beginning-of-week normalization
-       }
 
-       // cell offset -> cell (object with row & col keys)
-       function cellOffsetToCell(cellOffset) {
-               var colCnt = t.getColCnt();
+       updateSize: function(isResize) {
+               this.timeGrid.updateSize(isResize);
 
-               // rtl variables. wish we could pre-populate these. but where?
-               var dis = isRTL ? -1 : 1;
-               var dit = isRTL ? colCnt - 1 : 0;
+               View.prototype.updateSize.call(this, isResize); // call the super-method
+       },
 
-               var row = Math.floor(cellOffset / colCnt);
-               var col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)
-               return {
-                       row: row,
-                       col: col
-               };
-       }
 
+       // Refreshes the horizontal dimensions of the view
+       updateWidth: function() {
+               // make all axis cells line up, and record the width so newly created axis cells will have it
+               this.axisWidth = matchCellWidths(this.el.find('.fc-axis'));
+       },
 
-       //
-       // Converts a date range into an array of segment objects.
-       // "Segments" are horizontal stretches of time, sliced up by row.
-       // A segment object has the following properties:
-       // - row
-       // - cols
-       // - isStart
-       // - isEnd
-       //
-       function rangeToSegments(startDate, endDate) {
-               var rowCnt = t.getRowCnt();
-               var colCnt = t.getColCnt();
-               var segments = []; // array of segments to return
 
-               // day offset for given date range
-               var rangeDayOffsetStart = dateToDayOffset(startDate);
-               var rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive
+       // Adjusts the vertical dimensions of the view to the specified values
+       setHeight: function(totalHeight, isAuto) {
+               var eventLimit;
+               var scrollerHeight;
+               var scrollbarWidths;
+
+               // reset all dimensions back to the original state
+               this.bottomRuleEl.hide(); // .show() will be called later if this <hr> is necessary
+               this.scroller.clear(); // sets height to 'auto' and clears overflow
+               uncompensateScroll(this.noScrollRowEls);
 
-               // first and last cell offset for the given date range
-               // "last" implies inclusivity
-               var rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);
-               var rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;
+               // limit number of events in the all-day area
+               if (this.dayGrid) {
+                       this.dayGrid.removeSegPopover(); // kill the "more" popover if displayed
 
-               // loop through all the rows in the view
-               for (var row=0; row<rowCnt; row++) {
+                       eventLimit = this.opt('eventLimit');
+                       if (eventLimit && typeof eventLimit !== 'number') {
+                               eventLimit = AGENDA_ALL_DAY_EVENT_LIMIT; // make sure "auto" goes to a real number
+                       }
+                       if (eventLimit) {
+                               this.dayGrid.limitRows(eventLimit);
+                       }
+               }
 
-                       // first and last cell offset for the row
-                       var rowCellOffsetFirst = row * colCnt;
-                       var rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;
+               if (!isAuto) { // should we force dimensions of the scroll container?
 
-                       // get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row
-                       var segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);
-                       var segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);
+                       scrollerHeight = this.computeScrollerHeight(totalHeight);
+                       this.scroller.setHeight(scrollerHeight);
+                       scrollbarWidths = this.scroller.getScrollbarWidths();
 
-                       // make sure segment's offsets are valid and in view
-                       if (segmentCellOffsetFirst <= segmentCellOffsetLast) {
+                       if (scrollbarWidths.left || scrollbarWidths.right) { // using scrollbars?
 
-                               // translate to cells
-                               var segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);
-                               var segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);
+                               // make the all-day and header rows lines up
+                               compensateScroll(this.noScrollRowEls, scrollbarWidths);
 
-                               // view might be RTL, so order by leftmost column
-                               var cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();
+                               // the scrollbar compensation might have changed text flow, which might affect height, so recalculate
+                               // and reapply the desired height to the scroller.
+                               scrollerHeight = this.computeScrollerHeight(totalHeight);
+                               this.scroller.setHeight(scrollerHeight);
+                       }
 
-                               // Determine if segment's first/last cell is the beginning/end of the date range.
-                               // We need to compare "day offset" because "cell offsets" are often ambiguous and
-                               // can translate to multiple days, and an edge case reveals itself when we the
-                               // range's first cell is hidden (we don't want isStart to be true).
-                               var isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;
-                               var isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively
+                       // guarantees the same scrollbar widths
+                       this.scroller.lockOverflow(scrollbarWidths);
 
-                               segments.push({
-                                       row: row,
-                                       leftCol: cols[0],
-                                       rightCol: cols[1],
-                                       isStart: isStart,
-                                       isEnd: isEnd
-                               });
+                       // if there's any space below the slats, show the horizontal rule.
+                       // this won't cause any new overflow, because lockOverflow already called.
+                       if (this.timeGrid.getTotalSlatHeight() < scrollerHeight) {
+                               this.bottomRuleEl.show();
                        }
                }
+       },
 
-               return segments;
-       }
-       
 
-}
+       // given a desired total height of the view, returns what the height of the scroller should be
+       computeScrollerHeight: function(totalHeight) {
+               return totalHeight -
+                       subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller
+       },
 
-;;
 
-function DayEventRenderer() {
-       var t = this;
+       /* Scroll
+       ------------------------------------------------------------------------------------------------------------------*/
 
-       
-       // exports
-       t.renderDayEvents = renderDayEvents;
-       t.draggableDayEvent = draggableDayEvent; // made public so that subclasses can override
-       t.resizableDayEvent = resizableDayEvent; // "
-       
-       
-       // imports
-       var opt = t.opt;
-       var trigger = t.trigger;
-       var isEventDraggable = t.isEventDraggable;
-       var isEventResizable = t.isEventResizable;
-       var eventEnd = t.eventEnd;
-       var reportEventElement = t.reportEventElement;
-       var eventElementHandlers = t.eventElementHandlers;
-       var showEvents = t.showEvents;
-       var hideEvents = t.hideEvents;
-       var eventDrop = t.eventDrop;
-       var eventResize = t.eventResize;
-       var getRowCnt = t.getRowCnt;
-       var getColCnt = t.getColCnt;
-       var getColWidth = t.getColWidth;
-       var allDayRow = t.allDayRow; // TODO: rename
-       var colLeft = t.colLeft;
-       var colRight = t.colRight;
-       var colContentLeft = t.colContentLeft;
-       var colContentRight = t.colContentRight;
-       var dateToCell = t.dateToCell;
-       var getDaySegmentContainer = t.getDaySegmentContainer;
-       var formatDates = t.calendar.formatDates;
-       var renderDayOverlay = t.renderDayOverlay;
-       var clearOverlays = t.clearOverlays;
-       var clearSelection = t.clearSelection;
-       var getHoverListener = t.getHoverListener;
-       var rangeToSegments = t.rangeToSegments;
-       var cellToDate = t.cellToDate;
-       var cellToCellOffset = t.cellToCellOffset;
-       var cellOffsetToDayOffset = t.cellOffsetToDayOffset;
-       var dateToDayOffset = t.dateToDayOffset;
-       var dayOffsetToCellOffset = t.dayOffsetToCellOffset;
-
-
-       // Render `events` onto the calendar, attach mouse event handlers, and call the `eventAfterRender` callback for each.
-       // Mouse event will be lazily applied, except if the event has an ID of `modifiedEventId`.
-       // Can only be called when the event container is empty (because it wipes out all innerHTML).
-       function renderDayEvents(events, modifiedEventId) {
-
-               // do the actual rendering. Receive the intermediate "segment" data structures.
-               var segments = _renderDayEvents(
-                       events,
-                       false, // don't append event elements
-                       true // set the heights of the rows
-               );
 
-               // report the elements to the View, for general drag/resize utilities
-               segmentElementEach(segments, function(segment, element) {
-                       reportEventElement(segment.event, element);
-               });
+       // Computes the initial pre-configured scroll state prior to allowing the user to change it
+       computeInitialScroll: function() {
+               var scrollTime = moment.duration(this.opt('scrollTime'));
+               var top = this.timeGrid.computeTimeTop(scrollTime);
 
-               // attach mouse handlers
-               attachHandlers(segments, modifiedEventId);
+               // zoom can give weird floating-point values. rather scroll a little bit further
+               top = Math.ceil(top);
 
-               // call `eventAfterRender` callback for each event
-               segmentElementEach(segments, function(segment, element) {
-                       trigger('eventAfterRender', segment.event, segment.event, element);
-               });
-       }
+               if (top) {
+                       top++; // to overcome top border that slots beyond the first have. looks better
+               }
 
+               return top;
+       },
 
-       // Render an event on the calendar, but don't report them anywhere, and don't attach mouse handlers.
-       // Append this event element to the event container, which might already be populated with events.
-       // If an event's segment will have row equal to `adjustRow`, then explicitly set its top coordinate to `adjustTop`.
-       // This hack is used to maintain continuity when user is manually resizing an event.
-       // Returns an array of DOM elements for the event.
-       function renderTempDayEvent(event, adjustRow, adjustTop) {
 
-               // actually render the event. `true` for appending element to container.
-               // Recieve the intermediate "segment" data structures.
-               var segments = _renderDayEvents(
-                       [ event ],
-                       true, // append event elements
-                       false // don't set the heights of the rows
-               );
+       queryScroll: function() {
+               return this.scroller.getScrollTop();
+       },
 
-               var elements = [];
 
-               // Adjust certain elements' top coordinates
-               segmentElementEach(segments, function(segment, element) {
-                       if (segment.row === adjustRow) {
-                               element.css('top', adjustTop);
-                       }
-                       elements.push(element[0]); // accumulate DOM nodes
-               });
+       setScroll: function(top) {
+               this.scroller.setScrollTop(top);
+       },
 
-               return elements;
-       }
+
+       /* Hit Areas
+       ------------------------------------------------------------------------------------------------------------------*/
+       // forward all hit-related method calls to the grids (dayGrid might not be defined)
 
 
-       // Render events onto the calendar. Only responsible for the VISUAL aspect.
-       // Not responsible for attaching handlers or calling callbacks.
-       // Set `doAppend` to `true` for rendering elements without clearing the existing container.
-       // Set `doRowHeights` to allow setting the height of each row, to compensate for vertical event overflow.
-       function _renderDayEvents(events, doAppend, doRowHeights) {
+       prepareHits: function() {
+               this.timeGrid.prepareHits();
+               if (this.dayGrid) {
+                       this.dayGrid.prepareHits();
+               }
+       },
 
-               // where the DOM nodes will eventually end up
-               var finalContainer = getDaySegmentContainer();
 
-               // the container where the initial HTML will be rendered.
-               // If `doAppend`==true, uses a temporary container.
-               var renderContainer = doAppend ? $("<div/>") : finalContainer;
+       releaseHits: function() {
+               this.timeGrid.releaseHits();
+               if (this.dayGrid) {
+                       this.dayGrid.releaseHits();
+               }
+       },
 
-               var segments = buildSegments(events);
-               var html;
-               var elements;
 
-               // calculate the desired `left` and `width` properties on each segment object
-               calculateHorizontals(segments);
+       queryHit: function(left, top) {
+               var hit = this.timeGrid.queryHit(left, top);
 
-               // build the HTML string. relies on `left` property
-               html = buildHTML(segments);
+               if (!hit && this.dayGrid) {
+                       hit = this.dayGrid.queryHit(left, top);
+               }
 
-               // render the HTML. innerHTML is considerably faster than jQuery's .html()
-               renderContainer[0].innerHTML = html;
+               return hit;
+       },
 
-               // retrieve the individual elements
-               elements = renderContainer.children();
 
-               // if we were appending, and thus using a temporary container,
-               // re-attach elements to the real container.
-               if (doAppend) {
-                       finalContainer.append(elements);
-               }
+       getHitSpan: function(hit) {
+               // TODO: hit.component is set as a hack to identify where the hit came from
+               return hit.component.getHitSpan(hit);
+       },
 
-               // assigns each element to `segment.event`, after filtering them through user callbacks
-               resolveElements(segments, elements);
 
-               // Calculate the left and right padding+margin for each element.
-               // We need this for setting each element's desired outer width, because of the W3C box model.
-               // It's important we do this in a separate pass from acually setting the width on the DOM elements
-               // because alternating reading/writing dimensions causes reflow for every iteration.
-               segmentElementEach(segments, function(segment, element) {
-                       segment.hsides = hsides(element, true); // include margins = `true`
-               });
+       getHitEl: function(hit) {
+               // TODO: hit.component is set as a hack to identify where the hit came from
+               return hit.component.getHitEl(hit);
+       },
 
-               // Set the width of each element
-               segmentElementEach(segments, function(segment, element) {
-                       element.width(
-                               Math.max(0, segment.outerWidth - segment.hsides)
-                       );
-               });
 
-               // Grab each element's outerHeight (setVerticals uses this).
-               // To get an accurate reading, it's important to have each element's width explicitly set already.
-               segmentElementEach(segments, function(segment, element) {
-                       segment.outerHeight = element.outerHeight(true); // include margins = `true`
-               });
+       /* Events
+       ------------------------------------------------------------------------------------------------------------------*/
 
-               // Set the top coordinate on each element (requires segment.outerHeight)
-               setVerticals(segments, doRowHeights);
 
-               return segments;
-       }
+       // Renders events onto the view and populates the View's segment array
+       renderEvents: function(events) {
+               var dayEvents = [];
+               var timedEvents = [];
+               var daySegs = [];
+               var timedSegs;
+               var i;
 
+               // separate the events into all-day and timed
+               for (i = 0; i < events.length; i++) {
+                       if (events[i].allDay) {
+                               dayEvents.push(events[i]);
+                       }
+                       else {
+                               timedEvents.push(events[i]);
+                       }
+               }
 
-       // Generate an array of "segments" for all events.
-       function buildSegments(events) {
-               var segments = [];
-               for (var i=0; i<events.length; i++) {
-                       var eventSegments = buildSegmentsForEvent(events[i]);
-                       segments.push.apply(segments, eventSegments); // append an array to an array
+               // render the events in the subcomponents
+               timedSegs = this.timeGrid.renderEvents(timedEvents);
+               if (this.dayGrid) {
+                       daySegs = this.dayGrid.renderEvents(dayEvents);
                }
-               return segments;
-       }
 
+               // the all-day area is flexible and might have a lot of events, so shift the height
+               this.updateHeight();
+       },
 
-       // Generate an array of segments for a single event.
-       // A "segment" is the same data structure that View.rangeToSegments produces,
-       // with the addition of the `event` property being set to reference the original event.
-       function buildSegmentsForEvent(event) {
-               var startDate = event.start;
-               var endDate = exclEndDay(event);
-               var segments = rangeToSegments(startDate, endDate);
-               for (var i=0; i<segments.length; i++) {
-                       segments[i].event = event;
-               }
-               return segments;
-       }
 
+       // Retrieves all segment objects that are rendered in the view
+       getEventSegs: function() {
+               return this.timeGrid.getEventSegs().concat(
+                       this.dayGrid ? this.dayGrid.getEventSegs() : []
+               );
+       },
 
-       // Sets the `left` and `outerWidth` property of each segment.
-       // These values are the desired dimensions for the eventual DOM elements.
-       function calculateHorizontals(segments) {
-               var isRTL = opt('isRTL');
-               for (var i=0; i<segments.length; i++) {
-                       var segment = segments[i];
 
-                       // Determine functions used for calulating the elements left/right coordinates,
-                       // depending on whether the view is RTL or not.
-                       // NOTE:
-                       // colLeft/colRight returns the coordinate butting up the edge of the cell.
-                       // colContentLeft/colContentRight is indented a little bit from the edge.
-                       var leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;
-                       var rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;
+       // Unrenders all event elements and clears internal segment data
+       unrenderEvents: function() {
 
-                       var left = leftFunc(segment.leftCol);
-                       var right = rightFunc(segment.rightCol);
-                       segment.left = left;
-                       segment.outerWidth = right - left;
+               // unrender the events in the subcomponents
+               this.timeGrid.unrenderEvents();
+               if (this.dayGrid) {
+                       this.dayGrid.unrenderEvents();
                }
-       }
 
+               // we DON'T need to call updateHeight() because
+               // a renderEvents() call always happens after this, which will eventually call updateHeight()
+       },
 
-       // Build a concatenated HTML string for an array of segments
-       function buildHTML(segments) {
-               var html = '';
-               for (var i=0; i<segments.length; i++) {
-                       html += buildHTMLForSegment(segments[i]);
-               }
-               return html;
-       }
 
+       /* Dragging (for events and external elements)
+       ------------------------------------------------------------------------------------------------------------------*/
 
-       // Build an HTML string for a single segment.
-       // Relies on the following properties:
-       // - `segment.event` (from `buildSegmentsForEvent`)
-       // - `segment.left` (from `calculateHorizontals`)
-       function buildHTMLForSegment(segment) {
-               var html = '';
-               var isRTL = opt('isRTL');
-               var event = segment.event;
-               var url = event.url;
 
-               // generate the list of CSS classNames
-               var classNames = [ 'fc-event', 'fc-event-hori' ];
-               if (isEventDraggable(event)) {
-                       classNames.push('fc-event-draggable');
-               }
-               if (segment.isStart) {
-                       classNames.push('fc-event-start');
+       // A returned value of `true` signals that a mock "helper" event has been rendered.
+       renderDrag: function(dropLocation, seg) {
+               if (dropLocation.start.hasTime()) {
+                       return this.timeGrid.renderDrag(dropLocation, seg);
                }
-               if (segment.isEnd) {
-                       classNames.push('fc-event-end');
-               }
-               // use the event's configured classNames
-               // guaranteed to be an array via `normalizeEvent`
-               classNames = classNames.concat(event.className);
-               if (event.source) {
-                       // use the event's source's classNames, if specified
-                       classNames = classNames.concat(event.source.className || []);
+               else if (this.dayGrid) {
+                       return this.dayGrid.renderDrag(dropLocation, seg);
                }
+       },
 
-               // generate a semicolon delimited CSS string for any of the "skin" properties
-               // of the event object (`backgroundColor`, `borderColor` and such)
-               var skinCss = getSkinCss(event, opt);
 
-               if (url) {
-                       html += "<a href='" + htmlEscape(url) + "'";
-               }else{
-                       html += "<div";
-               }
-               html +=
-                       " class='" + classNames.join(' ') + "'" +
-                       " style=" +
-                               "'" +
-                               "position:absolute;" +
-                               "left:" + segment.left + "px;" +
-                               skinCss +
-                               "'" +
-                       ">" +
-                       "<div class='fc-event-inner'>";
-               if (!event.allDay && segment.isStart) {
-                       html +=
-                               "<span class='fc-event-time'>" +
-                               htmlEscape(
-                                       formatDates(event.start, event.end, opt('timeFormat'))
-                               ) +
-                               "</span>";
-               }
-               html +=
-                       "<span class='fc-event-title'>" +
-                       htmlEscape(event.title || '') +
-                       "</span>" +
-                       "</div>";
-               if (segment.isEnd && isEventResizable(event)) {
-                       html +=
-                               "<div class='ui-resizable-handle ui-resizable-" + (isRTL ? 'w' : 'e') + "'>" +
-                               "&nbsp;&nbsp;&nbsp;" + // makes hit area a lot better for IE6/7
-                               "</div>";
+       unrenderDrag: function() {
+               this.timeGrid.unrenderDrag();
+               if (this.dayGrid) {
+                       this.dayGrid.unrenderDrag();
                }
-               html += "</" + (url ? "a" : "div") + ">";
-
-               // TODO:
-               // When these elements are initially rendered, they will be briefly visibile on the screen,
-               // even though their widths/heights are not set.
-               // SOLUTION: initially set them as visibility:hidden ?
+       },
 
-               return html;
-       }
 
+       /* Selection
+       ------------------------------------------------------------------------------------------------------------------*/
 
-       // Associate each segment (an object) with an element (a jQuery object),
-       // by setting each `segment.element`.
-       // Run each element through the `eventRender` filter, which allows developers to
-       // modify an existing element, supply a new one, or cancel rendering.
-       function resolveElements(segments, elements) {
-               for (var i=0; i<segments.length; i++) {
-                       var segment = segments[i];
-                       var event = segment.event;
-                       var element = elements.eq(i);
 
-                       // call the trigger with the original element
-                       var triggerRes = trigger('eventRender', event, event, element);
+       // Renders a visual indication of a selection
+       renderSelection: function(span) {
+               if (span.start.hasTime() || span.end.hasTime()) {
+                       this.timeGrid.renderSelection(span);
+               }
+               else if (this.dayGrid) {
+                       this.dayGrid.renderSelection(span);
+               }
+       },
 
-                       if (triggerRes === false) {
-                               // if `false`, remove the event from the DOM and don't assign it to `segment.event`
-                               element.remove();
-                       }
-                       else {
-                               if (triggerRes && triggerRes !== true) {
-                                       // the trigger returned a new element, but not `true` (which means keep the existing element)
-
-                                       // re-assign the important CSS dimension properties that were already assigned in `buildHTMLForSegment`
-                                       triggerRes = $(triggerRes)
-                                               .css({
-                                                       position: 'absolute',
-                                                       left: segment.left
-                                               });
-
-                                       element.replaceWith(triggerRes);
-                                       element = triggerRes;
-                               }
 
-                               segment.element = element;
-                       }
+       // Unrenders a visual indications of a selection
+       unrenderSelection: function() {
+               this.timeGrid.unrenderSelection();
+               if (this.dayGrid) {
+                       this.dayGrid.unrenderSelection();
                }
        }
 
+});
 
 
-       /* Top-coordinate Methods
-       -------------------------------------------------------------------------------------------------*/
+// Methods that will customize the rendering behavior of the AgendaView's timeGrid
+// TODO: move into TimeGrid
+var agendaTimeGridMethods = {
 
 
-       // Sets the "top" CSS property for each element.
-       // If `doRowHeights` is `true`, also sets each row's first cell to an explicit height,
-       // so that if elements vertically overflow, the cell expands vertically to compensate.
-       function setVerticals(segments, doRowHeights) {
-               var rowContentHeights = calculateVerticals(segments); // also sets segment.top
-               var rowContentElements = getRowContentElements(); // returns 1 inner div per row
-               var rowContentTops = [];
+       // Generates the HTML that will go before the day-of week header cells
+       renderHeadIntroHtml: function() {
+               var view = this.view;
+               var weekText;
 
-               // Set each row's height by setting height of first inner div
-               if (doRowHeights) {
-                       for (var i=0; i<rowContentElements.length; i++) {
-                               rowContentElements[i].height(rowContentHeights[i]);
-                       }
-               }
+               if (view.opt('weekNumbers')) {
+                       weekText = this.start.format(view.opt('smallWeekFormat'));
 
-               // Get each row's top, relative to the views's origin.
-               // Important to do this after setting each row's height.
-               for (var i=0; i<rowContentElements.length; i++) {
-                       rowContentTops.push(
-                               rowContentElements[i].position().top
-                       );
+                       return '' +
+                               '<th class="fc-axis fc-week-number ' + view.widgetHeaderClass + '" ' + view.axisStyleAttr() + '>' +
+                                       view.buildGotoAnchorHtml( // aside from link, important for matchCellWidths
+                                               { date: this.start, type: 'week', forceOff: this.colCnt > 1 },
+                                               htmlEscape(weekText) // inner HTML
+                                       ) +
+                               '</th>';
+               }
+               else {
+                       return '<th class="fc-axis ' + view.widgetHeaderClass + '" ' + view.axisStyleAttr() + '></th>';
                }
+       },
 
-               // Set each segment element's CSS "top" property.
-               // Each segment object has a "top" property, which is relative to the row's top, but...
-               segmentElementEach(segments, function(segment, element) {
-                       element.css(
-                               'top',
-                               rowContentTops[segment.row] + segment.top // ...now, relative to views's origin
-                       );
-               });
-       }
 
+       // Generates the HTML that goes before the bg of the TimeGrid slot area. Long vertical column.
+       renderBgIntroHtml: function() {
+               var view = this.view;
 
-       // Calculate the "top" coordinate for each segment, relative to the "top" of the row.
-       // Also, return an array that contains the "content" height for each row
-       // (the height displaced by the vertically stacked events in the row).
-       // Requires segments to have their `outerHeight` property already set.
-       function calculateVerticals(segments) {
-               var rowCnt = getRowCnt();
-               var colCnt = getColCnt();
-               var rowContentHeights = []; // content height for each row
-               var segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row
+               return '<td class="fc-axis ' + view.widgetContentClass + '" ' + view.axisStyleAttr() + '></td>';
+       },
 
-               for (var rowI=0; rowI<rowCnt; rowI++) {
-                       var segmentRow = segmentRows[rowI];
 
-                       // an array of running total heights for each column.
-                       // initialize with all zeros.
-                       var colHeights = [];
-                       for (var colI=0; colI<colCnt; colI++) {
-                               colHeights.push(0);
-                       }
+       // Generates the HTML that goes before all other types of cells.
+       // Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.
+       renderIntroHtml: function() {
+               var view = this.view;
 
-                       // loop through every segment
-                       for (var segmentI=0; segmentI<segmentRow.length; segmentI++) {
-                               var segment = segmentRow[segmentI];
+               return '<td class="fc-axis" ' + view.axisStyleAttr() + '></td>';
+       }
 
-                               // find the segment's top coordinate by looking at the max height
-                               // of all the columns the segment will be in.
-                               segment.top = arrayMax(
-                                       colHeights.slice(
-                                               segment.leftCol,
-                                               segment.rightCol + 1 // make exclusive for slice
-                                       )
-                               );
+};
 
-                               // adjust the columns to account for the segment's height
-                               for (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {
-                                       colHeights[colI] = segment.top + segment.outerHeight;
-                               }
-                       }
 
-                       // the tallest column in the row should be the "content height"
-                       rowContentHeights.push(arrayMax(colHeights));
-               }
+// Methods that will customize the rendering behavior of the AgendaView's dayGrid
+var agendaDayGridMethods = {
 
-               return rowContentHeights;
-       }
 
+       // Generates the HTML that goes before the all-day cells
+       renderBgIntroHtml: function() {
+               var view = this.view;
 
-       // Build an array of segment arrays, each representing the segments that will
-       // be in a row of the grid, sorted by which event should be closest to the top.
-       function buildSegmentRows(segments) {
-               var rowCnt = getRowCnt();
-               var segmentRows = [];
-               var segmentI;
-               var segment;
-               var rowI;
+               return '' +
+                       '<td class="fc-axis ' + view.widgetContentClass + '" ' + view.axisStyleAttr() + '>' +
+                               '<span>' + // needed for matchCellWidths
+                                       view.getAllDayHtml() +
+                               '</span>' +
+                       '</td>';
+       },
 
-               // group segments by row
-               for (segmentI=0; segmentI<segments.length; segmentI++) {
-                       segment = segments[segmentI];
-                       rowI = segment.row;
-                       if (segment.element) { // was rendered?
-                               if (segmentRows[rowI]) {
-                                       // already other segments. append to array
-                                       segmentRows[rowI].push(segment);
-                               }
-                               else {
-                                       // first segment in row. create new array
-                                       segmentRows[rowI] = [ segment ];
-                               }
-                       }
-               }
 
-               // sort each row
-               for (rowI=0; rowI<rowCnt; rowI++) {
-                       segmentRows[rowI] = sortSegmentRow(
-                               segmentRows[rowI] || [] // guarantee an array, even if no segments
-                       );
-               }
+       // Generates the HTML that goes before all other types of cells.
+       // Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.
+       renderIntroHtml: function() {
+               var view = this.view;
 
-               return segmentRows;
+               return '<td class="fc-axis" ' + view.axisStyleAttr() + '></td>';
        }
 
+};
 
-       // Sort an array of segments according to which segment should appear closest to the top
-       function sortSegmentRow(segments) {
-               var sortedSegments = [];
+;;
 
-               // build the subrow array
-               var subrows = buildSegmentSubrows(segments);
+var AGENDA_ALL_DAY_EVENT_LIMIT = 5;
+
+// potential nice values for the slot-duration and interval-duration
+// from largest to smallest
+var AGENDA_STOCK_SUB_DURATIONS = [
+       { hours: 1 },
+       { minutes: 30 },
+       { minutes: 15 },
+       { seconds: 30 },
+       { seconds: 15 }
+];
+
+fcViews.agenda = {
+       'class': AgendaView,
+       defaults: {
+               allDaySlot: true,
+               slotDuration: '00:30:00',
+               minTime: '00:00:00',
+               maxTime: '24:00:00',
+               slotEventOverlap: true // a bad name. confused with overlap/constraint system
+       }
+};
 
-               // flatten it
-               for (var i=0; i<subrows.length; i++) {
-                       sortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array
-               }
+fcViews.agendaDay = {
+       type: 'agenda',
+       duration: { days: 1 }
+};
 
-               return sortedSegments;
-       }
+fcViews.agendaWeek = {
+       type: 'agenda',
+       duration: { weeks: 1 }
+};
+;;
 
+/*
+Responsible for the scroller, and forwarding event-related actions into the "grid"
+*/
+var ListView = View.extend({
 
-       // Take an array of segments, which are all assumed to be in the same row,
-       // and sort into subrows.
-       function buildSegmentSubrows(segments) {
+       grid: null,
+       scroller: null,
 
-               // Give preference to elements with certain criteria, so they have
-               // a chance to be closer to the top.
-               segments.sort(compareDaySegments);
+       initialize: function() {
+               this.grid = new ListViewGrid(this);
+               this.scroller = new Scroller({
+                       overflowX: 'hidden',
+                       overflowY: 'auto'
+               });
+       },
 
-               var subrows = [];
-               for (var i=0; i<segments.length; i++) {
-                       var segment = segments[i];
+       setRange: function(range) {
+               View.prototype.setRange.call(this, range); // super
 
-                       // loop through subrows, starting with the topmost, until the segment
-                       // doesn't collide with other segments.
-                       for (var j=0; j<subrows.length; j++) {
-                               if (!isDaySegmentCollision(segment, subrows[j])) {
-                                       break;
-                               }
-                       }
-                       // `j` now holds the desired subrow index
-                       if (subrows[j]) {
-                               subrows[j].push(segment);
-                       }
-                       else {
-                               subrows[j] = [ segment ];
-                       }
-               }
+               this.grid.setRange(range); // needs to process range-related options
+       },
 
-               return subrows;
-       }
+       renderSkeleton: function() {
+               this.el.addClass(
+                       'fc-list-view ' +
+                       this.widgetContentClass
+               );
 
+               this.scroller.render();
+               this.scroller.el.appendTo(this.el);
 
-       // Return an array of jQuery objects for the placeholder content containers of each row.
-       // The content containers don't actually contain anything, but their dimensions should match
-       // the events that are overlaid on top.
-       function getRowContentElements() {
-               var i;
-               var rowCnt = getRowCnt();
-               var rowDivs = [];
-               for (i=0; i<rowCnt; i++) {
-                       rowDivs[i] = allDayRow(i)
-                               .find('div.fc-day-content > div');
-               }
-               return rowDivs;
-       }
+               this.grid.setElement(this.scroller.scrollEl);
+       },
 
+       unrenderSkeleton: function() {
+               this.scroller.destroy(); // will remove the Grid too
+       },
 
+       setHeight: function(totalHeight, isAuto) {
+               this.scroller.setHeight(this.computeScrollerHeight(totalHeight));
+       },
 
-       /* Mouse Handlers
-       ---------------------------------------------------------------------------------------------------*/
-       // TODO: better documentation!
+       computeScrollerHeight: function(totalHeight) {
+               return totalHeight -
+                       subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller
+       },
 
+       renderEvents: function(events) {
+               this.grid.renderEvents(events);
+       },
 
-       function attachHandlers(segments, modifiedEventId) {
-               var segmentContainer = getDaySegmentContainer();
+       unrenderEvents: function() {
+               this.grid.unrenderEvents();
+       },
 
-               segmentElementEach(segments, function(segment, element, i) {
-                       var event = segment.event;
-                       if (event._id === modifiedEventId) {
-                               bindDaySeg(event, element, segment);
-                       }else{
-                               element[0]._fci = i; // for lazySegBind
-                       }
-               });
+       isEventResizable: function(event) {
+               return false;
+       },
 
-               lazySegBind(segmentContainer, segments, bindDaySeg);
+       isEventDraggable: function(event) {
+               return false;
        }
 
+});
 
-       function bindDaySeg(event, eventElement, segment) {
-
-               if (isEventDraggable(event)) {
-                       t.draggableDayEvent(event, eventElement, segment); // use `t` so subclasses can override
-               }
+/*
+Responsible for event rendering and user-interaction.
+Its "el" is the inner-content of the above view's scroller.
+*/
+var ListViewGrid = Grid.extend({
 
-               if (
-                       segment.isEnd && // only allow resizing on the final segment for an event
-                       isEventResizable(event)
-               ) {
-                       t.resizableDayEvent(event, eventElement, segment); // use `t` so subclasses can override
-               }
+       segSelector: '.fc-list-item', // which elements accept event actions
+       hasDayInteractions: false, // no day selection or day clicking
 
-               // attach all other handlers.
-               // needs to be after, because resizableDayEvent might stopImmediatePropagation on click
-               eventElementHandlers(event, eventElement);
-       }
+       // slices by day
+       spanToSegs: function(span) {
+               var view = this.view;
+               var dayStart = view.start.clone().time(0); // timed, so segs get times!
+               var dayIndex = 0;
+               var seg;
+               var segs = [];
 
-       
-       function draggableDayEvent(event, eventElement) {
-               var hoverListener = getHoverListener();
-               var dayDelta;
-               eventElement.draggable({
-                       delay: 50,
-                       opacity: opt('dragOpacity'),
-                       revertDuration: opt('dragRevertDuration'),
-                       start: function(ev, ui) {
-                               trigger('eventDragStart', eventElement, event, ev, ui);
-                               hideEvents(event, eventElement);
-                               hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
-                                       eventElement.draggable('option', 'revert', !cell || !rowDelta && !colDelta);
-                                       clearOverlays();
-                                       if (cell) {
-                                               var origDate = cellToDate(origCell);
-                                               var date = cellToDate(cell);
-                                               dayDelta = dayDiff(date, origDate);
-                                               renderDayOverlay(
-                                                       addDays(cloneDate(event.start), dayDelta),
-                                                       addDays(exclEndDay(event), dayDelta)
-                                               );
-                                       }else{
-                                               dayDelta = 0;
-                                       }
-                               }, ev, 'drag');
-                       },
-                       stop: function(ev, ui) {
-                               hoverListener.stop();
-                               clearOverlays();
-                               trigger('eventDragStop', eventElement, event, ev, ui);
-                               if (dayDelta) {
-                                       eventDrop(this, event, dayDelta, 0, event.allDay, ev, ui);
-                               }else{
-                                       eventElement.css('filter', ''); // clear IE opacity side-effects
-                                       showEvents(event, eventElement);
-                               }
-                       }
-               });
-       }
+               while (dayStart < view.end) {
 
-       
-       function resizableDayEvent(event, element, segment) {
-               var isRTL = opt('isRTL');
-               var direction = isRTL ? 'w' : 'e';
-               var handle = element.find('.ui-resizable-' + direction); // TODO: stop using this class because we aren't using jqui for this
-               var isResizing = false;
-               
-               // TODO: look into using jquery-ui mouse widget for this stuff
-               disableTextSelection(element); // prevent native <a> selection for IE
-               element
-                       .mousedown(function(ev) { // prevent native <a> selection for others
-                               ev.preventDefault();
-                       })
-                       .click(function(ev) {
-                               if (isResizing) {
-                                       ev.preventDefault(); // prevent link from being visited (only method that worked in IE6)
-                                       ev.stopImmediatePropagation(); // prevent fullcalendar eventClick handler from being called
-                                                                      // (eventElementHandlers needs to be bound after resizableDayEvent)
-                               }
+                       seg = intersectRanges(span, {
+                               start: dayStart,
+                               end: dayStart.clone().add(1, 'day')
                        });
-               
-               handle.mousedown(function(ev) {
-                       if (ev.which != 1) {
-                               return; // needs to be left mouse button
-                       }
-                       isResizing = true;
-                       var hoverListener = getHoverListener();
-                       var rowCnt = getRowCnt();
-                       var colCnt = getColCnt();
-                       var elementTop = element.css('top');
-                       var dayDelta;
-                       var helpers;
-                       var eventCopy = $.extend({}, event);
-                       var minCellOffset = dayOffsetToCellOffset( dateToDayOffset(event.start) );
-                       clearSelection();
-                       $('body')
-                               .css('cursor', direction + '-resize')
-                               .one('mouseup', mouseup);
-                       trigger('eventResizeStart', this, event, ev);
-                       hoverListener.start(function(cell, origCell) {
-                               if (cell) {
-
-                                       var origCellOffset = cellToCellOffset(origCell);
-                                       var cellOffset = cellToCellOffset(cell);
-
-                                       // don't let resizing move earlier than start date cell
-                                       cellOffset = Math.max(cellOffset, minCellOffset);
-
-                                       dayDelta =
-                                               cellOffsetToDayOffset(cellOffset) -
-                                               cellOffsetToDayOffset(origCellOffset);
-
-                                       if (dayDelta) {
-                                               eventCopy.end = addDays(eventEnd(event), dayDelta, true);
-                                               var oldHelpers = helpers;
-
-                                               helpers = renderTempDayEvent(eventCopy, segment.row, elementTop);
-                                               helpers = $(helpers); // turn array into a jQuery object
-
-                                               helpers.find('*').css('cursor', direction + '-resize');
-                                               if (oldHelpers) {
-                                                       oldHelpers.remove();
-                                               }
 
-                                               hideEvents(event);
-                                       }
-                                       else {
-                                               if (helpers) {
-                                                       showEvents(event);
-                                                       helpers.remove();
-                                                       helpers = null;
-                                               }
-                                       }
-                                       clearOverlays();
-                                       renderDayOverlay( // coordinate grid already rebuilt with hoverListener.start()
-                                               event.start,
-                                               addDays( exclEndDay(event), dayDelta )
-                                               // TODO: instead of calling renderDayOverlay() with dates,
-                                               // call _renderDayOverlay (or whatever) with cell offsets.
-                                       );
-                               }
-                       }, ev);
-                       
-                       function mouseup(ev) {
-                               trigger('eventResizeStop', this, event, ev);
-                               $('body').css('cursor', '');
-                               hoverListener.stop();
-                               clearOverlays();
-                               if (dayDelta) {
-                                       eventResize(this, event, dayDelta, 0, ev);
-                                       // event redraw will clear helpers
-                               }
-                               // otherwise, the drag handler already restored the old events
-                               
-                               setTimeout(function() { // make this happen after the element's click event
-                                       isResizing = false;
-                               },0);
+                       if (seg) {
+                               seg.dayIndex = dayIndex;
+                               segs.push(seg);
                        }
-               });
-       }
-       
 
-}
+                       dayStart.add(1, 'day');
+                       dayIndex++;
+
+                       // detect when span won't go fully into the next day,
+                       // and mutate the latest seg to the be the end.
+                       if (
+                               seg && !seg.isEnd && span.end.hasTime() &&
+                               span.end < dayStart.clone().add(this.view.nextDayThreshold)
+                       ) {
+                               seg.end = span.end.clone();
+                               seg.isEnd = true;
+                               break;
+                       }
+               }
 
+               return segs;
+       },
 
+       // like "4:00am"
+       computeEventTimeFormat: function() {
+               return this.view.opt('mediumTimeFormat');
+       },
 
-/* Generalized Segment Utilities
--------------------------------------------------------------------------------------------------*/
+       // for events with a url, the whole <tr> should be clickable,
+       // but it's impossible to wrap with an <a> tag. simulate this.
+       handleSegClick: function(seg, ev) {
+               var url;
 
+               Grid.prototype.handleSegClick.apply(this, arguments); // super. might prevent the default action
 
-function isDaySegmentCollision(segment, otherSegments) {
-       for (var i=0; i<otherSegments.length; i++) {
-               var otherSegment = otherSegments[i];
-               if (
-                       otherSegment.leftCol <= segment.rightCol &&
-                       otherSegment.rightCol >= segment.leftCol
-               ) {
-                       return true;
+               // not clicking on or within an <a> with an href
+               if (!$(ev.target).closest('a[href]').length) {
+                       url = seg.event.url;
+                       if (url && !ev.isDefaultPrevented()) { // jsEvent not cancelled in handler
+                               window.location.href = url; // simulate link click
+                       }
                }
-       }
-       return false;
-}
+       },
 
+       // returns list of foreground segs that were actually rendered
+       renderFgSegs: function(segs) {
+               segs = this.renderFgSegEls(segs); // might filter away hidden events
 
-function segmentElementEach(segments, callback) { // TODO: use in AgendaView?
-       for (var i=0; i<segments.length; i++) {
-               var segment = segments[i];
-               var element = segment.element;
-               if (element) {
-                       callback(segment, element, i);
+               if (!segs.length) {
+                       this.renderEmptyMessage();
+               }
+               else {
+                       this.renderSegList(segs);
                }
-       }
-}
-
-
-// A cmp function for determining which segments should appear higher up
-function compareDaySegments(a, b) {
-       return (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first
-               b.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)
-               a.event.start - b.event.start || // if a tie, sort by event start date
-               (a.event.title || '').localeCompare(b.event.title) // if a tie, sort by event title
-}
 
+               return segs;
+       },
 
-;;
+       renderEmptyMessage: function() {
+               this.el.html(
+                       '<div class="fc-list-empty-wrap2">' + // TODO: try less wraps
+                       '<div class="fc-list-empty-wrap1">' +
+                       '<div class="fc-list-empty">' +
+                               htmlEscape(this.view.opt('noEventsMessage')) +
+                       '</div>' +
+                       '</div>' +
+                       '</div>'
+               );
+       },
 
-//BUG: unselect needs to be triggered when events are dragged+dropped
+       // render the event segments in the view
+       renderSegList: function(allSegs) {
+               var segsByDay = this.groupSegsByDay(allSegs); // sparse array
+               var dayIndex;
+               var daySegs;
+               var i;
+               var tableEl = $('<table class="fc-list-table"><tbody/></table>');
+               var tbodyEl = tableEl.find('tbody');
 
-function SelectionManager() {
-       var t = this;
-       
-       
-       // exports
-       t.select = select;
-       t.unselect = unselect;
-       t.reportSelection = reportSelection;
-       t.daySelectionMousedown = daySelectionMousedown;
-       
-       
-       // imports
-       var opt = t.opt;
-       var trigger = t.trigger;
-       var defaultSelectionEnd = t.defaultSelectionEnd;
-       var renderSelection = t.renderSelection;
-       var clearSelection = t.clearSelection;
-       
-       
-       // locals
-       var selected = false;
+               for (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {
+                       daySegs = segsByDay[dayIndex];
+                       if (daySegs) { // sparse array, so might be undefined
 
+                               // append a day header
+                               tbodyEl.append(this.dayHeaderHtml(
+                                       this.view.start.clone().add(dayIndex, 'days')
+                               ));
 
+                               this.sortEventSegs(daySegs);
 
-       // unselectAuto
-       if (opt('selectable') && opt('unselectAuto')) {
-               $(document).mousedown(function(ev) {
-                       var ignore = opt('unselectCancel');
-                       if (ignore) {
-                               if ($(ev.target).parents(ignore).length) { // could be optimized to stop after first match
-                                       return;
+                               for (i = 0; i < daySegs.length; i++) {
+                                       tbodyEl.append(daySegs[i].el); // append event row
                                }
                        }
-                       unselect(ev);
-               });
-       }
-       
-
-       function select(startDate, endDate, allDay) {
-               unselect();
-               if (!endDate) {
-                       endDate = defaultSelectionEnd(startDate, allDay);
-               }
-               renderSelection(startDate, endDate, allDay);
-               reportSelection(startDate, endDate, allDay);
-       }
-       
-       
-       function unselect(ev) {
-               if (selected) {
-                       selected = false;
-                       clearSelection();
-                       trigger('unselect', null, ev);
-               }
-       }
-       
-       
-       function reportSelection(startDate, endDate, allDay, ev) {
-               selected = true;
-               trigger('select', null, startDate, endDate, allDay, ev);
-       }
-       
-       
-       function daySelectionMousedown(ev) { // not really a generic manager method, oh well
-               var cellToDate = t.cellToDate;
-               var getIsCellAllDay = t.getIsCellAllDay;
-               var hoverListener = t.getHoverListener();
-               var reportDayClick = t.reportDayClick; // this is hacky and sort of weird
-               if (ev.which == 1 && opt('selectable')) { // which==1 means left mouse button
-                       unselect(ev);
-                       var _mousedownElement = this;
-                       var dates;
-                       hoverListener.start(function(cell, origCell) { // TODO: maybe put cellToDate/getIsCellAllDay info in cell
-                               clearSelection();
-                               if (cell && getIsCellAllDay(cell)) {
-                                       dates = [ cellToDate(origCell), cellToDate(cell) ].sort(dateCompare);
-                                       renderSelection(dates[0], dates[1], true);
-                               }else{
-                                       dates = null;
-                               }
-                       }, ev);
-                       $(document).one('mouseup', function(ev) {
-                               hoverListener.stop();
-                               if (dates) {
-                                       if (+dates[0] == +dates[1]) {
-                                               reportDayClick(dates[0], true, ev);
-                                       }
-                                       reportSelection(dates[0], dates[1], true, ev);
-                               }
-                       });
                }
-       }
 
+               this.el.empty().append(tableEl);
+       },
 
-}
-
-;;
-function OverlayManager() {
-       var t = this;
-       
-       
-       // exports
-       t.renderOverlay = renderOverlay;
-       t.clearOverlays = clearOverlays;
-       
-       
-       // locals
-       var usedOverlays = [];
-       var unusedOverlays = [];
-       
-       
-       function renderOverlay(rect, parent) {
-               var e = unusedOverlays.shift();
-               if (!e) {
-                       e = $("<div class='fc-cell-overlay' style='position:absolute;z-index:3'/>");
-               }
-               if (e[0].parentNode != parent[0]) {
-                       e.appendTo(parent);
-               }
-               usedOverlays.push(e.css(rect).show());
-               return e;
-       }
-       
+       // Returns a sparse array of arrays, segs grouped by their dayIndex
+       groupSegsByDay: function(segs) {
+               var segsByDay = []; // sparse array
+               var i, seg;
 
-       function clearOverlays() {
-               var e;
-               while (e = usedOverlays.shift()) {
-                       unusedOverlays.push(e.hide().unbind());
+               for (i = 0; i < segs.length; i++) {
+                       seg = segs[i];
+                       (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))
+                               .push(seg);
                }
-       }
-
 
-}
+               return segsByDay;
+       },
 
-;;
+       // generates the HTML for the day headers that live amongst the event rows
+       dayHeaderHtml: function(dayDate) {
+               var view = this.view;
+               var mainFormat = view.opt('listDayFormat');
+               var altFormat = view.opt('listDayAltFormat');
+
+               return '<tr class="fc-list-heading" data-date="' + dayDate.format('YYYY-MM-DD') + '">' +
+                       '<td class="' + view.widgetHeaderClass + '" colspan="3">' +
+                               (mainFormat ?
+                                       view.buildGotoAnchorHtml(
+                                               dayDate,
+                                               { 'class': 'fc-list-heading-main' },
+                                               htmlEscape(dayDate.format(mainFormat)) // inner HTML
+                                       ) :
+                                       '') +
+                               (altFormat ?
+                                       view.buildGotoAnchorHtml(
+                                               dayDate,
+                                               { 'class': 'fc-list-heading-alt' },
+                                               htmlEscape(dayDate.format(altFormat)) // inner HTML
+                                       ) :
+                                       '') +
+                       '</td>' +
+               '</tr>';
+       },
 
-function CoordinateGrid(buildFunc) {
+       // generates the HTML for a single event row
+       fgSegHtml: function(seg) {
+               var view = this.view;
+               var classes = [ 'fc-list-item' ].concat(this.getSegCustomClasses(seg));
+               var bgColor = this.getSegBackgroundColor(seg);
+               var event = seg.event;
+               var url = event.url;
+               var timeHtml;
 
-       var t = this;
-       var rows;
-       var cols;
-       
-       
-       t.build = function() {
-               rows = [];
-               cols = [];
-               buildFunc(rows, cols);
-       };
-       
-       
-       t.cell = function(x, y) {
-               var rowCnt = rows.length;
-               var colCnt = cols.length;
-               var i, r=-1, c=-1;
-               for (i=0; i<rowCnt; i++) {
-                       if (y >= rows[i][0] && y < rows[i][1]) {
-                               r = i;
-                               break;
-                       }
+               if (event.allDay) {
+                       timeHtml = view.getAllDayHtml();
                }
-               for (i=0; i<colCnt; i++) {
-                       if (x >= cols[i][0] && x < cols[i][1]) {
-                               c = i;
-                               break;
+               else if (view.isMultiDayEvent(event)) { // if the event appears to span more than one day
+                       if (seg.isStart || seg.isEnd) { // outer segment that probably lasts part of the day
+                               timeHtml = htmlEscape(this.getEventTimeText(seg));
+                       }
+                       else { // inner segment that lasts the whole day
+                               timeHtml = view.getAllDayHtml();
                        }
                }
-               return (r>=0 && c>=0) ? { row:r, col:c } : null;
-       };
-       
-       
-       t.rect = function(row0, col0, row1, col1, originElement) { // row1,col1 is inclusive
-               var origin = originElement.offset();
-               return {
-                       top: rows[row0][0] - origin.top,
-                       left: cols[col0][0] - origin.left,
-                       width: cols[col1][1] - cols[col0][0],
-                       height: rows[row1][1] - rows[row0][0]
-               };
-       };
-
-}
+               else {
+                       // Display the normal time text for the *event's* times
+                       timeHtml = htmlEscape(this.getEventTimeText(event));
+               }
 
-;;
+               if (url) {
+                       classes.push('fc-has-url');
+               }
+
+               return '<tr class="' + classes.join(' ') + '">' +
+                       (this.displayEventTime ?
+                               '<td class="fc-list-item-time ' + view.widgetContentClass + '">' +
+                                       (timeHtml || '') +
+                               '</td>' :
+                               '') +
+                       '<td class="fc-list-item-marker ' + view.widgetContentClass + '">' +
+                               '<span class="fc-event-dot"' +
+                               (bgColor ?
+                                       ' style="background-color:' + bgColor + '"' :
+                                       '') +
+                               '></span>' +
+                       '</td>' +
+                       '<td class="fc-list-item-title ' + view.widgetContentClass + '">' +
+                               '<a' + (url ? ' href="' + htmlEscape(url) + '"' : '') + '>' +
+                                       htmlEscape(seg.event.title || '') +
+                               '</a>' +
+                       '</td>' +
+               '</tr>';
+       }
 
-function HoverListener(coordinateGrid) {
+});
 
+;;
 
-       var t = this;
-       var bindType;
-       var change;
-       var firstCell;
-       var cell;
-       
-       
-       t.start = function(_change, ev, _bindType) {
-               change = _change;
-               firstCell = cell = null;
-               coordinateGrid.build();
-               mouse(ev);
-               bindType = _bindType || 'mousemove';
-               $(document).bind(bindType, mouse);
-       };
-       
-       
-       function mouse(ev) {
-               _fixUIEvent(ev); // see below
-               var newCell = coordinateGrid.cell(ev.pageX, ev.pageY);
-               if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) {
-                       if (newCell) {
-                               if (!firstCell) {
-                                       firstCell = newCell;
-                               }
-                               change(newCell, firstCell, newCell.row-firstCell.row, newCell.col-firstCell.col);
-                       }else{
-                               change(newCell, firstCell);
-                       }
-                       cell = newCell;
-               }
+fcViews.list = {
+       'class': ListView,
+       buttonTextKey: 'list', // what to lookup in locale files
+       defaults: {
+               buttonText: 'list', // text to display for English
+               listDayFormat: 'LL', // like "January 1, 2016"
+               noEventsMessage: 'No events to display'
        }
-       
-       
-       t.stop = function() {
-               $(document).unbind(bindType, mouse);
-               return cell;
-       };
-       
-       
-}
-
-
+};
 
-// this fix was only necessary for jQuery UI 1.8.16 (and jQuery 1.7 or 1.7.1)
-// upgrading to jQuery UI 1.8.17 (and using either jQuery 1.7 or 1.7.1) fixed the problem
-// but keep this in here for 1.8.16 users
-// and maybe remove it down the line
+fcViews.listDay = {
+       type: 'list',
+       duration: { days: 1 },
+       defaults: {
+               listDayFormat: 'dddd' // day-of-week is all we need. full date is probably in header
+       }
+};
 
-function _fixUIEvent(event) { // for issue 1168
-       if (event.pageX === undefined) {
-               event.pageX = event.originalEvent.pageX;
-               event.pageY = event.originalEvent.pageY;
+fcViews.listWeek = {
+       type: 'list',
+       duration: { weeks: 1 },
+       defaults: {
+               listDayFormat: 'dddd', // day-of-week is more important
+               listDayAltFormat: 'LL'
        }
-}
-;;
+};
 
-function HorizontalPositionCache(getElement) {
+fcViews.listMonth = {
+       type: 'list',
+       duration: { month: 1 },
+       defaults: {
+               listDayAltFormat: 'dddd' // day-of-week is nice-to-have
+       }
+};
 
-       var t = this,
-               elements = {},
-               lefts = {},
-               rights = {};
-               
-       function e(i) {
-               return elements[i] = elements[i] || getElement(i);
+fcViews.listYear = {
+       type: 'list',
+       duration: { year: 1 },
+       defaults: {
+               listDayAltFormat: 'dddd' // day-of-week is nice-to-have
        }
-       
-       t.left = function(i) {
-               return lefts[i] = lefts[i] === undefined ? e(i).position().left : lefts[i];
-       };
-       
-       t.right = function(i) {
-               return rights[i] = rights[i] === undefined ? t.left(i) + e(i).width() : rights[i];
-       };
-       
-       t.clear = function() {
-               elements = {};
-               lefts = {};
-               rights = {};
-       };
-       
-}
+};
 
 ;;
-
-})(jQuery);
\ No newline at end of file
+\r
+return FC; // export for Node/CommonJS\r
+});
\ No newline at end of file
diff --git a/library/fullcalendar/fullcalendar.min.css b/library/fullcalendar/fullcalendar.min.css
new file mode 100644 (file)
index 0000000..87ee16e
--- /dev/null
@@ -0,0 +1,5 @@
+/*!
+ * FullCalendar v3.0.1 Stylesheet
+ * Docs & License: http://fullcalendar.io/
+ * (c) 2016 Adam Shaw
+ */.fc-icon,body .fc{font-size:1em}.fc-button-group,.fc-icon{display:inline-block}.fc-bg,.fc-row .fc-bgevent-skeleton,.fc-row .fc-highlight-skeleton{bottom:0}.fc-icon,.fc-unselectable{-khtml-user-select:none;-webkit-touch-callout:none}.fc{direction:ltr;text-align:left}.fc-rtl{text-align:right}.fc th,.fc-basic-view td.fc-week-number,.fc-icon,.fc-toolbar{text-align:center}.fc-unthemed .fc-content,.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-list-view,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#ddd}.fc-unthemed .fc-popover{background-color:#fff}.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-popover .fc-header{background:#eee}.fc-unthemed .fc-popover .fc-header .fc-close{color:#666}.fc-unthemed .fc-today{background:#fcf8e3}.fc-highlight{background:#bce8f1;opacity:.3}.fc-bgevent{background:#8fdf82;opacity:.3}.fc-nonbusiness{background:#d7d7d7}.fc-icon{height:1em;line-height:1em;overflow:hidden;font-family:"Courier New",Courier,monospace;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fc-icon:after{position:relative}.fc-icon-left-single-arrow:after{content:"\02039";font-weight:700;font-size:200%;top:-7%}.fc-icon-right-single-arrow:after{content:"\0203A";font-weight:700;font-size:200%;top:-7%}.fc-icon-left-double-arrow:after{content:"\000AB";font-size:160%;top:-7%}.fc-icon-right-double-arrow:after{content:"\000BB";font-size:160%;top:-7%}.fc-icon-left-triangle:after{content:"\25C4";font-size:125%;top:3%}.fc-icon-right-triangle:after{content:"\25BA";font-size:125%;top:3%}.fc-icon-down-triangle:after{content:"\25BC";font-size:125%;top:2%}.fc-icon-x:after{content:"\000D7";font-size:200%;top:6%}.fc button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;height:2.1em;padding:0 .6em;font-size:1em;white-space:nowrap;cursor:pointer}.fc button::-moz-focus-inner{margin:0;padding:0}.fc-state-default{border:1px solid;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.fc-state-default.fc-corner-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.fc-state-default.fc-corner-right{border-top-right-radius:4px;border-bottom-right-radius:4px}.fc button .fc-icon{position:relative;top:-.05em;margin:0 .2em;vertical-align:middle}.fc-state-active,.fc-state-disabled,.fc-state-down,.fc-state-hover{color:#333;background-color:#e6e6e6}.fc-state-hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.fc-state-active,.fc-state-down{background-color:#ccc;background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.fc-state-disabled{cursor:default;background-image:none;opacity:.65;box-shadow:none}.fc-event.fc-draggable,.fc-event[href],.fc-popover .fc-header .fc-close,a[data-goto]{cursor:pointer}.fc .fc-button-group>*{float:left;margin:0 0 0 -1px}.fc .fc-button-group>:first-child{margin-left:0}.fc-popover{position:absolute;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc-popover .fc-header{padding:2px 4px}.fc-popover .fc-header .fc-title{margin:0 2px}.fc-ltr .fc-popover .fc-header .fc-title,.fc-rtl .fc-popover .fc-header .fc-close{float:left}.fc-ltr .fc-popover .fc-header .fc-close,.fc-rtl .fc-popover .fc-header .fc-title{float:right}.fc-unthemed .fc-popover{border-width:1px;border-style:solid}.fc-unthemed .fc-popover .fc-header .fc-close{font-size:.9em;margin-top:2px}.fc-popover>.ui-widget-header+.ui-widget-content{border-top:0}.fc-divider{border-style:solid;border-width:1px}hr.fc-divider{height:0;margin:0;padding:0 0 2px;border-width:1px 0}.fc-bg table,.fc-row .fc-bgevent-skeleton table,.fc-row .fc-highlight-skeleton table{height:100%}.fc-clear{clear:both}.fc-bg,.fc-bgevent-skeleton,.fc-helper-skeleton,.fc-highlight-skeleton{position:absolute;top:0;left:0;right:0}.fc table{width:100%;box-sizing:border-box;table-layout:fixed;border-collapse:collapse;border-spacing:0;font-size:1em}.fc td,.fc th{border-style:solid;border-width:1px;padding:0;vertical-align:top}.fc td.fc-today{border-style:double}a[data-goto]:hover{text-decoration:underline}.fc .fc-row{border-style:solid;border-width:0}.fc-row table{border-left:0 hidden transparent;border-right:0 hidden transparent;border-bottom:0 hidden transparent}.fc-row:first-child table{border-top:0 hidden transparent}.fc-row{position:relative}.fc-row .fc-bg{z-index:1}.fc-row .fc-bgevent-skeleton td,.fc-row .fc-highlight-skeleton td{border-color:transparent}.fc-row .fc-bgevent-skeleton{z-index:2}.fc-row .fc-highlight-skeleton{z-index:3}.fc-row .fc-content-skeleton{position:relative;z-index:4;padding-bottom:2px}.fc-row .fc-helper-skeleton{z-index:5}.fc-row .fc-content-skeleton td,.fc-row .fc-helper-skeleton td{background:0 0;border-color:transparent;border-bottom:0}.fc-row .fc-content-skeleton tbody td,.fc-row .fc-helper-skeleton tbody td{border-top:0}.fc-scroller{-webkit-overflow-scrolling:touch}.fc-row.fc-rigid,.fc-time-grid-event{overflow:hidden}.fc-scroller>.fc-day-grid,.fc-scroller>.fc-time-grid{position:relative;width:100%}.fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:3px;border:1px solid #3a87ad;font-weight:400}.fc-event,.fc-event-dot{background-color:#3a87ad}.fc-event,.fc-event:hover,.ui-widget .fc-event{color:#fff;text-decoration:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-event .fc-bg{z-index:1;background:#fff;opacity:.25}.fc-event .fc-content{position:relative;z-index:2}.fc-event .fc-resizer{position:absolute;z-index:4;display:none}.fc-event.fc-allow-mouse-resize .fc-resizer,.fc-event.fc-selected .fc-resizer{display:block}.fc-event.fc-selected .fc-resizer:before{content:"";position:absolute;z-index:9999;top:50%;left:50%;width:40px;height:40px;margin-left:-20px;margin-top:-20px}.fc-event.fc-selected{z-index:9999!important;box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event.fc-selected.fc-dragging{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-h-event.fc-selected:before{content:"";position:absolute;z-index:3;top:-10px;bottom:-10px;left:0;right:0}.fc-ltr .fc-h-event.fc-not-start,.fc-rtl .fc-h-event.fc-not-end{margin-left:0;border-left-width:0;padding-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-ltr .fc-h-event.fc-not-end,.fc-rtl .fc-h-event.fc-not-start{margin-right:0;border-right-width:0;padding-right:1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-ltr .fc-h-event .fc-start-resizer,.fc-rtl .fc-h-event .fc-end-resizer{cursor:w-resize;left:-1px}.fc-ltr .fc-h-event .fc-end-resizer,.fc-rtl .fc-h-event .fc-start-resizer{cursor:e-resize;right:-1px}.fc-h-event.fc-allow-mouse-resize .fc-resizer{width:7px;top:-1px;bottom:-1px}.fc-h-event.fc-selected .fc-resizer{border-radius:4px;border-width:1px;width:6px;height:6px;border-style:solid;border-color:inherit;background:#fff;top:50%;margin-top:-4px}.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,.fc-rtl .fc-h-event.fc-selected .fc-end-resizer{margin-left:-4px}.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,.fc-rtl .fc-h-event.fc-selected .fc-start-resizer{margin-right:-4px}.fc-day-grid-event{margin:1px 2px 0;padding:0 1px}tr:first-child>td>.fc-day-grid-event{margin-top:2px}.fc-day-grid-event.fc-selected:after{content:"";position:absolute;z-index:1;top:-1px;right:-1px;bottom:-1px;left:-1px;background:#000;opacity:.25}.fc-day-grid-event .fc-content{white-space:nowrap;overflow:hidden}.fc-day-grid-event .fc-time{font-weight:700}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer{margin-left:-2px}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer{margin-right:-2px}a.fc-more{margin:1px 3px;font-size:.85em;cursor:pointer;text-decoration:none}a.fc-more:hover{text-decoration:underline}.fc-limited{display:none}.fc-day-grid .fc-row{z-index:1}.fc-more-popover{z-index:2;width:220px}.fc-more-popover .fc-event-container{padding:10px}.fc-now-indicator{position:absolute;border:0 solid red}.fc-unselectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fc-toolbar{margin-bottom:1em}.fc-toolbar .fc-left{float:left}.fc-toolbar .fc-right{float:right}.fc-toolbar .fc-center{display:inline-block}.fc .fc-toolbar>*>*{float:left;margin-left:.75em}.fc .fc-toolbar>*>:first-child{margin-left:0}.fc-toolbar h2{margin:0}.fc-toolbar button{position:relative}.fc-toolbar .fc-state-hover,.fc-toolbar .ui-state-hover{z-index:2}.fc-toolbar .fc-state-down{z-index:3}.fc-toolbar .fc-state-active,.fc-toolbar .ui-state-active{z-index:4}.fc-toolbar button:focus{z-index:5}.fc-view-container *,.fc-view-container :after,.fc-view-container :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fc-view,.fc-view>table{position:relative;z-index:1}.fc-basicDay-view .fc-content-skeleton,.fc-basicWeek-view .fc-content-skeleton{padding-bottom:1em}.fc-basic-view .fc-body .fc-row{min-height:4em}.fc-row.fc-rigid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-day-top.fc-other-month{opacity:.3}.fc-basic-view .fc-day-number,.fc-basic-view .fc-week-number{padding:2px}.fc-basic-view th.fc-day-number,.fc-basic-view th.fc-week-number{padding:0 2px}.fc-ltr .fc-basic-view .fc-day-top .fc-day-number{float:right}.fc-rtl .fc-basic-view .fc-day-top .fc-day-number{float:left}.fc-ltr .fc-basic-view .fc-day-top .fc-week-number{float:left;border-radius:0 0 3px}.fc-rtl .fc-basic-view .fc-day-top .fc-week-number{float:right;border-radius:0 0 0 3px}.fc-basic-view .fc-day-top .fc-week-number{min-width:1.5em;text-align:center;background-color:#f2f2f2;color:grey}.fc-basic-view td.fc-week-number>*{display:inline-block;min-width:1.25em}.fc-agenda-view .fc-day-grid{position:relative;z-index:2}.fc-agenda-view .fc-day-grid .fc-row{min-height:3em}.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton{padding-bottom:1em}.fc .fc-axis{vertical-align:middle;padding:0 4px;white-space:nowrap}.fc-ltr .fc-axis{text-align:right}.fc-rtl .fc-axis{text-align:left}.ui-widget td.fc-axis{font-weight:400}.fc-time-grid,.fc-time-grid-container{position:relative;z-index:1}.fc-time-grid{min-height:100%}.fc-time-grid table{border:0 hidden transparent}.fc-time-grid>.fc-bg{z-index:1}.fc-time-grid .fc-slats,.fc-time-grid>hr{position:relative;z-index:2}.fc-time-grid .fc-content-col{position:relative}.fc-time-grid .fc-content-skeleton{position:absolute;z-index:3;top:0;left:0;right:0}.fc-time-grid .fc-business-container{position:relative;z-index:1}.fc-time-grid .fc-bgevent-container{position:relative;z-index:2}.fc-time-grid .fc-highlight-container{z-index:3;position:relative}.fc-time-grid .fc-event-container{position:relative;z-index:4}.fc-time-grid .fc-now-indicator-line{z-index:5}.fc-time-grid .fc-helper-container{position:relative;z-index:6}.fc-time-grid .fc-slats td{height:1.5em;border-bottom:0}.fc-time-grid .fc-slats .fc-minor td{border-top-style:dotted}.fc-time-grid .fc-slats .ui-widget-content{background:0 0}.fc-time-grid .fc-highlight{position:absolute;left:0;right:0}.fc-ltr .fc-time-grid .fc-event-container{margin:0 2.5% 0 2px}.fc-rtl .fc-time-grid .fc-event-container{margin:0 2px 0 2.5%}.fc-time-grid .fc-bgevent,.fc-time-grid .fc-event{position:absolute;z-index:1}.fc-time-grid .fc-bgevent{left:0;right:0}.fc-v-event.fc-not-start{border-top-width:0;padding-top:1px;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event.fc-not-end{border-bottom-width:0;padding-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-time-grid-event.fc-selected{overflow:visible}.fc-time-grid-event.fc-selected .fc-bg{display:none}.fc-time-grid-event .fc-content{overflow:hidden}.fc-time-grid-event .fc-time,.fc-time-grid-event .fc-title{padding:0 1px}.fc-time-grid-event .fc-time{font-size:.85em;white-space:nowrap}.fc-time-grid-event.fc-short .fc-content{white-space:nowrap}.fc-time-grid-event.fc-short .fc-time,.fc-time-grid-event.fc-short .fc-title{display:inline-block;vertical-align:top}.fc-time-grid-event.fc-short .fc-time span{display:none}.fc-time-grid-event.fc-short .fc-time:before{content:attr(data-start)}.fc-time-grid-event.fc-short .fc-time:after{content:"\000A0-\000A0"}.fc-time-grid-event.fc-short .fc-title{font-size:.85em;padding:0}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer{left:0;right:0;bottom:0;height:8px;overflow:hidden;line-height:8px;font-size:11px;font-family:monospace;text-align:center;cursor:s-resize}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after{content:"="}.fc-time-grid-event.fc-selected .fc-resizer{border-radius:5px;border-width:1px;width:8px;height:8px;border-style:solid;border-color:inherit;background:#fff;left:50%;margin-left:-5px;bottom:-5px}.fc-time-grid .fc-now-indicator-line{border-top-width:1px;left:0;right:0}.fc-time-grid .fc-now-indicator-arrow{margin-top:-5px}.fc-ltr .fc-time-grid .fc-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-rtl .fc-time-grid .fc-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item:hover td{background-color:#f5f5f5}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}
\ No newline at end of file
index da4b984b2447e1b7a1ef14abf8db883fe693d875..bc8b51c8ab627a09035d2136a9a8f421b6805e2d 100644 (file)
@@ -1,7 +1,9 @@
 /*!
- * FullCalendar v1.6.4
- * Docs & License: http://arshaw.com/fullcalendar/
- * (c) 2013 Adam Shaw
+ * FullCalendar v3.0.1
+ * Docs & License: http://fullcalendar.io/
+ * (c) 2016 Adam Shaw
  */
-(function(t,e){function n(e){t.extend(!0,Ce,e)}function r(n,r,c){function u(t){ae?p()&&(S(),M(t)):f()}function f(){oe=r.theme?"ui":"fc",n.addClass("fc"),r.isRTL?n.addClass("fc-rtl"):n.addClass("fc-ltr"),r.theme&&n.addClass("ui-widget"),ae=t("<div class='fc-content' style='position:relative'/>").prependTo(n),ne=new a(ee,r),re=ne.render(),re&&n.prepend(re),y(r.defaultView),r.handleWindowResize&&t(window).resize(x),m()||v()}function v(){setTimeout(function(){!ie.start&&m()&&C()},0)}function h(){ie&&(te("viewDestroy",ie,ie,ie.element),ie.triggerEventDestroy()),t(window).unbind("resize",x),ne.destroy(),ae.remove(),n.removeClass("fc fc-rtl ui-widget")}function p(){return n.is(":visible")}function m(){return t("body").is(":visible")}function y(t){ie&&t==ie.name||D(t)}function D(e){he++,ie&&(te("viewDestroy",ie,ie,ie.element),Y(),ie.triggerEventDestroy(),G(),ie.element.remove(),ne.deactivateButton(ie.name)),ne.activateButton(e),ie=new Se[e](t("<div class='fc-view fc-view-"+e+"' style='position:relative'/>").appendTo(ae),ee),C(),$(),he--}function C(t){(!ie.start||t||ie.start>ge||ge>=ie.end)&&p()&&M(t)}function M(t){he++,ie.start&&(te("viewDestroy",ie,ie,ie.element),Y(),N()),G(),ie.render(ge,t||0),T(),$(),(ie.afterRender||A)(),_(),P(),te("viewRender",ie,ie,ie.element),ie.trigger("viewDisplay",de),he--,z()}function E(){p()&&(Y(),N(),S(),T(),F())}function S(){le=r.contentHeight?r.contentHeight:r.height?r.height-(re?re.height():0)-R(ae):Math.round(ae.width()/Math.max(r.aspectRatio,.5))}function T(){le===e&&S(),he++,ie.setHeight(le),ie.setWidth(ae.width()),he--,se=n.outerWidth()}function x(){if(!he)if(ie.start){var t=++ve;setTimeout(function(){t==ve&&!he&&p()&&se!=(se=n.outerWidth())&&(he++,E(),ie.trigger("windowResize",de),he--)},200)}else v()}function k(){N(),W()}function H(t){N(),F(t)}function F(t){p()&&(ie.setEventData(pe),ie.renderEvents(pe,t),ie.trigger("eventAfterAllRender"))}function N(){ie.triggerEventDestroy(),ie.clearEvents(),ie.clearEventData()}function z(){!r.lazyFetching||ue(ie.visStart,ie.visEnd)?W():F()}function W(){fe(ie.visStart,ie.visEnd)}function O(t){pe=t,F()}function L(t){H(t)}function _(){ne.updateTitle(ie.title)}function P(){var t=new Date;t>=ie.start&&ie.end>t?ne.disableButton("today"):ne.enableButton("today")}function q(t,n,r){ie.select(t,n,r===e?!0:r)}function Y(){ie&&ie.unselect()}function B(){C(-1)}function j(){C(1)}function I(){i(ge,-1),C()}function X(){i(ge,1),C()}function J(){ge=new Date,C()}function V(t,e,n){t instanceof Date?ge=d(t):g(ge,t,e,n),C()}function U(t,n,r){t!==e&&i(ge,t),n!==e&&s(ge,n),r!==e&&l(ge,r),C()}function Z(){return d(ge)}function G(){ae.css({width:"100%",height:ae.height(),overflow:"hidden"})}function $(){ae.css({width:"",height:"",overflow:""})}function Q(){return ie}function K(t,n){return n===e?r[t]:(("height"==t||"contentHeight"==t||"aspectRatio"==t)&&(r[t]=n,E()),e)}function te(t,n){return r[t]?r[t].apply(n||de,Array.prototype.slice.call(arguments,2)):e}var ee=this;ee.options=r,ee.render=u,ee.destroy=h,ee.refetchEvents=k,ee.reportEvents=O,ee.reportEventChange=L,ee.rerenderEvents=H,ee.changeView=y,ee.select=q,ee.unselect=Y,ee.prev=B,ee.next=j,ee.prevYear=I,ee.nextYear=X,ee.today=J,ee.gotoDate=V,ee.incrementDate=U,ee.formatDate=function(t,e){return w(t,e,r)},ee.formatDates=function(t,e,n){return b(t,e,n,r)},ee.getDate=Z,ee.getView=Q,ee.option=K,ee.trigger=te,o.call(ee,r,c);var ne,re,ae,oe,ie,se,le,ce,ue=ee.isFetchNeeded,fe=ee.fetchEvents,de=n[0],ve=0,he=0,ge=new Date,pe=[];g(ge,r.year,r.month,r.date),r.droppable&&t(document).bind("dragstart",function(e,n){var a=e.target,o=t(a);if(!o.parents(".fc").length){var i=r.dropAccept;(t.isFunction(i)?i.call(a,o):o.is(i))&&(ce=a,ie.dragStart(ce,e,n))}}).bind("dragstop",function(t,e){ce&&(ie.dragStop(ce,t,e),ce=null)})}function a(n,r){function a(){v=r.theme?"ui":"fc";var n=r.header;return n?h=t("<table class='fc-header' style='width:100%'/>").append(t("<tr/>").append(i("left")).append(i("center")).append(i("right"))):e}function o(){h.remove()}function i(e){var a=t("<td class='fc-header-"+e+"'/>"),o=r.header[e];return o&&t.each(o.split(" "),function(e){e>0&&a.append("<span class='fc-header-space'/>");var o;t.each(this.split(","),function(e,i){if("title"==i)a.append("<span class='fc-header-title'><h2>&nbsp;</h2></span>"),o&&o.addClass(v+"-corner-right"),o=null;else{var s;if(n[i]?s=n[i]:Se[i]&&(s=function(){u.removeClass(v+"-state-hover"),n.changeView(i)}),s){var l=r.theme?P(r.buttonIcons,i):null,c=P(r.buttonText,i),u=t("<span class='fc-button fc-button-"+i+" "+v+"-state-default'>"+(l?"<span class='fc-icon-wrap'><span class='ui-icon ui-icon-"+l+"'/>"+"</span>":c)+"</span>").click(function(){u.hasClass(v+"-state-disabled")||s()}).mousedown(function(){u.not("."+v+"-state-active").not("."+v+"-state-disabled").addClass(v+"-state-down")}).mouseup(function(){u.removeClass(v+"-state-down")}).hover(function(){u.not("."+v+"-state-active").not("."+v+"-state-disabled").addClass(v+"-state-hover")},function(){u.removeClass(v+"-state-hover").removeClass(v+"-state-down")}).appendTo(a);Y(u),o||u.addClass(v+"-corner-left"),o=u}}}),o&&o.addClass(v+"-corner-right")}),a}function s(t){h.find("h2").html(t)}function l(t){h.find("span.fc-button-"+t).addClass(v+"-state-active")}function c(t){h.find("span.fc-button-"+t).removeClass(v+"-state-active")}function u(t){h.find("span.fc-button-"+t).addClass(v+"-state-disabled")}function f(t){h.find("span.fc-button-"+t).removeClass(v+"-state-disabled")}var d=this;d.render=a,d.destroy=o,d.updateTitle=s,d.activateButton=l,d.deactivateButton=c,d.disableButton=u,d.enableButton=f;var v,h=t([])}function o(n,r){function a(t,e){return!E||E>t||e>S}function o(t,e){E=t,S=e,W=[];var n=++R,r=F.length;N=r;for(var a=0;r>a;a++)i(F[a],n)}function i(e,r){s(e,function(a){if(r==R){if(a){n.eventDataTransform&&(a=t.map(a,n.eventDataTransform)),e.eventDataTransform&&(a=t.map(a,e.eventDataTransform));for(var o=0;a.length>o;o++)a[o].source=e,w(a[o]);W=W.concat(a)}N--,N||k(W)}})}function s(r,a){var o,i,l=Ee.sourceFetchers;for(o=0;l.length>o;o++){if(i=l[o](r,E,S,a),i===!0)return;if("object"==typeof i)return s(i,a),e}var c=r.events;if(c)t.isFunction(c)?(m(),c(d(E),d(S),function(t){a(t),y()})):t.isArray(c)?a(c):a();else{var u=r.url;if(u){var f,v=r.success,h=r.error,g=r.complete;f=t.isFunction(r.data)?r.data():r.data;var p=t.extend({},f||{}),w=X(r.startParam,n.startParam),b=X(r.endParam,n.endParam);w&&(p[w]=Math.round(+E/1e3)),b&&(p[b]=Math.round(+S/1e3)),m(),t.ajax(t.extend({},Te,r,{data:p,success:function(e){e=e||[];var n=I(v,this,arguments);t.isArray(n)&&(e=n),a(e)},error:function(){I(h,this,arguments),a()},complete:function(){I(g,this,arguments),y()}}))}else a()}}function l(t){t=c(t),t&&(N++,i(t,R))}function c(n){return t.isFunction(n)||t.isArray(n)?n={events:n}:"string"==typeof n&&(n={url:n}),"object"==typeof n?(b(n),F.push(n),n):e}function u(e){F=t.grep(F,function(t){return!D(t,e)}),W=t.grep(W,function(t){return!D(t.source,e)}),k(W)}function f(t){var e,n,r=W.length,a=x().defaultEventEnd,o=t.start-t._start,i=t.end?t.end-(t._end||a(t)):0;for(e=0;r>e;e++)n=W[e],n._id==t._id&&n!=t&&(n.start=new Date(+n.start+o),n.end=t.end?n.end?new Date(+n.end+i):new Date(+a(n)+i):null,n.title=t.title,n.url=t.url,n.allDay=t.allDay,n.className=t.className,n.editable=t.editable,n.color=t.color,n.backgroundColor=t.backgroundColor,n.borderColor=t.borderColor,n.textColor=t.textColor,w(n));w(t),k(W)}function v(t,e){w(t),t.source||(e&&(H.events.push(t),t.source=H),W.push(t)),k(W)}function h(e){if(e){if(!t.isFunction(e)){var n=e+"";e=function(t){return t._id==n}}W=t.grep(W,e,!0);for(var r=0;F.length>r;r++)t.isArray(F[r].events)&&(F[r].events=t.grep(F[r].events,e,!0))}else{W=[];for(var r=0;F.length>r;r++)t.isArray(F[r].events)&&(F[r].events=[])}k(W)}function g(e){return t.isFunction(e)?t.grep(W,e):e?(e+="",t.grep(W,function(t){return t._id==e})):W}function m(){z++||T("loading",null,!0,x())}function y(){--z||T("loading",null,!1,x())}function w(t){var r=t.source||{},a=X(r.ignoreTimezone,n.ignoreTimezone);t._id=t._id||(t.id===e?"_fc"+xe++:t.id+""),t.date&&(t.start||(t.start=t.date),delete t.date),t._start=d(t.start=p(t.start,a)),t.end=p(t.end,a),t.end&&t.end<=t.start&&(t.end=null),t._end=t.end?d(t.end):null,t.allDay===e&&(t.allDay=X(r.allDayDefault,n.allDayDefault)),t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[]}function b(t){t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[];for(var e=Ee.sourceNormalizers,n=0;e.length>n;n++)e[n](t)}function D(t,e){return t&&e&&C(t)==C(e)}function C(t){return("object"==typeof t?t.events||t.url:"")||t}var M=this;M.isFetchNeeded=a,M.fetchEvents=o,M.addEventSource=l,M.removeEventSource=u,M.updateEvent=f,M.renderEvent=v,M.removeEvents=h,M.clientEvents=g,M.normalizeEvent=w;for(var E,S,T=M.trigger,x=M.getView,k=M.reportEvents,H={events:[]},F=[H],R=0,N=0,z=0,W=[],A=0;r.length>A;A++)c(r[A])}function i(t,e,n){return t.setFullYear(t.getFullYear()+e),n||f(t),t}function s(t,e,n){if(+t){var r=t.getMonth()+e,a=d(t);for(a.setDate(1),a.setMonth(r),t.setMonth(r),n||f(t);t.getMonth()!=a.getMonth();)t.setDate(t.getDate()+(a>t?1:-1))}return t}function l(t,e,n){if(+t){var r=t.getDate()+e,a=d(t);a.setHours(9),a.setDate(r),t.setDate(r),n||f(t),c(t,a)}return t}function c(t,e){if(+t)for(;t.getDate()!=e.getDate();)t.setTime(+t+(e>t?1:-1)*Fe)}function u(t,e){return t.setMinutes(t.getMinutes()+e),t}function f(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t}function d(t,e){return e?f(new Date(+t)):new Date(+t)}function v(){var t,e=0;do t=new Date(1970,e++,1);while(t.getHours());return t}function h(t,e){return Math.round((d(t,!0)-d(e,!0))/He)}function g(t,n,r,a){n!==e&&n!=t.getFullYear()&&(t.setDate(1),t.setMonth(0),t.setFullYear(n)),r!==e&&r!=t.getMonth()&&(t.setDate(1),t.setMonth(r)),a!==e&&t.setDate(a)}function p(t,n){return"object"==typeof t?t:"number"==typeof t?new Date(1e3*t):"string"==typeof t?t.match(/^\d+(\.\d+)?$/)?new Date(1e3*parseFloat(t)):(n===e&&(n=!0),m(t,n)||(t?new Date(t):null)):null}function m(t,e){var n=t.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);if(!n)return null;var r=new Date(n[1],0,1);if(e||!n[13]){var a=new Date(n[1],0,1,9,0);n[3]&&(r.setMonth(n[3]-1),a.setMonth(n[3]-1)),n[5]&&(r.setDate(n[5]),a.setDate(n[5])),c(r,a),n[7]&&r.setHours(n[7]),n[8]&&r.setMinutes(n[8]),n[10]&&r.setSeconds(n[10]),n[12]&&r.setMilliseconds(1e3*Number("0."+n[12])),c(r,a)}else if(r.setUTCFullYear(n[1],n[3]?n[3]-1:0,n[5]||1),r.setUTCHours(n[7]||0,n[8]||0,n[10]||0,n[12]?1e3*Number("0."+n[12]):0),n[14]){var o=60*Number(n[16])+(n[18]?Number(n[18]):0);o*="-"==n[15]?1:-1,r=new Date(+r+1e3*60*o)}return r}function y(t){if("number"==typeof t)return 60*t;if("object"==typeof t)return 60*t.getHours()+t.getMinutes();var e=t.match(/(\d+)(?::(\d+))?\s*(\w+)?/);if(e){var n=parseInt(e[1],10);return e[3]&&(n%=12,"p"==e[3].toLowerCase().charAt(0)&&(n+=12)),60*n+(e[2]?parseInt(e[2],10):0)}}function w(t,e,n){return b(t,null,e,n)}function b(t,e,n,r){r=r||Ce;var a,o,i,s,l=t,c=e,u=n.length,f="";for(a=0;u>a;a++)if(o=n.charAt(a),"'"==o){for(i=a+1;u>i;i++)if("'"==n.charAt(i)){l&&(f+=i==a+1?"'":n.substring(a+1,i),a=i);break}}else if("("==o){for(i=a+1;u>i;i++)if(")"==n.charAt(i)){var d=w(l,n.substring(a+1,i),r);parseInt(d.replace(/\D/,""),10)&&(f+=d),a=i;break}}else if("["==o){for(i=a+1;u>i;i++)if("]"==n.charAt(i)){var v=n.substring(a+1,i),d=w(l,v,r);d!=w(c,v,r)&&(f+=d),a=i;break}}else if("{"==o)l=e,c=t;else if("}"==o)l=t,c=e;else{for(i=u;i>a;i--)if(s=Ne[n.substring(a,i)]){l&&(f+=s(l,r)),a=i-1;break}i==a&&l&&(f+=o)}return f}function D(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1}function C(t){return t.end?M(t.end,t.allDay):l(d(t.start),1)}function M(t,e){return t=d(t),e||t.getHours()||t.getMinutes()?l(t,1):f(t)}function E(n,r,a){n.unbind("mouseover").mouseover(function(n){for(var o,i,s,l=n.target;l!=this;)o=l,l=l.parentNode;(i=o._fci)!==e&&(o._fci=e,s=r[i],a(s.event,s.element,s),t(n.target).trigger(n)),n.stopPropagation()})}function S(e,n,r){for(var a,o=0;e.length>o;o++)a=t(e[o]),a.width(Math.max(0,n-x(a,r)))}function T(e,n,r){for(var a,o=0;e.length>o;o++)a=t(e[o]),a.height(Math.max(0,n-R(a,r)))}function x(t,e){return k(t)+F(t)+(e?H(t):0)}function k(e){return(parseFloat(t.css(e[0],"paddingLeft",!0))||0)+(parseFloat(t.css(e[0],"paddingRight",!0))||0)}function H(e){return(parseFloat(t.css(e[0],"marginLeft",!0))||0)+(parseFloat(t.css(e[0],"marginRight",!0))||0)}function F(e){return(parseFloat(t.css(e[0],"borderLeftWidth",!0))||0)+(parseFloat(t.css(e[0],"borderRightWidth",!0))||0)}function R(t,e){return N(t)+W(t)+(e?z(t):0)}function N(e){return(parseFloat(t.css(e[0],"paddingTop",!0))||0)+(parseFloat(t.css(e[0],"paddingBottom",!0))||0)}function z(e){return(parseFloat(t.css(e[0],"marginTop",!0))||0)+(parseFloat(t.css(e[0],"marginBottom",!0))||0)}function W(e){return(parseFloat(t.css(e[0],"borderTopWidth",!0))||0)+(parseFloat(t.css(e[0],"borderBottomWidth",!0))||0)}function A(){}function O(t,e){return t-e}function L(t){return Math.max.apply(Math,t)}function _(t){return(10>t?"0":"")+t}function P(t,n){if(t[n]!==e)return t[n];for(var r,a=n.split(/(?=[A-Z])/),o=a.length-1;o>=0;o--)if(r=t[a[o].toLowerCase()],r!==e)return r;return t[""]}function q(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function Y(t){t.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function B(t){t.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function j(t,e){var n=t.source||{},r=t.color,a=n.color,o=e("eventColor"),i=t.backgroundColor||r||n.backgroundColor||a||e("eventBackgroundColor")||o,s=t.borderColor||r||n.borderColor||a||e("eventBorderColor")||o,l=t.textColor||n.textColor||e("eventTextColor"),c=[];return i&&c.push("background-color:"+i),s&&c.push("border-color:"+s),l&&c.push("color:"+l),c.join(";")}function I(e,n,r){if(t.isFunction(e)&&(e=[e]),e){var a,o;for(a=0;e.length>a;a++)o=e[a].apply(n,r)||o;return o}}function X(){for(var t=0;arguments.length>t;t++)if(arguments[t]!==e)return arguments[t]}function J(t,e){function n(t,e){e&&(s(t,e),t.setDate(1));var n=a("firstDay"),f=d(t,!0);f.setDate(1);var v=s(d(f),1),g=d(f);l(g,-((g.getDay()-n+7)%7)),i(g);var p=d(v);l(p,(7-p.getDay()+n)%7),i(p,-1,!0);var m=c(),y=Math.round(h(p,g)/7);"fixed"==a("weekMode")&&(l(p,7*(6-y)),y=6),r.title=u(f,a("titleFormat")),r.start=f,r.end=v,r.visStart=g,r.visEnd=p,o(y,m,!0)}var r=this;r.render=n,Z.call(r,t,e,"month");var a=r.opt,o=r.renderBasic,i=r.skipHiddenDays,c=r.getCellsPerWeek,u=e.formatDate}function V(t,e){function n(t,e){e&&l(t,7*e);var n=l(d(t),-((t.getDay()-a("firstDay")+7)%7)),u=l(d(n),7),f=d(n);i(f);var v=d(u);i(v,-1,!0);var h=s();r.start=n,r.end=u,r.visStart=f,r.visEnd=v,r.title=c(f,l(d(v),-1),a("titleFormat")),o(1,h,!1)}var r=this;r.render=n,Z.call(r,t,e,"basicWeek");var a=r.opt,o=r.renderBasic,i=r.skipHiddenDays,s=r.getCellsPerWeek,c=e.formatDates}function U(t,e){function n(t,e){e&&l(t,e),i(t,0>e?-1:1);var n=d(t,!0),c=l(d(n),1);r.title=s(t,a("titleFormat")),r.start=r.visStart=n,r.end=r.visEnd=c,o(1,1,!1)}var r=this;r.render=n,Z.call(r,t,e,"basicDay");var a=r.opt,o=r.renderBasic,i=r.skipHiddenDays,s=e.formatDate}function Z(e,n,r){function a(t,e,n){ee=t,ne=e,re=n,o(),j||i(),s()}function o(){le=he("theme")?"ui":"fc",ce=he("columnFormat"),ue=he("weekNumbers"),de=he("weekNumberTitle"),ve="iso"!=he("weekNumberCalculation")?"w":"W"}function i(){Z=t("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(e)}function s(){var n=c();L&&L.remove(),L=t(n).appendTo(e),_=L.find("thead"),P=_.find(".fc-day-header"),j=L.find("tbody"),I=j.find("tr"),X=j.find(".fc-day"),J=I.find("td:first-child"),V=I.eq(0).find(".fc-day > div"),U=I.eq(0).find(".fc-day-content > div"),B(_.add(_.find("tr"))),B(I),I.eq(0).addClass("fc-first"),I.filter(":last").addClass("fc-last"),X.each(function(e,n){var r=Ee(Math.floor(e/ne),e%ne);ge("dayRender",O,r,t(n))}),y(X)}function c(){var t="<table class='fc-border-separate' style='width:100%' cellspacing='0'>"+u()+v()+"</table>";return t}function u(){var t,e,n=le+"-widget-header",r="";for(r+="<thead><tr>",ue&&(r+="<th class='fc-week-number "+n+"'>"+q(de)+"</th>"),t=0;ne>t;t++)e=Ee(0,t),r+="<th class='fc-day-header fc-"+ke[e.getDay()]+" "+n+"'>"+q(xe(e,ce))+"</th>";return r+="</tr></thead>"}function v(){var t,e,n,r=le+"-widget-content",a="";for(a+="<tbody>",t=0;ee>t;t++){for(a+="<tr class='fc-week'>",ue&&(n=Ee(t,0),a+="<td class='fc-week-number "+r+"'>"+"<div>"+q(xe(n,ve))+"</div>"+"</td>"),e=0;ne>e;e++)n=Ee(t,e),a+=h(n);a+="</tr>"}return a+="</tbody>"}function h(t){var e=le+"-widget-content",n=O.start.getMonth(),r=f(new Date),a="",o=["fc-day","fc-"+ke[t.getDay()],e];return t.getMonth()!=n&&o.push("fc-other-month"),+t==+r?o.push("fc-today",le+"-state-highlight"):r>t?o.push("fc-past"):o.push("fc-future"),a+="<td class='"+o.join(" ")+"'"+" data-date='"+xe(t,"yyyy-MM-dd")+"'"+">"+"<div>",re&&(a+="<div class='fc-day-number'>"+t.getDate()+"</div>"),a+="<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></div></td>"}function g(e){Q=e;var n,r,a,o=Q-_.height();"variable"==he("weekMode")?n=r=Math.floor(o/(1==ee?2:6)):(n=Math.floor(o/ee),r=o-n*(ee-1)),J.each(function(e,o){ee>e&&(a=t(o),a.find("> div").css("min-height",(e==ee-1?r:n)-R(a)))})}function p(t){$=t,ie.clear(),se.clear(),te=0,ue&&(te=_.find("th.fc-week-number").outerWidth()),K=Math.floor(($-te)/ne),S(P.slice(0,-1),K)}function y(t){t.click(w).mousedown(Me)}function w(e){if(!he("selectable")){var n=m(t(this).data("date"));ge("dayClick",this,n,!0,e)}}function b(t,e,n){n&&ae.build();for(var r=Te(t,e),a=0;r.length>a;a++){var o=r[a];y(D(o.row,o.leftCol,o.row,o.rightCol))}}function D(t,n,r,a){var o=ae.rect(t,n,r,a,e);return be(o,e)}function C(t){return d(t)}function M(t,e){b(t,l(d(e),1),!0)}function E(){Ce()}function T(t,e,n){var r=Se(t),a=X[r.row*ne+r.col];ge("dayClick",a,t,e,n)}function x(t,e){oe.start(function(t){Ce(),t&&D(t.row,t.col,t.row,t.col)},e)}function k(t,e,n){var r=oe.stop();if(Ce(),r){var a=Ee(r);ge("drop",t,a,!0,e,n)}}function H(t){return d(t.start)}function F(t){return ie.left(t)}function N(t){return ie.right(t)}function z(t){return se.left(t)}function W(t){return se.right(t)}function A(t){return I.eq(t)}var O=this;O.renderBasic=a,O.setHeight=g,O.setWidth=p,O.renderDayOverlay=b,O.defaultSelectionEnd=C,O.renderSelection=M,O.clearSelection=E,O.reportDayClick=T,O.dragStart=x,O.dragStop=k,O.defaultEventEnd=H,O.getHoverListener=function(){return oe},O.colLeft=F,O.colRight=N,O.colContentLeft=z,O.colContentRight=W,O.getIsCellAllDay=function(){return!0},O.allDayRow=A,O.getRowCnt=function(){return ee},O.getColCnt=function(){return ne},O.getColWidth=function(){return K},O.getDaySegmentContainer=function(){return Z},fe.call(O,e,n,r),me.call(O),pe.call(O),G.call(O);var L,_,P,j,I,X,J,V,U,Z,$,Q,K,te,ee,ne,re,ae,oe,ie,se,le,ce,ue,de,ve,he=O.opt,ge=O.trigger,be=O.renderOverlay,Ce=O.clearOverlays,Me=O.daySelectionMousedown,Ee=O.cellToDate,Se=O.dateToCell,Te=O.rangeToSegments,xe=n.formatDate;Y(e.addClass("fc-grid")),ae=new ye(function(e,n){var r,a,o;P.each(function(e,i){r=t(i),a=r.offset().left,e&&(o[1]=a),o=[a],n[e]=o}),o[1]=a+r.outerWidth(),I.each(function(n,i){ee>n&&(r=t(i),a=r.offset().top,n&&(o[1]=a),o=[a],e[n]=o)}),o[1]=a+r.outerHeight()}),oe=new we(ae),ie=new De(function(t){return V.eq(t)}),se=new De(function(t){return U.eq(t)})}function G(){function t(t,e){n.renderDayEvents(t,e)}function e(){n.getDaySegmentContainer().empty()}var n=this;n.renderEvents=t,n.clearEvents=e,de.call(n)}function $(t,e){function n(t,e){e&&l(t,7*e);var n=l(d(t),-((t.getDay()-a("firstDay")+7)%7)),u=l(d(n),7),f=d(n);i(f);var v=d(u);i(v,-1,!0);var h=s();r.title=c(f,l(d(v),-1),a("titleFormat")),r.start=n,r.end=u,r.visStart=f,r.visEnd=v,o(h)}var r=this;r.render=n,K.call(r,t,e,"agendaWeek");var a=r.opt,o=r.renderAgenda,i=r.skipHiddenDays,s=r.getCellsPerWeek,c=e.formatDates}function Q(t,e){function n(t,e){e&&l(t,e),i(t,0>e?-1:1);var n=d(t,!0),c=l(d(n),1);r.title=s(t,a("titleFormat")),r.start=r.visStart=n,r.end=r.visEnd=c,o(1)}var r=this;r.render=n,K.call(r,t,e,"agendaDay");var a=r.opt,o=r.renderAgenda,i=r.skipHiddenDays,s=e.formatDate}function K(n,r,a){function o(t){We=t,i(),K?c():s()}function i(){qe=Ue("theme")?"ui":"fc",Ye=Ue("isRTL"),Be=y(Ue("minTime")),je=y(Ue("maxTime")),Ie=Ue("columnFormat"),Xe=Ue("weekNumbers"),Je=Ue("weekNumberTitle"),Ve="iso"!=Ue("weekNumberCalculation")?"w":"W",Re=Ue("snapMinutes")||Ue("slotMinutes")}function s(){var e,r,a,o,i,s=qe+"-widget-header",l=qe+"-widget-content",f=0==Ue("slotMinutes")%15;for(c(),ce=t("<div style='position:absolute;z-index:2;left:0;width:100%'/>").appendTo(n),Ue("allDaySlot")?(ue=t("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(ce),e="<table style='width:100%' class='fc-agenda-allday' cellspacing='0'><tr><th class='"+s+" fc-agenda-axis'>"+Ue("allDayText")+"</th>"+"<td>"+"<div class='fc-day-content'><div style='position:relative'/></div>"+"</td>"+"<th class='"+s+" fc-agenda-gutter'>&nbsp;</th>"+"</tr>"+"</table>",de=t(e).appendTo(ce),ve=de.find("tr"),C(ve.find("td")),ce.append("<div class='fc-agenda-divider "+s+"'>"+"<div class='fc-agenda-divider-inner'/>"+"</div>")):ue=t([]),he=t("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>").appendTo(ce),ge=t("<div style='position:relative;width:100%;overflow:hidden'/>").appendTo(he),be=t("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(ge),e="<table class='fc-agenda-slots' style='width:100%' cellspacing='0'><tbody>",r=v(),o=u(d(r),je),u(r,Be),Ae=0,a=0;o>r;a++)i=r.getMinutes(),e+="<tr class='fc-slot"+a+" "+(i?"fc-minor":"")+"'>"+"<th class='fc-agenda-axis "+s+"'>"+(f&&i?"&nbsp;":on(r,Ue("axisFormat")))+"</th>"+"<td class='"+l+"'>"+"<div style='position:relative'>&nbsp;</div>"+"</td>"+"</tr>",u(r,Ue("slotMinutes")),Ae++;e+="</tbody></table>",Ce=t(e).appendTo(ge),M(Ce.find("td"))}function c(){var e=h();K&&K.remove(),K=t(e).appendTo(n),ee=K.find("thead"),ne=ee.find("th").slice(1,-1),re=K.find("tbody"),ae=re.find("td").slice(0,-1),oe=ae.find("> div"),ie=ae.find(".fc-day-content > div"),se=ae.eq(0),le=oe.eq(0),B(ee.add(ee.find("tr"))),B(re.add(re.find("tr")))}function h(){var t="<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>"+g()+p()+"</table>";return t}function g(){var t,e,n,r=qe+"-widget-header",a="";for(a+="<thead><tr>",Xe?(t=nn(0,0),e=on(t,Ve),Ye?e+=Je:e=Je+e,a+="<th class='fc-agenda-axis fc-week-number "+r+"'>"+q(e)+"</th>"):a+="<th class='fc-agenda-axis "+r+"'>&nbsp;</th>",n=0;We>n;n++)t=nn(0,n),a+="<th class='fc-"+ke[t.getDay()]+" fc-col"+n+" "+r+"'>"+q(on(t,Ie))+"</th>";return a+="<th class='fc-agenda-gutter "+r+"'>&nbsp;</th>"+"</tr>"+"</thead>"}function p(){var t,e,n,r,a,o=qe+"-widget-header",i=qe+"-widget-content",s=f(new Date),l="";for(l+="<tbody><tr><th class='fc-agenda-axis "+o+"'>&nbsp;</th>",n="",e=0;We>e;e++)t=nn(0,e),a=["fc-col"+e,"fc-"+ke[t.getDay()],i],+t==+s?a.push(qe+"-state-highlight","fc-today"):s>t?a.push("fc-past"):a.push("fc-future"),r="<td class='"+a.join(" ")+"'>"+"<div>"+"<div class='fc-day-content'>"+"<div style='position:relative'>&nbsp;</div>"+"</div>"+"</div>"+"</td>",n+=r;return l+=n,l+="<td class='fc-agenda-gutter "+i+"'>&nbsp;</td>"+"</tr>"+"</tbody>"}function m(t){t===e&&(t=Se),Se=t,sn={};var n=re.position().top,r=he.position().top,a=Math.min(t-n,Ce.height()+r+1);le.height(a-R(se)),ce.css("top",n),he.height(a-r-1),Fe=Ce.find("tr:first").height()+1,Ne=Ue("slotMinutes")/Re,ze=Fe/Ne}function w(e){Ee=e,_e.clear(),Pe.clear();var n=ee.find("th:first");de&&(n=n.add(de.find("th:first"))),n=n.add(Ce.find("th:first")),Te=0,S(n.width("").each(function(e,n){Te=Math.max(Te,t(n).outerWidth())}),Te);var r=K.find(".fc-agenda-gutter");de&&(r=r.add(de.find("th.fc-agenda-gutter")));var a=he[0].clientWidth;He=he.width()-a,He?(S(r,He),r.show().prev().removeClass("fc-last")):r.hide().prev().addClass("fc-last"),xe=Math.floor((a-Te)/We),S(ne.slice(0,-1),xe)}function b(){function t(){he.scrollTop(r)}var e=v(),n=d(e);n.setHours(Ue("firstHour"));var r=_(e,n)+1;t(),setTimeout(t,0)}function D(){b()}function C(t){t.click(E).mousedown(tn)}function M(t){t.click(E).mousedown(U)}function E(t){if(!Ue("selectable")){var e=Math.min(We-1,Math.floor((t.pageX-K.offset().left-Te)/xe)),n=nn(0,e),r=this.parentNode.className.match(/fc-slot(\d+)/);if(r){var a=parseInt(r[1])*Ue("slotMinutes"),o=Math.floor(a/60);n.setHours(o),n.setMinutes(a%60+Be),Ze("dayClick",ae[e],n,!1,t)}else Ze("dayClick",ae[e],n,!0,t)}}function x(t,e,n){n&&Oe.build();for(var r=an(t,e),a=0;r.length>a;a++){var o=r[a];C(k(o.row,o.leftCol,o.row,o.rightCol))}}function k(t,e,n,r){var a=Oe.rect(t,e,n,r,ce);return Ge(a,ce)}function H(t,e){for(var n=0;We>n;n++){var r=nn(0,n),a=l(d(r),1),o=new Date(Math.max(r,t)),i=new Date(Math.min(a,e));if(i>o){var s=Oe.rect(0,n,0,n,ge),c=_(r,o),u=_(r,i);s.top=c,s.height=u-c,M(Ge(s,ge))}}}function F(t){return _e.left(t)}function N(t){return Pe.left(t)}function z(t){return _e.right(t)}function W(t){return Pe.right(t)}function A(t){return Ue("allDaySlot")&&!t.row}function L(t){var e=nn(0,t.col),n=t.row;return Ue("allDaySlot")&&n--,n>=0&&u(e,Be+n*Re),e}function _(t,n){if(t=d(t,!0),u(d(t),Be)>n)return 0;if(n>=u(d(t),je))return Ce.height();var r=Ue("slotMinutes"),a=60*n.getHours()+n.getMinutes()-Be,o=Math.floor(a/r),i=sn[o];return i===e&&(i=sn[o]=Ce.find("tr").eq(o).find("td div")[0].offsetTop),Math.max(0,Math.round(i-1+Fe*(a%r/r)))}function P(){return ve}function j(t){var e=d(t.start);return t.allDay?e:u(e,Ue("defaultEventMinutes"))}function I(t,e){return e?d(t):u(d(t),Ue("slotMinutes"))}function X(t,e,n){n?Ue("allDaySlot")&&x(t,l(d(e),1),!0):J(t,e)}function J(e,n){var r=Ue("selectHelper");if(Oe.build(),r){var a=rn(e).col;if(a>=0&&We>a){var o=Oe.rect(0,a,0,a,ge),i=_(e,e),s=_(e,n);if(s>i){if(o.top=i,o.height=s-i,o.left+=2,o.width-=5,t.isFunction(r)){var l=r(e,n);l&&(o.position="absolute",Me=t(l).css(o).appendTo(ge))}else o.isStart=!0,o.isEnd=!0,Me=t(en({title:"",start:e,end:n,className:["fc-select-helper"],editable:!1},o)),Me.css("opacity",Ue("dragOpacity"));Me&&(M(Me),ge.append(Me),S(Me,o.width,!0),T(Me,o.height,!0))}}}else H(e,n)}function V(){$e(),Me&&(Me.remove(),Me=null)}function U(e){if(1==e.which&&Ue("selectable")){Ke(e);var n;Le.start(function(t,e){if(V(),t&&t.col==e.col&&!A(t)){var r=L(e),a=L(t);n=[r,u(d(r),Re),a,u(d(a),Re)].sort(O),J(n[0],n[3])}else n=null},e),t(document).one("mouseup",function(t){Le.stop(),n&&(+n[0]==+n[1]&&Z(n[0],!1,t),Qe(n[0],n[3],!1,t))})}}function Z(t,e,n){Ze("dayClick",ae[rn(t).col],t,e,n)}function G(t,e){Le.start(function(t){if($e(),t)if(A(t))k(t.row,t.col,t.row,t.col);else{var e=L(t),n=u(d(e),Ue("defaultEventMinutes"));H(e,n)}},e)}function $(t,e,n){var r=Le.stop();$e(),r&&Ze("drop",t,L(r),A(r),e,n)}var Q=this;Q.renderAgenda=o,Q.setWidth=w,Q.setHeight=m,Q.afterRender=D,Q.defaultEventEnd=j,Q.timePosition=_,Q.getIsCellAllDay=A,Q.allDayRow=P,Q.getCoordinateGrid=function(){return Oe},Q.getHoverListener=function(){return Le},Q.colLeft=F,Q.colRight=z,Q.colContentLeft=N,Q.colContentRight=W,Q.getDaySegmentContainer=function(){return ue},Q.getSlotSegmentContainer=function(){return be},Q.getMinMinute=function(){return Be},Q.getMaxMinute=function(){return je},Q.getSlotContainer=function(){return ge},Q.getRowCnt=function(){return 1},Q.getColCnt=function(){return We},Q.getColWidth=function(){return xe},Q.getSnapHeight=function(){return ze},Q.getSnapMinutes=function(){return Re},Q.defaultSelectionEnd=I,Q.renderDayOverlay=x,Q.renderSelection=X,Q.clearSelection=V,Q.reportDayClick=Z,Q.dragStart=G,Q.dragStop=$,fe.call(Q,n,r,a),me.call(Q),pe.call(Q),te.call(Q);var K,ee,ne,re,ae,oe,ie,se,le,ce,ue,de,ve,he,ge,be,Ce,Me,Ee,Se,Te,xe,He,Fe,Re,Ne,ze,We,Ae,Oe,Le,_e,Pe,qe,Ye,Be,je,Ie,Xe,Je,Ve,Ue=Q.opt,Ze=Q.trigger,Ge=Q.renderOverlay,$e=Q.clearOverlays,Qe=Q.reportSelection,Ke=Q.unselect,tn=Q.daySelectionMousedown,en=Q.slotSegHtml,nn=Q.cellToDate,rn=Q.dateToCell,an=Q.rangeToSegments,on=r.formatDate,sn={};Y(n.addClass("fc-agenda")),Oe=new ye(function(e,n){function r(t){return Math.max(l,Math.min(c,t))}var a,o,i;ne.each(function(e,r){a=t(r),o=a.offset().left,e&&(i[1]=o),i=[o],n[e]=i}),i[1]=o+a.outerWidth(),Ue("allDaySlot")&&(a=ve,o=a.offset().top,e[0]=[o,o+a.outerHeight()]);for(var s=ge.offset().top,l=he.offset().top,c=l+he.outerHeight(),u=0;Ae*Ne>u;u++)e.push([r(s+ze*u),r(s+ze*(u+1))])}),Le=new we(Oe),_e=new De(function(t){return oe.eq(t)}),Pe=new De(function(t){return ie.eq(t)})}function te(){function n(t,e){var n,r=t.length,o=[],i=[];for(n=0;r>n;n++)t[n].allDay?o.push(t[n]):i.push(t[n]);y("allDaySlot")&&(te(o,e),k()),s(a(i),e)}function r(){H().empty(),F().empty()}function a(e){var n,r,a,s,l,c=Y(),f=W(),v=z(),h=t.map(e,i),g=[];for(r=0;c>r;r++)for(n=P(0,r),u(n,f),l=o(e,h,n,u(d(n),v-f)),l=ee(l),a=0;l.length>a;a++)s=l[a],s.col=r,g.push(s);return g}function o(t,e,n,r){var a,o,i,s,l,c,u,f,v=[],h=t.length;for(a=0;h>a;a++)o=t[a],i=o.start,s=e[a],s>n&&r>i&&(n>i?(l=d(n),u=!1):(l=i,u=!0),s>r?(c=d(r),f=!1):(c=s,f=!0),v.push({event:o,start:l,end:c,isStart:u,isEnd:f}));return v.sort(ue)}function i(t){return t.end?d(t.end):u(d(t.start),y("defaultEventMinutes"))}function s(n,r){var a,o,i,s,l,u,d,v,h,g,p,m,b,D,C,M,S=n.length,T="",k=F(),H=y("isRTL");for(a=0;S>a;a++)o=n[a],i=o.event,s=A(o.start,o.start),l=A(o.start,o.end),u=L(o.col),d=_(o.col),v=d-u,d-=.025*v,v=d-u,h=v*(o.forwardCoord-o.backwardCoord),y("slotEventOverlap")&&(h=Math.max(2*(h-10),h)),H?(p=d-o.backwardCoord*v,g=p-h):(g=u+o.backwardCoord*v,p=g+h),g=Math.max(g,u),p=Math.min(p,d),h=p-g,o.top=s,o.left=g,o.outerWidth=h,o.outerHeight=l-s,T+=c(i,o);for(k[0].innerHTML=T,m=k.children(),a=0;S>a;a++)o=n[a],i=o.event,b=t(m[a]),D=w("eventRender",i,i,b),D===!1?b.remove():(D&&D!==!0&&(b.remove(),b=t(D).css({position:"absolute",top:o.top,left:o.left}).appendTo(k)),o.element=b,i._id===r?f(i,b,o):b[0]._fci=a,V(i,b));for(E(k,n,f),a=0;S>a;a++)o=n[a],(b=o.element)&&(o.vsides=R(b,!0),o.hsides=x(b,!0),C=b.find(".fc-event-title"),C.length&&(o.contentTop=C[0].offsetTop));for(a=0;S>a;a++)o=n[a],(b=o.element)&&(b[0].style.width=Math.max(0,o.outerWidth-o.hsides)+"px",M=Math.max(0,o.outerHeight-o.vsides),b[0].style.height=M+"px",i=o.event,o.contentTop!==e&&10>M-o.contentTop&&(b.find("div.fc-event-time").text(re(i.start,y("timeFormat"))+" - "+i.title),b.find("div.fc-event-title").remove()),w("eventAfterRender",i,i,b))}function c(t,e){var n="<",r=t.url,a=j(t,y),o=["fc-event","fc-event-vert"];return b(t)&&o.push("fc-event-draggable"),e.isStart&&o.push("fc-event-start"),e.isEnd&&o.push("fc-event-end"),o=o.concat(t.className),t.source&&(o=o.concat(t.source.className||[])),n+=r?"a href='"+q(t.url)+"'":"div",n+=" class='"+o.join(" ")+"'"+" style="+"'"+"position:absolute;"+"top:"+e.top+"px;"+"left:"+e.left+"px;"+a+"'"+">"+"<div class='fc-event-inner'>"+"<div class='fc-event-time'>"+q(ae(t.start,t.end,y("timeFormat")))+"</div>"+"<div class='fc-event-title'>"+q(t.title||"")+"</div>"+"</div>"+"<div class='fc-event-bg'></div>",e.isEnd&&D(t)&&(n+="<div class='ui-resizable-handle ui-resizable-s'>=</div>"),n+="</"+(r?"a":"div")+">"}function f(t,e,n){var r=e.find("div.fc-event-time");b(t)&&g(t,e,r),n.isEnd&&D(t)&&p(t,e,r),S(t,e)}function v(t,e,n){function r(){c||(e.width(a).height("").draggable("option","grid",null),c=!0)}var a,o,i,s=n.isStart,c=!0,u=N(),f=B(),v=I(),g=X(),p=W();e.draggable({opacity:y("dragOpacity","month"),revertDuration:y("dragRevertDuration"),start:function(n,p){w("eventDragStart",e,t,n,p),Z(t,e),a=e.width(),u.start(function(n,a){if(K(),n){o=!1;var u=P(0,a.col),p=P(0,n.col);i=h(p,u),n.row?s?c&&(e.width(f-10),T(e,v*Math.round((t.end?(t.end-t.start)/Re:y("defaultEventMinutes"))/g)),e.draggable("option","grid",[f,1]),c=!1):o=!0:(Q(l(d(t.start),i),l(C(t),i)),r()),o=o||c&&!i
-}else r(),o=!0;e.draggable("option","revert",o)},n,"drag")},stop:function(n,a){if(u.stop(),K(),w("eventDragStop",e,t,n,a),o)r(),e.css("filter",""),U(t,e);else{var s=0;c||(s=Math.round((e.offset().top-J().offset().top)/v)*g+p-(60*t.start.getHours()+t.start.getMinutes())),G(this,t,i,s,c,n,a)}}})}function g(t,e,n){function r(){K(),s&&(f?(n.hide(),e.draggable("option","grid",null),Q(l(d(t.start),b),l(C(t),b))):(a(D),n.css("display",""),e.draggable("option","grid",[T,x])))}function a(e){var r,a=u(d(t.start),e);t.end&&(r=u(d(t.end),e)),n.text(ae(a,r,y("timeFormat")))}var o,i,s,c,f,v,g,p,b,D,M,E=m.getCoordinateGrid(),S=Y(),T=B(),x=I(),k=X();e.draggable({scroll:!1,grid:[T,x],axis:1==S?"y":!1,opacity:y("dragOpacity"),revertDuration:y("dragRevertDuration"),start:function(n,r){w("eventDragStart",e,t,n,r),Z(t,e),E.build(),o=e.position(),i=E.cell(n.pageX,n.pageY),s=c=!0,f=v=O(i),g=p=0,b=0,D=M=0},drag:function(t,n){var a=E.cell(t.pageX,t.pageY);if(s=!!a){if(f=O(a),g=Math.round((n.position.left-o.left)/T),g!=p){var l=P(0,i.col),u=i.col+g;u=Math.max(0,u),u=Math.min(S-1,u);var d=P(0,u);b=h(d,l)}f||(D=Math.round((n.position.top-o.top)/x)*k)}(s!=c||f!=v||g!=p||D!=M)&&(r(),c=s,v=f,p=g,M=D),e.draggable("option","revert",!s)},stop:function(n,a){K(),w("eventDragStop",e,t,n,a),s&&(f||b||D)?G(this,t,b,f?0:D,f,n,a):(s=!0,f=!1,g=0,b=0,D=0,r(),e.css("filter",""),e.css(o),U(t,e))}})}function p(t,e,n){var r,a,o=I(),i=X();e.resizable({handles:{s:".ui-resizable-handle"},grid:o,start:function(n,o){r=a=0,Z(t,e),w("eventResizeStart",this,t,n,o)},resize:function(s,l){r=Math.round((Math.max(o,e.height())-l.originalSize.height)/o),r!=a&&(n.text(ae(t.start,r||t.end?u(M(t),i*r):null,y("timeFormat"))),a=r)},stop:function(n,a){w("eventResizeStop",this,t,n,a),r?$(this,t,0,i*r,n,a):U(t,e)}})}var m=this;m.renderEvents=n,m.clearEvents=r,m.slotSegHtml=c,de.call(m);var y=m.opt,w=m.trigger,b=m.isEventDraggable,D=m.isEventResizable,M=m.eventEnd,S=m.eventElementHandlers,k=m.setHeight,H=m.getDaySegmentContainer,F=m.getSlotSegmentContainer,N=m.getHoverListener,z=m.getMaxMinute,W=m.getMinMinute,A=m.timePosition,O=m.getIsCellAllDay,L=m.colContentLeft,_=m.colContentRight,P=m.cellToDate,Y=m.getColCnt,B=m.getColWidth,I=m.getSnapHeight,X=m.getSnapMinutes,J=m.getSlotContainer,V=m.reportEventElement,U=m.showEvents,Z=m.hideEvents,G=m.eventDrop,$=m.eventResize,Q=m.renderDayOverlay,K=m.clearOverlays,te=m.renderDayEvents,ne=m.calendar,re=ne.formatDate,ae=ne.formatDates;m.draggableDayEvent=v}function ee(t){var e,n=ne(t),r=n[0];if(re(n),r){for(e=0;r.length>e;e++)ae(r[e]);for(e=0;r.length>e;e++)oe(r[e],0,0)}return ie(n)}function ne(t){var e,n,r,a=[];for(e=0;t.length>e;e++){for(n=t[e],r=0;a.length>r&&se(n,a[r]).length;r++);(a[r]||(a[r]=[])).push(n)}return a}function re(t){var e,n,r,a,o;for(e=0;t.length>e;e++)for(n=t[e],r=0;n.length>r;r++)for(a=n[r],a.forwardSegs=[],o=e+1;t.length>o;o++)se(a,t[o],a.forwardSegs)}function ae(t){var n,r,a=t.forwardSegs,o=0;if(t.forwardPressure===e){for(n=0;a.length>n;n++)r=a[n],ae(r),o=Math.max(o,1+r.forwardPressure);t.forwardPressure=o}}function oe(t,n,r){var a,o=t.forwardSegs;if(t.forwardCoord===e)for(o.length?(o.sort(ce),oe(o[0],n+1,r),t.forwardCoord=o[0].backwardCoord):t.forwardCoord=1,t.backwardCoord=t.forwardCoord-(t.forwardCoord-r)/(n+1),a=0;o.length>a;a++)oe(o[a],0,t.forwardCoord)}function ie(t){var e,n,r,a=[];for(e=0;t.length>e;e++)for(n=t[e],r=0;n.length>r;r++)a.push(n[r]);return a}function se(t,e,n){n=n||[];for(var r=0;e.length>r;r++)le(t,e[r])&&n.push(e[r]);return n}function le(t,e){return t.end>e.start&&t.start<e.end}function ce(t,e){return e.forwardPressure-t.forwardPressure||(t.backwardCoord||0)-(e.backwardCoord||0)||ue(t,e)}function ue(t,e){return t.start-e.start||e.end-e.start-(t.end-t.start)||(t.event.title||"").localeCompare(e.event.title)}function fe(n,r,a){function o(e,n){var r=V[e];return t.isPlainObject(r)?P(r,n||a):r}function i(t,e){return r.trigger.apply(r,[t,e||_].concat(Array.prototype.slice.call(arguments,2),[_]))}function s(t){var e=t.source||{};return X(t.startEditable,e.startEditable,o("eventStartEditable"),t.editable,e.editable,o("editable"))&&!o("disableDragging")}function c(t){var e=t.source||{};return X(t.durationEditable,e.durationEditable,o("eventDurationEditable"),t.editable,e.editable,o("editable"))&&!o("disableResizing")}function f(t){j={};var e,n,r=t.length;for(e=0;r>e;e++)n=t[e],j[n._id]?j[n._id].push(n):j[n._id]=[n]}function v(){j={},I={},J=[]}function g(t){return t.end?d(t.end):q(t)}function p(t,e){J.push({event:t,element:e}),I[t._id]?I[t._id].push(e):I[t._id]=[e]}function m(){t.each(J,function(t,e){_.trigger("eventDestroy",e.event,e.event,e.element)})}function y(t,n){n.click(function(r){return n.hasClass("ui-draggable-dragging")||n.hasClass("ui-resizable-resizing")?e:i("eventClick",this,t,r)}).hover(function(e){i("eventMouseover",this,t,e)},function(e){i("eventMouseout",this,t,e)})}function w(t,e){D(t,e,"show")}function b(t,e){D(t,e,"hide")}function D(t,e,n){var r,a=I[t._id],o=a.length;for(r=0;o>r;r++)e&&a[r][0]==e[0]||a[r][n]()}function C(t,e,n,r,a,o,s){var l=e.allDay,c=e._id;E(j[c],n,r,a),i("eventDrop",t,e,n,r,a,function(){E(j[c],-n,-r,l),B(c)},o,s),B(c)}function M(t,e,n,r,a,o){var s=e._id;S(j[s],n,r),i("eventResize",t,e,n,r,function(){S(j[s],-n,-r),B(s)},a,o),B(s)}function E(t,n,r,a){r=r||0;for(var o,i=t.length,s=0;i>s;s++)o=t[s],a!==e&&(o.allDay=a),u(l(o.start,n,!0),r),o.end&&(o.end=u(l(o.end,n,!0),r)),Y(o,V)}function S(t,e,n){n=n||0;for(var r,a=t.length,o=0;a>o;o++)r=t[o],r.end=u(l(g(r),e,!0),n),Y(r,V)}function T(t){return"object"==typeof t&&(t=t.getDay()),G[t]}function x(){return U}function k(t,e,n){for(e=e||1;G[(t.getDay()+(n?e:0)+7)%7];)l(t,e)}function H(){var t=F.apply(null,arguments),e=R(t),n=N(e);return n}function F(t,e){var n=_.getColCnt(),r=K?-1:1,a=K?n-1:0;"object"==typeof t&&(e=t.col,t=t.row);var o=t*n+(e*r+a);return o}function R(t){var e=_.visStart.getDay();return t+=$[e],7*Math.floor(t/U)+Q[(t%U+U)%U]-e}function N(t){var e=d(_.visStart);return l(e,t),e}function z(t){var e=W(t),n=A(e),r=O(n);return r}function W(t){return h(t,_.visStart)}function A(t){var e=_.visStart.getDay();return t+=e,Math.floor(t/7)*U+$[(t%7+7)%7]-$[e]}function O(t){var e=_.getColCnt(),n=K?-1:1,r=K?e-1:0,a=Math.floor(t/e),o=(t%e+e)%e*n+r;return{row:a,col:o}}function L(t,e){for(var n=_.getRowCnt(),r=_.getColCnt(),a=[],o=W(t),i=W(e),s=A(o),l=A(i)-1,c=0;n>c;c++){var u=c*r,f=u+r-1,d=Math.max(s,u),v=Math.min(l,f);if(v>=d){var h=O(d),g=O(v),p=[h.col,g.col].sort(),m=R(d)==o,y=R(v)+1==i;a.push({row:c,leftCol:p[0],rightCol:p[1],isStart:m,isEnd:y})}}return a}var _=this;_.element=n,_.calendar=r,_.name=a,_.opt=o,_.trigger=i,_.isEventDraggable=s,_.isEventResizable=c,_.setEventData=f,_.clearEventData=v,_.eventEnd=g,_.reportEventElement=p,_.triggerEventDestroy=m,_.eventElementHandlers=y,_.showEvents=w,_.hideEvents=b,_.eventDrop=C,_.eventResize=M;var q=_.defaultEventEnd,Y=r.normalizeEvent,B=r.reportEventChange,j={},I={},J=[],V=r.options;_.isHiddenDay=T,_.skipHiddenDays=k,_.getCellsPerWeek=x,_.dateToCell=z,_.dateToDayOffset=W,_.dayOffsetToCellOffset=A,_.cellOffsetToCell=O,_.cellToDate=H,_.cellToCellOffset=F,_.cellOffsetToDayOffset=R,_.dayOffsetToDate=N,_.rangeToSegments=L;var U,Z=o("hiddenDays")||[],G=[],$=[],Q=[],K=o("isRTL");(function(){o("weekends")===!1&&Z.push(0,6);for(var e=0,n=0;7>e;e++)$[e]=n,G[e]=-1!=t.inArray(e,Z),G[e]||(Q[n]=e,n++);if(U=n,!U)throw"invalid hiddenDays"})()}function de(){function e(t,e){var n=r(t,!1,!0);he(n,function(t,e){N(t.event,e)}),w(n,e),he(n,function(t,e){k("eventAfterRender",t.event,t.event,e)})}function n(t,e,n){var a=r([t],!0,!1),o=[];return he(a,function(t,r){t.row===e&&r.css("top",n),o.push(r[0])}),o}function r(e,n,r){var o,l,c=Z(),d=n?t("<div/>"):c,v=a(e);return i(v),o=s(v),d[0].innerHTML=o,l=d.children(),n&&c.append(l),u(v,l),he(v,function(t,e){t.hsides=x(e,!0)}),he(v,function(t,e){e.width(Math.max(0,t.outerWidth-t.hsides))}),he(v,function(t,e){t.outerHeight=e.outerHeight(!0)}),f(v,r),v}function a(t){for(var e=[],n=0;t.length>n;n++){var r=o(t[n]);e.push.apply(e,r)}return e}function o(t){for(var e=t.start,n=C(t),r=ee(e,n),a=0;r.length>a;a++)r[a].event=t;return r}function i(t){for(var e=T("isRTL"),n=0;t.length>n;n++){var r=t[n],a=(e?r.isEnd:r.isStart)?V:X,o=(e?r.isStart:r.isEnd)?U:J,i=a(r.leftCol),s=o(r.rightCol);r.left=i,r.outerWidth=s-i}}function s(t){for(var e="",n=0;t.length>n;n++)e+=c(t[n]);return e}function c(t){var e="",n=T("isRTL"),r=t.event,a=r.url,o=["fc-event","fc-event-hori"];H(r)&&o.push("fc-event-draggable"),t.isStart&&o.push("fc-event-start"),t.isEnd&&o.push("fc-event-end"),o=o.concat(r.className),r.source&&(o=o.concat(r.source.className||[]));var i=j(r,T);return e+=a?"<a href='"+q(a)+"'":"<div",e+=" class='"+o.join(" ")+"'"+" style="+"'"+"position:absolute;"+"left:"+t.left+"px;"+i+"'"+">"+"<div class='fc-event-inner'>",!r.allDay&&t.isStart&&(e+="<span class='fc-event-time'>"+q(G(r.start,r.end,T("timeFormat")))+"</span>"),e+="<span class='fc-event-title'>"+q(r.title||"")+"</span>"+"</div>",t.isEnd&&F(r)&&(e+="<div class='ui-resizable-handle ui-resizable-"+(n?"w":"e")+"'>"+"&nbsp;&nbsp;&nbsp;"+"</div>"),e+="</"+(a?"a":"div")+">"}function u(e,n){for(var r=0;e.length>r;r++){var a=e[r],o=a.event,i=n.eq(r),s=k("eventRender",o,o,i);s===!1?i.remove():(s&&s!==!0&&(s=t(s).css({position:"absolute",left:a.left}),i.replaceWith(s),i=s),a.element=i)}}function f(t,e){var n=v(t),r=y(),a=[];if(e)for(var o=0;r.length>o;o++)r[o].height(n[o]);for(var o=0;r.length>o;o++)a.push(r[o].position().top);he(t,function(t,e){e.css("top",a[t.row]+t.top)})}function v(t){for(var e=P(),n=B(),r=[],a=g(t),o=0;e>o;o++){for(var i=a[o],s=[],l=0;n>l;l++)s.push(0);for(var c=0;i.length>c;c++){var u=i[c];u.top=L(s.slice(u.leftCol,u.rightCol+1));for(var l=u.leftCol;u.rightCol>=l;l++)s[l]=u.top+u.outerHeight}r.push(L(s))}return r}function g(t){var e,n,r,a=P(),o=[];for(e=0;t.length>e;e++)n=t[e],r=n.row,n.element&&(o[r]?o[r].push(n):o[r]=[n]);for(r=0;a>r;r++)o[r]=p(o[r]||[]);return o}function p(t){for(var e=[],n=m(t),r=0;n.length>r;r++)e.push.apply(e,n[r]);return e}function m(t){t.sort(ge);for(var e=[],n=0;t.length>n;n++){for(var r=t[n],a=0;e.length>a&&ve(r,e[a]);a++);e[a]?e[a].push(r):e[a]=[r]}return e}function y(){var t,e=P(),n=[];for(t=0;e>t;t++)n[t]=I(t).find("div.fc-day-content > div");return n}function w(t,e){var n=Z();he(t,function(t,n,r){var a=t.event;a._id===e?b(a,n,t):n[0]._fci=r}),E(n,t,b)}function b(t,e,n){H(t)&&S.draggableDayEvent(t,e,n),n.isEnd&&F(t)&&S.resizableDayEvent(t,e,n),z(t,e)}function D(t,e){var n,r=te();e.draggable({delay:50,opacity:T("dragOpacity"),revertDuration:T("dragRevertDuration"),start:function(a,o){k("eventDragStart",e,t,a,o),A(t,e),r.start(function(r,a,o,i){if(e.draggable("option","revert",!r||!o&&!i),Q(),r){var s=ne(a),c=ne(r);n=h(c,s),$(l(d(t.start),n),l(C(t),n))}else n=0},a,"drag")},stop:function(a,o){r.stop(),Q(),k("eventDragStop",e,t,a,o),n?O(this,t,n,0,t.allDay,a,o):(e.css("filter",""),W(t,e))}})}function M(e,r,a){var o=T("isRTL"),i=o?"w":"e",s=r.find(".ui-resizable-"+i),c=!1;Y(r),r.mousedown(function(t){t.preventDefault()}).click(function(t){c&&(t.preventDefault(),t.stopImmediatePropagation())}),s.mousedown(function(o){function s(n){k("eventResizeStop",this,e,n),t("body").css("cursor",""),u.stop(),Q(),f&&_(this,e,f,0,n),setTimeout(function(){c=!1},0)}if(1==o.which){c=!0;var u=te();P(),B();var f,d,v=r.css("top"),h=t.extend({},e),g=ie(oe(e.start));K(),t("body").css("cursor",i+"-resize").one("mouseup",s),k("eventResizeStart",this,e,o),u.start(function(r,o){if(r){var s=re(o),c=re(r);if(c=Math.max(c,g),f=ae(c)-ae(s)){h.end=l(R(e),f,!0);var u=d;d=n(h,a.row,v),d=t(d),d.find("*").css("cursor",i+"-resize"),u&&u.remove(),A(e)}else d&&(W(e),d.remove(),d=null);Q(),$(e.start,l(C(e),f))}},o)}})}var S=this;S.renderDayEvents=e,S.draggableDayEvent=D,S.resizableDayEvent=M;var T=S.opt,k=S.trigger,H=S.isEventDraggable,F=S.isEventResizable,R=S.eventEnd,N=S.reportEventElement,z=S.eventElementHandlers,W=S.showEvents,A=S.hideEvents,O=S.eventDrop,_=S.eventResize,P=S.getRowCnt,B=S.getColCnt;S.getColWidth;var I=S.allDayRow,X=S.colLeft,J=S.colRight,V=S.colContentLeft,U=S.colContentRight;S.dateToCell;var Z=S.getDaySegmentContainer,G=S.calendar.formatDates,$=S.renderDayOverlay,Q=S.clearOverlays,K=S.clearSelection,te=S.getHoverListener,ee=S.rangeToSegments,ne=S.cellToDate,re=S.cellToCellOffset,ae=S.cellOffsetToDayOffset,oe=S.dateToDayOffset,ie=S.dayOffsetToCellOffset}function ve(t,e){for(var n=0;e.length>n;n++){var r=e[n];if(r.leftCol<=t.rightCol&&r.rightCol>=t.leftCol)return!0}return!1}function he(t,e){for(var n=0;t.length>n;n++){var r=t[n],a=r.element;a&&e(r,a,n)}}function ge(t,e){return e.rightCol-e.leftCol-(t.rightCol-t.leftCol)||e.event.allDay-t.event.allDay||t.event.start-e.event.start||(t.event.title||"").localeCompare(e.event.title)}function pe(){function e(t,e,a){n(),e||(e=l(t,a)),c(t,e,a),r(t,e,a)}function n(t){f&&(f=!1,u(),s("unselect",null,t))}function r(t,e,n,r){f=!0,s("select",null,t,e,n,r)}function a(e){var a=o.cellToDate,s=o.getIsCellAllDay,l=o.getHoverListener(),f=o.reportDayClick;if(1==e.which&&i("selectable")){n(e);var d;l.start(function(t,e){u(),t&&s(t)?(d=[a(e),a(t)].sort(O),c(d[0],d[1],!0)):d=null},e),t(document).one("mouseup",function(t){l.stop(),d&&(+d[0]==+d[1]&&f(d[0],!0,t),r(d[0],d[1],!0,t))})}}var o=this;o.select=e,o.unselect=n,o.reportSelection=r,o.daySelectionMousedown=a;var i=o.opt,s=o.trigger,l=o.defaultSelectionEnd,c=o.renderSelection,u=o.clearSelection,f=!1;i("selectable")&&i("unselectAuto")&&t(document).mousedown(function(e){var r=i("unselectCancel");r&&t(e.target).parents(r).length||n(e)})}function me(){function e(e,n){var r=o.shift();return r||(r=t("<div class='fc-cell-overlay' style='position:absolute;z-index:3'/>")),r[0].parentNode!=n[0]&&r.appendTo(n),a.push(r.css(e).show()),r}function n(){for(var t;t=a.shift();)o.push(t.hide().unbind())}var r=this;r.renderOverlay=e,r.clearOverlays=n;var a=[],o=[]}function ye(t){var e,n,r=this;r.build=function(){e=[],n=[],t(e,n)},r.cell=function(t,r){var a,o=e.length,i=n.length,s=-1,l=-1;for(a=0;o>a;a++)if(r>=e[a][0]&&e[a][1]>r){s=a;break}for(a=0;i>a;a++)if(t>=n[a][0]&&n[a][1]>t){l=a;break}return s>=0&&l>=0?{row:s,col:l}:null},r.rect=function(t,r,a,o,i){var s=i.offset();return{top:e[t][0]-s.top,left:n[r][0]-s.left,width:n[o][1]-n[r][0],height:e[a][1]-e[t][0]}}}function we(e){function n(t){be(t);var n=e.cell(t.pageX,t.pageY);(!n!=!i||n&&(n.row!=i.row||n.col!=i.col))&&(n?(o||(o=n),a(n,o,n.row-o.row,n.col-o.col)):a(n,o),i=n)}var r,a,o,i,s=this;s.start=function(s,l,c){a=s,o=i=null,e.build(),n(l),r=c||"mousemove",t(document).bind(r,n)},s.stop=function(){return t(document).unbind(r,n),i}}function be(t){t.pageX===e&&(t.pageX=t.originalEvent.pageX,t.pageY=t.originalEvent.pageY)}function De(t){function n(e){return a[e]=a[e]||t(e)}var r=this,a={},o={},i={};r.left=function(t){return o[t]=o[t]===e?n(t).position().left:o[t]},r.right=function(t){return i[t]=i[t]===e?r.left(t)+n(t).width():i[t]},r.clear=function(){a={},o={},i={}}}var Ce={defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"iso",weekNumberTitle:"W",allDayDefault:!0,ignoreTimezone:!0,lazyFetching:!0,startParam:"start",endParam:"end",titleFormat:{month:"MMMM yyyy",week:"MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",day:"dddd, MMM d, yyyy"},columnFormat:{month:"ddd",week:"ddd M/d",day:"dddd M/d"},timeFormat:{"":"h(:mm)t"},isRTL:!1,firstDay:0,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],buttonText:{prev:"<span class='fc-text-arrow'>&lsaquo;</span>",next:"<span class='fc-text-arrow'>&rsaquo;</span>",prevYear:"<span class='fc-text-arrow'>&laquo;</span>",nextYear:"<span class='fc-text-arrow'>&raquo;</span>",today:"today",month:"month",week:"week",day:"day"},theme:!1,buttonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e"},unselectAuto:!0,dropAccept:"*",handleWindowResize:!0},Me={header:{left:"next,prev today",center:"",right:"title"},buttonText:{prev:"<span class='fc-text-arrow'>&rsaquo;</span>",next:"<span class='fc-text-arrow'>&lsaquo;</span>",prevYear:"<span class='fc-text-arrow'>&raquo;</span>",nextYear:"<span class='fc-text-arrow'>&laquo;</span>"},buttonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w"}},Ee=t.fullCalendar={version:"1.6.4"},Se=Ee.views={};t.fn.fullCalendar=function(n){if("string"==typeof n){var a,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var r=t.data(this,"fullCalendar");if(r&&t.isFunction(r[n])){var i=r[n].apply(r,o);a===e&&(a=i),"destroy"==n&&t.removeData(this,"fullCalendar")}}),a!==e?a:this}n=n||{};var i=n.eventSources||[];return delete n.eventSources,n.events&&(i.push(n.events),delete n.events),n=t.extend(!0,{},Ce,n.isRTL||n.isRTL===e&&Ce.isRTL?Me:{},n),this.each(function(e,a){var o=t(a),s=new r(o,n,i);o.data("fullCalendar",s),s.render()}),this},Ee.sourceNormalizers=[],Ee.sourceFetchers=[];var Te={dataType:"json",cache:!1},xe=1;Ee.addDays=l,Ee.cloneDate=d,Ee.parseDate=p,Ee.parseISO8601=m,Ee.parseTime=y,Ee.formatDate=w,Ee.formatDates=b;var ke=["sun","mon","tue","wed","thu","fri","sat"],He=864e5,Fe=36e5,Re=6e4,Ne={s:function(t){return t.getSeconds()},ss:function(t){return _(t.getSeconds())},m:function(t){return t.getMinutes()},mm:function(t){return _(t.getMinutes())},h:function(t){return t.getHours()%12||12},hh:function(t){return _(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return _(t.getHours())},d:function(t){return t.getDate()},dd:function(t){return _(t.getDate())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return _(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},yy:function(t){return(t.getFullYear()+"").substring(2)},yyyy:function(t){return t.getFullYear()},t:function(t){return 12>t.getHours()?"a":"p"},tt:function(t){return 12>t.getHours()?"am":"pm"},T:function(t){return 12>t.getHours()?"A":"P"},TT:function(t){return 12>t.getHours()?"AM":"PM"},u:function(t){return w(t,"yyyy-MM-dd'T'HH:mm:ss'Z'")},S:function(t){var e=t.getDate();return e>10&&20>e?"th":["st","nd","rd"][e%10-1]||"th"},w:function(t,e){return e.weekNumberCalculation(t)},W:function(t){return D(t)}};Ee.dateFormatters=Ne,Ee.applyAll=I,Se.month=J,Se.basicWeek=V,Se.basicDay=U,n({weekMode:"fixed"}),Se.agendaWeek=$,Se.agendaDay=Q,n({allDaySlot:!0,allDayText:"all-day",firstHour:6,slotMinutes:30,defaultEventMinutes:120,axisFormat:"h(:mm)tt",timeFormat:{agenda:"h:mm{ - h:mm}"},dragOpacity:{agenda:.5},minTime:0,maxTime:24,slotEventOverlap:!0})})(jQuery);
\ No newline at end of file
+!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 n(t){return q(t,qt)}function i(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 r(t){t.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function s(){t("body").addClass("fc-not-allowed")}function o(){t("body").removeClass("fc-not-allowed")}function l(e,n,i){var r=Math.floor(n/e.length),s=Math.floor(n-r*(e.length-1)),o=[],l=[],u=[],d=0;a(e),e.each(function(n,i){var a=n===e.length-1?s:r,c=t(i).outerHeight(!0);c<a?(o.push(i),l.push(c),u.push(t(i).height())):d+=c}),i&&(n-=d,r=Math.floor(n/o.length),s=Math.floor(n-r*(o.length-1))),t(o).each(function(e,n){var i=e===o.length-1?s:r,a=l[e],d=u[e],c=i-(a-d);a<i&&t(n).height(c)})}function a(t){t.height("")}function u(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 d(t,e){var n,i=t.add(e);return i.css({position:"relative",left:-1}),n=t.outerHeight()-e.outerHeight(),i.css({position:"",left:""}),n}function c(e){var n=e.css("position"),i=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"!==n&&i.length?i:t(e[0].ownerDocument||document)}function h(t,e){var n=t.offset(),i=n.left-(e?e.left:0),r=n.top-(e?e.top:0);return{left:i,right:i+t.outerWidth(),top:r,bottom:r+t.outerHeight()}}function f(t,e){var n=t.offset(),i=p(t),r=n.left+y(t,"border-left-width")+i.left-(e?e.left:0),s=n.top+y(t,"border-top-width")+i.top-(e?e.top:0);return{left:r,right:r+t[0].clientWidth,top:s,bottom:s+t[0].clientHeight}}function g(t,e){var n=t.offset(),i=n.left+y(t,"border-left-width")+y(t,"padding-left")-(e?e.left:0),r=n.top+y(t,"border-top-width")+y(t,"padding-top")-(e?e.top:0);return{left:i,right:i+t.width(),top:r,bottom:r+t.height()}}function p(t){var e=t.innerWidth()-t[0].clientWidth,n={left:0,right:0,top:0,bottom:t.innerHeight()-t[0].clientHeight};return v()&&"rtl"==t.css("direction")?n.left=e:n.right=e,n}function v(){return null===Zt&&(Zt=m()),Zt}function m(){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 y(t,e){return parseFloat(t.css(e))||0}function S(t){return 1==t.which&&!t.ctrlKey}function w(t){if(void 0!==t.pageX)return t.pageX;var e=t.originalEvent.touches;return e?e[0].pageX:void 0}function E(t){if(void 0!==t.pageY)return t.pageY;var e=t.originalEvent.touches;return e?e[0].pageY:void 0}function D(t){return/^touch/.test(t.type)}function b(t){t.addClass("fc-unselectable").on("selectstart",C)}function C(t){t.preventDefault()}function H(t){return!!window.addEventListener&&(window.addEventListener("scroll",t,!0),!0)}function T(t){return!!window.removeEventListener&&(window.removeEventListener("scroll",t,!0),!0)}function x(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}function R(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 I(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function k(t,e){return{left:t.left-e.left,top:t.top-e.top}}function M(e){var n,i,r=[],s=[];for("string"==typeof e?s=e.split(/\s*,\s*/):"function"==typeof e?s=[e]:t.isArray(e)&&(s=e),n=0;n<s.length;n++)i=s[n],"string"==typeof i?r.push("-"==i.charAt(0)?{field:i.substring(1),order:-1}:{field:i,order:1}):"function"==typeof i&&r.push({func:i});return r}function L(t,e,n){var i,r;for(i=0;i<n.length;i++)if(r=B(t,e,n[i]))return r;return 0}function B(t,e,n){return n.func?n.func(t,e):z(t[n.field],e[n.field])*(n.order||1)}function z(e,n){return e||n?null==n?-1:null==e?1:"string"===t.type(e)||"string"===t.type(n)?String(e).localeCompare(String(n)):e-n:0}function F(t,e){var n,i,r,s,o=t.start,l=t.end,a=e.start,u=e.end;if(l>a&&o<u)return o>=a?(n=o.clone(),r=!0):(n=a.clone(),r=!1),l<=u?(i=l.clone(),s=!0):(i=u.clone(),s=!1),{start:n,end:i,isStart:r,isEnd:s}}function N(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:t.time()-n.time()})}function G(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days")})}function A(t,n,i){return e.duration(Math.round(t.diff(n,i,!0)),i)}function O(t,e){var n,i,r;for(n=0;n<Xt.length&&(i=Xt[n],r=V(i,t,e),!(r>=1&&ot(r)));n++);return i}function V(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 P(t,e,n){var i;return W(n)?(e-t)/n:(i=n.asMonths(),Math.abs(i)>=1&&ot(i)?e.diff(t,"months",!0)/i:e.diff(t,"days",!0)/n.asDays())}function _(t,e){var n,i;return W(t)||W(e)?t/e:(n=t.asMonths(),i=e.asMonths(),Math.abs(n)>=1&&ot(n)&&Math.abs(i)>=1&&ot(i)?n/i:t.asDays()/e.asDays())}function Y(t,n){var i;return W(t)?e.duration(t*n):(i=t.asMonths(),Math.abs(i)>=1&&ot(i)?e.duration({months:i*n}):e.duration({days:t.asDays()*n}))}function W(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())}function j(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function U(t){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t)}function q(t,e){var n,i,r,s,o,l,a={};if(e)for(n=0;n<e.length;n++){for(i=e[n],r=[],s=t.length-1;s>=0;s--)if(o=t[s][i],"object"==typeof o)r.unshift(o);else if(void 0!==o){a[i]=o;break}r.length&&(a[i]=q(r))}for(n=t.length-1;n>=0;n--){l=t[n];for(i in l)i in a||(a[i]=l[i])}return a}function Z(t){var e=function(){};return e.prototype=t,new e}function $(t,e){for(var n in t)X(t,n)&&(e[n]=t[n])}function X(t,e){return Kt.call(t,e)}function K(e){return/undefined|null|boolean|number|string/.test(t.type(e))}function Q(e,n,i){if(t.isFunction(e)&&(e=[e]),e){var r,s;for(r=0;r<e.length;r++)s=e[r].apply(n,i)||s;return s}}function J(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}function tt(t){return(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function et(t){return t.replace(/&.*?;/g,"")}function nt(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+":"+e)}),n.join(";")}function it(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+'="'+tt(e)+'"')}),n.join(" ")}function rt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function st(t,e){return t-e}function ot(t){return t%1===0}function lt(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function at(t,e,n){var i,r,s,o,l,a=function(){var u=+new Date-o;u<e?i=setTimeout(a,e-u):(i=null,n||(l=t.apply(s,r),s=r=null))};return function(){s=this,r=arguments,o=+new Date;var u=n&&!i;return i||(i=setTimeout(a,e)),u&&(l=t.apply(s,r),s=r=null),l}}function ut(e,n){return e&&e.then&&"resolved"!==e.state()?n?e.then(n):void 0:t.when(n())}function dt(n,i,r){var s,o,l,a,u=n[0],d=1==n.length&&"string"==typeof u;return e.isMoment(u)||j(u)||void 0===u?a=e.apply(null,n):(s=!1,o=!1,d?Qt.test(u)?(u+="-01",n=[u],s=!0,o=!0):(l=Jt.exec(u))&&(s=!l[5],o=!0):t.isArray(u)&&(o=!0),a=i||s?e.utc.apply(e,n):e.apply(null,n),s?(a._ambigTime=!0,a._ambigZone=!0):r&&(o?a._ambigZone=!0:d&&a.utcOffset(u))),a._fullCalendar=!0,a}function ct(t,e){return ee.format.call(t,e)}function ht(t,e){return ft(t,yt(e))}function ft(t,e){var n,i="";for(n=0;n<e.length;n++)i+=gt(t,e[n]);return i}function gt(t,e){var n,i;return"string"==typeof e?e:(n=e.token)?ie[n]?ie[n](t):ct(t,n):e.maybe&&(i=ft(t,e.maybe),i.match(/[1-9]/))?i:""}function pt(t,e,n,i,r){var s;return t=jt.moment.parseZone(t),e=jt.moment.parseZone(e),s=t.localeData(),n=s.longDateFormat(n)||n,i=i||" - ",vt(t,e,yt(n),i,r)}function vt(t,e,n,i,r){var s,o,l,a,u=t.clone().stripZone(),d=e.clone().stripZone(),c="",h="",f="",g="",p="";for(o=0;o<n.length&&(s=mt(t,e,u,d,n[o]),s!==!1);o++)c+=s;for(l=n.length-1;l>o&&(s=mt(t,e,u,d,n[l]),s!==!1);l--)h=s+h;for(a=o;a<=l;a++)f+=gt(t,n[a]),g+=gt(e,n[a]);return(f||g)&&(p=r?g+i+f:f+i+g),c+p+h}function mt(t,e,n,i,r){var s,o;return"string"==typeof r?r:!!((s=r.token)&&(o=re[s.charAt(0)],o&&n.isSame(i,o)))&&ct(t,s)}function yt(t){return t in se?se[t]:se[t]=St(t)}function St(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:St(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push(e[5]);return n}function wt(){}function Et(t,e){var n;return X(e,"constructor")&&(n=e.constructor),"function"!=typeof n&&(n=e.constructor=function(){t.apply(this,arguments)}),n.prototype=Z(t.prototype),$(e,n.prototype),$(t,n),n}function Dt(t,e){$(e,t.prototype)}function bt(t,e){return!t&&!e||!(!t||!e)&&(t.component===e.component&&Ct(t,e)&&Ct(e,t))}function Ct(t,e){for(var n in t)if(!/^(component|left|right|top|bottom)$/.test(n)&&t[n]!==e[n])return!1;return!0}function Ht(t){return{start:t.start.clone(),end:t.end?t.end.clone():null,allDay:t.allDay}}function Tt(t){var e=Rt(t);return"background"===e||"inverse-background"===e}function xt(t){return"inverse-background"===Rt(t)}function Rt(t){return J((t.source||{}).rendering,t.rendering)}function It(t){var e,n,i={};for(e=0;e<t.length;e++)n=t[e],(i[n._id]||(i[n._id]=[])).push(n);return i}function kt(t,e){return t.start-e.start}function Mt(n){var i,r,s,o,l=jt.dataAttrPrefix;return l&&(l+="-"),i=n.data(l+"event")||null,i&&(i="object"==typeof i?t.extend({},i):{},r=i.start,null==r&&(r=i.time),s=i.duration,o=i.stick,delete i.start,delete i.time,delete i.duration,delete i.stick),null==r&&(r=n.data(l+"start")),null==r&&(r=n.data(l+"time")),null==s&&(s=n.data(l+"duration")),null==o&&(o=n.data(l+"stick")),r=null!=r?e.duration(r):null,s=null!=s?e.duration(s):null,o=Boolean(o),{eventProps:i,startTime:r,duration:s,stick:o}}function Lt(t,e){var n,i;for(n=0;n<e.length;n++)if(i=e[n],i.leftCol<=t.rightCol&&i.rightCol>=t.leftCol)return!0;return!1}function Bt(t,e){return t.leftCol-e.leftCol}function zt(t){var e,n,i,r=[];for(e=0;e<t.length;e++){for(n=t[e],i=0;i<r.length&&Gt(n,r[i]).length;i++);n.level=i,(r[i]||(r[i]=[])).push(n)}return r}function Ft(t){var e,n,i,r,s;for(e=0;e<t.length;e++)for(n=t[e],i=0;i<n.length;i++)for(r=n[i],r.forwardSegs=[],s=e+1;s<t.length;s++)Gt(r,t[s],r.forwardSegs)}function Nt(t){var e,n,i=t.forwardSegs,r=0;if(void 0===t.forwardPressure){for(e=0;e<i.length;e++)n=i[e],Nt(n),r=Math.max(r,1+n.forwardPressure);t.forwardPressure=r}}function Gt(t,e,n){n=n||[];for(var i=0;i<e.length;i++)At(t,e[i])&&n.push(e[i]);return n}function At(t,e){return t.bottom>e.top&&t.top<e.bottom}function Ot(n,i){function r(t){t._locale=U}function s(){$?u()&&(g(),d()):o()}function o(){n.addClass("fc"),n.on("click.fc","a[data-goto]",function(e){var n=t(this),i=n.data("goto"),r=j.moment(i.date),s=i.type,o=K.opt("navLink"+rt(s)+"Click");"function"==typeof o?o(r,e):("string"==typeof o&&(s=o),N(r,s))}),j.bindOption("theme",function(t){X=t?"ui":"fc",n.toggleClass("ui-widget",t),n.toggleClass("fc-unthemed",!t)}),j.bindOptions(["isRTL","locale"],function(t){n.toggleClass("fc-ltr",!t),n.toggleClass("fc-rtl",t)}),$=t("<div class='fc-view-container'/>").prependTo(n),q=j.header=new _t(j),l(),d(j.options.defaultView),j.options.handleWindowResize&&(J=at(m,j.options.windowResizeDelay),t(window).resize(J))}function l(){q.render(),q.el&&n.prepend(q.el)}function a(){K&&K.removeElement(),q.removeElement(),$.remove(),n.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),n.off(".fc"),J&&t(window).unbind("resize",J)}function u(){return n.is(":visible")}function d(e,n){lt++,K&&e&&K.type!==e&&(A(),c()),!K&&e&&(K=j.view=ot[e]||(ot[e]=j.instantiateView(e)),K.setElement(t("<div class='fc-view fc-"+e+"-view' />").appendTo($)),q.activateButton(e)),K&&(tt=K.massageCurrentDate(tt),K.displaying&&tt>=K.intervalStart&&tt<K.intervalEnd||u()&&(K.display(tt,n),O(),H(),T(),E())),O(),lt--}function c(){q.deactivateButton(K.type),K.removeElement(),K=j.view=null}function h(){lt++,A();var t=K.type,e=K.queryScroll();c(),d(t,e),O(),lt--}function f(t){if(u())return t&&p(),lt++,K.updateSize(!0),lt--,!0}function g(){u()&&p()}function p(){var t=j.options.contentHeight,e=j.options.height;Q="number"==typeof t?t:"function"==typeof t?t():"number"==typeof e?e-v():"function"==typeof e?e()-v():"parent"===e?n.parent().height()-v():Math.round($.width()/Math.max(j.options.aspectRatio,.5))}function v(){return q.el?q.el.outerHeight(!0):0}function m(t){!lt&&t.target===window&&K.start&&f(!0)&&K.trigger("windowResize",st)}function y(){D()}function S(t){it(j.getEventSourcesByMatchArray(t))}function w(){u()&&(A(),K.displayEvents(ut),O())}function E(){!j.options.lazyFetching||et(K.start,K.end)?D():w()}function D(){nt(K.start,K.end)}function b(t){ut=t,w()}function C(){w()}function H(){q.updateTitle(K.title)}function T(){var t=j.getNow();t>=K.intervalStart&&t<K.intervalEnd?q.disableButton("today"):q.enableButton("today")}function x(t,e){K.select(j.buildSelectSpan.apply(j,arguments))}function R(){K&&K.unselect()}function I(){tt=K.computePrevDate(tt),d()}function k(){tt=K.computeNextDate(tt),d()}function M(){tt.add(-1,"years"),d()}function L(){tt.add(1,"years"),d()}function B(){tt=j.getNow(),d()}function z(t){tt=j.moment(t).stripZone(),d()}function F(t){tt.add(e.duration(t)),d()}function N(t,e){var n;e=e||"day",n=j.getViewSpec(e)||j.getUnitViewSpec(e),tt=t.clone(),d(n?n.type:null)}function G(){return j.applyTimezone(tt)}function A(){$.css({width:"100%",height:$.height(),overflow:"hidden"})}function O(){$.css({width:"",height:"",overflow:""})}function V(){return j}function P(){return K}function _(t,e){var n;if("string"==typeof t){if(void 0===e)return j.options[t];n={},n[t]=e,Y(n)}else"object"==typeof t&&Y(t)}function Y(t){var e,n=0;for(e in t)j.dynamicOverrides[e]=t[e];j.viewSpecCache={},j.populateOptionsHash();for(e in t)j.triggerOptionHandlers(e),n++;if(1===n){if("height"===e||"contentHeight"===e||"aspectRatio"===e)return void f(!0);if("defaultDate"===e)return;if("businessHours"===e)return void(K&&(K.unrenderBusinessHours(),K.renderBusinessHours()));if("timezone"===e)return j.rezoneArrayEventSources(),void y()}l(),ot={},h()}function W(t,e){var n=Array.prototype.slice.call(arguments,2);if(e=e||st,this.triggerWith(t,e,n),j.options[t])return j.options[t].apply(e,n)}var j=this;j.render=s,j.destroy=a,j.refetchEvents=y,j.refetchEventSources=S,j.reportEvents=b,j.reportEventChange=C,j.rerenderEvents=w,j.changeView=d,j.select=x,j.unselect=R,j.prev=I,j.next=k,j.prevYear=M,j.nextYear=L,j.today=B,j.gotoDate=z,j.incrementDate=F,j.zoomTo=N,j.getDate=G,j.getCalendar=V,j.getView=P,j.option=_,j.trigger=W,j.dynamicOverrides={},j.viewSpecCache={},j.optionHandlers={},j.overrides=t.extend({},i),j.populateOptionsHash();var U;j.bindOptions(["locale","monthNames","monthNamesShort","dayNames","dayNamesShort","firstDay","weekNumberCalculation"],function(t,e,n,i,s,o,l){if("iso"===l&&(l="ISO"),U=Z(Pt(t)),e&&(U._months=e),n&&(U._monthsShort=n),i&&(U._weekdays=i),s&&(U._weekdaysShort=s),null==o&&"ISO"===l&&(o=1),null!=o){var a=Z(U._week);a.dow=o,U._week=a}"ISO"!==l&&"local"!==l&&"function"!=typeof l||(U._fullCalendar_weekCalc=l),tt&&r(tt)}),j.defaultAllDayEventDuration=e.duration(j.options.defaultAllDayEventDuration),j.defaultTimedEventDuration=e.duration(j.options.defaultTimedEventDuration),j.moment=function(){var t;return"local"===j.options.timezone?(t=jt.moment.apply(null,arguments),t.hasTime()&&t.local()):t="UTC"===j.options.timezone?jt.moment.utc.apply(null,arguments):jt.moment.parseZone.apply(null,arguments),r(t),t},j.localizeMoment=r,j.getIsAmbigTimezone=function(){return"local"!==j.options.timezone&&"UTC"!==j.options.timezone},j.applyTimezone=function(t){if(!t.hasTime())return t.clone();var e,n=j.moment(t.toArray()),i=t.time()-n.time();return i&&(e=n.clone().add(i),t.time()-e.time()===0&&(n=e)),n},j.getNow=function(){var t=j.options.now;return"function"==typeof t&&(t=t()),j.moment(t).stripZone()},j.getEventEnd=function(t){return t.end?t.end.clone():j.getDefaultEventEnd(t.allDay,t.start)},j.getDefaultEventEnd=function(t,e){var n=e.clone();return t?n.stripTime().add(j.defaultAllDayEventDuration):n.add(j.defaultTimedEventDuration),j.getIsAmbigTimezone()&&n.stripZone(),n},j.humanizeDuration=function(t){return t.locale(j.options.locale).humanize()},Yt.call(j);var q,$,X,K,Q,J,tt,et=j.isFetchNeeded,nt=j.fetchEvents,it=j.fetchEventSources,st=n[0],ot={},lt=0,ut=[];tt=null!=j.options.defaultDate?j.moment(j.options.defaultDate).stripZone():j.getNow(),j.getSuggestedViewHeight=function(){return void 0===Q&&g(),Q},j.isHeightAuto=function(){return"auto"===j.options.contentHeight||"auto"===j.options.height},j.freezeContentHeight=A,j.unfreezeContentHeight=O,j.initialize()}function Vt(e){t.each(He,function(t,n){null==e[t]&&(e[t]=n(e))})}function Pt(t){return e.localeData(t)||e.localeData("en")}function _t(e){function n(){var n=e.options,s=n.header;f=n.theme?"ui":"fc",s?(h?h.empty():h=this.el=t("<div class='fc-toolbar'/>"),h.append(r("left")).append(r("right")).append(r("center")).append('<div class="fc-clear"/>')):i()}function i(){h&&(h.remove(),h=c.el=null)}function r(n){var i=t('<div class="fc-'+n+'"/>'),r=e.options,s=r.header[n];return s&&t.each(s.split(" "),function(n){var s,o=t(),l=!0;t.each(this.split(","),function(n,i){var s,a,u,d,c,h,p,v,m,y;"title"==i?(o=o.add(t("<h2>&nbsp;</h2>")),l=!1):((s=(r.customButtons||{})[i])?(u=function(t){s.click&&s.click.call(y[0],t)},d="",c=s.text):(a=e.getViewSpec(i))?(u=function(){e.changeView(i)},g.push(i),d=a.buttonTextOverride,c=a.buttonTextDefault):e[i]&&(u=function(){e[i]()},d=(e.overrides.buttonText||{})[i],c=r.buttonText[i]),u&&(h=s?s.themeIcon:r.themeButtonIcons[i],p=s?s.icon:r.buttonIcons[i],v=d?tt(d):h&&r.theme?"<span class='ui-icon ui-icon-"+h+"'></span>":p&&!r.theme?"<span class='fc-icon fc-icon-"+p+"'></span>":tt(c),m=["fc-"+i+"-button",f+"-button",f+"-state-default"],y=t('<button type="button" class="'+m.join(" ")+'">'+v+"</button>").click(function(t){y.hasClass(f+"-state-disabled")||(u(t),(y.hasClass(f+"-state-active")||y.hasClass(f+"-state-disabled"))&&y.removeClass(f+"-state-hover"))}).mousedown(function(){y.not("."+f+"-state-active").not("."+f+"-state-disabled").addClass(f+"-state-down")}).mouseup(function(){y.removeClass(f+"-state-down")}).hover(function(){y.not("."+f+"-state-active").not("."+f+"-state-disabled").addClass(f+"-state-hover")},function(){y.removeClass(f+"-state-hover").removeClass(f+"-state-down")}),o=o.add(y)))}),l&&o.first().addClass(f+"-corner-left").end().last().addClass(f+"-corner-right").end(),o.length>1?(s=t("<div/>"),l&&s.addClass("fc-button-group"),s.append(o),i.append(s)):i.append(o)}),i}function s(t){h&&h.find("h2").text(t)}function o(t){h&&h.find(".fc-"+t+"-button").addClass(f+"-state-active")}function l(t){h&&h.find(".fc-"+t+"-button").removeClass(f+"-state-active")}function a(t){h&&h.find(".fc-"+t+"-button").prop("disabled",!0).addClass(f+"-state-disabled")}function u(t){h&&h.find(".fc-"+t+"-button").prop("disabled",!1).removeClass(f+"-state-disabled")}function d(){return g}var c=this;c.render=n,c.removeElement=i,c.updateTitle=s,c.activateButton=o,c.deactivateButton=l,c.disableButton=a,c.enableButton=u,c.getViewsWithButtons=d,c.el=null;var h,f,g=[]}function Yt(){function n(t,e){return!O||t<O||e>V}function i(t,e){O=t,V=e,r(Y,"reset")}function r(t,e){var n,i;for("reset"===e?j=[]:"add"!==e&&(j=w(j,t)),n=0;n<t.length;n++)i=t[n],"pending"!==i._status&&W++,i._fetchId=(i._fetchId||0)+1,i._status="pending";for(n=0;n<t.length;n++)i=t[n],s(i,i._fetchId)}function s(e,n){a(e,function(i){var r,s,o,a=t.isArray(e.events);if(n===e._fetchId&&"rejected"!==e._status){if(e._status="resolved",i)for(r=0;r<i.length;r++)s=i[r],o=a?s:R(s,e),o&&j.push.apply(j,L(o));l()}})}function o(t){var e="pending"===t._status;t._status="rejected",e&&l()}function l(){W--,W||P(j)}function a(e,n){var i,r,s=jt.sourceFetchers;for(i=0;i<s.length;i++){if(r=s[i].call(F,e,O.clone(),V.clone(),F.options.timezone,n),r===!0)return;if("object"==typeof r)return void a(r,n)}var o=e.events;if(o)t.isFunction(o)?(F.pushLoading(),o.call(F,O.clone(),V.clone(),F.options.timezone,function(t){n(t),F.popLoading()})):t.isArray(o)?n(o):n();else{var l=e.url;if(l){var u,d=e.success,c=e.error,h=e.complete;u=t.isFunction(e.data)?e.data():e.data;var f=t.extend({},u||{}),g=J(e.startParam,F.options.startParam),p=J(e.endParam,F.options.endParam),v=J(e.timezoneParam,F.options.timezoneParam);g&&(f[g]=O.format()),p&&(f[p]=V.format()),F.options.timezone&&"local"!=F.options.timezone&&(f[v]=F.options.timezone),F.pushLoading(),t.ajax(t.extend({},Te,e,{data:f,success:function(e){e=e||[];var i=Q(d,this,arguments);t.isArray(i)&&(e=i),n(e)},error:function(){Q(c,this,arguments),n()},complete:function(){Q(h,this,arguments),F.popLoading()}}))}else n()}}function u(t){var e=d(t);e&&(Y.push(e),r([e],"add"))}function d(e){var n,i,r=jt.sourceNormalizers;if(t.isFunction(e)||t.isArray(e)?n={events:e}:"string"==typeof e?n={url:e}:"object"==typeof e&&(n=t.extend({},e)),n){for(n.className?"string"==typeof n.className&&(n.className=n.className.split(/\s+/)):n.className=[],t.isArray(n.events)&&(n.origArray=n.events,n.events=t.map(n.events,function(t){return R(t,n)})),i=0;i<r.length;i++)r[i].call(F,n);return n}}function c(t){f(m(t))}function h(t){null==t?f(Y,!0):f(v(t))}function f(e,n){var i;for(i=0;i<e.length;i++)o(e[i]);n?(Y=[],j=[]):(Y=t.grep(Y,function(t){for(i=0;i<e.length;i++)if(t===e[i])return!1;return!0}),j=w(j,e)),P(j)}function g(){return Y.slice(1)}function p(e){return t.grep(Y,function(t){return t.id&&t.id===e})[0]}function v(e){e?t.isArray(e)||(e=[e]):e=[];var n,i=[];for(n=0;n<e.length;n++)i.push.apply(i,m(e[n]));return i}function m(e){var n,i;for(n=0;n<Y.length;n++)if(i=Y[n],i===e)return[i];return i=p(e),i?[i]:t.grep(Y,function(t){return y(e,t)})}function y(t,e){return t&&e&&S(t)==S(e)}function S(t){return("object"==typeof t?t.origArray||t.googleCalendarId||t.url||t.events:null)||t}function w(e,n){return t.grep(e,function(t){for(var e=0;e<n.length;e++)if(t.source===n[e])return!1;return!0})}function E(t){t.start=F.moment(t.start),t.end?t.end=F.moment(t.end):t.end=null,B(t,D(t)),P(j)}function D(e){var n={};return t.each(e,function(t,e){b(t)&&void 0!==e&&K(e)&&(n[t]=e)}),n}function b(t){return!/^_|^(id|allDay|start|end)$/.test(t)}function C(t,e){var n,i,r,s=R(t);if(s){for(n=L(s),i=0;i<n.length;i++)r=n[i],r.source||(e&&(_.events.push(r),r.source=_),j.push(r));return P(j),n}return[]}function H(e){var n,i;for(null==e?e=function(){return!0}:t.isFunction(e)||(n=e+"",e=function(t){return t._id==n}),j=t.grep(j,e,!0),i=0;i<Y.length;i++)t.isArray(Y[i].events)&&(Y[i].events=t.grep(Y[i].events,e,!0));P(j)}function T(e){return t.isFunction(e)?t.grep(j,e):null!=e?(e+="",t.grep(j,function(t){return t._id==e})):j}function x(t){t.start=F.moment(t.start),t.end&&(t.end=F.moment(t.end)),Wt(t)}function R(n,i){var r,s,o,l={};if(F.options.eventDataTransform&&(n=F.options.eventDataTransform(n)),i&&i.eventDataTransform&&(n=i.eventDataTransform(n)),t.extend(l,n),i&&(l.source=i),l._id=n._id||(void 0===n.id?"_fc"+xe++:n.id+""),n.className?"string"==typeof n.className?l.className=n.className.split(/\s+/):l.className=n.className:l.className=[],r=n.start||n.date,s=n.end,U(r)&&(r=e.duration(r)),U(s)&&(s=e.duration(s)),n.dow||e.isDuration(r)||e.isDuration(s))l.start=r?e.duration(r):null,l.end=s?e.duration(s):null,l._recurring=!0;else{if(r&&(r=F.moment(r),!r.isValid()))return!1;s&&(s=F.moment(s),s.isValid()||(s=null)),o=n.allDay,void 0===o&&(o=J(i?i.allDayDefault:void 0,F.options.allDayDefault)),I(r,s,o,l)}return F.normalizeEvent(l),l}function I(t,e,n,i){i.start=t,i.end=e,i.allDay=n,k(i),Wt(i)}function k(t){M(t),t.end&&!t.end.isAfter(t.start)&&(t.end=null),t.end||(F.options.forceEventDuration?t.end=F.getDefaultEventEnd(t.allDay,t.start):t.end=null)}function M(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=F.applyTimezone(t.start.time(0))),t.end&&!t.end.hasTime()&&(t.end=F.applyTimezone(t.end.time(0))))}function L(e,n,i){var r,s,o,l,a,u,d,c,h,f=[];if(n=n||O,i=i||V,e)if(e._recurring){if(s=e.dow)for(r={},o=0;o<s.length;o++)r[s[o]]=!0;for(l=n.clone().stripTime();l.isBefore(i);)r&&!r[l.day()]||(a=e.start,u=e.end,d=l.clone(),c=null,a&&(d=d.time(a)),u&&(c=l.clone().time(u)),h=t.extend({},e),I(d,c,!a&&!u,h),f.push(h)),l.add(1,"days")}else f.push(e);return f}function B(e,n,i){function r(t,e){return i?A(t,e,i):n.allDay?G(t,e):N(t,e)}var s,o,l,a,u,d,c={};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),k(n),s={start:e._start.clone(),end:e._end?e._end.clone():F.getDefaultEventEnd(e._allDay,e._start),allDay:n.allDay},k(s),o=null!==e._end&&null===n.end,l=r(n.start,s.start),n.end?(a=r(n.end,s.end),u=a.subtract(l)):u=null,t.each(n,function(t,e){b(t)&&void 0!==e&&(c[t]=e)}),d=z(T(e._id),o,n.allDay,l,u,c),{dateDelta:l,durationDelta:u,undo:d}}function z(e,n,i,r,s,o){var l=F.getIsAmbigTimezone(),a=[];return r&&!r.valueOf()&&(r=null),s&&!s.valueOf()&&(s=null),t.each(e,function(e,u){var d,c;d={start:u.start.clone(),end:u.end?u.end.clone():null,allDay:u.allDay},t.each(o,function(t){d[t]=u[t]}),c={start:u._start,end:u._end,allDay:i},k(c),n?c.end=null:s&&!c.end&&(c.end=F.getDefaultEventEnd(c.allDay,c.start)),r&&(c.start.add(r),c.end&&c.end.add(r)),s&&c.end.add(s),l&&!c.allDay&&(r||s)&&(c.start.stripZone(),c.end&&c.end.stripZone()),t.extend(u,o,c),Wt(u),a.push(function(){t.extend(u,d),Wt(u)})}),function(){for(var t=0;t<a.length;t++)a[t]()}}var F=this;F.isFetchNeeded=n,F.fetchEvents=i,F.fetchEventSources=r,F.getEventSources=g,F.getEventSourceById=p,F.getEventSourcesByMatchArray=v,F.getEventSourcesByMatch=m,F.addEventSource=u,F.removeEventSource=c,F.removeEventSources=h,F.updateEvent=E,F.renderEvent=C,F.removeEvents=H,F.clientEvents=T,F.mutateEvent=B,F.normalizeEventDates=k,F.normalizeEventTimes=M;var O,V,P=F.reportEvents,_={events:[]},Y=[_],W=0,j=[];t.each((F.options.events?[F.options.events]:[]).concat(F.options.eventSources||[]),function(t,e){var n=d(e);n&&Y.push(n)}),F.rezoneArrayEventSources=function(){var e,n,i;for(e=0;e<Y.length;e++)if(n=Y[e].events,t.isArray(n))for(i=0;i<n.length;i++)x(n[i])},F.buildEventFromInput=R,F.expandEvent=L,F.getEventCache=function(){return j}}function Wt(t){t._allDay=t.allDay,t._start=t.start.clone(),t._end=t.end?t.end.clone():null}var jt=t.fullCalendar={version:"3.0.1",internalApiVersion:6},Ut=jt.views={};t.fn.fullCalendar=function(e){var n=Array.prototype.slice.call(arguments,1),i=this;return this.each(function(r,s){var o,l=t(s),a=l.data("fullCalendar");"string"==typeof e?a&&t.isFunction(a[e])&&(o=a[e].apply(a,n),r||(i=o),"destroy"===e&&l.removeData("fullCalendar")):a||(a=new Ee(l,e),l.data("fullCalendar",a),a.render())}),i};var qt=["header","buttonText","buttonIcons","themeButtonIcons"];jt.intersectRanges=F,jt.applyAll=Q,jt.debounce=at,jt.isInt=ot,jt.htmlEscape=tt,jt.cssToStr=nt,jt.proxy=lt,jt.capitaliseFirstLetter=rt,jt.getOuterRect=h,jt.getClientRect=f,jt.getContentRect=g,jt.getScrollbarWidths=p;var Zt=null;jt.preventDefault=C,jt.intersectRects=x,jt.parseFieldSpecs=M,jt.compareByFieldSpecs=L,jt.compareByFieldSpec=B,jt.flexibleCompare=z,jt.computeIntervalUnit=O,jt.divideRangeByDuration=P,jt.divideDurationByDuration=_,jt.multiplyDuration=Y,jt.durationHasTime=W;var $t=["sun","mon","tue","wed","thu","fri","sat"],Xt=["year","month","week","day","hour","minute","second","millisecond"];jt.log=function(){var t=window.console;if(t&&t.log)return t.log.apply(t,arguments)},jt.warn=function(){var t=window.console;return t&&t.warn?t.warn.apply(t,arguments):jt.log.apply(jt,arguments)};var Kt={}.hasOwnProperty,Qt=/^\s*\d{4}-\d\d$/,Jt=/^\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+)?)?)?)?)?$/,te=e.fn,ee=t.extend({},te),ne=e.momentProperties;ne.push("_fullCalendar"),ne.push("_ambigTime"),ne.push("_ambigZone"),jt.moment=function(){return dt(arguments)},jt.moment.utc=function(){var t=dt(arguments,!0);return t.hasTime()&&t.utc(),t},jt.moment.parseZone=function(){return dt(arguments,!0,!0)},te.week=te.weeks=function(t){var e=this._locale._fullCalendar_weekCalc;return null==t&&"function"==typeof e?e(this):"ISO"===e?ee.isoWeek.apply(this,arguments):ee.week.apply(this,arguments)},te.time=function(t){if(!this._fullCalendar)return ee.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())},te.stripTime=function(){return this._ambigTime||(this.utc(!0),this.set({hours:0,minutes:0,seconds:0,ms:0}),this._ambigTime=!0,this._ambigZone=!0),this},te.hasTime=function(){return!this._ambigTime},te.stripZone=function(){var t;return this._ambigZone||(t=this._ambigTime,this.utc(!0),this._ambigTime=t||!1,this._ambigZone=!0),this},te.hasZone=function(){return!this._ambigZone},te.local=function(t){return ee.local.call(this,this._ambigZone||t),this._ambigTime=!1,this._ambigZone=!1,this},te.utc=function(t){return ee.utc.call(this,t),this._ambigTime=!1,this._ambigZone=!1,this},te.utcOffset=function(t){return null!=t&&(this._ambigTime=!1,this._ambigZone=!1),ee.utcOffset.apply(this,arguments)},te.format=function(){return this._fullCalendar&&arguments[0]?ht(this,arguments[0]):this._ambigTime?ct(this,"YYYY-MM-DD"):this._ambigZone?ct(this,"YYYY-MM-DD[T]HH:mm:ss"):ee.format.apply(this,arguments)},te.toISOString=function(){return this._ambigTime?ct(this,"YYYY-MM-DD"):this._ambigZone?ct(this,"YYYY-MM-DD[T]HH:mm:ss"):ee.toISOString.apply(this,arguments)};var ie={t:function(t){return ct(t,"a").charAt(0)},T:function(t){return ct(t,"A").charAt(0)}};jt.formatRange=pt;var re={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"},se={},oe={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}};jt.queryMostGranularFormatUnit=function(t){var e,n,i,r,s=yt(t);for(e=0;e<s.length;e++)n=s[e],n.token&&(i=oe[n.token.charAt(0)],i&&(!r||i.value>r.value)&&(r=i));return r?r.unit:null},jt.Class=wt,wt.extend=function(){var t,e,n=arguments.length;for(t=0;t<n;t++)e=arguments[t],t<n-1&&Dt(this,e);return Et(this,e||{})},wt.mixin=function(t){Dt(this,t)};var le=jt.EmitterMixin={on:function(e,n){var i=function(t,e){return n.apply(e.context||this,e.args||[])};return n.guid||(n.guid=t.guid++),i.guid=n.guid,t(this).on(e,i),this},off:function(e,n){return t(this).off(e,n),this},trigger:function(e){var n=Array.prototype.slice.call(arguments,1);return t(this).triggerHandler(e,{args:n}),this},triggerWith:function(e,n,i){return t(this).triggerHandler(e,{context:n,args:i}),this}},ae=jt.ListenerMixin=function(){var e=0,n={listenerId:null,listenTo:function(e,n,i){if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&this.listenTo(e,r,n[r]);else"string"==typeof n&&e.on(n+"."+this.getListenerNamespace(),t.proxy(i,this))},stopListeningTo:function(t,e){t.off((e||"")+"."+this.getListenerNamespace())},getListenerNamespace:function(){return null==this.listenerId&&(this.listenerId=e++),"_listener"+this.listenerId}};return n}(),ue={isIgnoringMouse:!1,delayUnignoreMouse:null,initMouseIgnoring:function(t){this.delayUnignoreMouse=at(lt(this,"unignoreMouse"),t||1e3)},tempIgnoreMouse:function(){this.isIgnoringMouse=!0,this.delayUnignoreMouse()},unignoreMouse:function(){this.isIgnoringMouse=!1}},de=wt.extend(ae,{isHidden:!0,options:null,el: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 e=this,n=this.options;this.el=t('<div class="fc-popover"/>').addClass(n.className||"").css({top:0,left:0}).append(n.content).appendTo(n.parentEl),this.el.on("click",".fc-close",function(){e.hide()}),n.autoHide&&this.listenTo(t(document),"mousedown",this.documentMousedown)},documentMousedown:function(e){this.el&&!t(e.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(t(document),"mousedown")},position:function(){var e,n,i,r,s,o=this.options,l=this.el.offsetParent().offset(),a=this.el.outerWidth(),u=this.el.outerHeight(),d=t(window),h=c(this.el);r=o.top||0,s=void 0!==o.left?o.left:void 0!==o.right?o.right-a:0,h.is(window)||h.is(document)?(h=d,e=0,n=0):(i=h.offset(),e=i.top,n=i.left),e+=d.scrollTop(),n+=d.scrollLeft(),o.viewportConstrain!==!1&&(r=Math.min(r,e+h.outerHeight()-u-this.margin),r=Math.max(r,e+this.margin),s=Math.min(s,n+h.outerWidth()-a-this.margin),s=Math.max(s,n+this.margin)),this.el.css({top:r-l.top,left:s-l.left})},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))}}),ce=jt.CoordCache=wt.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(e){this.els=t(e.els),this.isHorizontal=e.isHorizontal,this.isVertical=e.isVertical,this.forcedOffsetParentEl=e.offsetParent?t(e.offsetParent):null},build:function(){var t=this.forcedOffsetParentEl||this.els.eq(0).offsetParent();this.origin=t.offset(),this.boundingRect=this.queryBoundingRect(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},clear:function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},ensureBuilt:function(){this.origin||this.build()},buildElHorizontals:function(){var e=[],n=[];this.els.each(function(i,r){var s=t(r),o=s.offset().left,l=s.outerWidth();e.push(o),n.push(o+l)}),this.lefts=e,this.rights=n},buildElVerticals:function(){var e=[],n=[];this.els.each(function(i,r){var s=t(r),o=s.offset().top,l=s.outerHeight();e.push(o),n.push(o+l)}),this.tops=e,this.bottoms=n},getHorizontalIndex:function(t){this.ensureBuilt();var e,n=this.lefts,i=this.rights,r=n.length;for(e=0;e<r;e++)if(t>=n[e]&&t<i[e])return e},getVerticalIndex:function(t){this.ensureBuilt();var e,n=this.tops,i=this.bottoms,r=n.length;for(e=0;e<r;e++)if(t>=n[e]&&t<i[e])return e},getLeftOffset:function(t){return this.ensureBuilt(),this.lefts[t]},getLeftPosition:function(t){return this.ensureBuilt(),this.lefts[t]-this.origin.left},getRightOffset:function(t){return this.ensureBuilt(),this.rights[t]},getRightPosition:function(t){return this.ensureBuilt(),this.rights[t]-this.origin.left},getWidth:function(t){return this.ensureBuilt(),this.rights[t]-this.lefts[t]},getTopOffset:function(t){return this.ensureBuilt(),this.tops[t]},getTopPosition:function(t){return this.ensureBuilt(),this.tops[t]-this.origin.top},getBottomOffset:function(t){return this.ensureBuilt(),this.bottoms[t]},getBottomPosition:function(t){return this.ensureBuilt(),this.bottoms[t]-this.origin.top},getHeight:function(t){return this.ensureBuilt(),this.bottoms[t]-this.tops[t]},queryBoundingRect:function(){var t=c(this.els.eq(0));if(!t.is(document))return f(t)},isPointInBounds:function(t,e){return this.isLeftInBounds(t)&&this.isTopInBounds(e)},isLeftInBounds:function(t){return!this.boundingRect||t>=this.boundingRect.left&&t<this.boundingRect.right},isTopInBounds:function(t){return!this.boundingRect||t>=this.boundingRect.top&&t<this.boundingRect.bottom}}),he=jt.DragListener=wt.extend(ae,ue,{options:null,subjectEl:null,originX:null,originY:null,scrollEl:null,isInteracting:!1,isDistanceSurpassed:!1,isDelayEnded:!1,isDragging:!1,isTouch:!1,delay:null,delayTimeoutId:null,minDistance:null,handleTouchScrollProxy:null,constructor:function(t){this.options=t||{},this.handleTouchScrollProxy=lt(this,"handleTouchScroll"),this.initMouseIgnoring(500)},startInteraction:function(e,n){var i=D(e);if("mousedown"===e.type){if(this.isIgnoringMouse)return;if(!S(e))return;e.preventDefault()}this.isInteracting||(n=n||{},this.delay=J(n.delay,this.options.delay,0),this.minDistance=J(n.distance,this.options.distance,0),this.subjectEl=this.options.subjectEl,this.isInteracting=!0,this.isTouch=i,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.originX=w(e),this.originY=E(e),this.scrollEl=c(t(e.target)),this.bindHandlers(),this.initAutoScroll(),this.handleInteractionStart(e),this.startDelay(e),this.minDistance||this.handleDistanceSurpassed(e))},handleInteractionStart:function(t){this.trigger("interactionStart",t)},endInteraction:function(t,e){this.isInteracting&&(this.endDrag(t),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),this.destroyAutoScroll(),this.unbindHandlers(),this.isInteracting=!1,this.handleInteractionEnd(t,e),this.isTouch&&this.tempIgnoreMouse())},handleInteractionEnd:function(t,e){this.trigger("interactionEnd",t,e||!1)},bindHandlers:function(){var e=this,n=1;this.isTouch?(this.listenTo(t(document),{touchmove:this.handleTouchMove,touchend:this.endInteraction,touchcancel:this.endInteraction,touchstart:function(t){n?n--:e.endInteraction(t,!0)}}),!H(this.handleTouchScrollProxy)&&this.scrollEl&&this.listenTo(this.scrollEl,"scroll",this.handleTouchScroll)):this.listenTo(t(document),{mousemove:this.handleMouseMove,mouseup:this.endInteraction}),this.listenTo(t(document),{selectstart:C,contextmenu:C})},unbindHandlers:function(){this.stopListeningTo(t(document)),T(this.handleTouchScrollProxy),this.scrollEl&&this.stopListeningTo(this.scrollEl,"scroll")},startDrag:function(t,e){this.startInteraction(t,e),this.isDragging||(this.isDragging=!0,this.handleDragStart(t))},handleDragStart:function(t){this.trigger("dragStart",t)},handleMove:function(t){var e,n=w(t)-this.originX,i=E(t)-this.originY,r=this.minDistance;this.isDistanceSurpassed||(e=n*n+i*i,e>=r*r&&this.handleDistanceSurpassed(t)),this.isDragging&&this.handleDrag(n,i,t)},handleDrag:function(t,e,n){this.trigger("drag",t,e,n),this.updateAutoScroll(n)},endDrag:function(t){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(t))},handleDragEnd:function(t){this.trigger("dragEnd",t)},startDelay:function(t){var e=this;this.delay?this.delayTimeoutId=setTimeout(function(){e.handleDelayEnd(t)},this.delay):this.handleDelayEnd(t)},handleDelayEnd:function(t){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(t)},handleDistanceSurpassed:function(t){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(t)},handleTouchMove:function(t){this.isDragging&&t.preventDefault(),this.handleMove(t)},handleMouseMove:function(t){this.handleMove(t)},handleTouchScroll:function(t){this.isDragging||this.endInteraction(t,!0)},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1)),this["_"+t]&&this["_"+t].apply(this,Array.prototype.slice.call(arguments,1))}});he.mixin({isAutoScroll:!1,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var t=this.scrollEl;this.isAutoScroll=this.options.scroll&&t&&!t.is(window)&&!t.is(document),this.isAutoScroll&&this.listenTo(t,"scroll",at(this.handleDebouncedScroll,100))},destroyAutoScroll:function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},computeScrollBounds:function(){this.isAutoScroll&&(this.scrollBounds=h(this.scrollEl))},updateAutoScroll:function(t){var e,n,i,r,s=this.scrollSensitivity,o=this.scrollBounds,l=0,a=0;o&&(e=(s-(E(t)-o.top))/s,n=(s-(o.bottom-E(t)))/s,i=(s-(w(t)-o.left))/s,r=(s-(o.right-w(t)))/s,e>=0&&e<=1?l=e*this.scrollSpeed*-1:n>=0&&n<=1&&(l=n*this.scrollSpeed),i>=0&&i<=1?a=i*this.scrollSpeed*-1:r>=0&&r<=1&&(a=r*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(lt(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var t=this.scrollEl;this.scrollTopVel<0?t.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&t.scrollTop()+t[0].clientHeight>=t[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?t.scrollLeft()<=0&&(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.endAutoScroll()},endAutoScroll:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},handleDebouncedScroll:function(){this.scrollIntervalId||this.handleScrollEnd()},handleScrollEnd:function(){}});var fe=he.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(t,e){he.call(this,e),this.component=t},handleInteractionStart:function(t){var e,n,i,r=this.subjectEl;this.computeCoords(),t?(n={left:w(t),top:E(t)},i=n,r&&(e=h(r),i=R(i,e)),this.origHit=this.queryHit(i.left,i.top),r&&this.options.subjectCenter&&(this.origHit&&(e=x(this.origHit,e)||e),i=I(e)),this.coordAdjust=k(i,n)):(this.origHit=null,this.coordAdjust=null),he.prototype.handleInteractionStart.apply(this,arguments)},computeCoords:function(){this.component.prepareHits(),this.computeScrollBounds()},handleDragStart:function(t){var e;he.prototype.handleDragStart.apply(this,arguments),e=this.queryHit(w(t),E(t)),e&&this.handleHitOver(e)},handleDrag:function(t,e,n){var i;he.prototype.handleDrag.apply(this,arguments),i=this.queryHit(w(n),E(n)),bt(i,this.hit)||(this.hit&&this.handleHitOut(),i&&this.handleHitOver(i))},handleDragEnd:function(){this.handleHitDone(),he.prototype.handleDragEnd.apply(this,arguments)},handleHitOver:function(t){var e=bt(t,this.origHit);this.hit=t,this.trigger("hitOver",this.hit,e,this.origHit)},handleHitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},handleHitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},handleInteractionEnd:function(){he.prototype.handleInteractionEnd.apply(this,arguments),this.origHit=null,this.hit=null,this.component.releaseHits()},handleScrollEnd:function(){he.prototype.handleScrollEnd.apply(this,arguments),this.computeCoords()},queryHit:function(t,e){return this.coordAdjust&&(t+=this.coordAdjust.left,e+=this.coordAdjust.top),this.component.queryHit(t,e)}}),ge=wt.extend(ae,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(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.y0=E(e),this.x0=w(e),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),D(e)?this.listenTo(t(document),"touchmove",this.handleMove):this.listenTo(t(document),"mousemove",this.handleMove))},stop:function(e,n){function i(){r.isAnimating=!1,r.removeElement(),r.top0=r.left0=null,n&&n()}var r=this,s=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(t(document)),e&&s&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:s,complete:i})):i())},getEl:function(){var t=this.el;return t||(t=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}),t.addClass("fc-unselectable"),t.appendTo(this.parentEl)),t},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var t,e;this.getEl(),null===this.top0&&(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})},handleMove:function(t){this.topDelta=E(t)-this.y0,this.leftDelta=w(t)-this.x0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),pe=jt.Grid=wt.extend(ae,ue,{hasDayInteractions:!0,view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayDragListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(t){this.view=t,this.isRTL=t.opt("isRTL"),this.elsByFill={},this.dayDragListener=this.buildDayDragListener(),this.initMouseIgnoring()},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(t){this.start=t.start.clone(),this.end=t.end.clone(),this.rangeUpdated(),this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var t,e,n=this.view;this.eventTimeFormat=n.opt("eventTimeFormat")||n.opt("timeFormat")||this.computeEventTimeFormat(),t=n.opt("displayEventTime"),null==t&&(t=this.computeDisplayEventTime()),e=n.opt("displayEventEnd"),null==e&&(e=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=e},spanToSegs:function(t){},diffDates:function(t,e){return this.largeUnit?A(t,e,this.largeUnit):N(t,e)},prepareHits:function(){},releaseHits:function(){},queryHit:function(t,e){},getHitSpan:function(t){},getHitEl:function(t){},setElement:function(t){this.el=t,this.hasDayInteractions&&(b(t),this.bindDayHandler("touchstart",this.dayTouchStart),this.bindDayHandler("mousedown",this.dayMousedown)),this.bindSegHandlers(),this.bindGlobalHandlers()},bindDayHandler:function(e,n){var i=this;this.el.on(e,function(e){if(!t(e.target).is(i.segSelector+","+i.segSelector+" *,.fc-more,a[data-goto]"))return n.call(i,e)})},removeElement:function(){this.unbindGlobalHandlers(),this.clearDragListeners(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo(t(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart})},unbindGlobalHandlers:function(){this.stopListeningTo(t(document))},dayMousedown:function(t){this.isIgnoringMouse||this.dayDragListener.startInteraction(t,{})},dayTouchStart:function(t){var e=this.view;(e.isSelected||e.selectedEvent)&&this.tempIgnoreMouse(),this.dayDragListener.startInteraction(t,{delay:this.view.opt("longPressDelay")})},buildDayDragListener:function(){var t,e,n=this,i=this.view,r=i.opt("selectable"),l=new fe(this,{scroll:i.opt("dragScroll"),interactionStart:function(){t=l.origHit,e=null},dragStart:function(){i.unselect()},hitOver:function(i,o,l){l&&(o||(t=null),r&&(e=n.computeSelection(n.getHitSpan(l),n.getHitSpan(i)),e?n.renderSelection(e):e===!1&&s()))},hitOut:function(){t=null,e=null,n.unrenderSelection()},hitDone:function(){o()},interactionEnd:function(r,s){s||(t&&!n.isIgnoringMouse&&i.triggerDayClick(n.getHitSpan(t),n.getHitEl(t),r),e&&i.reportSelection(e,r))}});return l},clearDragListeners:function(){this.dayDragListener.endInteraction(),this.segDragListener&&this.segDragListener.endInteraction(),this.segResizeListener&&this.segResizeListener.endInteraction(),this.externalDragListener&&this.externalDragListener.endInteraction()},renderEventLocationHelper:function(t,e){var n=this.fabricateHelperEvent(t,e);return this.renderHelper(n,e)},fabricateHelperEvent:function(t,e){var n=e?Z(e.event):{};return n.start=t.start.clone(),n.end=t.end?t.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventDates(n),n.className=(n.className||[]).concat("fc-helper"),e||(n.editable=!1),n},renderHelper:function(t,e){},unrenderHelper:function(){},renderSelection:function(t){this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(t,e){var n=this.computeSelectionSpan(t,e);return!(n&&!this.view.calendar.isSelectionSpanAllowed(n))&&n},computeSelectionSpan:function(t,e){var n=[t.start,t.end,e.start,e.end];return n.sort(st),{start:n[0].clone(),end:n[3].clone()}},renderHighlight:function(t){this.renderFill("highlight",this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(t){},unrenderNowIndicator:function(){},renderFill:function(t,e){},unrenderFill: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;i<n.length;i++)o+=this.fillSegHtml(e,n[i]);t(o).each(function(e,i){var o=n[e],a=t(i);s&&(a=s.call(r,o,a)),a&&(a=t(a),a.is(r.fillSegTag)&&(o.el=a,l.push(o)))})}return l},fillSegTag:"div",fillSegHtml:function(t,e){var n=this[t+"SegClasses"],i=this[t+"SegCss"],r=n?n.call(this,e):[],s=nt(i?i.call(this,e):{});return"<"+this.fillSegTag+(r.length?' class="'+r.join(" ")+'"':"")+(s?' style="'+s+'"':"")+" />"},getDayClasses:function(t){var e=this.view,n=e.calendar.getNow(),i=["fc-"+$t[t.day()]];return 1==e.intervalDuration.as("months")&&t.month()!=e.intervalStart.month()&&i.push("fc-other-month"),t.isSame(n,"day")?i.push("fc-today",e.highlightStateClass):t<n?i.push("fc-past"):i.push("fc-future"),i}});pe.mixin({segSelector:".fc-event-container > *",mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(t){var e,n=[],i=[];for(e=0;e<t.length;e++)(Tt(t[e])?n:i).push(t[e]);this.segs=[].concat(this.renderBgEvents(n),this.renderFgEvents(i))},renderBgEvents:function(t){var e=this.eventsToSegs(t);return this.renderBgSegs(e)||e},renderFgEvents:function(t){var e=this.eventsToSegs(t);return this.renderFgSegs(e)||e},unrenderEvents:function(){this.handleSegMouseout(),this.clearDragListeners(),this.unrenderFgSegs(),this.unrenderBgSegs(),this.segs=null},getEventSegs:function(){return this.segs||[]},renderFgSegs:function(t){},unrenderFgSegs:function(){},renderFgSegEls:function(e,n){var i,r=this.view,s="",o=[];if(e.length){for(i=0;i<e.length;i++)s+=this.fgSegHtml(e[i],n);t(s).each(function(n,i){var s=e[n],l=r.resolveEventEl(s.event,t(i));l&&(l.data("fc-seg",s),s.el=l,o.push(s))})}return o},fgSegHtml:function(t,e){},renderBgSegs:function(t){return this.renderFill("bgEvent",t)},unrenderBgSegs:function(){this.unrenderFill("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){return{"background-color":this.getSegSkinCss(t)["background-color"]}},businessHoursSegClasses:function(t){return["fc-nonbusiness","fc-bgevent"]},buildBusinessHourSegs:function(e){var n=this.view.calendar.getCurrentBusinessHourEvents(e);return!n.length&&this.view.calendar.options.businessHours&&(n=[t.extend({},Re,{start:this.view.end,end:this.view.end,dow:null})]),this.eventsToSegs(n)},bindSegHandlers:function(){this.bindSegHandlersToEl(this.el)},bindSegHandlersToEl:function(t){this.bindSegHandlerToEl(t,"touchstart",this.handleSegTouchStart),this.bindSegHandlerToEl(t,"touchend",this.handleSegTouchEnd),this.bindSegHandlerToEl(t,"mouseenter",this.handleSegMouseover),this.bindSegHandlerToEl(t,"mouseleave",this.handleSegMouseout),this.bindSegHandlerToEl(t,"mousedown",this.handleSegMousedown),this.bindSegHandlerToEl(t,"click",this.handleSegClick)},bindSegHandlerToEl:function(e,n,i){var r=this;e.on(n,this.segSelector,function(e){var n=t(this).data("fc-seg");if(n&&!r.isDraggingSeg&&!r.isResizingSeg)return i.call(r,n,e)})},handleSegClick:function(t,e){var n=this.view.trigger("eventClick",t.el[0],t.event,e);n===!1&&e.preventDefault()},handleSegMouseover:function(t,e){this.isIgnoringMouse||this.mousedOverSeg||(this.mousedOverSeg=t,this.view.isEventResizable(t.event)&&t.el.addClass("fc-allow-mouse-resize"),this.view.trigger("eventMouseover",t.el[0],t.event,e))},handleSegMouseout:function(t,e){e=e||{},this.mousedOverSeg&&(t=t||this.mousedOverSeg,this.mousedOverSeg=null,this.view.isEventResizable(t.event)&&t.el.removeClass("fc-allow-mouse-resize"),this.view.trigger("eventMouseout",t.el[0],t.event,e))},handleSegMousedown:function(t,e){var n=this.startSegResize(t,e,{distance:5});!n&&this.view.isEventDraggable(t.event)&&this.buildSegDragListener(t).startInteraction(e,{distance:5})},handleSegTouchStart:function(t,e){var n,i=this.view,r=t.event,s=i.isEventSelected(r),o=i.isEventDraggable(r),l=i.isEventResizable(r),a=!1;s&&l&&(a=this.startSegResize(t,e)),a||!o&&!l||(n=o?this.buildSegDragListener(t):this.buildSegSelectListener(t),n.startInteraction(e,{delay:s?0:this.view.opt("longPressDelay")})),this.tempIgnoreMouse()},handleSegTouchEnd:function(t,e){this.tempIgnoreMouse()},startSegResize:function(e,n,i){return!!t(n.target).is(".fc-resizer")&&(this.buildSegResizeListener(e,t(n.target).is(".fc-start-resizer")).startInteraction(n,i),!0)},buildSegDragListener:function(t){var e,n,i,r=this,l=this.view,a=l.calendar,u=t.el,d=t.event;if(this.segDragListener)return this.segDragListener;var c=this.segDragListener=new fe(l,{scroll:l.opt("dragScroll"),subjectEl:u,subjectCenter:!0,interactionStart:function(i){t.component=r,e=!1,n=new ge(t.el,{additionalClass:"fc-dragging",parentEl:l.el,opacity:c.isTouch?null:l.opt("dragOpacity"),revertDuration:l.opt("dragRevertDuration"),zIndex:2}),n.hide(),n.start(i)},dragStart:function(n){c.isTouch&&!l.isEventSelected(d)&&l.selectEvent(d),e=!0,r.handleSegMouseout(t,n),r.segDragStart(t,n),l.hideEvent(d)},hitOver:function(e,o,u){var h;t.hit&&(u=t.hit),i=r.computeEventDrop(u.component.getHitSpan(u),e.component.getHitSpan(e),d),i&&!a.isEventSpanAllowed(r.eventToSpan(i),d)&&(s(),i=null),i&&(h=l.renderDrag(i,t))?(h.addClass("fc-dragging"),c.isTouch||r.applyDragOpacity(h),n.hide()):n.show(),o&&(i=null)},hitOut:function(){l.unrenderDrag(),n.show(),i=null},hitDone:function(){o()},interactionEnd:function(s){delete t.component,n.stop(!i,function(){e&&(l.unrenderDrag(),l.showEvent(d),r.segDragStop(t,s)),i&&l.reportEventDrop(d,i,this.largeUnit,u,s)}),r.segDragListener=null}});return c},buildSegSelectListener:function(t){var e=this,n=this.view,i=t.event;if(this.segDragListener)return this.segDragListener;var r=this.segDragListener=new he({dragStart:function(t){r.isTouch&&!n.isEventSelected(i)&&n.selectEvent(i)},interactionEnd:function(t){e.segDragListener=null}});return r},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 i,r,s=this.view.calendar,o=t.start,l=e.start;return o.hasTime()===l.hasTime()?(i=this.diffDates(l,o),n.allDay&&W(i)?(r={start:n.start.clone(),end:s.getEventEnd(n),allDay:!1},s.normalizeEventTimes(r)):r=Ht(n),r.start.add(i),r.end&&r.end.add(i)):r={start:l.clone(),end:null,allDay:!l.hasTime()},r},applyDragOpacity:function(t){var e=this.view.opt("dragOpacity");null!=e&&t.css("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 i,r=this,l=this.view.calendar,a=Mt(t),u=r.externalDragListener=new fe(this,{interactionStart:function(){r.isDraggingExternal=!0},hitOver:function(t){i=r.computeExternalDrop(t.component.getHitSpan(t),a),i&&!l.isExternalSpanAllowed(r.eventToSpan(i),i,a.eventProps)&&(s(),i=null),i&&r.renderDrag(i)},hitOut:function(){i=null},hitDone:function(){o(),r.unrenderDrag()},interactionEnd:function(e){i&&r.view.reportExternalDrop(a,i,t,e,n),r.isDraggingExternal=!1,r.externalDragListener=null}});u.startDrag(e)},computeExternalDrop:function(t,e){var n=this.view.calendar,i={start:n.applyTimezone(t.start),end:null};return e.startTime&&!i.start.hasTime()&&i.start.time(e.startTime),e.duration&&(i.end=i.start.clone().add(e.duration)),i},renderDrag:function(t,e){},unrenderDrag:function(){},buildSegResizeListener:function(t,e){var n,i,r=this,l=this.view,a=l.calendar,u=t.el,d=t.event,c=a.getEventEnd(d),h=this.segResizeListener=new fe(this,{scroll:l.opt("dragScroll"),subjectEl:u,interactionStart:function(){n=!1},dragStart:function(e){n=!0,r.handleSegMouseout(t,e),r.segResizeStart(t,e)},hitOver:function(n,o,u){var h=r.getHitSpan(u),f=r.getHitSpan(n);i=e?r.computeEventStartResize(h,f,d):r.computeEventEndResize(h,f,d),i&&(a.isEventSpanAllowed(r.eventToSpan(i),d)?i.start.isSame(d.start.clone().stripZone())&&i.end.isSame(c.clone().stripZone())&&(i=null):(s(),i=null)),i&&(l.hideEvent(d),r.renderEventResize(i,t))},hitOut:function(){i=null},hitDone:function(){r.unrenderEventResize(),l.showEvent(d),o()},interactionEnd:function(e){n&&r.segResizeStop(t,e),i&&l.reportEventResize(d,i,this.largeUnit,u,e),r.segResizeListener=null}});return h},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&&W(l)&&(r.allDay=!1,o.normalizeEventTimes(r)),r[t].add(l),r.start.isBefore(r.end)||(s=this.minResizeDuration||(i.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration),"start"==t?r.start=r.end.clone().subtract(s):r.end=r.start.clone().add(s)),r},renderEventResize:function(t,e){},unrenderEventResize: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=this.view,r=["fc-event",t.isStart?"fc-start":"fc-not-start",t.isEnd?"fc-end":"fc-not-end"].concat(this.getSegCustomClasses(t));return e&&r.push("fc-draggable"),n&&r.push("fc-resizable"),i.isEventSelected(t.event)&&r.push("fc-selected"),r},getSegCustomClasses:function(t){var e=t.event;return[].concat(e.className,e.source?e.source.className:[])},getSegSkinCss:function(t){return{"background-color":this.getSegBackgroundColor(t),"border-color":this.getSegBorderColor(t),color:this.getSegTextColor(t)}},getSegBackgroundColor:function(t){return t.event.backgroundColor||t.event.color||this.getSegDefaultBackgroundColor(t)},getSegDefaultBackgroundColor:function(t){var e=t.event.source||{};return e.backgroundColor||e.color||this.view.opt("eventBackgroundColor")||this.view.opt("eventColor")},getSegBorderColor:function(t){return t.event.borderColor||t.event.color||this.getSegDefaultBorderColor(t)},getSegDefaultBorderColor:function(t){var e=t.event.source||{};return e.borderColor||e.color||this.view.opt("eventBorderColor")||this.view.opt("eventColor")},getSegTextColor:function(t){return t.event.textColor||this.getSegDefaultTextColor(t)},getSegDefaultTextColor:function(t){var e=t.event.source||{};return e.textColor||this.view.opt("eventTextColor")},eventToSegs:function(t){return this.eventsToSegs([t])},eventToSpan:function(t){return this.eventToSpans(t)[0]},eventToSpans:function(t){var e=this.eventToRange(t);return this.eventRangeToSpans(e,t)},eventsToSegs:function(e,n){var i=this,r=It(e),s=[];return t.each(r,function(t,e){var r,o=[];for(r=0;r<e.length;r++)o.push(i.eventToRange(e[r]));if(xt(e[0]))for(o=i.invertRanges(o),r=0;r<o.length;r++)s.push.apply(s,i.eventRangeToSegs(o[r],e[0],n));else for(r=0;r<o.length;r++)s.push.apply(s,i.eventRangeToSegs(o[r],e[r],n))}),s},eventToRange:function(t){var e=this.view.calendar,n=t.start.clone().stripZone(),i=(t.end?t.end.clone():e.getDefaultEventEnd(null!=t.allDay?t.allDay:!t.start.hasTime(),t.start)).stripZone();return e.localizeMoment(n),e.localizeMoment(i),{start:n,end:i}},eventRangeToSegs:function(t,e,n){var i,r=this.eventRangeToSpans(t,e),s=[];for(i=0;i<r.length;i++)s.push.apply(s,this.eventSpanToSegs(r[i],e,n));return s},eventRangeToSpans:function(e,n){return[t.extend({},e)]},eventSpanToSegs:function(t,e,n){var i,r,s=n?n(t):this.spanToSegs(t);for(i=0;i<s.length;i++)r=s[i],r.event=e,r.eventStartMS=+t.start,r.eventDurationMS=t.end-t.start;return s},invertRanges:function(t){var e,n,i=this.view,r=i.start.clone(),s=i.end.clone(),o=[],l=r;for(t.sort(kt),e=0;e<t.length;e++)n=t[e],n.start>l&&o.push({start:l,end:n.start}),l=n.end;return l<s&&o.push({start:l,end:s}),o},sortEventSegs:function(t){t.sort(lt(this,"compareEventSegs"))},compareEventSegs:function(t,e){return t.eventStartMS-e.eventStartMS||e.eventDurationMS-t.eventDurationMS||e.event.allDay-t.event.allDay||L(t.event,e.event,this.view.eventOrderSpecs)}}),jt.pluckEventDateProps=Ht,jt.isBgEvent=Tt,jt.dataAttrPrefix="";var ve=jt.DayTableMixin={breakOnWeeks:!1,dayDates:null,dayIndices:null,daysPerRow:null,rowCnt:null,colCnt:null,colHeadFormat:null,updateDayTable:function(){for(var t,e,n,i=this.view,r=this.start.clone(),s=-1,o=[],l=[];r.isBefore(this.end);)i.isHiddenDay(r)?o.push(s+.5):(s++,o.push(s),l.push(r.clone())),r.add(1,"days");if(this.breakOnWeeks){for(e=l[0].day(),t=1;t<l.length&&l[t].day()!=e;t++);n=Math.ceil(l.length/t)}else n=1,t=l.length;this.dayDates=l,this.dayIndices=o,this.daysPerRow=t,this.rowCnt=n,this.updateDayTableCols()},updateDayTableCols:function(){this.colCnt=this.computeColCnt(),this.colHeadFormat=this.view.opt("columnFormat")||this.computeColHeadFormat()},computeColCnt:function(){return this.daysPerRow},getCellDate:function(t,e){return this.dayDates[this.getCellDayIndex(t,e)].clone()},getCellRange:function(t,e){var n=this.getCellDate(t,e),i=n.clone().add(1,"days");return{start:n,end:i}},getCellDayIndex:function(t,e){return t*this.daysPerRow+this.getColDayIndex(e)},getColDayIndex:function(t){return this.isRTL?this.colCnt-1-t:t},getDateDayIndex:function(t){var e=this.dayIndices,n=t.diff(this.start,"days");return n<0?e[0]-1:n>=e.length?e[e.length-1]+1:e[n]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(t){var e,n,i,r,s,o=this.daysPerRow,l=this.view.computeDayRange(t),a=this.getDateDayIndex(l.start),u=this.getDateDayIndex(l.end.clone().subtract(1,"days")),d=[];for(e=0;e<this.rowCnt;e++)n=e*o,i=n+o-1,r=Math.max(a,n),s=Math.min(u,i),r=Math.ceil(r),s=Math.floor(s),r<=s&&d.push({row:e,firstRowDayIndex:r-n,lastRowDayIndex:s-n,isStart:r===a,isEnd:s===u});return d},sliceRangeByDay:function(t){var e,n,i,r,s,o,l=this.daysPerRow,a=this.view.computeDayRange(t),u=this.getDateDayIndex(a.start),d=this.getDateDayIndex(a.end.clone().subtract(1,"days")),c=[];for(e=0;e<this.rowCnt;e++)for(n=e*l,i=n+l-1,r=n;r<=i;r++)s=Math.max(u,r),o=Math.min(d,r),s=Math.ceil(s),o=Math.floor(o),s<=o&&c.push({row:e,firstRowDayIndex:s-n,lastRowDayIndex:o-n,isStart:s===u,isEnd:o===d});return c;
+},renderHeadHtml:function(){var t=this.view;return'<div class="fc-row '+t.widgetHeaderClass+'"><table><thead>'+this.renderHeadTrHtml()+"</thead></table></div>"},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return"<tr>"+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+"</tr>"},renderHeadDateCellsHtml:function(){var t,e,n=[];for(t=0;t<this.colCnt;t++)e=this.getCellDate(0,t),n.push(this.renderHeadDateCellHtml(e));return n.join("")},renderHeadDateCellHtml:function(t,e,n){var i=this.view;return'<th class="fc-day-header '+i.widgetHeaderClass+" fc-"+$t[t.day()]+'"'+(1===this.rowCnt?' data-date="'+t.format("YYYY-MM-DD")+'"':"")+(e>1?' colspan="'+e+'"':"")+(n?" "+n:"")+">"+i.buildGotoAnchorHtml({date:t,forceOff:this.rowCnt>1||1===this.colCnt},tt(t.format(this.colHeadFormat)))+"</th>"},renderBgTrHtml:function(t){return"<tr>"+(this.isRTL?"":this.renderBgIntroHtml(t))+this.renderBgCellsHtml(t)+(this.isRTL?this.renderBgIntroHtml(t):"")+"</tr>"},renderBgIntroHtml:function(t){return this.renderIntroHtml()},renderBgCellsHtml:function(t){var e,n,i=[];for(e=0;e<this.colCnt;e++)n=this.getCellDate(t,e),i.push(this.renderBgCellHtml(n));return i.join("")},renderBgCellHtml:function(t,e){var n=this.view,i=this.getDayClasses(t);return i.unshift("fc-day",n.widgetContentClass),'<td class="'+i.join(" ")+'" data-date="'+t.format("YYYY-MM-DD")+'"'+(e?" "+e:"")+"></td>"},renderIntroHtml:function(){},bookendCells:function(t){var e=this.renderIntroHtml();e&&(this.isRTL?t.append(e):t.prepend(e))}},me=jt.DayGrid=pe.extend(ve,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(t){var e,n,i=this.view,r=this.rowCnt,s=this.colCnt,o="";for(e=0;e<r;e++)o+=this.renderDayRowHtml(e,t);for(this.el.html(o),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day"),this.rowCoordCache=new ce({els:this.rowEls,isVertical:!0}),this.colCoordCache=new ce({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),e=0;e<r;e++)for(n=0;n<s;n++)i.trigger("dayRender",null,this.getCellDate(e,n),this.getCellEl(e,n))},unrenderDates:function(){this.removeSegPopover()},renderBusinessHours:function(){var t=this.buildBusinessHourSegs(!0);this.renderFill("businessHours",t,"bgevent")},unrenderBusinessHours:function(){this.unrenderFill("businessHours")},renderDayRowHtml:function(t,e){var n=this.view,i=["fc-row","fc-week",n.widgetContentClass];return e&&i.push("fc-rigid"),'<div class="'+i.join(" ")+'"><div class="fc-bg"><table>'+this.renderBgTrHtml(t)+'</table></div><div class="fc-content-skeleton"><table>'+(this.numbersVisible?"<thead>"+this.renderNumberTrHtml(t)+"</thead>":"")+"</table></div></div>"},renderNumberTrHtml:function(t){return"<tr>"+(this.isRTL?"":this.renderNumberIntroHtml(t))+this.renderNumberCellsHtml(t)+(this.isRTL?this.renderNumberIntroHtml(t):"")+"</tr>"},renderNumberIntroHtml:function(t){return this.renderIntroHtml()},renderNumberCellsHtml:function(t){var e,n,i=[];for(e=0;e<this.colCnt;e++)n=this.getCellDate(t,e),i.push(this.renderNumberCellHtml(n));return i.join("")},renderNumberCellHtml:function(t){var e,n,i="";return this.view.dayNumbersVisible||this.view.cellWeekNumbersVisible?(e=this.getDayClasses(t),e.unshift("fc-day-top"),this.view.cellWeekNumbersVisible&&(n="ISO"===t._locale._fullCalendar_weekCalc?1:t._locale.firstDayOfWeek()),i+='<td class="'+e.join(" ")+'" data-date="'+t.format()+'">',this.view.cellWeekNumbersVisible&&t.day()==n&&(i+=this.view.buildGotoAnchorHtml({date:t,type:"week"},{class:"fc-week-number"},t.format("w"))),this.view.dayNumbersVisible&&(i+=this.view.buildGotoAnchorHtml(t,{class:"fc-day-number"},t.date())),i+="</td>"):"<td/>"},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(t){var e,n,i=this.sliceRangeByRow(t);for(e=0;e<i.length;e++)n=i[e],this.isRTL?(n.leftCol=this.daysPerRow-1-n.lastRowDayIndex,n.rightCol=this.daysPerRow-1-n.firstRowDayIndex):(n.leftCol=n.firstRowDayIndex,n.rightCol=n.lastRowDayIndex);return i},prepareHits:function(){this.colCoordCache.build(),this.rowCoordCache.build(),this.rowCoordCache.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},releaseHits:function(){this.colCoordCache.clear(),this.rowCoordCache.clear()},queryHit:function(t,e){if(this.colCoordCache.isLeftInBounds(t)&&this.rowCoordCache.isTopInBounds(e)){var n=this.colCoordCache.getHorizontalIndex(t),i=this.rowCoordCache.getVerticalIndex(e);if(null!=i&&null!=n)return this.getCellHit(i,n)}},getHitSpan:function(t){return this.getCellRange(t.row,t.col)},getHitEl:function(t){return this.getCellEl(t.row,t.col)},getCellHit:function(t,e){return{row:t,col:e,component:this,left:this.colCoordCache.getLeftOffset(e),right:this.colCoordCache.getRightOffset(e),top:this.rowCoordCache.getTopOffset(t),bottom:this.rowCoordCache.getBottomOffset(t)}},getCellEl:function(t,e){return this.cellEls.eq(t*this.colCnt+e)},renderDrag:function(t,e){if(this.renderHighlight(this.eventToSpan(t)),e&&e.component!==this)return this.renderEventLocationHelper(t,e)},unrenderDrag:function(){this.unrenderHighlight(),this.unrenderHelper()},renderEventResize:function(t,e){return this.renderHighlight(this.eventToSpan(t)),this.renderEventLocationHelper(t,e)},unrenderEventResize:function(){this.unrenderHighlight(),this.unrenderHelper()},renderHelper:function(e,n){var i,r=[],s=this.eventToSegs(e);return s=this.renderFgSegEls(s),i=this.renderSegRows(s),this.rowEls.each(function(e,s){var o,l=t(s),a=t('<div class="fc-helper-skeleton"><table/></div>');o=n&&n.row===e?n.el.position().top:l.find(".fc-content-skeleton tbody").position().top,a.css("top",o).find("table").append(i[e].tbodyEl),l.append(a),r.push(a[0])}),this.helperEls=t(r)},unrenderHelper: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;r<n.length;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 r,s,o=this.colCnt,l=n.leftCol,a=n.rightCol+1;return i=i||e.toLowerCase(),r=t('<div class="fc-'+i+'-skeleton"><table><tr/></table></div>'),s=r.find("tr"),l>0&&s.append('<td colspan="'+l+'"/>'),s.append(n.el.attr("colspan",a-l)),a<o&&s.append('<td colspan="'+(o-a)+'"/>'),this.bookendCells(s),r}});me.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),pe.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return pe.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var n=t.grep(e,function(t){return t.event.allDay});return pe.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},unrenderFgSegs:function(){for(var t,e=this.rowStructs||[];t=e.pop();)t.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(t){var e,n,i=[];for(e=this.groupSegRows(t),n=0;n<e.length;n++)i.push(this.renderSegRow(n,e[n]));return i},fgSegHtml:function(t,e){var n,i,r=this.view,s=t.event,o=r.isEventDraggable(s),l=!e&&s.allDay&&t.isStart&&r.isEventResizableFromStart(s),a=!e&&s.allDay&&t.isEnd&&r.isEventResizableFromEnd(s),u=this.getSegClasses(t,o,l||a),d=nt(this.getSegSkinCss(t)),c="";return u.unshift("fc-day-grid-event","fc-h-event"),t.isStart&&(n=this.getEventTimeText(s),n&&(c='<span class="fc-time">'+tt(n)+"</span>")),i='<span class="fc-title">'+(tt(s.title||"")||"&nbsp;")+"</span>",'<a class="'+u.join(" ")+'"'+(s.url?' href="'+tt(s.url)+'"':"")+(d?' style="'+d+'"':"")+'><div class="fc-content">'+(this.isRTL?i+" "+c:c+" "+i)+"</div>"+(l?'<div class="fc-resizer fc-start-resizer" />':"")+(a?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},renderSegRow:function(e,n){function i(e){for(;o<e;)d=(m[r-1]||[])[o],d?d.attr("rowspan",parseInt(d.attr("rowspan")||1,10)+1):(d=t("<td/>"),l.append(d)),v[r][o]=d,m[r][o]=d,o++}var r,s,o,l,a,u,d,c=this.colCnt,h=this.buildSegLevels(n),f=Math.max(1,h.length),g=t("<tbody/>"),p=[],v=[],m=[];for(r=0;r<f;r++){if(s=h[r],o=0,l=t("<tr/>"),p.push([]),v.push([]),m.push([]),s)for(a=0;a<s.length;a++){for(u=s[a],i(u.leftCol),d=t('<td class="fc-event-container"/>').append(u.el),u.leftCol!=u.rightCol?d.attr("colspan",u.rightCol-u.leftCol+1):m[r][o]=d;o<=u.rightCol;)v[r][o]=d,p[r][o]=u,o++;l.append(d)}i(c),this.bookendCells(l),g.append(l)}return{row:e,tbodyEl:g,cellMatrix:v,segMatrix:p,segLevels:h,segs:n}},buildSegLevels:function(t){var e,n,i,r=[];for(this.sortEventSegs(t),e=0;e<t.length;e++){for(n=t[e],i=0;i<r.length&&Lt(n,r[i]);i++);n.level=i,(r[i]||(r[i]=[])).push(n)}for(i=0;i<r.length;i++)r[i].sort(Bt);return r},groupSegRows:function(t){var e,n=[];for(e=0;e<this.rowCnt;e++)n.push([]);for(e=0;e<t.length;e++)n[t[e].row].push(t[e]);return n}}),me.mixin({segPopover:null,popoverSegs:null,removeSegPopover:function(){this.segPopover&&this.segPopover.hide()},limitRows:function(t){var e,n,i=this.rowStructs||[];for(e=0;e<i.length;e++)this.unlimitRow(e),n=!!t&&("number"==typeof t?t:this.computeRowLevelLimit(e)),n!==!1&&this.limitRow(e,n)},computeRowLevelLimit:function(e){function n(e,n){s=Math.max(s,t(n).outerHeight())}var i,r,s,o=this.rowEls.eq(e),l=o.height(),a=this.rowStructs[e].tbodyEl.children();for(i=0;i<a.length;i++)if(r=a.eq(i).removeClass("fc-limited"),s=0,r.find("> td > :first-child").each(n),r.position().top+s>l)return i;return!1},limitRow:function(e,n){function i(i){for(;D<i;)u=S.getCellSegs(e,D,n),u.length&&(h=s[n-1][D],y=S.renderMoreLink(e,D,u),m=t("<div/>").append(y),h.append(m),E.push(m[0])),D++}var r,s,o,l,a,u,d,c,h,f,g,p,v,m,y,S=this,w=this.rowStructs[e],E=[],D=0;if(n&&n<w.segLevels.length){for(r=w.segLevels[n-1],s=w.cellMatrix,o=w.tbodyEl.children().slice(n).addClass("fc-limited").get(),l=0;l<r.length;l++){for(a=r[l],i(a.leftCol),c=[],d=0;D<=a.rightCol;)u=this.getCellSegs(e,D,n),c.push(u),d+=u.length,D++;if(d){for(h=s[n-1][a.leftCol],f=h.attr("rowspan")||1,g=[],p=0;p<c.length;p++)v=t('<td class="fc-more-cell"/>').attr("rowspan",f),u=c[p],y=this.renderMoreLink(e,a.leftCol+p,[a].concat(u)),m=t("<div/>").append(y),v.append(m),g.push(v[0]),E.push(v[0]);h.addClass("fc-limited").after(t(g)),o.push(h[0])}}i(this.colCnt),w.moreEls=t(E),w.limitedEls=t(o)}},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,i){var r=this,s=this.view;return t('<a class="fc-more"/>').text(this.getMoreLinkText(i.length)).on("click",function(o){var l=s.opt("eventLimitClick"),a=r.getCellDate(e,n),u=t(this),d=r.getCellEl(e,n),c=r.getCellSegs(e,n),h=r.resliceDaySegs(c,a),f=r.resliceDaySegs(i,a);"function"==typeof l&&(l=s.trigger("eventLimitClick",null,{date:a,dayEl:d,moreEl:u,segs:h,hiddenSegs:f},o)),"popover"===l?r.showSegPopover(e,n,u,h):"string"==typeof l&&s.calendar.zoomTo(a,l)})},showSegPopover:function(t,e,n,i){var r,s,o=this,l=this.view,a=n.parent();r=1==this.rowCnt?l.el:this.rowEls.eq(t),s={className:"fc-more-popover",content:this.renderSegPopoverContent(t,e,i),parentEl:this.view.el,top:r.offset().top,autoHide:!0,viewportConstrain:l.opt("popoverViewportConstrain"),hide:function(){o.segPopover.removeElement(),o.segPopover=null,o.popoverSegs=null}},this.isRTL?s.right=a.offset().left+a.outerWidth()+1:s.left=a.offset().left-1,this.segPopover=new de(s),this.segPopover.show(),this.bindSegHandlersToEl(this.segPopover.el)},renderSegPopoverContent:function(e,n,i){var r,s=this.view,o=s.opt("theme"),l=this.getCellDate(e,n).format(s.opt("dayPopoverFormat")),a=t('<div class="fc-header '+s.widgetHeaderClass+'"><span class="fc-close '+(o?"ui-icon ui-icon-closethick":"fc-icon fc-icon-x")+'"></span><span class="fc-title">'+tt(l)+'</span><div class="fc-clear"/></div><div class="fc-body '+s.widgetContentClass+'"><div class="fc-event-container"></div></div>'),u=a.find(".fc-event-container");for(i=this.renderFgSegEls(i,!0),this.popoverSegs=i,r=0;r<i.length;r++)this.prepareHits(),i[r].hit=this.getCellHit(e,n),this.releaseHits(),u.append(i[r].el);return a},resliceDaySegs:function(e,n){var i=t.map(e,function(t){return t.event}),r=n.clone(),s=r.clone().add(1,"days"),o={start:r,end:s};return e=this.eventsToSegs(i,function(t){var e=F(t,o);return e?[e]:[]}),this.sortEventSegs(e),e},getMoreLinkText:function(t){var e=this.view.opt("eventLimitText");return"function"==typeof e?e(t):"+"+t+" "+e},getCellSegs:function(t,e,n){for(var i,r=this.rowStructs[t].segMatrix,s=n||0,o=[];s<r.length;)i=r[s][e],i&&o.push(i),s++;return o}});var ye=jt.TimeGrid=pe.extend(ve,{slotDuration:null,snapDuration:null,snapsPerSlot:null,minTime:null,maxTime:null,labelFormat:null,labelInterval:null,colEls:null,slatContainerEl:null,slatEls:null,nowIndicatorEls:null,colCoordCache:null,slatCoordCache:null,constructor:function(){pe.apply(this,arguments),this.processOptions()},renderDates:function(){this.el.html(this.renderHtml()),this.colEls=this.el.find(".fc-day"),this.slatContainerEl=this.el.find(".fc-slats"),this.slatEls=this.slatContainerEl.find("tr"),this.colCoordCache=new ce({els:this.colEls,isHorizontal:!0}),this.slatCoordCache=new ce({els:this.slatEls,isVertical:!0}),this.renderContentSkeleton()},renderHtml:function(){return'<div class="fc-bg"><table>'+this.renderBgTrHtml(0)+'</table></div><div class="fc-slats"><table>'+this.renderSlatRowHtml()+"</table></div>"},renderSlatRowHtml:function(){for(var t,n,i,r=this.view,s=this.isRTL,o="",l=e.duration(+this.minTime);l<this.maxTime;)t=this.start.clone().time(l),n=ot(_(l,this.labelInterval)),i='<td class="fc-axis fc-time '+r.widgetContentClass+'" '+r.axisStyleAttr()+">"+(n?"<span>"+tt(t.format(this.labelFormat))+"</span>":"")+"</td>",o+='<tr data-time="'+t.format("HH:mm:ss")+'"'+(n?"":' class="fc-minor"')+">"+(s?"":i)+'<td class="'+r.widgetContentClass+'"/>'+(s?i:"")+"</tr>",l.add(this.slotDuration);return o},processOptions:function(){var n,i=this.view,r=i.opt("slotDuration"),s=i.opt("snapDuration");r=e.duration(r),s=s?e.duration(s):r,this.slotDuration=r,this.snapDuration=s,this.snapsPerSlot=r/s,this.minResizeDuration=s,this.minTime=e.duration(i.opt("minTime")),this.maxTime=e.duration(i.opt("maxTime")),n=i.opt("slotLabelFormat"),t.isArray(n)&&(n=n[n.length-1]),this.labelFormat=n||i.opt("smallTimeFormat"),n=i.opt("slotLabelInterval"),this.labelInterval=n?e.duration(n):this.computeLabelInterval(r)},computeLabelInterval:function(t){var n,i,r;for(n=Ne.length-1;n>=0;n--)if(i=e.duration(Ne[n]),r=_(i,t),ot(r)&&r>1)return i;return e.duration(t)},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},prepareHits:function(){this.colCoordCache.build(),this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(t,e){var n=this.snapsPerSlot,i=this.colCoordCache,r=this.slatCoordCache;if(i.isLeftInBounds(t)&&r.isTopInBounds(e)){var s=i.getHorizontalIndex(t),o=r.getVerticalIndex(e);if(null!=s&&null!=o){var l=r.getTopOffset(o),a=r.getHeight(o),u=(e-l)/a,d=Math.floor(u*n),c=o*n+d,h=l+d/n*a,f=l+(d+1)/n*a;return{col:s,snap:c,component:this,left:i.getLeftOffset(s),right:i.getRightOffset(s),top:h,bottom:f}}}},getHitSpan:function(t){var e,n=this.getCellDate(0,t.col),i=this.computeSnapTime(t.snap);return n.time(i),e=n.clone().add(this.snapDuration),{start:n,end:e}},getHitEl:function(t){return this.colEls.eq(t.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(t){return e.duration(this.minTime+this.snapDuration*t)},spanToSegs:function(t){var e,n=this.sliceRangeByTimes(t);for(e=0;e<n.length;e++)this.isRTL?n[e].col=this.daysPerRow-1-n[e].dayIndex:n[e].col=n[e].dayIndex;return n},sliceRangeByTimes:function(t){var e,n,i,r,s=[];for(n=0;n<this.daysPerRow;n++)i=this.dayDates[n].clone(),r={start:i.clone().time(this.minTime),end:i.clone().time(this.maxTime)},e=F(t,r),e&&(e.dayIndex=n,s.push(e));return s},updateSize:function(t){this.slatCoordCache.build(),t&&this.updateSegVerticals([].concat(this.fgSegs||[],this.bgSegs||[],this.businessSegs||[]))},getTotalSlatHeight:function(){return this.slatContainerEl.outerHeight()},computeDateTop:function(t,n){return this.computeTimeTop(e.duration(t-n.clone().stripTime()))},computeTimeTop:function(t){var e,n,i=this.slatEls.length,r=(t-this.minTime)/this.slotDuration;return r=Math.max(0,r),r=Math.min(i,r),e=Math.floor(r),e=Math.min(e,i-1),n=r-e,this.slatCoordCache.getTopPosition(e)+this.slatCoordCache.getHeight(e)*n},renderDrag:function(t,e){return e?this.renderEventLocationHelper(t,e):void this.renderHighlight(this.eventToSpan(t))},unrenderDrag:function(){this.unrenderHelper(),this.unrenderHighlight()},renderEventResize:function(t,e){return this.renderEventLocationHelper(t,e)},unrenderEventResize:function(){this.unrenderHelper()},renderHelper:function(t,e){return this.renderHelperSegs(this.eventToSegs(t),e)},unrenderHelper:function(){this.unrenderHelperSegs()},renderBusinessHours:function(){this.renderBusinessSegs(this.buildBusinessHourSegs())},unrenderBusinessHours:function(){this.unrenderBusinessSegs()},getNowIndicatorUnit:function(){return"minute"},renderNowIndicator:function(e){var n,i=this.spanToSegs({start:e,end:e}),r=this.computeDateTop(e,e),s=[];for(n=0;n<i.length;n++)s.push(t('<div class="fc-now-indicator fc-now-indicator-line"></div>').css("top",r).appendTo(this.colContainerEls.eq(i[n].col))[0]);i.length>0&&s.push(t('<div class="fc-now-indicator fc-now-indicator-arrow"></div>').css("top",r).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=t(s)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(t){this.view.opt("selectHelper")?this.renderEventLocationHelper(t):this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderHighlight:function(t){this.renderHighlightSegs(this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});ye.mixin({colContainerEls:null,fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,renderContentSkeleton:function(){var e,n,i="";for(e=0;e<this.colCnt;e++)i+='<td><div class="fc-content-col"><div class="fc-event-container fc-helper-container"></div><div class="fc-event-container"></div><div class="fc-highlight-container"></div><div class="fc-bgevent-container"></div><div class="fc-business-container"></div></div></td>';n=t('<div class="fc-content-skeleton"><table><tr>'+i+"</tr></table></div>"),this.colContainerEls=n.find(".fc-content-col"),this.helperContainerEls=n.find(".fc-helper-container"),this.fgContainerEls=n.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=n.find(".fc-bgevent-container"),this.highlightContainerEls=n.find(".fc-highlight-container"),this.businessContainerEls=n.find(".fc-business-container"),this.bookendCells(n.find("tr")),this.el.append(n)},renderFgSegs:function(t){return t=this.renderFgSegsIntoContainers(t,this.fgContainerEls),this.fgSegs=t,t},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(e,n){var i,r,s,o=[];for(e=this.renderFgSegsIntoContainers(e,this.helperContainerEls),i=0;i<e.length;i++)r=e[i],n&&n.col===r.col&&(s=n.el,r.el.css({left:s.css("left"),right:s.css("right"),"margin-left":s.css("margin-left"),"margin-right":s.css("margin-right")})),o.push(r.el[0]);return this.helperSegs=e,t(o)},unrenderHelperSegs:function(){this.unrenderNamedSegs("helperSegs")},renderBgSegs:function(t){return t=this.renderFillSegEls("bgEvent",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.bgContainerEls),this.bgSegs=t,t},unrenderBgSegs:function(){this.unrenderNamedSegs("bgSegs")},renderHighlightSegs:function(t){t=this.renderFillSegEls("highlight",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.highlightContainerEls),this.highlightSegs=t},unrenderHighlightSegs:function(){this.unrenderNamedSegs("highlightSegs")},renderBusinessSegs:function(t){t=this.renderFillSegEls("businessHours",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.businessContainerEls),this.businessSegs=t},unrenderBusinessSegs:function(){this.unrenderNamedSegs("businessSegs")},groupSegsByCol:function(t){var e,n=[];for(e=0;e<this.colCnt;e++)n.push([]);for(e=0;e<t.length;e++)n[t[e].col].push(t[e]);return n},attachSegsByCol:function(t,e){var n,i,r;for(n=0;n<this.colCnt;n++)for(i=t[n],r=0;r<i.length;r++)e.eq(n).append(i[r].el)},unrenderNamedSegs:function(t){var e,n=this[t];if(n){for(e=0;e<n.length;e++)n[e].el.remove();this[t]=null}},renderFgSegsIntoContainers:function(t,e){var n,i;for(t=this.renderFgSegEls(t),n=this.groupSegsByCol(t),i=0;i<this.colCnt;i++)this.updateFgSegCoords(n[i]);return this.attachSegsByCol(n,e),t},fgSegHtml:function(t,e){var n,i,r,s=this.view,o=t.event,l=s.isEventDraggable(o),a=!e&&t.isStart&&s.isEventResizableFromStart(o),u=!e&&t.isEnd&&s.isEventResizableFromEnd(o),d=this.getSegClasses(t,l,a||u),c=nt(this.getSegSkinCss(t));return d.unshift("fc-time-grid-event","fc-v-event"),s.isMultiDayEvent(o)?(t.isStart||t.isEnd)&&(n=this.getEventTimeText(t),i=this.getEventTimeText(t,"LT"),r=this.getEventTimeText(t,null,!1)):(n=this.getEventTimeText(o),i=this.getEventTimeText(o,"LT"),r=this.getEventTimeText(o,null,!1)),'<a class="'+d.join(" ")+'"'+(o.url?' href="'+tt(o.url)+'"':"")+(c?' style="'+c+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+tt(r)+'" data-full="'+tt(i)+'"><span>'+tt(n)+"</span></div>":"")+(o.title?'<div class="fc-title">'+tt(o.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(u?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},updateSegVerticals:function(t){this.computeSegVerticals(t),this.assignSegVerticals(t)},computeSegVerticals:function(t){var e,n;for(e=0;e<t.length;e++)n=t[e],n.top=this.computeDateTop(n.start,n.start),n.bottom=this.computeDateTop(n.end,n.start)},assignSegVerticals:function(t){var e,n;for(e=0;e<t.length;e++)n=t[e],n.el.css(this.generateSegVerticalCss(n))},generateSegVerticalCss:function(t){return{top:t.top,bottom:-t.bottom}},updateFgSegCoords:function(t){this.computeSegVerticals(t),this.computeFgSegHorizontals(t),this.assignSegVerticals(t),this.assignFgSegHorizontals(t)},computeFgSegHorizontals:function(t){var e,n,i;if(this.sortEventSegs(t),e=zt(t),Ft(e),n=e[0]){for(i=0;i<n.length;i++)Nt(n[i]);for(i=0;i<n.length;i++)this.computeFgSegForwardBack(n[i],0,0)}},computeFgSegForwardBack:function(t,e,n){var i,r=t.forwardSegs;if(void 0===t.forwardCoord)for(r.length?(this.sortForwardSegs(r),this.computeFgSegForwardBack(r[0],e+1,n),t.forwardCoord=r[0].backwardCoord):t.forwardCoord=1,t.backwardCoord=t.forwardCoord-(t.forwardCoord-n)/(e+1),i=0;i<r.length;i++)this.computeFgSegForwardBack(r[i],0,t.forwardCoord)},sortForwardSegs:function(t){t.sort(lt(this,"compareForwardSegs"))},compareForwardSegs:function(t,e){return e.forwardPressure-t.forwardPressure||(t.backwardCoord||0)-(e.backwardCoord||0)||this.compareEventSegs(t,e)},assignFgSegHorizontals:function(t){var e,n;for(e=0;e<t.length;e++)n=t[e],n.el.css(this.generateFgSegHorizontalCss(n)),n.bottom-n.top<30&&n.el.addClass("fc-short")},generateFgSegHorizontalCss:function(t){var e,n,i=this.view.opt("slotEventOverlap"),r=t.backwardCoord,s=t.forwardCoord,o=this.generateSegVerticalCss(t);return i&&(s=Math.min(1,r+2*(s-r))),this.isRTL?(e=1-s,n=r):(e=r,n=1-s),o.zIndex=t.level+1,o.left=100*e+"%",o.right=100*n+"%",i&&t.forwardPressure&&(o[this.isRTL?"marginLeft":"marginRight"]=20),o}});var Se=jt.View=wt.extend(le,ae,{type:null,name:null,title:null,calendar:null,options:null,el:null,displaying:null,isSkeletonRendered:!1,isEventsRendered:!1,start:null,end:null,intervalStart:null,intervalEnd:null,intervalDuration:null,intervalUnit:null,isRTL:!1,isSelected:!1,selectedEvent:null,eventOrderSpecs:null,widgetHeaderClass:null,widgetContentClass:null,highlightStateClass:null,nextDayThreshold:null,isHiddenDayHash:null,isNowIndicatorRendered:null,initialNowDate:null,initialNowQueriedMs:null,nowIndicatorTimeoutID:null,nowIndicatorIntervalID:null,constructor:function(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.isRTL=this.opt("isRTL"),this.eventOrderSpecs=M(this.opt("eventOrder")),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 e,n,i=O(this.intervalDuration),r=t.clone().startOf(i),s=r.clone().add(this.intervalDuration);return/year|month|week|day/.test(i)?(r.stripTime(),s.stripTime()):(r.hasTime()||(r=this.calendar.time(0)),s.hasTime()||(s=this.calendar.time(0))),e=r.clone(),e=this.skipHiddenDays(e),n=s.clone(),n=this.skipHiddenDays(n,-1,!0),{intervalUnit:i,intervalStart:r,intervalEnd:s,start:e,end:n}},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 this.intervalDuration.as("days")<=1&&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.calendar.applyTimezone(this.intervalStart),end:this.calendar.applyTimezone(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)),pt(t.start,i,e,n,this.opt("isRTL"))},getAllDayHtml:function(){return this.opt("allDayHtml")||tt(this.opt("allDayText"))},buildGotoAnchorHtml:function(e,n,i){var r,s,o,l;return t.isPlainObject(e)?(r=e.date,s=e.type,o=e.forceOff):r=e,r=jt.moment(r),l={date:r.format("YYYY-MM-DD"),type:s||"day"},"string"==typeof n&&(i=n,n=null),n=n?" "+it(n):"",i=i||"",!o&&this.opt("navLinks")?"<a"+n+' data-goto="'+tt(JSON.stringify(l))+'">'+i+"</a>":"<span"+n+">"+i+"</span>"},setElement:function(t){this.el=t,this.bindGlobalHandlers()},removeElement:function(){this.clear(),this.isSkeletonRendered&&(this.unrenderSkeleton(),this.isSkeletonRendered=!1),this.unbindGlobalHandlers(),this.el.remove()},display:function(t,e){var n=this,i=null;return null!=e&&this.displaying&&(i=this.queryScroll()),this.calendar.freezeContentHeight(),ut(this.clear(),function(){return n.displaying=ut(n.displayView(t),function(){null!=e?n.setScroll(e):n.forceScroll(n.computeInitialScroll(i)),n.calendar.unfreezeContentHeight(),n.triggerRender()})})},clear:function(){var e=this,n=this.displaying;return n?ut(n,function(){return e.displaying=null,e.clearEvents(),e.clearView()}):t.when()},displayView:function(t){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0),t&&this.setDate(t),this.render&&this.render(),this.renderDates(),this.updateSize(),this.renderBusinessHours(),this.startNowIndicator()},clearView:function(){this.unselect(),this.stopNowIndicator(),this.triggerUnrender(),this.unrenderBusinessHours(),this.unrenderDates(),this.destroy&&this.destroy()},renderSkeleton:function(){},unrenderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},triggerRender:function(){this.trigger("viewRender",this,this,this.el)},triggerUnrender:function(){this.trigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){this.listenTo(t(document),"mousedown",this.handleDocumentMousedown),this.listenTo(t(document),"touchstart",this.processUnselect)},unbindGlobalHandlers:function(){this.stopListeningTo(t(document))},initThemingProps:function(){var t=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=t+"-widget-header",this.widgetContentClass=t+"-widget-content",this.highlightStateClass=t+"-state-highlight"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var t,n,i,r=this;this.opt("nowIndicator")&&(t=this.getNowIndicatorUnit(),t&&(n=lt(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,i=this.initialNowDate.clone().startOf(t).add(1,t)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){r.nowIndicatorTimeoutID=null,n(),i=+e.duration(1,t),i=Math.max(100,i),r.nowIndicatorIntervalID=setInterval(n,i)},i)))},updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},getNowIndicatorUnit:function(){},renderNowIndicator:function(t){},unrenderNowIndicator:function(){},updateSize:function(t){var e;t&&(e=this.queryScroll()),this.updateHeight(t),this.updateWidth(t),this.updateNowIndicator(),t&&this.setScroll(e)},updateWidth:function(t){},updateHeight:function(t){var e=this.calendar;this.setHeight(e.getSuggestedViewHeight(),e.isHeightAuto())},setHeight:function(t,e){},computeInitialScroll:function(t){return 0},queryScroll:function(){},setScroll:function(t){},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(){var t;this.isEventsRendered&&(t=this.queryScroll(),this.triggerEventUnrender(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.setScroll(t),this.isEventsRendered=!1)},renderEvents:function(t){},unrenderEvents:function(){},triggerEventRender:function(){this.renderedEventSegEach(function(t){this.trigger("eventAfterRender",t.event,t.event,t.el)}),this.trigger("eventAfterAllRender")},triggerEventUnrender: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;n<i.length;n++)e&&i[n].event._id!==e._id||i[n].el&&t.call(this,i[n])},getEventSegs:function(){return[]},isEventDraggable:function(t){return this.isEventStartEditable(t)},isEventStartEditable:function(t){return J(t.startEditable,(t.source||{}).startEditable,this.opt("eventStartEditable"),this.isEventGenerallyEditable(t))},isEventGenerallyEditable:function(t){return J(t.editable,(t.source||{}).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(t,e){},unrenderDrag: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 J(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(t){},reportSelection:function(t,e){this.isSelected=!0,this.triggerSelect(t,e)},triggerSelect:function(t,e){this.trigger("select",null,this.calendar.applyTimezone(t.start),this.calendar.applyTimezone(t.end),e)},unselect:function(t){this.isSelected&&(this.isSelected=!1,this.destroySelection&&this.destroySelection(),this.unrenderSelection(),this.trigger("unselect",null,t))},unrenderSelection:function(){},selectEvent:function(t){this.selectedEvent&&this.selectedEvent===t||(this.unselectEvent(),this.renderedEventSegEach(function(t){t.el.addClass("fc-selected")},t),this.selectedEvent=t)},unselectEvent:function(){this.selectedEvent&&(this.renderedEventSegEach(function(t){t.el.removeClass("fc-selected")},this.selectedEvent),this.selectedEvent=null)},isEventSelected:function(t){return this.selectedEvent&&this.selectedEvent._id===t._id},handleDocumentMousedown:function(t){S(t)&&this.processUnselect(t)},processUnselect:function(t){this.processRangeUnselect(t),this.processEventUnselect(t)},processRangeUnselect:function(e){var n;this.isSelected&&this.opt("unselectAuto")&&(n=this.opt("unselectCancel"),n&&t(e.target).closest(n).length||this.unselect(e))},processEventUnselect:function(e){this.selectedEvent&&(t(e.target).closest(".fc-selected").length||this.unselectEvent())},triggerDayClick:function(t,e,n){this.trigger("dayClick",e,this.calendar.applyTimezone(t.start),n)},initHiddenDays:function(){var e,n=this.opt("hiddenDays")||[],i=[],r=0;for(this.opt("weekends")===!1&&n.push(0,6),e=0;e<7;e++)(i[e]=t.inArray(e,n)!==-1)||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 e,n=t.start.clone().stripTime(),i=t.end,r=null;return i&&(r=i.clone().stripTime(),e=+i.time(),e&&e>=this.nextDayThreshold&&r.add(1,"days")),(!i||r<=n)&&(r=n.clone().add(1,"days")),{start:n,end:r}},isMultiDayEvent:function(t){var e=this.computeDayRange(t);return e.end.diff(e.start,"days")>1}}),we=jt.Scroller=wt.extend({el:null,scrollEl:null,overflowX:null,overflowY:null,constructor:function(t){t=t||{},this.overflowX=t.overflowX||t.overflow||"auto",this.overflowY=t.overflowY||t.overflow||"auto"},render:function(){this.el=this.renderEl(),this.applyOverflow()},renderEl:function(){return this.scrollEl=t('<div class="fc-scroller"></div>')},clear:function(){this.setHeight("auto"),this.applyOverflow()},destroy:function(){this.el.remove()},applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},lockOverflow:function(t){var e=this.overflowX,n=this.overflowY;t=t||this.getScrollbarWidths(),"auto"===e&&(e=t.top||t.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=t.left||t.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":e,"overflow-y":n})},setHeight:function(t){this.scrollEl.height(t)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(t){this.scrollEl.scrollTop(t)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return p(this.scrollEl)}}),Ee=jt.Calendar=wt.extend({dirDefaults:null,localeDefaults:null,overrides:null,dynamicOverrides:null,options:null,viewSpecCache:null,view:null,header:null,loadingLevel:0,constructor:Ot,initialize:function(){},populateOptionsHash:function(){var t,e,i,r;t=J(this.dynamicOverrides.locale,this.overrides.locale),e=De[t],e||(t=Ee.defaults.locale,e=De[t]||{}),i=J(this.dynamicOverrides.isRTL,this.overrides.isRTL,e.isRTL,Ee.defaults.isRTL),r=i?Ee.rtlDefaults:{},this.dirDefaults=r,this.localeDefaults=e,this.options=n([Ee.defaults,r,e,this.overrides,this.dynamicOverrides]),Vt(this.options)},getViewSpec:function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},getUnitViewSpec:function(e){var n,i,r;if(t.inArray(e,Xt)!=-1)for(n=this.header.getViewsWithButtons(),t.each(jt.views,function(t){n.push(t)}),i=0;i<n.length;i++)if(r=this.getViewSpec(n[i]),r&&r.singleUnit==e)return r},buildViewSpec:function(t){for(var i,r,s,o,l=this.overrides.views||{},a=[],u=[],d=[],c=t;c;)i=Ut[c],r=l[c],c=null,"function"==typeof i&&(i={class:i}),i&&(a.unshift(i),u.unshift(i.defaults||{}),s=s||i.duration,c=c||i.type),r&&(d.unshift(r),s=s||r.duration,c=c||r.type);return i=q(a),i.type=t,!!i.class&&(s&&(s=e.duration(s),s.valueOf()&&(i.duration=s,o=O(s),1===s.as(o)&&(i.singleUnit=o,d.unshift(l[o]||{})))),i.defaults=n(u),i.overrides=n(d),this.buildViewSpecOptions(i),this.buildViewSpecButtonText(i,t),i)},buildViewSpecOptions:function(t){t.options=n([Ee.defaults,t.defaults,this.dirDefaults,this.localeDefaults,this.overrides,t.overrides,this.dynamicOverrides]),Vt(t.options)},buildViewSpecButtonText:function(t,e){function n(n){var i=n.buttonText||{};return i[e]||(t.buttonTextKey?i[t.buttonTextKey]:null)||(t.singleUnit?i[t.singleUnit]:null)}t.buttonTextOverride=n(this.dynamicOverrides)||n(this.overrides)||t.overrides.buttonText,t.buttonTextDefault=n(this.localeDefaults)||n(this.dirDefaults)||t.defaults.buttonText||n(Ee.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))},pushLoading:function(){this.loadingLevel++||this.trigger("loading",null,!0,this.view)},popLoading:function(){--this.loadingLevel||this.trigger("loading",null,!1,this.view)},buildSelectSpan:function(t,e){var n,i=this.moment(t).stripZone();return n=e?this.moment(e).stripZone():i.hasTime()?i.clone().add(this.defaultTimedEventDuration):i.clone().add(this.defaultAllDayEventDuration),{start:i,end:n}}});Ee.mixin(le),Ee.mixin({optionHandlers:null,bindOption:function(t,e){this.bindOptions([t],e)},bindOptions:function(t,e){var n,i={func:e,names:t};for(n=0;n<t.length;n++)this.registerOptionHandlerObj(t[n],i);this.triggerOptionHandlerObj(i)},registerOptionHandlerObj:function(t,e){(this.optionHandlers[t]||(this.optionHandlers[t]=[])).push(e)},triggerOptionHandlers:function(t){var e,n=this.optionHandlers[t]||[];for(e=0;e<n.length;e++)this.triggerOptionHandlerObj(n[e])},triggerOptionHandlerObj:function(t){var e,n=t.names,i=[];for(e=0;e<n.length;e++)i.push(this.options[n[e]]);t.func.apply(this,i)}}),Ee.defaults={titleRangeSeparator:" – ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",scrollTime:"06:00:00",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},allDayText:"all-day",theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventOrder:"title",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3},Ee.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},Ee.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 De=jt.locales={};jt.datepickerLocale=function(e,n,i){var r=De[e]||(De[e]={});r.isRTL=i.isRTL,r.weekNumberTitle=i.weekHeader,t.each(be,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))},jt.locale=function(e,i){var r,s;r=De[e]||(De[e]={}),i&&(r=De[e]=n([r,i])),s=Pt(e),t.each(Ce,function(t,e){null==r[t]&&(r[t]=e(s,r))}),Ee.defaults.locale=e};var be={buttonText:function(t){return{prev:et(t.prevText),next:et(t.nextText),today:et(t.currentText)}},monthYearFormat:function(t){return t.showMonthAfterYear?"YYYY["+t.yearSuffix+"] MMMM":"MMMM YYYY["+t.yearSuffix+"]"}},Ce={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,"")}},He={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"}};jt.locale("en",Ee.englishDefaults),jt.sourceNormalizers=[],jt.sourceFetchers=[];var Te={dataType:"json",cache:!1},xe=1;Ee.prototype.normalizeEvent=function(t){},Ee.prototype.spanContainsSpan=function(t,e){var n=t.start.clone().stripZone(),i=this.getEventEnd(t).stripZone();return e.start>=n&&e.end<=i},Ee.prototype.getPeerEvents=function(t,e){var n,i,r=this.getEventCache(),s=[];for(n=0;n<r.length;n++)i=r[n],e&&e._id===i._id||s.push(i);return s},Ee.prototype.isEventSpanAllowed=function(t,e){var n=e.source||{},i=J(e.constraint,n.constraint,this.options.eventConstraint),r=J(e.overlap,n.overlap,this.options.eventOverlap);return this.isSpanAllowed(t,i,r,e)&&(!this.options.eventAllow||this.options.eventAllow(t,e)!==!1)},Ee.prototype.isExternalSpanAllowed=function(e,n,i){var r,s;return i&&(r=t.extend({},i,n),s=this.expandEvent(this.buildEventFromInput(r))[0]),s?this.isEventSpanAllowed(e,s):this.isSelectionSpanAllowed(e)},Ee.prototype.isSelectionSpanAllowed=function(t){return this.isSpanAllowed(t,this.options.selectConstraint,this.options.selectOverlap)&&(!this.options.selectAllow||this.options.selectAllow(t)!==!1)},Ee.prototype.isSpanAllowed=function(t,e,n,i){var r,s,o,l,a,u;if(null!=e&&(r=this.constraintToEvents(e))){for(s=!1,l=0;l<r.length;l++)if(this.spanContainsSpan(r[l],t)){s=!0;break}if(!s)return!1}for(o=this.getPeerEvents(t,i),l=0;l<o.length;l++)if(a=o[l],this.eventIntersectsRange(a,t)){if(n===!1)return!1;if("function"==typeof n&&!n(a,i))return!1;if(i){if(u=J(a.overlap,(a.source||{}).overlap),u===!1)return!1;if("function"==typeof u&&!u(i,a))return!1}}return!0},Ee.prototype.constraintToEvents=function(t){return"businessHours"===t?this.getCurrentBusinessHourEvents():"object"==typeof t?null!=t.start?this.expandEvent(this.buildEventFromInput(t)):null:this.clientEvents(t)},Ee.prototype.eventIntersectsRange=function(t,e){var n=t.start.clone().stripZone(),i=this.getEventEnd(t).stripZone();return e.start<i&&e.end>n};var Re={id:"_fcBusinessHours",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"};Ee.prototype.getCurrentBusinessHourEvents=function(t){return this.computeBusinessHourEvents(t,this.options.businessHours)},Ee.prototype.computeBusinessHourEvents=function(e,n){return n===!0?this.expandBusinessHourEvents(e,[{}]):t.isPlainObject(n)?this.expandBusinessHourEvents(e,[n]):t.isArray(n)?this.expandBusinessHourEvents(e,n,!0):[]},Ee.prototype.expandBusinessHourEvents=function(e,n,i){var r,s,o=this.getView(),l=[];for(r=0;r<n.length;r++)s=n[r],i&&!s.dow||(s=t.extend({},Re,s),e&&(s.start=null,s.end=null),l.push.apply(l,this.expandEvent(this.buildEventFromInput(s),o.start,o.end)));return l};var Ie=jt.BasicView=Se.extend({scroller:null,dayGridClass:me,dayGrid:null,dayNumbersVisible:!1,colWeekNumbersVisible:!1,cellWeekNumbersVisible:!1,weekNumberWidth:null,headContainerEl:null,headRowEl:null,initialize:function(){this.dayGrid=this.instantiateDayGrid(),this.scroller=new we({overflowX:"hidden",overflowY:"auto"})},instantiateDayGrid:function(){var t=this.dayGridClass.extend(ke);return new t(this)},setRange:function(t){Se.prototype.setRange.call(this,t),this.dayGrid.breakOnWeeks=/year|month|week/.test(this.intervalUnit),this.dayGrid.setRange(t)},computeRange:function(t){var e=Se.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},renderDates:function(){this.dayNumbersVisible=this.dayGrid.rowCnt>1,this.opt("weekNumbers")&&(this.opt("weekNumbersWithinDays")?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0)),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.cellWeekNumbersVisible||this.colWeekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var e=this.scroller.el.addClass("fc-day-grid-container"),n=t('<div class="fc-day-grid" />').appendTo(e);this.el.find(".fc-body > tr > td").append(e),this.dayGrid.setElement(n),this.dayGrid.renderDates(this.hasRigidRows())},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml()),this.headRowEl=this.headContainerEl.find(".fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement(),this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.dayGrid.unrenderBusinessHours()},renderSkeletonHtml:function(){return'<table><thead class="fc-head"><tr><td class="fc-head-container '+this.widgetHeaderClass+'"></td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'"></td></tr></tbody></table>'},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var t=this.opt("eventLimit");return t&&"number"!=typeof t},updateWidth:function(){this.colWeekNumbersVisible&&(this.weekNumberWidth=u(this.el.find(".fc-week-number")))},setHeight:function(t,e){var n,s,o=this.opt("eventLimit");this.scroller.clear(),r(this.headRowEl),this.dayGrid.removeSegPopover(),o&&"number"==typeof o&&this.dayGrid.limitRows(o),n=this.computeScrollerHeight(t),this.setGridHeight(n,e),o&&"number"!=typeof o&&this.dayGrid.limitRows(o),e||(this.scroller.setHeight(n),s=this.scroller.getScrollbarWidths(),(s.left||s.right)&&(i(this.headRowEl,s),n=this.computeScrollerHeight(t),this.scroller.setHeight(n)),this.scroller.lockOverflow(s))},computeScrollerHeight:function(t){return t-d(this.el,this.scroller.el)},setGridHeight:function(t,e){e?a(this.dayGrid.rowEls):l(this.dayGrid.rowEls,t,!0)},queryScroll:function(){return this.scroller.getScrollTop()},setScroll:function(t){this.scroller.setScrollTop(t)},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(t,e){return this.dayGrid.queryHit(t,e)},getHitSpan:function(t){return this.dayGrid.getHitSpan(t)},getHitEl:function(t){return this.dayGrid.getHitEl(t)},renderEvents:function(t){this.dayGrid.renderEvents(t),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(t,e){return this.dayGrid.renderDrag(t,e)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(t){this.dayGrid.renderSelection(t)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),ke={renderHeadIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'<th class="fc-week-number '+t.widgetHeaderClass+'" '+t.weekNumberStyleAttr()+"><span>"+tt(t.opt("weekNumberTitle"))+"</span></th>":""},renderNumberIntroHtml:function(t){var e=this.view,n=this.getCellDate(t,0);return e.colWeekNumbersVisible?'<td class="fc-week-number" '+e.weekNumberStyleAttr()+">"+e.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"</td>":""},renderBgIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'<td class="fc-week-number '+t.widgetContentClass+'" '+t.weekNumberStyleAttr()+"></td>":""},renderIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+"></td>":""}},Me=jt.MonthView=Ie.extend({computeRange:function(t){var e,n=Ie.prototype.computeRange.call(this,t);return this.isFixedWeeks()&&(e=Math.ceil(n.end.diff(n.start,"weeks",!0)),n.end.add(6-e,"weeks")),n},setGridHeight:function(t,e){e&&(t*=this.rowCnt/6),l(this.dayGrid.rowEls,t,!e)},isFixedWeeks:function(){return this.opt("fixedWeekCount")}});Ut.basic={class:Ie},Ut.basicDay={type:"basic",duration:{days:1}},Ut.basicWeek={type:"basic",duration:{weeks:1}},Ut.month={class:Me,duration:{months:1},defaults:{fixedWeekCount:!0}};var Le=jt.AgendaView=Se.extend({scroller:null,timeGridClass:ye,timeGrid:null,dayGridClass:me,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid()),this.scroller=new we({overflowX:"hidden",overflowY:"auto"})},instantiateTimeGrid:function(){var t=this.timeGridClass.extend(Be);return new t(this)},instantiateDayGrid:function(){var t=this.dayGridClass.extend(ze);return new t(this)},setRange:function(t){Se.prototype.setRange.call(this,t),this.timeGrid.setRange(t),this.dayGrid&&this.dayGrid.setRange(t)},renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var e=this.scroller.el.addClass("fc-time-grid-container"),n=t('<div class="fc-time-grid" />').appendTo(e);this.el.find(".fc-body > tr > td").append(e),this.timeGrid.setElement(n),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 *)")},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},unrenderDates:function(){this.timeGrid.unrenderDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement()),this.scroller.destroy()},renderSkeletonHtml:function(){return'<table><thead class="fc-head"><tr><td class="fc-head-container '+this.widgetHeaderClass+'"></td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+this.widgetHeaderClass+'"/>':"")+"</td></tr></tbody></table>"},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours(),this.dayGrid&&this.dayGrid.unrenderBusinessHours()},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(t){this.timeGrid.renderNowIndicator(t)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(t){this.timeGrid.updateSize(t),Se.prototype.updateSize.call(this,t)},updateWidth:function(){this.axisWidth=u(this.el.find(".fc-axis"))},setHeight:function(t,e){var n,s,o;this.bottomRuleEl.hide(),this.scroller.clear(),r(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),n=this.opt("eventLimit"),n&&"number"!=typeof n&&(n=Fe),n&&this.dayGrid.limitRows(n)),e||(s=this.computeScrollerHeight(t),this.scroller.setHeight(s),o=this.scroller.getScrollbarWidths(),(o.left||o.right)&&(i(this.noScrollRowEls,o),s=this.computeScrollerHeight(t),this.scroller.setHeight(s)),this.scroller.lockOverflow(o),this.timeGrid.getTotalSlatHeight()<s&&this.bottomRuleEl.show())},computeScrollerHeight:function(t){return t-d(this.el,this.scroller.el)},computeInitialScroll:function(){var t=e.duration(this.opt("scrollTime")),n=this.timeGrid.computeTimeTop(t);return n=Math.ceil(n),n&&n++,n},queryScroll:function(){return this.scroller.getScrollTop()},setScroll:function(t){this.scroller.setScrollTop(t)},prepareHits:function(){this.timeGrid.prepareHits(),this.dayGrid&&this.dayGrid.prepareHits()},releaseHits:function(){this.timeGrid.releaseHits(),this.dayGrid&&this.dayGrid.releaseHits()},queryHit:function(t,e){var n=this.timeGrid.queryHit(t,e);return!n&&this.dayGrid&&(n=this.dayGrid.queryHit(t,e)),n},getHitSpan:function(t){return t.component.getHitSpan(t)},getHitEl:function(t){return t.component.getHitEl(t)},renderEvents:function(t){var e,n,i=[],r=[],s=[];for(n=0;n<t.length;n++)t[n].allDay?i.push(t[n]):r.push(t[n]);e=this.timeGrid.renderEvents(r),this.dayGrid&&(s=this.dayGrid.renderEvents(i)),this.updateHeight()},getEventSegs:function(){return this.timeGrid.getEventSegs().concat(this.dayGrid?this.dayGrid.getEventSegs():[])},unrenderEvents:function(){this.timeGrid.unrenderEvents(),this.dayGrid&&this.dayGrid.unrenderEvents()},renderDrag:function(t,e){return t.start.hasTime()?this.timeGrid.renderDrag(t,e):this.dayGrid?this.dayGrid.renderDrag(t,e):void 0},unrenderDrag:function(){this.timeGrid.unrenderDrag(),this.dayGrid&&this.dayGrid.unrenderDrag()},renderSelection:function(t){t.start.hasTime()||t.end.hasTime()?this.timeGrid.renderSelection(t):this.dayGrid&&this.dayGrid.renderSelection(t)},unrenderSelection:function(){this.timeGrid.unrenderSelection(),this.dayGrid&&this.dayGrid.unrenderSelection()}}),Be={renderHeadIntroHtml:function(){var t,e=this.view;return e.opt("weekNumbers")?(t=this.start.format(e.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+e.widgetHeaderClass+'" '+e.axisStyleAttr()+">"+e.buildGotoAnchorHtml({date:this.start,type:"week",forceOff:this.colCnt>1},tt(t))+"</th>"):'<th class="fc-axis '+e.widgetHeaderClass+'" '+e.axisStyleAttr()+"></th>"},renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.widgetContentClass+'" '+t.axisStyleAttr()+"></td>"},renderIntroHtml:function(){var t=this.view;return'<td class="fc-axis" '+t.axisStyleAttr()+"></td>"}},ze={renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.widgetContentClass+'" '+t.axisStyleAttr()+"><span>"+t.getAllDayHtml()+"</span></td>"},renderIntroHtml:function(){var t=this.view;return'<td class="fc-axis" '+t.axisStyleAttr()+"></td>"}},Fe=5,Ne=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];Ut.agenda={class:Le,defaults:{allDaySlot:!0,slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},Ut.agendaDay={type:"agenda",duration:{days:1}},Ut.agendaWeek={type:"agenda",duration:{weeks:1}};var Ge=Se.extend({grid:null,scroller:null,initialize:function(){this.grid=new Ae(this),this.scroller=new we({overflowX:"hidden",overflowY:"auto"})},setRange:function(t){Se.prototype.setRange.call(this,t),this.grid.setRange(t)},renderSkeleton:function(){this.el.addClass("fc-list-view "+this.widgetContentClass),this.scroller.render(),this.scroller.el.appendTo(this.el),this.grid.setElement(this.scroller.scrollEl)},unrenderSkeleton:function(){this.scroller.destroy()},setHeight:function(t,e){this.scroller.setHeight(this.computeScrollerHeight(t))},computeScrollerHeight:function(t){return t-d(this.el,this.scroller.el)},renderEvents:function(t){this.grid.renderEvents(t)},unrenderEvents:function(){this.grid.unrenderEvents()},isEventResizable:function(t){return!1},isEventDraggable:function(t){return!1}}),Ae=pe.extend({segSelector:".fc-list-item",hasDayInteractions:!1,spanToSegs:function(t){for(var e,n=this.view,i=n.start.clone().time(0),r=0,s=[];i<n.end;)if(e=F(t,{start:i,end:i.clone().add(1,"day")}),e&&(e.dayIndex=r,s.push(e)),i.add(1,"day"),r++,e&&!e.isEnd&&t.end.hasTime()&&t.end<i.clone().add(this.view.nextDayThreshold)){e.end=t.end.clone(),e.isEnd=!0;break}return s},computeEventTimeFormat:function(){return this.view.opt("mediumTimeFormat")},handleSegClick:function(e,n){var i;pe.prototype.handleSegClick.apply(this,arguments),t(n.target).closest("a[href]").length||(i=e.event.url,i&&!n.isDefaultPrevented()&&(window.location.href=i))},renderFgSegs:function(t){return t=this.renderFgSegEls(t),t.length?this.renderSegList(t):this.renderEmptyMessage(),t},renderEmptyMessage:function(){this.el.html('<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+tt(this.view.opt("noEventsMessage"))+"</div></div></div>")},renderSegList:function(e){var n,i,r,s=this.groupSegsByDay(e),o=t('<table class="fc-list-table"><tbody/></table>'),l=o.find("tbody");for(n=0;n<s.length;n++)if(i=s[n])for(l.append(this.dayHeaderHtml(this.view.start.clone().add(n,"days"))),this.sortEventSegs(i),r=0;r<i.length;r++)l.append(i[r].el);this.el.empty().append(o)},groupSegsByDay:function(t){var e,n,i=[];for(e=0;e<t.length;e++)n=t[e],(i[n.dayIndex]||(i[n.dayIndex]=[])).push(n);return i},dayHeaderHtml:function(t){var e=this.view,n=e.opt("listDayFormat"),i=e.opt("listDayAltFormat");return'<tr class="fc-list-heading" data-date="'+t.format("YYYY-MM-DD")+'"><td class="'+e.widgetHeaderClass+'" colspan="3">'+(n?e.buildGotoAnchorHtml(t,{class:"fc-list-heading-main"},tt(t.format(n))):"")+(i?e.buildGotoAnchorHtml(t,{class:"fc-list-heading-alt"},tt(t.format(i))):"")+"</td></tr>"},fgSegHtml:function(t){var e,n=this.view,i=["fc-list-item"].concat(this.getSegCustomClasses(t)),r=this.getSegBackgroundColor(t),s=t.event,o=s.url;return e=s.allDay?n.getAllDayHtml():n.isMultiDayEvent(s)?t.isStart||t.isEnd?tt(this.getEventTimeText(t)):n.getAllDayHtml():tt(this.getEventTimeText(s)),o&&i.push("fc-has-url"),'<tr class="'+i.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+n.widgetContentClass+'">'+(e||"")+"</td>":"")+'<td class="fc-list-item-marker '+n.widgetContentClass+'"><span class="fc-event-dot"'+(r?' style="background-color:'+r+'"':"")+'></span></td><td class="fc-list-item-title '+n.widgetContentClass+'"><a'+(o?' href="'+tt(o)+'"':"")+">"+tt(t.event.title||"")+"</a></td></tr>"}});return Ut.list={class:Ge,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}},Ut.listDay={type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}},Ut.listWeek={type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}},Ut.listMonth={type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}},Ut.listYear={type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}},jt});
\ No newline at end of file
index 43607199da3b0e2441d69f4e02c778fe4bc4ef1a..bfa910b3cb285f109d3457926d2910030cd37e49 100644 (file)
@@ -1,7 +1,7 @@
 /*!
- * FullCalendar v1.6.4 Print Stylesheet
- * Docs & License: http://arshaw.com/fullcalendar/
- * (c) 2013 Adam Shaw
+ * FullCalendar v3.0.1 Print Stylesheet
+ * Docs & License: http://fullcalendar.io/
+ * (c) 2016 Adam Shaw
  */
 
 /*
  * When including this stylesheet, use the media='print' attribute of the <link> tag.
  * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
  */
- /* Events
------------------------------------------------------*/
+
+.fc {
+       max-width: 100% !important;
+}
+
+
+/* Global Event Restyling
+--------------------------------------------------------------------------------------------------*/
+
 .fc-event {
        background: #fff !important;
        color: #000 !important;
-       }
-       
-/* for vertical events */
-       
-.fc-event-bg {
-       display: none !important;
-       }
-       
-.fc-event .ui-resizable-handle {
+       page-break-inside: avoid;
+}
+
+.fc-event .fc-resizer {
+       display: none;
+}
+
+
+/* Table & Day-Row Restyling
+--------------------------------------------------------------------------------------------------*/
+
+.fc th,
+.fc td,
+.fc hr,
+.fc thead,
+.fc tbody,
+.fc-row {
+       border-color: #ccc !important;
+       background: #fff !important;
+}
+
+/* kill the overlaid, absolutely-positioned components */
+/* common... */
+.fc-bg,
+.fc-bgevent-skeleton,
+.fc-highlight-skeleton,
+.fc-helper-skeleton,
+/* for timegrid. within cells within table skeletons... */
+.fc-bgevent-container,
+.fc-business-container,
+.fc-highlight-container,
+.fc-helper-container {
+       display: none;
+}
+
+/* don't force a min-height on rows (for DayGrid) */
+.fc tbody .fc-row {
+       height: auto !important; /* undo height that JS set in distributeHeight */
+       min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */
+}
+
+.fc tbody .fc-row .fc-content-skeleton {
+       position: static; /* undo .fc-rigid */
+       padding-bottom: 0 !important; /* use a more border-friendly method for this... */
+}
+
+.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */
+       padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */
+}
+
+.fc tbody .fc-row .fc-content-skeleton table {
+       /* provides a min-height for the row, but only effective for IE, which exaggerates this value,
+          making it look more like 3em. for other browers, it will already be this tall */
+       height: 1em;
+}
+
+
+/* Undo month-view event limiting. Display all events and hide the "more" links
+--------------------------------------------------------------------------------------------------*/
+
+.fc-more-cell,
+.fc-more {
        display: none !important;
-       }
-       
-       
+}
+
+.fc tr.fc-limited {
+       display: table-row !important;
+}
+
+.fc td.fc-limited {
+       display: table-cell !important;
+}
+
+.fc-popover {
+       display: none; /* never display the "more.." popover in print mode */
+}
+
+
+/* TimeGrid Restyling
+--------------------------------------------------------------------------------------------------*/
+
+/* undo the min-height 100% trick used to fill the container's height */
+.fc-time-grid {
+       min-height: 0 !important;
+}
+
+/* don't display the side axis at all ("all-day" and time cells) */
+.fc-agenda-view .fc-axis {
+       display: none;
+}
+
+/* don't display the horizontal lines */
+.fc-slats,
+.fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */
+       display: none !important; /* important overrides inline declaration */
+}
+
+/* let the container that holds the events be naturally positioned and create real height */
+.fc-time-grid .fc-content-skeleton {
+       position: static;
+}
+
+/* in case there are no events, we still want some height */
+.fc-time-grid .fc-content-skeleton table {
+       height: 4em;
+}
+
+/* kill the horizontal spacing made by the event container. event margins will be done below */
+.fc-time-grid .fc-event-container {
+       margin: 0 !important;
+}
+
+
+/* TimeGrid *Event* Restyling
+--------------------------------------------------------------------------------------------------*/
+
+/* naturally position events, vertically stacking them */
+.fc-time-grid .fc-event {
+       position: static !important;
+       margin: 3px 2px !important;
+}
+
+/* for events that continue to a future day, give the bottom border back */
+.fc-time-grid .fc-event.fc-not-end {
+       border-bottom-width: 1px !important;
+}
+
+/* indicate the event continues via "..." text */
+.fc-time-grid .fc-event.fc-not-end:after {
+       content: "...";
+}
+
+/* for events that are continuations from previous days, give the top border back */
+.fc-time-grid .fc-event.fc-not-start {
+       border-top-width: 1px !important;
+}
+
+/* indicate the event is a continuation via "..." text */
+.fc-time-grid .fc-event.fc-not-start:before {
+       content: "...";
+}
+
+/* time */
+
+/* undo a previous declaration and let the time text span to a second line */
+.fc-time-grid .fc-event .fc-time {
+       white-space: normal !important;
+}
+
+/* hide the the time that is normally displayed... */
+.fc-time-grid .fc-event .fc-time span {
+       display: none;
+}
+
+/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
+.fc-time-grid .fc-event .fc-time:after {
+       content: attr(data-full);
+}
+
+
+/* Vertical Scroller & Containers
+--------------------------------------------------------------------------------------------------*/
+
+/* kill the scrollbars and allow natural height */
+.fc-scroller,
+.fc-day-grid-container,    /* these divs might be assigned height, which we need to cleared */
+.fc-time-grid-container {  /* */
+       overflow: visible !important;
+       height: auto !important;
+}
+
+/* kill the horizontal border/padding used to compensate for scrollbars */
+.fc-row {
+       border: 0 !important;
+       margin: 0 !important;
+}
+
+
+/* Button Controls
+--------------------------------------------------------------------------------------------------*/
+
+.fc-button-group,
+.fc button {
+       display: none; /* don't display any button-related controls */
+}
index 1644227628181efc176b060b46c868098666e44c..dfe6fa90591716093d20be9d252ef4fc0bd0e7b4 100644 (file)
 /*!
- * FullCalendar v1.6.4 Google Calendar Plugin
- * Docs & License: http://arshaw.com/fullcalendar/
- * (c) 2013 Adam Shaw
+ * FullCalendar v3.0.1 Google Calendar Plugin
+ * Docs & License: http://fullcalendar.io/
+ * (c) 2016 Adam Shaw
  */
  
-(function($) {
+(function(factory) {
+       if (typeof define === 'function' && define.amd) {
+               define([ 'jquery' ], factory);
+       }
+       else if (typeof exports === 'object') { // Node/CommonJS
+               module.exports = factory(require('jquery'));
+       }
+       else {
+               factory(jQuery);
+       }
+})(function($) {
 
 
-var fc = $.fullCalendar;
-var formatDate = fc.formatDate;
-var parseISO8601 = fc.parseISO8601;
-var addDays = fc.addDays;
-var applyAll = fc.applyAll;
+var API_BASE = 'https://www.googleapis.com/calendar/v3/calendars';
+var FC = $.fullCalendar;
+var applyAll = FC.applyAll;
 
 
-fc.sourceNormalizers.push(function(sourceOptions) {
-       if (sourceOptions.dataType == 'gcal' ||
-               sourceOptions.dataType === undefined &&
-               (sourceOptions.url || '').match(/^(http|https):\/\/www.google.com\/calendar\/feeds\//)) {
-                       sourceOptions.dataType = 'gcal';
-                       if (sourceOptions.editable === undefined) {
-                               sourceOptions.editable = false;
-                       }
+FC.sourceNormalizers.push(function(sourceOptions) {
+       var googleCalendarId = sourceOptions.googleCalendarId;
+       var url = sourceOptions.url;
+       var match;
+
+       // if the Google Calendar ID hasn't been explicitly defined
+       if (!googleCalendarId && url) {
+
+               // detect if the ID was specified as a single string.
+               // will match calendars like "asdf1234@calendar.google.com" in addition to person email calendars.
+               if (/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(url)) {
+                       googleCalendarId = url;
                }
-});
+               // try to scrape it out of a V1 or V3 API feed URL
+               else if (
+                       (match = /^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(url)) ||
+                       (match = /^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(url))
+               ) {
+                       googleCalendarId = decodeURIComponent(match[1]);
+               }
+
+               if (googleCalendarId) {
+                       sourceOptions.googleCalendarId = googleCalendarId;
+               }
+       }
 
 
-fc.sourceFetchers.push(function(sourceOptions, start, end) {
-       if (sourceOptions.dataType == 'gcal') {
-               return transformOptions(sourceOptions, start, end);
+       if (googleCalendarId) { // is this a Google Calendar?
+
+               // make each Google Calendar source uneditable by default
+               if (sourceOptions.editable == null) {
+                       sourceOptions.editable = false;
+               }
+
+               // We want removeEventSource to work, but it won't know about the googleCalendarId primitive.
+               // Shoehorn it into the url, which will function as the unique primitive. Won't cause side effects.
+               // This hack is obsolete since 2.2.3, but keep it so this plugin file is compatible with old versions.
+               sourceOptions.url = googleCalendarId;
        }
 });
 
 
-function transformOptions(sourceOptions, start, end) {
+FC.sourceFetchers.push(function(sourceOptions, start, end, timezone) {
+       if (sourceOptions.googleCalendarId) {
+               return transformOptions(sourceOptions, start, end, timezone, this); // `this` is the calendar
+       }
+});
+
 
+function transformOptions(sourceOptions, start, end, timezone, calendar) {
+       var url = API_BASE + '/' + encodeURIComponent(sourceOptions.googleCalendarId) + '/events?callback=?'; // jsonp
+       var apiKey = sourceOptions.googleCalendarApiKey || calendar.options.googleCalendarApiKey;
        var success = sourceOptions.success;
-       var data = $.extend({}, sourceOptions.data || {}, {
-               'start-min': formatDate(start, 'u'),
-               'start-max': formatDate(end, 'u'),
-               'singleevents': true,
-               'max-results': 9999
-       });
-       
-       var ctz = sourceOptions.currentTimezone;
-       if (ctz) {
-               data.ctz = ctz = ctz.replace(' ', '_');
+       var data;
+       var timezoneArg; // populated when a specific timezone. escaped to Google's liking
+
+       function reportError(message, apiErrorObjs) {
+               var errorObjs = apiErrorObjs || [ { message: message } ]; // to be passed into error handlers
+
+               // call error handlers
+               (sourceOptions.googleCalendarError || $.noop).apply(calendar, errorObjs);
+               (calendar.options.googleCalendarError || $.noop).apply(calendar, errorObjs);
+
+               // print error to debug console
+               FC.warn.apply(null, [ message ].concat(apiErrorObjs || []));
        }
 
+       if (!apiKey) {
+               reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/");
+               return {}; // an empty source to use instead. won't fetch anything.
+       }
+
+       // The API expects an ISO8601 datetime with a time and timezone part.
+       // Since the calendar's timezone offset isn't always known, request the date in UTC and pad it by a day on each
+       // side, guaranteeing we will receive all events in the desired range, albeit a superset.
+       // .utc() will set a zone and give it a 00:00:00 time.
+       if (!start.hasZone()) {
+               start = start.clone().utc().add(-1, 'day');
+       }
+       if (!end.hasZone()) {
+               end = end.clone().utc().add(1, 'day');
+       }
+
+       // when sending timezone names to Google, only accepts underscores, not spaces
+       if (timezone && timezone != 'local') {
+               timezoneArg = timezone.replace(' ', '_');
+       }
+
+       data = $.extend({}, sourceOptions.data || {}, {
+               key: apiKey,
+               timeMin: start.format(),
+               timeMax: end.format(),
+               timeZone: timezoneArg,
+               singleEvents: true,
+               maxResults: 9999
+       });
+
        return $.extend({}, sourceOptions, {
-               url: sourceOptions.url.replace(/\/basic$/, '/full') + '?alt=json-in-script&callback=?',
-               dataType: 'jsonp',
+               googleCalendarId: null, // prevents source-normalizing from happening again
+               url: url,
                data: data,
-               startParam: false,
-               endParam: false,
+               startParam: false, // `false` omits this parameter. we already included it above
+               endParam: false, // same
+               timezoneParam: false, // same
                success: function(data) {
                        var events = [];
-                       if (data.feed.entry) {
-                               $.each(data.feed.entry, function(i, entry) {
-                                       var startStr = entry['gd$when'][0]['startTime'];
-                                       var start = parseISO8601(startStr, true);
-                                       var end = parseISO8601(entry['gd$when'][0]['endTime'], true);
-                                       var allDay = startStr.indexOf('T') == -1;
-                                       var url;
-                                       $.each(entry.link, function(i, link) {
-                                               if (link.type == 'text/html') {
-                                                       url = link.href;
-                                                       if (ctz) {
-                                                               url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz;
-                                                       }
-                                               }
-                                       });
-                                       if (allDay) {
-                                               addDays(end, -1); // make inclusive
+                       var successArgs;
+                       var successRes;
+
+                       if (data.error) {
+                               reportError('Google Calendar API: ' + data.error.message, data.error.errors);
+                       }
+                       else if (data.items) {
+                               $.each(data.items, function(i, entry) {
+                                       var url = entry.htmlLink || null;
+
+                                       // make the URLs for each event show times in the correct timezone
+                                       if (timezoneArg && url !== null) {
+                                               url = injectQsComponent(url, 'ctz=' + timezoneArg);
                                        }
+
                                        events.push({
-                                               id: entry['gCal$uid']['value'],
-                                               title: entry['title']['$t'],
+                                               id: entry.id,
+                                               title: entry.summary,
+                                               start: entry.start.dateTime || entry.start.date, // try timed. will fall back to all-day
+                                               end: entry.end.dateTime || entry.end.date, // same
                                                url: url,
-                                               start: start,
-                                               end: end,
-                                               allDay: allDay,
-                                               location: entry['gd$where'][0]['valueString'],
-                                               description: entry['content']['$t']
+                                               location: entry.location,
+                                               description: entry.description
                                        });
                                });
+
+                               // call the success handler(s) and allow it to return a new events array
+                               successArgs = [ events ].concat(Array.prototype.slice.call(arguments, 1)); // forward other jq args
+                               successRes = applyAll(success, this, successArgs);
+                               if ($.isArray(successRes)) {
+                                       return successRes;
+                               }
                        }
-                       var args = [events].concat(Array.prototype.slice.call(arguments, 1));
-                       var res = applyAll(success, this, args);
-                       if ($.isArray(res)) {
-                               return res;
-                       }
+
                        return events;
                }
        });
-       
 }
 
 
-// legacy
-fc.gcalFeed = function(url, sourceOptions) {
-       return $.extend({}, sourceOptions, { url: url, dataType: 'gcal' });
-};
+// Injects a string like "arg=value" into the querystring of a URL
+function injectQsComponent(url, component) {
+       // inject it after the querystring but before the fragment
+       return url.replace(/(\?.*?)?(#|$)/, function(whole, qs, hash) {
+               return (qs ? qs + '&' : '?') + component + hash;
+       });
+}
 
 
-})(jQuery);
+});
diff --git a/library/fullcalendar/license.txt b/library/fullcalendar/license.txt
deleted file mode 100644 (file)
index dd7b48e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2013 Adam Shaw
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/library/fullcalendar/locale-all.js b/library/fullcalendar/locale-all.js
new file mode 100644 (file)
index 0000000..8332f58
--- /dev/null
@@ -0,0 +1,5 @@
+!function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(e,a){!function(){!function(){var e={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},t={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},s=function(e){return function(a,t,s,d){var i=n(a),o=r[e][n(a)];return 2===i&&(o=o[t?0:1]),o.replace(/%d/i,a)}},d=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"],i=a.defineLocale("ar",{months:d,monthsShort:d,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,a,t){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/\u200f/g,"").replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return t[e]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return e[a]}).replace(/,/g,"،")},week:{dow:6,doy:12}});return i}(),e.fullCalendar.datepickerLocale("ar","ar",{closeText:"إغلاق",prevText:"&#x3C;السابق",nextText:"التالي&#x3E;",currentText:"اليوم",monthNames:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ar",{buttonText:{month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"})}(),function(){!function(){var e=a.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}});return e}(),e.fullCalendar.datepickerLocale("ar-ma","ar",{closeText:"إغلاق",prevText:"&#x3C;السابق",nextText:"التالي&#x3E;",currentText:"اليوم",monthNames:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ar-ma",{buttonText:{month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"})}(),function(){!function(){var e={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},t={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=a.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,a,t){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return t[e]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return e[a]}).replace(/,/g,"،")},week:{dow:6,doy:12}});return n}(),e.fullCalendar.datepickerLocale("ar-sa","ar",{closeText:"إغلاق",prevText:"&#x3C;السابق",nextText:"التالي&#x3E;",currentText:"اليوم",monthNames:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ar-sa",{buttonText:{month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"})}(),function(){!function(){var e=a.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("ar-tn","ar",{closeText:"إغلاق",prevText:"&#x3C;السابق",nextText:"التالي&#x3E;",currentText:"اليوم",monthNames:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ar-tn",{buttonText:{month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"})}(),function(){!function(){var e=a.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-ев":0===t?e+"-ен":t>10&&t<20?e+"-ти":1===a?e+"-ви":2===a?e+"-ри":7===a||8===a?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return e}(),e.fullCalendar.datepickerLocale("bg","bg",{closeText:"затвори",prevText:"&#x3C;назад",nextText:"напред&#x3E;",nextBigText:"&#x3E;&#x3E;",currentText:"днес",monthNames:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthNamesShort:["Яну","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Нов","Дек"],dayNames:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"],dayNamesShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб"],dayNamesMin:["Не","По","Вт","Ср","Че","Пе","Съ"],weekHeader:"Wk",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("bg",{buttonText:{month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",eventLimitText:function(e){return"+още "+e},noEventsMessage:"Няма събития за показване"})}(),function(){!function(){var e=a.defineLocale("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,a){var t=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==a&&"W"!==a||(t="a"),e+t},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("ca","ca",{closeText:"Tanca",prevText:"Anterior",nextText:"Següent",currentText:"Avui",monthNames:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],monthNamesShort:["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des"],dayNames:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],dayNamesShort:["dg","dl","dt","dc","dj","dv","ds"],dayNamesMin:["dg","dl","dt","dc","dj","dv","ds"],weekHeader:"Set",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ca",{buttonText:{month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},allDayText:"Tot el dia",eventLimitText:"més",noEventsMessage:"No hi ha esdeveniments per mostrar"})}(),function(){!function(){function e(e){return e>1&&e<5&&1!==~~(e/10)}function t(a,t,n,r){var s=a+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?s+(e(a)?"minuty":"minut"):s+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?s+(e(a)?"hodiny":"hodin"):s+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?s+(e(a)?"dny":"dní"):s+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?s+(e(a)?"měsíce":"měsíců"):s+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?s+(e(a)?"roky":"let"):s+"lety"}}var n="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),r="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),s=a.defineLocale("cs",{months:n,monthsShort:r,monthsParse:function(e,a){var t,n=[];for(t=0;t<12;t++)n[t]=new RegExp("^"+e[t]+"$|^"+a[t]+"$","i");return n}(n,r),shortMonthsParse:function(e){var a,t=[];for(a=0;a<12;a++)t[a]=new RegExp("^"+e[a]+"$","i");return t}(r),longMonthsParse:function(e){var a,t=[];for(a=0;a<12;a++)t[a]=new RegExp("^"+e[a]+"$","i");return t}(n),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}(),e.fullCalendar.datepickerLocale("cs","cs",{closeText:"Zavřít",prevText:"&#x3C;Dříve",nextText:"Později&#x3E;",currentText:"Nyní",monthNames:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],monthNamesShort:["led","úno","bře","dub","kvě","čer","čvc","srp","zář","říj","lis","pro"],dayNames:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],dayNamesShort:["ne","po","út","st","čt","pá","so"],dayNamesMin:["ne","po","út","st","čt","pá","so"],weekHeader:"Týd",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("cs",{buttonText:{month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},allDayText:"Celý den",eventLimitText:function(e){return"+další: "+e},noEventsMessage:"Žádné akce k zobrazení"})}(),function(){!function(){var e=a.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY HH:mm"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("da","da",{closeText:"Luk",prevText:"&#x3C;Forrige",nextText:"Næste&#x3E;",currentText:"Idag",monthNames:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNames:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],dayNamesShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayNamesMin:["Sø","Ma","Ti","On","To","Fr","Lø"],weekHeader:"Uge",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("da",{buttonText:{month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},allDayText:"Hele dagen",eventLimitText:"flere",noEventsMessage:"Ingen arrangementer at vise"})}(),function(){!function(){function e(e,a,t,n){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?r[t][0]:r[t][1]}var t=a.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}(),e.fullCalendar.datepickerLocale("de","de",{closeText:"Schließen",prevText:"&#x3C;Zurück",nextText:"Vor&#x3E;",currentText:"Heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("de",{buttonText:{month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},allDayText:"Ganztägig",eventLimitText:function(e){return"+ weitere "+e},noEventsMessage:"Keine Ereignisse anzuzeigen"})}(),function(){!function(){function e(e,a,t,n){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?r[t][0]:r[t][1]}var t=a.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}(),e.fullCalendar.datepickerLocale("de-at","de",{closeText:"Schließen",prevText:"&#x3C;Zurück",nextText:"Vor&#x3E;",currentText:"Heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("de-at",{buttonText:{month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},allDayText:"Ganztägig",eventLimitText:function(e){return"+ weitere "+e},noEventsMessage:"Keine Ereignisse anzuzeigen"})}(),function(){!function(){function e(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}var t=a.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,a){return/D/.test(a.substring(0,a.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,a,t){return e>11?t?"μμ":"ΜΜ":t?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(a,t){var n=this._calendarEl[a],r=t&&t.hours();return e(n)&&(n=n.apply(t)),n.replace("{}",r%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},ordinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}});return t}(),e.fullCalendar.datepickerLocale("el","el",{closeText:"Κλείσιμο",prevText:"Προηγούμενος",nextText:"Επόμενος",currentText:"Σήμερα",monthNames:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],monthNamesShort:["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],dayNames:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],dayNamesShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayNamesMin:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],weekHeader:"Εβδ",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("el",{buttonText:{month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},allDayText:"Ολοήμερο",eventLimitText:"περισσότερα",noEventsMessage:"Δεν υπάρχουν γεγονότα για να εμφανιστεί"})}(),function(){!function(){var e=a.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10,t=1===~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th";return e+t},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("en-au","en-AU",{closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("en-au")}(),function(){!function(){var e=a.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10,t=1===~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th";return e+t}});return e}(),e.fullCalendar.locale("en-ca")}(),function(){!function(){var e=a.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10,t=1===~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th";return e+t},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("en-gb","en-GB",{closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("en-gb")}(),function(){!function(){var e=a.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10,t=1===~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th";return e+t},week:{dow:1,doy:4}});return e}(),e.fullCalendar.locale("en-ie")}(),function(){!function(){var e=a.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10,t=1===~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th";return e+t},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("en-nz","en-NZ",{closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("en-nz")}(),function(){!function(){var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),t="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=a.defineLocale("es",{
+months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(a,n){return/-MMM-/.test(n)?t[a.month()]:e[a.month()]},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return n}(),e.fullCalendar.datepickerLocale("es","es",{closeText:"Cerrar",prevText:"&#x3C;Ant",nextText:"Sig&#x3E;",currentText:"Hoy",monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthNamesShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],dayNamesShort:["dom","lun","mar","mié","jue","vie","sáb"],dayNamesMin:["D","L","M","X","J","V","S"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("es",{buttonText:{month:"Mes",week:"Semana",day:"Día",list:"Agenda"},allDayHtml:"Todo<br/>el día",eventLimitText:"más",noEventsMessage:"No hay eventos para mostrar"})}(),function(){!function(){var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),t="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=a.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(a,n){return/-MMM-/.test(n)?t[a.month()]:e[a.month()]},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return n}(),e.fullCalendar.datepickerLocale("es-do","es",{closeText:"Cerrar",prevText:"&#x3C;Ant",nextText:"Sig&#x3E;",currentText:"Hoy",monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthNamesShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],dayNamesShort:["dom","lun","mar","mié","jue","vie","sáb"],dayNamesMin:["D","L","M","X","J","V","S"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("es-do",{buttonText:{month:"Mes",week:"Semana",day:"Día",list:"Agenda"},allDayHtml:"Todo<br/>el día",eventLimitText:"más",noEventsMessage:"No hay eventos para mostrar"})}(),function(){!function(){var e=a.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return e}(),e.fullCalendar.datepickerLocale("eu","eu",{closeText:"Egina",prevText:"&#x3C;Aur",nextText:"Hur&#x3E;",currentText:"Gaur",monthNames:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua"],monthNamesShort:["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe."],dayNames:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],dayNamesShort:["ig.","al.","ar.","az.","og.","ol.","lr."],dayNamesMin:["ig","al","ar","az","og","ol","lr"],weekHeader:"As",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("eu",{buttonText:{month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},allDayHtml:"Egun<br/>osoa",eventLimitText:"gehiago",noEventsMessage:"Ez dago ekitaldirik erakusteko"})}(),function(){!function(){var e={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},t={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},n=a.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,a,t){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return t[e]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return e[a]}).replace(/,/g,"،")},ordinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});return n}(),e.fullCalendar.datepickerLocale("fa","fa",{closeText:"بستن",prevText:"&#x3C;قبلی",nextText:"بعدی&#x3E;",currentText:"امروز",monthNames:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["يکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayNamesShort:["ی","د","س","چ","پ","ج","ش"],dayNamesMin:["ی","د","س","چ","پ","ج","ش"],weekHeader:"هف",dateFormat:"yy/mm/dd",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("fa",{buttonText:{month:"ماه",week:"هفته",day:"روز",list:"برنامه"},allDayText:"تمام روز",eventLimitText:function(e){return"بیش از "+e},noEventsMessage:"هیچ رویدادی به نمایش"})}(),function(){!function(){function e(e,a,n,r){var s="";switch(n){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"m":return r?"minuutin":"minuutti";case"mm":s=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":s=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":s=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":s=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":s=r?"vuoden":"vuotta"}return s=t(e,r)+" "+s}function t(e,a){return e<10?a?r[e]:n[e]:e}var n="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),r=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",n[7],n[8],n[9]],s=a.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}(),e.fullCalendar.datepickerLocale("fi","fi",{closeText:"Sulje",prevText:"&#xAB;Edellinen",nextText:"Seuraava&#xBB;",currentText:"Tänään",monthNames:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthNamesShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],dayNamesShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayNames:["Sunnuntai","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai"],dayNamesMin:["Su","Ma","Ti","Ke","To","Pe","La"],weekHeader:"Vk",dateFormat:"d.m.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("fi",{buttonText:{month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},allDayText:"Koko päivä",eventLimitText:"lisää",noEventsMessage:"Ei tapahtumia näytettäviä"})}(),function(){!function(){var e=a.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|)/,ordinal:function(e){return e+(1===e?"er":"")},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("fr","fr",{closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("fr",{buttonText:{year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},allDayHtml:"Toute la<br/>journée",eventLimitText:"en plus",noEventsMessage:"Aucun événement à afficher"})}(),function(){!function(){var e=a.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(e){return e+(1===e?"er":"e")}});return e}(),e.fullCalendar.datepickerLocale("fr-ca","fr-CA",{closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"yy-mm-dd",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("fr-ca",{buttonText:{year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},allDayHtml:"Toute la<br/>journée",eventLimitText:"en plus",noEventsMessage:"Aucun événement à afficher"})}(),function(){!function(){var e=a.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(e){return e+(1===e?"er":"e")},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("fr-ch","fr-CH",{closeText:"Fermer",prevText:"&#x3C;Préc",nextText:"Suiv&#x3E;",currentText:"Courant",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sm",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("fr-ch",{buttonText:{year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},allDayHtml:"Toute la<br/>journée",eventLimitText:"en plus",noEventsMessage:"Aucun événement à afficher"})}(),function(){!function(){var e=a.defineLocale("gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),monthsParseExact:!0,weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return"uns segundos"===e?"nuns segundos":"en "+e},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:7}});return e}(),e.fullCalendar.datepickerLocale("gl","gl",{closeText:"Pechar",prevText:"&#x3C;Ant",nextText:"Seg&#x3E;",currentText:"Hoxe",monthNames:["Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro"],monthNamesShort:["Xan","Feb","Mar","Abr","Mai","Xuñ","Xul","Ago","Set","Out","Nov","Dec"],dayNames:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mér","Xov","Ven","Sáb"],dayNamesMin:["Do","Lu","Ma","Mé","Xo","Ve","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("gl",{buttonText:{month:"Mes",week:"Semana",day:"Día",list:"Axenda"},allDayHtml:"Todo<br/>o día",eventLimitText:"máis",noEventsMessage:"Non hai eventos para amosar"})}(),function(){!function(){var e=a.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10===0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,a,t){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?t?'לפנה"צ':"לפני הצהריים":e<18?t?'אחה"צ':"אחרי הצהריים":"בערב"}});return e}(),e.fullCalendar.datepickerLocale("he","he",{closeText:"סגור",prevText:"&#x3C;הקודם",nextText:"הבא&#x3E;",currentText:"היום",monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],monthNamesShort:["ינו","פבר","מרץ","אפר","מאי","יוני","יולי","אוג","ספט","אוק","נוב","דצמ"],dayNames:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],dayNamesShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayNamesMin:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("he",{buttonText:{month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",eventLimitText:"אחר",noEventsMessage:"אין אירועים להצגה",weekNumberTitle:"שבוע"})}(),function(){!function(){var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},t={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},n=a.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return t[e]})},postformat:function(a){return a.replace(/\d/g,function(a){return e[a]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,a){return 12===e&&(e=0),"रात"===a?e<4?e:e+12:"सुबह"===a?e:"दोपहर"===a?e>=10?e:e+12:"शाम"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}});return n}(),e.fullCalendar.datepickerLocale("hi","hi",{closeText:"बंद",prevText:"पिछला",nextText:"अगला",currentText:"आज",monthNames:["जनवरी ","फरवरी","मार्च","अप्रेल","मई","जून","जूलाई","अगस्त ","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"],monthNamesShort:["जन","फर","मार्च","अप्रेल","मई","जून","जूलाई","अग","सित","अक्ट","नव","दि"],dayNames:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],dayNamesShort:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],dayNamesMin:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],weekHeader:"हफ्ता",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("hi",{buttonText:{month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},allDayText:"सभी दिन",eventLimitText:function(e){return"+अधिक "+e},noEventsMessage:"कोई घटनाओं को प्रदर्शित करने के लिए"})}(),function(){!function(){function e(e,a,t){var n=e+" ";switch(t){case"m":return a?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}var t=a.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:e,mm:e,h:e,hh:e,d:"dan",dd:e,M:"mjesec",MM:e,y:"godinu",yy:e},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t}(),e.fullCalendar.datepickerLocale("hr","hr",{closeText:"Zatvori",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Danas",monthNames:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],monthNamesShort:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],dayNames:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],dayNamesShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayNamesMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],weekHeader:"Tje",dateFormat:"dd.mm.yy.",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("hr",{buttonText:{month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},allDayText:"Cijeli dan",eventLimitText:function(e){return"+ još "+e},noEventsMessage:"Nema događaja za prikaz"})}(),function(){!function(){function e(e,a,t,n){var r=e;switch(t){case"s":return n||a?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(n||a?" perc":" perce");case"mm":return r+(n||a?" perc":" perce");case"h":return"egy"+(n||a?" óra":" órája");case"hh":return r+(n||a?" óra":" órája");case"d":return"egy"+(n||a?" nap":" napja");case"dd":return r+(n||a?" nap":" napja");case"M":return"egy"+(n||a?" hónap":" hónapja");case"MM":return r+(n||a?" hónap":" hónapja");case"y":return"egy"+(n||a?" év":" éve");case"yy":return r+(n||a?" év":" éve")}return""}function t(e){return(e?"":"[múlt] ")+"["+n[this.day()]+"] LT[-kor]"}var n="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" "),r=a.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,a,t){return e<12?t===!0?"de":"DE":t===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return t.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return t.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return r}(),e.fullCalendar.datepickerLocale("hu","hu",{closeText:"bezár",prevText:"vissza",nextText:"előre",currentText:"ma",monthNames:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],monthNamesShort:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],dayNames:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"],dayNamesShort:["Vas","Hét","Ked","Sze","Csü","Pén","Szo"],dayNamesMin:["V","H","K","Sze","Cs","P","Szo"],weekHeader:"Hét",dateFormat:"yy.mm.dd.",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:""}),e.fullCalendar.locale("hu",{buttonText:{month:"Hónap",week:"Hét",day:"Nap",list:"Napló"},allDayText:"Egész nap",eventLimitText:"további",noEventsMessage:"Nincs megjeleníthető események"})}(),function(){!function(){var e=a.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"siang"===a?e>=11?e:e+12:"sore"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return e}(),e.fullCalendar.datepickerLocale("id","id",{closeText:"Tutup",prevText:"&#x3C;mundur",nextText:"maju&#x3E;",currentText:"hari ini",monthNames:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agus","Sep","Okt","Nop","Des"],dayNames:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],dayNamesShort:["Min","Sen","Sel","Rab","kam","Jum","Sab"],dayNamesMin:["Mg","Sn","Sl","Rb","Km","jm","Sb"],weekHeader:"Mg",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("id",{buttonText:{month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},allDayHtml:"Sehari<br/>penuh",eventLimitText:"lebih",noEventsMessage:"Tidak ada acara untuk ditampilkan"})}(),function(){!function(){function e(e){return e%100===11||e%10!==1}function t(a,t,n,r){var s=a+" ";switch(n){case"s":return t||r?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return t?"mínúta":"mínútu";case"mm":return e(a)?s+(t||r?"mínútur":"mínútum"):t?s+"mínúta":s+"mínútu";case"hh":return e(a)?s+(t||r?"klukkustundir":"klukkustundum"):s+"klukkustund";case"d":return t?"dagur":r?"dag":"degi";case"dd":return e(a)?t?s+"dagar":s+(r?"daga":"dögum"):t?s+"dagur":s+(r?"dag":"degi");case"M":return t?"mánuður":r?"mánuð":"mánuði";case"MM":return e(a)?t?s+"mánuðir":s+(r?"mánuði":"mánuðum"):t?s+"mánuður":s+(r?"mánuð":"mánuði");case"y":return t||r?"ár":"ári";case"yy":return e(a)?s+(t||r?"ár":"árum"):s+(t||r?"ár":"ári")}}var n=a.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{
+sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:t,m:t,mm:t,h:"klukkustund",hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}(),e.fullCalendar.datepickerLocale("is","is",{closeText:"Loka",prevText:"&#x3C; Fyrri",nextText:"Næsti &#x3E;",currentText:"Í dag",monthNames:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],dayNames:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"],dayNamesShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],dayNamesMin:["Su","Má","Þr","Mi","Fi","Fö","La"],weekHeader:"Vika",dateFormat:"dd.mm.yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("is",{buttonText:{month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},allDayHtml:"Allan<br/>daginn",eventLimitText:"meira",noEventsMessage:"Engir viðburðir til að sýna"})}(),function(){!function(){var e=a.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"Do_Lu_Ma_Me_Gi_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("it","it",{closeText:"Chiudi",prevText:"&#x3C;Prec",nextText:"Succ&#x3E;",currentText:"Oggi",monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthNamesShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],dayNames:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],dayNamesShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayNamesMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("it",{buttonText:{month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},allDayHtml:"Tutto il<br/>giorno",eventLimitText:function(e){return"+altri "+e},noEventsMessage:"Non ci sono eventi da visualizzare"})}(),function(){!function(){var e=a.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",LTS:"Ah時m分s秒",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah時m分",LLLL:"YYYY年M月D日Ah時m分 dddd"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,a,t){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},ordinalParse:/\d{1,2}日/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return e}(),e.fullCalendar.datepickerLocale("ja","ja",{closeText:"閉じる",prevText:"&#x3C;前",nextText:"次&#x3E;",currentText:"今日",monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthNamesShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayNames:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],dayNamesShort:["日","月","火","水","木","金","土"],dayNamesMin:["日","月","火","水","木","金","土"],weekHeader:"週",dateFormat:"yy/mm/dd",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"}),e.fullCalendar.locale("ja",{buttonText:{month:"月",week:"週",day:"日",list:"予定リスト"},allDayText:"終日",eventLimitText:function(e){return"他 "+e+" 件"},noEventsMessage:"イベントが表示されないように"})}(),function(){!function(){var e=a.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",LTS:"A h시 m분 s초",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h시 m분",LLLL:"YYYY년 MMMM D일 dddd A h시 m분"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"일분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},ordinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,a,t){return e<12?"오전":"오후"}});return e}(),e.fullCalendar.datepickerLocale("ko","ko",{closeText:"닫기",prevText:"이전달",nextText:"다음달",currentText:"오늘",monthNames:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthNamesShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayNames:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],dayNamesShort:["일","월","화","수","목","금","토"],dayNamesMin:["일","월","화","수","목","금","토"],weekHeader:"주",dateFormat:"yy. m. d.",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"년"}),e.fullCalendar.locale("ko",{buttonText:{month:"월",week:"주",day:"일",list:"일정목록"},allDayText:"종일",eventLimitText:"개",noEventsMessage:"일정이 표시 없습니다"})}(),function(){!function(){function e(e,a,t,n){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return a?r[t][0]:r[t][1]}function t(e){var a=e.substr(0,e.indexOf(" "));return r(a)?"a "+e:"an "+e}function n(e){var a=e.substr(0,e.indexOf(" "));return r(a)?"viru "+e:"virun "+e}function r(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var a=e%10,t=e/10;return r(0===a?t:a)}if(e<1e4){for(;e>=10;)e/=10;return r(e)}return e/=1e3,r(e)}var s=a.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:t,past:n,s:"e puer Sekonnen",m:e,mm:"%d Minutten",h:e,hh:"%d Stonnen",d:e,dd:"%d Deeg",M:e,MM:"%d Méint",y:e,yy:"%d Joer"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}(),e.fullCalendar.datepickerLocale("lb","lb",{closeText:"Fäerdeg",prevText:"Zréck",nextText:"Weider",currentText:"Haut",monthNames:["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"],dayNamesShort:["Son","Méi","Dën","Mët","Don","Fre","Sam"],dayNamesMin:["So","Mé","Dë","Më","Do","Fr","Sa"],weekHeader:"W",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("lb",{buttonText:{month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},allDayText:"Ganzen Dag",eventLimitText:"méi",noEventsMessage:"Nee Evenementer ze affichéieren"})}(),function(){!function(){function e(e,a,t,n){return a?"kelios sekundės":n?"kelių sekundžių":"kelias sekundes"}function t(e,a,t,n){return a?r(t)[0]:n?r(t)[1]:r(t)[2]}function n(e){return e%10===0||e>10&&e<20}function r(e){return d[e].split("_")}function s(e,a,s,d){var i=e+" ";return 1===e?i+t(e,a,s[0],d):a?i+(n(e)?r(s)[1]:r(s)[0]):d?i+r(s)[1]:i+(n(e)?r(s)[1]:r(s)[2])}var d={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},i=a.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?|MMMM?(\[[^\[\]]*\]|\s+)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:e,m:t,mm:s,h:t,hh:s,d:t,dd:s,M:t,MM:s,y:t,yy:s},ordinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});return i}(),e.fullCalendar.datepickerLocale("lt","lt",{closeText:"Uždaryti",prevText:"&#x3C;Atgal",nextText:"Pirmyn&#x3E;",currentText:"Šiandien",monthNames:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthNamesShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],dayNames:["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],dayNamesShort:["sek","pir","ant","tre","ket","pen","šeš"],dayNamesMin:["Se","Pr","An","Tr","Ke","Pe","Še"],weekHeader:"SAV",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:""}),e.fullCalendar.locale("lt",{buttonText:{month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},allDayText:"Visą dieną",eventLimitText:"daugiau",noEventsMessage:"Nėra įvykių rodyti"})}(),function(){!function(){function e(e,a,t){return t?a%10===1&&a%100!==11?e[2]:e[3]:a%10===1&&a%100!==11?e[0]:e[1]}function t(a,t,n){return a+" "+e(s[n],a,t)}function n(a,t,n){return e(s[n],a,t)}function r(e,a){return a?"dažas sekundes":"dažām sekundēm"}var s={m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")},d=a.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:r,m:n,mm:t,h:n,hh:t,d:n,dd:t,M:n,MM:t,y:n,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return d}(),e.fullCalendar.datepickerLocale("lv","lv",{closeText:"Aizvērt",prevText:"Iepr.",nextText:"Nāk.",currentText:"Šodien",monthNames:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthNamesShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],dayNames:["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"],dayNamesShort:["svt","prm","otr","tre","ctr","pkt","sst"],dayNamesMin:["Sv","Pr","Ot","Tr","Ct","Pk","Ss"],weekHeader:"Ned.",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("lv",{buttonText:{month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},allDayText:"Visu dienu",eventLimitText:function(e){return"+vēl "+e},noEventsMessage:"Nav notikumu, lai parādītu"})}(),function(){!function(){var e=a.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-ев":0===t?e+"-ен":t>10&&t<20?e+"-ти":1===a?e+"-ви":2===a?e+"-ри":7===a||8===a?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return e}(),e.fullCalendar.datepickerLocale("mk","mk",{closeText:"Затвори",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Денес",monthNames:["Јануари","Февруари","Март","Април","Мај","Јуни","Јули","Август","Септември","Октомври","Ноември","Декември"],monthNamesShort:["Јан","Фев","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Ное","Дек"],dayNames:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"],dayNamesShort:["Нед","Пон","Вто","Сре","Чет","Пет","Саб"],dayNamesMin:["Не","По","Вт","Ср","Че","Пе","Са"],weekHeader:"Сед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("mk",{buttonText:{month:"Месец",week:"Недела",day:"Ден",list:"График"},allDayText:"Цел ден",eventLimitText:function(e){return"+повеќе "+e},noEventsMessage:"Нема настани за прикажување"})}(),function(){!function(){var e=a.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?e>=11?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return e}(),e.fullCalendar.datepickerLocale("ms","ms",{closeText:"Tutup",prevText:"&#x3C;Sebelum",nextText:"Selepas&#x3E;",currentText:"hari ini",monthNames:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthNamesShort:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],dayNames:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],dayNamesShort:["Aha","Isn","Sel","Rab","kha","Jum","Sab"],dayNamesMin:["Ah","Is","Se","Ra","Kh","Ju","Sa"],weekHeader:"Mg",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ms",{buttonText:{month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},allDayText:"Sepanjang hari",eventLimitText:function(e){return"masih ada "+e+" acara"},noEventsMessage:"Tiada peristiwa untuk dipaparkan"})}(),function(){!function(){var e=a.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?e>=11?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return e}(),e.fullCalendar.datepickerLocale("ms-my","ms",{closeText:"Tutup",prevText:"&#x3C;Sebelum",nextText:"Selepas&#x3E;",currentText:"hari ini",monthNames:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthNamesShort:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],dayNames:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],dayNamesShort:["Aha","Isn","Sel","Rab","kha","Jum","Sab"],dayNamesMin:["Ah","Is","Se","Ra","Kh","Ju","Sa"],weekHeader:"Mg",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ms-my",{buttonText:{month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},allDayText:"Sepanjang hari",eventLimitText:function(e){return"masih ada "+e+" acara"},noEventsMessage:"Tiada peristiwa untuk dipaparkan"})}(),function(){!function(){var e=a.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("nb","nb",{closeText:"Lukk",prevText:"&#xAB;Forrige",nextText:"Neste&#xBB;",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["søn","man","tir","ons","tor","fre","lør"],dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],dayNamesMin:["sø","ma","ti","on","to","fr","lø"],weekHeader:"Uke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("nb",{buttonText:{month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},allDayText:"Hele dagen",eventLimitText:"til",noEventsMessage:"Ingen hendelser å vise"})}(),function(){!function(){var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),t="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=a.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(a,n){return/-MMM-/.test(n)?t[a.month()]:e[a.month()]},monthsParseExact:!0,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return n}(),e.fullCalendar.datepickerLocale("nl","nl",{closeText:"Sluiten",prevText:"←",nextText:"→",currentText:"Vandaag",monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthNamesShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesShort:["zon","maa","din","woe","don","vri","zat"],dayNamesMin:["zo","ma","di","wo","do","vr","za"],weekHeader:"Wk",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("nl",{buttonText:{month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",eventLimitText:"extra",noEventsMessage:"Geen evenementen om te laten zien"})}(),function(){!function(){var e=a.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("nn","nn",{closeText:"Lukk",prevText:"&#xAB;Førre",nextText:"Neste&#xBB;",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["sun","mån","tys","ons","tor","fre","lau"],dayNames:["sundag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],dayNamesMin:["su","må","ty","on","to","fr","la"],weekHeader:"Veke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("nn",{buttonText:{month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},allDayText:"Heile dagen",eventLimitText:"til",noEventsMessage:"Ingen hendelser å vise"})}(),function(){!function(){function e(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function t(a,t,n){var r=a+" ";switch(n){case"m":return t?"minuta":"minutę";case"mm":return r+(e(a)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(e(a)?"godziny":"godzin");case"MM":return r+(e(a)?"miesiące":"miesięcy");case"yy":return r+(e(a)?"lata":"lat")}}var n="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),r="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),s=a.defineLocale("pl",{months:function(e,a){return""===a?"("+r[e.month()]+"|"+n[e.month()]+")":/D MMMM/.test(a)?r[e.month()]:n[e.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:t,mm:t,h:t,hh:t,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:t,y:"rok",yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}(),e.fullCalendar.datepickerLocale("pl","pl",{closeText:"Zamknij",prevText:"&#x3C;Poprzedni",nextText:"Następny&#x3E;",currentText:"Dziś",monthNames:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthNamesShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],dayNames:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],dayNamesShort:["Nie","Pn","Wt","Śr","Czw","Pt","So"],dayNamesMin:["N","Pn","Wt","Śr","Cz","Pt","So"],weekHeader:"Tydz",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("pl",{buttonText:{month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},allDayText:"Cały dzień",eventLimitText:"więcej",noEventsMessage:"Brak wydarzeń do wyświetlenia"})}(),function(){!function(){var e=a.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("pt","pt",{closeText:"Fechar",prevText:"Anterior",nextText:"Seguinte",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],weekHeader:"Sem",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("pt",{buttonText:{month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},allDayText:"Todo o dia",eventLimitText:"mais",noEventsMessage:"Não há eventos para mostrar"})}(),function(){!function(){var e=a.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº"});return e}(),e.fullCalendar.datepickerLocale("pt-br","pt-BR",{closeText:"Fechar",prevText:"&#x3C;Anterior",nextText:"Próximo&#x3E;",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],
+weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("pt-br",{buttonText:{month:"Mês",week:"Semana",day:"Dia",list:"Compromissos"},allDayText:"dia inteiro",eventLimitText:function(e){return"mais +"+e},noEventsMessage:"Não há eventos para mostrar"})}(),function(){!function(){function e(e,a,t){var n={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},r=" ";return(e%100>=20||e>=100&&e%100===0)&&(r=" de "),e+r+n[t]}var t=a.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:e,h:"o oră",hh:e,d:"o zi",dd:e,M:"o lună",MM:e,y:"un an",yy:e},week:{dow:1,doy:7}});return t}(),e.fullCalendar.datepickerLocale("ro","ro",{closeText:"Închide",prevText:"&#xAB; Luna precedentă",nextText:"Luna următoare &#xBB;",currentText:"Azi",monthNames:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],monthNamesShort:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"],dayNamesShort:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],dayNamesMin:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],weekHeader:"Săpt",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ro",{buttonText:{prev:"precedentă",next:"următoare",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},allDayText:"Toată ziua",eventLimitText:function(e){return"+alte "+e},noEventsMessage:"Nu există evenimente de afișat"})}(),function(){!function(){function e(e,a){var t=e.split("_");return a%10===1&&a%100!==11?t[0]:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?t[1]:t[2]}function t(a,t,n){var r={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===n?t?"минута":"минуту":a+" "+e(r[n],+a)}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],r=a.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В следующее] dddd [в] LT";case 1:case 2:case 4:return"[В следующий] dddd [в] LT";case 3:case 5:case 6:return"[В следующую] dddd [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:t,mm:t,h:"час",hh:t,d:"день",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,a,t){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}});return r}(),e.fullCalendar.datepickerLocale("ru","ru",{closeText:"Закрыть",prevText:"&#x3C;Пред",nextText:"След&#x3E;",currentText:"Сегодня",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["вск","пнд","втр","срд","чтв","птн","сбт"],dayNamesMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Нед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("ru",{buttonText:{month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},allDayText:"Весь день",eventLimitText:function(e){return"+ ещё "+e},noEventsMessage:"Нет событий для отображения"})}(),function(){!function(){function e(e){return e>1&&e<5}function t(a,t,n,r){var s=a+" ";switch(n){case"s":return t||r?"pár sekúnd":"pár sekundami";case"m":return t?"minúta":r?"minútu":"minútou";case"mm":return t||r?s+(e(a)?"minúty":"minút"):s+"minútami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?s+(e(a)?"hodiny":"hodín"):s+"hodinami";case"d":return t||r?"deň":"dňom";case"dd":return t||r?s+(e(a)?"dni":"dní"):s+"dňami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?s+(e(a)?"mesiace":"mesiacov"):s+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?s+(e(a)?"roky":"rokov"):s+"rokmi"}}var n="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),r="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),s=a.defineLocale("sk",{months:n,monthsShort:r,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}(),e.fullCalendar.datepickerLocale("sk","sk",{closeText:"Zavrieť",prevText:"&#x3C;Predchádzajúci",nextText:"Nasledujúci&#x3E;",currentText:"Dnes",monthNames:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"],monthNamesShort:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],dayNames:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],dayNamesShort:["Ned","Pon","Uto","Str","Štv","Pia","Sob"],dayNamesMin:["Ne","Po","Ut","St","Št","Pia","So"],weekHeader:"Ty",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("sk",{buttonText:{month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},allDayText:"Celý deň",eventLimitText:function(e){return"+ďalšie: "+e},noEventsMessage:"Žiadne akcie na zobrazenie"})}(),function(){!function(){function e(e,a,t,n){var r=e+" ";switch(t){case"s":return a||n?"nekaj sekund":"nekaj sekundami";case"m":return a?"ena minuta":"eno minuto";case"mm":return r+=1===e?a?"minuta":"minuto":2===e?a||n?"minuti":"minutama":e<5?a||n?"minute":"minutami":a||n?"minut":"minutami";case"h":return a?"ena ura":"eno uro";case"hh":return r+=1===e?a?"ura":"uro":2===e?a||n?"uri":"urama":e<5?a||n?"ure":"urami":a||n?"ur":"urami";case"d":return a||n?"en dan":"enim dnem";case"dd":return r+=1===e?a||n?"dan":"dnem":2===e?a||n?"dni":"dnevoma":a||n?"dni":"dnevi";case"M":return a||n?"en mesec":"enim mesecem";case"MM":return r+=1===e?a||n?"mesec":"mesecem":2===e?a||n?"meseca":"mesecema":e<5?a||n?"mesece":"meseci":a||n?"mesecev":"meseci";case"y":return a||n?"eno leto":"enim letom";case"yy":return r+=1===e?a||n?"leto":"letom":2===e?a||n?"leti":"letoma":e<5?a||n?"leta":"leti":a||n?"let":"leti"}}var t=a.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t}(),e.fullCalendar.datepickerLocale("sl","sl",{closeText:"Zapri",prevText:"&#x3C;Prejšnji",nextText:"Naslednji&#x3E;",currentText:"Trenutni",monthNames:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],dayNames:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"],dayNamesShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],dayNamesMin:["Ne","Po","To","Sr","Če","Pe","So"],weekHeader:"Teden",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("sl",{buttonText:{month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},allDayText:"Ves dan",eventLimitText:"več",noEventsMessage:"Ni dogodkov za prikaz"})}(),function(){!function(){var e={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:e>=2&&e<=4?a[1]:a[2]},translate:function(a,t,n){var r=e.words[n];return 1===n.length?t?r[0]:r[1]:a+" "+e.correctGrammaticalCase(a,r)}},t=a.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"dan",dd:e.translate,M:"mesec",MM:e.translate,y:"godinu",yy:e.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t}(),e.fullCalendar.datepickerLocale("sr","sr",{closeText:"Затвори",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Данас",monthNames:["Јануар","Фебруар","Март","Април","Мај","Јун","Јул","Август","Септембар","Октобар","Новембар","Децембар"],monthNamesShort:["Јан","Феб","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Нов","Дец"],dayNames:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"],dayNamesShort:["Нед","Пон","Уто","Сре","Чет","Пет","Суб"],dayNamesMin:["Не","По","Ут","Ср","Че","Пе","Су"],weekHeader:"Сед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("sr",{buttonText:{month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},allDayText:"Цео дан",eventLimitText:function(e){return"+ још "+e},noEventsMessage:"Нема догађаја за приказ"})}(),function(){!function(){var e={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:e>=2&&e<=4?a[1]:a[2]},translate:function(a,t,n){var r=e.words[n];return 1===n.length?t?r[0]:r[1]:a+" "+e.correctGrammaticalCase(a,r)}},t=a.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"дан",dd:e.translate,M:"месец",MM:e.translate,y:"годину",yy:e.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t}(),e.fullCalendar.datepickerLocale("sr-cyrl","sr",{closeText:"Затвори",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Данас",monthNames:["Јануар","Фебруар","Март","Април","Мај","Јун","Јул","Август","Септембар","Октобар","Новембар","Децембар"],monthNamesShort:["Јан","Феб","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Нов","Дец"],dayNames:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"],dayNamesShort:["Нед","Пон","Уто","Сре","Чет","Пет","Суб"],dayNamesMin:["Не","По","Ут","Ср","Че","Пе","Су"],weekHeader:"Сед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("sr-cyrl",{buttonText:{month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},allDayText:"Цео дан",eventLimitText:function(e){return"+ још "+e},noEventsMessage:"Нема догађаја за приказ"})}(),function(){!function(){var e=a.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var a=e%10,t=1===~~(e%100/10)?"e":1===a?"a":2===a?"a":"e";return e+t},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("sv","sv",{closeText:"Stäng",prevText:"&#xAB;Förra",nextText:"Nästa&#xBB;",currentText:"Idag",monthNames:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNamesShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayNames:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],dayNamesMin:["Sö","Må","Ti","On","To","Fr","Lö"],weekHeader:"Ve",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("sv",{buttonText:{month:"Månad",week:"Vecka",day:"Dag",list:"Program"},allDayText:"Heldag",eventLimitText:"till",noEventsMessage:"Inga händelser att visa"})}(),function(){!function(){var e=a.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H นาฬิกา m นาที",LTS:"H นาฬิกา m นาที s วินาที",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H นาฬิกา m นาที",LLLL:"วันddddที่ D MMMM YYYY เวลา H นาฬิกา m นาที"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,a,t){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return e}(),e.fullCalendar.datepickerLocale("th","th",{closeText:"ปิด",prevText:"&#xAB;&#xA0;ย้อน",nextText:"ถัดไป&#xA0;&#xBB;",currentText:"วันนี้",monthNames:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthNamesShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],dayNames:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],dayNamesShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayNamesMin:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("th",{buttonText:{month:"เดือน",week:"สัปดาห์",day:"วัน",list:"แผนงาน"},allDayText:"ตลอดวัน",eventLimitText:"เพิ่มเติม",noEventsMessage:"ไม่มีกิจกรรมที่จะแสดง"})}(),function(){!function(){var e={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},t=a.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(a){if(0===a)return a+"'ıncı";var t=a%10,n=a%100-t,r=a>=100?100:null;return a+(e[t]||e[n]||e[r])},week:{dow:1,doy:7}});return t}(),e.fullCalendar.datepickerLocale("tr","tr",{closeText:"kapat",prevText:"&#x3C;geri",nextText:"ileri&#x3e",currentText:"bugün",monthNames:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthNamesShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],dayNames:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],dayNamesShort:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],dayNamesMin:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],weekHeader:"Hf",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("tr",{buttonText:{next:"ileri",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},allDayText:"Tüm gün",eventLimitText:"daha fazla",noEventsMessage:"Herhangi bir etkinlik görüntülemek için"})}(),function(){!function(){function e(e,a){var t=e.split("_");return a%10===1&&a%100!==11?t[0]:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?t[1]:t[2]}function t(a,t,n){var r={mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":a+" "+e(r[n],+a)}function n(e,a){var t={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},n=/(\[[ВвУу]\]) ?dddd/.test(a)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(a)?"genitive":"nominative";return t[n][e.day()]}function r(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var s=a.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:n,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:r("[Сьогодні "),nextDay:r("[Завтра "),lastDay:r("[Вчора "),nextWeek:r("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return r("[Минулої] dddd [").call(this);case 1:case 2:case 4:return r("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,a,t){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},ordinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return s}(),e.fullCalendar.datepickerLocale("uk","uk",{closeText:"Закрити",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Сьогодні",monthNames:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],monthNamesShort:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],dayNames:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"],dayNamesShort:["нед","пнд","вів","срд","чтв","птн","сбт"],dayNamesMin:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Тиж",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("uk",{buttonText:{month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},allDayText:"Увесь день",eventLimitText:function(e){return"+ще "+e+"..."},noEventsMessage:"Немає подій для відображення"})}(),function(){!function(){var e=a.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,a,t){return e<12?t?"sa":"SA":t?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("vi","vi",{closeText:"Đóng",prevText:"&#x3C;Trước",nextText:"Tiếp&#x3E;",currentText:"Hôm nay",monthNames:["Tháng Một","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai"],monthNamesShort:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayNames:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],dayNamesShort:["CN","T2","T3","T4","T5","T6","T7"],dayNamesMin:["CN","T2","T3","T4","T5","T6","T7"],weekHeader:"Tu",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),e.fullCalendar.locale("vi",{buttonText:{month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},allDayText:"Cả ngày",eventLimitText:function(e){return"+ thêm "+e},noEventsMessage:"Không có sự kiện để hiển thị"})}(),function(){!function(){var e=a.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,a){return 12===e&&(e=0),"凌晨"===a||"早上"===a||"上午"===a?e:"下午"===a||"晚上"===a?e+12:e>=11?e:e+12},meridiem:function(e,a,t){var n=100*e+a;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var e,t;return e=a().startOf("week"),t=this.diff(e,"days")>=7?"[下]":"[本]",0===this.minutes()?t+"dddAh点整":t+"dddAh点mm"},lastWeek:function(){var e,t;return e=a().startOf("week"),t=this.unix()<e.unix()?"[上]":"[本]",0===this.minutes()?t+"dddAh点整":t+"dddAh点mm"},sameElse:"LL"},ordinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return e}(),e.fullCalendar.datepickerLocale("zh-cn","zh-CN",{closeText:"关闭",prevText:"&#x3C;上月",nextText:"下月&#x3E;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"}),e.fullCalendar.locale("zh-cn",{buttonText:{month:"月",week:"周",day:"日",list:"日程"},allDayText:"全天",eventLimitText:function(e){return"另外 "+e+" 个"},noEventsMessage:"没有事件显示"})}(),function(){!function(){var e=a.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm分",LTS:"Ah點m分s秒",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah點mm分",LLLL:"YYYY年MMMD日ddddAh點mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah點mm分",llll:"YYYY年MMMD日ddddAh點mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,a){return 12===e&&(e=0),"凌晨"===a||"早上"===a||"上午"===a?e:"中午"===a?e>=11?e:e+12:"下午"===a||"晚上"===a?e+12:void 0},meridiem:function(e,a,t){var n=100*e+a;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";
+default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return e}(),e.fullCalendar.datepickerLocale("zh-tw","zh-TW",{closeText:"關閉",prevText:"&#x3C;上月",nextText:"下月&#x3E;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"yy/mm/dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"}),e.fullCalendar.locale("zh-tw",{buttonText:{month:"月",week:"週",day:"天",list:"待辦事項"},allDayText:"全天",eventLimitText:"更多",noEventsMessage:"没有事件显示"})}(),a.locale("en"),e.fullCalendar.locale("en"),e.datepicker&&e.datepicker.setDefaults(e.datepicker.regional[""])});
\ No newline at end of file
diff --git a/library/moment/CHANGELOG.md b/library/moment/CHANGELOG.md
new file mode 100644 (file)
index 0000000..d53a561
--- /dev/null
@@ -0,0 +1,694 @@
+Changelog
+=========
+
+### 2.15.1
+* Release Sept 20, 2016
+* [3438] [bugfix] Fix locale autoload, revert #3344
+
+### 2.15.0 [See full changelog](https://gist.github.com/ichernev/10e1c5bf647545c72ca30e9628a09ed3)
+- Release Sept 12, 2016
+
+## New Locales
+* [#3255](https://github.com/moment/moment/pull/3255) [new locale] mi: Maori language
+* [#3267](https://github.com/moment/moment/pull/3267) [new locale] ar-ly: Arabic (Libya) locale
+* [#3333](https://github.com/moment/moment/pull/3333) [new locale] zh-hk: Chinese (Hong Kong) locale
+
+## Bugfixes
+* [#3276](https://github.com/moment/moment/pull/3276) [bugfix] duration: parser: Support ms durations in .NET syntax
+* [#3312](https://github.com/moment/moment/pull/3312) [bugfix] locales: Enable locale-data getters without moment (fixes [#3284](https://github.com/moment/moment/issues/3284))
+* [#3381](https://github.com/moment/moment/pull/3381) [bugfix] parsing: Fix parseZone without timezone in string, fixes [#3083](https://github.com/moment/moment/issues/3083)
+* [#3383](https://github.com/moment/moment/pull/3383) [bugfix] toJSON: Fix isValid so that toJSON works after a moment is frozen
+* [#3427](https://github.com/moment/moment/pull/3427) [bugfix] ie8: Fix IE8 (regression in 2.14.x)
+
+## Packaging
+* [#3299](https://github.com/moment/moment/pull/3299) [pkg] npm: Do not include .npmignore in npm package
+* [#3273](https://github.com/moment/moment/pull/3273) [pkg] jspm: Include moment.d.ts file in package
+* [#3344](https://github.com/moment/moment/pull/3344) [pkg] exports: use module.require for nodejs
+
+Also some locale and typescript improvements
+
+### 2.14.1
+- Release July 20, 2016
+* [#3280](https://github.com/moment/moment/pull/3280) Fix typescript definitions
+
+
+### 2.14.0 [See full changelog](https://gist.github.com/ichernev/812e79ac36a7829a22598fe964bfc18a)
+
+- Release July 20, 2016
+
+## New Features
+* [#3233](http://github.com/moment/moment/pull/3233) Introduce month.isFormat for format/standalone discovery
+* [#2848](http://github.com/moment/moment/pull/2848) Allow user to get/set the rounding method used when calculating relative time
+* [#3112](http://github.com/moment/moment/pull/3112) optimize configFromStringAndFormat
+* [#3147](http://github.com/moment/moment/pull/3147) Call calendar format function with moment context
+* [#3160](http://github.com/moment/moment/pull/3160) deprecate isDSTShifted
+* [#3175](http://github.com/moment/moment/pull/3175) make moment calendar extensible with ad-hoc options
+* [#3191](http://github.com/moment/moment/pull/3191) toDate returns a copy of the internal date object
+* [#3192](http://github.com/moment/moment/pull/3192) Adding support for rollup import.
+* [#3238](http://github.com/moment/moment/pull/3238) Handle empty object and empty array for creation as now
+* [#3082](http://github.com/moment/moment/pull/3082) Use relative AMD moment dependency
+
+## Bugfixes
+* [#3241](http://github.com/moment/moment/pull/3241) Escape all 24 mixed pieces, not only first 12 in computeMonthsParse
+* [#3008](http://github.com/moment/moment/pull/3008) Object setter orders sets based on size of unit
+* [#3177](http://github.com/moment/moment/pull/3177) Bug Fix [#2704](http://github.com/moment/moment/pull/2704) - isoWeekday(String) inconsistent with isoWeekday(Number)
+* [#3230](http://github.com/moment/moment/pull/3230) fix passing date with format string to ignore format string
+* [#3232](http://github.com/moment/moment/pull/3232) Fix negative 0 in certain diff cases
+* [#3235](http://github.com/moment/moment/pull/3235) Use proper locale inheritance for the base locale, fixes [#3137](http://github.com/moment/moment/pull/3137)
+
+Plus es-do locale and locale bugfixes
+
+### 2.13.0 [See full changelog](https://gist.github.com/ichernev/0132fcf5b61f7fc140b0bb0090480d49)
+- Release April 18, 2016
+## Enhancements:
+* [#2982](https://github.com/moment/moment/pull/2982) Add 'date' as alias to 'day' for startOf() and endOf().
+* [#2955](https://github.com/moment/moment/pull/2955) Add parsing negative components in durations when ISO 8601
+* [#2991](https://github.com/moment/moment/pull/2991) isBetween support for both open and closed intervals
+* [#3105](https://github.com/moment/moment/pull/3105) Add localeSorted argument to weekday listers
+* [#3102](https://github.com/moment/moment/pull/3102) Add k and kk formatting tokens
+
+## Bugfixes
+* [#3109](https://github.com/moment/moment/pull/3109) Fix [#1756](https://github.com/moment/moment/issues/1756) Resolved thread-safe issue on server side.
+* [#3078](https://github.com/moment/moment/pull/3078) Fix parsing for months/weekdays with weird characters
+* [#3098](https://github.com/moment/moment/pull/3098) Use Z suffix when in UTC mode ([#3020](https://github.com/moment/moment/issues/3020))
+* [#2995](https://github.com/moment/moment/pull/2995) Fix floating point rounding errors in durations
+* [#3059](https://github.com/moment/moment/pull/3059) fix bug where diff returns -0 in month-related diffs
+* [#3045](https://github.com/moment/moment/pull/3045) Fix mistaking any input for 'a' token
+* [#2877](https://github.com/moment/moment/pull/2877) Use explicit .valueOf() calls instead of coercion
+* [#3036](https://github.com/moment/moment/pull/3036) Year setter should keep time when DST changes
+
+Plus 3 new locales and locale fixes.
+
+### 2.12.0 [See full changelog](https://gist.github.com/ichernev/6e5bfdf8d6522fc4ac73)
+
+- Release March 7, 2016
+
+## Enhancements:
+* [#2932](https://github.com/moment/moment/pull/2932) List loaded locales
+* [#2818](https://github.com/moment/moment/pull/2818) Parse ISO-8061 duration containing both day and week values
+* [#2774](https://github.com/moment/moment/pull/2774) Implement locale inheritance and locale updating
+
+## Bugfixes:
+* [#2970](https://github.com/moment/moment/pull/2970) change add subtract to handle decimal values by rounding
+* [#2887](https://github.com/moment/moment/pull/2887) Fix toJSON casting of invalid moment
+* [#2897](https://github.com/moment/moment/pull/2897) parse string arguments for month() correctly, closes #2884
+* [#2946](https://github.com/moment/moment/pull/2946) Fix usage suggestions for min and max
+
+## New locales:
+* [#2917](https://github.com/moment/moment/pull/2917) Locale Punjabi(Gurmukhi) India format conversion
+
+And more
+
+### 2.11.2 (Fix ReDoS attack vector)
+
+- Release February 7, 2016
+
+* [#2939](https://github.com/moment/moment/pull/2939) use full-string match to speed up aspnet regex match
+
+### 2.11.1 [See full changelog](https://gist.github.com/ichernev/8ec3ee25b749b4cff3c2)
+
+- Release January 9, 2016
+
+## Bugfixes:
+* [#2881](https://github.com/moment/moment/pull/2881) Revert "Merge pull request #2746 from mbad0la:develop" Sep->Sept
+* [#2868](https://github.com/moment/moment/pull/2868) Add format and parse token Y, so it actually works
+* [#2865](https://github.com/moment/moment/pull/2865) Use typeof checks for undefined for global variables
+* [#2858](https://github.com/moment/moment/pull/2858) Fix Date mocking regression introduced in 2.11.0
+* [#2864](https://github.com/moment/moment/pull/2864) Include changelog in npm release
+* [#2830](https://github.com/moment/moment/pull/2830) dep: add grunt-cli
+* [#2869](https://github.com/moment/moment/pull/2869) Fix months parsing for some locales
+
+### 2.11.0 [See full changelog](https://gist.github.com/ichernev/6594bc29719dde6b2f66)
+
+- Release January 4, 2016
+
+* [#2624](https://github.com/moment/moment/pull/2624) Proper handling of invalid moments
+* [#2634](https://github.com/moment/moment/pull/2634) Fix strict month parsing issue in cs,ru,sk
+* [#2735](https://github.com/moment/moment/pull/2735) Reset the locale back to 'en' after defining all locales in min/locales.js
+* [#2702](https://github.com/moment/moment/pull/2702) Week rework
+* [#2746](https://github.com/moment/moment/pull/2746) Changed September Abbreviation to "Sept" in locale-specific english
+  files and default locale file
+* [#2646](https://github.com/moment/moment/pull/2646) Fix [#2645](https://github.com/moment/moment/pull/2645) - invalid dates pre-1970
+
+* [#2641](https://github.com/moment/moment/pull/2641) Implement basic format and comma as ms separator in ISO 8601
+* [#2665](https://github.com/moment/moment/pull/2665) Implement stricter weekday parsing
+* [#2700](https://github.com/moment/moment/pull/2700) Add [Hh]mm and [Hh]mmss formatting tokens, so you can parse 123 with
+  hmm for example
+* [#2565](https://github.com/moment/moment/pull/2565) [#2835](https://github.com/moment/moment/pull/2835) Expose arguments used for moment creation with creationData
+  (fix [#2443](https://github.com/moment/moment/pull/2443))
+* [#2648](https://github.com/moment/moment/pull/2648) fix issue [#2640](https://github.com/moment/moment/pull/2640): support instanceof operator
+* [#2709](https://github.com/moment/moment/pull/2709) Add isSameOrAfter and isSameOrBefore comparison methods
+* [#2721](https://github.com/moment/moment/pull/2721) Fix moment creation from object with strings values
+* [#2740](https://github.com/moment/moment/pull/2740) Enable 'd hh:mm:ss.sss' format for durations
+* [#2766](https://github.com/moment/moment/pull/2766) [#2833](https://github.com/moment/moment/pull/2833) Alternate Clock Source Support
+
+### 2.10.6
+
+- Release July 28, 2015
+
+[#2515](https://github.com/moment/moment/pull/2515) Fix regression introduced
+in `2.10.5` related to `moment.ISO_8601` parsing.
+
+### 2.10.5 [See full changelog](https://gist.github.com/ichernev/6ec13ac7efc396da44b2)
+
+- Release July 26, 2015
+
+Important changes:
+* [#2357](https://github.com/moment/moment/pull/2357) Improve unit bubbling for ISO dates
+  this fixes day to year conversions to work around end-of-year (~365 days). As
+  a side effect 365 days is 11 months and 30 days, and 366 days is one year.
+* [#2438](https://github.com/moment/moment/pull/2438) Fix inconsistent moment.min and moment.max results
+  Return invalid result if any of the inputs is invalid
+* [#2494](https://github.com/moment/moment/pull/2494) Fix two digit year parsing with YYYY format
+  This brings the benefits of YY to YYYY
+* [#2368](https://github.com/moment/moment/pull/2368) perf: use faster form of copying dates, across the board improvement
+
+
+### 2.10.3 [See full changelog](https://gist.github.com/ichernev/f264b9bed5b00f8b1b7f)
+
+- Release May 13, 2015
+
+* add `moment.fn.to` and `moment.fn.toNow` (similar to `from` and `fromNow`)
+* new locales (Sinhalese (si), Montenegrin (me), Javanese (ja))
+* performance improvements
+
+### 2.10.2
+
+- Release April 9, 2015
+
+* fixed moment-with-locales in browser env caused by esperanto change
+
+### 2.10.1
+
+* regression: Add moment.duration.fn back
+
+### 2.10.0
+
+Ported code to es6 modules.
+
+### 2.9.0 [See full changelog](https://gist.github.com/ichernev/0c9a9b49951111a27ce7)
+
+- Release January 8, 2015
+
+languages:
+* [2104](https://github.com/moment/moment/issues/2104) Frisian (fy) language file with unit test
+* [2097](https://github.com/moment/moment/issues/2097) add ar-tn locale
+
+deprecations:
+* [2074](https://github.com/moment/moment/issues/2074) Implement `moment.fn.utcOffset`, deprecate `moment.fn.zone`
+
+features:
+* [2088](https://github.com/moment/moment/issues/2088) add moment.fn.isBetween
+* [2054](https://github.com/moment/moment/issues/2054) Call updateOffset when creating moment (needed for default timezone in
+  moment-timezone)
+* [1893](https://github.com/moment/moment/issues/1893) Add moment.isDate method
+* [1825](https://github.com/moment/moment/issues/1825) Implement toJSON function on Duration
+* [1809](https://github.com/moment/moment/issues/1809) Allowing moment.set() to accept a hash of units
+* [2128](https://github.com/moment/moment/issues/2128) Add firstDayOfWeek, firstDayOfYear locale getters
+* [2131](https://github.com/moment/moment/issues/2131) Add quarter diff support
+
+Some bugfixes and language improvements -- [full changelog](https://gist.github.com/ichernev/0c9a9b49951111a27ce7)
+
+### 2.8.4 [See full changelog](https://gist.github.com/ichernev/a4fcb0a46d74e4b9b996)
+
+- Release November 19, 2014
+
+Features:
+
+* [#2000](https://github.com/moment/moment/issues/2000) Add LTS localised format that includes seconds
+* [#1960](https://github.com/moment/moment/issues/1960) added formatToken 'x' for unix offset in milliseconds #1938
+* [#1965](https://github.com/moment/moment/issues/1965) Support 24:00:00.000 to mean next day, at midnight.
+* [#2002](https://github.com/moment/moment/issues/2002) Accept 'date' key when creating moment with object
+* [#2009](https://github.com/moment/moment/issues/2009) Use native toISOString when we can
+
+Some bugfixes and language improvements -- [full changelog](https://gist.github.com/ichernev/a4fcb0a46d74e4b9b996)
+
+### 2.8.3
+
+- Release September 5, 2014
+
+Bugfixes:
+
+* [#1801](https://github.com/moment/moment/issues/1801) proper pluralization for Arabic
+* [#1833](https://github.com/moment/moment/issues/1833) improve spm integration
+* [#1871](https://github.com/moment/moment/issues/1871) fix zone bug caused by Firefox 24
+* [#1882](https://github.com/moment/moment/issues/1882) Use hh:mm in Czech
+* [#1883](https://github.com/moment/moment/issues/1883) Fix 2.8.0 regression in duration as conversions
+* [#1890](https://github.com/moment/moment/issues/1890) Faster travis builds
+* [#1892](https://github.com/moment/moment/issues/1892) Faster isBefore/After/Same
+* [#1848](https://github.com/moment/moment/issues/1848) Fix flaky month diffs
+* [#1895](https://github.com/moment/moment/issues/1895) Fix 2.8.0 regression in moment.utc with format array
+* [#1896](https://github.com/moment/moment/issues/1896) Support setting invalid instance locale (noop)
+* [#1897](https://github.com/moment/moment/issues/1897) Support moment([str]) in addition to moment([int])
+
+### 2.8.2
+
+- Release August 22, 2014
+
+Minor bugfixes:
+
+* [#1874](https://github.com/moment/moment/issues/1874) use `Object.prototype.hasOwnProperty`
+  instead of `obj.hasOwnProperty` (ie8 bug)
+* [#1873](https://github.com/moment/moment/issues/1873) add `duration#toString()`
+* [#1859](https://github.com/moment/moment/issues/1859) better month/weekday names in norwegian
+* [#1812](https://github.com/moment/moment/issues/1812) meridiem parsing for greek
+* [#1804](https://github.com/moment/moment/issues/1804) spanish del -> de
+* [#1800](https://github.com/moment/moment/issues/1800) korean LT improvement
+
+### 2.8.1
+
+- Release August 1, 2014
+
+* bugfix [#1813](https://github.com/moment/moment/issues/1813): fix moment().lang([key]) incompatibility
+
+### 2.8.0 [See changelog](https://gist.github.com/ichernev/ac3899324a5fa6c8c9b4)
+
+- Release July 31, 2014
+
+* incompatible changes
+    * [#1761](https://github.com/moment/moment/issues/1761): moments created without a language are no longer following the global language, in case it changes. Only newly created moments take the global language by default. In case you're affected by this, wait, comment on [#1797](https://github.com/moment/moment/issues/1797) and wait for a proper reimplementation
+    * [#1642](https://github.com/moment/moment/issues/1642): 45 days is no longer "a month" according to humanize, cutoffs for month, and year have changed. Hopefully your code does not depend on a particular answer from humanize (which it shouldn't anyway)
+    * [#1784](https://github.com/moment/moment/issues/1784): if you use the human readable English datetime format in a weird way (like storing them in a database) that would break when the format changes you're at risk.
+
+* deprecations (old behavior will be dropped in 3.0)
+    * [#1761](https://github.com/moment/moment/issues/1761) `lang` is renamed to `locale`, `langData` -> `localeData`. Also there is now `defineLocale` that should be used when creating new locales
+    * [#1763](https://github.com/moment/moment/issues/1763) `add(unit, value)` and `subtract(unit, value)` are now deprecated. Use `add(value, unit)` and `subtract(value, unit)` instead.
+    * [#1759](https://github.com/moment/moment/issues/1759) rename `duration.toIsoString` to `duration.toISOString`. The js standard library and moment's `toISOString` follow that convention.
+
+* new locales
+    * [#1789](https://github.com/moment/moment/issues/1789) Tibetan (bo)
+    * [#1786](https://github.com/moment/moment/issues/1786) Africaans (af)
+    * [#1778](https://github.com/moment/moment/issues/1778) Burmese (my)
+    * [#1727](https://github.com/moment/moment/issues/1727) Belarusian (be)
+
+* bugfixes, locale bugfixes, performance improvements, features
+
+### 2.7.0 [See changelog](https://gist.github.com/ichernev/b0a3d456d5a84c9901d7)
+
+- Release June 12, 2014
+
+* new languages
+
+  * [#1678](https://github.com/moment/moment/issues/1678) Bengali (bn)
+  * [#1628](https://github.com/moment/moment/issues/1628) Azerbaijani (az)
+  * [#1633](https://github.com/moment/moment/issues/1633) Arabic, Saudi Arabia (ar-sa)
+  * [#1648](https://github.com/moment/moment/issues/1648) Austrian German (de-at)
+
+* features
+
+  * [#1663](https://github.com/moment/moment/issues/1663) configurable relative time thresholds
+  * [#1554](https://github.com/moment/moment/issues/1554) support anchor time in moment.calendar
+  * [#1693](https://github.com/moment/moment/issues/1693) support moment.ISO_8601 as parsing format
+  * [#1637](https://github.com/moment/moment/issues/1637) add moment.min and moment.max and deprecate min/max instance methods
+  * [#1704](https://github.com/moment/moment/issues/1704) support string value in add/subtract
+  * [#1647](https://github.com/moment/moment/issues/1647) add spm support (package manager)
+
+* bugfixes
+
+### 2.6.0 [See changelog](https://gist.github.com/ichernev/10544682)
+
+- Release April 12 , 2014
+
+* languages
+  * [#1529](https://github.com/moment/moment/issues/1529) Serbian-Cyrillic (sr-cyr)
+  * [#1544](https://github.com/moment/moment/issues/1544), [#1546](https://github.com/moment/moment/issues/1546) Khmer Cambodia (km)
+
+* features
+    * [#1419](https://github.com/moment/moment/issues/1419), [#1468](https://github.com/moment/moment/issues/1468), [#1467](https://github.com/moment/moment/issues/1467), [#1546](https://github.com/moment/moment/issues/1546) better handling of timezone-d moments around DST
+    * [#1462](https://github.com/moment/moment/issues/1462) add weeksInYear and isoWeeksInYear
+    * [#1475](https://github.com/moment/moment/issues/1475) support ordinal parsing
+    * [#1499](https://github.com/moment/moment/issues/1499) composer support
+    * [#1577](https://github.com/moment/moment/issues/1577), [#1604](https://github.com/moment/moment/issues/1604) put Date parsing in moment.createFromInputFallback so it can be properly deprecated and controlled in the future
+    * [#1545](https://github.com/moment/moment/issues/1545) extract two-digit year parsing in moment.parseTwoDigitYear, so it can be overwritten
+    * [#1590](https://github.com/moment/moment/issues/1590) (see [#1574](https://github.com/moment/moment/issues/1574)) set AMD global before module definition to better support non AMD module dependencies used in AMD environment
+    * [#1589](https://github.com/moment/moment/issues/1589) remove global in Node.JS environment (was not working before, nobody complained, was scheduled for removal anyway)
+    * [#1586](https://github.com/moment/moment/issues/1586) support quarter setting and parsing
+
+* 18 bugs fixed
+
+### 2.5.1
+
+- Release January 22, 2014
+
+* languages
+  * [#1392](https://github.com/moment/moment/issues/1392) Armenian (hy-am)
+
+* bugfixes
+  * [#1429](https://github.com/moment/moment/issues/1429) fixes [#1423](https://github.com/moment/moment/issues/1423) weird chrome-32 bug with js object creation
+  * [#1421](https://github.com/moment/moment/issues/1421) remove html entities from Welsh
+  * [#1418](https://github.com/moment/moment/issues/1418) fixes [#1401](https://github.com/moment/moment/issues/1401) improved non-padded tokens in strict matching
+  * [#1417](https://github.com/moment/moment/issues/1417) fixes [#1404](https://github.com/moment/moment/issues/1404) handle buggy moment object created by property cloning
+  * [#1398](https://github.com/moment/moment/issues/1398) fixes [#1397](https://github.com/moment/moment/issues/1397) fix Arabic-like week number parsing
+  * [#1396](https://github.com/moment/moment/issues/1396) add leftZeroFill(4) to GGGG and gggg formats
+  * [#1373](https://github.com/moment/moment/issues/1373) use lowercase for months and days in Catalan
+
+* testing
+  * [#1374](https://github.com/moment/moment/issues/1374) run tests on multiple browser/os combos via SauceLabs and Travis
+
+### 2.5.0 [See changelog](https://gist.github.com/ichernev/8104451)
+
+- Release Dec 24, 2013
+
+* New languages
+  * Luxemburish (lb) [1247](https://github.com/moment/moment/issues/1247)
+  * Serbian (rs) [1319](https://github.com/moment/moment/issues/1319)
+  * Tamil (ta) [1324](https://github.com/moment/moment/issues/1324)
+  * Macedonian (mk) [1337](https://github.com/moment/moment/issues/1337)
+
+* Features
+  * [1311](https://github.com/moment/moment/issues/1311) Add quarter getter and format token `Q`
+  * [1303](https://github.com/moment/moment/issues/1303) strict parsing now respects number of digits per token (fix [1196](https://github.com/moment/moment/issues/1196))
+  * 0d30bb7 add jspm support
+  * [1347](https://github.com/moment/moment/issues/1347) improve zone parsing
+  * [1362](https://github.com/moment/moment/issues/1362) support merideam parsing in Korean
+
+* 22 bugfixes
+
+### 2.4.0
+
+- Release Oct 27, 2013
+
+* **Deprecate** globally exported moment, will be removed in next major
+* New languages
+  * Farose (fo) [#1206](https://github.com/moment/moment/issues/1206)
+  * Tagalog/Filipino (tl-ph) [#1197](https://github.com/moment/moment/issues/1197)
+  * Welsh (cy) [#1215](https://github.com/moment/moment/issues/1215)
+* Bugfixes
+  * properly handle Z at the end of iso RegExp [#1187](https://github.com/moment/moment/issues/1187)
+  * chinese meridian time improvements [#1076](https://github.com/moment/moment/issues/1076)
+  * fix language tests [#1177](https://github.com/moment/moment/issues/1177)
+  * remove some failing tests (that should have never existed :))
+    [#1185](https://github.com/moment/moment/issues/1185)
+    [#1183](https://github.com/moment/moment/issues/1183)
+  * handle russian noun cases in weird cases [#1195](https://github.com/moment/moment/issues/1195)
+
+### 2.3.1
+
+- Release Oct 9, 2013
+
+Removed a trailing comma [1169] and fixed a bug with `months`, `weekdays` getters [#1171](https://github.com/moment/moment/issues/1171).
+
+### 2.3.0 [See changelog](https://gist.github.com/ichernev/6864354)
+
+- Release Oct 7, 2013
+
+Changed isValid, added strict parsing.
+Week tokens parsing.
+
+### 2.2.1
+
+- Release Sep 12, 2013
+
+Fixed bug in string prototype test.
+Updated authors and contributors.
+
+### 2.2.0 [See changelog](https://gist.github.com/ichernev/00f837a9baf46a3565e4)
+
+- Release  Sep 11, 2013
+
+Added bower support.
+
+Language files now use UMD.
+
+Creating moment defaults to current date/month/year.
+
+Added a bundle of moment and all language files.
+
+### 2.1.0 [See changelog](https://gist.github.com/timrwood/b8c2d90d528eddb53ab5)
+
+- Release Jul 8, 2013
+
+Added better week support.
+
+Added ability to set offset with `moment#zone`.
+
+Added ability to set month or weekday from a string.
+
+Added `moment#min` and `moment#max`
+
+### 2.0.0 [See changelog](https://gist.github.com/timrwood/e72f2eef320ed9e37c51)
+
+- Release Feb 9, 2013
+
+Added short form localized tokens.
+
+Added ability to define language a string should be parsed in.
+
+Added support for reversed add/subtract arguments.
+
+Added support for `endOf('week')` and `startOf('week')`.
+
+Fixed the logic for `moment#diff(Moment, 'months')` and `moment#diff(Moment, 'years')`
+
+`moment#diff` now floors instead of rounds.
+
+Normalized `moment#toString`.
+
+Added `isSame`, `isAfter`, and `isBefore` methods.
+
+Added better week support.
+
+Added `moment#toJSON`
+
+Bugfix: Fixed parsing of first century dates
+
+Bugfix: Parsing 10Sep2001 should work as expected
+
+Bugfix: Fixed weirdness with `moment.utc()` parsing.
+
+Changed language ordinal method to return the number + ordinal instead of just the ordinal.
+
+Changed two digit year parsing cutoff to match strptime.
+
+Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
+
+Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
+
+Removed the lang data objects from the top level namespace.
+
+Duplicate `Date` passed to `moment()` instead of referencing it.
+
+### 1.7.2 [See discussion](https://github.com/timrwood/moment/issues/456)
+
+- Release Oct 2, 2012
+
+Bugfixes
+
+### 1.7.1 [See discussion](https://github.com/timrwood/moment/issues/384)
+
+- Release Oct 1, 2012
+
+Bugfixes
+
+### 1.7.0 [See discussion](https://github.com/timrwood/moment/issues/288)
+
+- Release Jul 26, 2012
+
+Added `moment.fn.endOf()` and `moment.fn.startOf()`.
+
+Added validation via `moment.fn.isValid()`.
+
+Made formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions
+
+Add support for month/weekday callbacks in `moment.fn.format()`
+
+Added instance specific languages.
+
+Added two letter weekday abbreviations with the formatting token `dd`.
+
+Various language updates.
+
+Various bugfixes.
+
+### 1.6.0 [See discussion](https://github.com/timrwood/moment/pull/268)
+
+- Release Apr 26, 2012
+
+Added Durations.
+
+Revamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD).
+
+Added support for millisecond parsing and formatting tokens (S SS SSS)
+
+Added a getter for `moment.lang()`
+
+Various bugfixes.
+
+There are a few things deprecated in the 1.6.0 release.
+
+1. The format tokens `z` and `zz` (timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See [this issue](https://github.com/timrwood/moment/issues/162) for more background.
+
+2. The method `moment.fn.native` is deprecated in favor of `moment.fn.toDate`. There continue to be issues with Google Closure Compiler throwing errors when using `native`, even in valid instances.
+
+3. The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see [this issue](https://github.com/timrwood/moment/pull/222).
+
+### 1.5.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=10&page=1&state=closed)
+
+- Release Mar 20, 2012
+
+Added UTC mode.
+
+Added automatic ISO8601 parsing.
+
+Various bugfixes.
+
+### 1.4.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=8&state=closed)
+
+- Release Feb 4, 2012
+
+Added `moment.fn.toDate` as a replacement for `moment.fn.native`.
+
+Added `moment.fn.sod` and `moment.fn.eod` to get the start and end of day.
+
+Various bugfixes.
+
+### 1.3.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=7&state=closed)
+
+- Release Jan 5, 2012
+
+Added support for parsing month names in the current language.
+
+Added escape blocks for parsing tokens.
+
+Added `moment.fn.calendar` to format strings like 'Today 2:30 PM', 'Tomorrow 1:25 AM', and 'Last Sunday 4:30 AM'.
+
+Added `moment.fn.day` as a setter.
+
+Various bugfixes
+
+### 1.2.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=4&state=closed)
+
+- Release Dec 7, 2011
+
+Added timezones to parser and formatter.
+
+Added `moment.fn.isDST`.
+
+Added `moment.fn.zone` to get the timezone offset in minutes.
+
+### 1.1.2 [See milestone](https://github.com/timrwood/moment/issues?milestone=6&state=closed)
+
+- Release Nov 18, 2011
+
+Various bugfixes
+
+### 1.1.1 [See milestone](https://github.com/timrwood/moment/issues?milestone=5&state=closed)
+
+- Release Nov 12, 2011
+
+Added time specific diffs (months, days, hours, etc)
+
+### 1.1.0
+
+- Release Oct 28, 2011
+
+Added `moment.fn.format` localized masks. 'L LL LLL LLLL' [issue 29](https://github.com/timrwood/moment/pull/29)
+
+Fixed [issue 31](https://github.com/timrwood/moment/pull/31).
+
+### 1.0.1
+
+- Release Oct 18, 2011
+
+Added `moment.version` to get the current version.
+
+Removed `window !== undefined` when checking if module exists to support browserify. [issue 25](https://github.com/timrwood/moment/pull/25)
+
+### 1.0.0
+
+- Release
+
+Added convenience methods for getting and setting date parts.
+
+Added better support for `moment.add()`.
+
+Added better lang support in NodeJS.
+
+Renamed library from underscore.date to Moment.js
+
+### 0.6.1
+
+- Release Oct 12, 2011
+
+Added Portuguese, Italian, and French language support
+
+### 0.6.0
+
+- Release Sep 21, 2011
+
+Added _date.lang() support.
+Added support for passing multiple formats to try to parse a date. _date("07-10-1986", ["MM-DD-YYYY", "YYYY-MM-DD"]);
+Made parse from string and single format 25% faster.
+
+### 0.5.2
+
+- Release Jul 11, 2011
+
+Bugfix for [issue 8](https://github.com/timrwood/underscore.date/pull/8) and [issue 9](https://github.com/timrwood/underscore.date/pull/9).
+
+### 0.5.1
+
+- Release Jun 17, 2011
+
+Bugfix for [issue 5](https://github.com/timrwood/underscore.date/pull/5).
+
+### 0.5.0
+
+- Release Jun 13, 2011
+
+Dropped the redundant `_date.date()` in favor of `_date()`.
+Removed `_date.now()`, as it is a duplicate of `_date()` with no parameters.
+Removed `_date.isLeapYear(yearNumber)`. Use `_date([yearNumber]).isLeapYear()` instead.
+Exposed customization options through the `_date.relativeTime`, `_date.weekdays`, `_date.weekdaysShort`, `_date.months`, `_date.monthsShort`, and `_date.ordinal` variables instead of the `_date.customize()` function.
+
+### 0.4.1
+
+- Release May 9, 2011
+
+Added date input formats for input strings.
+
+### 0.4.0
+
+- Release May 9, 2011
+
+Added underscore.date to npm. Removed dependencies on underscore.
+
+### 0.3.2
+
+- Release Apr 9, 2011
+
+Added `'z'` and `'zz'` to `_.date().format()`. Cleaned up some redundant code to trim off some bytes.
+
+### 0.3.1
+
+- Release Mar 25, 2011
+
+Cleaned up the namespace. Moved all date manipulation and display functions to the _.date() object.
+
+### 0.3.0
+
+- Release Mar 25, 2011
+
+Switched to the Underscore methodology of not mucking with the native objects' prototypes.
+Made chaining possible.
+
+### 0.2.1
+
+- Release
+
+Changed date names to be a more pseudo standardized 'dddd, MMMM Do YYYY, h:mm:ss a'.
+Added `Date.prototype` functions `add`, `subtract`, `isdst`, and `isleapyear`.
+
+### 0.2.0
+
+- Release
+
+Changed function names to be more concise.
+Changed date format from php date format to custom format.
+
+### 0.1.0
+
+- Release
+
+Initial release
+
diff --git a/library/moment/LICENSE b/library/moment/LICENSE
new file mode 100644 (file)
index 0000000..9ee5374
--- /dev/null
@@ -0,0 +1,22 @@
+Copyright (c) 2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/library/moment/README.md b/library/moment/README.md
new file mode 100644 (file)
index 0000000..c45e9d6
--- /dev/null
@@ -0,0 +1,58 @@
+[![Join the chat at https://gitter.im/moment/moment](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/moment/moment?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url]
+[![Coverage Status](https://coveralls.io/repos/moment/moment/badge.svg?branch=develop)](https://coveralls.io/r/moment/moment?branch=develop)
+
+A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
+
+**[Documentation](http://momentjs.com/docs/)**
+
+## Port to ECMAScript 6 (version 2.10.0)
+
+Moment 2.10.0 does not bring any new features, but the code is now written in
+ECMAScript 6 modules and placed inside `src/`. Previously `moment.js`, `locale/*.js` and
+`test/moment/*.js`, `test/locale/*.js` contained the source of the project. Now
+the source is in `src/`, temporary build (ECMAScript 5) files are placed under
+`build/umd/` (for running tests during development), and the `moment.js` and
+`locale/*.js` files are updated only on release.
+
+If you want to use a particular revision of the code, make sure to run
+`grunt transpile update-index`, so `moment.js` and `locales/*.js` are synced
+with `src/*`. We might place that in a commit hook in the future.
+
+## Upgrading to 2.0.0
+
+There are a number of small backwards incompatible changes with version 2.0.0. [See the full descriptions here](https://gist.github.com/timrwood/e72f2eef320ed9e37c51#backwards-incompatible-changes)
+
+ * Changed language ordinal method to return the number + ordinal instead of just the ordinal.
+
+ * Changed two digit year parsing cutoff to match strptime.
+
+ * Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
+
+ * Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
+
+ * Removed the lang data objects from the top level namespace.
+
+ * Duplicate `Date` passed to `moment()` instead of referencing it.
+
+## [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
+
+## [Contributing](https://github.com/moment/moment/blob/develop/CONTRIBUTING.md)
+
+We're looking for co-maintainers! If you want to become a master of time please
+write to [ichernev](https://github.com/ichernev).
+
+## License
+
+Moment.js is freely distributable under the terms of the [MIT license](https://github.com/moment/moment/blob/develop/LICENSE).
+
+[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
+[license-url]: LICENSE
+
+[npm-url]: https://npmjs.org/package/moment
+[npm-version-image]: http://img.shields.io/npm/v/moment.svg?style=flat
+[npm-downloads-image]: http://img.shields.io/npm/dm/moment.svg?style=flat
+
+[travis-url]: http://travis-ci.org/moment/moment
+[travis-image]: http://img.shields.io/travis/moment/moment/develop.svg?style=flat
diff --git a/library/moment/locales.min.js b/library/moment/locales.min.js
new file mode 100644 (file)
index 0000000..9093a81
--- /dev/null
@@ -0,0 +1,256 @@
+!function(a,b){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?b(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],b):b(a.moment)}(this,function(a){"use strict";
+//! moment.js locale configuration
+//! locale : Belarusian [be]
+//! author : Dmitry Demidov : https://github.com/demidov91
+//! author: Praleska: http://praleska.pro/
+//! Author : Menelion Elensúle : https://github.com/Oire
+function b(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function c(a,c,d){var e={mm:c?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:c?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===d?c?"хвіліна":"хвіліну":"h"===d?c?"гадзіна":"гадзіну":a+" "+b(e[d],+a)}
+//! moment.js locale configuration
+//! locale : Breton [br]
+//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
+function d(a,b,c){var d={mm:"munutenn",MM:"miz",dd:"devezh"};return a+" "+g(d[c],a)}function e(a){switch(f(a)){case 1:case 3:case 4:case 5:case 9:return a+" bloaz";default:return a+" vloaz"}}function f(a){return a>9?f(a%10):a}function g(a,b){return 2===b?h(a):a}function h(a){var b={m:"v",b:"v",d:"z"};return void 0===b[a.charAt(0)]?a:b[a.charAt(0)]+a.substring(1)}
+//! moment.js locale configuration
+//! locale : Bosnian [bs]
+//! author : Nedim Cholich : https://github.com/frontyard
+//! based on (hr) translation by Bojan Marković
+function i(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}function j(a){return a>1&&5>a&&1!==~~(a/10)}function k(a,b,c,d){var e=a+" ";switch(c){case"s":// a few seconds / in a few seconds / a few seconds ago
+return b||d?"pár sekund":"pár sekundami";case"m":// a minute / in a minute / a minute ago
+return b?"minuta":d?"minutu":"minutou";case"mm":// 9 minutes / in 9 minutes / 9 minutes ago
+// 9 minutes / in 9 minutes / 9 minutes ago
+return b||d?e+(j(a)?"minuty":"minut"):e+"minutami";break;case"h":// an hour / in an hour / an hour ago
+return b?"hodina":d?"hodinu":"hodinou";case"hh":// 9 hours / in 9 hours / 9 hours ago
+// 9 hours / in 9 hours / 9 hours ago
+return b||d?e+(j(a)?"hodiny":"hodin"):e+"hodinami";break;case"d":// a day / in a day / a day ago
+return b||d?"den":"dnem";case"dd":// 9 days / in 9 days / 9 days ago
+// 9 days / in 9 days / 9 days ago
+return b||d?e+(j(a)?"dny":"dní"):e+"dny";break;case"M":// a month / in a month / a month ago
+return b||d?"měsíc":"měsícem";case"MM":// 9 months / in 9 months / 9 months ago
+// 9 months / in 9 months / 9 months ago
+return b||d?e+(j(a)?"měsíce":"měsíců"):e+"měsíci";break;case"y":// a year / in a year / a year ago
+return b||d?"rok":"rokem";case"yy":// 9 years / in 9 years / 9 years ago
+// 9 years / in 9 years / 9 years ago
+return b||d?e+(j(a)?"roky":"let"):e+"lety"}}
+//! moment.js locale configuration
+//! locale : German (Austria) [de-at]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Martin Groller : https://github.com/MadMG
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+function l(a,b,c,d){var e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?e[c][0]:e[c][1]}
+//! moment.js locale configuration
+//! locale : German [de]
+//! author : lluchs : https://github.com/lluchs
+//! author: Menelion Elensúle: https://github.com/Oire
+//! author : Mikolaj Dadela : https://github.com/mik01aj
+function m(a,b,c,d){var e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?e[c][0]:e[c][1]}function n(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}
+//! moment.js locale configuration
+//! locale : Estonian [et]
+//! author : Henry Kehlmann : https://github.com/madhenry
+//! improvements : Illimar Tambek : https://github.com/ragulka
+function o(a,b,c,d){var e={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[a+" minuti",a+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[a+" tunni",a+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[a+" kuu",a+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[a+" aasta",a+" aastat"]};return b?e[c][2]?e[c][2]:e[c][1]:d?e[c][0]:e[c][1]}function p(a,b,c,d){var e="";switch(c){case"s":return d?"muutaman sekunnin":"muutama sekunti";case"m":return d?"minuutin":"minuutti";case"mm":e=d?"minuutin":"minuuttia";break;case"h":return d?"tunnin":"tunti";case"hh":e=d?"tunnin":"tuntia";break;case"d":return d?"päivän":"päivä";case"dd":e=d?"päivän":"päivää";break;case"M":return d?"kuukauden":"kuukausi";case"MM":e=d?"kuukauden":"kuukautta";break;case"y":return d?"vuoden":"vuosi";case"yy":e=d?"vuoden":"vuotta"}return e=q(a,d)+" "+e}function q(a,b){return 10>a?b?Ca[a]:Ba[a]:a}
+//! moment.js locale configuration
+//! locale : Croatian [hr]
+//! author : Bojan Marković : https://github.com/bmarkovic
+function r(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}function s(a,b,c,d){var e=a;switch(c){case"s":return d||b?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(d||b?" perc":" perce");case"mm":return e+(d||b?" perc":" perce");case"h":return"egy"+(d||b?" óra":" órája");case"hh":return e+(d||b?" óra":" órája");case"d":return"egy"+(d||b?" nap":" napja");case"dd":return e+(d||b?" nap":" napja");case"M":return"egy"+(d||b?" hónap":" hónapja");case"MM":return e+(d||b?" hónap":" hónapja");case"y":return"egy"+(d||b?" év":" éve");case"yy":return e+(d||b?" év":" éve")}return""}function t(a){return(a?"":"[múlt] ")+"["+Ma[this.day()]+"] LT[-kor]"}
+//! moment.js locale configuration
+//! locale : Icelandic [is]
+//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
+function u(a){return a%100===11?!0:a%10!==1}function v(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return b?"mínúta":"mínútu";case"mm":return u(a)?e+(b||d?"mínútur":"mínútum"):b?e+"mínúta":e+"mínútu";case"hh":return u(a)?e+(b||d?"klukkustundir":"klukkustundum"):e+"klukkustund";case"d":return b?"dagur":d?"dag":"degi";case"dd":return u(a)?b?e+"dagar":e+(d?"daga":"dögum"):b?e+"dagur":e+(d?"dag":"degi");case"M":return b?"mánuður":d?"mánuð":"mánuði";case"MM":return u(a)?b?e+"mánuðir":e+(d?"mánuði":"mánuðum"):b?e+"mánuður":e+(d?"mánuð":"mánuði");case"y":return b||d?"ár":"ári";case"yy":return u(a)?e+(b||d?"ár":"árum"):e+(b||d?"ár":"ári")}}
+//! moment.js locale configuration
+//! locale : Luxembourgish [lb]
+//! author : mweimerskirch : https://github.com/mweimerskirch
+//! author : David Raison : https://github.com/kwisatz
+function w(a,b,c,d){var e={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return b?e[c][0]:e[c][1]}function x(a){var b=a.substr(0,a.indexOf(" "));return z(b)?"a "+a:"an "+a}function y(a){var b=a.substr(0,a.indexOf(" "));return z(b)?"viru "+a:"virun "+a}/**
+     * Returns true if the word before the given number loses the '-n' ending.
+     * e.g. 'an 10 Deeg' but 'a 5 Deeg'
+     *
+     * @param number {integer}
+     * @returns {boolean}
+     */
+function z(a){if(a=parseInt(a,10),isNaN(a))return!1;if(0>a)
+// Negative Number --> always true
+return!0;if(10>a)
+// Only 1 digit
+return a>=4&&7>=a;if(100>a){
+// 2 digits
+var b=a%10,c=a/10;return z(0===b?c:b)}if(1e4>a){
+// 3 or 4 digits --> recursively check first digit
+for(;a>=10;)a/=10;return z(a)}
+// Anything larger than 4 digits: recursively check first n-3 digits
+return a/=1e3,z(a)}function A(a,b,c,d){return b?"kelios sekundės":d?"kelių sekundžių":"kelias sekundes"}function B(a,b,c,d){return b?D(c)[0]:d?D(c)[1]:D(c)[2]}function C(a){return a%10===0||a>10&&20>a}function D(a){return Pa[a].split("_")}function E(a,b,c,d){var e=a+" ";return 1===a?e+B(a,b,c[0],d):b?e+(C(a)?D(c)[1]:D(c)[0]):d?e+D(c)[1]:e+(C(a)?D(c)[1]:D(c)[2])}/**
+     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
+     */
+function F(a,b,c){return c?b%10===1&&b%100!==11?a[2]:a[3]:b%10===1&&b%100!==11?a[0]:a[1]}function G(a,b,c){return a+" "+F(Qa[c],a,b)}function H(a,b,c){return F(Qa[c],a,b)}function I(a,b){return b?"dažas sekundes":"dažām sekundēm"}function J(a,b,c,d){var e="";if(b)switch(c){case"s":e="काही सेकंद";break;case"m":e="एक मिनिट";break;case"mm":e="%d मिनिटे";break;case"h":e="एक तास";break;case"hh":e="%d तास";break;case"d":e="एक दिवस";break;case"dd":e="%d दिवस";break;case"M":e="एक महिना";break;case"MM":e="%d महिने";break;case"y":e="एक वर्ष";break;case"yy":e="%d वर्षे"}else switch(c){case"s":e="काही सेकंदां";break;case"m":e="एका मिनिटा";break;case"mm":e="%d मिनिटां";break;case"h":e="एका तासा";break;case"hh":e="%d तासां";break;case"d":e="एका दिवसा";break;case"dd":e="%d दिवसां";break;case"M":e="एका महिन्या";break;case"MM":e="%d महिन्यां";break;case"y":e="एका वर्षा";break;case"yy":e="%d वर्षां"}return e.replace(/%d/i,a)}function K(a){return 5>a%10&&a%10>1&&~~(a/10)%10!==1}function L(a,b,c){var d=a+" ";switch(c){case"m":return b?"minuta":"minutę";case"mm":return d+(K(a)?"minuty":"minut");case"h":return b?"godzina":"godzinę";case"hh":return d+(K(a)?"godziny":"godzin");case"MM":return d+(K(a)?"miesiące":"miesięcy");case"yy":return d+(K(a)?"lata":"lat")}}
+//! moment.js locale configuration
+//! locale : Romanian [ro]
+//! author : Vlad Gurdiga : https://github.com/gurdiga
+//! author : Valentin Agachi : https://github.com/avaly
+function M(a,b,c){var d={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},e=" ";return(a%100>=20||a>=100&&a%100===0)&&(e=" de "),a+e+d[c]}
+//! moment.js locale configuration
+//! locale : Russian [ru]
+//! author : Viktorminator : https://github.com/Viktorminator
+//! Author : Menelion Elensúle : https://github.com/Oire
+//! author : Коренберг Марк : https://github.com/socketpair
+function N(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function O(a,b,c){var d={mm:b?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===c?b?"минута":"минуту":a+" "+N(d[c],+a)}function P(a){return a>1&&5>a}function Q(a,b,c,d){var e=a+" ";switch(c){case"s":// a few seconds / in a few seconds / a few seconds ago
+return b||d?"pár sekúnd":"pár sekundami";case"m":// a minute / in a minute / a minute ago
+return b?"minúta":d?"minútu":"minútou";case"mm":// 9 minutes / in 9 minutes / 9 minutes ago
+// 9 minutes / in 9 minutes / 9 minutes ago
+return b||d?e+(P(a)?"minúty":"minút"):e+"minútami";break;case"h":// an hour / in an hour / an hour ago
+return b?"hodina":d?"hodinu":"hodinou";case"hh":// 9 hours / in 9 hours / 9 hours ago
+// 9 hours / in 9 hours / 9 hours ago
+return b||d?e+(P(a)?"hodiny":"hodín"):e+"hodinami";break;case"d":// a day / in a day / a day ago
+return b||d?"deň":"dňom";case"dd":// 9 days / in 9 days / 9 days ago
+// 9 days / in 9 days / 9 days ago
+return b||d?e+(P(a)?"dni":"dní"):e+"dňami";break;case"M":// a month / in a month / a month ago
+return b||d?"mesiac":"mesiacom";case"MM":// 9 months / in 9 months / 9 months ago
+// 9 months / in 9 months / 9 months ago
+return b||d?e+(P(a)?"mesiace":"mesiacov"):e+"mesiacmi";break;case"y":// a year / in a year / a year ago
+return b||d?"rok":"rokom";case"yy":// 9 years / in 9 years / 9 years ago
+// 9 years / in 9 years / 9 years ago
+return b||d?e+(P(a)?"roky":"rokov"):e+"rokmi"}}
+//! moment.js locale configuration
+//! locale : Slovenian [sl]
+//! author : Robert Sedovšek : https://github.com/sedovsek
+function R(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"nekaj sekund":"nekaj sekundami";case"m":return b?"ena minuta":"eno minuto";case"mm":return e+=1===a?b?"minuta":"minuto":2===a?b||d?"minuti":"minutama":5>a?b||d?"minute":"minutami":b||d?"minut":"minutami";case"h":return b?"ena ura":"eno uro";case"hh":return e+=1===a?b?"ura":"uro":2===a?b||d?"uri":"urama":5>a?b||d?"ure":"urami":b||d?"ur":"urami";case"d":return b||d?"en dan":"enim dnem";case"dd":return e+=1===a?b||d?"dan":"dnem":2===a?b||d?"dni":"dnevoma":b||d?"dni":"dnevi";case"M":return b||d?"en mesec":"enim mesecem";case"MM":return e+=1===a?b||d?"mesec":"mesecem":2===a?b||d?"meseca":"mesecema":5>a?b||d?"mesece":"meseci":b||d?"mesecev":"meseci";case"y":return b||d?"eno leto":"enim letom";case"yy":return e+=1===a?b||d?"leto":"letom":2===a?b||d?"leti":"letoma":5>a?b||d?"leta":"leti":b||d?"let":"leti"}}function S(a){var b=a;return b=-1!==a.indexOf("jaj")?b.slice(0,-3)+"leS":-1!==a.indexOf("jar")?b.slice(0,-3)+"waQ":-1!==a.indexOf("DIS")?b.slice(0,-3)+"nem":b+" pIq"}function T(a){var b=a;return b=-1!==a.indexOf("jaj")?b.slice(0,-3)+"Hu’":-1!==a.indexOf("jar")?b.slice(0,-3)+"wen":-1!==a.indexOf("DIS")?b.slice(0,-3)+"ben":b+" ret"}function U(a,b,c,d){var e=V(a);switch(c){case"mm":return e+" tup";case"hh":return e+" rep";case"dd":return e+" jaj";case"MM":return e+" jar";case"yy":return e+" DIS"}}function V(a){var b=Math.floor(a%1e3/100),c=Math.floor(a%100/10),d=a%10,e="";return b>0&&(e+=lb[b]+"vatlh"),c>0&&(e+=(""!==e?" ":"")+lb[c]+"maH"),d>0&&(e+=(""!==e?" ":"")+lb[d]),""===e?"pagh":e}function W(a,b,c,d){var e={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[a+" míuts",""+a+" míuts"],h:["'n þora","'iensa þora"],hh:[a+" þoras",""+a+" þoras"],d:["'n ziua","'iensa ziua"],dd:[a+" ziuas",""+a+" ziuas"],M:["'n mes","'iens mes"],MM:[a+" mesen",""+a+" mesen"],y:["'n ar","'iens ar"],yy:[a+" ars",""+a+" ars"]};return d?e[c][0]:b?e[c][0]:e[c][1]}
+//! moment.js locale configuration
+//! locale : Ukrainian [uk]
+//! author : zemlanin : https://github.com/zemlanin
+//! Author : Menelion Elensúle : https://github.com/Oire
+function X(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function Y(a,b,c){var d={mm:b?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:b?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===c?b?"хвилина":"хвилину":"h"===c?b?"година":"годину":a+" "+X(d[c],+a)}function Z(a,b){var c={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},d=/(\[[ВвУу]\]) ?dddd/.test(b)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(b)?"genitive":"nominative";return c[d][a.day()]}function $(a){return function(){return a+"о"+(11===this.hours()?"б":"")+"] LT"}}
+//! moment.js locale configuration
+//! locale : Afrikaans [af]
+//! author : Werner Mollentze : https://github.com/wernerm
+var _=(a.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(a){return/^nm$/i.test(a)},meridiem:function(a,b,c){return 12>a?c?"vm":"VM":c?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,// Maandag is die eerste dag van die week.
+doy:4}}),{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"}),aa=function(a){return 0===a?0:1===a?1:2===a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5},ba={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},ca=function(a){return function(b,c,d,e){var f=aa(b),g=ba[a][aa(b)];return 2===f&&(g=g[c?0:1]),g.replace(/%d/i,b)}},da=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],ea=(a.defineLocale("ar-ly",{months:da,monthsShort:da,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(a){return"م"===a},meridiem:function(a,b,c){return 12>a?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:ca("s"),m:ca("m"),mm:ca("m"),h:ca("h"),hh:ca("h"),d:ca("d"),dd:ca("d"),M:ca("M"),MM:ca("M"),y:ca("y"),yy:ca("y")},preparse:function(a){return a.replace(/\u200f/g,"").replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return _[a]}).replace(/,/g,"،")},week:{dow:6,// Saturday is the first day of the week.
+doy:12}}),a.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,// Saturday is the first day of the week.
+doy:12}}),{1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"}),fa={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},ga=(a.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(a){return"م"===a},meridiem:function(a,b,c){return 12>a?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(a){return a.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(a){return fa[a]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return ea[a]}).replace(/,/g,"،")},week:{dow:6,// Saturday is the first day of the week.
+doy:12}}),a.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),{1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"}),ha={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},ia=function(a){return 0===a?0:1===a?1:2===a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5},ja={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},ka=function(a){return function(b,c,d,e){var f=ia(b),g=ja[a][ia(b)];return 2===f&&(g=g[c?0:1]),g.replace(/%d/i,b)}},la=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"],ma=(a.defineLocale("ar",{months:la,monthsShort:la,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(a){return"م"===a},meridiem:function(a,b,c){return 12>a?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:ka("s"),m:ka("m"),mm:ka("m"),h:ka("h"),hh:ka("h"),d:ka("d"),dd:ka("d"),M:ka("M"),MM:ka("M"),y:ka("y"),yy:ka("y")},preparse:function(a){return a.replace(/\u200f/g,"").replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(a){return ha[a]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return ga[a]}).replace(/,/g,"،")},week:{dow:6,// Saturday is the first day of the week.
+doy:12}}),{1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"}),na=(a.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(a){return/^(gündüz|axşam)$/.test(a)},meridiem:function(a,b,c){return 4>a?"gecə":12>a?"səhər":17>a?"gündüz":"axşam"},ordinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(a){if(0===a)// special case for zero
+return a+"-ıncı";var b=a%10,c=a%100-b,d=a>=100?100:null;return a+(ma[b]||ma[c]||ma[d])},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:c,mm:c,h:c,hh:c,d:"дзень",dd:c,M:"месяц",MM:c,y:"год",yy:c},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(a){return/^(дня|вечара)$/.test(a)},meridiem:function(a,b,c){return 4>a?"ночы":12>a?"раніцы":17>a?"дня":"вечара"},ordinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":case"w":case"W":return a%10!==2&&a%10!==3||a%100===12||a%100===13?a+"-ы":a+"-і";case"D":return a+"-га";default:return a}},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(a){var b=a%10,c=a%100;return 0===a?a+"-ев":0===c?a+"-ен":c>10&&20>c?a+"-ти":1===b?a+"-ви":2===b?a+"-ри":7===b||8===b?a+"-ми":a+"-ти"},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),{1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"}),oa={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},pa=(a.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(a){return a.replace(/[১২৩৪৫৬৭৮৯০]/g,function(a){return oa[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return na[a]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(a,b){return 12===a&&(a=0),"রাত"===b&&a>=4||"দুপুর"===b&&5>a||"বিকাল"===b?a+12:a},meridiem:function(a,b,c){return 4>a?"রাত":10>a?"সকাল":17>a?"দুপুর":20>a?"বিকাল":"রাত"},week:{dow:0,// Sunday is the first day of the week.
+doy:6}}),{1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"}),qa={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},ra=(a.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(a){return a.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(a){return qa[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return pa[a]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(a,b){return 12===a&&(a=0),"མཚན་མོ"===b&&a>=4||"ཉིན་གུང"===b&&5>a||"དགོང་དག"===b?a+12:a},meridiem:function(a,b,c){return 4>a?"མཚན་མོ":10>a?"ཞོགས་ཀས":17>a?"ཉིན་གུང":20>a?"དགོང་དག":"མཚན་མོ"},week:{dow:0,// Sunday is the first day of the week.
+doy:6}}),a.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:d,h:"un eur",hh:"%d eur",d:"un devezh",dd:d,M:"ur miz",MM:d,y:"ur bloaz",yy:e},ordinalParse:/\d{1,2}(añ|vet)/,ordinal:function(a){var b=1===a?"añ":"vet";return a+b},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:i,mm:i,h:i,hh:i,d:"dan",dd:i,M:"mjesec",MM:i,y:"godinu",yy:i},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(a,b){var c=1===a?"r":2===a?"n":3===a?"r":4===a?"t":"è";return"w"!==b&&"W"!==b||(c="a"),a+c},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_")),sa="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),ta=(a.defineLocale("cs",{months:ra,monthsShort:sa,monthsParse:function(a,b){var c,d=[];for(c=0;12>c;c++)
+// use custom parser to solve problem with July (červenec)
+d[c]=new RegExp("^"+a[c]+"$|^"+b[c]+"$","i");return d}(ra,sa),shortMonthsParse:function(a){var b,c=[];for(b=0;12>b;b++)c[b]=new RegExp("^"+a[b]+"$","i");return c}(sa),longMonthsParse:function(a){var b,c=[];for(b=0;12>b;b++)c[b]=new RegExp("^"+a[b]+"$","i");return c}(ra),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:k,m:k,mm:k,h:k,hh:k,d:k,dd:k,M:k,MM:k,y:k,yy:k},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(a){var b=/сехет$/i.exec(a)?"рен":/ҫул$/i.exec(a)?"тан":"ран";return a+b},past:"%s каялла",s:"пӗр-ик ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},ordinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,
+// time formats are the same as en-gb
+longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},ordinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
+// traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
+ordinal:function(a){var b=a,c="",d=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed",// 1af to 10fed
+"eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return b>20?c=40===b||50===b||60===b||80===b||100===b?"fed":"ain":b>0&&(c=d[b]),a+c},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY HH:mm"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:l,mm:"%d Minuten",h:l,hh:"%d Stunden",d:l,dd:l,M:l,MM:l,y:l,yy:l},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:m,mm:"%d Minuten",h:m,hh:"%d Stunden",d:m,dd:m,M:m,MM:m,y:m,yy:m},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"]),ua=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],va=(a.defineLocale("dv",{months:ta,monthsShort:ta,weekdays:ua,weekdaysShort:ua,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(a){return"މފ"===a},meridiem:function(a,b,c){return 12>a?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(a){return a.replace(/،/g,",")},postformat:function(a){return a.replace(/,/g,"،")},week:{dow:7,// Sunday is the first day of the week.
+doy:12}}),a.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(a,b){return/D/.test(b.substring(0,b.indexOf("MMMM")))?this._monthsGenitiveEl[a.month()]:this._monthsNominativeEl[a.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(a,b,c){return a>11?c?"μμ":"ΜΜ":c?"πμ":"ΠΜ"},isPM:function(a){return"μ"===(a+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(a,b){var c=this._calendarEl[a],d=b&&b.hours();return n(c)&&(c=c.apply(b)),c.replace("{}",d%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},ordinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),weekdaysShort:"Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-an de] MMMM, YYYY",LLL:"D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-an de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(a){return"p"===a.charAt(0).toLowerCase()},meridiem:function(a,b,c){return a>11?c?"p.t.m.":"P.T.M.":c?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"je %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",//ne 'diurno', ĉar estas uzita por proksimumo
+dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},ordinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),wa="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),xa=(a.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(a,b){return/-MMM-/.test(b)?wa[a.month()]:va[a.month()]},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),ya="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),za=(a.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(a,b){return/-MMM-/.test(b)?ya[a.month()]:xa[a.month()]},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:o,m:o,mm:o,h:o,hh:o,d:o,dd:"%d päeva",M:o,MM:o,y:o,yy:o},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),{1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"}),Aa={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},Ba=(a.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(a){return/بعد از ظهر/.test(a)},meridiem:function(a,b,c){return 12>a?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(a){return a.replace(/[۰-۹]/g,function(a){return Aa[a]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return za[a]}).replace(/,/g,"،")},ordinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,// Saturday is the first day of the week.
+doy:12}}),"nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" ")),Ca=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",Ba[7],Ba[8],Ba[9]],Da=(a.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:p,m:p,mm:p,h:p,hh:p,d:p,dd:p,M:p,MM:p,y:p,yy:p},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(a){return a+(1===a?"er":"e")}}),a.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(a){return a+(1===a?"er":"e")},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|)/,ordinal:function(a){return a+(1===a?"er":"")},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),"jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_")),Ea="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),Fa=(a.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(a,b){return/-MMM-/.test(b)?Ea[a.month()]:Da[a.month()]},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"]),Ga=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],Ha=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],Ia=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],Ja=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],Ka=(a.defineLocale("gd",{months:Fa,monthsShort:Ga,monthsParseExact:!0,weekdays:Ha,weekdaysShort:Ia,weekdaysMin:Ja,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},ordinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(a){var b=1===a?"d":a%10===2?"na":"mh";return a+b},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(a){return 0===a.indexOf("un")?"n"+a:"en "+a},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(a){return 2===a?"שעתיים":a+" שעות"},d:"יום",dd:function(a){return 2===a?"יומיים":a+" ימים"},M:"חודש",MM:function(a){return 2===a?"חודשיים":a+" חודשים"},y:"שנה",yy:function(a){return 2===a?"שנתיים":a%10===0&&10!==a?a+" שנה":a+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(a){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(a)},meridiem:function(a,b,c){return 5>a?"לפנות בוקר":10>a?"בבוקר":12>a?c?'לפנה"צ':"לפני הצהריים":18>a?c?'אחה"צ':"אחרי הצהריים":"בערב"}}),{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"}),La={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},Ma=(a.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(a){return a.replace(/[१२३४५६७८९०]/g,function(a){return La[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return Ka[a]})},
+// Hindi notation for meridiems are quite fuzzy in practice. While there exists
+// a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
+meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(a,b){return 12===a&&(a=0),"रात"===b?4>a?a:a+12:"सुबह"===b?a:"दोपहर"===b?a>=10?a:a+12:"शाम"===b?a+12:void 0},meridiem:function(a,b,c){return 4>a?"रात":10>a?"सुबह":17>a?"दोपहर":20>a?"शाम":"रात"},week:{dow:0,// Sunday is the first day of the week.
+doy:6}}),a.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:r,mm:r,h:r,hh:r,d:"dan",dd:r,M:"mjesec",MM:r,y:"godinu",yy:r},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),"vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ")),Na=(a.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(a){return"u"===a.charAt(1).toLowerCase()},meridiem:function(a,b,c){return 12>a?c===!0?"de":"DE":c===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return t.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return t.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(a){return/^(ցերեկվա|երեկոյան)$/.test(a)},meridiem:function(a){return 4>a?"գիշերվա":12>a?"առավոտվա":17>a?"ցերեկվա":"երեկոյան"},ordinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(a,b){switch(b){case"DDD":case"w":case"W":case"DDDo":return 1===a?a+"-ին":a+"-րդ";default:return a}},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(a,b){return 12===a&&(a=0),"pagi"===b?a:"siang"===b?a>=11?a:a+12:"sore"===b||"malam"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"pagi":15>a?"siang":19>a?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:v,m:v,mm:v,h:"klukkustund",hh:v,d:v,dd:v,M:v,MM:v,y:v,yy:v},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"Do_Lu_Ma_Me_Gi_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(a){return(/^[0-9].+$/.test(a)?"tra":"in")+" "+a},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",LTS:"Ah時m分s秒",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah時m分",LLLL:"YYYY年M月D日Ah時m分 dddd"},meridiemParse:/午前|午後/i,isPM:function(a){return"午後"===a},meridiem:function(a,b,c){return 12>a?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},ordinalParse:/\d{1,2}日/,ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"日";default:return a}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}}),a.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(a,b){return 12===a&&(a=0),"enjing"===b?a:"siyang"===b?a>=11?a:a+12:"sonten"===b||"ndalu"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"enjing":15>a?"siyang":19>a?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(a){return/(წამი|წუთი|საათი|წელი)/.test(a)?a.replace(/ი$/,"ში"):a+"ში"},past:function(a){return/(წამი|წუთი|საათი|დღე|თვე)/.test(a)?a.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(a)?a.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},ordinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(a){return 0===a?a:1===a?a+"-ლი":20>a||100>=a&&a%20===0||a%100===0?"მე-"+a:a+"-ე"},week:{dow:1,doy:7}}),{0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"}),Oa=(a.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},ordinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(a){var b=a%10,c=a>=100?100:null;return a+(Na[a]||Na[b]||Na[c])},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",LTS:"A h시 m분 s초",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h시 m분",LLLL:"YYYY년 MMMM D일 dddd A h시 m분"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"일분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},ordinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(a){return"오후"===a},meridiem:function(a,b,c){return 12>a?"오전":"오후"}}),{0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"}),Pa=(a.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кече саат] LT",lastWeek:"[Өткен аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},ordinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(a){var b=a%10,c=a>=100?100:null;return a+(Oa[a]||Oa[b]||Oa[c])},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){
+// Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
+switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:x,past:y,s:"e puer Sekonnen",m:w,mm:"%d Minutten",h:w,hh:"%d Stonnen",d:w,dd:"%d Deeg",M:w,MM:"%d Méint",y:w,yy:"%d Joer"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(a){return"ຕອນແລງ"===a},meridiem:function(a,b,c){return 12>a?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},ordinalParse:/(ທີ່)\d{1,2}/,ordinal:function(a){return"ທີ່"+a}}),{m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"}),Qa=(a.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?|MMMM?(\[[^\[\]]*\]|\s+)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:A,m:B,mm:E,h:B,hh:E,d:B,dd:E,M:B,MM:E,y:B,yy:E},ordinalParse:/\d{1,2}-oji/,ordinal:function(a){return a+"-oji"},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),{m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")}),Ra=(a.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:I,m:H,mm:G,h:H,hh:G,d:H,dd:G,M:H,MM:G,y:H,yy:G},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),{words:{//Different grammatical cases
+m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(a,b){return 1===a?b[0]:a>=2&&4>=a?b[1]:b[2]},translate:function(a,b,c){var d=Ra.words[c];return 1===c.length?b?d[0]:d[1]:a+" "+Ra.correctGrammaticalCase(a,d)}}),Sa=(a.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var a=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return a[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",m:Ra.translate,mm:Ra.translate,h:Ra.translate,hh:Ra.translate,d:"dan",dd:Ra.translate,M:"mjesec",MM:Ra.translate,y:"godinu",yy:Ra.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(a){var b=a%10,c=a%100;return 0===a?a+"-ев":0===c?a+"-ен":c>10&&20>c?a+"-ти":1===b?a+"-ви":2===b?a+"-ри":7===b||8===b?a+"-ми":a+"-ти"},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(a,b){return 12===a&&(a=0),"രാത്രി"===b&&a>=4||"ഉച്ച കഴിഞ്ഞ്"===b||"വൈകുന്നേരം"===b?a+12:a},meridiem:function(a,b,c){return 4>a?"രാത്രി":12>a?"രാവിലെ":17>a?"ഉച്ച കഴിഞ്ഞ്":20>a?"വൈകുന്നേരം":"രാത്രി"}}),{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"}),Ta={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},Ua=(a.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:J,m:J,mm:J,h:J,hh:J,d:J,dd:J,M:J,MM:J,y:J,yy:J},preparse:function(a){return a.replace(/[१२३४५६७८९०]/g,function(a){return Ta[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return Sa[a]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(a,b){return 12===a&&(a=0),"रात्री"===b?4>a?a:a+12:"सकाळी"===b?a:"दुपारी"===b?a>=10?a:a+12:"सायंकाळी"===b?a+12:void 0},meridiem:function(a,b,c){return 4>a?"रात्री":10>a?"सकाळी":17>a?"दुपारी":20>a?"सायंकाळी":"रात्री"},week:{dow:0,// Sunday is the first day of the week.
+doy:6}}),a.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(a,b){return 12===a&&(a=0),"pagi"===b?a:"tengahari"===b?a>=11?a:a+12:"petang"===b||"malam"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"pagi":15>a?"tengahari":19>a?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(a,b){return 12===a&&(a=0),"pagi"===b?a:"tengahari"===b?a>=11?a:a+12:"petang"===b||"malam"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"pagi":15>a?"tengahari":19>a?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),{1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"}),Va={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},Wa=(a.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(a){return a.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(a){return Va[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return Ua[a]})},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"}),Xa={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},Ya=(a.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(a){return a.replace(/[१२३४५६७८९०]/g,function(a){return Xa[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return Wa[a]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(a,b){return 12===a&&(a=0),"राति"===b?4>a?a:a+12:"बिहान"===b?a:"दिउँसो"===b?a>=10?a:a+12:"साँझ"===b?a+12:void 0},meridiem:function(a,b,c){return 3>a?"राति":12>a?"बिहान":16>a?"दिउँसो":20>a?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,// Sunday is the first day of the week.
+doy:6}}),"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_")),Za="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),$a=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],_a=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,ab=(a.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(a,b){return/-MMM-/.test(b)?Za[a.month()]:Ya[a.month()]},monthsRegex:_a,monthsShortRegex:_a,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:$a,longMonthsParse:$a,shortMonthsParse:$a,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),{1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"}),bb={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},cb=(a.defineLocale("pa-in",{
+// There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.
+months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(a){return a.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(a){return bb[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return ab[a]})},
+// Punjabi notation for meridiems are quite fuzzy in practice. While there exists
+// a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
+meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(a,b){return 12===a&&(a=0),"ਰਾਤ"===b?4>a?a:a+12:"ਸਵੇਰ"===b?a:"ਦੁਪਹਿਰ"===b?a>=10?a:a+12:"ਸ਼ਾਮ"===b?a+12:void 0},meridiem:function(a,b,c){return 4>a?"ਰਾਤ":10>a?"ਸਵੇਰ":17>a?"ਦੁਪਹਿਰ":20>a?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,// Sunday is the first day of the week.
+doy:6}}),"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_")),db="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),eb=(a.defineLocale("pl",{months:function(a,b){return""===b?"("+db[a.month()]+"|"+cb[a.month()]+")":/D MMMM/.test(b)?db[a.month()]:cb[a.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:L,mm:L,h:L,hh:L,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:L,y:"rok",yy:L},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){// Saturday + Sunday
+return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº"}),a.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){// Saturday + Sunday
+return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:M,h:"o oră",hh:M,d:"o zi",dd:M,M:"o lună",MM:M,y:"un an",yy:M},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i]),fb=(a.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{
+// по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
+format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:eb,longMonthsParse:eb,shortMonthsParse:eb,
+// полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
+monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+// копия предыдущего
+monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+// полные названия с падежами
+monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+// Выражение, которое соотвествует только сокращённым формам
+monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(a){if(a.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В следующее] dddd [в] LT";case 1:case 2:case 4:return"[В следующий] dddd [в] LT";case 3:case 5:case 6:return"[В следующую] dddd [в] LT"}},lastWeek:function(a){if(a.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:O,mm:O,h:"час",hh:O,d:"день",dd:O,M:"месяц",MM:O,y:"год",yy:O},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(a){return/^(дня|вечера)$/.test(a)},meridiem:function(a,b,c){return 4>a?"ночи":12>a?"утра":17>a?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":return a+"-й";case"D":return a+"-го";case"w":case"W":return a+"-я";default:return a}},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},ordinalParse:/\d{1,2} වැනි/,ordinal:function(a){return a+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(a){return"ප.ව."===a||"පස් වරු"===a},meridiem:function(a,b,c){return a>11?c?"ප.ව.":"පස් වරු":c?"පෙ.ව.":"පෙර වරු"}}),"január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_")),gb="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),hb=(a.defineLocale("sk",{months:fb,monthsShort:gb,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:Q,m:Q,mm:Q,h:Q,hh:Q,d:Q,dd:Q,M:Q,MM:Q,y:Q,yy:Q},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:R,m:R,mm:R,h:R,hh:R,d:R,dd:R,M:R,MM:R,y:R,yy:R},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(a){return"M"===a.charAt(0)},meridiem:function(a,b,c){return 12>a?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),{words:{//Different grammatical cases
+m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(a,b){return 1===a?b[0]:a>=2&&4>=a?b[1]:b[2]},translate:function(a,b,c){var d=hb.words[c];return 1===c.length?b?d[0]:d[1]:a+" "+hb.correctGrammaticalCase(a,d)}}),ib=(a.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var a=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return a[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:hb.translate,mm:hb.translate,h:hb.translate,hh:hb.translate,d:"дан",dd:hb.translate,M:"месец",MM:hb.translate,y:"годину",yy:hb.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),{words:{//Different grammatical cases
+m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(a,b){return 1===a?b[0]:a>=2&&4>=a?b[1]:b[2]},translate:function(a,b,c){var d=ib.words[c];return 1===c.length?b?d[0]:d[1]:a+" "+ib.correctGrammaticalCase(a,d)}}),jb=(a.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var a=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return a[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:ib.translate,mm:ib.translate,h:ib.translate,hh:ib.translate,d:"dan",dd:ib.translate,M:"mesec",MM:ib.translate,y:"godinu",yy:ib.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(a,b,c){return 11>a?"ekuseni":15>a?"emini":19>a?"entsambama":"ebusuku"},meridiemHour:function(a,b){return 12===a&&(a=0),"ekuseni"===b?a:"emini"===b?a>=11?a:a+12:"entsambama"===b||"ebusuku"===b?0===a?0:a+12:void 0},ordinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}(e|a)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"e":1===b?"a":2===b?"a":"e";return a+c},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),{1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"}),kb={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},lb=(a.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},ordinalParse:/\d{1,2}வது/,ordinal:function(a){return a+"வது"},preparse:function(a){return a.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(a){return kb[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return jb[a]})},
+// refer http://ta.wikipedia.org/s/1er1
+meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(a,b,c){return 2>a?" யாமம்":6>a?" வைகறை":10>a?" காலை":14>a?" நண்பகல்":18>a?" எற்பாடு":22>a?" மாலை":" யாமம்"},meridiemHour:function(a,b){return 12===a&&(a=0),"யாமம்"===b?2>a?a:a+12:"வைகறை"===b||"காலை"===b?a:"நண்பகல்"===b&&a>=10?a:a+12},week:{dow:0,// Sunday is the first day of the week.
+doy:6}}),a.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},ordinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(a,b){return 12===a&&(a=0),"రాత్రి"===b?4>a?a:a+12:"ఉదయం"===b?a:"మధ్యాహ్నం"===b?a>=10?a:a+12:"సాయంత్రం"===b?a+12:void 0},meridiem:function(a,b,c){return 4>a?"రాత్రి":10>a?"ఉదయం":17>a?"మధ్యాహ్నం":20>a?"సాయంత్రం":"రాత్రి"},week:{dow:0,// Sunday is the first day of the week.
+doy:6}}),a.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),// yes, three characters difference
+weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(a){return"หลังเที่ยง"===a},meridiem:function(a,b,c){return 12>a?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}}),a.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"[Ngayon sa] LT",nextDay:"[Bukas sa] LT",nextWeek:"dddd [sa] LT",lastDay:"[Kahapon sa] LT",lastWeek:"dddd [huling linggo] LT",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},ordinalParse:/\d{1,2}/,ordinal:function(a){return a},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),"pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_")),mb=(a.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:S,past:T,s:"puS lup",m:"wa’ tup",mm:U,h:"wa’ rep",hh:U,d:"wa’ jaj",dd:U,M:"wa’ jar",MM:U,y:"wa’ DIS",yy:U},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),{1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"});a.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(a){if(0===a)// special case for zero
+return a+"'ıncı";var b=a%10,c=a%100-b,d=a>=100?100:null;return a+(mb[b]||mb[c]||mb[d])},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(a){return"d'o"===a.toLowerCase()},meridiem:function(a,b,c){return a>11?c?"d'o":"D'O":c?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:W,m:W,mm:W,h:W,hh:W,d:W,dd:W,M:W,MM:W,y:W,yy:W},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,// Saturday is the first day of the week.
+doy:12}}),a.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,// Saturday is the first day of the week.
+doy:12}}),a.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:Z,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:$("[Сьогодні "),nextDay:$("[Завтра "),lastDay:$("[Вчора "),nextWeek:$("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return $("[Минулої] dddd [").call(this);case 1:case 2:case 4:return $("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:Y,mm:Y,h:"годину",hh:Y,d:"день",dd:Y,M:"місяць",MM:Y,y:"рік",yy:Y},
+// M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
+meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(a){return/^(дня|вечора)$/.test(a)},meridiem:function(a,b,c){return 4>a?"ночі":12>a?"ранку":17>a?"дня":"вечора"},ordinalParse:/\d{1,2}-(й|го)/,ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":case"w":case"W":return a+"-й";case"D":return a+"-го";default:return a}},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,// Monday is the first day of the week.
+doy:7}}),a.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(a){return/^ch$/i.test(a)},meridiem:function(a,b,c){return 12>a?c?"sa":"SA":c?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinalParse:/\d{1,2}/,ordinal:function(a){return a},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,b){return 12===a&&(a=0),"凌晨"===b||"早上"===b||"上午"===b?a:"下午"===b||"晚上"===b?a+12:a>=11?a:a+12},meridiem:function(a,b,c){var d=100*a+b;return 600>d?"凌晨":900>d?"早上":1130>d?"上午":1230>d?"中午":1800>d?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var b,c;return b=a().startOf("week"),c=this.diff(b,"days")>=7?"[下]":"[本]",0===this.minutes()?c+"dddAh点整":c+"dddAh点mm"},lastWeek:function(){var b,c;return b=a().startOf("week"),c=this.unix()<b.unix()?"[上]":"[本]",0===this.minutes()?c+"dddAh点整":c+"dddAh点mm"},sameElse:"LL"},ordinalParse:/\d{1,2}(日|月|周)/,ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"日";case"M":return a+"月";case"w":case"W":return a+"周";default:return a}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{
+// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+dow:1,// Monday is the first day of the week.
+doy:4}}),a.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm分",LTS:"Ah點m分s秒",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah點mm分",LLLL:"YYYY年MMMD日ddddAh點mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah點mm分",llll:"YYYY年MMMD日ddddAh點mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,b){return 12===a&&(a=0),"凌晨"===b||"早上"===b||"上午"===b?a:"中午"===b?a>=11?a:a+12:"下午"===b||"晚上"===b?a+12:void 0},meridiem:function(a,b,c){var d=100*a+b;return 600>d?"凌晨":900>d?"早上":1130>d?"上午":1230>d?"中午":1800>d?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinalParse:/\d{1,2}(日|月|週)/,ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"日";case"M":return a+"月";case"w":case"W":return a+"週";default:return a}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}}),a.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm分",LTS:"Ah點m分s秒",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah點mm分",LLLL:"YYYY年MMMD日ddddAh點mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah點mm分",llll:"YYYY年MMMD日ddddAh點mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,b){return 12===a&&(a=0),"凌晨"===b||"早上"===b||"上午"===b?a:"中午"===b?a>=11?a:a+12:"下午"===b||"晚上"===b?a+12:void 0},meridiem:function(a,b,c){var d=100*a+b;return 600>d?"凌晨":900>d?"早上":1130>d?"上午":1230>d?"中午":1800>d?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinalParse:/\d{1,2}(日|月|週)/,ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"日";case"M":return a+"月";case"w":case"W":return a+"週";default:return a}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});a.locale("en")});
\ No newline at end of file
diff --git a/library/moment/moment.js b/library/moment/moment.js
new file mode 100644 (file)
index 0000000..b78115b
--- /dev/null
@@ -0,0 +1,4234 @@
+//! moment.js
+//! version : 2.15.1
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+;(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+    typeof define === 'function' && define.amd ? define(factory) :
+    global.moment = factory()
+}(this, function () { 'use strict';
+
+    var hookCallback;
+
+    function utils_hooks__hooks () {
+        return hookCallback.apply(null, arguments);
+    }
+
+    // This is done to register the method called with moment()
+    // without creating circular dependencies.
+    function setHookCallback (callback) {
+        hookCallback = callback;
+    }
+
+    function isArray(input) {
+        return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
+    }
+
+    function isObject(input) {
+        // IE8 will treat undefined and null as object if it wasn't for
+        // input != null
+        return input != null && Object.prototype.toString.call(input) === '[object Object]';
+    }
+
+    function isObjectEmpty(obj) {
+        var k;
+        for (k in obj) {
+            // even if its not own property I'd still call it non-empty
+            return false;
+        }
+        return true;
+    }
+
+    function isDate(input) {
+        return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
+    }
+
+    function map(arr, fn) {
+        var res = [], i;
+        for (i = 0; i < arr.length; ++i) {
+            res.push(fn(arr[i], i));
+        }
+        return res;
+    }
+
+    function hasOwnProp(a, b) {
+        return Object.prototype.hasOwnProperty.call(a, b);
+    }
+
+    function extend(a, b) {
+        for (var i in b) {
+            if (hasOwnProp(b, i)) {
+                a[i] = b[i];
+            }
+        }
+
+        if (hasOwnProp(b, 'toString')) {
+            a.toString = b.toString;
+        }
+
+        if (hasOwnProp(b, 'valueOf')) {
+            a.valueOf = b.valueOf;
+        }
+
+        return a;
+    }
+
+    function create_utc__createUTC (input, format, locale, strict) {
+        return createLocalOrUTC(input, format, locale, strict, true).utc();
+    }
+
+    function defaultParsingFlags() {
+        // We need to deep clone this object.
+        return {
+            empty           : false,
+            unusedTokens    : [],
+            unusedInput     : [],
+            overflow        : -2,
+            charsLeftOver   : 0,
+            nullInput       : false,
+            invalidMonth    : null,
+            invalidFormat   : false,
+            userInvalidated : false,
+            iso             : false,
+            parsedDateParts : [],
+            meridiem        : null
+        };
+    }
+
+    function getParsingFlags(m) {
+        if (m._pf == null) {
+            m._pf = defaultParsingFlags();
+        }
+        return m._pf;
+    }
+
+    var some;
+    if (Array.prototype.some) {
+        some = Array.prototype.some;
+    } else {
+        some = function (fun) {
+            var t = Object(this);
+            var len = t.length >>> 0;
+
+            for (var i = 0; i < len; i++) {
+                if (i in t && fun.call(this, t[i], i, t)) {
+                    return true;
+                }
+            }
+
+            return false;
+        };
+    }
+
+    function valid__isValid(m) {
+        if (m._isValid == null) {
+            var flags = getParsingFlags(m);
+            var parsedParts = some.call(flags.parsedDateParts, function (i) {
+                return i != null;
+            });
+            var isNowValid = !isNaN(m._d.getTime()) &&
+                flags.overflow < 0 &&
+                !flags.empty &&
+                !flags.invalidMonth &&
+                !flags.invalidWeekday &&
+                !flags.nullInput &&
+                !flags.invalidFormat &&
+                !flags.userInvalidated &&
+                (!flags.meridiem || (flags.meridiem && parsedParts));
+
+            if (m._strict) {
+                isNowValid = isNowValid &&
+                    flags.charsLeftOver === 0 &&
+                    flags.unusedTokens.length === 0 &&
+                    flags.bigHour === undefined;
+            }
+
+            if (Object.isFrozen == null || !Object.isFrozen(m)) {
+                m._isValid = isNowValid;
+            }
+            else {
+                return isNowValid;
+            }
+        }
+        return m._isValid;
+    }
+
+    function valid__createInvalid (flags) {
+        var m = create_utc__createUTC(NaN);
+        if (flags != null) {
+            extend(getParsingFlags(m), flags);
+        }
+        else {
+            getParsingFlags(m).userInvalidated = true;
+        }
+
+        return m;
+    }
+
+    function isUndefined(input) {
+        return input === void 0;
+    }
+
+    // Plugins that add properties should also add the key here (null value),
+    // so we can properly clone ourselves.
+    var momentProperties = utils_hooks__hooks.momentProperties = [];
+
+    function copyConfig(to, from) {
+        var i, prop, val;
+
+        if (!isUndefined(from._isAMomentObject)) {
+            to._isAMomentObject = from._isAMomentObject;
+        }
+        if (!isUndefined(from._i)) {
+            to._i = from._i;
+        }
+        if (!isUndefined(from._f)) {
+            to._f = from._f;
+        }
+        if (!isUndefined(from._l)) {
+            to._l = from._l;
+        }
+        if (!isUndefined(from._strict)) {
+            to._strict = from._strict;
+        }
+        if (!isUndefined(from._tzm)) {
+            to._tzm = from._tzm;
+        }
+        if (!isUndefined(from._isUTC)) {
+            to._isUTC = from._isUTC;
+        }
+        if (!isUndefined(from._offset)) {
+            to._offset = from._offset;
+        }
+        if (!isUndefined(from._pf)) {
+            to._pf = getParsingFlags(from);
+        }
+        if (!isUndefined(from._locale)) {
+            to._locale = from._locale;
+        }
+
+        if (momentProperties.length > 0) {
+            for (i in momentProperties) {
+                prop = momentProperties[i];
+                val = from[prop];
+                if (!isUndefined(val)) {
+                    to[prop] = val;
+                }
+            }
+        }
+
+        return to;
+    }
+
+    var updateInProgress = false;
+
+    // Moment prototype object
+    function Moment(config) {
+        copyConfig(this, config);
+        this._d = new Date(config._d != null ? config._d.getTime() : NaN);
+        // Prevent infinite loop in case updateOffset creates new moment
+        // objects.
+        if (updateInProgress === false) {
+            updateInProgress = true;
+            utils_hooks__hooks.updateOffset(this);
+            updateInProgress = false;
+        }
+    }
+
+    function isMoment (obj) {
+        return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
+    }
+
+    function absFloor (number) {
+        if (number < 0) {
+            // -0 -> 0
+            return Math.ceil(number) || 0;
+        } else {
+            return Math.floor(number);
+        }
+    }
+
+    function toInt(argumentForCoercion) {
+        var coercedNumber = +argumentForCoercion,
+            value = 0;
+
+        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+            value = absFloor(coercedNumber);
+        }
+
+        return value;
+    }
+
+    // compare two arrays, return the number of differences
+    function compareArrays(array1, array2, dontConvert) {
+        var len = Math.min(array1.length, array2.length),
+            lengthDiff = Math.abs(array1.length - array2.length),
+            diffs = 0,
+            i;
+        for (i = 0; i < len; i++) {
+            if ((dontConvert && array1[i] !== array2[i]) ||
+                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
+                diffs++;
+            }
+        }
+        return diffs + lengthDiff;
+    }
+
+    function warn(msg) {
+        if (utils_hooks__hooks.suppressDeprecationWarnings === false &&
+                (typeof console !==  'undefined') && console.warn) {
+            console.warn('Deprecation warning: ' + msg);
+        }
+    }
+
+    function deprecate(msg, fn) {
+        var firstTime = true;
+
+        return extend(function () {
+            if (utils_hooks__hooks.deprecationHandler != null) {
+                utils_hooks__hooks.deprecationHandler(null, msg);
+            }
+            if (firstTime) {
+                var args = [];
+                var arg;
+                for (var i = 0; i < arguments.length; i++) {
+                    arg = '';
+                    if (typeof arguments[i] === 'object') {
+                        arg += '\n[' + i + '] ';
+                        for (var key in arguments[0]) {
+                            arg += key + ': ' + arguments[0][key] + ', ';
+                        }
+                        arg = arg.slice(0, -2); // Remove trailing comma and space
+                    } else {
+                        arg = arguments[i];
+                    }
+                    args.push(arg);
+                }
+                warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
+                firstTime = false;
+            }
+            return fn.apply(this, arguments);
+        }, fn);
+    }
+
+    var deprecations = {};
+
+    function deprecateSimple(name, msg) {
+        if (utils_hooks__hooks.deprecationHandler != null) {
+            utils_hooks__hooks.deprecationHandler(name, msg);
+        }
+        if (!deprecations[name]) {
+            warn(msg);
+            deprecations[name] = true;
+        }
+    }
+
+    utils_hooks__hooks.suppressDeprecationWarnings = false;
+    utils_hooks__hooks.deprecationHandler = null;
+
+    function isFunction(input) {
+        return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
+    }
+
+    function locale_set__set (config) {
+        var prop, i;
+        for (i in config) {
+            prop = config[i];
+            if (isFunction(prop)) {
+                this[i] = prop;
+            } else {
+                this['_' + i] = prop;
+            }
+        }
+        this._config = config;
+        // Lenient ordinal parsing accepts just a number in addition to
+        // number + (possibly) stuff coming from _ordinalParseLenient.
+        this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
+    }
+
+    function mergeConfigs(parentConfig, childConfig) {
+        var res = extend({}, parentConfig), prop;
+        for (prop in childConfig) {
+            if (hasOwnProp(childConfig, prop)) {
+                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
+                    res[prop] = {};
+                    extend(res[prop], parentConfig[prop]);
+                    extend(res[prop], childConfig[prop]);
+                } else if (childConfig[prop] != null) {
+                    res[prop] = childConfig[prop];
+                } else {
+                    delete res[prop];
+                }
+            }
+        }
+        for (prop in parentConfig) {
+            if (hasOwnProp(parentConfig, prop) &&
+                    !hasOwnProp(childConfig, prop) &&
+                    isObject(parentConfig[prop])) {
+                // make sure changes to properties don't modify parent config
+                res[prop] = extend({}, res[prop]);
+            }
+        }
+        return res;
+    }
+
+    function Locale(config) {
+        if (config != null) {
+            this.set(config);
+        }
+    }
+
+    var keys;
+
+    if (Object.keys) {
+        keys = Object.keys;
+    } else {
+        keys = function (obj) {
+            var i, res = [];
+            for (i in obj) {
+                if (hasOwnProp(obj, i)) {
+                    res.push(i);
+                }
+            }
+            return res;
+        };
+    }
+
+    var defaultCalendar = {
+        sameDay : '[Today at] LT',
+        nextDay : '[Tomorrow at] LT',
+        nextWeek : 'dddd [at] LT',
+        lastDay : '[Yesterday at] LT',
+        lastWeek : '[Last] dddd [at] LT',
+        sameElse : 'L'
+    };
+
+    function locale_calendar__calendar (key, mom, now) {
+        var output = this._calendar[key] || this._calendar['sameElse'];
+        return isFunction(output) ? output.call(mom, now) : output;
+    }
+
+    var defaultLongDateFormat = {
+        LTS  : 'h:mm:ss A',
+        LT   : 'h:mm A',
+        L    : 'MM/DD/YYYY',
+        LL   : 'MMMM D, YYYY',
+        LLL  : 'MMMM D, YYYY h:mm A',
+        LLLL : 'dddd, MMMM D, YYYY h:mm A'
+    };
+
+    function longDateFormat (key) {
+        var format = this._longDateFormat[key],
+            formatUpper = this._longDateFormat[key.toUpperCase()];
+
+        if (format || !formatUpper) {
+            return format;
+        }
+
+        this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
+            return val.slice(1);
+        });
+
+        return this._longDateFormat[key];
+    }
+
+    var defaultInvalidDate = 'Invalid date';
+
+    function invalidDate () {
+        return this._invalidDate;
+    }
+
+    var defaultOrdinal = '%d';
+    var defaultOrdinalParse = /\d{1,2}/;
+
+    function ordinal (number) {
+        return this._ordinal.replace('%d', number);
+    }
+
+    var defaultRelativeTime = {
+        future : 'in %s',
+        past   : '%s ago',
+        s  : 'a few seconds',
+        m  : 'a minute',
+        mm : '%d minutes',
+        h  : 'an hour',
+        hh : '%d hours',
+        d  : 'a day',
+        dd : '%d days',
+        M  : 'a month',
+        MM : '%d months',
+        y  : 'a year',
+        yy : '%d years'
+    };
+
+    function relative__relativeTime (number, withoutSuffix, string, isFuture) {
+        var output = this._relativeTime[string];
+        return (isFunction(output)) ?
+            output(number, withoutSuffix, string, isFuture) :
+            output.replace(/%d/i, number);
+    }
+
+    function pastFuture (diff, output) {
+        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+        return isFunction(format) ? format(output) : format.replace(/%s/i, output);
+    }
+
+    var aliases = {};
+
+    function addUnitAlias (unit, shorthand) {
+        var lowerCase = unit.toLowerCase();
+        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
+    }
+
+    function normalizeUnits(units) {
+        return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
+    }
+
+    function normalizeObjectUnits(inputObject) {
+        var normalizedInput = {},
+            normalizedProp,
+            prop;
+
+        for (prop in inputObject) {
+            if (hasOwnProp(inputObject, prop)) {
+                normalizedProp = normalizeUnits(prop);
+                if (normalizedProp) {
+                    normalizedInput[normalizedProp] = inputObject[prop];
+                }
+            }
+        }
+
+        return normalizedInput;
+    }
+
+    var priorities = {};
+
+    function addUnitPriority(unit, priority) {
+        priorities[unit] = priority;
+    }
+
+    function getPrioritizedUnits(unitsObj) {
+        var units = [];
+        for (var u in unitsObj) {
+            units.push({unit: u, priority: priorities[u]});
+        }
+        units.sort(function (a, b) {
+            return a.priority - b.priority;
+        });
+        return units;
+    }
+
+    function makeGetSet (unit, keepTime) {
+        return function (value) {
+            if (value != null) {
+                get_set__set(this, unit, value);
+                utils_hooks__hooks.updateOffset(this, keepTime);
+                return this;
+            } else {
+                return get_set__get(this, unit);
+            }
+        };
+    }
+
+    function get_set__get (mom, unit) {
+        return mom.isValid() ?
+            mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
+    }
+
+    function get_set__set (mom, unit, value) {
+        if (mom.isValid()) {
+            mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+        }
+    }
+
+    // MOMENTS
+
+    function stringGet (units) {
+        units = normalizeUnits(units);
+        if (isFunction(this[units])) {
+            return this[units]();
+        }
+        return this;
+    }
+
+
+    function stringSet (units, value) {
+        if (typeof units === 'object') {
+            units = normalizeObjectUnits(units);
+            var prioritized = getPrioritizedUnits(units);
+            for (var i = 0; i < prioritized.length; i++) {
+                this[prioritized[i].unit](units[prioritized[i].unit]);
+            }
+        } else {
+            units = normalizeUnits(units);
+            if (isFunction(this[units])) {
+                return this[units](value);
+            }
+        }
+        return this;
+    }
+
+    function zeroFill(number, targetLength, forceSign) {
+        var absNumber = '' + Math.abs(number),
+            zerosToFill = targetLength - absNumber.length,
+            sign = number >= 0;
+        return (sign ? (forceSign ? '+' : '') : '-') +
+            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
+    }
+
+    var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
+
+    var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
+
+    var formatFunctions = {};
+
+    var formatTokenFunctions = {};
+
+    // token:    'M'
+    // padded:   ['MM', 2]
+    // ordinal:  'Mo'
+    // callback: function () { this.month() + 1 }
+    function addFormatToken (token, padded, ordinal, callback) {
+        var func = callback;
+        if (typeof callback === 'string') {
+            func = function () {
+                return this[callback]();
+            };
+        }
+        if (token) {
+            formatTokenFunctions[token] = func;
+        }
+        if (padded) {
+            formatTokenFunctions[padded[0]] = function () {
+                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
+            };
+        }
+        if (ordinal) {
+            formatTokenFunctions[ordinal] = function () {
+                return this.localeData().ordinal(func.apply(this, arguments), token);
+            };
+        }
+    }
+
+    function removeFormattingTokens(input) {
+        if (input.match(/\[[\s\S]/)) {
+            return input.replace(/^\[|\]$/g, '');
+        }
+        return input.replace(/\\/g, '');
+    }
+
+    function makeFormatFunction(format) {
+        var array = format.match(formattingTokens), i, length;
+
+        for (i = 0, length = array.length; i < length; i++) {
+            if (formatTokenFunctions[array[i]]) {
+                array[i] = formatTokenFunctions[array[i]];
+            } else {
+                array[i] = removeFormattingTokens(array[i]);
+            }
+        }
+
+        return function (mom) {
+            var output = '', i;
+            for (i = 0; i < length; i++) {
+                output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
+            }
+            return output;
+        };
+    }
+
+    // format date using native date object
+    function formatMoment(m, format) {
+        if (!m.isValid()) {
+            return m.localeData().invalidDate();
+        }
+
+        format = expandFormat(format, m.localeData());
+        formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
+
+        return formatFunctions[format](m);
+    }
+
+    function expandFormat(format, locale) {
+        var i = 5;
+
+        function replaceLongDateFormatTokens(input) {
+            return locale.longDateFormat(input) || input;
+        }
+
+        localFormattingTokens.lastIndex = 0;
+        while (i >= 0 && localFormattingTokens.test(format)) {
+            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
+            localFormattingTokens.lastIndex = 0;
+            i -= 1;
+        }
+
+        return format;
+    }
+
+    var match1         = /\d/;            //       0 - 9
+    var match2         = /\d\d/;          //      00 - 99
+    var match3         = /\d{3}/;         //     000 - 999
+    var match4         = /\d{4}/;         //    0000 - 9999
+    var match6         = /[+-]?\d{6}/;    // -999999 - 999999
+    var match1to2      = /\d\d?/;         //       0 - 99
+    var match3to4      = /\d\d\d\d?/;     //     999 - 9999
+    var match5to6      = /\d\d\d\d\d\d?/; //   99999 - 999999
+    var match1to3      = /\d{1,3}/;       //       0 - 999
+    var match1to4      = /\d{1,4}/;       //       0 - 9999
+    var match1to6      = /[+-]?\d{1,6}/;  // -999999 - 999999
+
+    var matchUnsigned  = /\d+/;           //       0 - inf
+    var matchSigned    = /[+-]?\d+/;      //    -inf - inf
+
+    var matchOffset    = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
+    var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
+
+    var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
+
+    // any word (or two) characters or numbers including two/three word month in arabic.
+    // includes scottish gaelic two word and hyphenated months
+    var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
+
+
+    var regexes = {};
+
+    function addRegexToken (token, regex, strictRegex) {
+        regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
+            return (isStrict && strictRegex) ? strictRegex : regex;
+        };
+    }
+
+    function getParseRegexForToken (token, config) {
+        if (!hasOwnProp(regexes, token)) {
+            return new RegExp(unescapeFormat(token));
+        }
+
+        return regexes[token](config._strict, config._locale);
+    }
+
+    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+    function unescapeFormat(s) {
+        return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
+            return p1 || p2 || p3 || p4;
+        }));
+    }
+
+    function regexEscape(s) {
+        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+    }
+
+    var tokens = {};
+
+    function addParseToken (token, callback) {
+        var i, func = callback;
+        if (typeof token === 'string') {
+            token = [token];
+        }
+        if (typeof callback === 'number') {
+            func = function (input, array) {
+                array[callback] = toInt(input);
+            };
+        }
+        for (i = 0; i < token.length; i++) {
+            tokens[token[i]] = func;
+        }
+    }
+
+    function addWeekParseToken (token, callback) {
+        addParseToken(token, function (input, array, config, token) {
+            config._w = config._w || {};
+            callback(input, config._w, config, token);
+        });
+    }
+
+    function addTimeToArrayFromToken(token, input, config) {
+        if (input != null && hasOwnProp(tokens, token)) {
+            tokens[token](input, config._a, config, token);
+        }
+    }
+
+    var YEAR = 0;
+    var MONTH = 1;
+    var DATE = 2;
+    var HOUR = 3;
+    var MINUTE = 4;
+    var SECOND = 5;
+    var MILLISECOND = 6;
+    var WEEK = 7;
+    var WEEKDAY = 8;
+
+    var indexOf;
+
+    if (Array.prototype.indexOf) {
+        indexOf = Array.prototype.indexOf;
+    } else {
+        indexOf = function (o) {
+            // I know
+            var i;
+            for (i = 0; i < this.length; ++i) {
+                if (this[i] === o) {
+                    return i;
+                }
+            }
+            return -1;
+        };
+    }
+
+    function daysInMonth(year, month) {
+        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
+    }
+
+    // FORMATTING
+
+    addFormatToken('M', ['MM', 2], 'Mo', function () {
+        return this.month() + 1;
+    });
+
+    addFormatToken('MMM', 0, 0, function (format) {
+        return this.localeData().monthsShort(this, format);
+    });
+
+    addFormatToken('MMMM', 0, 0, function (format) {
+        return this.localeData().months(this, format);
+    });
+
+    // ALIASES
+
+    addUnitAlias('month', 'M');
+
+    // PRIORITY
+
+    addUnitPriority('month', 8);
+
+    // PARSING
+
+    addRegexToken('M',    match1to2);
+    addRegexToken('MM',   match1to2, match2);
+    addRegexToken('MMM',  function (isStrict, locale) {
+        return locale.monthsShortRegex(isStrict);
+    });
+    addRegexToken('MMMM', function (isStrict, locale) {
+        return locale.monthsRegex(isStrict);
+    });
+
+    addParseToken(['M', 'MM'], function (input, array) {
+        array[MONTH] = toInt(input) - 1;
+    });
+
+    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
+        var month = config._locale.monthsParse(input, token, config._strict);
+        // if we didn't find a month name, mark the date as invalid.
+        if (month != null) {
+            array[MONTH] = month;
+        } else {
+            getParsingFlags(config).invalidMonth = input;
+        }
+    });
+
+    // LOCALES
+
+    var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/;
+    var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
+    function localeMonths (m, format) {
+        if (!m) {
+            return this._months;
+        }
+        return isArray(this._months) ? this._months[m.month()] :
+            this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
+    }
+
+    var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
+    function localeMonthsShort (m, format) {
+        if (!m) {
+            return this._monthsShort;
+        }
+        return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
+            this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
+    }
+
+    function units_month__handleStrictParse(monthName, format, strict) {
+        var i, ii, mom, llc = monthName.toLocaleLowerCase();
+        if (!this._monthsParse) {
+            // this is not used
+            this._monthsParse = [];
+            this._longMonthsParse = [];
+            this._shortMonthsParse = [];
+            for (i = 0; i < 12; ++i) {
+                mom = create_utc__createUTC([2000, i]);
+                this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
+                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
+            }
+        }
+
+        if (strict) {
+            if (format === 'MMM') {
+                ii = indexOf.call(this._shortMonthsParse, llc);
+                return ii !== -1 ? ii : null;
+            } else {
+                ii = indexOf.call(this._longMonthsParse, llc);
+                return ii !== -1 ? ii : null;
+            }
+        } else {
+            if (format === 'MMM') {
+                ii = indexOf.call(this._shortMonthsParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf.call(this._longMonthsParse, llc);
+                return ii !== -1 ? ii : null;
+            } else {
+                ii = indexOf.call(this._longMonthsParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf.call(this._shortMonthsParse, llc);
+                return ii !== -1 ? ii : null;
+            }
+        }
+    }
+
+    function localeMonthsParse (monthName, format, strict) {
+        var i, mom, regex;
+
+        if (this._monthsParseExact) {
+            return units_month__handleStrictParse.call(this, monthName, format, strict);
+        }
+
+        if (!this._monthsParse) {
+            this._monthsParse = [];
+            this._longMonthsParse = [];
+            this._shortMonthsParse = [];
+        }
+
+        // TODO: add sorting
+        // Sorting makes sure if one month (or abbr) is a prefix of another
+        // see sorting in computeMonthsParse
+        for (i = 0; i < 12; i++) {
+            // make the regex if we don't have it already
+            mom = create_utc__createUTC([2000, i]);
+            if (strict && !this._longMonthsParse[i]) {
+                this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
+                this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
+            }
+            if (!strict && !this._monthsParse[i]) {
+                regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+            }
+            // test the regex
+            if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
+                return i;
+            } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
+                return i;
+            } else if (!strict && this._monthsParse[i].test(monthName)) {
+                return i;
+            }
+        }
+    }
+
+    // MOMENTS
+
+    function setMonth (mom, value) {
+        var dayOfMonth;
+
+        if (!mom.isValid()) {
+            // No op
+            return mom;
+        }
+
+        if (typeof value === 'string') {
+            if (/^\d+$/.test(value)) {
+                value = toInt(value);
+            } else {
+                value = mom.localeData().monthsParse(value);
+                // TODO: Another silent failure?
+                if (typeof value !== 'number') {
+                    return mom;
+                }
+            }
+        }
+
+        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
+        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+        return mom;
+    }
+
+    function getSetMonth (value) {
+        if (value != null) {
+            setMonth(this, value);
+            utils_hooks__hooks.updateOffset(this, true);
+            return this;
+        } else {
+            return get_set__get(this, 'Month');
+        }
+    }
+
+    function getDaysInMonth () {
+        return daysInMonth(this.year(), this.month());
+    }
+
+    var defaultMonthsShortRegex = matchWord;
+    function monthsShortRegex (isStrict) {
+        if (this._monthsParseExact) {
+            if (!hasOwnProp(this, '_monthsRegex')) {
+                computeMonthsParse.call(this);
+            }
+            if (isStrict) {
+                return this._monthsShortStrictRegex;
+            } else {
+                return this._monthsShortRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_monthsShortRegex')) {
+                this._monthsShortRegex = defaultMonthsShortRegex;
+            }
+            return this._monthsShortStrictRegex && isStrict ?
+                this._monthsShortStrictRegex : this._monthsShortRegex;
+        }
+    }
+
+    var defaultMonthsRegex = matchWord;
+    function monthsRegex (isStrict) {
+        if (this._monthsParseExact) {
+            if (!hasOwnProp(this, '_monthsRegex')) {
+                computeMonthsParse.call(this);
+            }
+            if (isStrict) {
+                return this._monthsStrictRegex;
+            } else {
+                return this._monthsRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_monthsRegex')) {
+                this._monthsRegex = defaultMonthsRegex;
+            }
+            return this._monthsStrictRegex && isStrict ?
+                this._monthsStrictRegex : this._monthsRegex;
+        }
+    }
+
+    function computeMonthsParse () {
+        function cmpLenRev(a, b) {
+            return b.length - a.length;
+        }
+
+        var shortPieces = [], longPieces = [], mixedPieces = [],
+            i, mom;
+        for (i = 0; i < 12; i++) {
+            // make the regex if we don't have it already
+            mom = create_utc__createUTC([2000, i]);
+            shortPieces.push(this.monthsShort(mom, ''));
+            longPieces.push(this.months(mom, ''));
+            mixedPieces.push(this.months(mom, ''));
+            mixedPieces.push(this.monthsShort(mom, ''));
+        }
+        // Sorting makes sure if one month (or abbr) is a prefix of another it
+        // will match the longer piece.
+        shortPieces.sort(cmpLenRev);
+        longPieces.sort(cmpLenRev);
+        mixedPieces.sort(cmpLenRev);
+        for (i = 0; i < 12; i++) {
+            shortPieces[i] = regexEscape(shortPieces[i]);
+            longPieces[i] = regexEscape(longPieces[i]);
+        }
+        for (i = 0; i < 24; i++) {
+            mixedPieces[i] = regexEscape(mixedPieces[i]);
+        }
+
+        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+        this._monthsShortRegex = this._monthsRegex;
+        this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
+        this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
+    }
+
+    // FORMATTING
+
+    addFormatToken('Y', 0, 0, function () {
+        var y = this.year();
+        return y <= 9999 ? '' + y : '+' + y;
+    });
+
+    addFormatToken(0, ['YY', 2], 0, function () {
+        return this.year() % 100;
+    });
+
+    addFormatToken(0, ['YYYY',   4],       0, 'year');
+    addFormatToken(0, ['YYYYY',  5],       0, 'year');
+    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
+
+    // ALIASES
+
+    addUnitAlias('year', 'y');
+
+    // PRIORITIES
+
+    addUnitPriority('year', 1);
+
+    // PARSING
+
+    addRegexToken('Y',      matchSigned);
+    addRegexToken('YY',     match1to2, match2);
+    addRegexToken('YYYY',   match1to4, match4);
+    addRegexToken('YYYYY',  match1to6, match6);
+    addRegexToken('YYYYYY', match1to6, match6);
+
+    addParseToken(['YYYYY', 'YYYYYY'], YEAR);
+    addParseToken('YYYY', function (input, array) {
+        array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);
+    });
+    addParseToken('YY', function (input, array) {
+        array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);
+    });
+    addParseToken('Y', function (input, array) {
+        array[YEAR] = parseInt(input, 10);
+    });
+
+    // HELPERS
+
+    function daysInYear(year) {
+        return isLeapYear(year) ? 366 : 365;
+    }
+
+    function isLeapYear(year) {
+        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+    }
+
+    // HOOKS
+
+    utils_hooks__hooks.parseTwoDigitYear = function (input) {
+        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+    };
+
+    // MOMENTS
+
+    var getSetYear = makeGetSet('FullYear', true);
+
+    function getIsLeapYear () {
+        return isLeapYear(this.year());
+    }
+
+    function createDate (y, m, d, h, M, s, ms) {
+        //can't just apply() to create a date:
+        //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
+        var date = new Date(y, m, d, h, M, s, ms);
+
+        //the date constructor remaps years 0-99 to 1900-1999
+        if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
+            date.setFullYear(y);
+        }
+        return date;
+    }
+
+    function createUTCDate (y) {
+        var date = new Date(Date.UTC.apply(null, arguments));
+
+        //the Date.UTC function remaps years 0-99 to 1900-1999
+        if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
+            date.setUTCFullYear(y);
+        }
+        return date;
+    }
+
+    // start-of-first-week - start-of-year
+    function firstWeekOffset(year, dow, doy) {
+        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
+            fwd = 7 + dow - doy,
+            // first-week day local weekday -- which local weekday is fwd
+            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
+
+        return -fwdlw + fwd - 1;
+    }
+
+    //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
+        var localWeekday = (7 + weekday - dow) % 7,
+            weekOffset = firstWeekOffset(year, dow, doy),
+            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
+            resYear, resDayOfYear;
+
+        if (dayOfYear <= 0) {
+            resYear = year - 1;
+            resDayOfYear = daysInYear(resYear) + dayOfYear;
+        } else if (dayOfYear > daysInYear(year)) {
+            resYear = year + 1;
+            resDayOfYear = dayOfYear - daysInYear(year);
+        } else {
+            resYear = year;
+            resDayOfYear = dayOfYear;
+        }
+
+        return {
+            year: resYear,
+            dayOfYear: resDayOfYear
+        };
+    }
+
+    function weekOfYear(mom, dow, doy) {
+        var weekOffset = firstWeekOffset(mom.year(), dow, doy),
+            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
+            resWeek, resYear;
+
+        if (week < 1) {
+            resYear = mom.year() - 1;
+            resWeek = week + weeksInYear(resYear, dow, doy);
+        } else if (week > weeksInYear(mom.year(), dow, doy)) {
+            resWeek = week - weeksInYear(mom.year(), dow, doy);
+            resYear = mom.year() + 1;
+        } else {
+            resYear = mom.year();
+            resWeek = week;
+        }
+
+        return {
+            week: resWeek,
+            year: resYear
+        };
+    }
+
+    function weeksInYear(year, dow, doy) {
+        var weekOffset = firstWeekOffset(year, dow, doy),
+            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
+        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
+    }
+
+    // FORMATTING
+
+    addFormatToken('w', ['ww', 2], 'wo', 'week');
+    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
+
+    // ALIASES
+
+    addUnitAlias('week', 'w');
+    addUnitAlias('isoWeek', 'W');
+
+    // PRIORITIES
+
+    addUnitPriority('week', 5);
+    addUnitPriority('isoWeek', 5);
+
+    // PARSING
+
+    addRegexToken('w',  match1to2);
+    addRegexToken('ww', match1to2, match2);
+    addRegexToken('W',  match1to2);
+    addRegexToken('WW', match1to2, match2);
+
+    addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
+        week[token.substr(0, 1)] = toInt(input);
+    });
+
+    // HELPERS
+
+    // LOCALES
+
+    function localeWeek (mom) {
+        return weekOfYear(mom, this._week.dow, this._week.doy).week;
+    }
+
+    var defaultLocaleWeek = {
+        dow : 0, // Sunday is the first day of the week.
+        doy : 6  // The week that contains Jan 1st is the first week of the year.
+    };
+
+    function localeFirstDayOfWeek () {
+        return this._week.dow;
+    }
+
+    function localeFirstDayOfYear () {
+        return this._week.doy;
+    }
+
+    // MOMENTS
+
+    function getSetWeek (input) {
+        var week = this.localeData().week(this);
+        return input == null ? week : this.add((input - week) * 7, 'd');
+    }
+
+    function getSetISOWeek (input) {
+        var week = weekOfYear(this, 1, 4).week;
+        return input == null ? week : this.add((input - week) * 7, 'd');
+    }
+
+    // FORMATTING
+
+    addFormatToken('d', 0, 'do', 'day');
+
+    addFormatToken('dd', 0, 0, function (format) {
+        return this.localeData().weekdaysMin(this, format);
+    });
+
+    addFormatToken('ddd', 0, 0, function (format) {
+        return this.localeData().weekdaysShort(this, format);
+    });
+
+    addFormatToken('dddd', 0, 0, function (format) {
+        return this.localeData().weekdays(this, format);
+    });
+
+    addFormatToken('e', 0, 0, 'weekday');
+    addFormatToken('E', 0, 0, 'isoWeekday');
+
+    // ALIASES
+
+    addUnitAlias('day', 'd');
+    addUnitAlias('weekday', 'e');
+    addUnitAlias('isoWeekday', 'E');
+
+    // PRIORITY
+    addUnitPriority('day', 11);
+    addUnitPriority('weekday', 11);
+    addUnitPriority('isoWeekday', 11);
+
+    // PARSING
+
+    addRegexToken('d',    match1to2);
+    addRegexToken('e',    match1to2);
+    addRegexToken('E',    match1to2);
+    addRegexToken('dd',   function (isStrict, locale) {
+        return locale.weekdaysMinRegex(isStrict);
+    });
+    addRegexToken('ddd',   function (isStrict, locale) {
+        return locale.weekdaysShortRegex(isStrict);
+    });
+    addRegexToken('dddd',   function (isStrict, locale) {
+        return locale.weekdaysRegex(isStrict);
+    });
+
+    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
+        var weekday = config._locale.weekdaysParse(input, token, config._strict);
+        // if we didn't get a weekday name, mark the date as invalid
+        if (weekday != null) {
+            week.d = weekday;
+        } else {
+            getParsingFlags(config).invalidWeekday = input;
+        }
+    });
+
+    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
+        week[token] = toInt(input);
+    });
+
+    // HELPERS
+
+    function parseWeekday(input, locale) {
+        if (typeof input !== 'string') {
+            return input;
+        }
+
+        if (!isNaN(input)) {
+            return parseInt(input, 10);
+        }
+
+        input = locale.weekdaysParse(input);
+        if (typeof input === 'number') {
+            return input;
+        }
+
+        return null;
+    }
+
+    function parseIsoWeekday(input, locale) {
+        if (typeof input === 'string') {
+            return locale.weekdaysParse(input) % 7 || 7;
+        }
+        return isNaN(input) ? null : input;
+    }
+
+    // LOCALES
+
+    var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
+    function localeWeekdays (m, format) {
+        if (!m) {
+            return this._weekdays;
+        }
+        return isArray(this._weekdays) ? this._weekdays[m.day()] :
+            this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
+    }
+
+    var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
+    function localeWeekdaysShort (m) {
+        return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
+    }
+
+    var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
+    function localeWeekdaysMin (m) {
+        return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
+    }
+
+    function day_of_week__handleStrictParse(weekdayName, format, strict) {
+        var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
+        if (!this._weekdaysParse) {
+            this._weekdaysParse = [];
+            this._shortWeekdaysParse = [];
+            this._minWeekdaysParse = [];
+
+            for (i = 0; i < 7; ++i) {
+                mom = create_utc__createUTC([2000, 1]).day(i);
+                this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
+                this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
+                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
+            }
+        }
+
+        if (strict) {
+            if (format === 'dddd') {
+                ii = indexOf.call(this._weekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            } else if (format === 'ddd') {
+                ii = indexOf.call(this._shortWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            } else {
+                ii = indexOf.call(this._minWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            }
+        } else {
+            if (format === 'dddd') {
+                ii = indexOf.call(this._weekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf.call(this._shortWeekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf.call(this._minWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            } else if (format === 'ddd') {
+                ii = indexOf.call(this._shortWeekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf.call(this._weekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf.call(this._minWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            } else {
+                ii = indexOf.call(this._minWeekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf.call(this._weekdaysParse, llc);
+                if (ii !== -1) {
+                    return ii;
+                }
+                ii = indexOf.call(this._shortWeekdaysParse, llc);
+                return ii !== -1 ? ii : null;
+            }
+        }
+    }
+
+    function localeWeekdaysParse (weekdayName, format, strict) {
+        var i, mom, regex;
+
+        if (this._weekdaysParseExact) {
+            return day_of_week__handleStrictParse.call(this, weekdayName, format, strict);
+        }
+
+        if (!this._weekdaysParse) {
+            this._weekdaysParse = [];
+            this._minWeekdaysParse = [];
+            this._shortWeekdaysParse = [];
+            this._fullWeekdaysParse = [];
+        }
+
+        for (i = 0; i < 7; i++) {
+            // make the regex if we don't have it already
+
+            mom = create_utc__createUTC([2000, 1]).day(i);
+            if (strict && !this._fullWeekdaysParse[i]) {
+                this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
+                this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
+                this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
+            }
+            if (!this._weekdaysParse[i]) {
+                regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
+                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+            }
+            // test the regex
+            if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
+                return i;
+            } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
+                return i;
+            } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
+                return i;
+            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
+                return i;
+            }
+        }
+    }
+
+    // MOMENTS
+
+    function getSetDayOfWeek (input) {
+        if (!this.isValid()) {
+            return input != null ? this : NaN;
+        }
+        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+        if (input != null) {
+            input = parseWeekday(input, this.localeData());
+            return this.add(input - day, 'd');
+        } else {
+            return day;
+        }
+    }
+
+    function getSetLocaleDayOfWeek (input) {
+        if (!this.isValid()) {
+            return input != null ? this : NaN;
+        }
+        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
+        return input == null ? weekday : this.add(input - weekday, 'd');
+    }
+
+    function getSetISODayOfWeek (input) {
+        if (!this.isValid()) {
+            return input != null ? this : NaN;
+        }
+
+        // behaves the same as moment#day except
+        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+        // as a setter, sunday should belong to the previous week.
+
+        if (input != null) {
+            var weekday = parseIsoWeekday(input, this.localeData());
+            return this.day(this.day() % 7 ? weekday : weekday - 7);
+        } else {
+            return this.day() || 7;
+        }
+    }
+
+    var defaultWeekdaysRegex = matchWord;
+    function weekdaysRegex (isStrict) {
+        if (this._weekdaysParseExact) {
+            if (!hasOwnProp(this, '_weekdaysRegex')) {
+                computeWeekdaysParse.call(this);
+            }
+            if (isStrict) {
+                return this._weekdaysStrictRegex;
+            } else {
+                return this._weekdaysRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_weekdaysRegex')) {
+                this._weekdaysRegex = defaultWeekdaysRegex;
+            }
+            return this._weekdaysStrictRegex && isStrict ?
+                this._weekdaysStrictRegex : this._weekdaysRegex;
+        }
+    }
+
+    var defaultWeekdaysShortRegex = matchWord;
+    function weekdaysShortRegex (isStrict) {
+        if (this._weekdaysParseExact) {
+            if (!hasOwnProp(this, '_weekdaysRegex')) {
+                computeWeekdaysParse.call(this);
+            }
+            if (isStrict) {
+                return this._weekdaysShortStrictRegex;
+            } else {
+                return this._weekdaysShortRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_weekdaysShortRegex')) {
+                this._weekdaysShortRegex = defaultWeekdaysShortRegex;
+            }
+            return this._weekdaysShortStrictRegex && isStrict ?
+                this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
+        }
+    }
+
+    var defaultWeekdaysMinRegex = matchWord;
+    function weekdaysMinRegex (isStrict) {
+        if (this._weekdaysParseExact) {
+            if (!hasOwnProp(this, '_weekdaysRegex')) {
+                computeWeekdaysParse.call(this);
+            }
+            if (isStrict) {
+                return this._weekdaysMinStrictRegex;
+            } else {
+                return this._weekdaysMinRegex;
+            }
+        } else {
+            if (!hasOwnProp(this, '_weekdaysMinRegex')) {
+                this._weekdaysMinRegex = defaultWeekdaysMinRegex;
+            }
+            return this._weekdaysMinStrictRegex && isStrict ?
+                this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
+        }
+    }
+
+
+    function computeWeekdaysParse () {
+        function cmpLenRev(a, b) {
+            return b.length - a.length;
+        }
+
+        var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
+            i, mom, minp, shortp, longp;
+        for (i = 0; i < 7; i++) {
+            // make the regex if we don't have it already
+            mom = create_utc__createUTC([2000, 1]).day(i);
+            minp = this.weekdaysMin(mom, '');
+            shortp = this.weekdaysShort(mom, '');
+            longp = this.weekdays(mom, '');
+            minPieces.push(minp);
+            shortPieces.push(shortp);
+            longPieces.push(longp);
+            mixedPieces.push(minp);
+            mixedPieces.push(shortp);
+            mixedPieces.push(longp);
+        }
+        // Sorting makes sure if one weekday (or abbr) is a prefix of another it
+        // will match the longer piece.
+        minPieces.sort(cmpLenRev);
+        shortPieces.sort(cmpLenRev);
+        longPieces.sort(cmpLenRev);
+        mixedPieces.sort(cmpLenRev);
+        for (i = 0; i < 7; i++) {
+            shortPieces[i] = regexEscape(shortPieces[i]);
+            longPieces[i] = regexEscape(longPieces[i]);
+            mixedPieces[i] = regexEscape(mixedPieces[i]);
+        }
+
+        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
+        this._weekdaysShortRegex = this._weekdaysRegex;
+        this._weekdaysMinRegex = this._weekdaysRegex;
+
+        this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
+        this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
+        this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
+    }
+
+    // FORMATTING
+
+    function hFormat() {
+        return this.hours() % 12 || 12;
+    }
+
+    function kFormat() {
+        return this.hours() || 24;
+    }
+
+    addFormatToken('H', ['HH', 2], 0, 'hour');
+    addFormatToken('h', ['hh', 2], 0, hFormat);
+    addFormatToken('k', ['kk', 2], 0, kFormat);
+
+    addFormatToken('hmm', 0, 0, function () {
+        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
+    });
+
+    addFormatToken('hmmss', 0, 0, function () {
+        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
+            zeroFill(this.seconds(), 2);
+    });
+
+    addFormatToken('Hmm', 0, 0, function () {
+        return '' + this.hours() + zeroFill(this.minutes(), 2);
+    });
+
+    addFormatToken('Hmmss', 0, 0, function () {
+        return '' + this.hours() + zeroFill(this.minutes(), 2) +
+            zeroFill(this.seconds(), 2);
+    });
+
+    function meridiem (token, lowercase) {
+        addFormatToken(token, 0, 0, function () {
+            return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
+        });
+    }
+
+    meridiem('a', true);
+    meridiem('A', false);
+
+    // ALIASES
+
+    addUnitAlias('hour', 'h');
+
+    // PRIORITY
+    addUnitPriority('hour', 13);
+
+    // PARSING
+
+    function matchMeridiem (isStrict, locale) {
+        return locale._meridiemParse;
+    }
+
+    addRegexToken('a',  matchMeridiem);
+    addRegexToken('A',  matchMeridiem);
+    addRegexToken('H',  match1to2);
+    addRegexToken('h',  match1to2);
+    addRegexToken('HH', match1to2, match2);
+    addRegexToken('hh', match1to2, match2);
+
+    addRegexToken('hmm', match3to4);
+    addRegexToken('hmmss', match5to6);
+    addRegexToken('Hmm', match3to4);
+    addRegexToken('Hmmss', match5to6);
+
+    addParseToken(['H', 'HH'], HOUR);
+    addParseToken(['a', 'A'], function (input, array, config) {
+        config._isPm = config._locale.isPM(input);
+        config._meridiem = input;
+    });
+    addParseToken(['h', 'hh'], function (input, array, config) {
+        array[HOUR] = toInt(input);
+        getParsingFlags(config).bigHour = true;
+    });
+    addParseToken('hmm', function (input, array, config) {
+        var pos = input.length - 2;
+        array[HOUR] = toInt(input.substr(0, pos));
+        array[MINUTE] = toInt(input.substr(pos));
+        getParsingFlags(config).bigHour = true;
+    });
+    addParseToken('hmmss', function (input, array, config) {
+        var pos1 = input.length - 4;
+        var pos2 = input.length - 2;
+        array[HOUR] = toInt(input.substr(0, pos1));
+        array[MINUTE] = toInt(input.substr(pos1, 2));
+        array[SECOND] = toInt(input.substr(pos2));
+        getParsingFlags(config).bigHour = true;
+    });
+    addParseToken('Hmm', function (input, array, config) {
+        var pos = input.length - 2;
+        array[HOUR] = toInt(input.substr(0, pos));
+        array[MINUTE] = toInt(input.substr(pos));
+    });
+    addParseToken('Hmmss', function (input, array, config) {
+        var pos1 = input.length - 4;
+        var pos2 = input.length - 2;
+        array[HOUR] = toInt(input.substr(0, pos1));
+        array[MINUTE] = toInt(input.substr(pos1, 2));
+        array[SECOND] = toInt(input.substr(pos2));
+    });
+
+    // LOCALES
+
+    function localeIsPM (input) {
+        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+        // Using charAt should be more compatible.
+        return ((input + '').toLowerCase().charAt(0) === 'p');
+    }
+
+    var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
+    function localeMeridiem (hours, minutes, isLower) {
+        if (hours > 11) {
+            return isLower ? 'pm' : 'PM';
+        } else {
+            return isLower ? 'am' : 'AM';
+        }
+    }
+
+
+    // MOMENTS
+
+    // Setting the hour should keep the time, because the user explicitly
+    // specified which hour he wants. So trying to maintain the same hour (in
+    // a new timezone) makes sense. Adding/subtracting hours does not follow
+    // this rule.
+    var getSetHour = makeGetSet('Hours', true);
+
+    var baseConfig = {
+        calendar: defaultCalendar,
+        longDateFormat: defaultLongDateFormat,
+        invalidDate: defaultInvalidDate,
+        ordinal: defaultOrdinal,
+        ordinalParse: defaultOrdinalParse,
+        relativeTime: defaultRelativeTime,
+
+        months: defaultLocaleMonths,
+        monthsShort: defaultLocaleMonthsShort,
+
+        week: defaultLocaleWeek,
+
+        weekdays: defaultLocaleWeekdays,
+        weekdaysMin: defaultLocaleWeekdaysMin,
+        weekdaysShort: defaultLocaleWeekdaysShort,
+
+        meridiemParse: defaultLocaleMeridiemParse
+    };
+
+    // internal storage for locale config files
+    var locales = {};
+    var globalLocale;
+
+    function normalizeLocale(key) {
+        return key ? key.toLowerCase().replace('_', '-') : key;
+    }
+
+    // pick the locale from the array
+    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+    function chooseLocale(names) {
+        var i = 0, j, next, locale, split;
+
+        while (i < names.length) {
+            split = normalizeLocale(names[i]).split('-');
+            j = split.length;
+            next = normalizeLocale(names[i + 1]);
+            next = next ? next.split('-') : null;
+            while (j > 0) {
+                locale = loadLocale(split.slice(0, j).join('-'));
+                if (locale) {
+                    return locale;
+                }
+                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
+                    //the next array item is better than a shallower substring of this one
+                    break;
+                }
+                j--;
+            }
+            i++;
+        }
+        return null;
+    }
+
+    function loadLocale(name) {
+        var oldLocale = null;
+        // TODO: Find a better way to register and load all the locales in Node
+        if (!locales[name] && (typeof module !== 'undefined') &&
+                module && module.exports) {
+            try {
+                oldLocale = globalLocale._abbr;
+                require('./locale/' + name);
+                // because defineLocale currently also sets the global locale, we
+                // want to undo that for lazy loaded locales
+                locale_locales__getSetGlobalLocale(oldLocale);
+            } catch (e) { }
+        }
+        return locales[name];
+    }
+
+    // This function will load locale and then set the global locale.  If
+    // no arguments are passed in, it will simply return the current global
+    // locale key.
+    function locale_locales__getSetGlobalLocale (key, values) {
+        var data;
+        if (key) {
+            if (isUndefined(values)) {
+                data = locale_locales__getLocale(key);
+            }
+            else {
+                data = defineLocale(key, values);
+            }
+
+            if (data) {
+                // moment.duration._locale = moment._locale = data;
+                globalLocale = data;
+            }
+        }
+
+        return globalLocale._abbr;
+    }
+
+    function defineLocale (name, config) {
+        if (config !== null) {
+            var parentConfig = baseConfig;
+            config.abbr = name;
+            if (locales[name] != null) {
+                deprecateSimple('defineLocaleOverride',
+                        'use moment.updateLocale(localeName, config) to change ' +
+                        'an existing locale. moment.defineLocale(localeName, ' +
+                        'config) should only be used for creating a new locale ' +
+                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
+                parentConfig = locales[name]._config;
+            } else if (config.parentLocale != null) {
+                if (locales[config.parentLocale] != null) {
+                    parentConfig = locales[config.parentLocale]._config;
+                } else {
+                    // treat as if there is no base config
+                    deprecateSimple('parentLocaleUndefined',
+                            'specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/');
+                }
+            }
+            locales[name] = new Locale(mergeConfigs(parentConfig, config));
+
+            // backwards compat for now: also set the locale
+            locale_locales__getSetGlobalLocale(name);
+
+            return locales[name];
+        } else {
+            // useful for testing
+            delete locales[name];
+            return null;
+        }
+    }
+
+    function updateLocale(name, config) {
+        if (config != null) {
+            var locale, parentConfig = baseConfig;
+            // MERGE
+            if (locales[name] != null) {
+                parentConfig = locales[name]._config;
+            }
+            config = mergeConfigs(parentConfig, config);
+            locale = new Locale(config);
+            locale.parentLocale = locales[name];
+            locales[name] = locale;
+
+            // backwards compat for now: also set the locale
+            locale_locales__getSetGlobalLocale(name);
+        } else {
+            // pass null for config to unupdate, useful for tests
+            if (locales[name] != null) {
+                if (locales[name].parentLocale != null) {
+                    locales[name] = locales[name].parentLocale;
+                } else if (locales[name] != null) {
+                    delete locales[name];
+                }
+            }
+        }
+        return locales[name];
+    }
+
+    // returns locale data
+    function locale_locales__getLocale (key) {
+        var locale;
+
+        if (key && key._locale && key._locale._abbr) {
+            key = key._locale._abbr;
+        }
+
+        if (!key) {
+            return globalLocale;
+        }
+
+        if (!isArray(key)) {
+            //short-circuit everything else
+            locale = loadLocale(key);
+            if (locale) {
+                return locale;
+            }
+            key = [key];
+        }
+
+        return chooseLocale(key);
+    }
+
+    function locale_locales__listLocales() {
+        return keys(locales);
+    }
+
+    function checkOverflow (m) {
+        var overflow;
+        var a = m._a;
+
+        if (a && getParsingFlags(m).overflow === -2) {
+            overflow =
+                a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :
+                a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
+                a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
+                a[MINUTE]      < 0 || a[MINUTE]      > 59  ? MINUTE :
+                a[SECOND]      < 0 || a[SECOND]      > 59  ? SECOND :
+                a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
+                -1;
+
+            if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
+                overflow = DATE;
+            }
+            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
+                overflow = WEEK;
+            }
+            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
+                overflow = WEEKDAY;
+            }
+
+            getParsingFlags(m).overflow = overflow;
+        }
+
+        return m;
+    }
+
+    // iso 8601 regex
+    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+    var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
+    var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
+
+    var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
+
+    var isoDates = [
+        ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
+        ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
+        ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
+        ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
+        ['YYYY-DDD', /\d{4}-\d{3}/],
+        ['YYYY-MM', /\d{4}-\d\d/, false],
+        ['YYYYYYMMDD', /[+-]\d{10}/],
+        ['YYYYMMDD', /\d{8}/],
+        // YYYYMM is NOT allowed by the standard
+        ['GGGG[W]WWE', /\d{4}W\d{3}/],
+        ['GGGG[W]WW', /\d{4}W\d{2}/, false],
+        ['YYYYDDD', /\d{7}/]
+    ];
+
+    // iso time formats and regexes
+    var isoTimes = [
+        ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
+        ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
+        ['HH:mm:ss', /\d\d:\d\d:\d\d/],
+        ['HH:mm', /\d\d:\d\d/],
+        ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
+        ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
+        ['HHmmss', /\d\d\d\d\d\d/],
+        ['HHmm', /\d\d\d\d/],
+        ['HH', /\d\d/]
+    ];
+
+    var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
+
+    // date from iso format
+    function configFromISO(config) {
+        var i, l,
+            string = config._i,
+            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
+            allowTime, dateFormat, timeFormat, tzFormat;
+
+        if (match) {
+            getParsingFlags(config).iso = true;
+
+            for (i = 0, l = isoDates.length; i < l; i++) {
+                if (isoDates[i][1].exec(match[1])) {
+                    dateFormat = isoDates[i][0];
+                    allowTime = isoDates[i][2] !== false;
+                    break;
+                }
+            }
+            if (dateFormat == null) {
+                config._isValid = false;
+                return;
+            }
+            if (match[3]) {
+                for (i = 0, l = isoTimes.length; i < l; i++) {
+                    if (isoTimes[i][1].exec(match[3])) {
+                        // match[2] should be 'T' or space
+                        timeFormat = (match[2] || ' ') + isoTimes[i][0];
+                        break;
+                    }
+                }
+                if (timeFormat == null) {
+                    config._isValid = false;
+                    return;
+                }
+            }
+            if (!allowTime && timeFormat != null) {
+                config._isValid = false;
+                return;
+            }
+            if (match[4]) {
+                if (tzRegex.exec(match[4])) {
+                    tzFormat = 'Z';
+                } else {
+                    config._isValid = false;
+                    return;
+                }
+            }
+            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
+            configFromStringAndFormat(config);
+        } else {
+            config._isValid = false;
+        }
+    }
+
+    // date from iso format or fallback
+    function configFromString(config) {
+        var matched = aspNetJsonRegex.exec(config._i);
+
+        if (matched !== null) {
+            config._d = new Date(+matched[1]);
+            return;
+        }
+
+        configFromISO(config);
+        if (config._isValid === false) {
+            delete config._isValid;
+            utils_hooks__hooks.createFromInputFallback(config);
+        }
+    }
+
+    utils_hooks__hooks.createFromInputFallback = deprecate(
+        'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' +
+        'which is not reliable across all browsers and versions. Non ISO date formats are ' +
+        'discouraged and will be removed in an upcoming major release. Please refer to ' +
+        'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
+        function (config) {
+            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
+        }
+    );
+
+    // Pick the first defined of two or three arguments.
+    function defaults(a, b, c) {
+        if (a != null) {
+            return a;
+        }
+        if (b != null) {
+            return b;
+        }
+        return c;
+    }
+
+    function currentDateArray(config) {
+        // hooks is actually the exported moment object
+        var nowValue = new Date(utils_hooks__hooks.now());
+        if (config._useUTC) {
+            return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
+        }
+        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
+    }
+
+    // convert an array to a date.
+    // the array should mirror the parameters below
+    // note: all values past the year are optional and will default to the lowest possible value.
+    // [year, month, day , hour, minute, second, millisecond]
+    function configFromArray (config) {
+        var i, date, input = [], currentDate, yearToUse;
+
+        if (config._d) {
+            return;
+        }
+
+        currentDate = currentDateArray(config);
+
+        //compute day of the year from weeks and weekdays
+        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+            dayOfYearFromWeekInfo(config);
+        }
+
+        //if the day of the year is set, figure out what it is
+        if (config._dayOfYear) {
+            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
+
+            if (config._dayOfYear > daysInYear(yearToUse)) {
+                getParsingFlags(config)._overflowDayOfYear = true;
+            }
+
+            date = createUTCDate(yearToUse, 0, config._dayOfYear);
+            config._a[MONTH] = date.getUTCMonth();
+            config._a[DATE] = date.getUTCDate();
+        }
+
+        // Default to current date.
+        // * if no year, month, day of month are given, default to today
+        // * if day of month is given, default month and year
+        // * if month is given, default only year
+        // * if year is given, don't default anything
+        for (i = 0; i < 3 && config._a[i] == null; ++i) {
+            config._a[i] = input[i] = currentDate[i];
+        }
+
+        // Zero out whatever was not defaulted, including time
+        for (; i < 7; i++) {
+            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
+        }
+
+        // Check for 24:00:00.000
+        if (config._a[HOUR] === 24 &&
+                config._a[MINUTE] === 0 &&
+                config._a[SECOND] === 0 &&
+                config._a[MILLISECOND] === 0) {
+            config._nextDay = true;
+            config._a[HOUR] = 0;
+        }
+
+        config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
+        // Apply timezone offset from input. The actual utcOffset can be changed
+        // with parseZone.
+        if (config._tzm != null) {
+            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+        }
+
+        if (config._nextDay) {
+            config._a[HOUR] = 24;
+        }
+    }
+
+    function dayOfYearFromWeekInfo(config) {
+        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
+
+        w = config._w;
+        if (w.GG != null || w.W != null || w.E != null) {
+            dow = 1;
+            doy = 4;
+
+            // TODO: We need to take the current isoWeekYear, but that depends on
+            // how we interpret now (local, utc, fixed offset). So create
+            // a now version of current config (take local/utc/offset flags, and
+            // create now).
+            weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);
+            week = defaults(w.W, 1);
+            weekday = defaults(w.E, 1);
+            if (weekday < 1 || weekday > 7) {
+                weekdayOverflow = true;
+            }
+        } else {
+            dow = config._locale._week.dow;
+            doy = config._locale._week.doy;
+
+            weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);
+            week = defaults(w.w, 1);
+
+            if (w.d != null) {
+                // weekday -- low day numbers are considered next week
+                weekday = w.d;
+                if (weekday < 0 || weekday > 6) {
+                    weekdayOverflow = true;
+                }
+            } else if (w.e != null) {
+                // local weekday -- counting starts from begining of week
+                weekday = w.e + dow;
+                if (w.e < 0 || w.e > 6) {
+                    weekdayOverflow = true;
+                }
+            } else {
+                // default to begining of week
+                weekday = dow;
+            }
+        }
+        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
+            getParsingFlags(config)._overflowWeeks = true;
+        } else if (weekdayOverflow != null) {
+            getParsingFlags(config)._overflowWeekday = true;
+        } else {
+            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
+            config._a[YEAR] = temp.year;
+            config._dayOfYear = temp.dayOfYear;
+        }
+    }
+
+    // constant that refers to the ISO standard
+    utils_hooks__hooks.ISO_8601 = function () {};
+
+    // date from string and format string
+    function configFromStringAndFormat(config) {
+        // TODO: Move this to another part of the creation flow to prevent circular deps
+        if (config._f === utils_hooks__hooks.ISO_8601) {
+            configFromISO(config);
+            return;
+        }
+
+        config._a = [];
+        getParsingFlags(config).empty = true;
+
+        // This array is used to make a Date, either with `new Date` or `Date.UTC`
+        var string = '' + config._i,
+            i, parsedInput, tokens, token, skipped,
+            stringLength = string.length,
+            totalParsedInputLength = 0;
+
+        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
+
+        for (i = 0; i < tokens.length; i++) {
+            token = tokens[i];
+            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
+            // console.log('token', token, 'parsedInput', parsedInput,
+            //         'regex', getParseRegexForToken(token, config));
+            if (parsedInput) {
+                skipped = string.substr(0, string.indexOf(parsedInput));
+                if (skipped.length > 0) {
+                    getParsingFlags(config).unusedInput.push(skipped);
+                }
+                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
+                totalParsedInputLength += parsedInput.length;
+            }
+            // don't parse if it's not a known token
+            if (formatTokenFunctions[token]) {
+                if (parsedInput) {
+                    getParsingFlags(config).empty = false;
+                }
+                else {
+                    getParsingFlags(config).unusedTokens.push(token);
+                }
+                addTimeToArrayFromToken(token, parsedInput, config);
+            }
+            else if (config._strict && !parsedInput) {
+                getParsingFlags(config).unusedTokens.push(token);
+            }
+        }
+
+        // add remaining unparsed input length to the string
+        getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
+        if (string.length > 0) {
+            getParsingFlags(config).unusedInput.push(string);
+        }
+
+        // clear _12h flag if hour is <= 12
+        if (config._a[HOUR] <= 12 &&
+            getParsingFlags(config).bigHour === true &&
+            config._a[HOUR] > 0) {
+            getParsingFlags(config).bigHour = undefined;
+        }
+
+        getParsingFlags(config).parsedDateParts = config._a.slice(0);
+        getParsingFlags(config).meridiem = config._meridiem;
+        // handle meridiem
+        config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
+
+        configFromArray(config);
+        checkOverflow(config);
+    }
+
+
+    function meridiemFixWrap (locale, hour, meridiem) {
+        var isPm;
+
+        if (meridiem == null) {
+            // nothing to do
+            return hour;
+        }
+        if (locale.meridiemHour != null) {
+            return locale.meridiemHour(hour, meridiem);
+        } else if (locale.isPM != null) {
+            // Fallback
+            isPm = locale.isPM(meridiem);
+            if (isPm && hour < 12) {
+                hour += 12;
+            }
+            if (!isPm && hour === 12) {
+                hour = 0;
+            }
+            return hour;
+        } else {
+            // this is not supposed to happen
+            return hour;
+        }
+    }
+
+    // date from string and array of format strings
+    function configFromStringAndArray(config) {
+        var tempConfig,
+            bestMoment,
+
+            scoreToBeat,
+            i,
+            currentScore;
+
+        if (config._f.length === 0) {
+            getParsingFlags(config).invalidFormat = true;
+            config._d = new Date(NaN);
+            return;
+        }
+
+        for (i = 0; i < config._f.length; i++) {
+            currentScore = 0;
+            tempConfig = copyConfig({}, config);
+            if (config._useUTC != null) {
+                tempConfig._useUTC = config._useUTC;
+            }
+            tempConfig._f = config._f[i];
+            configFromStringAndFormat(tempConfig);
+
+            if (!valid__isValid(tempConfig)) {
+                continue;
+            }
+
+            // if there is any input that was not parsed add a penalty for that format
+            currentScore += getParsingFlags(tempConfig).charsLeftOver;
+
+            //or tokens
+            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
+
+            getParsingFlags(tempConfig).score = currentScore;
+
+            if (scoreToBeat == null || currentScore < scoreToBeat) {
+                scoreToBeat = currentScore;
+                bestMoment = tempConfig;
+            }
+        }
+
+        extend(config, bestMoment || tempConfig);
+    }
+
+    function configFromObject(config) {
+        if (config._d) {
+            return;
+        }
+
+        var i = normalizeObjectUnits(config._i);
+        config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
+            return obj && parseInt(obj, 10);
+        });
+
+        configFromArray(config);
+    }
+
+    function createFromConfig (config) {
+        var res = new Moment(checkOverflow(prepareConfig(config)));
+        if (res._nextDay) {
+            // Adding is smart enough around DST
+            res.add(1, 'd');
+            res._nextDay = undefined;
+        }
+
+        return res;
+    }
+
+    function prepareConfig (config) {
+        var input = config._i,
+            format = config._f;
+
+        config._locale = config._locale || locale_locales__getLocale(config._l);
+
+        if (input === null || (format === undefined && input === '')) {
+            return valid__createInvalid({nullInput: true});
+        }
+
+        if (typeof input === 'string') {
+            config._i = input = config._locale.preparse(input);
+        }
+
+        if (isMoment(input)) {
+            return new Moment(checkOverflow(input));
+        } else if (isArray(format)) {
+            configFromStringAndArray(config);
+        } else if (isDate(input)) {
+            config._d = input;
+        } else if (format) {
+            configFromStringAndFormat(config);
+        }  else {
+            configFromInput(config);
+        }
+
+        if (!valid__isValid(config)) {
+            config._d = null;
+        }
+
+        return config;
+    }
+
+    function configFromInput(config) {
+        var input = config._i;
+        if (input === undefined) {
+            config._d = new Date(utils_hooks__hooks.now());
+        } else if (isDate(input)) {
+            config._d = new Date(input.valueOf());
+        } else if (typeof input === 'string') {
+            configFromString(config);
+        } else if (isArray(input)) {
+            config._a = map(input.slice(0), function (obj) {
+                return parseInt(obj, 10);
+            });
+            configFromArray(config);
+        } else if (typeof(input) === 'object') {
+            configFromObject(config);
+        } else if (typeof(input) === 'number') {
+            // from milliseconds
+            config._d = new Date(input);
+        } else {
+            utils_hooks__hooks.createFromInputFallback(config);
+        }
+    }
+
+    function createLocalOrUTC (input, format, locale, strict, isUTC) {
+        var c = {};
+
+        if (typeof(locale) === 'boolean') {
+            strict = locale;
+            locale = undefined;
+        }
+
+        if ((isObject(input) && isObjectEmpty(input)) ||
+                (isArray(input) && input.length === 0)) {
+            input = undefined;
+        }
+        // object construction must be done this way.
+        // https://github.com/moment/moment/issues/1423
+        c._isAMomentObject = true;
+        c._useUTC = c._isUTC = isUTC;
+        c._l = locale;
+        c._i = input;
+        c._f = format;
+        c._strict = strict;
+
+        return createFromConfig(c);
+    }
+
+    function local__createLocal (input, format, locale, strict) {
+        return createLocalOrUTC(input, format, locale, strict, false);
+    }
+
+    var prototypeMin = deprecate(
+        'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
+        function () {
+            var other = local__createLocal.apply(null, arguments);
+            if (this.isValid() && other.isValid()) {
+                return other < this ? this : other;
+            } else {
+                return valid__createInvalid();
+            }
+        }
+    );
+
+    var prototypeMax = deprecate(
+        'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
+        function () {
+            var other = local__createLocal.apply(null, arguments);
+            if (this.isValid() && other.isValid()) {
+                return other > this ? this : other;
+            } else {
+                return valid__createInvalid();
+            }
+        }
+    );
+
+    // Pick a moment m from moments so that m[fn](other) is true for all
+    // other. This relies on the function fn to be transitive.
+    //
+    // moments should either be an array of moment objects or an array, whose
+    // first element is an array of moment objects.
+    function pickBy(fn, moments) {
+        var res, i;
+        if (moments.length === 1 && isArray(moments[0])) {
+            moments = moments[0];
+        }
+        if (!moments.length) {
+            return local__createLocal();
+        }
+        res = moments[0];
+        for (i = 1; i < moments.length; ++i) {
+            if (!moments[i].isValid() || moments[i][fn](res)) {
+                res = moments[i];
+            }
+        }
+        return res;
+    }
+
+    // TODO: Use [].sort instead?
+    function min () {
+        var args = [].slice.call(arguments, 0);
+
+        return pickBy('isBefore', args);
+    }
+
+    function max () {
+        var args = [].slice.call(arguments, 0);
+
+        return pickBy('isAfter', args);
+    }
+
+    var now = function () {
+        return Date.now ? Date.now() : +(new Date());
+    };
+
+    function Duration (duration) {
+        var normalizedInput = normalizeObjectUnits(duration),
+            years = normalizedInput.year || 0,
+            quarters = normalizedInput.quarter || 0,
+            months = normalizedInput.month || 0,
+            weeks = normalizedInput.week || 0,
+            days = normalizedInput.day || 0,
+            hours = normalizedInput.hour || 0,
+            minutes = normalizedInput.minute || 0,
+            seconds = normalizedInput.second || 0,
+            milliseconds = normalizedInput.millisecond || 0;
+
+        // representation for dateAddRemove
+        this._milliseconds = +milliseconds +
+            seconds * 1e3 + // 1000
+            minutes * 6e4 + // 1000 * 60
+            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
+        // Because of dateAddRemove treats 24 hours as different from a
+        // day when working around DST, we need to store them separately
+        this._days = +days +
+            weeks * 7;
+        // It is impossible translate months into days without knowing
+        // which months you are are talking about, so we have to store
+        // it separately.
+        this._months = +months +
+            quarters * 3 +
+            years * 12;
+
+        this._data = {};
+
+        this._locale = locale_locales__getLocale();
+
+        this._bubble();
+    }
+
+    function isDuration (obj) {
+        return obj instanceof Duration;
+    }
+
+    function absRound (number) {
+        if (number < 0) {
+            return Math.round(-1 * number) * -1;
+        } else {
+            return Math.round(number);
+        }
+    }
+
+    // FORMATTING
+
+    function offset (token, separator) {
+        addFormatToken(token, 0, 0, function () {
+            var offset = this.utcOffset();
+            var sign = '+';
+            if (offset < 0) {
+                offset = -offset;
+                sign = '-';
+            }
+            return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
+        });
+    }
+
+    offset('Z', ':');
+    offset('ZZ', '');
+
+    // PARSING
+
+    addRegexToken('Z',  matchShortOffset);
+    addRegexToken('ZZ', matchShortOffset);
+    addParseToken(['Z', 'ZZ'], function (input, array, config) {
+        config._useUTC = true;
+        config._tzm = offsetFromString(matchShortOffset, input);
+    });
+
+    // HELPERS
+
+    // timezone chunker
+    // '+10:00' > ['10',  '00']
+    // '-1530'  > ['-15', '30']
+    var chunkOffset = /([\+\-]|\d\d)/gi;
+
+    function offsetFromString(matcher, string) {
+        var matches = ((string || '').match(matcher) || []);
+        var chunk   = matches[matches.length - 1] || [];
+        var parts   = (chunk + '').match(chunkOffset) || ['-', 0, 0];
+        var minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+        return parts[0] === '+' ? minutes : -minutes;
+    }
+
+    // Return a moment from input, that is local/utc/zone equivalent to model.
+    function cloneWithOffset(input, model) {
+        var res, diff;
+        if (model._isUTC) {
+            res = model.clone();
+            diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf();
+            // Use low-level api, because this fn is low-level api.
+            res._d.setTime(res._d.valueOf() + diff);
+            utils_hooks__hooks.updateOffset(res, false);
+            return res;
+        } else {
+            return local__createLocal(input).local();
+        }
+    }
+
+    function getDateOffset (m) {
+        // On Firefox.24 Date#getTimezoneOffset returns a floating point.
+        // https://github.com/moment/moment/pull/1871
+        return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
+    }
+
+    // HOOKS
+
+    // This function will be called whenever a moment is mutated.
+    // It is intended to keep the offset in sync with the timezone.
+    utils_hooks__hooks.updateOffset = function () {};
+
+    // MOMENTS
+
+    // keepLocalTime = true means only change the timezone, without
+    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
+    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
+    // +0200, so we adjust the time as needed, to be valid.
+    //
+    // Keeping the time actually adds/subtracts (one hour)
+    // from the actual represented time. That is why we call updateOffset
+    // a second time. In case it wants us to change the offset again
+    // _changeInProgress == true case, then we have to adjust, because
+    // there is no such time in the given timezone.
+    function getSetOffset (input, keepLocalTime) {
+        var offset = this._offset || 0,
+            localAdjust;
+        if (!this.isValid()) {
+            return input != null ? this : NaN;
+        }
+        if (input != null) {
+            if (typeof input === 'string') {
+                input = offsetFromString(matchShortOffset, input);
+            } else if (Math.abs(input) < 16) {
+                input = input * 60;
+            }
+            if (!this._isUTC && keepLocalTime) {
+                localAdjust = getDateOffset(this);
+            }
+            this._offset = input;
+            this._isUTC = true;
+            if (localAdjust != null) {
+                this.add(localAdjust, 'm');
+            }
+            if (offset !== input) {
+                if (!keepLocalTime || this._changeInProgress) {
+                    add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);
+                } else if (!this._changeInProgress) {
+                    this._changeInProgress = true;
+                    utils_hooks__hooks.updateOffset(this, true);
+                    this._changeInProgress = null;
+                }
+            }
+            return this;
+        } else {
+            return this._isUTC ? offset : getDateOffset(this);
+        }
+    }
+
+    function getSetZone (input, keepLocalTime) {
+        if (input != null) {
+            if (typeof input !== 'string') {
+                input = -input;
+            }
+
+            this.utcOffset(input, keepLocalTime);
+
+            return this;
+        } else {
+            return -this.utcOffset();
+        }
+    }
+
+    function setOffsetToUTC (keepLocalTime) {
+        return this.utcOffset(0, keepLocalTime);
+    }
+
+    function setOffsetToLocal (keepLocalTime) {
+        if (this._isUTC) {
+            this.utcOffset(0, keepLocalTime);
+            this._isUTC = false;
+
+            if (keepLocalTime) {
+                this.subtract(getDateOffset(this), 'm');
+            }
+        }
+        return this;
+    }
+
+    function setOffsetToParsedOffset () {
+        if (this._tzm) {
+            this.utcOffset(this._tzm);
+        } else if (typeof this._i === 'string') {
+            var tZone = offsetFromString(matchOffset, this._i);
+
+            if (tZone === 0) {
+                this.utcOffset(0, true);
+            } else {
+                this.utcOffset(offsetFromString(matchOffset, this._i));
+            }
+        }
+        return this;
+    }
+
+    function hasAlignedHourOffset (input) {
+        if (!this.isValid()) {
+            return false;
+        }
+        input = input ? local__createLocal(input).utcOffset() : 0;
+
+        return (this.utcOffset() - input) % 60 === 0;
+    }
+
+    function isDaylightSavingTime () {
+        return (
+            this.utcOffset() > this.clone().month(0).utcOffset() ||
+            this.utcOffset() > this.clone().month(5).utcOffset()
+        );
+    }
+
+    function isDaylightSavingTimeShifted () {
+        if (!isUndefined(this._isDSTShifted)) {
+            return this._isDSTShifted;
+        }
+
+        var c = {};
+
+        copyConfig(c, this);
+        c = prepareConfig(c);
+
+        if (c._a) {
+            var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);
+            this._isDSTShifted = this.isValid() &&
+                compareArrays(c._a, other.toArray()) > 0;
+        } else {
+            this._isDSTShifted = false;
+        }
+
+        return this._isDSTShifted;
+    }
+
+    function isLocal () {
+        return this.isValid() ? !this._isUTC : false;
+    }
+
+    function isUtcOffset () {
+        return this.isValid() ? this._isUTC : false;
+    }
+
+    function isUtc () {
+        return this.isValid() ? this._isUTC && this._offset === 0 : false;
+    }
+
+    // ASP.NET json date format regex
+    var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
+
+    // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+    // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+    // and further modified to allow for strings containing both week and day
+    var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;
+
+    function create__createDuration (input, key) {
+        var duration = input,
+            // matching against regexp is expensive, do it on demand
+            match = null,
+            sign,
+            ret,
+            diffRes;
+
+        if (isDuration(input)) {
+            duration = {
+                ms : input._milliseconds,
+                d  : input._days,
+                M  : input._months
+            };
+        } else if (typeof input === 'number') {
+            duration = {};
+            if (key) {
+                duration[key] = input;
+            } else {
+                duration.milliseconds = input;
+            }
+        } else if (!!(match = aspNetRegex.exec(input))) {
+            sign = (match[1] === '-') ? -1 : 1;
+            duration = {
+                y  : 0,
+                d  : toInt(match[DATE])                         * sign,
+                h  : toInt(match[HOUR])                         * sign,
+                m  : toInt(match[MINUTE])                       * sign,
+                s  : toInt(match[SECOND])                       * sign,
+                ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
+            };
+        } else if (!!(match = isoRegex.exec(input))) {
+            sign = (match[1] === '-') ? -1 : 1;
+            duration = {
+                y : parseIso(match[2], sign),
+                M : parseIso(match[3], sign),
+                w : parseIso(match[4], sign),
+                d : parseIso(match[5], sign),
+                h : parseIso(match[6], sign),
+                m : parseIso(match[7], sign),
+                s : parseIso(match[8], sign)
+            };
+        } else if (duration == null) {// checks for null or undefined
+            duration = {};
+        } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
+            diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));
+
+            duration = {};
+            duration.ms = diffRes.milliseconds;
+            duration.M = diffRes.months;
+        }
+
+        ret = new Duration(duration);
+
+        if (isDuration(input) && hasOwnProp(input, '_locale')) {
+            ret._locale = input._locale;
+        }
+
+        return ret;
+    }
+
+    create__createDuration.fn = Duration.prototype;
+
+    function parseIso (inp, sign) {
+        // We'd normally use ~~inp for this, but unfortunately it also
+        // converts floats to ints.
+        // inp may be undefined, so careful calling replace on it.
+        var res = inp && parseFloat(inp.replace(',', '.'));
+        // apply sign while we're at it
+        return (isNaN(res) ? 0 : res) * sign;
+    }
+
+    function positiveMomentsDifference(base, other) {
+        var res = {milliseconds: 0, months: 0};
+
+        res.months = other.month() - base.month() +
+            (other.year() - base.year()) * 12;
+        if (base.clone().add(res.months, 'M').isAfter(other)) {
+            --res.months;
+        }
+
+        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
+
+        return res;
+    }
+
+    function momentsDifference(base, other) {
+        var res;
+        if (!(base.isValid() && other.isValid())) {
+            return {milliseconds: 0, months: 0};
+        }
+
+        other = cloneWithOffset(other, base);
+        if (base.isBefore(other)) {
+            res = positiveMomentsDifference(base, other);
+        } else {
+            res = positiveMomentsDifference(other, base);
+            res.milliseconds = -res.milliseconds;
+            res.months = -res.months;
+        }
+
+        return res;
+    }
+
+    // TODO: remove 'name' arg after deprecation is removed
+    function createAdder(direction, name) {
+        return function (val, period) {
+            var dur, tmp;
+            //invert the arguments, but complain about it
+            if (period !== null && !isNaN(+period)) {
+                deprecateSimple(name, 'moment().' + name  + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
+                'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
+                tmp = val; val = period; period = tmp;
+            }
+
+            val = typeof val === 'string' ? +val : val;
+            dur = create__createDuration(val, period);
+            add_subtract__addSubtract(this, dur, direction);
+            return this;
+        };
+    }
+
+    function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {
+        var milliseconds = duration._milliseconds,
+            days = absRound(duration._days),
+            months = absRound(duration._months);
+
+        if (!mom.isValid()) {
+            // No op
+            return;
+        }
+
+        updateOffset = updateOffset == null ? true : updateOffset;
+
+        if (milliseconds) {
+            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
+        }
+        if (days) {
+            get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);
+        }
+        if (months) {
+            setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);
+        }
+        if (updateOffset) {
+            utils_hooks__hooks.updateOffset(mom, days || months);
+        }
+    }
+
+    var add_subtract__add      = createAdder(1, 'add');
+    var add_subtract__subtract = createAdder(-1, 'subtract');
+
+    function getCalendarFormat(myMoment, now) {
+        var diff = myMoment.diff(now, 'days', true);
+        return diff < -6 ? 'sameElse' :
+                diff < -1 ? 'lastWeek' :
+                diff < 0 ? 'lastDay' :
+                diff < 1 ? 'sameDay' :
+                diff < 2 ? 'nextDay' :
+                diff < 7 ? 'nextWeek' : 'sameElse';
+    }
+
+    function moment_calendar__calendar (time, formats) {
+        // We want to compare the start of today, vs this.
+        // Getting start-of-today depends on whether we're local/utc/offset or not.
+        var now = time || local__createLocal(),
+            sod = cloneWithOffset(now, this).startOf('day'),
+            format = utils_hooks__hooks.calendarFormat(this, sod) || 'sameElse';
+
+        var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
+
+        return this.format(output || this.localeData().calendar(format, this, local__createLocal(now)));
+    }
+
+    function clone () {
+        return new Moment(this);
+    }
+
+    function isAfter (input, units) {
+        var localInput = isMoment(input) ? input : local__createLocal(input);
+        if (!(this.isValid() && localInput.isValid())) {
+            return false;
+        }
+        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
+        if (units === 'millisecond') {
+            return this.valueOf() > localInput.valueOf();
+        } else {
+            return localInput.valueOf() < this.clone().startOf(units).valueOf();
+        }
+    }
+
+    function isBefore (input, units) {
+        var localInput = isMoment(input) ? input : local__createLocal(input);
+        if (!(this.isValid() && localInput.isValid())) {
+            return false;
+        }
+        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
+        if (units === 'millisecond') {
+            return this.valueOf() < localInput.valueOf();
+        } else {
+            return this.clone().endOf(units).valueOf() < localInput.valueOf();
+        }
+    }
+
+    function isBetween (from, to, units, inclusivity) {
+        inclusivity = inclusivity || '()';
+        return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
+            (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
+    }
+
+    function isSame (input, units) {
+        var localInput = isMoment(input) ? input : local__createLocal(input),
+            inputMs;
+        if (!(this.isValid() && localInput.isValid())) {
+            return false;
+        }
+        units = normalizeUnits(units || 'millisecond');
+        if (units === 'millisecond') {
+            return this.valueOf() === localInput.valueOf();
+        } else {
+            inputMs = localInput.valueOf();
+            return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
+        }
+    }
+
+    function isSameOrAfter (input, units) {
+        return this.isSame(input, units) || this.isAfter(input,units);
+    }
+
+    function isSameOrBefore (input, units) {
+        return this.isSame(input, units) || this.isBefore(input,units);
+    }
+
+    function diff (input, units, asFloat) {
+        var that,
+            zoneDelta,
+            delta, output;
+
+        if (!this.isValid()) {
+            return NaN;
+        }
+
+        that = cloneWithOffset(input, this);
+
+        if (!that.isValid()) {
+            return NaN;
+        }
+
+        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
+
+        units = normalizeUnits(units);
+
+        if (units === 'year' || units === 'month' || units === 'quarter') {
+            output = monthDiff(this, that);
+            if (units === 'quarter') {
+                output = output / 3;
+            } else if (units === 'year') {
+                output = output / 12;
+            }
+        } else {
+            delta = this - that;
+            output = units === 'second' ? delta / 1e3 : // 1000
+                units === 'minute' ? delta / 6e4 : // 1000 * 60
+                units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60
+                units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
+                units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
+                delta;
+        }
+        return asFloat ? output : absFloor(output);
+    }
+
+    function monthDiff (a, b) {
+        // difference in months
+        var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
+            // b is in (anchor - 1 month, anchor + 1 month)
+            anchor = a.clone().add(wholeMonthDiff, 'months'),
+            anchor2, adjust;
+
+        if (b - anchor < 0) {
+            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
+            // linear across the month
+            adjust = (b - anchor) / (anchor - anchor2);
+        } else {
+            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
+            // linear across the month
+            adjust = (b - anchor) / (anchor2 - anchor);
+        }
+
+        //check for negative zero, return zero if negative zero
+        return -(wholeMonthDiff + adjust) || 0;
+    }
+
+    utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
+    utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
+
+    function toString () {
+        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
+    }
+
+    function moment_format__toISOString () {
+        var m = this.clone().utc();
+        if (0 < m.year() && m.year() <= 9999) {
+            if (isFunction(Date.prototype.toISOString)) {
+                // native implementation is ~50x faster, use it when we can
+                return this.toDate().toISOString();
+            } else {
+                return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+            }
+        } else {
+            return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+        }
+    }
+
+    function format (inputString) {
+        if (!inputString) {
+            inputString = this.isUtc() ? utils_hooks__hooks.defaultFormatUtc : utils_hooks__hooks.defaultFormat;
+        }
+        var output = formatMoment(this, inputString);
+        return this.localeData().postformat(output);
+    }
+
+    function from (time, withoutSuffix) {
+        if (this.isValid() &&
+                ((isMoment(time) && time.isValid()) ||
+                 local__createLocal(time).isValid())) {
+            return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
+        } else {
+            return this.localeData().invalidDate();
+        }
+    }
+
+    function fromNow (withoutSuffix) {
+        return this.from(local__createLocal(), withoutSuffix);
+    }
+
+    function to (time, withoutSuffix) {
+        if (this.isValid() &&
+                ((isMoment(time) && time.isValid()) ||
+                 local__createLocal(time).isValid())) {
+            return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
+        } else {
+            return this.localeData().invalidDate();
+        }
+    }
+
+    function toNow (withoutSuffix) {
+        return this.to(local__createLocal(), withoutSuffix);
+    }
+
+    // If passed a locale key, it will set the locale for this
+    // instance.  Otherwise, it will return the locale configuration
+    // variables for this instance.
+    function locale (key) {
+        var newLocaleData;
+
+        if (key === undefined) {
+            return this._locale._abbr;
+        } else {
+            newLocaleData = locale_locales__getLocale(key);
+            if (newLocaleData != null) {
+                this._locale = newLocaleData;
+            }
+            return this;
+        }
+    }
+
+    var lang = deprecate(
+        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
+        function (key) {
+            if (key === undefined) {
+                return this.localeData();
+            } else {
+                return this.locale(key);
+            }
+        }
+    );
+
+    function localeData () {
+        return this._locale;
+    }
+
+    function startOf (units) {
+        units = normalizeUnits(units);
+        // the following switch intentionally omits break keywords
+        // to utilize falling through the cases.
+        switch (units) {
+            case 'year':
+                this.month(0);
+                /* falls through */
+            case 'quarter':
+            case 'month':
+                this.date(1);
+                /* falls through */
+            case 'week':
+            case 'isoWeek':
+            case 'day':
+            case 'date':
+                this.hours(0);
+                /* falls through */
+            case 'hour':
+                this.minutes(0);
+                /* falls through */
+            case 'minute':
+                this.seconds(0);
+                /* falls through */
+            case 'second':
+                this.milliseconds(0);
+        }
+
+        // weeks are a special case
+        if (units === 'week') {
+            this.weekday(0);
+        }
+        if (units === 'isoWeek') {
+            this.isoWeekday(1);
+        }
+
+        // quarters are also special
+        if (units === 'quarter') {
+            this.month(Math.floor(this.month() / 3) * 3);
+        }
+
+        return this;
+    }
+
+    function endOf (units) {
+        units = normalizeUnits(units);
+        if (units === undefined || units === 'millisecond') {
+            return this;
+        }
+
+        // 'date' is an alias for 'day', so it should be considered as such.
+        if (units === 'date') {
+            units = 'day';
+        }
+
+        return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
+    }
+
+    function to_type__valueOf () {
+        return this._d.valueOf() - ((this._offset || 0) * 60000);
+    }
+
+    function unix () {
+        return Math.floor(this.valueOf() / 1000);
+    }
+
+    function toDate () {
+        return new Date(this.valueOf());
+    }
+
+    function toArray () {
+        var m = this;
+        return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
+    }
+
+    function toObject () {
+        var m = this;
+        return {
+            years: m.year(),
+            months: m.month(),
+            date: m.date(),
+            hours: m.hours(),
+            minutes: m.minutes(),
+            seconds: m.seconds(),
+            milliseconds: m.milliseconds()
+        };
+    }
+
+    function toJSON () {
+        // new Date(NaN).toJSON() === null
+        return this.isValid() ? this.toISOString() : null;
+    }
+
+    function moment_valid__isValid () {
+        return valid__isValid(this);
+    }
+
+    function parsingFlags () {
+        return extend({}, getParsingFlags(this));
+    }
+
+    function invalidAt () {
+        return getParsingFlags(this).overflow;
+    }
+
+    function creationData() {
+        return {
+            input: this._i,
+            format: this._f,
+            locale: this._locale,
+            isUTC: this._isUTC,
+            strict: this._strict
+        };
+    }
+
+    // FORMATTING
+
+    addFormatToken(0, ['gg', 2], 0, function () {
+        return this.weekYear() % 100;
+    });
+
+    addFormatToken(0, ['GG', 2], 0, function () {
+        return this.isoWeekYear() % 100;
+    });
+
+    function addWeekYearFormatToken (token, getter) {
+        addFormatToken(0, [token, token.length], 0, getter);
+    }
+
+    addWeekYearFormatToken('gggg',     'weekYear');
+    addWeekYearFormatToken('ggggg',    'weekYear');
+    addWeekYearFormatToken('GGGG',  'isoWeekYear');
+    addWeekYearFormatToken('GGGGG', 'isoWeekYear');
+
+    // ALIASES
+
+    addUnitAlias('weekYear', 'gg');
+    addUnitAlias('isoWeekYear', 'GG');
+
+    // PRIORITY
+
+    addUnitPriority('weekYear', 1);
+    addUnitPriority('isoWeekYear', 1);
+
+
+    // PARSING
+
+    addRegexToken('G',      matchSigned);
+    addRegexToken('g',      matchSigned);
+    addRegexToken('GG',     match1to2, match2);
+    addRegexToken('gg',     match1to2, match2);
+    addRegexToken('GGGG',   match1to4, match4);
+    addRegexToken('gggg',   match1to4, match4);
+    addRegexToken('GGGGG',  match1to6, match6);
+    addRegexToken('ggggg',  match1to6, match6);
+
+    addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
+        week[token.substr(0, 2)] = toInt(input);
+    });
+
+    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
+        week[token] = utils_hooks__hooks.parseTwoDigitYear(input);
+    });
+
+    // MOMENTS
+
+    function getSetWeekYear (input) {
+        return getSetWeekYearHelper.call(this,
+                input,
+                this.week(),
+                this.weekday(),
+                this.localeData()._week.dow,
+                this.localeData()._week.doy);
+    }
+
+    function getSetISOWeekYear (input) {
+        return getSetWeekYearHelper.call(this,
+                input, this.isoWeek(), this.isoWeekday(), 1, 4);
+    }
+
+    function getISOWeeksInYear () {
+        return weeksInYear(this.year(), 1, 4);
+    }
+
+    function getWeeksInYear () {
+        var weekInfo = this.localeData()._week;
+        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+    }
+
+    function getSetWeekYearHelper(input, week, weekday, dow, doy) {
+        var weeksTarget;
+        if (input == null) {
+            return weekOfYear(this, dow, doy).year;
+        } else {
+            weeksTarget = weeksInYear(input, dow, doy);
+            if (week > weeksTarget) {
+                week = weeksTarget;
+            }
+            return setWeekAll.call(this, input, week, weekday, dow, doy);
+        }
+    }
+
+    function setWeekAll(weekYear, week, weekday, dow, doy) {
+        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
+            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
+
+        this.year(date.getUTCFullYear());
+        this.month(date.getUTCMonth());
+        this.date(date.getUTCDate());
+        return this;
+    }
+
+    // FORMATTING
+
+    addFormatToken('Q', 0, 'Qo', 'quarter');
+
+    // ALIASES
+
+    addUnitAlias('quarter', 'Q');
+
+    // PRIORITY
+
+    addUnitPriority('quarter', 7);
+
+    // PARSING
+
+    addRegexToken('Q', match1);
+    addParseToken('Q', function (input, array) {
+        array[MONTH] = (toInt(input) - 1) * 3;
+    });
+
+    // MOMENTS
+
+    function getSetQuarter (input) {
+        return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
+    }
+
+    // FORMATTING
+
+    addFormatToken('D', ['DD', 2], 'Do', 'date');
+
+    // ALIASES
+
+    addUnitAlias('date', 'D');
+
+    // PRIOROITY
+    addUnitPriority('date', 9);
+
+    // PARSING
+
+    addRegexToken('D',  match1to2);
+    addRegexToken('DD', match1to2, match2);
+    addRegexToken('Do', function (isStrict, locale) {
+        return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;
+    });
+
+    addParseToken(['D', 'DD'], DATE);
+    addParseToken('Do', function (input, array) {
+        array[DATE] = toInt(input.match(match1to2)[0], 10);
+    });
+
+    // MOMENTS
+
+    var getSetDayOfMonth = makeGetSet('Date', true);
+
+    // FORMATTING
+
+    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
+
+    // ALIASES
+
+    addUnitAlias('dayOfYear', 'DDD');
+
+    // PRIORITY
+    addUnitPriority('dayOfYear', 4);
+
+    // PARSING
+
+    addRegexToken('DDD',  match1to3);
+    addRegexToken('DDDD', match3);
+    addParseToken(['DDD', 'DDDD'], function (input, array, config) {
+        config._dayOfYear = toInt(input);
+    });
+
+    // HELPERS
+
+    // MOMENTS
+
+    function getSetDayOfYear (input) {
+        var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
+        return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
+    }
+
+    // FORMATTING
+
+    addFormatToken('m', ['mm', 2], 0, 'minute');
+
+    // ALIASES
+
+    addUnitAlias('minute', 'm');
+
+    // PRIORITY
+
+    addUnitPriority('minute', 14);
+
+    // PARSING
+
+    addRegexToken('m',  match1to2);
+    addRegexToken('mm', match1to2, match2);
+    addParseToken(['m', 'mm'], MINUTE);
+
+    // MOMENTS
+
+    var getSetMinute = makeGetSet('Minutes', false);
+
+    // FORMATTING
+
+    addFormatToken('s', ['ss', 2], 0, 'second');
+
+    // ALIASES
+
+    addUnitAlias('second', 's');
+
+    // PRIORITY
+
+    addUnitPriority('second', 15);
+
+    // PARSING
+
+    addRegexToken('s',  match1to2);
+    addRegexToken('ss', match1to2, match2);
+    addParseToken(['s', 'ss'], SECOND);
+
+    // MOMENTS
+
+    var getSetSecond = makeGetSet('Seconds', false);
+
+    // FORMATTING
+
+    addFormatToken('S', 0, 0, function () {
+        return ~~(this.millisecond() / 100);
+    });
+
+    addFormatToken(0, ['SS', 2], 0, function () {
+        return ~~(this.millisecond() / 10);
+    });
+
+    addFormatToken(0, ['SSS', 3], 0, 'millisecond');
+    addFormatToken(0, ['SSSS', 4], 0, function () {
+        return this.millisecond() * 10;
+    });
+    addFormatToken(0, ['SSSSS', 5], 0, function () {
+        return this.millisecond() * 100;
+    });
+    addFormatToken(0, ['SSSSSS', 6], 0, function () {
+        return this.millisecond() * 1000;
+    });
+    addFormatToken(0, ['SSSSSSS', 7], 0, function () {
+        return this.millisecond() * 10000;
+    });
+    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
+        return this.millisecond() * 100000;
+    });
+    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
+        return this.millisecond() * 1000000;
+    });
+
+
+    // ALIASES
+
+    addUnitAlias('millisecond', 'ms');
+
+    // PRIORITY
+
+    addUnitPriority('millisecond', 16);
+
+    // PARSING
+
+    addRegexToken('S',    match1to3, match1);
+    addRegexToken('SS',   match1to3, match2);
+    addRegexToken('SSS',  match1to3, match3);
+
+    var token;
+    for (token = 'SSSS'; token.length <= 9; token += 'S') {
+        addRegexToken(token, matchUnsigned);
+    }
+
+    function parseMs(input, array) {
+        array[MILLISECOND] = toInt(('0.' + input) * 1000);
+    }
+
+    for (token = 'S'; token.length <= 9; token += 'S') {
+        addParseToken(token, parseMs);
+    }
+    // MOMENTS
+
+    var getSetMillisecond = makeGetSet('Milliseconds', false);
+
+    // FORMATTING
+
+    addFormatToken('z',  0, 0, 'zoneAbbr');
+    addFormatToken('zz', 0, 0, 'zoneName');
+
+    // MOMENTS
+
+    function getZoneAbbr () {
+        return this._isUTC ? 'UTC' : '';
+    }
+
+    function getZoneName () {
+        return this._isUTC ? 'Coordinated Universal Time' : '';
+    }
+
+    var momentPrototype__proto = Moment.prototype;
+
+    momentPrototype__proto.add               = add_subtract__add;
+    momentPrototype__proto.calendar          = moment_calendar__calendar;
+    momentPrototype__proto.clone             = clone;
+    momentPrototype__proto.diff              = diff;
+    momentPrototype__proto.endOf             = endOf;
+    momentPrototype__proto.format            = format;
+    momentPrototype__proto.from              = from;
+    momentPrototype__proto.fromNow           = fromNow;
+    momentPrototype__proto.to                = to;
+    momentPrototype__proto.toNow             = toNow;
+    momentPrototype__proto.get               = stringGet;
+    momentPrototype__proto.invalidAt         = invalidAt;
+    momentPrototype__proto.isAfter           = isAfter;
+    momentPrototype__proto.isBefore          = isBefore;
+    momentPrototype__proto.isBetween         = isBetween;
+    momentPrototype__proto.isSame            = isSame;
+    momentPrototype__proto.isSameOrAfter     = isSameOrAfter;
+    momentPrototype__proto.isSameOrBefore    = isSameOrBefore;
+    momentPrototype__proto.isValid           = moment_valid__isValid;
+    momentPrototype__proto.lang              = lang;
+    momentPrototype__proto.locale            = locale;
+    momentPrototype__proto.localeData        = localeData;
+    momentPrototype__proto.max               = prototypeMax;
+    momentPrototype__proto.min               = prototypeMin;
+    momentPrototype__proto.parsingFlags      = parsingFlags;
+    momentPrototype__proto.set               = stringSet;
+    momentPrototype__proto.startOf           = startOf;
+    momentPrototype__proto.subtract          = add_subtract__subtract;
+    momentPrototype__proto.toArray           = toArray;
+    momentPrototype__proto.toObject          = toObject;
+    momentPrototype__proto.toDate            = toDate;
+    momentPrototype__proto.toISOString       = moment_format__toISOString;
+    momentPrototype__proto.toJSON            = toJSON;
+    momentPrototype__proto.toString          = toString;
+    momentPrototype__proto.unix              = unix;
+    momentPrototype__proto.valueOf           = to_type__valueOf;
+    momentPrototype__proto.creationData      = creationData;
+
+    // Year
+    momentPrototype__proto.year       = getSetYear;
+    momentPrototype__proto.isLeapYear = getIsLeapYear;
+
+    // Week Year
+    momentPrototype__proto.weekYear    = getSetWeekYear;
+    momentPrototype__proto.isoWeekYear = getSetISOWeekYear;
+
+    // Quarter
+    momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;
+
+    // Month
+    momentPrototype__proto.month       = getSetMonth;
+    momentPrototype__proto.daysInMonth = getDaysInMonth;
+
+    // Week
+    momentPrototype__proto.week           = momentPrototype__proto.weeks        = getSetWeek;
+    momentPrototype__proto.isoWeek        = momentPrototype__proto.isoWeeks     = getSetISOWeek;
+    momentPrototype__proto.weeksInYear    = getWeeksInYear;
+    momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;
+
+    // Day
+    momentPrototype__proto.date       = getSetDayOfMonth;
+    momentPrototype__proto.day        = momentPrototype__proto.days             = getSetDayOfWeek;
+    momentPrototype__proto.weekday    = getSetLocaleDayOfWeek;
+    momentPrototype__proto.isoWeekday = getSetISODayOfWeek;
+    momentPrototype__proto.dayOfYear  = getSetDayOfYear;
+
+    // Hour
+    momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;
+
+    // Minute
+    momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;
+
+    // Second
+    momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;
+
+    // Millisecond
+    momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;
+
+    // Offset
+    momentPrototype__proto.utcOffset            = getSetOffset;
+    momentPrototype__proto.utc                  = setOffsetToUTC;
+    momentPrototype__proto.local                = setOffsetToLocal;
+    momentPrototype__proto.parseZone            = setOffsetToParsedOffset;
+    momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;
+    momentPrototype__proto.isDST                = isDaylightSavingTime;
+    momentPrototype__proto.isLocal              = isLocal;
+    momentPrototype__proto.isUtcOffset          = isUtcOffset;
+    momentPrototype__proto.isUtc                = isUtc;
+    momentPrototype__proto.isUTC                = isUtc;
+
+    // Timezone
+    momentPrototype__proto.zoneAbbr = getZoneAbbr;
+    momentPrototype__proto.zoneName = getZoneName;
+
+    // Deprecations
+    momentPrototype__proto.dates  = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
+    momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
+    momentPrototype__proto.years  = deprecate('years accessor is deprecated. Use year instead', getSetYear);
+    momentPrototype__proto.zone   = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
+    momentPrototype__proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
+
+    var momentPrototype = momentPrototype__proto;
+
+    function moment__createUnix (input) {
+        return local__createLocal(input * 1000);
+    }
+
+    function moment__createInZone () {
+        return local__createLocal.apply(null, arguments).parseZone();
+    }
+
+    function preParsePostFormat (string) {
+        return string;
+    }
+
+    var prototype__proto = Locale.prototype;
+
+    prototype__proto.calendar        = locale_calendar__calendar;
+    prototype__proto.longDateFormat  = longDateFormat;
+    prototype__proto.invalidDate     = invalidDate;
+    prototype__proto.ordinal         = ordinal;
+    prototype__proto.preparse        = preParsePostFormat;
+    prototype__proto.postformat      = preParsePostFormat;
+    prototype__proto.relativeTime    = relative__relativeTime;
+    prototype__proto.pastFuture      = pastFuture;
+    prototype__proto.set             = locale_set__set;
+
+    // Month
+    prototype__proto.months            =        localeMonths;
+    prototype__proto.monthsShort       =        localeMonthsShort;
+    prototype__proto.monthsParse       =        localeMonthsParse;
+    prototype__proto.monthsRegex       = monthsRegex;
+    prototype__proto.monthsShortRegex  = monthsShortRegex;
+
+    // Week
+    prototype__proto.week = localeWeek;
+    prototype__proto.firstDayOfYear = localeFirstDayOfYear;
+    prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;
+
+    // Day of Week
+    prototype__proto.weekdays       =        localeWeekdays;
+    prototype__proto.weekdaysMin    =        localeWeekdaysMin;
+    prototype__proto.weekdaysShort  =        localeWeekdaysShort;
+    prototype__proto.weekdaysParse  =        localeWeekdaysParse;
+
+    prototype__proto.weekdaysRegex       =        weekdaysRegex;
+    prototype__proto.weekdaysShortRegex  =        weekdaysShortRegex;
+    prototype__proto.weekdaysMinRegex    =        weekdaysMinRegex;
+
+    // Hours
+    prototype__proto.isPM = localeIsPM;
+    prototype__proto.meridiem = localeMeridiem;
+
+    function lists__get (format, index, field, setter) {
+        var locale = locale_locales__getLocale();
+        var utc = create_utc__createUTC().set(setter, index);
+        return locale[field](utc, format);
+    }
+
+    function listMonthsImpl (format, index, field) {
+        if (typeof format === 'number') {
+            index = format;
+            format = undefined;
+        }
+
+        format = format || '';
+
+        if (index != null) {
+            return lists__get(format, index, field, 'month');
+        }
+
+        var i;
+        var out = [];
+        for (i = 0; i < 12; i++) {
+            out[i] = lists__get(format, i, field, 'month');
+        }
+        return out;
+    }
+
+    // ()
+    // (5)
+    // (fmt, 5)
+    // (fmt)
+    // (true)
+    // (true, 5)
+    // (true, fmt, 5)
+    // (true, fmt)
+    function listWeekdaysImpl (localeSorted, format, index, field) {
+        if (typeof localeSorted === 'boolean') {
+            if (typeof format === 'number') {
+                index = format;
+                format = undefined;
+            }
+
+            format = format || '';
+        } else {
+            format = localeSorted;
+            index = format;
+            localeSorted = false;
+
+            if (typeof format === 'number') {
+                index = format;
+                format = undefined;
+            }
+
+            format = format || '';
+        }
+
+        var locale = locale_locales__getLocale(),
+            shift = localeSorted ? locale._week.dow : 0;
+
+        if (index != null) {
+            return lists__get(format, (index + shift) % 7, field, 'day');
+        }
+
+        var i;
+        var out = [];
+        for (i = 0; i < 7; i++) {
+            out[i] = lists__get(format, (i + shift) % 7, field, 'day');
+        }
+        return out;
+    }
+
+    function lists__listMonths (format, index) {
+        return listMonthsImpl(format, index, 'months');
+    }
+
+    function lists__listMonthsShort (format, index) {
+        return listMonthsImpl(format, index, 'monthsShort');
+    }
+
+    function lists__listWeekdays (localeSorted, format, index) {
+        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
+    }
+
+    function lists__listWeekdaysShort (localeSorted, format, index) {
+        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
+    }
+
+    function lists__listWeekdaysMin (localeSorted, format, index) {
+        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
+    }
+
+    locale_locales__getSetGlobalLocale('en', {
+        ordinalParse: /\d{1,2}(th|st|nd|rd)/,
+        ordinal : function (number) {
+            var b = number % 10,
+                output = (toInt(number % 100 / 10) === 1) ? 'th' :
+                (b === 1) ? 'st' :
+                (b === 2) ? 'nd' :
+                (b === 3) ? 'rd' : 'th';
+            return number + output;
+        }
+    });
+
+    // Side effect imports
+    utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);
+    utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);
+
+    var mathAbs = Math.abs;
+
+    function duration_abs__abs () {
+        var data           = this._data;
+
+        this._milliseconds = mathAbs(this._milliseconds);
+        this._days         = mathAbs(this._days);
+        this._months       = mathAbs(this._months);
+
+        data.milliseconds  = mathAbs(data.milliseconds);
+        data.seconds       = mathAbs(data.seconds);
+        data.minutes       = mathAbs(data.minutes);
+        data.hours         = mathAbs(data.hours);
+        data.months        = mathAbs(data.months);
+        data.years         = mathAbs(data.years);
+
+        return this;
+    }
+
+    function duration_add_subtract__addSubtract (duration, input, value, direction) {
+        var other = create__createDuration(input, value);
+
+        duration._milliseconds += direction * other._milliseconds;
+        duration._days         += direction * other._days;
+        duration._months       += direction * other._months;
+
+        return duration._bubble();
+    }
+
+    // supports only 2.0-style add(1, 's') or add(duration)
+    function duration_add_subtract__add (input, value) {
+        return duration_add_subtract__addSubtract(this, input, value, 1);
+    }
+
+    // supports only 2.0-style subtract(1, 's') or subtract(duration)
+    function duration_add_subtract__subtract (input, value) {
+        return duration_add_subtract__addSubtract(this, input, value, -1);
+    }
+
+    function absCeil (number) {
+        if (number < 0) {
+            return Math.floor(number);
+        } else {
+            return Math.ceil(number);
+        }
+    }
+
+    function bubble () {
+        var milliseconds = this._milliseconds;
+        var days         = this._days;
+        var months       = this._months;
+        var data         = this._data;
+        var seconds, minutes, hours, years, monthsFromDays;
+
+        // if we have a mix of positive and negative values, bubble down first
+        // check: https://github.com/moment/moment/issues/2166
+        if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
+                (milliseconds <= 0 && days <= 0 && months <= 0))) {
+            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
+            days = 0;
+            months = 0;
+        }
+
+        // The following code bubbles up values, see the tests for
+        // examples of what that means.
+        data.milliseconds = milliseconds % 1000;
+
+        seconds           = absFloor(milliseconds / 1000);
+        data.seconds      = seconds % 60;
+
+        minutes           = absFloor(seconds / 60);
+        data.minutes      = minutes % 60;
+
+        hours             = absFloor(minutes / 60);
+        data.hours        = hours % 24;
+
+        days += absFloor(hours / 24);
+
+        // convert days to months
+        monthsFromDays = absFloor(daysToMonths(days));
+        months += monthsFromDays;
+        days -= absCeil(monthsToDays(monthsFromDays));
+
+        // 12 months -> 1 year
+        years = absFloor(months / 12);
+        months %= 12;
+
+        data.days   = days;
+        data.months = months;
+        data.years  = years;
+
+        return this;
+    }
+
+    function daysToMonths (days) {
+        // 400 years have 146097 days (taking into account leap year rules)
+        // 400 years have 12 months === 4800
+        return days * 4800 / 146097;
+    }
+
+    function monthsToDays (months) {
+        // the reverse of daysToMonths
+        return months * 146097 / 4800;
+    }
+
+    function as (units) {
+        var days;
+        var months;
+        var milliseconds = this._milliseconds;
+
+        units = normalizeUnits(units);
+
+        if (units === 'month' || units === 'year') {
+            days   = this._days   + milliseconds / 864e5;
+            months = this._months + daysToMonths(days);
+            return units === 'month' ? months : months / 12;
+        } else {
+            // handle milliseconds separately because of floating point math errors (issue #1867)
+            days = this._days + Math.round(monthsToDays(this._months));
+            switch (units) {
+                case 'week'   : return days / 7     + milliseconds / 6048e5;
+                case 'day'    : return days         + milliseconds / 864e5;
+                case 'hour'   : return days * 24    + milliseconds / 36e5;
+                case 'minute' : return days * 1440  + milliseconds / 6e4;
+                case 'second' : return days * 86400 + milliseconds / 1000;
+                // Math.floor prevents floating point math errors here
+                case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
+                default: throw new Error('Unknown unit ' + units);
+            }
+        }
+    }
+
+    // TODO: Use this.as('ms')?
+    function duration_as__valueOf () {
+        return (
+            this._milliseconds +
+            this._days * 864e5 +
+            (this._months % 12) * 2592e6 +
+            toInt(this._months / 12) * 31536e6
+        );
+    }
+
+    function makeAs (alias) {
+        return function () {
+            return this.as(alias);
+        };
+    }
+
+    var asMilliseconds = makeAs('ms');
+    var asSeconds      = makeAs('s');
+    var asMinutes      = makeAs('m');
+    var asHours        = makeAs('h');
+    var asDays         = makeAs('d');
+    var asWeeks        = makeAs('w');
+    var asMonths       = makeAs('M');
+    var asYears        = makeAs('y');
+
+    function duration_get__get (units) {
+        units = normalizeUnits(units);
+        return this[units + 's']();
+    }
+
+    function makeGetter(name) {
+        return function () {
+            return this._data[name];
+        };
+    }
+
+    var milliseconds = makeGetter('milliseconds');
+    var seconds      = makeGetter('seconds');
+    var minutes      = makeGetter('minutes');
+    var hours        = makeGetter('hours');
+    var days         = makeGetter('days');
+    var months       = makeGetter('months');
+    var years        = makeGetter('years');
+
+    function weeks () {
+        return absFloor(this.days() / 7);
+    }
+
+    var round = Math.round;
+    var thresholds = {
+        s: 45,  // seconds to minute
+        m: 45,  // minutes to hour
+        h: 22,  // hours to day
+        d: 26,  // days to month
+        M: 11   // months to year
+    };
+
+    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+    }
+
+    function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {
+        var duration = create__createDuration(posNegDuration).abs();
+        var seconds  = round(duration.as('s'));
+        var minutes  = round(duration.as('m'));
+        var hours    = round(duration.as('h'));
+        var days     = round(duration.as('d'));
+        var months   = round(duration.as('M'));
+        var years    = round(duration.as('y'));
+
+        var a = seconds < thresholds.s && ['s', seconds]  ||
+                minutes <= 1           && ['m']           ||
+                minutes < thresholds.m && ['mm', minutes] ||
+                hours   <= 1           && ['h']           ||
+                hours   < thresholds.h && ['hh', hours]   ||
+                days    <= 1           && ['d']           ||
+                days    < thresholds.d && ['dd', days]    ||
+                months  <= 1           && ['M']           ||
+                months  < thresholds.M && ['MM', months]  ||
+                years   <= 1           && ['y']           || ['yy', years];
+
+        a[2] = withoutSuffix;
+        a[3] = +posNegDuration > 0;
+        a[4] = locale;
+        return substituteTimeAgo.apply(null, a);
+    }
+
+    // This function allows you to set the rounding function for relative time strings
+    function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {
+        if (roundingFunction === undefined) {
+            return round;
+        }
+        if (typeof(roundingFunction) === 'function') {
+            round = roundingFunction;
+            return true;
+        }
+        return false;
+    }
+
+    // This function allows you to set a threshold for relative time strings
+    function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {
+        if (thresholds[threshold] === undefined) {
+            return false;
+        }
+        if (limit === undefined) {
+            return thresholds[threshold];
+        }
+        thresholds[threshold] = limit;
+        return true;
+    }
+
+    function humanize (withSuffix) {
+        var locale = this.localeData();
+        var output = duration_humanize__relativeTime(this, !withSuffix, locale);
+
+        if (withSuffix) {
+            output = locale.pastFuture(+this, output);
+        }
+
+        return locale.postformat(output);
+    }
+
+    var iso_string__abs = Math.abs;
+
+    function iso_string__toISOString() {
+        // for ISO strings we do not use the normal bubbling rules:
+        //  * milliseconds bubble up until they become hours
+        //  * days do not bubble at all
+        //  * months bubble up until they become years
+        // This is because there is no context-free conversion between hours and days
+        // (think of clock changes)
+        // and also not between days and months (28-31 days per month)
+        var seconds = iso_string__abs(this._milliseconds) / 1000;
+        var days         = iso_string__abs(this._days);
+        var months       = iso_string__abs(this._months);
+        var minutes, hours, years;
+
+        // 3600 seconds -> 60 minutes -> 1 hour
+        minutes           = absFloor(seconds / 60);
+        hours             = absFloor(minutes / 60);
+        seconds %= 60;
+        minutes %= 60;
+
+        // 12 months -> 1 year
+        years  = absFloor(months / 12);
+        months %= 12;
+
+
+        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
+        var Y = years;
+        var M = months;
+        var D = days;
+        var h = hours;
+        var m = minutes;
+        var s = seconds;
+        var total = this.asSeconds();
+
+        if (!total) {
+            // this is the same as C#'s (Noda) and python (isodate)...
+            // but not other JS (goog.date)
+            return 'P0D';
+        }
+
+        return (total < 0 ? '-' : '') +
+            'P' +
+            (Y ? Y + 'Y' : '') +
+            (M ? M + 'M' : '') +
+            (D ? D + 'D' : '') +
+            ((h || m || s) ? 'T' : '') +
+            (h ? h + 'H' : '') +
+            (m ? m + 'M' : '') +
+            (s ? s + 'S' : '');
+    }
+
+    var duration_prototype__proto = Duration.prototype;
+
+    duration_prototype__proto.abs            = duration_abs__abs;
+    duration_prototype__proto.add            = duration_add_subtract__add;
+    duration_prototype__proto.subtract       = duration_add_subtract__subtract;
+    duration_prototype__proto.as             = as;
+    duration_prototype__proto.asMilliseconds = asMilliseconds;
+    duration_prototype__proto.asSeconds      = asSeconds;
+    duration_prototype__proto.asMinutes      = asMinutes;
+    duration_prototype__proto.asHours        = asHours;
+    duration_prototype__proto.asDays         = asDays;
+    duration_prototype__proto.asWeeks        = asWeeks;
+    duration_prototype__proto.asMonths       = asMonths;
+    duration_prototype__proto.asYears        = asYears;
+    duration_prototype__proto.valueOf        = duration_as__valueOf;
+    duration_prototype__proto._bubble        = bubble;
+    duration_prototype__proto.get            = duration_get__get;
+    duration_prototype__proto.milliseconds   = milliseconds;
+    duration_prototype__proto.seconds        = seconds;
+    duration_prototype__proto.minutes        = minutes;
+    duration_prototype__proto.hours          = hours;
+    duration_prototype__proto.days           = days;
+    duration_prototype__proto.weeks          = weeks;
+    duration_prototype__proto.months         = months;
+    duration_prototype__proto.years          = years;
+    duration_prototype__proto.humanize       = humanize;
+    duration_prototype__proto.toISOString    = iso_string__toISOString;
+    duration_prototype__proto.toString       = iso_string__toISOString;
+    duration_prototype__proto.toJSON         = iso_string__toISOString;
+    duration_prototype__proto.locale         = locale;
+    duration_prototype__proto.localeData     = localeData;
+
+    // Deprecations
+    duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);
+    duration_prototype__proto.lang = lang;
+
+    // Side effect imports
+
+    // FORMATTING
+
+    addFormatToken('X', 0, 0, 'unix');
+    addFormatToken('x', 0, 0, 'valueOf');
+
+    // PARSING
+
+    addRegexToken('x', matchSigned);
+    addRegexToken('X', matchTimestamp);
+    addParseToken('X', function (input, array, config) {
+        config._d = new Date(parseFloat(input, 10) * 1000);
+    });
+    addParseToken('x', function (input, array, config) {
+        config._d = new Date(toInt(input));
+    });
+
+    // Side effect imports
+
+
+    utils_hooks__hooks.version = '2.15.1';
+
+    setHookCallback(local__createLocal);
+
+    utils_hooks__hooks.fn                    = momentPrototype;
+    utils_hooks__hooks.min                   = min;
+    utils_hooks__hooks.max                   = max;
+    utils_hooks__hooks.now                   = now;
+    utils_hooks__hooks.utc                   = create_utc__createUTC;
+    utils_hooks__hooks.unix                  = moment__createUnix;
+    utils_hooks__hooks.months                = lists__listMonths;
+    utils_hooks__hooks.isDate                = isDate;
+    utils_hooks__hooks.locale                = locale_locales__getSetGlobalLocale;
+    utils_hooks__hooks.invalid               = valid__createInvalid;
+    utils_hooks__hooks.duration              = create__createDuration;
+    utils_hooks__hooks.isMoment              = isMoment;
+    utils_hooks__hooks.weekdays              = lists__listWeekdays;
+    utils_hooks__hooks.parseZone             = moment__createInZone;
+    utils_hooks__hooks.localeData            = locale_locales__getLocale;
+    utils_hooks__hooks.isDuration            = isDuration;
+    utils_hooks__hooks.monthsShort           = lists__listMonthsShort;
+    utils_hooks__hooks.weekdaysMin           = lists__listWeekdaysMin;
+    utils_hooks__hooks.defineLocale          = defineLocale;
+    utils_hooks__hooks.updateLocale          = updateLocale;
+    utils_hooks__hooks.locales               = locale_locales__listLocales;
+    utils_hooks__hooks.weekdaysShort         = lists__listWeekdaysShort;
+    utils_hooks__hooks.normalizeUnits        = normalizeUnits;
+    utils_hooks__hooks.relativeTimeRounding = duration_humanize__getSetRelativeTimeRounding;
+    utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;
+    utils_hooks__hooks.calendarFormat        = getCalendarFormat;
+    utils_hooks__hooks.prototype             = momentPrototype;
+
+    var _moment = utils_hooks__hooks;
+
+    return _moment;
+
+}));
\ No newline at end of file
diff --git a/library/moment/moment.min.js b/library/moment/moment.min.js
new file mode 100644 (file)
index 0000000..34129d2
--- /dev/null
@@ -0,0 +1,495 @@
+//! moment.js
+//! version : 2.15.1
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return md.apply(null,arguments)}
+// This is done to register the method called with moment()
+// without creating circular dependencies.
+function b(a){md=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){
+// IE8 will treat undefined and null as object if it wasn't for
+// input != null
+return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function e(a){var b;for(b in a)
+// even if its not own property I'd still call it non-empty
+return!1;return!0}function f(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function g(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function h(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function i(a,b){for(var c in b)h(b,c)&&(a[c]=b[c]);return h(b,"toString")&&(a.toString=b.toString),h(b,"valueOf")&&(a.valueOf=b.valueOf),a}function j(a,b,c,d){return qb(a,b,c,d,!0).utc()}function k(){
+// We need to deep clone this object.
+return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function l(a){return null==a._pf&&(a._pf=k()),a._pf}function m(a){if(null==a._isValid){var b=l(a),c=nd.call(b.parsedDateParts,function(a){return null!=a}),d=!isNaN(a._d.getTime())&&b.overflow<0&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c);if(a._strict&&(d=d&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour),null!=Object.isFrozen&&Object.isFrozen(a))return d;a._isValid=d}return a._isValid}function n(a){var b=j(NaN);return null!=a?i(l(b),a):l(b).userInvalidated=!0,b}function o(a){return void 0===a}function p(a,b){var c,d,e;if(o(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),o(b._i)||(a._i=b._i),o(b._f)||(a._f=b._f),o(b._l)||(a._l=b._l),o(b._strict)||(a._strict=b._strict),o(b._tzm)||(a._tzm=b._tzm),o(b._isUTC)||(a._isUTC=b._isUTC),o(b._offset)||(a._offset=b._offset),o(b._pf)||(a._pf=l(b)),o(b._locale)||(a._locale=b._locale),od.length>0)for(c in od)d=od[c],e=b[d],o(e)||(a[d]=e);return a}
+// Moment prototype object
+function q(b){p(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),pd===!1&&(pd=!0,a.updateOffset(this),pd=!1)}function r(a){return a instanceof q||null!=a&&null!=a._isAMomentObject}function s(a){return 0>a?Math.ceil(a)||0:Math.floor(a)}function t(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=s(b)),c}
+// compare two arrays, return the number of differences
+function u(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&t(a[d])!==t(b[d]))&&g++;return g+f}function v(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function w(b,c){var d=!0;return i(function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,b),d){for(var e,f=[],g=0;g<arguments.length;g++){if(e="","object"==typeof arguments[g]){e+="\n["+g+"] ";for(var h in arguments[0])e+=h+": "+arguments[0][h]+", ";e=e.slice(0,-2)}else e=arguments[g];f.push(e)}v(b+"\nArguments: "+Array.prototype.slice.call(f).join("")+"\n"+(new Error).stack),d=!1}return c.apply(this,arguments)},c)}function x(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c),qd[b]||(v(c),qd[b]=!0)}function y(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function z(a){var b,c;for(c in a)b=a[c],y(b)?this[c]=b:this["_"+c]=b;this._config=a,
+// Lenient ordinal parsing accepts just a number in addition to
+// number + (possibly) stuff coming from _ordinalParseLenient.
+this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function A(a,b){var c,e=i({},a);for(c in b)h(b,c)&&(d(a[c])&&d(b[c])?(e[c]={},i(e[c],a[c]),i(e[c],b[c])):null!=b[c]?e[c]=b[c]:delete e[c]);for(c in a)h(a,c)&&!h(b,c)&&d(a[c])&&(
+// make sure changes to properties don't modify parent config
+e[c]=i({},e[c]));return e}function B(a){null!=a&&this.set(a)}function C(a,b,c){var d=this._calendar[a]||this._calendar.sameElse;return y(d)?d.call(b,c):d}function D(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function E(){return this._invalidDate}function F(a){return this._ordinal.replace("%d",a)}function G(a,b,c,d){var e=this._relativeTime[c];return y(e)?e(a,b,c,d):e.replace(/%d/i,a)}function H(a,b){var c=this._relativeTime[a>0?"future":"past"];return y(c)?c(b):c.replace(/%s/i,b)}function I(a,b){var c=a.toLowerCase();zd[c]=zd[c+"s"]=zd[b]=a}function J(a){return"string"==typeof a?zd[a]||zd[a.toLowerCase()]:void 0}function K(a){var b,c,d={};for(c in a)h(a,c)&&(b=J(c),b&&(d[b]=a[c]));return d}function L(a,b){Ad[a]=b}function M(a){var b=[];for(var c in a)b.push({unit:c,priority:Ad[c]});return b.sort(function(a,b){return a.priority-b.priority}),b}function N(b,c){return function(d){return null!=d?(P(this,b,d),a.updateOffset(this,c),this):O(this,b)}}function O(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function P(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}
+// MOMENTS
+function Q(a){return a=J(a),y(this[a])?this[a]():this}function R(a,b){if("object"==typeof a){a=K(a);for(var c=M(a),d=0;d<c.length;d++)this[c[d].unit](a[c[d].unit])}else if(a=J(a),y(this[a]))return this[a](b);return this}function S(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}
+// token:    'M'
+// padded:   ['MM', 2]
+// ordinal:  'Mo'
+// callback: function () { this.month() + 1 }
+function T(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Ed[a]=e),b&&(Ed[b[0]]=function(){return S(e.apply(this,arguments),b[1],b[2])}),c&&(Ed[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function U(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function V(a){var b,c,d=a.match(Bd);for(b=0,c=d.length;c>b;b++)Ed[d[b]]?d[b]=Ed[d[b]]:d[b]=U(d[b]);return function(b){var e,f="";for(e=0;c>e;e++)f+=d[e]instanceof Function?d[e].call(b,a):d[e];return f}}
+// format date using native date object
+function W(a,b){return a.isValid()?(b=X(b,a.localeData()),Dd[b]=Dd[b]||V(b),Dd[b](a)):a.localeData().invalidDate()}function X(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Cd.lastIndex=0;d>=0&&Cd.test(a);)a=a.replace(Cd,c),Cd.lastIndex=0,d-=1;return a}function Y(a,b,c){Wd[a]=y(b)?b:function(a,d){return a&&c?c:b}}function Z(a,b){return h(Wd,a)?Wd[a](b._strict,b._locale):new RegExp($(a))}
+// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+function $(a){return _(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function _(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function aa(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=t(a)}),c=0;c<a.length;c++)Xd[a[c]]=d}function ba(a,b){aa(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function ca(a,b,c){null!=b&&h(Xd,a)&&Xd[a](b,c._a,c,a)}function da(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ea(a,b){return a?c(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||fe).test(b)?"format":"standalone"][a.month()]:this._months}function fa(a,b){return a?c(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[fe.test(b)?"format":"standalone"][a.month()]:this._monthsShort}function ga(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._monthsParse)for(
+// this is not used
+this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;12>d;++d)f=j([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(f,"").toLocaleLowerCase();return c?"MMM"===b?(e=sd.call(this._shortMonthsParse,g),-1!==e?e:null):(e=sd.call(this._longMonthsParse,g),-1!==e?e:null):"MMM"===b?(e=sd.call(this._shortMonthsParse,g),-1!==e?e:(e=sd.call(this._longMonthsParse,g),-1!==e?e:null)):(e=sd.call(this._longMonthsParse,g),-1!==e?e:(e=sd.call(this._shortMonthsParse,g),-1!==e?e:null))}function ha(a,b,c){var d,e,f;if(this._monthsParseExact)return ga.call(this,a,b,c);
+// TODO: add sorting
+// Sorting makes sure if one month (or abbr) is a prefix of another
+// see sorting in computeMonthsParse
+for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){
+// test the regex
+if(e=j([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}
+// MOMENTS
+function ia(a,b){var c;if(!a.isValid())
+// No op
+return a;if("string"==typeof b)if(/^\d+$/.test(b))b=t(b);else
+// TODO: Another silent failure?
+if(b=a.localeData().monthsParse(b),"number"!=typeof b)return a;return c=Math.min(a.date(),da(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ja(b){return null!=b?(ia(this,b),a.updateOffset(this,!0),this):O(this,"Month")}function ka(){return da(this.year(),this.month())}function la(a){return this._monthsParseExact?(h(this,"_monthsRegex")||na.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=ie),this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex)}function ma(a){return this._monthsParseExact?(h(this,"_monthsRegex")||na.call(this),a?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=je),this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex)}function na(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=j([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(
+// Sorting makes sure if one month (or abbr) is a prefix of another it
+// will match the longer piece.
+d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=_(d[b]),e[b]=_(e[b]);for(b=0;24>b;b++)f[b]=_(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}
+// HELPERS
+function oa(a){return pa(a)?366:365}function pa(a){return a%4===0&&a%100!==0||a%400===0}function qa(){return pa(this.year())}function ra(a,b,c,d,e,f,g){
+//can't just apply() to create a date:
+//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
+var h=new Date(a,b,c,d,e,f,g);
+//the date constructor remaps years 0-99 to 1900-1999
+return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function sa(a){var b=new Date(Date.UTC.apply(null,arguments));
+//the Date.UTC function remaps years 0-99 to 1900-1999
+return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}
+// start-of-first-week - start-of-year
+function ta(a,b,c){var// first-week day -- which january is always in the first week (4 for iso, 1 for other)
+d=7+b-c,
+// first-week day local weekday -- which local weekday is fwd
+e=(7+sa(a,0,d).getUTCDay()-b)%7;return-e+d-1}
+//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+function ua(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ta(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=oa(f)+j):j>oa(a)?(f=a+1,g=j-oa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function va(a,b,c){var d,e,f=ta(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+wa(e,b,c)):g>wa(a.year(),b,c)?(d=g-wa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function wa(a,b,c){var d=ta(a,b,c),e=ta(a+1,b,c);return(oa(a)-d+e)/7}
+// HELPERS
+// LOCALES
+function xa(a){return va(a,this._week.dow,this._week.doy).week}function ya(){return this._week.dow}function za(){return this._week.doy}
+// MOMENTS
+function Aa(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ba(a){var b=va(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}
+// HELPERS
+function Ca(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Da(a,b){return"string"==typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Ea(a,b){return a?c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:this._weekdays}function Fa(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort}function Ga(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin}function Ha(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;7>d;++d)f=j([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=sd.call(this._weekdaysParse,g),-1!==e?e:null):"ddd"===b?(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:null):(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null):"dddd"===b?(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null))):"ddd"===b?(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null))):(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:null)))}function Ia(a,b,c){var d,e,f;if(this._weekdaysParseExact)return Ha.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){
+// test the regex
+if(e=j([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}
+// MOMENTS
+function Ja(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Ca(a,this.localeData()),this.add(a-b,"d")):b}function Ka(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function La(a){if(!this.isValid())return null!=a?this:NaN;
+// behaves the same as moment#day except
+// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+// as a setter, sunday should belong to the previous week.
+if(null!=a){var b=Da(a,this.localeData());return this.day(this.day()%7?b:b-7)}return this.day()||7}function Ma(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=pe),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function Na(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Oa(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=re),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Pa(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],h=[],i=[],k=[];for(b=0;7>b;b++)c=j([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),h.push(e),i.push(f),k.push(d),k.push(e),k.push(f);for(
+// Sorting makes sure if one weekday (or abbr) is a prefix of another it
+// will match the longer piece.
+g.sort(a),h.sort(a),i.sort(a),k.sort(a),b=0;7>b;b++)h[b]=_(h[b]),i[b]=_(i[b]),k[b]=_(k[b]);this._weekdaysRegex=new RegExp("^("+k.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}
+// FORMATTING
+function Qa(){return this.hours()%12||12}function Ra(){return this.hours()||24}function Sa(a,b){T(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}
+// PARSING
+function Ta(a,b){return b._meridiemParse}
+// LOCALES
+function Ua(a){
+// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+// Using charAt should be more compatible.
+return"p"===(a+"").toLowerCase().charAt(0)}function Va(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Wa(a){return a?a.toLowerCase().replace("_","-"):a}
+// pick the locale from the array
+// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split("-"),b=e.length,c=Wa(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=Ya(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)
+//the next array item is better than a shallower substring of this one
+break;b--}f++}return null}function Ya(a){var b=null;
+// TODO: Find a better way to register and load all the locales in Node
+if(!we[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=se._abbr,require("./locale/"+a),
+// because defineLocale currently also sets the global locale, we
+// want to undo that for lazy loaded locales
+Za(b)}catch(c){}return we[a]}
+// This function will load locale and then set the global locale.  If
+// no arguments are passed in, it will simply return the current global
+// locale key.
+function Za(a,b){var c;
+// moment.duration._locale = moment._locale = data;
+return a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}function $a(a,b){if(null!==b){var c=ve;
+// treat as if there is no base config
+// backwards compat for now: also set the locale
+return b.abbr=a,null!=we[a]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=we[a]._config):null!=b.parentLocale&&(null!=we[b.parentLocale]?c=we[b.parentLocale]._config:x("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),we[a]=new B(A(c,b)),Za(a),we[a]}
+// useful for testing
+return delete we[a],null}function _a(a,b){if(null!=b){var c,d=ve;
+// MERGE
+null!=we[a]&&(d=we[a]._config),b=A(d,b),c=new B(b),c.parentLocale=we[a],we[a]=c,
+// backwards compat for now: also set the locale
+Za(a)}else
+// pass null for config to unupdate, useful for tests
+null!=we[a]&&(null!=we[a].parentLocale?we[a]=we[a].parentLocale:null!=we[a]&&delete we[a]);return we[a]}
+// returns locale data
+function ab(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return se;if(!c(a)){if(b=Ya(a))return b;a=[a]}return Xa(a)}function bb(){return rd(we)}function cb(a){var b,c=a._a;return c&&-2===l(a).overflow&&(b=c[Zd]<0||c[Zd]>11?Zd:c[$d]<1||c[$d]>da(c[Yd],c[Zd])?$d:c[_d]<0||c[_d]>24||24===c[_d]&&(0!==c[ae]||0!==c[be]||0!==c[ce])?_d:c[ae]<0||c[ae]>59?ae:c[be]<0||c[be]>59?be:c[ce]<0||c[ce]>999?ce:-1,l(a)._overflowDayOfYear&&(Yd>b||b>$d)&&(b=$d),l(a)._overflowWeeks&&-1===b&&(b=de),l(a)._overflowWeekday&&-1===b&&(b=ee),l(a).overflow=b),a}
+// date from iso format
+function db(a){var b,c,d,e,f,g,h=a._i,i=xe.exec(h)||ye.exec(h);if(i){for(l(a).iso=!0,b=0,c=Ae.length;c>b;b++)if(Ae[b][1].exec(i[1])){e=Ae[b][0],d=Ae[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Be.length;c>b;b++)if(Be[b][1].exec(i[3])){
+// match[2] should be 'T' or space
+f=(i[2]||" ")+Be[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!ze.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),jb(a)}else a._isValid=!1}
+// date from iso format or fallback
+function eb(b){var c=Ce.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(db(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}
+// Pick the first defined of two or three arguments.
+function fb(a,b,c){return null!=a?a:null!=b?b:c}function gb(b){
+// hooks is actually the exported moment object
+var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}
+// convert an array to a date.
+// the array should mirror the parameters below
+// note: all values past the year are optional and will default to the lowest possible value.
+// [year, month, day , hour, minute, second, millisecond]
+function hb(a){var b,c,d,e,f=[];if(!a._d){
+// Default to current date.
+// * if no year, month, day of month are given, default to today
+// * if day of month is given, default month and year
+// * if month is given, default only year
+// * if year is given, don't default anything
+for(d=gb(a),a._w&&null==a._a[$d]&&null==a._a[Zd]&&ib(a),a._dayOfYear&&(e=fb(a._a[Yd],d[Yd]),a._dayOfYear>oa(e)&&(l(a)._overflowDayOfYear=!0),c=sa(e,0,a._dayOfYear),a._a[Zd]=c.getUTCMonth(),a._a[$d]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];
+// Zero out whatever was not defaulted, including time
+for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];
+// Check for 24:00:00.000
+24===a._a[_d]&&0===a._a[ae]&&0===a._a[be]&&0===a._a[ce]&&(a._nextDay=!0,a._a[_d]=0),a._d=(a._useUTC?sa:ra).apply(null,f),
+// Apply timezone offset from input. The actual utcOffset can be changed
+// with parseZone.
+null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[_d]=24)}}function ib(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=fb(b.GG,a._a[Yd],va(rb(),1,4).year),d=fb(b.W,1),e=fb(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=fb(b.gg,a._a[Yd],va(rb(),f,g).year),d=fb(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>wa(c,f,g)?l(a)._overflowWeeks=!0:null!=i?l(a)._overflowWeekday=!0:(h=ua(c,d,e,f,g),a._a[Yd]=h.year,a._dayOfYear=h.dayOfYear)}
+// date from string and format string
+function jb(b){
+// TODO: Move this to another part of the creation flow to prevent circular deps
+if(b._f===a.ISO_8601)return void db(b);b._a=[],l(b).empty=!0;
+// This array is used to make a Date, either with `new Date` or `Date.UTC`
+var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=X(b._f,b._locale).match(Bd)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(Z(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&l(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),Ed[f]?(d?l(b).empty=!1:l(b).unusedTokens.push(f),ca(f,d,b)):b._strict&&!d&&l(b).unusedTokens.push(f);
+// add remaining unparsed input length to the string
+l(b).charsLeftOver=i-j,h.length>0&&l(b).unusedInput.push(h),
+// clear _12h flag if hour is <= 12
+b._a[_d]<=12&&l(b).bigHour===!0&&b._a[_d]>0&&(l(b).bigHour=void 0),l(b).parsedDateParts=b._a.slice(0),l(b).meridiem=b._meridiem,
+// handle meridiem
+b._a[_d]=kb(b._locale,b._a[_d],b._meridiem),hb(b),cb(b)}function kb(a,b,c){var d;
+// Fallback
+return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}
+// date from string and array of format strings
+function lb(a){var b,c,d,e,f;if(0===a._f.length)return l(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=p({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],jb(b),m(b)&&(f+=l(b).charsLeftOver,f+=10*l(b).unusedTokens.length,l(b).score=f,(null==d||d>f)&&(d=f,c=b));i(a,c||b)}function mb(a){if(!a._d){var b=K(a._i);a._a=g([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),hb(a)}}function nb(a){var b=new q(cb(ob(a)));
+// Adding is smart enough around DST
+return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function ob(a){var b=a._i,d=a._f;return a._locale=a._locale||ab(a._l),null===b||void 0===d&&""===b?n({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),r(b)?new q(cb(b)):(c(d)?lb(a):f(b)?a._d=b:d?jb(a):pb(a),m(a)||(a._d=null),a))}function pb(b){var d=b._i;void 0===d?b._d=new Date(a.now()):f(d)?b._d=new Date(d.valueOf()):"string"==typeof d?eb(b):c(d)?(b._a=g(d.slice(0),function(a){return parseInt(a,10)}),hb(b)):"object"==typeof d?mb(b):"number"==typeof d?
+// from milliseconds
+b._d=new Date(d):a.createFromInputFallback(b)}function qb(a,b,f,g,h){var i={};
+// object construction must be done this way.
+// https://github.com/moment/moment/issues/1423
+return"boolean"==typeof f&&(g=f,f=void 0),(d(a)&&e(a)||c(a)&&0===a.length)&&(a=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=h,i._l=f,i._i=a,i._f=b,i._strict=g,nb(i)}function rb(a,b,c,d){return qb(a,b,c,d,!1)}
+// Pick a moment m from moments so that m[fn](other) is true for all
+// other. This relies on the function fn to be transitive.
+//
+// moments should either be an array of moment objects or an array, whose
+// first element is an array of moment objects.
+function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}
+// TODO: Use [].sort instead?
+function tb(){var a=[].slice.call(arguments,0);return sb("isBefore",a)}function ub(){var a=[].slice.call(arguments,0);return sb("isAfter",a)}function vb(a){var b=K(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;
+// representation for dateAddRemove
+this._milliseconds=+k+1e3*j+// 1000
+6e4*i+// 1000 * 60
+1e3*h*60*60,//using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
+// Because of dateAddRemove treats 24 hours as different from a
+// day when working around DST, we need to store them separately
+this._days=+g+7*f,
+// It is impossible translate months into days without knowing
+// which months you are are talking about, so we have to store
+// it separately.
+this._months=+e+3*d+12*c,this._data={},this._locale=ab(),this._bubble()}function wb(a){return a instanceof vb}function xb(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}
+// FORMATTING
+function yb(a,b){T(a,0,0,function(){var a=this.utcOffset(),c="+";return 0>a&&(a=-a,c="-"),c+S(~~(a/60),2)+b+S(~~a%60,2)})}function zb(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Ge)||["-",0,0],f=+(60*e[1])+t(e[2]);return"+"===e[0]?f:-f}
+// Return a moment from input, that is local/utc/zone equivalent to model.
+function Ab(b,c){var d,e;
+// Use low-level api, because this fn is low-level api.
+return c._isUTC?(d=c.clone(),e=(r(b)||f(b)?b.valueOf():rb(b).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+e),a.updateOffset(d,!1),d):rb(b).local()}function Bb(a){
+// On Firefox.24 Date#getTimezoneOffset returns a floating point.
+// https://github.com/moment/moment/pull/1871
+return 15*-Math.round(a._d.getTimezoneOffset()/15)}
+// MOMENTS
+// keepLocalTime = true means only change the timezone, without
+// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
+// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
+// +0200, so we adjust the time as needed, to be valid.
+//
+// Keeping the time actually adds/subtracts (one hour)
+// from the actual represented time. That is why we call updateOffset
+// a second time. In case it wants us to change the offset again
+// _changeInProgress == true case, then we have to adjust, because
+// there is no such time in the given timezone.
+function Cb(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=zb(Td,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Bb(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?Sb(this,Nb(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Bb(this):null!=b?this:NaN}function Db(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Eb(a){return this.utcOffset(0,a)}function Fb(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Bb(this),"m")),this}function Gb(){if(this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var a=zb(Sd,this._i);0===a?this.utcOffset(0,!0):this.utcOffset(zb(Sd,this._i))}return this}function Hb(a){return this.isValid()?(a=a?rb(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function Ib(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Jb(){if(!o(this._isDSTShifted))return this._isDSTShifted;var a={};if(p(a,this),a=ob(a),a._a){var b=a._isUTC?j(a._a):rb(a._a);this._isDSTShifted=this.isValid()&&u(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Kb(){return this.isValid()?!this._isUTC:!1}function Lb(){return this.isValid()?this._isUTC:!1}function Mb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Nb(a,b){var c,d,e,f=a,
+// matching against regexp is expensive, do it on demand
+g=null;// checks for null or undefined
+return wb(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(f={},b?f[b]=a:f.milliseconds=a):(g=He.exec(a))?(c="-"===g[1]?-1:1,f={y:0,d:t(g[$d])*c,h:t(g[_d])*c,m:t(g[ae])*c,s:t(g[be])*c,ms:t(xb(1e3*g[ce]))*c}):(g=Ie.exec(a))?(c="-"===g[1]?-1:1,f={y:Ob(g[2],c),M:Ob(g[3],c),w:Ob(g[4],c),d:Ob(g[5],c),h:Ob(g[6],c),m:Ob(g[7],c),s:Ob(g[8],c)}):null==f?f={}:"object"==typeof f&&("from"in f||"to"in f)&&(e=Qb(rb(f.from),rb(f.to)),f={},f.ms=e.milliseconds,f.M=e.months),d=new vb(f),wb(a)&&h(a,"_locale")&&(d._locale=a._locale),d}function Ob(a,b){
+// We'd normally use ~~inp for this, but unfortunately it also
+// converts floats to ints.
+// inp may be undefined, so careful calling replace on it.
+var c=a&&parseFloat(a.replace(",","."));
+// apply sign while we're at it
+return(isNaN(c)?0:c)*b}function Pb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Qb(a,b){var c;return a.isValid()&&b.isValid()?(b=Ab(b,a),a.isBefore(b)?c=Pb(a,b):(c=Pb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}
+// TODO: remove 'name' arg after deprecation is removed
+function Rb(a,b){return function(c,d){var e,f;
+//invert the arguments, but complain about it
+return null===d||isNaN(+d)||(x(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}function Sb(b,c,d,e){var f=c._milliseconds,g=xb(c._days),h=xb(c._months);b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&P(b,"Date",O(b,"Date")+g*d),h&&ia(b,O(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function Tb(a,b){var c=a.diff(b,"days",!0);return-6>c?"sameElse":-1>c?"lastWeek":0>c?"lastDay":1>c?"sameDay":2>c?"nextDay":7>c?"nextWeek":"sameElse"}function Ub(b,c){
+// We want to compare the start of today, vs this.
+// Getting start-of-today depends on whether we're local/utc/offset or not.
+var d=b||rb(),e=Ab(d,this).startOf("day"),f=a.calendarFormat(this,e)||"sameElse",g=c&&(y(c[f])?c[f].call(this,d):c[f]);return this.format(g||this.localeData().calendar(f,this,rb(d)))}function Vb(){return new q(this)}function Wb(a,b){var c=r(a)?a:rb(a);return this.isValid()&&c.isValid()?(b=J(o(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(b).valueOf()):!1}function Xb(a,b){var c=r(a)?a:rb(a);return this.isValid()&&c.isValid()?(b=J(o(b)?"millisecond":b),"millisecond"===b?this.valueOf()<c.valueOf():this.clone().endOf(b).valueOf()<c.valueOf()):!1}function Yb(a,b,c,d){return d=d||"()",("("===d[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===d[1]?this.isBefore(b,c):!this.isAfter(b,c))}function Zb(a,b){var c,d=r(a)?a:rb(a);return this.isValid()&&d.isValid()?(b=J(b||"millisecond"),"millisecond"===b?this.valueOf()===d.valueOf():(c=d.valueOf(),this.clone().startOf(b).valueOf()<=c&&c<=this.clone().endOf(b).valueOf())):!1}function $b(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function _b(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function ac(a,b,c){var d,e,f,g;// 1000
+// 1000 * 60
+// 1000 * 60 * 60
+// 1000 * 60 * 60 * 24, negate dst
+// 1000 * 60 * 60 * 24 * 7, negate dst
+return this.isValid()?(d=Ab(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=J(b),"year"===b||"month"===b||"quarter"===b?(g=bc(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:s(g)):NaN):NaN}function bc(a,b){
+// difference in months
+var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),
+// b is in (anchor - 1 month, anchor + 1 month)
+f=a.clone().add(e,"months");
+//check for negative zero, return zero if negative zero
+// linear across the month
+// linear across the month
+return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)||0}function cc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function dc(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?y(Date.prototype.toISOString)?this.toDate().toISOString():W(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):W(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function ec(b){b||(b=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var c=W(this,b);return this.localeData().postformat(c)}function fc(a,b){return this.isValid()&&(r(a)&&a.isValid()||rb(a).isValid())?Nb({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function gc(a){return this.from(rb(),a)}function hc(a,b){return this.isValid()&&(r(a)&&a.isValid()||rb(a).isValid())?Nb({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function ic(a){return this.to(rb(),a)}
+// If passed a locale key, it will set the locale for this
+// instance.  Otherwise, it will return the locale configuration
+// variables for this instance.
+function jc(a){var b;return void 0===a?this._locale._abbr:(b=ab(a),null!=b&&(this._locale=b),this)}function kc(){return this._locale}function lc(a){
+// the following switch intentionally omits break keywords
+// to utilize falling through the cases.
+switch(a=J(a)){case"year":this.month(0);/* falls through */
+case"quarter":case"month":this.date(1);/* falls through */
+case"week":case"isoWeek":case"day":case"date":this.hours(0);/* falls through */
+case"hour":this.minutes(0);/* falls through */
+case"minute":this.seconds(0);/* falls through */
+case"second":this.milliseconds(0)}
+// weeks are a special case
+// quarters are also special
+return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function mc(a){
+// 'date' is an alias for 'day', so it should be considered as such.
+return a=J(a),void 0===a||"millisecond"===a?this:("date"===a&&(a="day"),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms"))}function nc(){return this._d.valueOf()-6e4*(this._offset||0)}function oc(){return Math.floor(this.valueOf()/1e3)}function pc(){return new Date(this.valueOf())}function qc(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function rc(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function sc(){
+// new Date(NaN).toJSON() === null
+return this.isValid()?this.toISOString():null}function tc(){return m(this)}function uc(){return i({},l(this))}function vc(){return l(this).overflow}function wc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function xc(a,b){T(0,[a,a.length],0,b)}
+// MOMENTS
+function yc(a){return Cc.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function zc(a){return Cc.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Ac(){return wa(this.year(),1,4)}function Bc(){var a=this.localeData()._week;return wa(this.year(),a.dow,a.doy)}function Cc(a,b,c,d,e){var f;return null==a?va(this,d,e).year:(f=wa(a,d,e),b>f&&(b=f),Dc.call(this,a,b,c,d,e))}function Dc(a,b,c,d,e){var f=ua(a,b,c,d,e),g=sa(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}
+// MOMENTS
+function Ec(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}
+// HELPERS
+// MOMENTS
+function Fc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function Gc(a,b){b[ce]=t(1e3*("0."+a))}
+// MOMENTS
+function Hc(){return this._isUTC?"UTC":""}function Ic(){return this._isUTC?"Coordinated Universal Time":""}function Jc(a){return rb(1e3*a)}function Kc(){return rb.apply(null,arguments).parseZone()}function Lc(a){return a}function Mc(a,b,c,d){var e=ab(),f=j().set(d,b);return e[c](f,a)}function Nc(a,b,c){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return Mc(a,b,c,"month");var d,e=[];for(d=0;12>d;d++)e[d]=Mc(a,d,c,"month");return e}
+// ()
+// (5)
+// (fmt, 5)
+// (fmt)
+// (true)
+// (true, 5)
+// (true, fmt, 5)
+// (true, fmt)
+function Oc(a,b,c,d){"boolean"==typeof a?("number"==typeof b&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,"number"==typeof b&&(c=b,b=void 0),b=b||"");var e=ab(),f=a?e._week.dow:0;if(null!=c)return Mc(b,(c+f)%7,d,"day");var g,h=[];for(g=0;7>g;g++)h[g]=Mc(b,(g+f)%7,d,"day");return h}function Pc(a,b){return Nc(a,b,"months")}function Qc(a,b){return Nc(a,b,"monthsShort")}function Rc(a,b,c){return Oc(a,b,c,"weekdays")}function Sc(a,b,c){return Oc(a,b,c,"weekdaysShort")}function Tc(a,b,c){return Oc(a,b,c,"weekdaysMin")}function Uc(){var a=this._data;return this._milliseconds=Ue(this._milliseconds),this._days=Ue(this._days),this._months=Ue(this._months),a.milliseconds=Ue(a.milliseconds),a.seconds=Ue(a.seconds),a.minutes=Ue(a.minutes),a.hours=Ue(a.hours),a.months=Ue(a.months),a.years=Ue(a.years),this}function Vc(a,b,c,d){var e=Nb(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}
+// supports only 2.0-style add(1, 's') or add(duration)
+function Wc(a,b){return Vc(this,a,b,1)}
+// supports only 2.0-style subtract(1, 's') or subtract(duration)
+function Xc(a,b){return Vc(this,a,b,-1)}function Yc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Zc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;
+// if we have a mix of positive and negative values, bubble down first
+// check: https://github.com/moment/moment/issues/2166
+// The following code bubbles up values, see the tests for
+// examples of what that means.
+// convert days to months
+// 12 months -> 1 year
+return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Yc(_c(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=s(f/1e3),i.seconds=a%60,b=s(a/60),i.minutes=b%60,c=s(b/60),i.hours=c%24,g+=s(c/24),e=s($c(g)),h+=e,g-=Yc(_c(e)),d=s(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function $c(a){
+// 400 years have 146097 days (taking into account leap year rules)
+// 400 years have 12 months === 4800
+return 4800*a/146097}function _c(a){
+// the reverse of daysToMonths
+return 146097*a/4800}function ad(a){var b,c,d=this._milliseconds;if(a=J(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+$c(b),"month"===a?c:c/12;switch(b=this._days+Math.round(_c(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;
+// Math.floor prevents floating point math errors here
+case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}
+// TODO: Use this.as('ms')?
+function bd(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*t(this._months/12)}function cd(a){return function(){return this.as(a)}}function dd(a){return a=J(a),this[a+"s"]()}function ed(a){return function(){return this._data[a]}}function fd(){return s(this.days()/7)}
+// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+function gd(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function hd(a,b,c){var d=Nb(a).abs(),e=jf(d.as("s")),f=jf(d.as("m")),g=jf(d.as("h")),h=jf(d.as("d")),i=jf(d.as("M")),j=jf(d.as("y")),k=e<kf.s&&["s",e]||1>=f&&["m"]||f<kf.m&&["mm",f]||1>=g&&["h"]||g<kf.h&&["hh",g]||1>=h&&["d"]||h<kf.d&&["dd",h]||1>=i&&["M"]||i<kf.M&&["MM",i]||1>=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,gd.apply(null,k)}
+// This function allows you to set the rounding function for relative time strings
+function id(a){return void 0===a?jf:"function"==typeof a?(jf=a,!0):!1}
+// This function allows you to set a threshold for relative time strings
+function jd(a,b){return void 0===kf[a]?!1:void 0===b?kf[a]:(kf[a]=b,!0)}function kd(a){var b=this.localeData(),c=hd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function ld(){
+// for ISO strings we do not use the normal bubbling rules:
+//  * milliseconds bubble up until they become hours
+//  * days do not bubble at all
+//  * months bubble up until they become years
+// This is because there is no context-free conversion between hours and days
+// (think of clock changes)
+// and also not between days and months (28-31 days per month)
+var a,b,c,d=lf(this._milliseconds)/1e3,e=lf(this._days),f=lf(this._months);a=s(d/60),b=s(a/60),d%=60,a%=60,c=s(f/12),f%=12;
+// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
+var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var md,nd;nd=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;c>d;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1};
+// Plugins that add properties should also add the key here (null value),
+// so we can properly clone ourselves.
+var od=a.momentProperties=[],pd=!1,qd={};a.suppressDeprecationWarnings=!1,a.deprecationHandler=null;var rd;rd=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)h(a,b)&&c.push(b);return c};var sd,td={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ud={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},vd="Invalid date",wd="%d",xd=/\d{1,2}/,yd={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},zd={},Ad={},Bd=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Cd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Dd={},Ed={},Fd=/\d/,Gd=/\d\d/,Hd=/\d{3}/,Id=/\d{4}/,Jd=/[+-]?\d{6}/,Kd=/\d\d?/,Ld=/\d\d\d\d?/,Md=/\d\d\d\d\d\d?/,Nd=/\d{1,3}/,Od=/\d{1,4}/,Pd=/[+-]?\d{1,6}/,Qd=/\d+/,Rd=/[+-]?\d+/,Sd=/Z|[+-]\d\d:?\d\d/gi,Td=/Z|[+-]\d\d(?::?\d\d)?/gi,Ud=/[+-]?\d+(\.\d{1,3})?/,Vd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Wd={},Xd={},Yd=0,Zd=1,$d=2,_d=3,ae=4,be=5,ce=6,de=7,ee=8;sd=Array.prototype.indexOf?Array.prototype.indexOf:function(a){
+// I know
+var b;for(b=0;b<this.length;++b)if(this[b]===a)return b;return-1},T("M",["MM",2],"Mo",function(){return this.month()+1}),T("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),T("MMMM",0,0,function(a){return this.localeData().months(this,a)}),I("month","M"),L("month",8),Y("M",Kd),Y("MM",Kd,Gd),Y("MMM",function(a,b){return b.monthsShortRegex(a)}),Y("MMMM",function(a,b){return b.monthsRegex(a)}),aa(["M","MM"],function(a,b){b[Zd]=t(a)-1}),aa(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[Zd]=e:l(c).invalidMonth=a});
+// LOCALES
+var fe=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,ge="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),he="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ie=Vd,je=Vd;
+// FORMATTING
+T("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a}),T(0,["YY",2],0,function(){return this.year()%100}),T(0,["YYYY",4],0,"year"),T(0,["YYYYY",5],0,"year"),T(0,["YYYYYY",6,!0],0,"year"),
+// ALIASES
+I("year","y"),
+// PRIORITIES
+L("year",1),
+// PARSING
+Y("Y",Rd),Y("YY",Kd,Gd),Y("YYYY",Od,Id),Y("YYYYY",Pd,Jd),Y("YYYYYY",Pd,Jd),aa(["YYYYY","YYYYYY"],Yd),aa("YYYY",function(b,c){c[Yd]=2===b.length?a.parseTwoDigitYear(b):t(b)}),aa("YY",function(b,c){c[Yd]=a.parseTwoDigitYear(b)}),aa("Y",function(a,b){b[Yd]=parseInt(a,10)}),
+// HOOKS
+a.parseTwoDigitYear=function(a){return t(a)+(t(a)>68?1900:2e3)};
+// MOMENTS
+var ke=N("FullYear",!0);
+// FORMATTING
+T("w",["ww",2],"wo","week"),T("W",["WW",2],"Wo","isoWeek"),
+// ALIASES
+I("week","w"),I("isoWeek","W"),
+// PRIORITIES
+L("week",5),L("isoWeek",5),
+// PARSING
+Y("w",Kd),Y("ww",Kd,Gd),Y("W",Kd),Y("WW",Kd,Gd),ba(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=t(a)});var le={dow:0,// Sunday is the first day of the week.
+doy:6};
+// FORMATTING
+T("d",0,"do","day"),T("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),T("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),T("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),T("e",0,0,"weekday"),T("E",0,0,"isoWeekday"),
+// ALIASES
+I("day","d"),I("weekday","e"),I("isoWeekday","E"),
+// PRIORITY
+L("day",11),L("weekday",11),L("isoWeekday",11),
+// PARSING
+Y("d",Kd),Y("e",Kd),Y("E",Kd),Y("dd",function(a,b){return b.weekdaysMinRegex(a)}),Y("ddd",function(a,b){return b.weekdaysShortRegex(a)}),Y("dddd",function(a,b){return b.weekdaysRegex(a)}),ba(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);
+// if we didn't get a weekday name, mark the date as invalid
+null!=e?b.d=e:l(c).invalidWeekday=a}),ba(["d","e","E"],function(a,b,c,d){b[d]=t(a)});
+// LOCALES
+var me="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ne="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),oe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),pe=Vd,qe=Vd,re=Vd;T("H",["HH",2],0,"hour"),T("h",["hh",2],0,Qa),T("k",["kk",2],0,Ra),T("hmm",0,0,function(){return""+Qa.apply(this)+S(this.minutes(),2)}),T("hmmss",0,0,function(){return""+Qa.apply(this)+S(this.minutes(),2)+S(this.seconds(),2)}),T("Hmm",0,0,function(){return""+this.hours()+S(this.minutes(),2)}),T("Hmmss",0,0,function(){return""+this.hours()+S(this.minutes(),2)+S(this.seconds(),2)}),Sa("a",!0),Sa("A",!1),
+// ALIASES
+I("hour","h"),
+// PRIORITY
+L("hour",13),Y("a",Ta),Y("A",Ta),Y("H",Kd),Y("h",Kd),Y("HH",Kd,Gd),Y("hh",Kd,Gd),Y("hmm",Ld),Y("hmmss",Md),Y("Hmm",Ld),Y("Hmmss",Md),aa(["H","HH"],_d),aa(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),aa(["h","hh"],function(a,b,c){b[_d]=t(a),l(c).bigHour=!0}),aa("hmm",function(a,b,c){var d=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d)),l(c).bigHour=!0}),aa("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d,2)),b[be]=t(a.substr(e)),l(c).bigHour=!0}),aa("Hmm",function(a,b,c){var d=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d))}),aa("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d,2)),b[be]=t(a.substr(e))});var se,te=/[ap]\.?m?\.?/i,ue=N("Hours",!0),ve={calendar:td,longDateFormat:ud,invalidDate:vd,ordinal:wd,ordinalParse:xd,relativeTime:yd,months:ge,monthsShort:he,week:le,weekdays:me,weekdaysMin:oe,weekdaysShort:ne,meridiemParse:te},we={},xe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ye=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ze=/Z|[+-]\d\d(?::?\d\d)?/,Ae=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],
+// YYYYMM is NOT allowed by the standard
+["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Be=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ce=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=w("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),
+// constant that refers to the ISO standard
+a.ISO_8601=function(){};var De=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=rb.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:n()}),Ee=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=rb.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:n()}),Fe=function(){return Date.now?Date.now():+new Date};yb("Z",":"),yb("ZZ",""),
+// PARSING
+Y("Z",Td),Y("ZZ",Td),aa(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=zb(Td,a)});
+// HELPERS
+// timezone chunker
+// '+10:00' > ['10',  '00']
+// '-1530'  > ['-15', '30']
+var Ge=/([\+\-]|\d\d)/gi;
+// HOOKS
+// This function will be called whenever a moment is mutated.
+// It is intended to keep the offset in sync with the timezone.
+a.updateOffset=function(){};
+// ASP.NET json date format regex
+var He=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Nb.fn=vb.prototype;var Je=Rb(1,"add"),Ke=Rb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Le=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});
+// FORMATTING
+T(0,["gg",2],0,function(){return this.weekYear()%100}),T(0,["GG",2],0,function(){return this.isoWeekYear()%100}),xc("gggg","weekYear"),xc("ggggg","weekYear"),xc("GGGG","isoWeekYear"),xc("GGGGG","isoWeekYear"),
+// ALIASES
+I("weekYear","gg"),I("isoWeekYear","GG"),
+// PRIORITY
+L("weekYear",1),L("isoWeekYear",1),
+// PARSING
+Y("G",Rd),Y("g",Rd),Y("GG",Kd,Gd),Y("gg",Kd,Gd),Y("GGGG",Od,Id),Y("gggg",Od,Id),Y("GGGGG",Pd,Jd),Y("ggggg",Pd,Jd),ba(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=t(a)}),ba(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),
+// FORMATTING
+T("Q",0,"Qo","quarter"),
+// ALIASES
+I("quarter","Q"),
+// PRIORITY
+L("quarter",7),
+// PARSING
+Y("Q",Fd),aa("Q",function(a,b){b[Zd]=3*(t(a)-1)}),
+// FORMATTING
+T("D",["DD",2],"Do","date"),
+// ALIASES
+I("date","D"),
+// PRIOROITY
+L("date",9),
+// PARSING
+Y("D",Kd),Y("DD",Kd,Gd),Y("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),aa(["D","DD"],$d),aa("Do",function(a,b){b[$d]=t(a.match(Kd)[0],10)});
+// MOMENTS
+var Me=N("Date",!0);
+// FORMATTING
+T("DDD",["DDDD",3],"DDDo","dayOfYear"),
+// ALIASES
+I("dayOfYear","DDD"),
+// PRIORITY
+L("dayOfYear",4),
+// PARSING
+Y("DDD",Nd),Y("DDDD",Hd),aa(["DDD","DDDD"],function(a,b,c){c._dayOfYear=t(a)}),
+// FORMATTING
+T("m",["mm",2],0,"minute"),
+// ALIASES
+I("minute","m"),
+// PRIORITY
+L("minute",14),
+// PARSING
+Y("m",Kd),Y("mm",Kd,Gd),aa(["m","mm"],ae);
+// MOMENTS
+var Ne=N("Minutes",!1);
+// FORMATTING
+T("s",["ss",2],0,"second"),
+// ALIASES
+I("second","s"),
+// PRIORITY
+L("second",15),
+// PARSING
+Y("s",Kd),Y("ss",Kd,Gd),aa(["s","ss"],be);
+// MOMENTS
+var Oe=N("Seconds",!1);
+// FORMATTING
+T("S",0,0,function(){return~~(this.millisecond()/100)}),T(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),T(0,["SSS",3],0,"millisecond"),T(0,["SSSS",4],0,function(){return 10*this.millisecond()}),T(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),T(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),T(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),T(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),T(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),
+// ALIASES
+I("millisecond","ms"),
+// PRIORITY
+L("millisecond",16),
+// PARSING
+Y("S",Nd,Fd),Y("SS",Nd,Gd),Y("SSS",Nd,Hd);var Pe;for(Pe="SSSS";Pe.length<=9;Pe+="S")Y(Pe,Qd);for(Pe="S";Pe.length<=9;Pe+="S")aa(Pe,Gc);
+// MOMENTS
+var Qe=N("Milliseconds",!1);
+// FORMATTING
+T("z",0,0,"zoneAbbr"),T("zz",0,0,"zoneName");var Re=q.prototype;Re.add=Je,Re.calendar=Ub,Re.clone=Vb,Re.diff=ac,Re.endOf=mc,Re.format=ec,Re.from=fc,Re.fromNow=gc,Re.to=hc,Re.toNow=ic,Re.get=Q,Re.invalidAt=vc,Re.isAfter=Wb,Re.isBefore=Xb,Re.isBetween=Yb,Re.isSame=Zb,Re.isSameOrAfter=$b,Re.isSameOrBefore=_b,Re.isValid=tc,Re.lang=Le,Re.locale=jc,Re.localeData=kc,Re.max=Ee,Re.min=De,Re.parsingFlags=uc,Re.set=R,Re.startOf=lc,Re.subtract=Ke,Re.toArray=qc,Re.toObject=rc,Re.toDate=pc,Re.toISOString=dc,Re.toJSON=sc,Re.toString=cc,Re.unix=oc,Re.valueOf=nc,Re.creationData=wc,
+// Year
+Re.year=ke,Re.isLeapYear=qa,
+// Week Year
+Re.weekYear=yc,Re.isoWeekYear=zc,
+// Quarter
+Re.quarter=Re.quarters=Ec,
+// Month
+Re.month=ja,Re.daysInMonth=ka,
+// Week
+Re.week=Re.weeks=Aa,Re.isoWeek=Re.isoWeeks=Ba,Re.weeksInYear=Bc,Re.isoWeeksInYear=Ac,
+// Day
+Re.date=Me,Re.day=Re.days=Ja,Re.weekday=Ka,Re.isoWeekday=La,Re.dayOfYear=Fc,
+// Hour
+Re.hour=Re.hours=ue,
+// Minute
+Re.minute=Re.minutes=Ne,
+// Second
+Re.second=Re.seconds=Oe,
+// Millisecond
+Re.millisecond=Re.milliseconds=Qe,
+// Offset
+Re.utcOffset=Cb,Re.utc=Eb,Re.local=Fb,Re.parseZone=Gb,Re.hasAlignedHourOffset=Hb,Re.isDST=Ib,Re.isLocal=Kb,Re.isUtcOffset=Lb,Re.isUtc=Mb,Re.isUTC=Mb,
+// Timezone
+Re.zoneAbbr=Hc,Re.zoneName=Ic,
+// Deprecations
+Re.dates=w("dates accessor is deprecated. Use date instead.",Me),Re.months=w("months accessor is deprecated. Use month instead",ja),Re.years=w("years accessor is deprecated. Use year instead",ke),Re.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Db),Re.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Jb);var Se=Re,Te=B.prototype;Te.calendar=C,Te.longDateFormat=D,Te.invalidDate=E,Te.ordinal=F,Te.preparse=Lc,Te.postformat=Lc,Te.relativeTime=G,Te.pastFuture=H,Te.set=z,
+// Month
+Te.months=ea,Te.monthsShort=fa,Te.monthsParse=ha,Te.monthsRegex=ma,Te.monthsShortRegex=la,
+// Week
+Te.week=xa,Te.firstDayOfYear=za,Te.firstDayOfWeek=ya,
+// Day of Week
+Te.weekdays=Ea,Te.weekdaysMin=Ga,Te.weekdaysShort=Fa,Te.weekdaysParse=Ia,Te.weekdaysRegex=Ma,Te.weekdaysShortRegex=Na,Te.weekdaysMinRegex=Oa,
+// Hours
+Te.isPM=Ua,Te.meridiem=Va,Za("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===t(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),
+// Side effect imports
+a.lang=w("moment.lang is deprecated. Use moment.locale instead.",Za),a.langData=w("moment.langData is deprecated. Use moment.localeData instead.",ab);var Ue=Math.abs,Ve=cd("ms"),We=cd("s"),Xe=cd("m"),Ye=cd("h"),Ze=cd("d"),$e=cd("w"),_e=cd("M"),af=cd("y"),bf=ed("milliseconds"),cf=ed("seconds"),df=ed("minutes"),ef=ed("hours"),ff=ed("days"),gf=ed("months"),hf=ed("years"),jf=Math.round,kf={s:45,// seconds to minute
+m:45,// minutes to hour
+h:22,// hours to day
+d:26,// days to month
+M:11},lf=Math.abs,mf=vb.prototype;mf.abs=Uc,mf.add=Wc,mf.subtract=Xc,mf.as=ad,mf.asMilliseconds=Ve,mf.asSeconds=We,mf.asMinutes=Xe,mf.asHours=Ye,mf.asDays=Ze,mf.asWeeks=$e,mf.asMonths=_e,mf.asYears=af,mf.valueOf=bd,mf._bubble=Zc,mf.get=dd,mf.milliseconds=bf,mf.seconds=cf,mf.minutes=df,mf.hours=ef,mf.days=ff,mf.weeks=fd,mf.months=gf,mf.years=hf,mf.humanize=kd,mf.toISOString=ld,mf.toString=ld,mf.toJSON=ld,mf.locale=jc,mf.localeData=kc,
+// Deprecations
+mf.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ld),mf.lang=Le,
+// Side effect imports
+// FORMATTING
+T("X",0,0,"unix"),T("x",0,0,"valueOf"),
+// PARSING
+Y("x",Rd),Y("X",Ud),aa("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),aa("x",function(a,b,c){c._d=new Date(t(a))}),
+// Side effect imports
+a.version="2.15.1",b(rb),a.fn=Se,a.min=tb,a.max=ub,a.now=Fe,a.utc=j,a.unix=Jc,a.months=Pc,a.isDate=f,a.locale=Za,a.invalid=n,a.duration=Nb,a.isMoment=r,a.weekdays=Rc,a.parseZone=Kc,a.localeData=ab,a.isDuration=wb,a.monthsShort=Qc,a.weekdaysMin=Tc,a.defineLocale=$a,a.updateLocale=_a,a.locales=bb,a.weekdaysShort=Sc,a.normalizeUnits=J,a.relativeTimeRounding=id,a.relativeTimeThreshold=jd,a.calendarFormat=Tb,a.prototype=Se;var nf=a;return nf});
\ No newline at end of file
index 78907da06a190380bb4339dfb23d74c5360d4cd2..3a229ebadb607d1424e5f9300b20eefac06e1b05 100644 (file)
@@ -198,8 +198,8 @@ function cal_content(&$a) {
 
 
                if ($a->argv[2] === 'json'){
-                       if (x($_GET,'start'))   $start = date("Y-m-d h:i:s", $_GET['start']);
-                       if (x($_GET,'end'))     $finish = date("Y-m-d h:i:s", $_GET['end']);
+                       if (x($_GET,'start'))   $start = $_GET['start'];
+                       if (x($_GET,'end'))     $finish = $_GET['end'];
                }
 
                $start  = datetime_convert('UTC','UTC',$start);
@@ -253,7 +253,7 @@ function cal_content(&$a) {
                        $tpl =  get_markup_template("event.tpl");
                } else {
 //                     if (get_config('experimentals','new_calendar')==1){
-                               $tpl = get_markup_template("events-js.tpl");
+                               $tpl = get_markup_template("events_js.tpl");
 //                     } else {
 //                             $tpl = get_markup_template("events.tpl");
 //                     }
@@ -284,8 +284,7 @@ function cal_content(&$a) {
                        "month" => t("month"),
                        "week" => t("week"),
                        "day" => t("day"),
-
-
+                       "list" => t("list"),
                ));
 
                if (x($_GET,'id')){ echo $o; killme(); }
index 1b5dfdf31c03618f2ed091dd72ac59be28473281..16679ff7e7b47d952ea09b1ff87ce6304376cf1a 100644 (file)
@@ -303,8 +303,8 @@ function events_content(&$a) {
 
 
                if ($a->argv[1] === 'json'){
-                       if (x($_GET,'start'))   $start = date("Y-m-d h:i:s", $_GET['start']);
-                       if (x($_GET,'end'))     $finish = date("Y-m-d h:i:s", $_GET['end']);
+                       if (x($_GET,'start'))   $start = $_GET['start'];
+                       if (x($_GET,'end'))     $finish = $_GET['end'];
                }
 
                $start  = datetime_convert('UTC','UTC',$start);
@@ -357,7 +357,7 @@ function events_content(&$a) {
                        $tpl =  get_markup_template("event.tpl");
                } else {
 //                     if (get_config('experimentals','new_calendar')==1){
-                               $tpl = get_markup_template("events-js.tpl");
+                               $tpl = get_markup_template("events_js.tpl");
 //                     } else {
 //                             $tpl = get_markup_template("events.tpl");
 //                     }
@@ -378,10 +378,10 @@ function events_content(&$a) {
                        '$tabs'         => $tabs,
                        '$title'        => t('Events'),
                        '$view'         => t('View'),
-                       '$new_event'=> array($a->get_baseurl().'/events/new',t('Create New Event'),'',''),
+                       '$new_event'    => array($a->get_baseurl().'/events/new',t('Create New Event'),'',''),
                        '$previus'      => array($a->get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''),
                        '$next'         => array($a->get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''),
-                       '$calendar' => cal($y,$m,$links, ' eventcal'),
+                       '$calendar'     => cal($y,$m,$links, ' eventcal'),
 
                        '$events'       => $events,
 
@@ -389,8 +389,7 @@ function events_content(&$a) {
                        "month" => t("month"),
                        "week" => t("week"),
                        "day" => t("day"),
-
-
+                       "list" => t("list"),
                ));
 
                if (x($_GET,'id')){ echo $o; killme(); }
index 99a320a8952471a0108d8befa617fd2825829804..88147e840da24b828c1e5509e08a109055ef0226 100644 (file)
@@ -1,7 +1,8 @@
 
 <link rel='stylesheet' type='text/css' href='{{$baseurl}}/library/fullcalendar/fullcalendar.css' />
-<script language="javascript" type="text/javascript"
-         src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/library/moment/moment.min.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/library/moment/locales.min.js"></script>
+<script language="javascript" type="text/javascript" src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
 
 <script>
        function showEvent(eventid) {
                        monthNamesShort: ['{{$i18n.Jan}}','{{$i18n.Feb}}','{{$i18n.Mar}}','{{$i18n.Apr}}','{{$i18n.May}}','{{$i18n.Jun}}','{{$i18n.Jul}}','{{$i18n.Aug}}','{{$i18n.Sep}}','{{$i18n.Oct}}','{{$i18n.Nov}}','{{$i18n.Dec}}'],
                        dayNames: ['{{$i18n.Sunday}}','{{$i18n.Monday}}','{{$i18n.Tuesday}}','{{$i18n.Wednesday}}','{{$i18n.Thursday}}','{{$i18n.Friday}}','{{$i18n.Saturday}}'],
                        dayNamesShort: ['{{$i18n.Sun}}','{{$i18n.Mon}}','{{$i18n.Tue}}','{{$i18n.Wed}}','{{$i18n.Thu}}','{{$i18n.Fri}}','{{$i18n.Sat}}'],
+                       allDayText: '{{$i18n.allday}}',
+                       noEventsMessage: '{{$i18n.noevent}}',
                        buttonText: {
-                               prev: "<span class='fc-text-arrow'>&lsaquo;</span>",
-                               next: "<span class='fc-text-arrow'>&rsaquo;</span>",
-                               prevYear: "<span class='fc-text-arrow'>&laquo;</span>",
-                               nextYear: "<span class='fc-text-arrow'>&raquo;</span>",
                                today: '{{$i18n.today}}',
                                month: '{{$i18n.month}}',
                                week: '{{$i18n.week}}',
@@ -68,7 +67,7 @@
                                if (event.item['author-name']==null) return;
                                switch(view.name){
                                        case "month":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
@@ -76,7 +75,7 @@
                                        ));
                                        break;
                                        case "agendaWeek":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
@@ -85,7 +84,7 @@
                                        ));
                                        break;
                                        case "agendaDay":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
diff --git a/view/templates/events-js.tpl b/view/templates/events-js.tpl
deleted file mode 100644 (file)
index ed9354b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-{{$tabs}}
-<h2>{{$title}}</h2>
-
-<div id="new-event-link"><a href="{{$new_event.0}}" >{{$new_event.1}}</a></div>
-
-<div id="events-calendar"></div>
diff --git a/view/templates/events_js.tpl b/view/templates/events_js.tpl
new file mode 100644 (file)
index 0000000..ed9354b
--- /dev/null
@@ -0,0 +1,7 @@
+
+{{$tabs}}
+<h2>{{$title}}</h2>
+
+<div id="new-event-link"><a href="{{$new_event.0}}" >{{$new_event.1}}</a></div>
+
+<div id="events-calendar"></div>
diff --git a/view/theme/frio/css/mod_events.css b/view/theme/frio/css/mod_events.css
new file mode 100644 (file)
index 0000000..5ca2230
--- /dev/null
@@ -0,0 +1,151 @@
+/**
+ * @file view/theme/frio/css/mod_event.css
+ */
+
+/**
+ * The different views of js fullcalendar
+ */
+#fc-header {
+    margin-top: 20px;
+    margin-bottom: 10px;
+}
+#fc-header-left,
+#fc-header-right,
+#event-calendar-title {
+    display: inline-block;
+}
+#fc-title {
+    margin: 0;
+    padding-left: 20px;
+
+}
+#fc-header-right {
+    margin-top: -4px;
+}
+#event-calendar-title {
+    vertical-align: middle;
+}
+a#event-calendar-views {
+    padding: 6px 9px;
+    font-size: 14px
+}
+.fc .fc-toolbar {
+    display: none;
+}
+.fc .fc-month-view td.fc-widget-content,
+.fc .fc-list-view,
+.fc .fc-list-view .fc-list-table td,
+.fc .fc-body td {
+    border-style: none;
+}
+.fc td.fc-widget-header,
+.fc th.fc-widget-header {
+    border-left: none;
+    border-right: none;
+    border-top: none;
+}
+.fc .fc-month-view td.fc-day {
+    border-left: none;
+    border-right: none;
+    border-bottom: 1px solid;
+    padding: 0 6px;
+}
+.fc .fc-day-grid-container .fc-row {
+    border-bottom: 1px solid;
+    border-color: #ddd;
+}
+.fc .fc-day-grid-event .fc-content {
+    /*white-space: normal;*/
+}
+.fc tr td.fc-today {
+    border-style: none;
+}
+.fc .fc-month-view .fc-content .fc-title .item-desc {
+    font-size: 11px;
+}
+.fc .fc-view-container {
+    margin-top: 25px;
+}
+.fc .fc-list-view td {
+    padding: 0;
+}
+#events-calendar.fc-ltr .fc-basic-view .fc-day-top .fc-day-number {
+    float: left;
+    font-size: 12px;
+}
+.fc .fc-event {
+    background-color: transparent;
+    background-color: #E3F2FD;
+    border: 1px solid #BBDEFB;
+    color: #555;
+}
+.fc .fc-month-view .fc-time,
+.fc .fc-listMonth-view .fc-list-item-time,
+.fc .fc-listMonth-view .fc-list-item-marker,
+.fc .fc-listMonth-view .fc-widget-header {
+    display: none;
+}
+.fc .fc-listMonth-view .fc-list-item:hover td {
+    background: transparent;
+    cursor: pointer;
+}
+.fc .fc-listMonth-view .seperator {
+    margin-left: 30px;
+    width: 60px;
+}
+
+
+
+/**
+ * The event-card
+ */
+.event-card {
+       width: auto;
+}
+.event-card .event-label,
+.event-card .location-label {
+    font-weight: bold;
+}
+.popover.event-card .event-card-basic-content {
+    margin-top: 0;
+    padding: 9px;
+    padding-left: 0px;
+}
+.event-card .event-hover-left-date {
+    width: 60px;
+}
+.event-card .event-date-wrapper.medium > span {
+    display: block;
+    overflow: hidden;
+    text-align: center;
+    white-space: nowrap;
+}
+.event-card .event-date-wrapper.medium .event-hover-short-month {
+    font-size: 13px;
+    text-transform: uppercase;
+}
+.event-card .event-date-wrapper.medium .event-hover-short-date {
+    font-size: 24px;
+    line-height: 28px;
+    margin-top: 2px;
+}
+
+.event-card .event-card-basic-content .event-card-content {
+    width: 100%;
+    padding: 0 5px 0 15px;
+    box-shadow: 1.5px 0 0 0 rgba(0, 0, 0, .1) inset;
+}
+.event-card .event-hover-title {
+    font-size: 14px;
+    color: #555;
+    line-height: 15px;
+    font-weight: bold;
+}
+.event-card .event-hover-location {
+    margin-top: 10px;
+    font-size: 13px;
+}
+.event-card .event-hover-location .location {
+    color: #777;
+    font-size: 13px;
+}
\ No newline at end of file
index 7c6cb43ef6f15b215c22ad344472d61d60ad849e..a9c1a67d446e474f355f3d652d747a4d0a125f04 100644 (file)
@@ -2081,45 +2081,21 @@ ul li:hover .contact-wrapper a.contact-action-link:hover {
 }
 
 /* Events page */
-#fc-header {
-    margin-top: 20px;
-    margin-bottom: 10px;
-}
-#fc-header-left,
-#fc-header-right,
-#event-calendar-title {
-    display: inline-block;
-}
-#fc-title {
-    margin: 0;
-    padding-left: 20px;
 
+
+.fc .fc-month-view .fc-content .fc-title .item-desc:hover {
+    color: $link_hover_color;
 }
-#fc-header-right {
-    margin-top: -4px;
-}
-#event-calendar-title {
-    vertical-align: middle;
-}
-a#event-calendar-views {
-    padding: 6px 9px;
-    font-size: 14px
-}
-tr.fc-first,
-tr.fc-first th {
-    border-left: none;
-    border-right: none;
-    border-top: none;
-}
-td.fc-day {
-    border-left: none;
-    border-right: none;
-    padding: 0 6px;
+.fc .fc-list-item-title a {
+    color: $link_color;
 }
-#events-calendar .fc-grid .fc-day-number {
-    float: left;
-    font-size: 0.9em;
+.fc .fc-list-item-title a[href]:hover {
+    color: $link_hover_color;
+    text-decoration: none;
 }
+/*.event-date-wrapper.medium .event-hover-short-month {
+    color: $link_color;
+}*/
 .event-wrapper .event-owner {
   margin-bottom: 15px;
 }
diff --git a/view/theme/frio/js/event.js b/view/theme/frio/js/event.js
deleted file mode 100644 (file)
index c6a3541..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-$(document).ready(function() { 
-       // go to the permissions tab if the checkbox is checked
-       $('body').on("change", "#id_share", function() {
-
-               if ($('#id_share').is(':checked') && !( $('#id_share').attr("disabled"))) { 
-                       $('#acl-wrapper').show();
-                       $("a#event-perms-lnk").parent("li").show();
-                       toggleEventNav("a#event-perms-lnk");
-                       eventAclActive();
-               }
-               else {
-                       $('#acl-wrapper').hide();
-                       $("a#event-perms-lnk").parent("li").hide();
-               }
-       }).trigger('change');
-
-       // disable the finish time input if the user disable it
-       $('body').on("change", "#id_nofinish", function() {
-               enableDisableFinishDate()
-       }).trigger('change');
-
-       // js for the permission sextion
-       $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
-               var selstr;
-               $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
-                       selstr = $(this).text();
-                       $('#jot-public').hide();
-               });
-               if(selstr == null) {
-                       $('#jot-public').show();
-               }
-
-       }).trigger('change');
-
-       // Change the event nav menu.tabs on click
-       $("body").on("click", "#event-nav > li > a", function(e){
-               e.preventDefault();
-               toggleEventNav(this);
-       });
-
-       // this is experimental. We maybe can make use of it to inject
-       // some js code while the event modal opens
-       //$('body').on('show.bs.modal', function () {
-       //      enableDisableFinishDate();
-       //});
-
-       // clear some elements (e.g. the event-preview container) when
-       // selecting a event nav link so it don't appear more than once
-       $('body').on("click", "#event-nav a", function(e) {
-               $("#event-preview").empty();
-               e.preventDefault();
-       });
-
-});
-
-// Load the html of the actual event and incect the output to the
-// event-edit section
-function doEventPreview() {
-       $('#event-edit-preview').val(1);
-       $.post('events',$('#event-edit-form').serialize(), function(data) {
-               $("#event-preview").append(data);
-       });
-       $('#event-edit-preview').val(0);
-}
-
-
-// this function load the content of the edit url into a modal
-function eventEdit(url) {
-       var char = qOrAmp(url);
-       url = url + char + 'mode=none';
-
-       $.get(url, function(data) {
-               $("#modal-body").empty();
-               $("#modal-body").append(data);
-       }).done(function() {
-               loadModalTitle();
-       });
-}
-
-// the following functions show/hide the specific event-edit content 
-// in dependence of the selected nav
-function eventAclActive() {
-       $("#event-edit-wrapper, #event-preview, #event-desc-wrapper").hide();
-       $("#event-acl-wrapper").show();
-}
-
-
-function eventPreviewActive() {
-       $("#event-acl-wrapper, #event-edit-wrapper, #event-desc-wrapper").hide();
-       $("#event-preview").show();
-       doEventPreview();
-}
-
-function eventEditActive() {
-       $("#event-acl-wrapper, #event-preview, #event-desc-wrapper").hide();
-       $("#event-edit-wrapper").show();
-
-       //make sure jot text does have really the active class (we do this because there are some
-       // other events which trigger jot text
-       toggleEventNav($("#event-edit-lnk"));
-}
-
-function eventDescActive() {
-       $("#event-edit-wrapper, #event-preview, #event-acl-wrapper").hide();
-       $("#event-desc-wrapper").show();
-}
-
-// Give the active "event-nav" list element the class "active"
-function toggleEventNav (elm) {
-       // select all li of #event-nav and remove the active class
-       $(elm).closest("#event-nav").children("li").removeClass("active");
-       // add the active class to the parent of the link which was selected
-       $(elm).parent("li").addClass("active");
-}
-
-
-
-// disable the input for the finish date if it is not available
-function enableDisableFinishDate() {
-       if( $('#id_nofinish').is(':checked'))
-               $('#id_finish_text').prop("disabled", true);
-       else
-               $('#id_finish_text').prop("disabled", false);
-}
diff --git a/view/theme/frio/js/event_edit.js b/view/theme/frio/js/event_edit.js
new file mode 100644 (file)
index 0000000..1cefed7
--- /dev/null
@@ -0,0 +1,123 @@
+$(document).ready(function() { 
+       // go to the permissions tab if the checkbox is checked
+       $('body').on("change", "#id_share", function() {
+               if ($('#id_share').is(':checked') && !( $('#id_share').attr("disabled"))) { 
+                       $('#acl-wrapper').show();
+                       $("a#event-perms-lnk").parent("li").show();
+                       toggleEventNav("a#event-perms-lnk");
+                       eventAclActive();
+               }
+               else {
+                       $('#acl-wrapper').hide();
+                       $("a#event-perms-lnk").parent("li").hide();
+               }
+       }).trigger('change');
+
+       // disable the finish time input if the user disable it
+       $('body').on("change", "#id_nofinish", function() {
+               enableDisableFinishDate()
+       }).trigger('change');
+
+       // js for the permission sextion
+       $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
+               var selstr;
+               $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
+                       selstr = $(this).text();
+                       $('#jot-public').hide();
+               });
+               if (selstr == null) {
+                       $('#jot-public').show();
+               }
+
+       }).trigger('change');
+
+       // Change the event nav menu.tabs on click
+       $("body").on("click", "#event-nav > li > a", function(e){
+               e.preventDefault();
+               toggleEventNav(this);
+       });
+
+       // this is experimental. We maybe can make use of it to inject
+       // some js code while the event modal opens
+       //$('body').on('show.bs.modal', function () {
+       //      enableDisableFinishDate();
+       //});
+
+       // clear some elements (e.g. the event-preview container) when
+       // selecting a event nav link so it don't appear more than once
+       $('body').on("click", "#event-nav a", function(e) {
+               $("#event-preview").empty();
+               e.preventDefault();
+       });
+
+});
+
+// Load the html of the actual event and incect the output to the
+// event-edit section
+function doEventPreview() {
+       $('#event-edit-preview').val(1);
+       $.post('events',$('#event-edit-form').serialize(), function(data) {
+               $("#event-preview").append(data);
+       });
+       $('#event-edit-preview').val(0);
+}
+
+
+// this function load the content of the edit url into a modal
+function eventEdit(url) {
+       var char = qOrAmp(url);
+       url = url + char + 'mode=none';
+
+       $.get(url, function(data) {
+               $("#modal-body").empty();
+               $("#modal-body").append(data);
+       }).done(function() {
+               loadModalTitle();
+       });
+}
+
+// the following functions show/hide the specific event-edit content 
+// in dependence of the selected nav
+function eventAclActive() {
+       $("#event-edit-wrapper, #event-preview, #event-desc-wrapper").hide();
+       $("#event-acl-wrapper").show();
+}
+
+
+function eventPreviewActive() {
+       $("#event-acl-wrapper, #event-edit-wrapper, #event-desc-wrapper").hide();
+       $("#event-preview").show();
+       doEventPreview();
+}
+
+function eventEditActive() {
+       $("#event-acl-wrapper, #event-preview, #event-desc-wrapper").hide();
+       $("#event-edit-wrapper").show();
+
+       //make sure jot text does have really the active class (we do this because there are some
+       // other events which trigger jot text
+       toggleEventNav($("#event-edit-lnk"));
+}
+
+function eventDescActive() {
+       $("#event-edit-wrapper, #event-preview, #event-acl-wrapper").hide();
+       $("#event-desc-wrapper").show();
+}
+
+// Give the active "event-nav" list element the class "active"
+function toggleEventNav (elm) {
+       // select all li of #event-nav and remove the active class
+       $(elm).closest("#event-nav").children("li").removeClass("active");
+       // add the active class to the parent of the link which was selected
+       $(elm).parent("li").addClass("active");
+}
+
+
+
+// disable the input for the finish date if it is not available
+function enableDisableFinishDate() {
+       if( $('#id_nofinish').is(':checked'))
+               $('#id_finish_text').prop("disabled", true);
+       else
+               $('#id_finish_text').prop("disabled", false);
+}
diff --git a/view/theme/frio/js/mod_events.js b/view/theme/frio/js/mod_events.js
new file mode 100644 (file)
index 0000000..0b6bb6e
--- /dev/null
@@ -0,0 +1,252 @@
+/**
+ * @file view/theme/frio/js/mod_events.js
+ * @brief Initialization of the fullCalendar and format the output.
+ */
+
+$(document).ready(function() {
+       // start the fullCalendar
+       $('#events-calendar').fullCalendar({
+               firstDay: aStr.firstDay,
+               monthNames: aStr['monthNames'],
+               monthNamesShort: aStr['monthNamesShort'],
+               dayNames: aStr['dayNames'],
+               dayNamesShort: aStr['dayNamesShort'],
+               allDayText: aStr.allday,
+               noEventsMessage: aStr.noevent,
+               buttonText: {
+                       today: aStr.today,
+                       month: aStr.month,
+                       week: aStr.week,
+                       day: aStr.day
+               },
+               events: baseurl + moduleUrl + '/json/',
+               header: {
+                       left: '',
+               //      center: 'title',
+                       right: ''
+               },                      
+               timeFormat: 'H:mm',
+               eventClick: function(calEvent, jsEvent, view) {
+                       showEvent(calEvent.id);
+               },
+               loading: function(isLoading, view) {
+                       if(!isLoading) {
+                               $('td.fc-day').dblclick(function() { addToModal('/events/new?start='+$(this).data('date')); });
+                       }
+               },
+               defaultView: 'month',
+               aspectRatio: 1,
+               eventRender: function(event, element, view) {
+                       //console.log(view.name);
+                       if (event.item['author-name'] == null) return;
+                       switch(view.name){
+                               case "month":
+                               element.find(".fc-title").html(
+                                       "<span class='item-desc'>{2}</span>".format(
+                                               event.item['author-avatar'],
+                                               event.item['author-name'],
+                                               event.title,
+                                               event.item.desc,
+                                               event.item.location
+                               ));
+                               break;
+                               case "agendaWeek":
+                               element.find(".fc-title").html(
+                                       "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
+                                               event.item['author-avatar'],
+                                               event.item['author-name'],
+                                               event.item.desc,
+                                               formatEventLocationText(event.item.location)
+                               ));
+                               break;
+                               case "agendaDay":
+                               element.find(".fc-title").html(
+                                       "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
+                                               event.item['author-avatar'],
+                                               event.item['author-name'],
+                                               event.item.desc,
+                                               formatEventLocationText(event.item.location)
+                               ));
+                               break;
+                               case "listMonth":
+                               element.find(".fc-list-item-title").html(formatListViewEvent(event));
+                               break;
+                       }
+               },
+               eventAfterRender: function (event, element) {
+                       $(element).popover({
+                               content: eventHoverHtmlContent(event),
+                               container: "body",
+                               html: true,
+                               trigger: "hover",
+                               placement: "auto",
+                               template: '<div class="popover hovercard event-card"><div class="arrow"></div><div class="popover-content hovercard-content"></div></div>',
+                       });
+
+               }
+
+       })
+
+       // center on date
+       var args=location.href.replace(baseurl,"").split("/");
+       if (modparams == 2) {
+               if (args.length>=5) {
+                       $("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1);
+               }
+       } else {
+               if (args.length>=4) {
+                       $("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
+               }
+       }
+
+       // echo the title
+       var view = $('#events-calendar').fullCalendar('getView');
+       $('#fc-title').text(view.title);
+
+       // show event popup
+       var hash = location.hash.split("-")
+       if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]);
+
+});
+
+// loads the event into a modal
+function showEvent(eventid) {
+               addToModal(baseurl + moduleUrl + '/?id=' + eventid);
+}
+
+function changeView(action, viewName) {
+       $('#events-calendar').fullCalendar(action, viewName);
+       var view = $('#events-calendar').fullCalendar('getView');
+       $('#fc-title').text(view.title);
+}
+
+// The template for the bootstrap popover for displaying the event title and
+// author (it's the nearly the same template we use in frio for the contact
+// hover cards. So be careful when changing the css)
+function eventHoverBodyTemplate() {
+       var template = '\
+               <div class="event-card-basic-content media">\
+                       <div class="hover-card-details">\
+                               <div class="hover-card-header left-align">\
+                                       <div class="event-hover-left-date left-align">\
+                                               <span class="event-date-wrapper medium">\
+                                                       <span class="event-hover-short-month">{6}</span>\
+                                                       <span class="event-hover-short-date">{7}</span>\
+                                               </span>\
+                                       </div>\
+                                       <div class="event-card-content media-body">\
+                                               <div class="event-hover-title">{3}</div>\
+                                               <div class="event-property"><span class="event-hover-date">{5}</span>{4}\
+                                               <div class="event-hover-profile-name profile-entry-name">\
+                                                       <span class="left-align1"><a href="{1}" class="userinfo">{2}</a></span>\
+                                               </div>\
+                                       </div>\
+                               </div>\
+                               <div class="clearfix"></div>\
+                       </div>\
+               </div>';
+
+       return template;
+}
+
+// The template for presenting the event location in the event hover-card
+function eventHoverLocationTemplate() {
+       var template = '<span class="event-hover-location"> {0}</span></div>';
+       return template;
+}
+
+// transform the event data to html so we can use it in the event hover-card 
+function eventHoverHtmlContent(event) {
+       var eventLocation = '';
+       // Get the Browser language
+       var locale = window.navigator.userLanguage || window.navigator.language;
+       var data = '';
+
+       // Use the browser language for date formatting
+       moment.locale(locale);
+
+       // format dates to different styles
+       var startDate = moment(event.item.start).format('dd HH:mm');
+       var endDate = moment(event.item.finsih).format('dd HH:mm');
+       var monthShort = moment(event.item.start).format('MMM');
+       var dayNumberStart = moment(event.item.start).format('DD');
+       var dayNumberEnd = moment(event.item.finish).format('DD');
+       var startTime = moment(event.item.start).format('HH:mm');
+       var endTime = moment(event.item.finish).format('HH:mm');
+       var monthNumber;
+
+       var formattedDate = startDate
+
+       // We only need the to format the end date if the event does have
+       // a finish date. 
+       if (event.item.nofinish == 0) {
+               formattedDate = startDate + ' - ' + endTime;
+
+               // use a different Format (15. Feb - 18. Feb) if the events end date
+               // is not the start date
+               if ( dayNumberStart != dayNumberEnd) {
+                       formattedDate = moment(event.item.start).format('Do MMM') + 
+                                       ' - ' +
+                                       moment(event.item.finish).format('Do MMM');
+               }
+       }
+
+       // Get the html template
+       data = eventHoverBodyTemplate();
+
+       // Get only template data if there exist location data
+       if (event.item.location != '') {
+               var eventLocationText = formatEventLocationText(event.item.location);
+               // Get the the html template for formatting the location
+               var eventLocationTemplate = eventHoverLocationTemplate();
+               // Format the event location data according to the the event location
+               // template
+               eventLocation = eventLocationTemplate.format(
+                                       eventLocationText
+               );
+       }
+
+       // Format the event data according to the event hover template
+       var formatted = data.format(
+                               event.item['author-avatar'], // this isn't used at the present time
+                               event.item['author-link'],
+                               event.item['author-name'],
+                               event.title,
+                               eventLocation,
+                               formattedDate,
+                               monthShort.replace('.', ''), // Get rid of possible dots in the string
+                               dayNumberStart
+                       );
+
+       return formatted;
+}
+
+// transform the the list view event element into formatted html
+function formatListViewEvent(event) {
+       // The basic template for list view
+       var template = '<td class="fc-list-item-title fc-widget-content">\
+                               <hr class="seperator"></hr>\
+                               <div class="event-card">\
+                                       <div class="popover-content hovercard-content">{0}</div>\
+                               </div>\
+                       </td>';
+       // Use the formation of the event hover and insert it in the base list view template
+       var formatted = template.format(eventHoverHtmlContent(event));
+
+       return formatted;
+}
+
+// Format event location in pure text
+function formatEventLocationText(location) {
+       // Friendica can store the event location as text or as html
+       // We need to check if the location is html. In this case we need
+       // to transform it into clean text
+       if (location.startsWith("<div")) {
+               var locationHtml = $.parseHTML( location );
+               var eventLocationText = locationHtml[0]['innerText'];
+       } else {
+               var eventLocationText = location.replace("<br>", " ");
+       };
+
+       return eventLocationText;
+}
\ No newline at end of file
index 32e740581a2a451e6ac00721359d5cfd4b6732dc..e2b58e02fd01bab7eafcba43d922f04720c5a409 100644 (file)
@@ -1,5 +1,5 @@
 <script language="javascript" type="text/javascript"
-         src="{{$baseurl}}/view/theme/frio/js/event.js"></script>
+         src="{{$baseurl}}/view/theme/frio/js/event_edit.js"></script>
 
 {{foreach $events as $event}}
        <div class="event-wrapper">
index 1b48addc9bf1755d7de5514fb0f08c24257984bb..42d0bb37545bba15ff979581dc141f5c303bc7f9 100644 (file)
@@ -1,5 +1,5 @@
 <script language="javascript" type="text/javascript"
-         src="{{$baseurl}}/view/theme/frio/js/event.js"></script>
+         src="{{$baseurl}}/view/theme/frio/js/event_edit.js"></script>
 <div id="event-form-wrapper">
        <h3 class="heading">{{$title}}</h3>
 
index 340b9b3d51c819360e58560b5d6466945b9d021b..0bbc4bd72e06321b31616294dc995f1f7a3a21e9 100644 (file)
 
 <link rel='stylesheet' type='text/css' href='{{$baseurl}}/library/fullcalendar/fullcalendar.css' />
-<script language="javascript" type="text/javascript"
-         src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
+<link rel='stylesheet' type='text/css' href='view/theme/frio/css/mod_events.css' />
+<script type="text/javascript" src="{{$baseurl}}/library/moment/moment.min.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/library/moment/locales.min.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
+<script type="text/javascript" src="view/theme/frio/js/mod_events.js"></script>
+
 
 <script language="javascript" type="text/javascript">
-       // loads the event into a modal
-       function showEvent(eventid) {
-                       addToModal('{{$baseurl}}{{$module_url}}/?id='+eventid);
-       }
-
-       function changeView(action, viewName) {
-               $('#events-calendar').fullCalendar(action, viewName);
-               var view = $('#events-calendar').fullCalendar('getView');
-               $('#fc-title').text(view.title);
-       }
-
-       $(document).ready(function() {
-               // start the fullCalendar
-               $('#events-calendar').fullCalendar({
-                       firstDay: {{$i18n.firstDay}},
-                       monthNames: ['{{$i18n.January}}','{{$i18n.February}}','{{$i18n.March}}','{{$i18n.April}}','{{$i18n.May}}','{{$i18n.June}}','{{$i18n.July}}','{{$i18n.August}}','{{$i18n.September}}','{{$i18n.October}}','{{$i18n.November}}','{{$i18n.December}}'],
-                       monthNamesShort: ['{{$i18n.Jan}}','{{$i18n.Feb}}','{{$i18n.Mar}}','{{$i18n.Apr}}','{{$i18n.May}}','{{$i18n.Jun}}','{{$i18n.Jul}}','{{$i18n.Aug}}','{{$i18n.Sep}}','{{$i18n.Oct}}','{{$i18n.Nov}}','{{$i18n.Dec}}'],
-                       dayNames: ['{{$i18n.Sunday}}','{{$i18n.Monday}}','{{$i18n.Tuesday}}','{{$i18n.Wednesday}}','{{$i18n.Thursday}}','{{$i18n.Friday}}','{{$i18n.Saturday}}'],
-                       dayNamesShort: ['{{$i18n.Sun}}','{{$i18n.Mon}}','{{$i18n.Tue}}','{{$i18n.Wed}}','{{$i18n.Thu}}','{{$i18n.Fri}}','{{$i18n.Sat}}'],
-                       buttonText: {
-                               prev: "<span class='fc-text-arrow'>&lsaquo;</span>",
-                               next: "<span class='fc-text-arrow'>&rsaquo;</span>",
-                               prevYear: "<span class='fc-text-arrow'>&laquo;</span>",
-                               nextYear: "<span class='fc-text-arrow'>&raquo;</span>",
-                               today: '{{$i18n.today}}',
-                               month: '{{$i18n.month}}',
-                               week: '{{$i18n.week}}',
-                               day: '{{$i18n.day}}'
-                       },
-                       events: '{{$baseurl}}{{$module_url}}/json/',
-                       header: {
-                               left: '',
-                       //      center: 'title',
-                               right: ''
-                       },                      
-                       timeFormat: 'H(:mm)',
-                       eventClick: function(calEvent, jsEvent, view) {
-                               showEvent(calEvent.id);
-                       },
-                       loading: function(isLoading, view) {
-                               if(!isLoading) {
-                                       $('td.fc-day').dblclick(function() { addToModal('/events/new?start='+$(this).data('date')); });
-                               }
-                       },
-                       
-                       eventRender: function(event, element, view) {
-                               //console.log(view.name);
-                               if (event.item['author-name']==null) return;
-                               switch(view.name){
-                                       case "month":
-                                       element.find(".fc-event-title").html(
-                                               "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
-                                                       event.item['author-avatar'],
-                                                       event.item['author-name'],
-                                                       event.title
-                                       ));
-                                       break;
-                                       case "agendaWeek":
-                                       element.find(".fc-event-title").html(
-                                               "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
-                                                       event.item['author-avatar'],
-                                                       event.item['author-name'],
-                                                       event.item.desc,
-                                                       event.item.location
-                                       ));
-                                       break;
-                                       case "agendaDay":
-                                       element.find(".fc-event-title").html(
-                                               "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
-                                                       event.item['author-avatar'],
-                                                       event.item['author-name'],
-                                                       event.item.desc,
-                                                       event.item.location
-                                       ));
-                                       break;
-                               }
-                       }
-                       
-               })
-
-               // center on date
-               var args=location.href.replace(baseurl,"").split("/");
-               {{if $modparams == 2}}
-               if (args.length>=5) {
-                       $("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1);
-               }
-               {{else}}
-               if (args.length>=4) {
-                       $("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
-               }
-               {{/if}} 
+       // pass php translation strings to js variables/arrays so we can make use of it in js files
+       aStr.monthNames = ['{{$i18n.January}}','{{$i18n.February}}','{{$i18n.March}}','{{$i18n.April}}','{{$i18n.May}}','{{$i18n.June}}','{{$i18n.July}}','{{$i18n.August}}','{{$i18n.September}}','{{$i18n.October}}','{{$i18n.November}}','{{$i18n.December}}'];
+       aStr.monthNamesShort = ['{{$i18n.Jan}}','{{$i18n.Feb}}','{{$i18n.Mar}}','{{$i18n.Apr}}','{{$i18n.May}}','{{$i18n.Jun}}','{{$i18n.Jul}}','{{$i18n.Aug}}','{{$i18n.Sep}}','{{$i18n.Oct}}','{{$i18n.Nov}}','{{$i18n.Dec}}'];
+       aStr.monthNamesShort = ['{{$i18n.Jan}}','{{$i18n.Feb}}','{{$i18n.Mar}}','{{$i18n.Apr}}','{{$i18n.May}}','{{$i18n.Jun}}','{{$i18n.Jul}}','{{$i18n.Aug}}','{{$i18n.Sep}}','{{$i18n.Oct}}','{{$i18n.Nov}}','{{$i18n.Dec}}'];
+       aStr.dayNames = ['{{$i18n.Sunday}}','{{$i18n.Monday}}','{{$i18n.Tuesday}}','{{$i18n.Wednesday}}','{{$i18n.Thursday}}','{{$i18n.Friday}}','{{$i18n.Saturday}}'];
+       aStr.dayNamesShort = ['{{$i18n.Sun}}','{{$i18n.Mon}}','{{$i18n.Tue}}','{{$i18n.Wed}}','{{$i18n.Thu}}','{{$i18n.Fri}}','{{$i18n.Sat}}'];
 
-               // echo the title
-               var view = $('#events-calendar').fullCalendar('getView');
-               $('#fc-title').text(view.title);
+       aStr.firstDay = '{{$i18n.firstDay}}';
+       aStr.today = '{{$i18n.today}}';
+       aStr.month = '{{$i18n.month}}';
+       aStr.week = '{{$i18n.week}}';
+       aStr.day = '{{$i18n.day}}';
 
-               // show event popup
-               var hash = location.hash.split("-")
-               if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]);
-               
-       });
-</script>
+       aStr.allday = '{{$i18n.allday}}';
+       aStr.noevent = '{{$i18n.noevent}}';
+
+       aStr.dtstartLabel = '{{$i18n.dtstart_label}}';
+       aStr.dtendLabel = '{{$i18n.dtend_label}}';
+       aStr.locationLabel = '{{$i18n.location_label}}';
 
+       var moduleUrl = '{{$module_url}}';
+       var modparams = {{$modparams}}
+
+</script>
 
 {{if $editselect != 'none'}}
 <script language="javascript" type="text/javascript"
diff --git a/view/theme/frio/templates/events-js.tpl b/view/theme/frio/templates/events-js.tpl
deleted file mode 100644 (file)
index 9e46b5c..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<div class="generic-page-wrapper">
-       {{$tabs}}
-       {{include file="section_title.tpl" title=$title}}
-
-       {{* The link to create a new event *}}
-       <div id="new-event-link"><a onclick="addToModal('{{$new_event.0}}')" >{{$new_event.1}}</a></div>
-
-       {{* We create our own fullcallendar header (with title & calendar view *}}
-       <div id="fc-header">
-               <div id="fc-header-right" class="pull-right">
-                       {{* The dropdown to change the callendar view *}}
-                       <ul class="nav nav-pills">
-                               <li class="dropdown pull-right">
-                                       <a class="btn btn-link btn-sm dropdown-toggle" type="button" id="event-calendar-views" data-toggle="dropdown" aria-expanded="true">
-                                               <i class="fa fa-angle-down"></i> {{$view}}
-                                       </a>
-                                       <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="event-calendar-views">
-                                               <li role="menuitem">
-
-                                                       <a onclick="changeView('changeView', 'month')">{{$month}}</a>
-                                               </li>
-                                               <li role="menuitem">
-
-                                                       <a onclick="changeView('changeView', 'agendaWeek')">{{$week}}</a>
-                                               </li>
-                                               <li role="menuitem">
-
-                                                       <a onclick="changeView('changeView', 'agendaDay')">{{$day}}</a>
-                                               </li>
-                                       </ul>
-                               </li>
-                       </ul>
-               </div>
-
-               {{* The buttons to change the month/weeks/days *}}
-               <div id="fc-fc-header-left" class="btn-group">
-                       <button class="btn btn-eventnav" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-angle-up" aria-hidden="true"></i></i></button>
-                       <button class="btn btn-eventnav btn-separator" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-angle-down" aria-hidden="true"></i></i></button>
-                       <button class="btn btn-eventnav btn-separator" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></i></button>
-               </div>
-
-               {{* The title (e.g. name of the mont/week/day) *}}
-               <div id="event-calendar-title"><h4 id="fc-title"></h4></div>
-
-       </div>
-
-       {{* This is the container where the fullCalendar is inserted through js *}}
-       <div id="events-calendar"></div>
-</div>
diff --git a/view/theme/frio/templates/events_js.tpl b/view/theme/frio/templates/events_js.tpl
new file mode 100644 (file)
index 0000000..80b08a1
--- /dev/null
@@ -0,0 +1,49 @@
+<div class="generic-page-wrapper">
+       {{$tabs}}
+       {{include file="section_title.tpl" title=$title}}
+
+       {{* The link to create a new event *}}
+       <div id="new-event-link"><a onclick="addToModal('{{$new_event.0}}')" >{{$new_event.1}}</a></div>
+
+       {{* We create our own fullcallendar header (with title & calendar view *}}
+       <div id="fc-header">
+               <div id="fc-header-right" class="pull-right">
+                       {{* The dropdown to change the callendar view *}}
+                       <ul class="nav nav-pills">
+                               <li class="dropdown pull-right">
+                                       <a class="btn btn-link btn-sm dropdown-toggle" type="button" id="event-calendar-views" data-toggle="dropdown" aria-expanded="true">
+                                               <i class="fa fa-angle-down"></i> {{$view}}
+                                       </a>
+                                       <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="event-calendar-views">
+                                               <li role="menuitem">
+                                                       <a onclick="changeView('changeView', 'month');$('#events-calendar').fullCalendar('option', {contentHeight: '', aspectRatio: 1});">{{$month}}</a>
+                                               </li>
+                                               <li role="menuitem">
+                                                       <a onclick="changeView('changeView', 'agendaWeek');$('#events-calendar').fullCalendar('option', 'contentHeight', 'auto');">{{$week}}</a>
+                                               </li>
+                                               <li role="menuitem">
+                                                       <a onclick="changeView('changeView', 'agendaDay');$('#events-calendar').fullCalendar('option', 'contentHeight', 'auto');">{{$day}}</a>
+                                               </li>
+                                               <li role="menuitem">
+                                                       <a onclick="changeView('changeView', 'listMonth');$('#events-calendar').fullCalendar('option', 'contentHeight', 'auto');">{{$list}}</a>
+                                               </li>
+                                       </ul>
+                               </li>
+                       </ul>
+               </div>
+
+               {{* The buttons to change the month/weeks/days *}}
+               <div id="fc-fc-header-left" class="btn-group">
+                       <button class="btn btn-eventnav" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-angle-up" aria-hidden="true"></i></i></button>
+                       <button class="btn btn-eventnav btn-separator" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-angle-down" aria-hidden="true"></i></i></button>
+                       <button class="btn btn-eventnav btn-separator" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></i></button>
+               </div>
+
+               {{* The title (e.g. name of the mont/week/day) *}}
+               <div id="event-calendar-title"><h4 id="fc-title"></h4></div>
+
+       </div>
+
+       {{* This is the container where the fullCalendar is inserted through js *}}
+       <div id="events-calendar"></div>
+</div>
index 3017263b6b53eddfbc948460725290e1a3a34564..5f7997b086d0dd8090c88cc999011982d93c7438 100644 (file)
@@ -172,7 +172,7 @@ $(document).ready(function() {
                                if (event.item['author-name']==null) return;
                                switch(view.name){
                                        case "month":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
@@ -180,7 +180,7 @@ $(document).ready(function() {
                                        ));
                                        break;
                                        case "agendaWeek":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
@@ -189,7 +189,7 @@ $(document).ready(function() {
                                        ));
                                        break;
                                        case "agendaDay":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
index aad3e5a9437f130682f78a313f3a41c26e360ff1..8bc2a5bd1813d0c7fe8175ca36df39b273c827b4 100644 (file)
@@ -1,5 +1,4 @@
 
-<script language="javascript" type="text/javascript"
-          src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
-
-
+<script type="text/javascript" src="{{$baseurl}}/library/moment/moment.min.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/library/moment/locales.min.js"></script>
+<script language="javascript" type="text/javascript" src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
index eb8bb51cc258b03bfe242f932a49710f8ae000ff..57124bce09a8d0c084f5895c7f6f725798d18456 100644 (file)
@@ -159,7 +159,7 @@ $(document).ready(function() {
                        eventClick: function(calEvent, jsEvent, view) {
                                showEvent(calEvent.id);
                        },
-                        loading: function(isLoading, view) {
+                       loading: function(isLoading, view) {
                                if(!isLoading) {
                                        $('td.fc-day').dblclick(function() { window.location.href='/events/new?start='+$(this).data('date'); });
                                }
@@ -170,7 +170,7 @@ $(document).ready(function() {
                                if (event.item['author-name']==null) return;
                                switch(view.name){
                                        case "month":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
@@ -178,7 +178,7 @@ $(document).ready(function() {
                                        ));
                                        break;
                                        case "agendaWeek":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
@@ -187,7 +187,7 @@ $(document).ready(function() {
                                        ));
                                        break;
                                        case "agendaDay":
-                                       element.find(".fc-event-title").html(
+                                       element.find(".fc-title").html(
                                                "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
                                                        event.item['author-avatar'],
                                                        event.item['author-name'],
index 44830f453c1fa5a52602d51792042de1faa172d1..be57b155a54808d08c7f48ce0af613f8d133fd58 100644 (file)
@@ -1,6 +1,6 @@
 
-<script language="javascript" type="text/javascript"
-          src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/library/moment/moment.min.js"></script>
+<script type="text/javascript" src="{{$baseurl}}/library/moment/locales.min.js"></script>
+<script language="javascript" type="text/javascript" src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script>
 
 <script language="javascript" type="text/javascript">eventInitEditor();</script>
-