diff options
Diffstat (limited to 'public/js/fullcalendar/packages/core')
162 files changed, 15135 insertions, 0 deletions
diff --git a/public/js/fullcalendar/packages/core/index.global.js b/public/js/fullcalendar/packages/core/index.global.js new file mode 100644 index 0000000..5c22940 --- /dev/null +++ b/public/js/fullcalendar/packages/core/index.global.js | |||
@@ -0,0 +1,9929 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | var FullCalendar = (function (exports) { | ||
7 | 'use strict'; | ||
8 | |||
9 | const styleTexts = []; | ||
10 | const styleEls = new Map(); | ||
11 | function injectStyles(styleText) { | ||
12 | styleTexts.push(styleText); | ||
13 | styleEls.forEach((styleEl) => { | ||
14 | appendStylesTo(styleEl, styleText); | ||
15 | }); | ||
16 | } | ||
17 | function ensureElHasStyles(el) { | ||
18 | if (el.isConnected && // sometimes true if SSR system simulates DOM | ||
19 | el.getRootNode // sometimes undefined if SSR system simulates DOM | ||
20 | ) { | ||
21 | registerStylesRoot(el.getRootNode()); | ||
22 | } | ||
23 | } | ||
24 | function registerStylesRoot(rootNode) { | ||
25 | let styleEl = styleEls.get(rootNode); | ||
26 | if (!styleEl || !styleEl.isConnected) { | ||
27 | styleEl = rootNode.querySelector('style[data-fullcalendar]'); | ||
28 | if (!styleEl) { | ||
29 | styleEl = document.createElement('style'); | ||
30 | styleEl.setAttribute('data-fullcalendar', ''); | ||
31 | const nonce = getNonceValue(); | ||
32 | if (nonce) { | ||
33 | styleEl.nonce = nonce; | ||
34 | } | ||
35 | const parentEl = rootNode === document ? document.head : rootNode; | ||
36 | const insertBefore = rootNode === document | ||
37 | ? parentEl.querySelector('script,link[rel=stylesheet],link[as=style],style') | ||
38 | : parentEl.firstChild; | ||
39 | parentEl.insertBefore(styleEl, insertBefore); | ||
40 | } | ||
41 | styleEls.set(rootNode, styleEl); | ||
42 | hydrateStylesRoot(styleEl); | ||
43 | } | ||
44 | } | ||
45 | function hydrateStylesRoot(styleEl) { | ||
46 | for (const styleText of styleTexts) { | ||
47 | appendStylesTo(styleEl, styleText); | ||
48 | } | ||
49 | } | ||
50 | function appendStylesTo(styleEl, styleText) { | ||
51 | const { sheet } = styleEl; | ||
52 | const ruleCnt = sheet.cssRules.length; | ||
53 | styleText.split('}').forEach((styleStr, i) => { | ||
54 | styleStr = styleStr.trim(); | ||
55 | if (styleStr) { | ||
56 | sheet.insertRule(styleStr + '}', ruleCnt + i); | ||
57 | } | ||
58 | }); | ||
59 | } | ||
60 | // nonce | ||
61 | // ------------------------------------------------------------------------------------------------- | ||
62 | let queriedNonceValue; | ||
63 | function getNonceValue() { | ||
64 | if (queriedNonceValue === undefined) { | ||
65 | queriedNonceValue = queryNonceValue(); | ||
66 | } | ||
67 | return queriedNonceValue; | ||
68 | } | ||
69 | /* | ||
70 | TODO: discourage meta tag and instead put nonce attribute on placeholder <style> tag | ||
71 | */ | ||
72 | function queryNonceValue() { | ||
73 | const metaWithNonce = document.querySelector('meta[name="csp-nonce"]'); | ||
74 | if (metaWithNonce && metaWithNonce.hasAttribute('content')) { | ||
75 | return metaWithNonce.getAttribute('content'); | ||
76 | } | ||
77 | const elWithNonce = document.querySelector('script[nonce]'); | ||
78 | if (elWithNonce) { | ||
79 | return elWithNonce.nonce || ''; | ||
80 | } | ||
81 | return ''; | ||
82 | } | ||
83 | // main | ||
84 | // ------------------------------------------------------------------------------------------------- | ||
85 | if (typeof document !== 'undefined') { | ||
86 | registerStylesRoot(document); | ||
87 | } | ||
88 | |||
89 | var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url(\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\") format(\"truetype\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}"; | ||
90 | injectStyles(css_248z); | ||
91 | |||
92 | function removeElement(el) { | ||
93 | if (el.parentNode) { | ||
94 | el.parentNode.removeChild(el); | ||
95 | } | ||
96 | } | ||
97 | // Querying | ||
98 | // ---------------------------------------------------------------------------------------------------------------- | ||
99 | function elementClosest(el, selector) { | ||
100 | if (el.closest) { | ||
101 | return el.closest(selector); | ||
102 | // really bad fallback for IE | ||
103 | // from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest | ||
104 | } | ||
105 | if (!document.documentElement.contains(el)) { | ||
106 | return null; | ||
107 | } | ||
108 | do { | ||
109 | if (elementMatches(el, selector)) { | ||
110 | return el; | ||
111 | } | ||
112 | el = (el.parentElement || el.parentNode); | ||
113 | } while (el !== null && el.nodeType === 1); | ||
114 | return null; | ||
115 | } | ||
116 | function elementMatches(el, selector) { | ||
117 | let method = el.matches || el.matchesSelector || el.msMatchesSelector; | ||
118 | return method.call(el, selector); | ||
119 | } | ||
120 | // accepts multiple subject els | ||
121 | // returns a real array. good for methods like forEach | ||
122 | // TODO: accept the document | ||
123 | function findElements(container, selector) { | ||
124 | let containers = container instanceof HTMLElement ? [container] : container; | ||
125 | let allMatches = []; | ||
126 | for (let i = 0; i < containers.length; i += 1) { | ||
127 | let matches = containers[i].querySelectorAll(selector); | ||
128 | for (let j = 0; j < matches.length; j += 1) { | ||
129 | allMatches.push(matches[j]); | ||
130 | } | ||
131 | } | ||
132 | return allMatches; | ||
133 | } | ||
134 | // accepts multiple subject els | ||
135 | // only queries direct child elements // TODO: rename to findDirectChildren! | ||
136 | function findDirectChildren(parent, selector) { | ||
137 | let parents = parent instanceof HTMLElement ? [parent] : parent; | ||
138 | let allMatches = []; | ||
139 | for (let i = 0; i < parents.length; i += 1) { | ||
140 | let childNodes = parents[i].children; // only ever elements | ||
141 | for (let j = 0; j < childNodes.length; j += 1) { | ||
142 | let childNode = childNodes[j]; | ||
143 | if (!selector || elementMatches(childNode, selector)) { | ||
144 | allMatches.push(childNode); | ||
145 | } | ||
146 | } | ||
147 | } | ||
148 | return allMatches; | ||
149 | } | ||
150 | // Style | ||
151 | // ---------------------------------------------------------------------------------------------------------------- | ||
152 | const PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i; | ||
153 | function applyStyle(el, props) { | ||
154 | for (let propName in props) { | ||
155 | applyStyleProp(el, propName, props[propName]); | ||
156 | } | ||
157 | } | ||
158 | function applyStyleProp(el, name, val) { | ||
159 | if (val == null) { | ||
160 | el.style[name] = ''; | ||
161 | } | ||
162 | else if (typeof val === 'number' && PIXEL_PROP_RE.test(name)) { | ||
163 | el.style[name] = `${val}px`; | ||
164 | } | ||
165 | else { | ||
166 | el.style[name] = val; | ||
167 | } | ||
168 | } | ||
169 | // Event Handling | ||
170 | // ---------------------------------------------------------------------------------------------------------------- | ||
171 | // if intercepting bubbled events at the document/window/body level, | ||
172 | // and want to see originating element (the 'target'), use this util instead | ||
173 | // of `ev.target` because it goes within web-component boundaries. | ||
174 | function getEventTargetViaRoot(ev) { | ||
175 | var _a, _b; | ||
176 | return (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)[0]) !== null && _b !== void 0 ? _b : ev.target; | ||
177 | } | ||
178 | // Unique ID for DOM attribute | ||
179 | let guid$1 = 0; | ||
180 | function getUniqueDomId() { | ||
181 | guid$1 += 1; | ||
182 | return 'fc-dom-' + guid$1; | ||
183 | } | ||
184 | |||
185 | // Stops a mouse/touch event from doing it's native browser action | ||
186 | function preventDefault(ev) { | ||
187 | ev.preventDefault(); | ||
188 | } | ||
189 | // Event Delegation | ||
190 | // ---------------------------------------------------------------------------------------------------------------- | ||
191 | function buildDelegationHandler(selector, handler) { | ||
192 | return (ev) => { | ||
193 | let matchedChild = elementClosest(ev.target, selector); | ||
194 | if (matchedChild) { | ||
195 | handler.call(matchedChild, ev, matchedChild); | ||
196 | } | ||
197 | }; | ||
198 | } | ||
199 | function listenBySelector(container, eventType, selector, handler) { | ||
200 | let attachedHandler = buildDelegationHandler(selector, handler); | ||
201 | container.addEventListener(eventType, attachedHandler); | ||
202 | return () => { | ||
203 | container.removeEventListener(eventType, attachedHandler); | ||
204 | }; | ||
205 | } | ||
206 | function listenToHoverBySelector(container, selector, onMouseEnter, onMouseLeave) { | ||
207 | let currentMatchedChild; | ||
208 | return listenBySelector(container, 'mouseover', selector, (mouseOverEv, matchedChild) => { | ||
209 | if (matchedChild !== currentMatchedChild) { | ||
210 | currentMatchedChild = matchedChild; | ||
211 | onMouseEnter(mouseOverEv, matchedChild); | ||
212 | let realOnMouseLeave = (mouseLeaveEv) => { | ||
213 | currentMatchedChild = null; | ||
214 | onMouseLeave(mouseLeaveEv, matchedChild); | ||
215 | matchedChild.removeEventListener('mouseleave', realOnMouseLeave); | ||
216 | }; | ||
217 | // listen to the next mouseleave, and then unattach | ||
218 | matchedChild.addEventListener('mouseleave', realOnMouseLeave); | ||
219 | } | ||
220 | }); | ||
221 | } | ||
222 | // Animation | ||
223 | // ---------------------------------------------------------------------------------------------------------------- | ||
224 | const transitionEventNames = [ | ||
225 | 'webkitTransitionEnd', | ||
226 | 'otransitionend', | ||
227 | 'oTransitionEnd', | ||
228 | 'msTransitionEnd', | ||
229 | 'transitionend', | ||
230 | ]; | ||
231 | // triggered only when the next single subsequent transition finishes | ||
232 | function whenTransitionDone(el, callback) { | ||
233 | let realCallback = (ev) => { | ||
234 | callback(ev); | ||
235 | transitionEventNames.forEach((eventName) => { | ||
236 | el.removeEventListener(eventName, realCallback); | ||
237 | }); | ||
238 | }; | ||
239 | transitionEventNames.forEach((eventName) => { | ||
240 | el.addEventListener(eventName, realCallback); // cross-browser way to determine when the transition finishes | ||
241 | }); | ||
242 | } | ||
243 | // ARIA workarounds | ||
244 | // ---------------------------------------------------------------------------------------------------------------- | ||
245 | function createAriaClickAttrs(handler) { | ||
246 | return Object.assign({ onClick: handler }, createAriaKeyboardAttrs(handler)); | ||
247 | } | ||
248 | function createAriaKeyboardAttrs(handler) { | ||
249 | return { | ||
250 | tabIndex: 0, | ||
251 | onKeyDown(ev) { | ||
252 | if (ev.key === 'Enter' || ev.key === ' ') { | ||
253 | handler(ev); | ||
254 | ev.preventDefault(); // if space, don't scroll down page | ||
255 | } | ||
256 | }, | ||
257 | }; | ||
258 | } | ||
259 | |||
260 | let guidNumber = 0; | ||
261 | function guid() { | ||
262 | guidNumber += 1; | ||
263 | return String(guidNumber); | ||
264 | } | ||
265 | /* FullCalendar-specific DOM Utilities | ||
266 | ----------------------------------------------------------------------------------------------------------------------*/ | ||
267 | // Make the mouse cursor express that an event is not allowed in the current area | ||
268 | function disableCursor() { | ||
269 | document.body.classList.add('fc-not-allowed'); | ||
270 | } | ||
271 | // Returns the mouse cursor to its original look | ||
272 | function enableCursor() { | ||
273 | document.body.classList.remove('fc-not-allowed'); | ||
274 | } | ||
275 | /* Selection | ||
276 | ----------------------------------------------------------------------------------------------------------------------*/ | ||
277 | function preventSelection(el) { | ||
278 | el.style.userSelect = 'none'; | ||
279 | el.style.webkitUserSelect = 'none'; | ||
280 | el.addEventListener('selectstart', preventDefault); | ||
281 | } | ||
282 | function allowSelection(el) { | ||
283 | el.style.userSelect = ''; | ||
284 | el.style.webkitUserSelect = ''; | ||
285 | el.removeEventListener('selectstart', preventDefault); | ||
286 | } | ||
287 | /* Context Menu | ||
288 | ----------------------------------------------------------------------------------------------------------------------*/ | ||
289 | function preventContextMenu(el) { | ||
290 | el.addEventListener('contextmenu', preventDefault); | ||
291 | } | ||
292 | function allowContextMenu(el) { | ||
293 | el.removeEventListener('contextmenu', preventDefault); | ||
294 | } | ||
295 | function parseFieldSpecs(input) { | ||
296 | let specs = []; | ||
297 | let tokens = []; | ||
298 | let i; | ||
299 | let token; | ||
300 | if (typeof input === 'string') { | ||
301 | tokens = input.split(/\s*,\s*/); | ||
302 | } | ||
303 | else if (typeof input === 'function') { | ||
304 | tokens = [input]; | ||
305 | } | ||
306 | else if (Array.isArray(input)) { | ||
307 | tokens = input; | ||
308 | } | ||
309 | for (i = 0; i < tokens.length; i += 1) { | ||
310 | token = tokens[i]; | ||
311 | if (typeof token === 'string') { | ||
312 | specs.push(token.charAt(0) === '-' ? | ||
313 | { field: token.substring(1), order: -1 } : | ||
314 | { field: token, order: 1 }); | ||
315 | } | ||
316 | else if (typeof token === 'function') { | ||
317 | specs.push({ func: token }); | ||
318 | } | ||
319 | } | ||
320 | return specs; | ||
321 | } | ||
322 | function compareByFieldSpecs(obj0, obj1, fieldSpecs) { | ||
323 | let i; | ||
324 | let cmp; | ||
325 | for (i = 0; i < fieldSpecs.length; i += 1) { | ||
326 | cmp = compareByFieldSpec(obj0, obj1, fieldSpecs[i]); | ||
327 | if (cmp) { | ||
328 | return cmp; | ||
329 | } | ||
330 | } | ||
331 | return 0; | ||
332 | } | ||
333 | function compareByFieldSpec(obj0, obj1, fieldSpec) { | ||
334 | if (fieldSpec.func) { | ||
335 | return fieldSpec.func(obj0, obj1); | ||
336 | } | ||
337 | return flexibleCompare(obj0[fieldSpec.field], obj1[fieldSpec.field]) | ||
338 | * (fieldSpec.order || 1); | ||
339 | } | ||
340 | function flexibleCompare(a, b) { | ||
341 | if (!a && !b) { | ||
342 | return 0; | ||
343 | } | ||
344 | if (b == null) { | ||
345 | return -1; | ||
346 | } | ||
347 | if (a == null) { | ||
348 | return 1; | ||
349 | } | ||
350 | if (typeof a === 'string' || typeof b === 'string') { | ||
351 | return String(a).localeCompare(String(b)); | ||
352 | } | ||
353 | return a - b; | ||
354 | } | ||
355 | /* String Utilities | ||
356 | ----------------------------------------------------------------------------------------------------------------------*/ | ||
357 | function padStart(val, len) { | ||
358 | let s = String(val); | ||
359 | return '000'.substr(0, len - s.length) + s; | ||
360 | } | ||
361 | function formatWithOrdinals(formatter, args, fallbackText) { | ||
362 | if (typeof formatter === 'function') { | ||
363 | return formatter(...args); | ||
364 | } | ||
365 | if (typeof formatter === 'string') { // non-blank string | ||
366 | return args.reduce((str, arg, index) => (str.replace('$' + index, arg || '')), formatter); | ||
367 | } | ||
368 | return fallbackText; | ||
369 | } | ||
370 | /* Number Utilities | ||
371 | ----------------------------------------------------------------------------------------------------------------------*/ | ||
372 | function compareNumbers(a, b) { | ||
373 | return a - b; | ||
374 | } | ||
375 | function isInt(n) { | ||
376 | return n % 1 === 0; | ||
377 | } | ||
378 | /* FC-specific DOM dimension stuff | ||
379 | ----------------------------------------------------------------------------------------------------------------------*/ | ||
380 | function computeSmallestCellWidth(cellEl) { | ||
381 | let allWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-frame'); | ||
382 | let contentWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-cushion'); | ||
383 | if (!allWidthEl) { | ||
384 | throw new Error('needs fc-scrollgrid-shrink-frame className'); // TODO: use const | ||
385 | } | ||
386 | if (!contentWidthEl) { | ||
387 | throw new Error('needs fc-scrollgrid-shrink-cushion className'); | ||
388 | } | ||
389 | return cellEl.getBoundingClientRect().width - allWidthEl.getBoundingClientRect().width + // the cell padding+border | ||
390 | contentWidthEl.getBoundingClientRect().width; | ||
391 | } | ||
392 | |||
393 | const INTERNAL_UNITS = ['years', 'months', 'days', 'milliseconds']; | ||
394 | const PARSE_RE = /^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/; | ||
395 | // Parsing and Creation | ||
396 | function createDuration(input, unit) { | ||
397 | if (typeof input === 'string') { | ||
398 | return parseString(input); | ||
399 | } | ||
400 | if (typeof input === 'object' && input) { // non-null object | ||
401 | return parseObject(input); | ||
402 | } | ||
403 | if (typeof input === 'number') { | ||
404 | return parseObject({ [unit || 'milliseconds']: input }); | ||
405 | } | ||
406 | return null; | ||
407 | } | ||
408 | function parseString(s) { | ||
409 | let m = PARSE_RE.exec(s); | ||
410 | if (m) { | ||
411 | let sign = m[1] ? -1 : 1; | ||
412 | return { | ||
413 | years: 0, | ||
414 | months: 0, | ||
415 | days: sign * (m[2] ? parseInt(m[2], 10) : 0), | ||
416 | milliseconds: sign * ((m[3] ? parseInt(m[3], 10) : 0) * 60 * 60 * 1000 + // hours | ||
417 | (m[4] ? parseInt(m[4], 10) : 0) * 60 * 1000 + // minutes | ||
418 | (m[5] ? parseInt(m[5], 10) : 0) * 1000 + // seconds | ||
419 | (m[6] ? parseInt(m[6], 10) : 0) // ms | ||
420 | ), | ||
421 | }; | ||
422 | } | ||
423 | return null; | ||
424 | } | ||
425 | function parseObject(obj) { | ||
426 | let duration = { | ||
427 | years: obj.years || obj.year || 0, | ||
428 | months: obj.months || obj.month || 0, | ||
429 | days: obj.days || obj.day || 0, | ||
430 | milliseconds: (obj.hours || obj.hour || 0) * 60 * 60 * 1000 + // hours | ||
431 | (obj.minutes || obj.minute || 0) * 60 * 1000 + // minutes | ||
432 | (obj.seconds || obj.second || 0) * 1000 + // seconds | ||
433 | (obj.milliseconds || obj.millisecond || obj.ms || 0), // ms | ||
434 | }; | ||
435 | let weeks = obj.weeks || obj.week; | ||
436 | if (weeks) { | ||
437 | duration.days += weeks * 7; | ||
438 | duration.specifiedWeeks = true; | ||
439 | } | ||
440 | return duration; | ||
441 | } | ||
442 | // Equality | ||
443 | function durationsEqual(d0, d1) { | ||
444 | return d0.years === d1.years && | ||
445 | d0.months === d1.months && | ||
446 | d0.days === d1.days && | ||
447 | d0.milliseconds === d1.milliseconds; | ||
448 | } | ||
449 | function asCleanDays(dur) { | ||
450 | if (!dur.years && !dur.months && !dur.milliseconds) { | ||
451 | return dur.days; | ||
452 | } | ||
453 | return 0; | ||
454 | } | ||
455 | // Simple Math | ||
456 | function addDurations(d0, d1) { | ||
457 | return { | ||
458 | years: d0.years + d1.years, | ||
459 | months: d0.months + d1.months, | ||
460 | days: d0.days + d1.days, | ||
461 | milliseconds: d0.milliseconds + d1.milliseconds, | ||
462 | }; | ||
463 | } | ||
464 | function subtractDurations(d1, d0) { | ||
465 | return { | ||
466 | years: d1.years - d0.years, | ||
467 | months: d1.months - d0.months, | ||
468 | days: d1.days - d0.days, | ||
469 | milliseconds: d1.milliseconds - d0.milliseconds, | ||
470 | }; | ||
471 | } | ||
472 | function multiplyDuration(d, n) { | ||
473 | return { | ||
474 | years: d.years * n, | ||
475 | months: d.months * n, | ||
476 | days: d.days * n, | ||
477 | milliseconds: d.milliseconds * n, | ||
478 | }; | ||
479 | } | ||
480 | // Conversions | ||
481 | // "Rough" because they are based on average-case Gregorian months/years | ||
482 | function asRoughYears(dur) { | ||
483 | return asRoughDays(dur) / 365; | ||
484 | } | ||
485 | function asRoughMonths(dur) { | ||
486 | return asRoughDays(dur) / 30; | ||
487 | } | ||
488 | function asRoughDays(dur) { | ||
489 | return asRoughMs(dur) / 864e5; | ||
490 | } | ||
491 | function asRoughMinutes(dur) { | ||
492 | return asRoughMs(dur) / (1000 * 60); | ||
493 | } | ||
494 | function asRoughSeconds(dur) { | ||
495 | return asRoughMs(dur) / 1000; | ||
496 | } | ||
497 | function asRoughMs(dur) { | ||
498 | return dur.years * (365 * 864e5) + | ||
499 | dur.months * (30 * 864e5) + | ||
500 | dur.days * 864e5 + | ||
501 | dur.milliseconds; | ||
502 | } | ||
503 | // Advanced Math | ||
504 | function wholeDivideDurations(numerator, denominator) { | ||
505 | let res = null; | ||
506 | for (let i = 0; i < INTERNAL_UNITS.length; i += 1) { | ||
507 | let unit = INTERNAL_UNITS[i]; | ||
508 | if (denominator[unit]) { | ||
509 | let localRes = numerator[unit] / denominator[unit]; | ||
510 | if (!isInt(localRes) || (res !== null && res !== localRes)) { | ||
511 | return null; | ||
512 | } | ||
513 | res = localRes; | ||
514 | } | ||
515 | else if (numerator[unit]) { | ||
516 | // needs to divide by something but can't! | ||
517 | return null; | ||
518 | } | ||
519 | } | ||
520 | return res; | ||
521 | } | ||
522 | function greatestDurationDenominator(dur) { | ||
523 | let ms = dur.milliseconds; | ||
524 | if (ms) { | ||
525 | if (ms % 1000 !== 0) { | ||
526 | return { unit: 'millisecond', value: ms }; | ||
527 | } | ||
528 | if (ms % (1000 * 60) !== 0) { | ||
529 | return { unit: 'second', value: ms / 1000 }; | ||
530 | } | ||
531 | if (ms % (1000 * 60 * 60) !== 0) { | ||
532 | return { unit: 'minute', value: ms / (1000 * 60) }; | ||
533 | } | ||
534 | if (ms) { | ||
535 | return { unit: 'hour', value: ms / (1000 * 60 * 60) }; | ||
536 | } | ||
537 | } | ||
538 | if (dur.days) { | ||
539 | if (dur.specifiedWeeks && dur.days % 7 === 0) { | ||
540 | return { unit: 'week', value: dur.days / 7 }; | ||
541 | } | ||
542 | return { unit: 'day', value: dur.days }; | ||
543 | } | ||
544 | if (dur.months) { | ||
545 | return { unit: 'month', value: dur.months }; | ||
546 | } | ||
547 | if (dur.years) { | ||
548 | return { unit: 'year', value: dur.years }; | ||
549 | } | ||
550 | return { unit: 'millisecond', value: 0 }; | ||
551 | } | ||
552 | |||
553 | const { hasOwnProperty } = Object.prototype; | ||
554 | // Merges an array of objects into a single object. | ||
555 | // The second argument allows for an array of property names who's object values will be merged together. | ||
556 | function mergeProps(propObjs, complexPropsMap) { | ||
557 | let dest = {}; | ||
558 | if (complexPropsMap) { | ||
559 | for (let name in complexPropsMap) { | ||
560 | if (complexPropsMap[name] === isMaybeObjectsEqual) { // implies that it's object-mergeable | ||
561 | let complexObjs = []; | ||
562 | // collect the trailing object values, stopping when a non-object is discovered | ||
563 | for (let i = propObjs.length - 1; i >= 0; i -= 1) { | ||
564 | let val = propObjs[i][name]; | ||
565 | if (typeof val === 'object' && val) { // non-null object | ||
566 | complexObjs.unshift(val); | ||
567 | } | ||
568 | else if (val !== undefined) { | ||
569 | dest[name] = val; // if there were no objects, this value will be used | ||
570 | break; | ||
571 | } | ||
572 | } | ||
573 | // if the trailing values were objects, use the merged value | ||
574 | if (complexObjs.length) { | ||
575 | dest[name] = mergeProps(complexObjs); | ||
576 | } | ||
577 | } | ||
578 | } | ||
579 | } | ||
580 | // copy values into the destination, going from last to first | ||
581 | for (let i = propObjs.length - 1; i >= 0; i -= 1) { | ||
582 | let props = propObjs[i]; | ||
583 | for (let name in props) { | ||
584 | if (!(name in dest)) { // if already assigned by previous props or complex props, don't reassign | ||
585 | dest[name] = props[name]; | ||
586 | } | ||
587 | } | ||
588 | } | ||
589 | return dest; | ||
590 | } | ||
591 | function filterHash(hash, func) { | ||
592 | let filtered = {}; | ||
593 | for (let key in hash) { | ||
594 | if (func(hash[key], key)) { | ||
595 | filtered[key] = hash[key]; | ||
596 | } | ||
597 | } | ||
598 | return filtered; | ||
599 | } | ||
600 | function mapHash(hash, func) { | ||
601 | let newHash = {}; | ||
602 | for (let key in hash) { | ||
603 | newHash[key] = func(hash[key], key); | ||
604 | } | ||
605 | return newHash; | ||
606 | } | ||
607 | function arrayToHash(a) { | ||
608 | let hash = {}; | ||
609 | for (let item of a) { | ||
610 | hash[item] = true; | ||
611 | } | ||
612 | return hash; | ||
613 | } | ||
614 | // TODO: reassess browser support | ||
615 | // https://caniuse.com/?search=object.values | ||
616 | function hashValuesToArray(obj) { | ||
617 | let a = []; | ||
618 | for (let key in obj) { | ||
619 | a.push(obj[key]); | ||
620 | } | ||
621 | return a; | ||
622 | } | ||
623 | function isPropsEqual(obj0, obj1) { | ||
624 | if (obj0 === obj1) { | ||
625 | return true; | ||
626 | } | ||
627 | for (let key in obj0) { | ||
628 | if (hasOwnProperty.call(obj0, key)) { | ||
629 | if (!(key in obj1)) { | ||
630 | return false; | ||
631 | } | ||
632 | } | ||
633 | } | ||
634 | for (let key in obj1) { | ||
635 | if (hasOwnProperty.call(obj1, key)) { | ||
636 | if (obj0[key] !== obj1[key]) { | ||
637 | return false; | ||
638 | } | ||
639 | } | ||
640 | } | ||
641 | return true; | ||
642 | } | ||
643 | const HANDLER_RE = /^on[A-Z]/; | ||
644 | function isNonHandlerPropsEqual(obj0, obj1) { | ||
645 | const keys = getUnequalProps(obj0, obj1); | ||
646 | for (let key of keys) { | ||
647 | if (!HANDLER_RE.test(key)) { | ||
648 | return false; | ||
649 | } | ||
650 | } | ||
651 | return true; | ||
652 | } | ||
653 | function getUnequalProps(obj0, obj1) { | ||
654 | let keys = []; | ||
655 | for (let key in obj0) { | ||
656 | if (hasOwnProperty.call(obj0, key)) { | ||
657 | if (!(key in obj1)) { | ||
658 | keys.push(key); | ||
659 | } | ||
660 | } | ||
661 | } | ||
662 | for (let key in obj1) { | ||
663 | if (hasOwnProperty.call(obj1, key)) { | ||
664 | if (obj0[key] !== obj1[key]) { | ||
665 | keys.push(key); | ||
666 | } | ||
667 | } | ||
668 | } | ||
669 | return keys; | ||
670 | } | ||
671 | function compareObjs(oldProps, newProps, equalityFuncs = {}) { | ||
672 | if (oldProps === newProps) { | ||
673 | return true; | ||
674 | } | ||
675 | for (let key in newProps) { | ||
676 | if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) ; | ||
677 | else { | ||
678 | return false; | ||
679 | } | ||
680 | } | ||
681 | // check for props that were omitted in the new | ||
682 | for (let key in oldProps) { | ||
683 | if (!(key in newProps)) { | ||
684 | return false; | ||
685 | } | ||
686 | } | ||
687 | return true; | ||
688 | } | ||
689 | /* | ||
690 | assumed "true" equality for handler names like "onReceiveSomething" | ||
691 | */ | ||
692 | function isObjValsEqual(val0, val1, comparator) { | ||
693 | if (val0 === val1 || comparator === true) { | ||
694 | return true; | ||
695 | } | ||
696 | if (comparator) { | ||
697 | return comparator(val0, val1); | ||
698 | } | ||
699 | return false; | ||
700 | } | ||
701 | function collectFromHash(hash, startIndex = 0, endIndex, step = 1) { | ||
702 | let res = []; | ||
703 | if (endIndex == null) { | ||
704 | endIndex = Object.keys(hash).length; | ||
705 | } | ||
706 | for (let i = startIndex; i < endIndex; i += step) { | ||
707 | let val = hash[i]; | ||
708 | if (val !== undefined) { // will disregard undefined for sparse arrays | ||
709 | res.push(val); | ||
710 | } | ||
711 | } | ||
712 | return res; | ||
713 | } | ||
714 | |||
715 | // TODO: new util arrayify? | ||
716 | function removeExact(array, exactVal) { | ||
717 | let removeCnt = 0; | ||
718 | let i = 0; | ||
719 | while (i < array.length) { | ||
720 | if (array[i] === exactVal) { | ||
721 | array.splice(i, 1); | ||
722 | removeCnt += 1; | ||
723 | } | ||
724 | else { | ||
725 | i += 1; | ||
726 | } | ||
727 | } | ||
728 | return removeCnt; | ||
729 | } | ||
730 | function isArraysEqual(a0, a1, equalityFunc) { | ||
731 | if (a0 === a1) { | ||
732 | return true; | ||
733 | } | ||
734 | let len = a0.length; | ||
735 | let i; | ||
736 | if (len !== a1.length) { // not array? or not same length? | ||
737 | return false; | ||
738 | } | ||
739 | for (i = 0; i < len; i += 1) { | ||
740 | if (!(equalityFunc ? equalityFunc(a0[i], a1[i]) : a0[i] === a1[i])) { | ||
741 | return false; | ||
742 | } | ||
743 | } | ||
744 | return true; | ||
745 | } | ||
746 | |||
747 | const DAY_IDS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']; | ||
748 | // Adding | ||
749 | function addWeeks(m, n) { | ||
750 | let a = dateToUtcArray(m); | ||
751 | a[2] += n * 7; | ||
752 | return arrayToUtcDate(a); | ||
753 | } | ||
754 | function addDays(m, n) { | ||
755 | let a = dateToUtcArray(m); | ||
756 | a[2] += n; | ||
757 | return arrayToUtcDate(a); | ||
758 | } | ||
759 | function addMs(m, n) { | ||
760 | let a = dateToUtcArray(m); | ||
761 | a[6] += n; | ||
762 | return arrayToUtcDate(a); | ||
763 | } | ||
764 | // Diffing (all return floats) | ||
765 | // TODO: why not use ranges? | ||
766 | function diffWeeks(m0, m1) { | ||
767 | return diffDays(m0, m1) / 7; | ||
768 | } | ||
769 | function diffDays(m0, m1) { | ||
770 | return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60 * 24); | ||
771 | } | ||
772 | function diffHours(m0, m1) { | ||
773 | return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60); | ||
774 | } | ||
775 | function diffMinutes(m0, m1) { | ||
776 | return (m1.valueOf() - m0.valueOf()) / (1000 * 60); | ||
777 | } | ||
778 | function diffSeconds(m0, m1) { | ||
779 | return (m1.valueOf() - m0.valueOf()) / 1000; | ||
780 | } | ||
781 | function diffDayAndTime(m0, m1) { | ||
782 | let m0day = startOfDay(m0); | ||
783 | let m1day = startOfDay(m1); | ||
784 | return { | ||
785 | years: 0, | ||
786 | months: 0, | ||
787 | days: Math.round(diffDays(m0day, m1day)), | ||
788 | milliseconds: (m1.valueOf() - m1day.valueOf()) - (m0.valueOf() - m0day.valueOf()), | ||
789 | }; | ||
790 | } | ||
791 | // Diffing Whole Units | ||
792 | function diffWholeWeeks(m0, m1) { | ||
793 | let d = diffWholeDays(m0, m1); | ||
794 | if (d !== null && d % 7 === 0) { | ||
795 | return d / 7; | ||
796 | } | ||
797 | return null; | ||
798 | } | ||
799 | function diffWholeDays(m0, m1) { | ||
800 | if (timeAsMs(m0) === timeAsMs(m1)) { | ||
801 | return Math.round(diffDays(m0, m1)); | ||
802 | } | ||
803 | return null; | ||
804 | } | ||
805 | // Start-Of | ||
806 | function startOfDay(m) { | ||
807 | return arrayToUtcDate([ | ||
808 | m.getUTCFullYear(), | ||
809 | m.getUTCMonth(), | ||
810 | m.getUTCDate(), | ||
811 | ]); | ||
812 | } | ||
813 | function startOfHour(m) { | ||
814 | return arrayToUtcDate([ | ||
815 | m.getUTCFullYear(), | ||
816 | m.getUTCMonth(), | ||
817 | m.getUTCDate(), | ||
818 | m.getUTCHours(), | ||
819 | ]); | ||
820 | } | ||
821 | function startOfMinute(m) { | ||
822 | return arrayToUtcDate([ | ||
823 | m.getUTCFullYear(), | ||
824 | m.getUTCMonth(), | ||
825 | m.getUTCDate(), | ||
826 | m.getUTCHours(), | ||
827 | m.getUTCMinutes(), | ||
828 | ]); | ||
829 | } | ||
830 | function startOfSecond(m) { | ||
831 | return arrayToUtcDate([ | ||
832 | m.getUTCFullYear(), | ||
833 | m.getUTCMonth(), | ||
834 | m.getUTCDate(), | ||
835 | m.getUTCHours(), | ||
836 | m.getUTCMinutes(), | ||
837 | m.getUTCSeconds(), | ||
838 | ]); | ||
839 | } | ||
840 | // Week Computation | ||
841 | function weekOfYear(marker, dow, doy) { | ||
842 | let y = marker.getUTCFullYear(); | ||
843 | let w = weekOfGivenYear(marker, y, dow, doy); | ||
844 | if (w < 1) { | ||
845 | return weekOfGivenYear(marker, y - 1, dow, doy); | ||
846 | } | ||
847 | let nextW = weekOfGivenYear(marker, y + 1, dow, doy); | ||
848 | if (nextW >= 1) { | ||
849 | return Math.min(w, nextW); | ||
850 | } | ||
851 | return w; | ||
852 | } | ||
853 | function weekOfGivenYear(marker, year, dow, doy) { | ||
854 | let firstWeekStart = arrayToUtcDate([year, 0, 1 + firstWeekOffset(year, dow, doy)]); | ||
855 | let dayStart = startOfDay(marker); | ||
856 | let days = Math.round(diffDays(firstWeekStart, dayStart)); | ||
857 | return Math.floor(days / 7) + 1; // zero-indexed | ||
858 | } | ||
859 | // start-of-first-week - start-of-year | ||
860 | function firstWeekOffset(year, dow, doy) { | ||
861 | // first-week day -- which january is always in the first week (4 for iso, 1 for other) | ||
862 | let fwd = 7 + dow - doy; | ||
863 | // first-week day local weekday -- which local weekday is fwd | ||
864 | let fwdlw = (7 + arrayToUtcDate([year, 0, fwd]).getUTCDay() - dow) % 7; | ||
865 | return -fwdlw + fwd - 1; | ||
866 | } | ||
867 | // Array Conversion | ||
868 | function dateToLocalArray(date) { | ||
869 | return [ | ||
870 | date.getFullYear(), | ||
871 | date.getMonth(), | ||
872 | date.getDate(), | ||
873 | date.getHours(), | ||
874 | date.getMinutes(), | ||
875 | date.getSeconds(), | ||
876 | date.getMilliseconds(), | ||
877 | ]; | ||
878 | } | ||
879 | function arrayToLocalDate(a) { | ||
880 | return new Date(a[0], a[1] || 0, a[2] == null ? 1 : a[2], // day of month | ||
881 | a[3] || 0, a[4] || 0, a[5] || 0); | ||
882 | } | ||
883 | function dateToUtcArray(date) { | ||
884 | return [ | ||
885 | date.getUTCFullYear(), | ||
886 | date.getUTCMonth(), | ||
887 | date.getUTCDate(), | ||
888 | date.getUTCHours(), | ||
889 | date.getUTCMinutes(), | ||
890 | date.getUTCSeconds(), | ||
891 | date.getUTCMilliseconds(), | ||
892 | ]; | ||
893 | } | ||
894 | function arrayToUtcDate(a) { | ||
895 | // according to web standards (and Safari), a month index is required. | ||
896 | // massage if only given a year. | ||
897 | if (a.length === 1) { | ||
898 | a = a.concat([0]); | ||
899 | } | ||
900 | return new Date(Date.UTC(...a)); | ||
901 | } | ||
902 | // Other Utils | ||
903 | function isValidDate(m) { | ||
904 | return !isNaN(m.valueOf()); | ||
905 | } | ||
906 | function timeAsMs(m) { | ||
907 | return m.getUTCHours() * 1000 * 60 * 60 + | ||
908 | m.getUTCMinutes() * 1000 * 60 + | ||
909 | m.getUTCSeconds() * 1000 + | ||
910 | m.getUTCMilliseconds(); | ||
911 | } | ||
912 | |||
913 | // timeZoneOffset is in minutes | ||
914 | function buildIsoString(marker, timeZoneOffset, stripZeroTime = false) { | ||
915 | let s = marker.toISOString(); | ||
916 | s = s.replace('.000', ''); | ||
917 | if (stripZeroTime) { | ||
918 | s = s.replace('T00:00:00Z', ''); | ||
919 | } | ||
920 | if (s.length > 10) { // time part wasn't stripped, can add timezone info | ||
921 | if (timeZoneOffset == null) { | ||
922 | s = s.replace('Z', ''); | ||
923 | } | ||
924 | else if (timeZoneOffset !== 0) { | ||
925 | s = s.replace('Z', formatTimeZoneOffset(timeZoneOffset, true)); | ||
926 | } | ||
927 | // otherwise, its UTC-0 and we want to keep the Z | ||
928 | } | ||
929 | return s; | ||
930 | } | ||
931 | // formats the date, but with no time part | ||
932 | // TODO: somehow merge with buildIsoString and stripZeroTime | ||
933 | // TODO: rename. omit "string" | ||
934 | function formatDayString(marker) { | ||
935 | return marker.toISOString().replace(/T.*$/, ''); | ||
936 | } | ||
937 | function formatIsoMonthStr(marker) { | ||
938 | return marker.toISOString().match(/^\d{4}-\d{2}/)[0]; | ||
939 | } | ||
940 | // TODO: use Date::toISOString and use everything after the T? | ||
941 | function formatIsoTimeString(marker) { | ||
942 | return padStart(marker.getUTCHours(), 2) + ':' + | ||
943 | padStart(marker.getUTCMinutes(), 2) + ':' + | ||
944 | padStart(marker.getUTCSeconds(), 2); | ||
945 | } | ||
946 | function formatTimeZoneOffset(minutes, doIso = false) { | ||
947 | let sign = minutes < 0 ? '-' : '+'; | ||
948 | let abs = Math.abs(minutes); | ||
949 | let hours = Math.floor(abs / 60); | ||
950 | let mins = Math.round(abs % 60); | ||
951 | if (doIso) { | ||
952 | return `${sign + padStart(hours, 2)}:${padStart(mins, 2)}`; | ||
953 | } | ||
954 | return `GMT${sign}${hours}${mins ? `:${padStart(mins, 2)}` : ''}`; | ||
955 | } | ||
956 | |||
957 | function memoize(workerFunc, resEquality, teardownFunc) { | ||
958 | let currentArgs; | ||
959 | let currentRes; | ||
960 | return function (...newArgs) { | ||
961 | if (!currentArgs) { | ||
962 | currentRes = workerFunc.apply(this, newArgs); | ||
963 | } | ||
964 | else if (!isArraysEqual(currentArgs, newArgs)) { | ||
965 | if (teardownFunc) { | ||
966 | teardownFunc(currentRes); | ||
967 | } | ||
968 | let res = workerFunc.apply(this, newArgs); | ||
969 | if (!resEquality || !resEquality(res, currentRes)) { | ||
970 | currentRes = res; | ||
971 | } | ||
972 | } | ||
973 | currentArgs = newArgs; | ||
974 | return currentRes; | ||
975 | }; | ||
976 | } | ||
977 | function memoizeObjArg(workerFunc, resEquality, teardownFunc) { | ||
978 | let currentArg; | ||
979 | let currentRes; | ||
980 | return (newArg) => { | ||
981 | if (!currentArg) { | ||
982 | currentRes = workerFunc.call(this, newArg); | ||
983 | } | ||
984 | else if (!isPropsEqual(currentArg, newArg)) { | ||
985 | if (teardownFunc) { | ||
986 | teardownFunc(currentRes); | ||
987 | } | ||
988 | let res = workerFunc.call(this, newArg); | ||
989 | if (!resEquality || !resEquality(res, currentRes)) { | ||
990 | currentRes = res; | ||
991 | } | ||
992 | } | ||
993 | currentArg = newArg; | ||
994 | return currentRes; | ||
995 | }; | ||
996 | } | ||
997 | function memoizeArraylike(// used at all? | ||
998 | workerFunc, resEquality, teardownFunc) { | ||
999 | let currentArgSets = []; | ||
1000 | let currentResults = []; | ||
1001 | return (newArgSets) => { | ||
1002 | let currentLen = currentArgSets.length; | ||
1003 | let newLen = newArgSets.length; | ||
1004 | let i = 0; | ||
1005 | for (; i < currentLen; i += 1) { | ||
1006 | if (!newArgSets[i]) { // one of the old sets no longer exists | ||
1007 | if (teardownFunc) { | ||
1008 | teardownFunc(currentResults[i]); | ||
1009 | } | ||
1010 | } | ||
1011 | else if (!isArraysEqual(currentArgSets[i], newArgSets[i])) { | ||
1012 | if (teardownFunc) { | ||
1013 | teardownFunc(currentResults[i]); | ||
1014 | } | ||
1015 | let res = workerFunc.apply(this, newArgSets[i]); | ||
1016 | if (!resEquality || !resEquality(res, currentResults[i])) { | ||
1017 | currentResults[i] = res; | ||
1018 | } | ||
1019 | } | ||
1020 | } | ||
1021 | for (; i < newLen; i += 1) { | ||
1022 | currentResults[i] = workerFunc.apply(this, newArgSets[i]); | ||
1023 | } | ||
1024 | currentArgSets = newArgSets; | ||
1025 | currentResults.splice(newLen); // remove excess | ||
1026 | return currentResults; | ||
1027 | }; | ||
1028 | } | ||
1029 | function memoizeHashlike(workerFunc, resEquality, teardownFunc) { | ||
1030 | let currentArgHash = {}; | ||
1031 | let currentResHash = {}; | ||
1032 | return (newArgHash) => { | ||
1033 | let newResHash = {}; | ||
1034 | for (let key in newArgHash) { | ||
1035 | if (!currentResHash[key]) { | ||
1036 | newResHash[key] = workerFunc.apply(this, newArgHash[key]); | ||
1037 | } | ||
1038 | else if (!isArraysEqual(currentArgHash[key], newArgHash[key])) { | ||
1039 | if (teardownFunc) { | ||
1040 | teardownFunc(currentResHash[key]); | ||
1041 | } | ||
1042 | let res = workerFunc.apply(this, newArgHash[key]); | ||
1043 | newResHash[key] = (resEquality && resEquality(res, currentResHash[key])) | ||
1044 | ? currentResHash[key] | ||
1045 | : res; | ||
1046 | } | ||
1047 | else { | ||
1048 | newResHash[key] = currentResHash[key]; | ||
1049 | } | ||
1050 | } | ||
1051 | currentArgHash = newArgHash; | ||
1052 | currentResHash = newResHash; | ||
1053 | return newResHash; | ||
1054 | }; | ||
1055 | } | ||
1056 | |||
1057 | const EXTENDED_SETTINGS_AND_SEVERITIES = { | ||
1058 | week: 3, | ||
1059 | separator: 9, | ||
1060 | omitZeroMinute: 9, | ||
1061 | meridiem: 9, | ||
1062 | omitCommas: 9, | ||
1063 | }; | ||
1064 | const STANDARD_DATE_PROP_SEVERITIES = { | ||
1065 | timeZoneName: 7, | ||
1066 | era: 6, | ||
1067 | year: 5, | ||
1068 | month: 4, | ||
1069 | day: 2, | ||
1070 | weekday: 2, | ||
1071 | hour: 1, | ||
1072 | minute: 1, | ||
1073 | second: 1, | ||
1074 | }; | ||
1075 | const MERIDIEM_RE = /\s*([ap])\.?m\.?/i; // eats up leading spaces too | ||
1076 | const COMMA_RE = /,/g; // we need re for globalness | ||
1077 | const MULTI_SPACE_RE = /\s+/g; | ||
1078 | const LTR_RE = /\u200e/g; // control character | ||
1079 | const UTC_RE = /UTC|GMT/; | ||
1080 | class NativeFormatter { | ||
1081 | constructor(formatSettings) { | ||
1082 | let standardDateProps = {}; | ||
1083 | let extendedSettings = {}; | ||
1084 | let smallestUnitNum = 9; // the smallest unit in the formatter (9 is a sentinel, beyond max) | ||
1085 | for (let name in formatSettings) { | ||
1086 | if (name in EXTENDED_SETTINGS_AND_SEVERITIES) { | ||
1087 | extendedSettings[name] = formatSettings[name]; | ||
1088 | const severity = EXTENDED_SETTINGS_AND_SEVERITIES[name]; | ||
1089 | if (severity < 9) { | ||
1090 | smallestUnitNum = Math.min(EXTENDED_SETTINGS_AND_SEVERITIES[name], smallestUnitNum); | ||
1091 | } | ||
1092 | } | ||
1093 | else { | ||
1094 | standardDateProps[name] = formatSettings[name]; | ||
1095 | if (name in STANDARD_DATE_PROP_SEVERITIES) { // TODO: what about hour12? no severity | ||
1096 | smallestUnitNum = Math.min(STANDARD_DATE_PROP_SEVERITIES[name], smallestUnitNum); | ||
1097 | } | ||
1098 | } | ||
1099 | } | ||
1100 | this.standardDateProps = standardDateProps; | ||
1101 | this.extendedSettings = extendedSettings; | ||
1102 | this.smallestUnitNum = smallestUnitNum; | ||
1103 | this.buildFormattingFunc = memoize(buildFormattingFunc); | ||
1104 | } | ||
1105 | format(date, context) { | ||
1106 | return this.buildFormattingFunc(this.standardDateProps, this.extendedSettings, context)(date); | ||
1107 | } | ||
1108 | formatRange(start, end, context, betterDefaultSeparator) { | ||
1109 | let { standardDateProps, extendedSettings } = this; | ||
1110 | let diffSeverity = computeMarkerDiffSeverity(start.marker, end.marker, context.calendarSystem); | ||
1111 | if (!diffSeverity) { | ||
1112 | return this.format(start, context); | ||
1113 | } | ||
1114 | let biggestUnitForPartial = diffSeverity; | ||
1115 | if (biggestUnitForPartial > 1 && // the two dates are different in a way that's larger scale than time | ||
1116 | (standardDateProps.year === 'numeric' || standardDateProps.year === '2-digit') && | ||
1117 | (standardDateProps.month === 'numeric' || standardDateProps.month === '2-digit') && | ||
1118 | (standardDateProps.day === 'numeric' || standardDateProps.day === '2-digit')) { | ||
1119 | biggestUnitForPartial = 1; // make it look like the dates are only different in terms of time | ||
1120 | } | ||
1121 | let full0 = this.format(start, context); | ||
1122 | let full1 = this.format(end, context); | ||
1123 | if (full0 === full1) { | ||
1124 | return full0; | ||
1125 | } | ||
1126 | let partialDateProps = computePartialFormattingOptions(standardDateProps, biggestUnitForPartial); | ||
1127 | let partialFormattingFunc = buildFormattingFunc(partialDateProps, extendedSettings, context); | ||
1128 | let partial0 = partialFormattingFunc(start); | ||
1129 | let partial1 = partialFormattingFunc(end); | ||
1130 | let insertion = findCommonInsertion(full0, partial0, full1, partial1); | ||
1131 | let separator = extendedSettings.separator || betterDefaultSeparator || context.defaultSeparator || ''; | ||
1132 | if (insertion) { | ||
1133 | return insertion.before + partial0 + separator + partial1 + insertion.after; | ||
1134 | } | ||
1135 | return full0 + separator + full1; | ||
1136 | } | ||
1137 | getSmallestUnit() { | ||
1138 | switch (this.smallestUnitNum) { | ||
1139 | case 7: | ||
1140 | case 6: | ||
1141 | case 5: | ||
1142 | return 'year'; | ||
1143 | case 4: | ||
1144 | return 'month'; | ||
1145 | case 3: | ||
1146 | return 'week'; | ||
1147 | case 2: | ||
1148 | return 'day'; | ||
1149 | default: | ||
1150 | return 'time'; // really? | ||
1151 | } | ||
1152 | } | ||
1153 | } | ||
1154 | function buildFormattingFunc(standardDateProps, extendedSettings, context) { | ||
1155 | let standardDatePropCnt = Object.keys(standardDateProps).length; | ||
1156 | if (standardDatePropCnt === 1 && standardDateProps.timeZoneName === 'short') { | ||
1157 | return (date) => (formatTimeZoneOffset(date.timeZoneOffset)); | ||
1158 | } | ||
1159 | if (standardDatePropCnt === 0 && extendedSettings.week) { | ||
1160 | return (date) => (formatWeekNumber(context.computeWeekNumber(date.marker), context.weekText, context.weekTextLong, context.locale, extendedSettings.week)); | ||
1161 | } | ||
1162 | return buildNativeFormattingFunc(standardDateProps, extendedSettings, context); | ||
1163 | } | ||
1164 | function buildNativeFormattingFunc(standardDateProps, extendedSettings, context) { | ||
1165 | standardDateProps = Object.assign({}, standardDateProps); // copy | ||
1166 | extendedSettings = Object.assign({}, extendedSettings); // copy | ||
1167 | sanitizeSettings(standardDateProps, extendedSettings); | ||
1168 | standardDateProps.timeZone = 'UTC'; // we leverage the only guaranteed timeZone for our UTC markers | ||
1169 | let normalFormat = new Intl.DateTimeFormat(context.locale.codes, standardDateProps); | ||
1170 | let zeroFormat; // needed? | ||
1171 | if (extendedSettings.omitZeroMinute) { | ||
1172 | let zeroProps = Object.assign({}, standardDateProps); | ||
1173 | delete zeroProps.minute; // seconds and ms were already considered in sanitizeSettings | ||
1174 | zeroFormat = new Intl.DateTimeFormat(context.locale.codes, zeroProps); | ||
1175 | } | ||
1176 | return (date) => { | ||
1177 | let { marker } = date; | ||
1178 | let format; | ||
1179 | if (zeroFormat && !marker.getUTCMinutes()) { | ||
1180 | format = zeroFormat; | ||
1181 | } | ||
1182 | else { | ||
1183 | format = normalFormat; | ||
1184 | } | ||
1185 | let s = format.format(marker); | ||
1186 | return postProcess(s, date, standardDateProps, extendedSettings, context); | ||
1187 | }; | ||
1188 | } | ||
1189 | function sanitizeSettings(standardDateProps, extendedSettings) { | ||
1190 | // deal with a browser inconsistency where formatting the timezone | ||
1191 | // requires that the hour/minute be present. | ||
1192 | if (standardDateProps.timeZoneName) { | ||
1193 | if (!standardDateProps.hour) { | ||
1194 | standardDateProps.hour = '2-digit'; | ||
1195 | } | ||
1196 | if (!standardDateProps.minute) { | ||
1197 | standardDateProps.minute = '2-digit'; | ||
1198 | } | ||
1199 | } | ||
1200 | // only support short timezone names | ||
1201 | if (standardDateProps.timeZoneName === 'long') { | ||
1202 | standardDateProps.timeZoneName = 'short'; | ||
1203 | } | ||
1204 | // if requesting to display seconds, MUST display minutes | ||
1205 | if (extendedSettings.omitZeroMinute && (standardDateProps.second || standardDateProps.millisecond)) { | ||
1206 | delete extendedSettings.omitZeroMinute; | ||
1207 | } | ||
1208 | } | ||
1209 | function postProcess(s, date, standardDateProps, extendedSettings, context) { | ||
1210 | s = s.replace(LTR_RE, ''); // remove left-to-right control chars. do first. good for other regexes | ||
1211 | if (standardDateProps.timeZoneName === 'short') { | ||
1212 | s = injectTzoStr(s, (context.timeZone === 'UTC' || date.timeZoneOffset == null) ? | ||
1213 | 'UTC' : // important to normalize for IE, which does "GMT" | ||
1214 | formatTimeZoneOffset(date.timeZoneOffset)); | ||
1215 | } | ||
1216 | if (extendedSettings.omitCommas) { | ||
1217 | s = s.replace(COMMA_RE, '').trim(); | ||
1218 | } | ||
1219 | if (extendedSettings.omitZeroMinute) { | ||
1220 | s = s.replace(':00', ''); // zeroFormat doesn't always achieve this | ||
1221 | } | ||
1222 | // ^ do anything that might create adjacent spaces before this point, | ||
1223 | // because MERIDIEM_RE likes to eat up loading spaces | ||
1224 | if (extendedSettings.meridiem === false) { | ||
1225 | s = s.replace(MERIDIEM_RE, '').trim(); | ||
1226 | } | ||
1227 | else if (extendedSettings.meridiem === 'narrow') { // a/p | ||
1228 | s = s.replace(MERIDIEM_RE, (m0, m1) => m1.toLocaleLowerCase()); | ||
1229 | } | ||
1230 | else if (extendedSettings.meridiem === 'short') { // am/pm | ||
1231 | s = s.replace(MERIDIEM_RE, (m0, m1) => `${m1.toLocaleLowerCase()}m`); | ||
1232 | } | ||
1233 | else if (extendedSettings.meridiem === 'lowercase') { // other meridiem transformers already converted to lowercase | ||
1234 | s = s.replace(MERIDIEM_RE, (m0) => m0.toLocaleLowerCase()); | ||
1235 | } | ||
1236 | s = s.replace(MULTI_SPACE_RE, ' '); | ||
1237 | s = s.trim(); | ||
1238 | return s; | ||
1239 | } | ||
1240 | function injectTzoStr(s, tzoStr) { | ||
1241 | let replaced = false; | ||
1242 | s = s.replace(UTC_RE, () => { | ||
1243 | replaced = true; | ||
1244 | return tzoStr; | ||
1245 | }); | ||
1246 | // IE11 doesn't include UTC/GMT in the original string, so append to end | ||
1247 | if (!replaced) { | ||
1248 | s += ` ${tzoStr}`; | ||
1249 | } | ||
1250 | return s; | ||
1251 | } | ||
1252 | function formatWeekNumber(num, weekText, weekTextLong, locale, display) { | ||
1253 | let parts = []; | ||
1254 | if (display === 'long') { | ||
1255 | parts.push(weekTextLong); | ||
1256 | } | ||
1257 | else if (display === 'short' || display === 'narrow') { | ||
1258 | parts.push(weekText); | ||
1259 | } | ||
1260 | if (display === 'long' || display === 'short') { | ||
1261 | parts.push(' '); | ||
1262 | } | ||
1263 | parts.push(locale.simpleNumberFormat.format(num)); | ||
1264 | if (locale.options.direction === 'rtl') { // TODO: use control characters instead? | ||
1265 | parts.reverse(); | ||
1266 | } | ||
1267 | return parts.join(''); | ||
1268 | } | ||
1269 | // Range Formatting Utils | ||
1270 | // 0 = exactly the same | ||
1271 | // 1 = different by time | ||
1272 | // and bigger | ||
1273 | function computeMarkerDiffSeverity(d0, d1, ca) { | ||
1274 | if (ca.getMarkerYear(d0) !== ca.getMarkerYear(d1)) { | ||
1275 | return 5; | ||
1276 | } | ||
1277 | if (ca.getMarkerMonth(d0) !== ca.getMarkerMonth(d1)) { | ||
1278 | return 4; | ||
1279 | } | ||
1280 | if (ca.getMarkerDay(d0) !== ca.getMarkerDay(d1)) { | ||
1281 | return 2; | ||
1282 | } | ||
1283 | if (timeAsMs(d0) !== timeAsMs(d1)) { | ||
1284 | return 1; | ||
1285 | } | ||
1286 | return 0; | ||
1287 | } | ||
1288 | function computePartialFormattingOptions(options, biggestUnit) { | ||
1289 | let partialOptions = {}; | ||
1290 | for (let name in options) { | ||
1291 | if (!(name in STANDARD_DATE_PROP_SEVERITIES) || // not a date part prop (like timeZone) | ||
1292 | STANDARD_DATE_PROP_SEVERITIES[name] <= biggestUnit) { | ||
1293 | partialOptions[name] = options[name]; | ||
1294 | } | ||
1295 | } | ||
1296 | return partialOptions; | ||
1297 | } | ||
1298 | function findCommonInsertion(full0, partial0, full1, partial1) { | ||
1299 | let i0 = 0; | ||
1300 | while (i0 < full0.length) { | ||
1301 | let found0 = full0.indexOf(partial0, i0); | ||
1302 | if (found0 === -1) { | ||
1303 | break; | ||
1304 | } | ||
1305 | let before0 = full0.substr(0, found0); | ||
1306 | i0 = found0 + partial0.length; | ||
1307 | let after0 = full0.substr(i0); | ||
1308 | let i1 = 0; | ||
1309 | while (i1 < full1.length) { | ||
1310 | let found1 = full1.indexOf(partial1, i1); | ||
1311 | if (found1 === -1) { | ||
1312 | break; | ||
1313 | } | ||
1314 | let before1 = full1.substr(0, found1); | ||
1315 | i1 = found1 + partial1.length; | ||
1316 | let after1 = full1.substr(i1); | ||
1317 | if (before0 === before1 && after0 === after1) { | ||
1318 | return { | ||
1319 | before: before0, | ||
1320 | after: after0, | ||
1321 | }; | ||
1322 | } | ||
1323 | } | ||
1324 | } | ||
1325 | return null; | ||
1326 | } | ||
1327 | |||
1328 | function expandZonedMarker(dateInfo, calendarSystem) { | ||
1329 | let a = calendarSystem.markerToArray(dateInfo.marker); | ||
1330 | return { | ||
1331 | marker: dateInfo.marker, | ||
1332 | timeZoneOffset: dateInfo.timeZoneOffset, | ||
1333 | array: a, | ||
1334 | year: a[0], | ||
1335 | month: a[1], | ||
1336 | day: a[2], | ||
1337 | hour: a[3], | ||
1338 | minute: a[4], | ||
1339 | second: a[5], | ||
1340 | millisecond: a[6], | ||
1341 | }; | ||
1342 | } | ||
1343 | |||
1344 | function createVerboseFormattingArg(start, end, context, betterDefaultSeparator) { | ||
1345 | let startInfo = expandZonedMarker(start, context.calendarSystem); | ||
1346 | let endInfo = end ? expandZonedMarker(end, context.calendarSystem) : null; | ||
1347 | return { | ||
1348 | date: startInfo, | ||
1349 | start: startInfo, | ||
1350 | end: endInfo, | ||
1351 | timeZone: context.timeZone, | ||
1352 | localeCodes: context.locale.codes, | ||
1353 | defaultSeparator: betterDefaultSeparator || context.defaultSeparator, | ||
1354 | }; | ||
1355 | } | ||
1356 | |||
1357 | /* | ||
1358 | TODO: fix the terminology of "formatter" vs "formatting func" | ||
1359 | */ | ||
1360 | /* | ||
1361 | At the time of instantiation, this object does not know which cmd-formatting system it will use. | ||
1362 | It receives this at the time of formatting, as a setting. | ||
1363 | */ | ||
1364 | class CmdFormatter { | ||
1365 | constructor(cmdStr) { | ||
1366 | this.cmdStr = cmdStr; | ||
1367 | } | ||
1368 | format(date, context, betterDefaultSeparator) { | ||
1369 | return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(date, null, context, betterDefaultSeparator)); | ||
1370 | } | ||
1371 | formatRange(start, end, context, betterDefaultSeparator) { | ||
1372 | return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(start, end, context, betterDefaultSeparator)); | ||
1373 | } | ||
1374 | } | ||
1375 | |||
1376 | class FuncFormatter { | ||
1377 | constructor(func) { | ||
1378 | this.func = func; | ||
1379 | } | ||
1380 | format(date, context, betterDefaultSeparator) { | ||
1381 | return this.func(createVerboseFormattingArg(date, null, context, betterDefaultSeparator)); | ||
1382 | } | ||
1383 | formatRange(start, end, context, betterDefaultSeparator) { | ||
1384 | return this.func(createVerboseFormattingArg(start, end, context, betterDefaultSeparator)); | ||
1385 | } | ||
1386 | } | ||
1387 | |||
1388 | function createFormatter(input) { | ||
1389 | if (typeof input === 'object' && input) { // non-null object | ||
1390 | return new NativeFormatter(input); | ||
1391 | } | ||
1392 | if (typeof input === 'string') { | ||
1393 | return new CmdFormatter(input); | ||
1394 | } | ||
1395 | if (typeof input === 'function') { | ||
1396 | return new FuncFormatter(input); | ||
1397 | } | ||
1398 | return null; | ||
1399 | } | ||
1400 | |||
1401 | // base options | ||
1402 | // ------------ | ||
1403 | const BASE_OPTION_REFINERS = { | ||
1404 | navLinkDayClick: identity, | ||
1405 | navLinkWeekClick: identity, | ||
1406 | duration: createDuration, | ||
1407 | bootstrapFontAwesome: identity, | ||
1408 | buttonIcons: identity, | ||
1409 | customButtons: identity, | ||
1410 | defaultAllDayEventDuration: createDuration, | ||
1411 | defaultTimedEventDuration: createDuration, | ||
1412 | nextDayThreshold: createDuration, | ||
1413 | scrollTime: createDuration, | ||
1414 | scrollTimeReset: Boolean, | ||
1415 | slotMinTime: createDuration, | ||
1416 | slotMaxTime: createDuration, | ||
1417 | dayPopoverFormat: createFormatter, | ||
1418 | slotDuration: createDuration, | ||
1419 | snapDuration: createDuration, | ||
1420 | headerToolbar: identity, | ||
1421 | footerToolbar: identity, | ||
1422 | defaultRangeSeparator: String, | ||
1423 | titleRangeSeparator: String, | ||
1424 | forceEventDuration: Boolean, | ||
1425 | dayHeaders: Boolean, | ||
1426 | dayHeaderFormat: createFormatter, | ||
1427 | dayHeaderClassNames: identity, | ||
1428 | dayHeaderContent: identity, | ||
1429 | dayHeaderDidMount: identity, | ||
1430 | dayHeaderWillUnmount: identity, | ||
1431 | dayCellClassNames: identity, | ||
1432 | dayCellContent: identity, | ||
1433 | dayCellDidMount: identity, | ||
1434 | dayCellWillUnmount: identity, | ||
1435 | initialView: String, | ||
1436 | aspectRatio: Number, | ||
1437 | weekends: Boolean, | ||
1438 | weekNumberCalculation: identity, | ||
1439 | weekNumbers: Boolean, | ||
1440 | weekNumberClassNames: identity, | ||
1441 | weekNumberContent: identity, | ||
1442 | weekNumberDidMount: identity, | ||
1443 | weekNumberWillUnmount: identity, | ||
1444 | editable: Boolean, | ||
1445 | viewClassNames: identity, | ||
1446 | viewDidMount: identity, | ||
1447 | viewWillUnmount: identity, | ||
1448 | nowIndicator: Boolean, | ||
1449 | nowIndicatorClassNames: identity, | ||
1450 | nowIndicatorContent: identity, | ||
1451 | nowIndicatorDidMount: identity, | ||
1452 | nowIndicatorWillUnmount: identity, | ||
1453 | showNonCurrentDates: Boolean, | ||
1454 | lazyFetching: Boolean, | ||
1455 | startParam: String, | ||
1456 | endParam: String, | ||
1457 | timeZoneParam: String, | ||
1458 | timeZone: String, | ||
1459 | locales: identity, | ||
1460 | locale: identity, | ||
1461 | themeSystem: String, | ||
1462 | dragRevertDuration: Number, | ||
1463 | dragScroll: Boolean, | ||
1464 | allDayMaintainDuration: Boolean, | ||
1465 | unselectAuto: Boolean, | ||
1466 | dropAccept: identity, | ||
1467 | eventOrder: parseFieldSpecs, | ||
1468 | eventOrderStrict: Boolean, | ||
1469 | handleWindowResize: Boolean, | ||
1470 | windowResizeDelay: Number, | ||
1471 | longPressDelay: Number, | ||
1472 | eventDragMinDistance: Number, | ||
1473 | expandRows: Boolean, | ||
1474 | height: identity, | ||
1475 | contentHeight: identity, | ||
1476 | direction: String, | ||
1477 | weekNumberFormat: createFormatter, | ||
1478 | eventResizableFromStart: Boolean, | ||
1479 | displayEventTime: Boolean, | ||
1480 | displayEventEnd: Boolean, | ||
1481 | weekText: String, | ||
1482 | weekTextLong: String, | ||
1483 | progressiveEventRendering: Boolean, | ||
1484 | businessHours: identity, | ||
1485 | initialDate: identity, | ||
1486 | now: identity, | ||
1487 | eventDataTransform: identity, | ||
1488 | stickyHeaderDates: identity, | ||
1489 | stickyFooterScrollbar: identity, | ||
1490 | viewHeight: identity, | ||
1491 | defaultAllDay: Boolean, | ||
1492 | eventSourceFailure: identity, | ||
1493 | eventSourceSuccess: identity, | ||
1494 | eventDisplay: String, | ||
1495 | eventStartEditable: Boolean, | ||
1496 | eventDurationEditable: Boolean, | ||
1497 | eventOverlap: identity, | ||
1498 | eventConstraint: identity, | ||
1499 | eventAllow: identity, | ||
1500 | eventBackgroundColor: String, | ||
1501 | eventBorderColor: String, | ||
1502 | eventTextColor: String, | ||
1503 | eventColor: String, | ||
1504 | eventClassNames: identity, | ||
1505 | eventContent: identity, | ||
1506 | eventDidMount: identity, | ||
1507 | eventWillUnmount: identity, | ||
1508 | selectConstraint: identity, | ||
1509 | selectOverlap: identity, | ||
1510 | selectAllow: identity, | ||
1511 | droppable: Boolean, | ||
1512 | unselectCancel: String, | ||
1513 | slotLabelFormat: identity, | ||
1514 | slotLaneClassNames: identity, | ||
1515 | slotLaneContent: identity, | ||
1516 | slotLaneDidMount: identity, | ||
1517 | slotLaneWillUnmount: identity, | ||
1518 | slotLabelClassNames: identity, | ||
1519 | slotLabelContent: identity, | ||
1520 | slotLabelDidMount: identity, | ||
1521 | slotLabelWillUnmount: identity, | ||
1522 | dayMaxEvents: identity, | ||
1523 | dayMaxEventRows: identity, | ||
1524 | dayMinWidth: Number, | ||
1525 | slotLabelInterval: createDuration, | ||
1526 | allDayText: String, | ||
1527 | allDayClassNames: identity, | ||
1528 | allDayContent: identity, | ||
1529 | allDayDidMount: identity, | ||
1530 | allDayWillUnmount: identity, | ||
1531 | slotMinWidth: Number, | ||
1532 | navLinks: Boolean, | ||
1533 | eventTimeFormat: createFormatter, | ||
1534 | rerenderDelay: Number, | ||
1535 | moreLinkText: identity, | ||
1536 | moreLinkHint: identity, | ||
1537 | selectMinDistance: Number, | ||
1538 | selectable: Boolean, | ||
1539 | selectLongPressDelay: Number, | ||
1540 | eventLongPressDelay: Number, | ||
1541 | selectMirror: Boolean, | ||
1542 | eventMaxStack: Number, | ||
1543 | eventMinHeight: Number, | ||
1544 | eventMinWidth: Number, | ||
1545 | eventShortHeight: Number, | ||
1546 | slotEventOverlap: Boolean, | ||
1547 | plugins: identity, | ||
1548 | firstDay: Number, | ||
1549 | dayCount: Number, | ||
1550 | dateAlignment: String, | ||
1551 | dateIncrement: createDuration, | ||
1552 | hiddenDays: identity, | ||
1553 | fixedWeekCount: Boolean, | ||
1554 | validRange: identity, | ||
1555 | visibleRange: identity, | ||
1556 | titleFormat: identity, | ||
1557 | eventInteractive: Boolean, | ||
1558 | // only used by list-view, but languages define the value, so we need it in base options | ||
1559 | noEventsText: String, | ||
1560 | viewHint: identity, | ||
1561 | navLinkHint: identity, | ||
1562 | closeHint: String, | ||
1563 | timeHint: String, | ||
1564 | eventHint: String, | ||
1565 | moreLinkClick: identity, | ||
1566 | moreLinkClassNames: identity, | ||
1567 | moreLinkContent: identity, | ||
1568 | moreLinkDidMount: identity, | ||
1569 | moreLinkWillUnmount: identity, | ||
1570 | monthStartFormat: createFormatter, | ||
1571 | // for connectors | ||
1572 | // (can't be part of plugin system b/c must be provided at runtime) | ||
1573 | handleCustomRendering: identity, | ||
1574 | customRenderingMetaMap: identity, | ||
1575 | customRenderingReplaces: Boolean, | ||
1576 | }; | ||
1577 | // do NOT give a type here. need `typeof BASE_OPTION_DEFAULTS` to give real results. | ||
1578 | // raw values. | ||
1579 | const BASE_OPTION_DEFAULTS = { | ||
1580 | eventDisplay: 'auto', | ||
1581 | defaultRangeSeparator: ' - ', | ||
1582 | titleRangeSeparator: ' \u2013 ', | ||
1583 | defaultTimedEventDuration: '01:00:00', | ||
1584 | defaultAllDayEventDuration: { day: 1 }, | ||
1585 | forceEventDuration: false, | ||
1586 | nextDayThreshold: '00:00:00', | ||
1587 | dayHeaders: true, | ||
1588 | initialView: '', | ||
1589 | aspectRatio: 1.35, | ||
1590 | headerToolbar: { | ||
1591 | start: 'title', | ||
1592 | center: '', | ||
1593 | end: 'today prev,next', | ||
1594 | }, | ||
1595 | weekends: true, | ||
1596 | weekNumbers: false, | ||
1597 | weekNumberCalculation: 'local', | ||
1598 | editable: false, | ||
1599 | nowIndicator: false, | ||
1600 | scrollTime: '06:00:00', | ||
1601 | scrollTimeReset: true, | ||
1602 | slotMinTime: '00:00:00', | ||
1603 | slotMaxTime: '24:00:00', | ||
1604 | showNonCurrentDates: true, | ||
1605 | lazyFetching: true, | ||
1606 | startParam: 'start', | ||
1607 | endParam: 'end', | ||
1608 | timeZoneParam: 'timeZone', | ||
1609 | timeZone: 'local', | ||
1610 | locales: [], | ||
1611 | locale: '', | ||
1612 | themeSystem: 'standard', | ||
1613 | dragRevertDuration: 500, | ||
1614 | dragScroll: true, | ||
1615 | allDayMaintainDuration: false, | ||
1616 | unselectAuto: true, | ||
1617 | dropAccept: '*', | ||
1618 | eventOrder: 'start,-duration,allDay,title', | ||
1619 | dayPopoverFormat: { month: 'long', day: 'numeric', year: 'numeric' }, | ||
1620 | handleWindowResize: true, | ||
1621 | windowResizeDelay: 100, | ||
1622 | longPressDelay: 1000, | ||
1623 | eventDragMinDistance: 5, | ||
1624 | expandRows: false, | ||
1625 | navLinks: false, | ||
1626 | selectable: false, | ||
1627 | eventMinHeight: 15, | ||
1628 | eventMinWidth: 30, | ||
1629 | eventShortHeight: 30, | ||
1630 | monthStartFormat: { month: 'long', day: 'numeric' }, | ||
1631 | }; | ||
1632 | // calendar listeners | ||
1633 | // ------------------ | ||
1634 | const CALENDAR_LISTENER_REFINERS = { | ||
1635 | datesSet: identity, | ||
1636 | eventsSet: identity, | ||
1637 | eventAdd: identity, | ||
1638 | eventChange: identity, | ||
1639 | eventRemove: identity, | ||
1640 | windowResize: identity, | ||
1641 | eventClick: identity, | ||
1642 | eventMouseEnter: identity, | ||
1643 | eventMouseLeave: identity, | ||
1644 | select: identity, | ||
1645 | unselect: identity, | ||
1646 | loading: identity, | ||
1647 | // internal | ||
1648 | _unmount: identity, | ||
1649 | _beforeprint: identity, | ||
1650 | _afterprint: identity, | ||
1651 | _noEventDrop: identity, | ||
1652 | _noEventResize: identity, | ||
1653 | _resize: identity, | ||
1654 | _scrollRequest: identity, | ||
1655 | }; | ||
1656 | // calendar-specific options | ||
1657 | // ------------------------- | ||
1658 | const CALENDAR_OPTION_REFINERS = { | ||
1659 | buttonText: identity, | ||
1660 | buttonHints: identity, | ||
1661 | views: identity, | ||
1662 | plugins: identity, | ||
1663 | initialEvents: identity, | ||
1664 | events: identity, | ||
1665 | eventSources: identity, | ||
1666 | }; | ||
1667 | const COMPLEX_OPTION_COMPARATORS = { | ||
1668 | headerToolbar: isMaybeObjectsEqual, | ||
1669 | footerToolbar: isMaybeObjectsEqual, | ||
1670 | buttonText: isMaybeObjectsEqual, | ||
1671 | buttonHints: isMaybeObjectsEqual, | ||
1672 | buttonIcons: isMaybeObjectsEqual, | ||
1673 | dateIncrement: isMaybeObjectsEqual, | ||
1674 | plugins: isMaybeArraysEqual, | ||
1675 | events: isMaybeArraysEqual, | ||
1676 | eventSources: isMaybeArraysEqual, | ||
1677 | ['resources']: isMaybeArraysEqual, | ||
1678 | }; | ||
1679 | function isMaybeObjectsEqual(a, b) { | ||
1680 | if (typeof a === 'object' && typeof b === 'object' && a && b) { // both non-null objects | ||
1681 | return isPropsEqual(a, b); | ||
1682 | } | ||
1683 | return a === b; | ||
1684 | } | ||
1685 | function isMaybeArraysEqual(a, b) { | ||
1686 | if (Array.isArray(a) && Array.isArray(b)) { | ||
1687 | return isArraysEqual(a, b); | ||
1688 | } | ||
1689 | return a === b; | ||
1690 | } | ||
1691 | // view-specific options | ||
1692 | // --------------------- | ||
1693 | const VIEW_OPTION_REFINERS = { | ||
1694 | type: String, | ||
1695 | component: identity, | ||
1696 | buttonText: String, | ||
1697 | buttonTextKey: String, | ||
1698 | dateProfileGeneratorClass: identity, | ||
1699 | usesMinMaxTime: Boolean, | ||
1700 | classNames: identity, | ||
1701 | content: identity, | ||
1702 | didMount: identity, | ||
1703 | willUnmount: identity, | ||
1704 | }; | ||
1705 | // util funcs | ||
1706 | // ---------------------------------------------------------------------------------------------------- | ||
1707 | function mergeRawOptions(optionSets) { | ||
1708 | return mergeProps(optionSets, COMPLEX_OPTION_COMPARATORS); | ||
1709 | } | ||
1710 | function refineProps(input, refiners) { | ||
1711 | let refined = {}; | ||
1712 | let extra = {}; | ||
1713 | for (let propName in refiners) { | ||
1714 | if (propName in input) { | ||
1715 | refined[propName] = refiners[propName](input[propName]); | ||
1716 | } | ||
1717 | } | ||
1718 | for (let propName in input) { | ||
1719 | if (!(propName in refiners)) { | ||
1720 | extra[propName] = input[propName]; | ||
1721 | } | ||
1722 | } | ||
1723 | return { refined, extra }; | ||
1724 | } | ||
1725 | function identity(raw) { | ||
1726 | return raw; | ||
1727 | } | ||
1728 | |||
1729 | function createEventInstance(defId, range, forcedStartTzo, forcedEndTzo) { | ||
1730 | return { | ||
1731 | instanceId: guid(), | ||
1732 | defId, | ||
1733 | range, | ||
1734 | forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo, | ||
1735 | forcedEndTzo: forcedEndTzo == null ? null : forcedEndTzo, | ||
1736 | }; | ||
1737 | } | ||
1738 | |||
1739 | function parseRecurring(refined, defaultAllDay, dateEnv, recurringTypes) { | ||
1740 | for (let i = 0; i < recurringTypes.length; i += 1) { | ||
1741 | let parsed = recurringTypes[i].parse(refined, dateEnv); | ||
1742 | if (parsed) { | ||
1743 | let { allDay } = refined; | ||
1744 | if (allDay == null) { | ||
1745 | allDay = defaultAllDay; | ||
1746 | if (allDay == null) { | ||
1747 | allDay = parsed.allDayGuess; | ||
1748 | if (allDay == null) { | ||
1749 | allDay = false; | ||
1750 | } | ||
1751 | } | ||
1752 | } | ||
1753 | return { | ||
1754 | allDay, | ||
1755 | duration: parsed.duration, | ||
1756 | typeData: parsed.typeData, | ||
1757 | typeId: i, | ||
1758 | }; | ||
1759 | } | ||
1760 | } | ||
1761 | return null; | ||
1762 | } | ||
1763 | function expandRecurring(eventStore, framingRange, context) { | ||
1764 | let { dateEnv, pluginHooks, options } = context; | ||
1765 | let { defs, instances } = eventStore; | ||
1766 | // remove existing recurring instances | ||
1767 | // TODO: bad. always expand events as a second step | ||
1768 | instances = filterHash(instances, (instance) => !defs[instance.defId].recurringDef); | ||
1769 | for (let defId in defs) { | ||
1770 | let def = defs[defId]; | ||
1771 | if (def.recurringDef) { | ||
1772 | let { duration } = def.recurringDef; | ||
1773 | if (!duration) { | ||
1774 | duration = def.allDay ? | ||
1775 | options.defaultAllDayEventDuration : | ||
1776 | options.defaultTimedEventDuration; | ||
1777 | } | ||
1778 | let starts = expandRecurringRanges(def, duration, framingRange, dateEnv, pluginHooks.recurringTypes); | ||
1779 | for (let start of starts) { | ||
1780 | let instance = createEventInstance(defId, { | ||
1781 | start, | ||
1782 | end: dateEnv.add(start, duration), | ||
1783 | }); | ||
1784 | instances[instance.instanceId] = instance; | ||
1785 | } | ||
1786 | } | ||
1787 | } | ||
1788 | return { defs, instances }; | ||
1789 | } | ||
1790 | /* | ||
1791 | Event MUST have a recurringDef | ||
1792 | */ | ||
1793 | function expandRecurringRanges(eventDef, duration, framingRange, dateEnv, recurringTypes) { | ||
1794 | let typeDef = recurringTypes[eventDef.recurringDef.typeId]; | ||
1795 | let markers = typeDef.expand(eventDef.recurringDef.typeData, { | ||
1796 | start: dateEnv.subtract(framingRange.start, duration), | ||
1797 | end: framingRange.end, | ||
1798 | }, dateEnv); | ||
1799 | // the recurrence plugins don't guarantee that all-day events are start-of-day, so we have to | ||
1800 | if (eventDef.allDay) { | ||
1801 | markers = markers.map(startOfDay); | ||
1802 | } | ||
1803 | return markers; | ||
1804 | } | ||
1805 | |||
1806 | function parseEvents(rawEvents, eventSource, context, allowOpenRange, defIdMap, instanceIdMap) { | ||
1807 | let eventStore = createEmptyEventStore(); | ||
1808 | let eventRefiners = buildEventRefiners(context); | ||
1809 | for (let rawEvent of rawEvents) { | ||
1810 | let tuple = parseEvent(rawEvent, eventSource, context, allowOpenRange, eventRefiners, defIdMap, instanceIdMap); | ||
1811 | if (tuple) { | ||
1812 | eventTupleToStore(tuple, eventStore); | ||
1813 | } | ||
1814 | } | ||
1815 | return eventStore; | ||
1816 | } | ||
1817 | function eventTupleToStore(tuple, eventStore = createEmptyEventStore()) { | ||
1818 | eventStore.defs[tuple.def.defId] = tuple.def; | ||
1819 | if (tuple.instance) { | ||
1820 | eventStore.instances[tuple.instance.instanceId] = tuple.instance; | ||
1821 | } | ||
1822 | return eventStore; | ||
1823 | } | ||
1824 | // retrieves events that have the same groupId as the instance specified by `instanceId` | ||
1825 | // or they are the same as the instance. | ||
1826 | // why might instanceId not be in the store? an event from another calendar? | ||
1827 | function getRelevantEvents(eventStore, instanceId) { | ||
1828 | let instance = eventStore.instances[instanceId]; | ||
1829 | if (instance) { | ||
1830 | let def = eventStore.defs[instance.defId]; | ||
1831 | // get events/instances with same group | ||
1832 | let newStore = filterEventStoreDefs(eventStore, (lookDef) => isEventDefsGrouped(def, lookDef)); | ||
1833 | // add the original | ||
1834 | // TODO: wish we could use eventTupleToStore or something like it | ||
1835 | newStore.defs[def.defId] = def; | ||
1836 | newStore.instances[instance.instanceId] = instance; | ||
1837 | return newStore; | ||
1838 | } | ||
1839 | return createEmptyEventStore(); | ||
1840 | } | ||
1841 | function isEventDefsGrouped(def0, def1) { | ||
1842 | return Boolean(def0.groupId && def0.groupId === def1.groupId); | ||
1843 | } | ||
1844 | function createEmptyEventStore() { | ||
1845 | return { defs: {}, instances: {} }; | ||
1846 | } | ||
1847 | function mergeEventStores(store0, store1) { | ||
1848 | return { | ||
1849 | defs: Object.assign(Object.assign({}, store0.defs), store1.defs), | ||
1850 | instances: Object.assign(Object.assign({}, store0.instances), store1.instances), | ||
1851 | }; | ||
1852 | } | ||
1853 | function filterEventStoreDefs(eventStore, filterFunc) { | ||
1854 | let defs = filterHash(eventStore.defs, filterFunc); | ||
1855 | let instances = filterHash(eventStore.instances, (instance) => (defs[instance.defId] // still exists? | ||
1856 | )); | ||
1857 | return { defs, instances }; | ||
1858 | } | ||
1859 | function excludeSubEventStore(master, sub) { | ||
1860 | let { defs, instances } = master; | ||
1861 | let filteredDefs = {}; | ||
1862 | let filteredInstances = {}; | ||
1863 | for (let defId in defs) { | ||
1864 | if (!sub.defs[defId]) { // not explicitly excluded | ||
1865 | filteredDefs[defId] = defs[defId]; | ||
1866 | } | ||
1867 | } | ||
1868 | for (let instanceId in instances) { | ||
1869 | if (!sub.instances[instanceId] && // not explicitly excluded | ||
1870 | filteredDefs[instances[instanceId].defId] // def wasn't filtered away | ||
1871 | ) { | ||
1872 | filteredInstances[instanceId] = instances[instanceId]; | ||
1873 | } | ||
1874 | } | ||
1875 | return { | ||
1876 | defs: filteredDefs, | ||
1877 | instances: filteredInstances, | ||
1878 | }; | ||
1879 | } | ||
1880 | |||
1881 | function normalizeConstraint(input, context) { | ||
1882 | if (Array.isArray(input)) { | ||
1883 | return parseEvents(input, null, context, true); // allowOpenRange=true | ||
1884 | } | ||
1885 | if (typeof input === 'object' && input) { // non-null object | ||
1886 | return parseEvents([input], null, context, true); // allowOpenRange=true | ||
1887 | } | ||
1888 | if (input != null) { | ||
1889 | return String(input); | ||
1890 | } | ||
1891 | return null; | ||
1892 | } | ||
1893 | |||
1894 | function parseClassNames(raw) { | ||
1895 | if (Array.isArray(raw)) { | ||
1896 | return raw; | ||
1897 | } | ||
1898 | if (typeof raw === 'string') { | ||
1899 | return raw.split(/\s+/); | ||
1900 | } | ||
1901 | return []; | ||
1902 | } | ||
1903 | |||
1904 | // TODO: better called "EventSettings" or "EventConfig" | ||
1905 | // TODO: move this file into structs | ||
1906 | // TODO: separate constraint/overlap/allow, because selection uses only that, not other props | ||
1907 | const EVENT_UI_REFINERS = { | ||
1908 | display: String, | ||
1909 | editable: Boolean, | ||
1910 | startEditable: Boolean, | ||
1911 | durationEditable: Boolean, | ||
1912 | constraint: identity, | ||
1913 | overlap: identity, | ||
1914 | allow: identity, | ||
1915 | className: parseClassNames, | ||
1916 | classNames: parseClassNames, | ||
1917 | color: String, | ||
1918 | backgroundColor: String, | ||
1919 | borderColor: String, | ||
1920 | textColor: String, | ||
1921 | }; | ||
1922 | const EMPTY_EVENT_UI = { | ||
1923 | display: null, | ||
1924 | startEditable: null, | ||
1925 | durationEditable: null, | ||
1926 | constraints: [], | ||
1927 | overlap: null, | ||
1928 | allows: [], | ||
1929 | backgroundColor: '', | ||
1930 | borderColor: '', | ||
1931 | textColor: '', | ||
1932 | classNames: [], | ||
1933 | }; | ||
1934 | function createEventUi(refined, context) { | ||
1935 | let constraint = normalizeConstraint(refined.constraint, context); | ||
1936 | return { | ||
1937 | display: refined.display || null, | ||
1938 | startEditable: refined.startEditable != null ? refined.startEditable : refined.editable, | ||
1939 | durationEditable: refined.durationEditable != null ? refined.durationEditable : refined.editable, | ||
1940 | constraints: constraint != null ? [constraint] : [], | ||
1941 | overlap: refined.overlap != null ? refined.overlap : null, | ||
1942 | allows: refined.allow != null ? [refined.allow] : [], | ||
1943 | backgroundColor: refined.backgroundColor || refined.color || '', | ||
1944 | borderColor: refined.borderColor || refined.color || '', | ||
1945 | textColor: refined.textColor || '', | ||
1946 | classNames: (refined.className || []).concat(refined.classNames || []), // join singular and plural | ||
1947 | }; | ||
1948 | } | ||
1949 | // TODO: prevent against problems with <2 args! | ||
1950 | function combineEventUis(uis) { | ||
1951 | return uis.reduce(combineTwoEventUis, EMPTY_EVENT_UI); | ||
1952 | } | ||
1953 | function combineTwoEventUis(item0, item1) { | ||
1954 | return { | ||
1955 | display: item1.display != null ? item1.display : item0.display, | ||
1956 | startEditable: item1.startEditable != null ? item1.startEditable : item0.startEditable, | ||
1957 | durationEditable: item1.durationEditable != null ? item1.durationEditable : item0.durationEditable, | ||
1958 | constraints: item0.constraints.concat(item1.constraints), | ||
1959 | overlap: typeof item1.overlap === 'boolean' ? item1.overlap : item0.overlap, | ||
1960 | allows: item0.allows.concat(item1.allows), | ||
1961 | backgroundColor: item1.backgroundColor || item0.backgroundColor, | ||
1962 | borderColor: item1.borderColor || item0.borderColor, | ||
1963 | textColor: item1.textColor || item0.textColor, | ||
1964 | classNames: item0.classNames.concat(item1.classNames), | ||
1965 | }; | ||
1966 | } | ||
1967 | |||
1968 | const EVENT_NON_DATE_REFINERS = { | ||
1969 | id: String, | ||
1970 | groupId: String, | ||
1971 | title: String, | ||
1972 | url: String, | ||
1973 | interactive: Boolean, | ||
1974 | }; | ||
1975 | const EVENT_DATE_REFINERS = { | ||
1976 | start: identity, | ||
1977 | end: identity, | ||
1978 | date: identity, | ||
1979 | allDay: Boolean, | ||
1980 | }; | ||
1981 | const EVENT_REFINERS = Object.assign(Object.assign(Object.assign({}, EVENT_NON_DATE_REFINERS), EVENT_DATE_REFINERS), { extendedProps: identity }); | ||
1982 | function parseEvent(raw, eventSource, context, allowOpenRange, refiners = buildEventRefiners(context), defIdMap, instanceIdMap) { | ||
1983 | let { refined, extra } = refineEventDef(raw, context, refiners); | ||
1984 | let defaultAllDay = computeIsDefaultAllDay(eventSource, context); | ||
1985 | let recurringRes = parseRecurring(refined, defaultAllDay, context.dateEnv, context.pluginHooks.recurringTypes); | ||
1986 | if (recurringRes) { | ||
1987 | let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', recurringRes.allDay, Boolean(recurringRes.duration), context, defIdMap); | ||
1988 | def.recurringDef = { | ||
1989 | typeId: recurringRes.typeId, | ||
1990 | typeData: recurringRes.typeData, | ||
1991 | duration: recurringRes.duration, | ||
1992 | }; | ||
1993 | return { def, instance: null }; | ||
1994 | } | ||
1995 | let singleRes = parseSingle(refined, defaultAllDay, context, allowOpenRange); | ||
1996 | if (singleRes) { | ||
1997 | let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', singleRes.allDay, singleRes.hasEnd, context, defIdMap); | ||
1998 | let instance = createEventInstance(def.defId, singleRes.range, singleRes.forcedStartTzo, singleRes.forcedEndTzo); | ||
1999 | if (instanceIdMap && def.publicId && instanceIdMap[def.publicId]) { | ||
2000 | instance.instanceId = instanceIdMap[def.publicId]; | ||
2001 | } | ||
2002 | return { def, instance }; | ||
2003 | } | ||
2004 | return null; | ||
2005 | } | ||
2006 | function refineEventDef(raw, context, refiners = buildEventRefiners(context)) { | ||
2007 | return refineProps(raw, refiners); | ||
2008 | } | ||
2009 | function buildEventRefiners(context) { | ||
2010 | return Object.assign(Object.assign(Object.assign({}, EVENT_UI_REFINERS), EVENT_REFINERS), context.pluginHooks.eventRefiners); | ||
2011 | } | ||
2012 | /* | ||
2013 | Will NOT populate extendedProps with the leftover properties. | ||
2014 | Will NOT populate date-related props. | ||
2015 | */ | ||
2016 | function parseEventDef(refined, extra, sourceId, allDay, hasEnd, context, defIdMap) { | ||
2017 | let def = { | ||
2018 | title: refined.title || '', | ||
2019 | groupId: refined.groupId || '', | ||
2020 | publicId: refined.id || '', | ||
2021 | url: refined.url || '', | ||
2022 | recurringDef: null, | ||
2023 | defId: ((defIdMap && refined.id) ? defIdMap[refined.id] : '') || guid(), | ||
2024 | sourceId, | ||
2025 | allDay, | ||
2026 | hasEnd, | ||
2027 | interactive: refined.interactive, | ||
2028 | ui: createEventUi(refined, context), | ||
2029 | extendedProps: Object.assign(Object.assign({}, (refined.extendedProps || {})), extra), | ||
2030 | }; | ||
2031 | for (let memberAdder of context.pluginHooks.eventDefMemberAdders) { | ||
2032 | Object.assign(def, memberAdder(refined)); | ||
2033 | } | ||
2034 | // help out EventImpl from having user modify props | ||
2035 | Object.freeze(def.ui.classNames); | ||
2036 | Object.freeze(def.extendedProps); | ||
2037 | return def; | ||
2038 | } | ||
2039 | function parseSingle(refined, defaultAllDay, context, allowOpenRange) { | ||
2040 | let { allDay } = refined; | ||
2041 | let startMeta; | ||
2042 | let startMarker = null; | ||
2043 | let hasEnd = false; | ||
2044 | let endMeta; | ||
2045 | let endMarker = null; | ||
2046 | let startInput = refined.start != null ? refined.start : refined.date; | ||
2047 | startMeta = context.dateEnv.createMarkerMeta(startInput); | ||
2048 | if (startMeta) { | ||
2049 | startMarker = startMeta.marker; | ||
2050 | } | ||
2051 | else if (!allowOpenRange) { | ||
2052 | return null; | ||
2053 | } | ||
2054 | if (refined.end != null) { | ||
2055 | endMeta = context.dateEnv.createMarkerMeta(refined.end); | ||
2056 | } | ||
2057 | if (allDay == null) { | ||
2058 | if (defaultAllDay != null) { | ||
2059 | allDay = defaultAllDay; | ||
2060 | } | ||
2061 | else { | ||
2062 | // fall back to the date props LAST | ||
2063 | allDay = (!startMeta || startMeta.isTimeUnspecified) && | ||
2064 | (!endMeta || endMeta.isTimeUnspecified); | ||
2065 | } | ||
2066 | } | ||
2067 | if (allDay && startMarker) { | ||
2068 | startMarker = startOfDay(startMarker); | ||
2069 | } | ||
2070 | if (endMeta) { | ||
2071 | endMarker = endMeta.marker; | ||
2072 | if (allDay) { | ||
2073 | endMarker = startOfDay(endMarker); | ||
2074 | } | ||
2075 | if (startMarker && endMarker <= startMarker) { | ||
2076 | endMarker = null; | ||
2077 | } | ||
2078 | } | ||
2079 | if (endMarker) { | ||
2080 | hasEnd = true; | ||
2081 | } | ||
2082 | else if (!allowOpenRange) { | ||
2083 | hasEnd = context.options.forceEventDuration || false; | ||
2084 | endMarker = context.dateEnv.add(startMarker, allDay ? | ||
2085 | context.options.defaultAllDayEventDuration : | ||
2086 | context.options.defaultTimedEventDuration); | ||
2087 | } | ||
2088 | return { | ||
2089 | allDay, | ||
2090 | hasEnd, | ||
2091 | range: { start: startMarker, end: endMarker }, | ||
2092 | forcedStartTzo: startMeta ? startMeta.forcedTzo : null, | ||
2093 | forcedEndTzo: endMeta ? endMeta.forcedTzo : null, | ||
2094 | }; | ||
2095 | } | ||
2096 | function computeIsDefaultAllDay(eventSource, context) { | ||
2097 | let res = null; | ||
2098 | if (eventSource) { | ||
2099 | res = eventSource.defaultAllDay; | ||
2100 | } | ||
2101 | if (res == null) { | ||
2102 | res = context.options.defaultAllDay; | ||
2103 | } | ||
2104 | return res; | ||
2105 | } | ||
2106 | |||
2107 | const DEF_DEFAULTS = { | ||
2108 | startTime: '09:00', | ||
2109 | endTime: '17:00', | ||
2110 | daysOfWeek: [1, 2, 3, 4, 5], | ||
2111 | display: 'inverse-background', | ||
2112 | classNames: 'fc-non-business', | ||
2113 | groupId: '_businessHours', // so multiple defs get grouped | ||
2114 | }; | ||
2115 | /* | ||
2116 | TODO: pass around as EventDefHash!!! | ||
2117 | */ | ||
2118 | function parseBusinessHours(input, context) { | ||
2119 | return parseEvents(refineInputs(input), null, context); | ||
2120 | } | ||
2121 | function refineInputs(input) { | ||
2122 | let rawDefs; | ||
2123 | if (input === true) { | ||
2124 | rawDefs = [{}]; // will get DEF_DEFAULTS verbatim | ||
2125 | } | ||
2126 | else if (Array.isArray(input)) { | ||
2127 | // if specifying an array, every sub-definition NEEDS a day-of-week | ||
2128 | rawDefs = input.filter((rawDef) => rawDef.daysOfWeek); | ||
2129 | } | ||
2130 | else if (typeof input === 'object' && input) { // non-null object | ||
2131 | rawDefs = [input]; | ||
2132 | } | ||
2133 | else { // is probably false | ||
2134 | rawDefs = []; | ||
2135 | } | ||
2136 | rawDefs = rawDefs.map((rawDef) => (Object.assign(Object.assign({}, DEF_DEFAULTS), rawDef))); | ||
2137 | return rawDefs; | ||
2138 | } | ||
2139 | |||
2140 | /* Date stuff that doesn't belong in datelib core | ||
2141 | ----------------------------------------------------------------------------------------------------------------------*/ | ||
2142 | // given a timed range, computes an all-day range that has the same exact duration, | ||
2143 | // but whose start time is aligned with the start of the day. | ||
2144 | function computeAlignedDayRange(timedRange) { | ||
2145 | let dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1; | ||
2146 | let start = startOfDay(timedRange.start); | ||
2147 | let end = addDays(start, dayCnt); | ||
2148 | return { start, end }; | ||
2149 | } | ||
2150 | // given a timed range, computes an all-day range based on how for the end date bleeds into the next day | ||
2151 | // TODO: give nextDayThreshold a default arg | ||
2152 | function computeVisibleDayRange(timedRange, nextDayThreshold = createDuration(0)) { | ||
2153 | let startDay = null; | ||
2154 | let endDay = null; | ||
2155 | if (timedRange.end) { | ||
2156 | endDay = startOfDay(timedRange.end); | ||
2157 | let endTimeMS = timedRange.end.valueOf() - endDay.valueOf(); // # of milliseconds into `endDay` | ||
2158 | // If the end time is actually inclusively part of the next day and is equal to or | ||
2159 | // beyond the next day threshold, adjust the end to be the exclusive end of `endDay`. | ||
2160 | // Otherwise, leaving it as inclusive will cause it to exclude `endDay`. | ||
2161 | if (endTimeMS && endTimeMS >= asRoughMs(nextDayThreshold)) { | ||
2162 | endDay = addDays(endDay, 1); | ||
2163 | } | ||
2164 | } | ||
2165 | if (timedRange.start) { | ||
2166 | startDay = startOfDay(timedRange.start); // the beginning of the day the range starts | ||
2167 | // If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day. | ||
2168 | if (endDay && endDay <= startDay) { | ||
2169 | endDay = addDays(startDay, 1); | ||
2170 | } | ||
2171 | } | ||
2172 | return { start: startDay, end: endDay }; | ||
2173 | } | ||
2174 | // spans from one day into another? | ||
2175 | function isMultiDayRange(range) { | ||
2176 | let visibleRange = computeVisibleDayRange(range); | ||
2177 | return diffDays(visibleRange.start, visibleRange.end) > 1; | ||
2178 | } | ||
2179 | function diffDates(date0, date1, dateEnv, largeUnit) { | ||
2180 | if (largeUnit === 'year') { | ||
2181 | return createDuration(dateEnv.diffWholeYears(date0, date1), 'year'); | ||
2182 | } | ||
2183 | if (largeUnit === 'month') { | ||
2184 | return createDuration(dateEnv.diffWholeMonths(date0, date1), 'month'); | ||
2185 | } | ||
2186 | return diffDayAndTime(date0, date1); // returns a duration | ||
2187 | } | ||
2188 | |||
2189 | function pointInsideRect(point, rect) { | ||
2190 | return point.left >= rect.left && | ||
2191 | point.left < rect.right && | ||
2192 | point.top >= rect.top && | ||
2193 | point.top < rect.bottom; | ||
2194 | } | ||
2195 | // Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false | ||
2196 | function intersectRects(rect1, rect2) { | ||
2197 | let res = { | ||
2198 | left: Math.max(rect1.left, rect2.left), | ||
2199 | right: Math.min(rect1.right, rect2.right), | ||
2200 | top: Math.max(rect1.top, rect2.top), | ||
2201 | bottom: Math.min(rect1.bottom, rect2.bottom), | ||
2202 | }; | ||
2203 | if (res.left < res.right && res.top < res.bottom) { | ||
2204 | return res; | ||
2205 | } | ||
2206 | return false; | ||
2207 | } | ||
2208 | function translateRect(rect, deltaX, deltaY) { | ||
2209 | return { | ||
2210 | left: rect.left + deltaX, | ||
2211 | right: rect.right + deltaX, | ||
2212 | top: rect.top + deltaY, | ||
2213 | bottom: rect.bottom + deltaY, | ||
2214 | }; | ||
2215 | } | ||
2216 | // Returns a new point that will have been moved to reside within the given rectangle | ||
2217 | function constrainPoint(point, rect) { | ||
2218 | return { | ||
2219 | left: Math.min(Math.max(point.left, rect.left), rect.right), | ||
2220 | top: Math.min(Math.max(point.top, rect.top), rect.bottom), | ||
2221 | }; | ||
2222 | } | ||
2223 | // Returns a point that is the center of the given rectangle | ||
2224 | function getRectCenter(rect) { | ||
2225 | return { | ||
2226 | left: (rect.left + rect.right) / 2, | ||
2227 | top: (rect.top + rect.bottom) / 2, | ||
2228 | }; | ||
2229 | } | ||
2230 | // Subtracts point2's coordinates from point1's coordinates, returning a delta | ||
2231 | function diffPoints(point1, point2) { | ||
2232 | return { | ||
2233 | left: point1.left - point2.left, | ||
2234 | top: point1.top - point2.top, | ||
2235 | }; | ||
2236 | } | ||
2237 | |||
2238 | let canVGrowWithinCell; | ||
2239 | function getCanVGrowWithinCell() { | ||
2240 | if (canVGrowWithinCell == null) { | ||
2241 | canVGrowWithinCell = computeCanVGrowWithinCell(); | ||
2242 | } | ||
2243 | return canVGrowWithinCell; | ||
2244 | } | ||
2245 | function computeCanVGrowWithinCell() { | ||
2246 | // for SSR, because this function is call immediately at top-level | ||
2247 | // TODO: just make this logic execute top-level, immediately, instead of doing lazily | ||
2248 | if (typeof document === 'undefined') { | ||
2249 | return true; | ||
2250 | } | ||
2251 | let el = document.createElement('div'); | ||
2252 | el.style.position = 'absolute'; | ||
2253 | el.style.top = '0px'; | ||
2254 | el.style.left = '0px'; | ||
2255 | el.innerHTML = '<table><tr><td><div></div></td></tr></table>'; | ||
2256 | el.querySelector('table').style.height = '100px'; | ||
2257 | el.querySelector('div').style.height = '100%'; | ||
2258 | document.body.appendChild(el); | ||
2259 | let div = el.querySelector('div'); | ||
2260 | let possible = div.offsetHeight > 0; | ||
2261 | document.body.removeChild(el); | ||
2262 | return possible; | ||
2263 | } | ||
2264 | |||
2265 | const EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere | ||
2266 | class Splitter { | ||
2267 | constructor() { | ||
2268 | this.getKeysForEventDefs = memoize(this._getKeysForEventDefs); | ||
2269 | this.splitDateSelection = memoize(this._splitDateSpan); | ||
2270 | this.splitEventStore = memoize(this._splitEventStore); | ||
2271 | this.splitIndividualUi = memoize(this._splitIndividualUi); | ||
2272 | this.splitEventDrag = memoize(this._splitInteraction); | ||
2273 | this.splitEventResize = memoize(this._splitInteraction); | ||
2274 | this.eventUiBuilders = {}; // TODO: typescript protection | ||
2275 | } | ||
2276 | splitProps(props) { | ||
2277 | let keyInfos = this.getKeyInfo(props); | ||
2278 | let defKeys = this.getKeysForEventDefs(props.eventStore); | ||
2279 | let dateSelections = this.splitDateSelection(props.dateSelection); | ||
2280 | let individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); // the individual *bases* | ||
2281 | let eventStores = this.splitEventStore(props.eventStore, defKeys); | ||
2282 | let eventDrags = this.splitEventDrag(props.eventDrag); | ||
2283 | let eventResizes = this.splitEventResize(props.eventResize); | ||
2284 | let splitProps = {}; | ||
2285 | this.eventUiBuilders = mapHash(keyInfos, (info, key) => this.eventUiBuilders[key] || memoize(buildEventUiForKey)); | ||
2286 | for (let key in keyInfos) { | ||
2287 | let keyInfo = keyInfos[key]; | ||
2288 | let eventStore = eventStores[key] || EMPTY_EVENT_STORE; | ||
2289 | let buildEventUi = this.eventUiBuilders[key]; | ||
2290 | splitProps[key] = { | ||
2291 | businessHours: keyInfo.businessHours || props.businessHours, | ||
2292 | dateSelection: dateSelections[key] || null, | ||
2293 | eventStore, | ||
2294 | eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]), | ||
2295 | eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '', | ||
2296 | eventDrag: eventDrags[key] || null, | ||
2297 | eventResize: eventResizes[key] || null, | ||
2298 | }; | ||
2299 | } | ||
2300 | return splitProps; | ||
2301 | } | ||
2302 | _splitDateSpan(dateSpan) { | ||
2303 | let dateSpans = {}; | ||
2304 | if (dateSpan) { | ||
2305 | let keys = this.getKeysForDateSpan(dateSpan); | ||
2306 | for (let key of keys) { | ||
2307 | dateSpans[key] = dateSpan; | ||
2308 | } | ||
2309 | } | ||
2310 | return dateSpans; | ||
2311 | } | ||
2312 | _getKeysForEventDefs(eventStore) { | ||
2313 | return mapHash(eventStore.defs, (eventDef) => this.getKeysForEventDef(eventDef)); | ||
2314 | } | ||
2315 | _splitEventStore(eventStore, defKeys) { | ||
2316 | let { defs, instances } = eventStore; | ||
2317 | let splitStores = {}; | ||
2318 | for (let defId in defs) { | ||
2319 | for (let key of defKeys[defId]) { | ||
2320 | if (!splitStores[key]) { | ||
2321 | splitStores[key] = createEmptyEventStore(); | ||
2322 | } | ||
2323 | splitStores[key].defs[defId] = defs[defId]; | ||
2324 | } | ||
2325 | } | ||
2326 | for (let instanceId in instances) { | ||
2327 | let instance = instances[instanceId]; | ||
2328 | for (let key of defKeys[instance.defId]) { | ||
2329 | if (splitStores[key]) { // must have already been created | ||
2330 | splitStores[key].instances[instanceId] = instance; | ||
2331 | } | ||
2332 | } | ||
2333 | } | ||
2334 | return splitStores; | ||
2335 | } | ||
2336 | _splitIndividualUi(eventUiBases, defKeys) { | ||
2337 | let splitHashes = {}; | ||
2338 | for (let defId in eventUiBases) { | ||
2339 | if (defId) { // not the '' key | ||
2340 | for (let key of defKeys[defId]) { | ||
2341 | if (!splitHashes[key]) { | ||
2342 | splitHashes[key] = {}; | ||
2343 | } | ||
2344 | splitHashes[key][defId] = eventUiBases[defId]; | ||
2345 | } | ||
2346 | } | ||
2347 | } | ||
2348 | return splitHashes; | ||
2349 | } | ||
2350 | _splitInteraction(interaction) { | ||
2351 | let splitStates = {}; | ||
2352 | if (interaction) { | ||
2353 | let affectedStores = this._splitEventStore(interaction.affectedEvents, this._getKeysForEventDefs(interaction.affectedEvents)); | ||
2354 | // can't rely on defKeys because event data is mutated | ||
2355 | let mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents); | ||
2356 | let mutatedStores = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId); | ||
2357 | let populate = (key) => { | ||
2358 | if (!splitStates[key]) { | ||
2359 | splitStates[key] = { | ||
2360 | affectedEvents: affectedStores[key] || EMPTY_EVENT_STORE, | ||
2361 | mutatedEvents: mutatedStores[key] || EMPTY_EVENT_STORE, | ||
2362 | isEvent: interaction.isEvent, | ||
2363 | }; | ||
2364 | } | ||
2365 | }; | ||
2366 | for (let key in affectedStores) { | ||
2367 | populate(key); | ||
2368 | } | ||
2369 | for (let key in mutatedStores) { | ||
2370 | populate(key); | ||
2371 | } | ||
2372 | } | ||
2373 | return splitStates; | ||
2374 | } | ||
2375 | } | ||
2376 | function buildEventUiForKey(allUi, eventUiForKey, individualUi) { | ||
2377 | let baseParts = []; | ||
2378 | if (allUi) { | ||
2379 | baseParts.push(allUi); | ||
2380 | } | ||
2381 | if (eventUiForKey) { | ||
2382 | baseParts.push(eventUiForKey); | ||
2383 | } | ||
2384 | let stuff = { | ||
2385 | '': combineEventUis(baseParts), | ||
2386 | }; | ||
2387 | if (individualUi) { | ||
2388 | Object.assign(stuff, individualUi); | ||
2389 | } | ||
2390 | return stuff; | ||
2391 | } | ||
2392 | |||
2393 | function parseRange(input, dateEnv) { | ||
2394 | let start = null; | ||
2395 | let end = null; | ||
2396 | if (input.start) { | ||
2397 | start = dateEnv.createMarker(input.start); | ||
2398 | } | ||
2399 | if (input.end) { | ||
2400 | end = dateEnv.createMarker(input.end); | ||
2401 | } | ||
2402 | if (!start && !end) { | ||
2403 | return null; | ||
2404 | } | ||
2405 | if (start && end && end < start) { | ||
2406 | return null; | ||
2407 | } | ||
2408 | return { start, end }; | ||
2409 | } | ||
2410 | // SIDE-EFFECT: will mutate ranges. | ||
2411 | // Will return a new array result. | ||
2412 | function invertRanges(ranges, constraintRange) { | ||
2413 | let invertedRanges = []; | ||
2414 | let { start } = constraintRange; // the end of the previous range. the start of the new range | ||
2415 | let i; | ||
2416 | let dateRange; | ||
2417 | // ranges need to be in order. required for our date-walking algorithm | ||
2418 | ranges.sort(compareRanges); | ||
2419 | for (i = 0; i < ranges.length; i += 1) { | ||
2420 | dateRange = ranges[i]; | ||
2421 | // add the span of time before the event (if there is any) | ||
2422 | if (dateRange.start > start) { // compare millisecond time (skip any ambig logic) | ||
2423 | invertedRanges.push({ start, end: dateRange.start }); | ||
2424 | } | ||
2425 | if (dateRange.end > start) { | ||
2426 | start = dateRange.end; | ||
2427 | } | ||
2428 | } | ||
2429 | // add the span of time after the last event (if there is any) | ||
2430 | if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic) | ||
2431 | invertedRanges.push({ start, end: constraintRange.end }); | ||
2432 | } | ||
2433 | return invertedRanges; | ||
2434 | } | ||
2435 | function compareRanges(range0, range1) { | ||
2436 | return range0.start.valueOf() - range1.start.valueOf(); // earlier ranges go first | ||
2437 | } | ||
2438 | function intersectRanges(range0, range1) { | ||
2439 | let { start, end } = range0; | ||
2440 | let newRange = null; | ||
2441 | if (range1.start !== null) { | ||
2442 | if (start === null) { | ||
2443 | start = range1.start; | ||
2444 | } | ||
2445 | else { | ||
2446 | start = new Date(Math.max(start.valueOf(), range1.start.valueOf())); | ||
2447 | } | ||
2448 | } | ||
2449 | if (range1.end != null) { | ||
2450 | if (end === null) { | ||
2451 | end = range1.end; | ||
2452 | } | ||
2453 | else { | ||
2454 | end = new Date(Math.min(end.valueOf(), range1.end.valueOf())); | ||
2455 | } | ||
2456 | } | ||
2457 | if (start === null || end === null || start < end) { | ||
2458 | newRange = { start, end }; | ||
2459 | } | ||
2460 | return newRange; | ||
2461 | } | ||
2462 | function rangesEqual(range0, range1) { | ||
2463 | return (range0.start === null ? null : range0.start.valueOf()) === (range1.start === null ? null : range1.start.valueOf()) && | ||
2464 | (range0.end === null ? null : range0.end.valueOf()) === (range1.end === null ? null : range1.end.valueOf()); | ||
2465 | } | ||
2466 | function rangesIntersect(range0, range1) { | ||
2467 | return (range0.end === null || range1.start === null || range0.end > range1.start) && | ||
2468 | (range0.start === null || range1.end === null || range0.start < range1.end); | ||
2469 | } | ||
2470 | function rangeContainsRange(outerRange, innerRange) { | ||
2471 | return (outerRange.start === null || (innerRange.start !== null && innerRange.start >= outerRange.start)) && | ||
2472 | (outerRange.end === null || (innerRange.end !== null && innerRange.end <= outerRange.end)); | ||
2473 | } | ||
2474 | function rangeContainsMarker(range, date) { | ||
2475 | return (range.start === null || date >= range.start) && | ||
2476 | (range.end === null || date < range.end); | ||
2477 | } | ||
2478 | // If the given date is not within the given range, move it inside. | ||
2479 | // (If it's past the end, make it one millisecond before the end). | ||
2480 | function constrainMarkerToRange(date, range) { | ||
2481 | if (range.start != null && date < range.start) { | ||
2482 | return range.start; | ||
2483 | } | ||
2484 | if (range.end != null && date >= range.end) { | ||
2485 | return new Date(range.end.valueOf() - 1); | ||
2486 | } | ||
2487 | return date; | ||
2488 | } | ||
2489 | |||
2490 | function getDateMeta(date, todayRange, nowDate, dateProfile) { | ||
2491 | return { | ||
2492 | dow: date.getUTCDay(), | ||
2493 | isDisabled: Boolean(dateProfile && (!dateProfile.activeRange || !rangeContainsMarker(dateProfile.activeRange, date))), | ||
2494 | isOther: Boolean(dateProfile && !rangeContainsMarker(dateProfile.currentRange, date)), | ||
2495 | isToday: Boolean(todayRange && rangeContainsMarker(todayRange, date)), | ||
2496 | isPast: Boolean(nowDate ? (date < nowDate) : todayRange ? (date < todayRange.start) : false), | ||
2497 | isFuture: Boolean(nowDate ? (date > nowDate) : todayRange ? (date >= todayRange.end) : false), | ||
2498 | }; | ||
2499 | } | ||
2500 | function getDayClassNames(meta, theme) { | ||
2501 | let classNames = [ | ||
2502 | 'fc-day', | ||
2503 | `fc-day-${DAY_IDS[meta.dow]}`, | ||
2504 | ]; | ||
2505 | if (meta.isDisabled) { | ||
2506 | classNames.push('fc-day-disabled'); | ||
2507 | } | ||
2508 | else { | ||
2509 | if (meta.isToday) { | ||
2510 | classNames.push('fc-day-today'); | ||
2511 | classNames.push(theme.getClass('today')); | ||
2512 | } | ||
2513 | if (meta.isPast) { | ||
2514 | classNames.push('fc-day-past'); | ||
2515 | } | ||
2516 | if (meta.isFuture) { | ||
2517 | classNames.push('fc-day-future'); | ||
2518 | } | ||
2519 | if (meta.isOther) { | ||
2520 | classNames.push('fc-day-other'); | ||
2521 | } | ||
2522 | } | ||
2523 | return classNames; | ||
2524 | } | ||
2525 | function getSlotClassNames(meta, theme) { | ||
2526 | let classNames = [ | ||
2527 | 'fc-slot', | ||
2528 | `fc-slot-${DAY_IDS[meta.dow]}`, | ||
2529 | ]; | ||
2530 | if (meta.isDisabled) { | ||
2531 | classNames.push('fc-slot-disabled'); | ||
2532 | } | ||
2533 | else { | ||
2534 | if (meta.isToday) { | ||
2535 | classNames.push('fc-slot-today'); | ||
2536 | classNames.push(theme.getClass('today')); | ||
2537 | } | ||
2538 | if (meta.isPast) { | ||
2539 | classNames.push('fc-slot-past'); | ||
2540 | } | ||
2541 | if (meta.isFuture) { | ||
2542 | classNames.push('fc-slot-future'); | ||
2543 | } | ||
2544 | } | ||
2545 | return classNames; | ||
2546 | } | ||
2547 | |||
2548 | const DAY_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' }); | ||
2549 | const WEEK_FORMAT = createFormatter({ week: 'long' }); | ||
2550 | function buildNavLinkAttrs(context, dateMarker, viewType = 'day', isTabbable = true) { | ||
2551 | const { dateEnv, options, calendarApi } = context; | ||
2552 | let dateStr = dateEnv.format(dateMarker, viewType === 'week' ? WEEK_FORMAT : DAY_FORMAT); | ||
2553 | if (options.navLinks) { | ||
2554 | let zonedDate = dateEnv.toDate(dateMarker); | ||
2555 | const handleInteraction = (ev) => { | ||
2556 | let customAction = viewType === 'day' ? options.navLinkDayClick : | ||
2557 | viewType === 'week' ? options.navLinkWeekClick : null; | ||
2558 | if (typeof customAction === 'function') { | ||
2559 | customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev); | ||
2560 | } | ||
2561 | else { | ||
2562 | if (typeof customAction === 'string') { | ||
2563 | viewType = customAction; | ||
2564 | } | ||
2565 | calendarApi.zoomTo(dateMarker, viewType); | ||
2566 | } | ||
2567 | }; | ||
2568 | return Object.assign({ title: formatWithOrdinals(options.navLinkHint, [dateStr, zonedDate], dateStr), 'data-navlink': '' }, (isTabbable | ||
2569 | ? createAriaClickAttrs(handleInteraction) | ||
2570 | : { onClick: handleInteraction })); | ||
2571 | } | ||
2572 | return { 'aria-label': dateStr }; | ||
2573 | } | ||
2574 | |||
2575 | let _isRtlScrollbarOnLeft = null; | ||
2576 | function getIsRtlScrollbarOnLeft() { | ||
2577 | if (_isRtlScrollbarOnLeft === null) { | ||
2578 | _isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft(); | ||
2579 | } | ||
2580 | return _isRtlScrollbarOnLeft; | ||
2581 | } | ||
2582 | function computeIsRtlScrollbarOnLeft() { | ||
2583 | let outerEl = document.createElement('div'); | ||
2584 | applyStyle(outerEl, { | ||
2585 | position: 'absolute', | ||
2586 | top: -1000, | ||
2587 | left: 0, | ||
2588 | border: 0, | ||
2589 | padding: 0, | ||
2590 | overflow: 'scroll', | ||
2591 | direction: 'rtl', | ||
2592 | }); | ||
2593 | outerEl.innerHTML = '<div></div>'; | ||
2594 | document.body.appendChild(outerEl); | ||
2595 | let innerEl = outerEl.firstChild; | ||
2596 | let res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left; | ||
2597 | removeElement(outerEl); | ||
2598 | return res; | ||
2599 | } | ||
2600 | |||
2601 | let _scrollbarWidths; | ||
2602 | function getScrollbarWidths() { | ||
2603 | if (!_scrollbarWidths) { | ||
2604 | _scrollbarWidths = computeScrollbarWidths(); | ||
2605 | } | ||
2606 | return _scrollbarWidths; | ||
2607 | } | ||
2608 | function computeScrollbarWidths() { | ||
2609 | let el = document.createElement('div'); | ||
2610 | el.style.overflow = 'scroll'; | ||
2611 | el.style.position = 'absolute'; | ||
2612 | el.style.top = '-9999px'; | ||
2613 | el.style.left = '-9999px'; | ||
2614 | document.body.appendChild(el); | ||
2615 | let res = computeScrollbarWidthsForEl(el); | ||
2616 | document.body.removeChild(el); | ||
2617 | return res; | ||
2618 | } | ||
2619 | // WARNING: will include border | ||
2620 | function computeScrollbarWidthsForEl(el) { | ||
2621 | return { | ||
2622 | x: el.offsetHeight - el.clientHeight, | ||
2623 | y: el.offsetWidth - el.clientWidth, | ||
2624 | }; | ||
2625 | } | ||
2626 | |||
2627 | function computeEdges(el, getPadding = false) { | ||
2628 | let computedStyle = window.getComputedStyle(el); | ||
2629 | let borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0; | ||
2630 | let borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0; | ||
2631 | let borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0; | ||
2632 | let borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; | ||
2633 | let badScrollbarWidths = computeScrollbarWidthsForEl(el); // includes border! | ||
2634 | let scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight; | ||
2635 | let scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom; | ||
2636 | let res = { | ||
2637 | borderLeft, | ||
2638 | borderRight, | ||
2639 | borderTop, | ||
2640 | borderBottom, | ||
2641 | scrollbarBottom, | ||
2642 | scrollbarLeft: 0, | ||
2643 | scrollbarRight: 0, | ||
2644 | }; | ||
2645 | if (getIsRtlScrollbarOnLeft() && computedStyle.direction === 'rtl') { // is the scrollbar on the left side? | ||
2646 | res.scrollbarLeft = scrollbarLeftRight; | ||
2647 | } | ||
2648 | else { | ||
2649 | res.scrollbarRight = scrollbarLeftRight; | ||
2650 | } | ||
2651 | if (getPadding) { | ||
2652 | res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0; | ||
2653 | res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0; | ||
2654 | res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0; | ||
2655 | res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0; | ||
2656 | } | ||
2657 | return res; | ||
2658 | } | ||
2659 | function computeInnerRect(el, goWithinPadding = false, doFromWindowViewport) { | ||
2660 | let outerRect = doFromWindowViewport ? el.getBoundingClientRect() : computeRect(el); | ||
2661 | let edges = computeEdges(el, goWithinPadding); | ||
2662 | let res = { | ||
2663 | left: outerRect.left + edges.borderLeft + edges.scrollbarLeft, | ||
2664 | right: outerRect.right - edges.borderRight - edges.scrollbarRight, | ||
2665 | top: outerRect.top + edges.borderTop, | ||
2666 | bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom, | ||
2667 | }; | ||
2668 | if (goWithinPadding) { | ||
2669 | res.left += edges.paddingLeft; | ||
2670 | res.right -= edges.paddingRight; | ||
2671 | res.top += edges.paddingTop; | ||
2672 | res.bottom -= edges.paddingBottom; | ||
2673 | } | ||
2674 | return res; | ||
2675 | } | ||
2676 | function computeRect(el) { | ||
2677 | let rect = el.getBoundingClientRect(); | ||
2678 | return { | ||
2679 | left: rect.left + window.scrollX, | ||
2680 | top: rect.top + window.scrollY, | ||
2681 | right: rect.right + window.scrollX, | ||
2682 | bottom: rect.bottom + window.scrollY, | ||
2683 | }; | ||
2684 | } | ||
2685 | function computeClippedClientRect(el) { | ||
2686 | let clippingParents = getClippingParents(el); | ||
2687 | let rect = el.getBoundingClientRect(); | ||
2688 | for (let clippingParent of clippingParents) { | ||
2689 | let intersection = intersectRects(rect, clippingParent.getBoundingClientRect()); | ||
2690 | if (intersection) { | ||
2691 | rect = intersection; | ||
2692 | } | ||
2693 | else { | ||
2694 | return null; | ||
2695 | } | ||
2696 | } | ||
2697 | return rect; | ||
2698 | } | ||
2699 | // does not return window | ||
2700 | function getClippingParents(el) { | ||
2701 | let parents = []; | ||
2702 | while (el instanceof HTMLElement) { // will stop when gets to document or null | ||
2703 | let computedStyle = window.getComputedStyle(el); | ||
2704 | if (computedStyle.position === 'fixed') { | ||
2705 | break; | ||
2706 | } | ||
2707 | if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) { | ||
2708 | parents.push(el); | ||
2709 | } | ||
2710 | el = el.parentNode; | ||
2711 | } | ||
2712 | return parents; | ||
2713 | } | ||
2714 | |||
2715 | /* | ||
2716 | given a function that resolves a result asynchronously. | ||
2717 | the function can either call passed-in success and failure callbacks, | ||
2718 | or it can return a promise. | ||
2719 | if you need to pass additional params to func, bind them first. | ||
2720 | */ | ||
2721 | function unpromisify(func, normalizedSuccessCallback, normalizedFailureCallback) { | ||
2722 | // guard against success/failure callbacks being called more than once | ||
2723 | // and guard against a promise AND callback being used together. | ||
2724 | let isResolved = false; | ||
2725 | let wrappedSuccess = function (res) { | ||
2726 | if (!isResolved) { | ||
2727 | isResolved = true; | ||
2728 | normalizedSuccessCallback(res); | ||
2729 | } | ||
2730 | }; | ||
2731 | let wrappedFailure = function (error) { | ||
2732 | if (!isResolved) { | ||
2733 | isResolved = true; | ||
2734 | normalizedFailureCallback(error); | ||
2735 | } | ||
2736 | }; | ||
2737 | let res = func(wrappedSuccess, wrappedFailure); | ||
2738 | if (res && typeof res.then === 'function') { | ||
2739 | res.then(wrappedSuccess, wrappedFailure); | ||
2740 | } | ||
2741 | } | ||
2742 | |||
2743 | class Emitter { | ||
2744 | constructor() { | ||
2745 | this.handlers = {}; | ||
2746 | this.thisContext = null; | ||
2747 | } | ||
2748 | setThisContext(thisContext) { | ||
2749 | this.thisContext = thisContext; | ||
2750 | } | ||
2751 | setOptions(options) { | ||
2752 | this.options = options; | ||
2753 | } | ||
2754 | on(type, handler) { | ||
2755 | addToHash(this.handlers, type, handler); | ||
2756 | } | ||
2757 | off(type, handler) { | ||
2758 | removeFromHash(this.handlers, type, handler); | ||
2759 | } | ||
2760 | trigger(type, ...args) { | ||
2761 | let attachedHandlers = this.handlers[type] || []; | ||
2762 | let optionHandler = this.options && this.options[type]; | ||
2763 | let handlers = [].concat(optionHandler || [], attachedHandlers); | ||
2764 | for (let handler of handlers) { | ||
2765 | handler.apply(this.thisContext, args); | ||
2766 | } | ||
2767 | } | ||
2768 | hasHandlers(type) { | ||
2769 | return Boolean((this.handlers[type] && this.handlers[type].length) || | ||
2770 | (this.options && this.options[type])); | ||
2771 | } | ||
2772 | } | ||
2773 | function addToHash(hash, type, handler) { | ||
2774 | (hash[type] || (hash[type] = [])) | ||
2775 | .push(handler); | ||
2776 | } | ||
2777 | function removeFromHash(hash, type, handler) { | ||
2778 | if (handler) { | ||
2779 | if (hash[type]) { | ||
2780 | hash[type] = hash[type].filter((func) => func !== handler); | ||
2781 | } | ||
2782 | } | ||
2783 | else { | ||
2784 | delete hash[type]; // remove all handler funcs for this type | ||
2785 | } | ||
2786 | } | ||
2787 | |||
2788 | /* | ||
2789 | Records offset information for a set of elements, relative to an origin element. | ||
2790 | Can record the left/right OR the top/bottom OR both. | ||
2791 | Provides methods for querying the cache by position. | ||
2792 | */ | ||
2793 | class PositionCache { | ||
2794 | constructor(originEl, els, isHorizontal, isVertical) { | ||
2795 | this.els = els; | ||
2796 | let originClientRect = this.originClientRect = originEl.getBoundingClientRect(); // relative to viewport top-left | ||
2797 | if (isHorizontal) { | ||
2798 | this.buildElHorizontals(originClientRect.left); | ||
2799 | } | ||
2800 | if (isVertical) { | ||
2801 | this.buildElVerticals(originClientRect.top); | ||
2802 | } | ||
2803 | } | ||
2804 | // Populates the left/right internal coordinate arrays | ||
2805 | buildElHorizontals(originClientLeft) { | ||
2806 | let lefts = []; | ||
2807 | let rights = []; | ||
2808 | for (let el of this.els) { | ||
2809 | let rect = el.getBoundingClientRect(); | ||
2810 | lefts.push(rect.left - originClientLeft); | ||
2811 | rights.push(rect.right - originClientLeft); | ||
2812 | } | ||
2813 | this.lefts = lefts; | ||
2814 | this.rights = rights; | ||
2815 | } | ||
2816 | // Populates the top/bottom internal coordinate arrays | ||
2817 | buildElVerticals(originClientTop) { | ||
2818 | let tops = []; | ||
2819 | let bottoms = []; | ||
2820 | for (let el of this.els) { | ||
2821 | let rect = el.getBoundingClientRect(); | ||
2822 | tops.push(rect.top - originClientTop); | ||
2823 | bottoms.push(rect.bottom - originClientTop); | ||
2824 | } | ||
2825 | this.tops = tops; | ||
2826 | this.bottoms = bottoms; | ||
2827 | } | ||
2828 | // Given a left offset (from document left), returns the index of the el that it horizontally intersects. | ||
2829 | // If no intersection is made, returns undefined. | ||
2830 | leftToIndex(leftPosition) { | ||
2831 | let { lefts, rights } = this; | ||
2832 | let len = lefts.length; | ||
2833 | let i; | ||
2834 | for (i = 0; i < len; i += 1) { | ||
2835 | if (leftPosition >= lefts[i] && leftPosition < rights[i]) { | ||
2836 | return i; | ||
2837 | } | ||
2838 | } | ||
2839 | return undefined; // TODO: better | ||
2840 | } | ||
2841 | // Given a top offset (from document top), returns the index of the el that it vertically intersects. | ||
2842 | // If no intersection is made, returns undefined. | ||
2843 | topToIndex(topPosition) { | ||
2844 | let { tops, bottoms } = this; | ||
2845 | let len = tops.length; | ||
2846 | let i; | ||
2847 | for (i = 0; i < len; i += 1) { | ||
2848 | if (topPosition >= tops[i] && topPosition < bottoms[i]) { | ||
2849 | return i; | ||
2850 | } | ||
2851 | } | ||
2852 | return undefined; // TODO: better | ||
2853 | } | ||
2854 | // Gets the width of the element at the given index | ||
2855 | getWidth(leftIndex) { | ||
2856 | return this.rights[leftIndex] - this.lefts[leftIndex]; | ||
2857 | } | ||
2858 | // Gets the height of the element at the given index | ||
2859 | getHeight(topIndex) { | ||
2860 | return this.bottoms[topIndex] - this.tops[topIndex]; | ||
2861 | } | ||
2862 | similarTo(otherCache) { | ||
2863 | return similarNumArrays(this.tops || [], otherCache.tops || []) && | ||
2864 | similarNumArrays(this.bottoms || [], otherCache.bottoms || []) && | ||
2865 | similarNumArrays(this.lefts || [], otherCache.lefts || []) && | ||
2866 | similarNumArrays(this.rights || [], otherCache.rights || []); | ||
2867 | } | ||
2868 | } | ||
2869 | function similarNumArrays(a, b) { | ||
2870 | const len = a.length; | ||
2871 | if (len !== b.length) { | ||
2872 | return false; | ||
2873 | } | ||
2874 | for (let i = 0; i < len; i++) { | ||
2875 | if (Math.round(a[i]) !== Math.round(b[i])) { | ||
2876 | return false; | ||
2877 | } | ||
2878 | } | ||
2879 | return true; | ||
2880 | } | ||
2881 | |||
2882 | /* eslint max-classes-per-file: "off" */ | ||
2883 | /* | ||
2884 | An object for getting/setting scroll-related information for an element. | ||
2885 | Internally, this is done very differently for window versus DOM element, | ||
2886 | so this object serves as a common interface. | ||
2887 | */ | ||
2888 | class ScrollController { | ||
2889 | getMaxScrollTop() { | ||
2890 | return this.getScrollHeight() - this.getClientHeight(); | ||
2891 | } | ||
2892 | getMaxScrollLeft() { | ||
2893 | return this.getScrollWidth() - this.getClientWidth(); | ||
2894 | } | ||
2895 | canScrollVertically() { | ||
2896 | return this.getMaxScrollTop() > 0; | ||
2897 | } | ||
2898 | canScrollHorizontally() { | ||
2899 | return this.getMaxScrollLeft() > 0; | ||
2900 | } | ||
2901 | canScrollUp() { | ||
2902 | return this.getScrollTop() > 0; | ||
2903 | } | ||
2904 | canScrollDown() { | ||
2905 | return this.getScrollTop() < this.getMaxScrollTop(); | ||
2906 | } | ||
2907 | canScrollLeft() { | ||
2908 | return this.getScrollLeft() > 0; | ||
2909 | } | ||
2910 | canScrollRight() { | ||
2911 | return this.getScrollLeft() < this.getMaxScrollLeft(); | ||
2912 | } | ||
2913 | } | ||
2914 | class ElementScrollController extends ScrollController { | ||
2915 | constructor(el) { | ||
2916 | super(); | ||
2917 | this.el = el; | ||
2918 | } | ||
2919 | getScrollTop() { | ||
2920 | return this.el.scrollTop; | ||
2921 | } | ||
2922 | getScrollLeft() { | ||
2923 | return this.el.scrollLeft; | ||
2924 | } | ||
2925 | setScrollTop(top) { | ||
2926 | this.el.scrollTop = top; | ||
2927 | } | ||
2928 | setScrollLeft(left) { | ||
2929 | this.el.scrollLeft = left; | ||
2930 | } | ||
2931 | getScrollWidth() { | ||
2932 | return this.el.scrollWidth; | ||
2933 | } | ||
2934 | getScrollHeight() { | ||
2935 | return this.el.scrollHeight; | ||
2936 | } | ||
2937 | getClientHeight() { | ||
2938 | return this.el.clientHeight; | ||
2939 | } | ||
2940 | getClientWidth() { | ||
2941 | return this.el.clientWidth; | ||
2942 | } | ||
2943 | } | ||
2944 | class WindowScrollController extends ScrollController { | ||
2945 | getScrollTop() { | ||
2946 | return window.scrollY; | ||
2947 | } | ||
2948 | getScrollLeft() { | ||
2949 | return window.scrollX; | ||
2950 | } | ||
2951 | setScrollTop(n) { | ||
2952 | window.scroll(window.scrollX, n); | ||
2953 | } | ||
2954 | setScrollLeft(n) { | ||
2955 | window.scroll(n, window.scrollY); | ||
2956 | } | ||
2957 | getScrollWidth() { | ||
2958 | return document.documentElement.scrollWidth; | ||
2959 | } | ||
2960 | getScrollHeight() { | ||
2961 | return document.documentElement.scrollHeight; | ||
2962 | } | ||
2963 | getClientHeight() { | ||
2964 | return document.documentElement.clientHeight; | ||
2965 | } | ||
2966 | getClientWidth() { | ||
2967 | return document.documentElement.clientWidth; | ||
2968 | } | ||
2969 | } | ||
2970 | |||
2971 | class Theme { | ||
2972 | constructor(calendarOptions) { | ||
2973 | if (this.iconOverrideOption) { | ||
2974 | this.setIconOverride(calendarOptions[this.iconOverrideOption]); | ||
2975 | } | ||
2976 | } | ||
2977 | setIconOverride(iconOverrideHash) { | ||
2978 | let iconClassesCopy; | ||
2979 | let buttonName; | ||
2980 | if (typeof iconOverrideHash === 'object' && iconOverrideHash) { // non-null object | ||
2981 | iconClassesCopy = Object.assign({}, this.iconClasses); | ||
2982 | for (buttonName in iconOverrideHash) { | ||
2983 | iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]); | ||
2984 | } | ||
2985 | this.iconClasses = iconClassesCopy; | ||
2986 | } | ||
2987 | else if (iconOverrideHash === false) { | ||
2988 | this.iconClasses = {}; | ||
2989 | } | ||
2990 | } | ||
2991 | applyIconOverridePrefix(className) { | ||
2992 | let prefix = this.iconOverridePrefix; | ||
2993 | if (prefix && className.indexOf(prefix) !== 0) { // if not already present | ||
2994 | className = prefix + className; | ||
2995 | } | ||
2996 | return className; | ||
2997 | } | ||
2998 | getClass(key) { | ||
2999 | return this.classes[key] || ''; | ||
3000 | } | ||
3001 | getIconClass(buttonName, isRtl) { | ||
3002 | let className; | ||
3003 | if (isRtl && this.rtlIconClasses) { | ||
3004 | className = this.rtlIconClasses[buttonName] || this.iconClasses[buttonName]; | ||
3005 | } | ||
3006 | else { | ||
3007 | className = this.iconClasses[buttonName]; | ||
3008 | } | ||
3009 | if (className) { | ||
3010 | return `${this.baseIconClass} ${className}`; | ||
3011 | } | ||
3012 | return ''; | ||
3013 | } | ||
3014 | getCustomButtonIconClass(customButtonProps) { | ||
3015 | let className; | ||
3016 | if (this.iconOverrideCustomButtonOption) { | ||
3017 | className = customButtonProps[this.iconOverrideCustomButtonOption]; | ||
3018 | if (className) { | ||
3019 | return `${this.baseIconClass} ${this.applyIconOverridePrefix(className)}`; | ||
3020 | } | ||
3021 | } | ||
3022 | return ''; | ||
3023 | } | ||
3024 | } | ||
3025 | Theme.prototype.classes = {}; | ||
3026 | Theme.prototype.iconClasses = {}; | ||
3027 | Theme.prototype.baseIconClass = ''; | ||
3028 | Theme.prototype.iconOverridePrefix = ''; | ||
3029 | |||
3030 | var n,l$1,u$1,i$1,t,r$1,o,f$1,e$1,c$1={},s=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y(l,u,i){var t,r,o,f={};for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u$1:o};return null==o&&null!=l$1.vnode&&l$1.vnode(f),f}function d(){return {current:null}}function _(n){return n.children}function k$1(n,l,u,i,t){var r;for(r in u)"children"===r||"key"===r||r in l||g$2(n,r,null,u[r],i);for(r in l)t&&"function"!=typeof l[r]||"children"===r||"key"===r||"value"===r||"checked"===r||u[r]===l[r]||g$2(n,r,l[r],u[r],i);}function b$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function g$2(n,l,u,i,t){var r;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||b$1(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||b$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])r=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?w$2:m$1,r):n.removeEventListener(l,r?w$2:m$1,r);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function m$1(n){t=!0;try{return this.l[n.type+!1](l$1.event?l$1.event(n):n)}finally{t=!1;}}function w$2(n){t=!0;try{return this.l[n.type+!0](l$1.event?l$1.event(n):n)}finally{t=!1;}}function x$1(n,l){this.props=n,this.context=l;}function A(n,l){if(null==l)return n.__?A(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?A(n):null}function P$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return P$1(n)}}function C$1(n){t?setTimeout(n):f$1(n);}function T$1(n){(!n.__d&&(n.__d=!0)&&r$1.push(n)&&!$$1.__r++||o!==l$1.debounceRendering)&&((o=l$1.debounceRendering)||C$1)($$1);}function $$1(){var n,l,u,i,t,o,f,e;for(r$1.sort(function(n,l){return n.__v.__b-l.__v.__b});n=r$1.shift();)n.__d&&(l=r$1.length,i=void 0,t=void 0,f=(o=(u=n).__v).__e,(e=u.__P)&&(i=[],(t=h({},o)).__v=o.__v+1,M(e,o,t,u.__n,void 0!==e.ownerSVGElement,null!=o.__h?[f]:null,i,null==f?A(o):f,o.__h),N(i,o),o.__e!=f&&P$1(o)),r$1.length>l&&r$1.sort(function(n,l){return n.__v.__b-l.__v.__b}));$$1.__r=0;}function H$1(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,b,g,m=i&&i.__k||s,w=m.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(d=u.__k[h]=null==(d=l[h])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?p(null,d,null,null,d):Array.isArray(d)?p(_,{children:d},null,null,null):d.__b>0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=m[h])||y&&d.key==y.key&&d.type===y.type)m[h]=void 0;else for(v=0;v<w;v++){if((y=m[v])&&d.key==y.key&&d.type===y.type){m[v]=void 0;break}y=null;}M(n,d,y=y||c$1,t,r,o,f,e,a),k=d.__e,(v=d.ref)&&y.ref!=v&&(g||(g=[]),y.ref&&g.push(y.ref,null,d),g.push(v,d.__c||k,d)),null!=k?(null==b&&(b=k),"function"==typeof d.type&&d.__k===y.__k?d.__d=e=I$1(d,e,n):e=z$1(n,d,y,m,k,e),"function"==typeof u.type&&(u.__d=e)):e&&y.__e==e&&e.parentNode!=n&&(e=A(y));}for(u.__e=b,h=w;h--;)null!=m[h]&&("function"==typeof u.type&&null!=m[h].__e&&m[h].__e==u.__d&&(u.__d=L$1(i).nextSibling),q(m[h],m[h]));if(g)for(h=0;h<g.length;h++)S(g[h],g[++h],g[++h]);}function I$1(n,l,u){for(var i,t=n.__k,r=0;t&&r<t.length;r++)(i=t[r])&&(i.__=n,l="function"==typeof i.type?I$1(i,l,u):z$1(u,i,i,t,i.__e,l));return l}function j$2(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){j$2(n,l);}):l.push(n)),l}function z$1(n,l,u,i,t,r){var o,f,e;if(void 0!==l.__d)o=l.__d,l.__d=void 0;else if(null==u||t!=r||null==t.parentNode)n:if(null==r||r.parentNode!==n)n.appendChild(t),o=null;else {for(f=r,e=0;(f=f.nextSibling)&&e<i.length;e+=1)if(f==t)break n;n.insertBefore(t,r),o=r;}return void 0!==o?o:t.nextSibling}function L$1(n){var l,u,i;if(null==n.type||"string"==typeof n.type)return n.__e;if(n.__k)for(l=n.__k.length-1;l>=0;l--)if((u=n.__k[l])&&(i=L$1(u)))return i;return null}function M(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,k,b,g,m,w,A,P,C,T,$=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l$1.__b)&&s(u);try{n:if("function"==typeof $){if(b=u.props,g=(s=$.contextType)&&t[s.__c],m=s?g?g.props.value:s.__:t,i.__c?k=(a=u.__c=i.__c).__=a.__E:("prototype"in $&&$.prototype.render?u.__c=a=new $(b,m):(u.__c=a=new x$1(b,m),a.constructor=$,a.render=B$1),g&&g.sub(a),a.props=b,a.state||(a.state={}),a.context=m,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=$.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,$.getDerivedStateFromProps(b,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==$.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else {if(null==$.getDerivedStateFromProps&&b!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(b,m),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(b,a.__s,m)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=b,a.state=a.__s,a.__d=!1),u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),w=0;w<a._sb.length;w++)a.__h.push(a._sb[w]);a._sb=[],a.__h.length&&f.push(a);break n}null!=a.componentWillUpdate&&a.componentWillUpdate(b,a.__s,m),null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(y,p,d);});}if(a.context=m,a.props=b,a.__P=n,A=l$1.__r,P=0,"prototype"in $&&$.prototype.render){for(a.state=a.__s,a.__d=!1,A&&A(u),s=a.render(a.props,a.state,a.context),C=0;C<a._sb.length;C++)a.__h.push(a._sb[C]);a._sb=[];}else do{a.__d=!1,A&&A(u),s=a.render(a.props,a.state,a.context),a.state=a.__s;}while(a.__d&&++P<25);a.state=a.__s,null!=a.getChildContext&&(t=h(h({},t),a.getChildContext())),v||null==a.getSnapshotBeforeUpdate||(d=a.getSnapshotBeforeUpdate(y,p)),T=null!=s&&s.type===_&&null==s.key?s.props.children:s,H$1(n,Array.isArray(T)?T:[T],u,i,t,r,o,f,e,c),a.base=u.__e,u.__h=null,a.__h.length&&f.push(a),k&&(a.__E=a.__=null),a.__e=!1;}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=O(i.__e,u,i,t,r,o,f,c);(s=l$1.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=o)&&(u.__e=e,u.__h=!!c,o[o.indexOf(e)]=null),l$1.__e(n,u,i);}}function N(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function O(l,u,i,t,r,o,f,e){var s,a,h,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(r=!0),null!=o)for(;_<o.length;_++)if((s=o[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,o[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=r?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),o=null,e=!1;}if(null===d)y===p||e&&l.data===p||(l.data=p);else {if(o=o&&n.call(l.childNodes),a=(y=i.props||c$1).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!e){if(null!=o)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===l.innerHTML)||(l.innerHTML=h&&h.__html||""));}if(k$1(l,p,y,r,e),h)u.__k=[];else if(_=u.props.children,H$1(l,Array.isArray(_)?_:[_],u,i,t,r&&"foreignObject"!==d,o,f,o?o[0]:i.__k&&A(i,0),e),null!=o)for(_=o.length;_--;)null!=o[_]&&v$1(o[_]);e||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&g$2(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&g$2(l,"checked",_,y.checked,!1));}return l}function S(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function q(n,u,i){var t,r;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||S(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(r=0;r<t.length;r++)t[r]&&q(t[r],u,i||"function"!=typeof n.type);i||null==n.__e||v$1(n.__e),n.__=n.__e=n.__d=void 0;}function B$1(n,l,u){return this.constructor(n,u)}function D$1(u,i,t){var r,o,f;l$1.__&&l$1.__(u,i),o=(r="function"==typeof t)?null:t&&t.__k||i.__k,f=[],M(i,u=(!r&&t||i).__k=y(_,null,[u]),o||c$1,c$1,void 0!==i.ownerSVGElement,!r&&t?[t]:o?null:i.firstChild?n.call(i.childNodes):null,f,!r&&t?t:o?o.__e:i.firstChild,r),N(f,u);}function E(n,l){D$1(n,l,E);}function F$1(l,u,i){var t,r,o,f=h({},l.props);for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),p(l.type,f,t||l.key,r||l.ref,null)}function G$1(n,l){var u={__c:l="__cC"+e$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,T$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l$1={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,i$1=function(n){return null!=n&&void 0===n.constructor},t=!1,x$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),T$1(this));},x$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),T$1(this));},x$1.prototype.render=_,r$1=[],f$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$$1.__r=0,e$1=0; | ||
3031 | |||
3032 | var r,u,i,f=[],c=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){r=null,e&&e(n);},l$1.__r=function(n){a&&a(n);var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w$1),i.__h=[])),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j$1)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g$1="function"==typeof requestAnimationFrame;function j$1(n){var t,r=function(){clearTimeout(u),g$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g$1&&(t=requestAnimationFrame(r));}function k(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w$1(n){var t=r;n.__c=n.__(),r=t;} | ||
3033 | |||
3034 | function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function w(n){this.props=n;}(w.prototype=new x$1).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var x=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),x&&x(n);};var T=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);T(n,t,e,r);};var I=l$1.unmount;function L(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)})),n}function U(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return U(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function D(){this.__u=0,this.t=null,this.__b=null;}function F(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function V(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),I&&I(n);},(D.prototype=new x$1).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=F(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=U(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},D.prototype.componentWillUnmount=function(){this.t=[];},D.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=L(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&y(_,null,n.fallback);return i&&(i.__h=null),[y(_,null,e.__a?null:n.children),i]};var W=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function P(n){return this.getChildContext=function(){return n.context},n.children}function $(n){var e=this,r=n.i;e.componentWillUnmount=function(){D$1(null,e.l),e.l=null,e.i=null;},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n);},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n);}}),D$1(y(P,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount();}function j(n,e){var r=y($,{__v:n,i:e});return r.containerInfo=e,r}(V.prototype=new x$1).__a=function(n){var t=this,e=F(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),W(t,n,r)):u();};e?e(o):o();}},V.prototype.render=function(n){this.u=null,this.o=new Map;var t=j$2(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){W(n,e,t);});};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H="undefined"!=typeof document,Z=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};x$1.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(x$1.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var G=l$1.event;function J(){}function K(){return this.cancelBubble}function Q(){return this.defaultPrevented}l$1.event=function(n){return G&&(n=G(n)),n.persist=J,n.isPropagationStopped=K,n.isDefaultPrevented=Q,n.nativeEvent=n};var nn={configurable:!0,get:function(){return this.class}},tn=l$1.vnode;l$1.vnode=function(n){var t=n.type,e=n.props,u=e;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in u={},e){var l=e[i];H&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in e&&null==l||("defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Z(e.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&B.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===l&&(l=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),u[i]&&(i="oninputCapture")),u[i]=l);}"select"==t&&u.multiple&&Array.isArray(u.value)&&(u.value=j$2(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==t&&null!=u.defaultValue&&(u.value=j$2(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),n.props=u,e.class!=e.className&&(nn.enumerable="className"in e,null!=e.className&&(u.class=e.className),Object.defineProperty(u,"className",nn));}n.$$typeof=z,tn&&tn(n);};var en=l$1.__r;l$1.__r=function(n){en&&en(n),n.__c;}; | ||
3035 | |||
3036 | /* | ||
3037 | NOTE: this can be a public API, especially createElement for hooks. | ||
3038 | See examples/typescript-scheduler/src/index.ts | ||
3039 | */ | ||
3040 | function flushSync(runBeforeFlush) { | ||
3041 | runBeforeFlush(); | ||
3042 | let oldDebounceRendering = l$1.debounceRendering; // orig | ||
3043 | let callbackQ = []; | ||
3044 | function execCallbackSync(callback) { | ||
3045 | callbackQ.push(callback); | ||
3046 | } | ||
3047 | l$1.debounceRendering = execCallbackSync; | ||
3048 | D$1(y(FakeComponent, {}), document.createElement('div')); | ||
3049 | while (callbackQ.length) { | ||
3050 | callbackQ.shift()(); | ||
3051 | } | ||
3052 | l$1.debounceRendering = oldDebounceRendering; | ||
3053 | } | ||
3054 | class FakeComponent extends x$1 { | ||
3055 | render() { return y('div', {}); } | ||
3056 | componentDidMount() { this.setState({}); } | ||
3057 | } | ||
3058 | // TODO: use preact/compat instead? | ||
3059 | function createContext(defaultValue) { | ||
3060 | let ContextType = G$1(defaultValue); | ||
3061 | let origProvider = ContextType.Provider; | ||
3062 | ContextType.Provider = function () { | ||
3063 | let isNew = !this.getChildContext; | ||
3064 | let children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params | ||
3065 | if (isNew) { | ||
3066 | let subs = []; | ||
3067 | this.shouldComponentUpdate = (_props) => { | ||
3068 | if (this.props.value !== _props.value) { | ||
3069 | subs.forEach((c) => { | ||
3070 | c.context = _props.value; | ||
3071 | c.forceUpdate(); | ||
3072 | }); | ||
3073 | } | ||
3074 | }; | ||
3075 | this.sub = (c) => { | ||
3076 | subs.push(c); | ||
3077 | let old = c.componentWillUnmount; | ||
3078 | c.componentWillUnmount = () => { | ||
3079 | subs.splice(subs.indexOf(c), 1); | ||
3080 | old && old.call(c); | ||
3081 | }; | ||
3082 | }; | ||
3083 | } | ||
3084 | return children; | ||
3085 | }; | ||
3086 | return ContextType; | ||
3087 | } | ||
3088 | |||
3089 | var preact = { | ||
3090 | __proto__: null, | ||
3091 | flushSync: flushSync, | ||
3092 | createContext: createContext, | ||
3093 | createPortal: j, | ||
3094 | Component: x$1, | ||
3095 | Fragment: _, | ||
3096 | cloneElement: F$1, | ||
3097 | createElement: y, | ||
3098 | createRef: d, | ||
3099 | h: y, | ||
3100 | hydrate: E, | ||
3101 | get isValidElement () { return i$1; }, | ||
3102 | get options () { return l$1; }, | ||
3103 | render: D$1, | ||
3104 | toChildArray: j$2 | ||
3105 | }; | ||
3106 | |||
3107 | class ScrollResponder { | ||
3108 | constructor(execFunc, emitter, scrollTime, scrollTimeReset) { | ||
3109 | this.execFunc = execFunc; | ||
3110 | this.emitter = emitter; | ||
3111 | this.scrollTime = scrollTime; | ||
3112 | this.scrollTimeReset = scrollTimeReset; | ||
3113 | this.handleScrollRequest = (request) => { | ||
3114 | this.queuedRequest = Object.assign({}, this.queuedRequest || {}, request); | ||
3115 | this.drain(); | ||
3116 | }; | ||
3117 | emitter.on('_scrollRequest', this.handleScrollRequest); | ||
3118 | this.fireInitialScroll(); | ||
3119 | } | ||
3120 | detach() { | ||
3121 | this.emitter.off('_scrollRequest', this.handleScrollRequest); | ||
3122 | } | ||
3123 | update(isDatesNew) { | ||
3124 | if (isDatesNew && this.scrollTimeReset) { | ||
3125 | this.fireInitialScroll(); // will drain | ||
3126 | } | ||
3127 | else { | ||
3128 | this.drain(); | ||
3129 | } | ||
3130 | } | ||
3131 | fireInitialScroll() { | ||
3132 | this.handleScrollRequest({ | ||
3133 | time: this.scrollTime, | ||
3134 | }); | ||
3135 | } | ||
3136 | drain() { | ||
3137 | if (this.queuedRequest && this.execFunc(this.queuedRequest)) { | ||
3138 | this.queuedRequest = null; | ||
3139 | } | ||
3140 | } | ||
3141 | } | ||
3142 | |||
3143 | const ViewContextType = createContext({}); // for Components | ||
3144 | function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, nowManager, theme, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, registerInteractiveComponent, unregisterInteractiveComponent) { | ||
3145 | return { | ||
3146 | dateEnv, | ||
3147 | nowManager, | ||
3148 | options: viewOptions, | ||
3149 | pluginHooks, | ||
3150 | emitter, | ||
3151 | dispatch, | ||
3152 | getCurrentData, | ||
3153 | calendarApi, | ||
3154 | viewSpec, | ||
3155 | viewApi, | ||
3156 | dateProfileGenerator, | ||
3157 | theme, | ||
3158 | isRtl: viewOptions.direction === 'rtl', | ||
3159 | addResizeHandler(handler) { | ||
3160 | emitter.on('_resize', handler); | ||
3161 | }, | ||
3162 | removeResizeHandler(handler) { | ||
3163 | emitter.off('_resize', handler); | ||
3164 | }, | ||
3165 | createScrollResponder(execFunc) { | ||
3166 | return new ScrollResponder(execFunc, emitter, createDuration(viewOptions.scrollTime), viewOptions.scrollTimeReset); | ||
3167 | }, | ||
3168 | registerInteractiveComponent, | ||
3169 | unregisterInteractiveComponent, | ||
3170 | }; | ||
3171 | } | ||
3172 | |||
3173 | /* eslint max-classes-per-file: off */ | ||
3174 | class PureComponent extends x$1 { | ||
3175 | shouldComponentUpdate(nextProps, nextState) { | ||
3176 | if (this.debug) { | ||
3177 | // eslint-disable-next-line no-console | ||
3178 | console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state)); | ||
3179 | } | ||
3180 | return !compareObjs(this.props, nextProps, this.propEquality) || | ||
3181 | !compareObjs(this.state, nextState, this.stateEquality); | ||
3182 | } | ||
3183 | // HACK for freakin' React StrictMode | ||
3184 | safeSetState(newState) { | ||
3185 | if (!compareObjs(this.state, Object.assign(Object.assign({}, this.state), newState), this.stateEquality)) { | ||
3186 | this.setState(newState); | ||
3187 | } | ||
3188 | } | ||
3189 | } | ||
3190 | PureComponent.addPropsEquality = addPropsEquality; | ||
3191 | PureComponent.addStateEquality = addStateEquality; | ||
3192 | PureComponent.contextType = ViewContextType; | ||
3193 | PureComponent.prototype.propEquality = {}; | ||
3194 | PureComponent.prototype.stateEquality = {}; | ||
3195 | class BaseComponent extends PureComponent { | ||
3196 | } | ||
3197 | BaseComponent.contextType = ViewContextType; | ||
3198 | function addPropsEquality(propEquality) { | ||
3199 | let hash = Object.create(this.prototype.propEquality); | ||
3200 | Object.assign(hash, propEquality); | ||
3201 | this.prototype.propEquality = hash; | ||
3202 | } | ||
3203 | function addStateEquality(stateEquality) { | ||
3204 | let hash = Object.create(this.prototype.stateEquality); | ||
3205 | Object.assign(hash, stateEquality); | ||
3206 | this.prototype.stateEquality = hash; | ||
3207 | } | ||
3208 | // use other one | ||
3209 | function setRef(ref, current) { | ||
3210 | if (typeof ref === 'function') { | ||
3211 | ref(current); | ||
3212 | } | ||
3213 | else if (ref) { | ||
3214 | // see https://github.com/facebook/react/issues/13029 | ||
3215 | ref.current = current; | ||
3216 | } | ||
3217 | } | ||
3218 | |||
3219 | /* | ||
3220 | an INTERACTABLE date component | ||
3221 | |||
3222 | PURPOSES: | ||
3223 | - hook up to fg, fill, and mirror renderers | ||
3224 | - interface for dragging and hits | ||
3225 | */ | ||
3226 | class DateComponent extends BaseComponent { | ||
3227 | constructor() { | ||
3228 | super(...arguments); | ||
3229 | this.uid = guid(); | ||
3230 | } | ||
3231 | // Hit System | ||
3232 | // ----------------------------------------------------------------------------------------------------------------- | ||
3233 | prepareHits() { | ||
3234 | } | ||
3235 | queryHit(positionLeft, positionTop, elWidth, elHeight) { | ||
3236 | return null; // this should be abstract | ||
3237 | } | ||
3238 | // Pointer Interaction Utils | ||
3239 | // ----------------------------------------------------------------------------------------------------------------- | ||
3240 | isValidSegDownEl(el) { | ||
3241 | return !this.props.eventDrag && // HACK | ||
3242 | !this.props.eventResize && // HACK | ||
3243 | !elementClosest(el, '.fc-event-mirror'); | ||
3244 | } | ||
3245 | isValidDateDownEl(el) { | ||
3246 | return !elementClosest(el, '.fc-event:not(.fc-bg-event)') && | ||
3247 | !elementClosest(el, '.fc-more-link') && // a "more.." link | ||
3248 | !elementClosest(el, 'a[data-navlink]') && // a clickable nav link | ||
3249 | !elementClosest(el, '.fc-popover'); // hack | ||
3250 | } | ||
3251 | } | ||
3252 | |||
3253 | class DateProfileGenerator { | ||
3254 | constructor(props) { | ||
3255 | this.props = props; | ||
3256 | this.initHiddenDays(); | ||
3257 | } | ||
3258 | /* Date Range Computation | ||
3259 | ------------------------------------------------------------------------------------------------------------------*/ | ||
3260 | // Builds a structure with info about what the dates/ranges will be for the "prev" view. | ||
3261 | buildPrev(currentDateProfile, currentDate, forceToValid) { | ||
3262 | let { dateEnv } = this.props; | ||
3263 | let prevDate = dateEnv.subtract(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month | ||
3264 | currentDateProfile.dateIncrement); | ||
3265 | return this.build(prevDate, -1, forceToValid); | ||
3266 | } | ||
3267 | // Builds a structure with info about what the dates/ranges will be for the "next" view. | ||
3268 | buildNext(currentDateProfile, currentDate, forceToValid) { | ||
3269 | let { dateEnv } = this.props; | ||
3270 | let nextDate = dateEnv.add(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month | ||
3271 | currentDateProfile.dateIncrement); | ||
3272 | return this.build(nextDate, 1, forceToValid); | ||
3273 | } | ||
3274 | // Builds a structure holding dates/ranges for rendering around the given date. | ||
3275 | // Optional direction param indicates whether the date is being incremented/decremented | ||
3276 | // from its previous value. decremented = -1, incremented = 1 (default). | ||
3277 | build(currentDate, direction, forceToValid = true) { | ||
3278 | let { props } = this; | ||
3279 | let validRange; | ||
3280 | let currentInfo; | ||
3281 | let isRangeAllDay; | ||
3282 | let renderRange; | ||
3283 | let activeRange; | ||
3284 | let isValid; | ||
3285 | validRange = this.buildValidRange(); | ||
3286 | validRange = this.trimHiddenDays(validRange); | ||
3287 | if (forceToValid) { | ||
3288 | currentDate = constrainMarkerToRange(currentDate, validRange); | ||
3289 | } | ||
3290 | currentInfo = this.buildCurrentRangeInfo(currentDate, direction); | ||
3291 | isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit); | ||
3292 | renderRange = this.buildRenderRange(this.trimHiddenDays(currentInfo.range), currentInfo.unit, isRangeAllDay); | ||
3293 | renderRange = this.trimHiddenDays(renderRange); | ||
3294 | activeRange = renderRange; | ||
3295 | if (!props.showNonCurrentDates) { | ||
3296 | activeRange = intersectRanges(activeRange, currentInfo.range); | ||
3297 | } | ||
3298 | activeRange = this.adjustActiveRange(activeRange); | ||
3299 | activeRange = intersectRanges(activeRange, validRange); // might return null | ||
3300 | // it's invalid if the originally requested date is not contained, | ||
3301 | // or if the range is completely outside of the valid range. | ||
3302 | isValid = rangesIntersect(currentInfo.range, validRange); | ||
3303 | // HACK: constrain to render-range so `currentDate` is more useful to view rendering | ||
3304 | if (!rangeContainsMarker(renderRange, currentDate)) { | ||
3305 | currentDate = renderRange.start; | ||
3306 | } | ||
3307 | return { | ||
3308 | currentDate, | ||
3309 | // constraint for where prev/next operations can go and where events can be dragged/resized to. | ||
3310 | // an object with optional start and end properties. | ||
3311 | validRange, | ||
3312 | // range the view is formally responsible for. | ||
3313 | // for example, a month view might have 1st-31st, excluding padded dates | ||
3314 | currentRange: currentInfo.range, | ||
3315 | // name of largest unit being displayed, like "month" or "week" | ||
3316 | currentRangeUnit: currentInfo.unit, | ||
3317 | isRangeAllDay, | ||
3318 | // dates that display events and accept drag-n-drop | ||
3319 | // will be `null` if no dates accept events | ||
3320 | activeRange, | ||
3321 | // date range with a rendered skeleton | ||
3322 | // includes not-active days that need some sort of DOM | ||
3323 | renderRange, | ||
3324 | // Duration object that denotes the first visible time of any given day | ||
3325 | slotMinTime: props.slotMinTime, | ||
3326 | // Duration object that denotes the exclusive visible end time of any given day | ||
3327 | slotMaxTime: props.slotMaxTime, | ||
3328 | isValid, | ||
3329 | // how far the current date will move for a prev/next operation | ||
3330 | dateIncrement: this.buildDateIncrement(currentInfo.duration), | ||
3331 | // pass a fallback (might be null) ^ | ||
3332 | }; | ||
3333 | } | ||
3334 | // Builds an object with optional start/end properties. | ||
3335 | // Indicates the minimum/maximum dates to display. | ||
3336 | // not responsible for trimming hidden days. | ||
3337 | buildValidRange() { | ||
3338 | let input = this.props.validRangeInput; | ||
3339 | let simpleInput = typeof input === 'function' | ||
3340 | ? input.call(this.props.calendarApi, this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())) | ||
3341 | : input; | ||
3342 | return this.refineRange(simpleInput) || | ||
3343 | { start: null, end: null }; // completely open-ended | ||
3344 | } | ||
3345 | // Builds a structure with info about the "current" range, the range that is | ||
3346 | // highlighted as being the current month for example. | ||
3347 | // See build() for a description of `direction`. | ||
3348 | // Guaranteed to have `range` and `unit` properties. `duration` is optional. | ||
3349 | buildCurrentRangeInfo(date, direction) { | ||
3350 | let { props } = this; | ||
3351 | let duration = null; | ||
3352 | let unit = null; | ||
3353 | let range = null; | ||
3354 | let dayCount; | ||
3355 | if (props.duration) { | ||
3356 | duration = props.duration; | ||
3357 | unit = props.durationUnit; | ||
3358 | range = this.buildRangeFromDuration(date, direction, duration, unit); | ||
3359 | } | ||
3360 | else if ((dayCount = this.props.dayCount)) { | ||
3361 | unit = 'day'; | ||
3362 | range = this.buildRangeFromDayCount(date, direction, dayCount); | ||
3363 | } | ||
3364 | else if ((range = this.buildCustomVisibleRange(date))) { | ||
3365 | unit = props.dateEnv.greatestWholeUnit(range.start, range.end).unit; | ||
3366 | } | ||
3367 | else { | ||
3368 | duration = this.getFallbackDuration(); | ||
3369 | unit = greatestDurationDenominator(duration).unit; | ||
3370 | range = this.buildRangeFromDuration(date, direction, duration, unit); | ||
3371 | } | ||
3372 | return { duration, unit, range }; | ||
3373 | } | ||
3374 | getFallbackDuration() { | ||
3375 | return createDuration({ day: 1 }); | ||
3376 | } | ||
3377 | // Returns a new activeRange to have time values (un-ambiguate) | ||
3378 | // slotMinTime or slotMaxTime causes the range to expand. | ||
3379 | adjustActiveRange(range) { | ||
3380 | let { dateEnv, usesMinMaxTime, slotMinTime, slotMaxTime } = this.props; | ||
3381 | let { start, end } = range; | ||
3382 | if (usesMinMaxTime) { | ||
3383 | // expand active range if slotMinTime is negative (why not when positive?) | ||
3384 | if (asRoughDays(slotMinTime) < 0) { | ||
3385 | start = startOfDay(start); // necessary? | ||
3386 | start = dateEnv.add(start, slotMinTime); | ||
3387 | } | ||
3388 | // expand active range if slotMaxTime is beyond one day (why not when negative?) | ||
3389 | if (asRoughDays(slotMaxTime) > 1) { | ||
3390 | end = startOfDay(end); // necessary? | ||
3391 | end = addDays(end, -1); | ||
3392 | end = dateEnv.add(end, slotMaxTime); | ||
3393 | } | ||
3394 | } | ||
3395 | return { start, end }; | ||
3396 | } | ||
3397 | // Builds the "current" range when it is specified as an explicit duration. | ||
3398 | // `unit` is the already-computed greatestDurationDenominator unit of duration. | ||
3399 | buildRangeFromDuration(date, direction, duration, unit) { | ||
3400 | let { dateEnv, dateAlignment } = this.props; | ||
3401 | let start; | ||
3402 | let end; | ||
3403 | let res; | ||
3404 | // compute what the alignment should be | ||
3405 | if (!dateAlignment) { | ||
3406 | let { dateIncrement } = this.props; | ||
3407 | if (dateIncrement) { | ||
3408 | // use the smaller of the two units | ||
3409 | if (asRoughMs(dateIncrement) < asRoughMs(duration)) { | ||
3410 | dateAlignment = greatestDurationDenominator(dateIncrement).unit; | ||
3411 | } | ||
3412 | else { | ||
3413 | dateAlignment = unit; | ||
3414 | } | ||
3415 | } | ||
3416 | else { | ||
3417 | dateAlignment = unit; | ||
3418 | } | ||
3419 | } | ||
3420 | // if the view displays a single day or smaller | ||
3421 | if (asRoughDays(duration) <= 1) { | ||
3422 | if (this.isHiddenDay(start)) { | ||
3423 | start = this.skipHiddenDays(start, direction); | ||
3424 | start = startOfDay(start); | ||
3425 | } | ||
3426 | } | ||
3427 | function computeRes() { | ||
3428 | start = dateEnv.startOf(date, dateAlignment); | ||
3429 | end = dateEnv.add(start, duration); | ||
3430 | res = { start, end }; | ||
3431 | } | ||
3432 | computeRes(); | ||
3433 | // if range is completely enveloped by hidden days, go past the hidden days | ||
3434 | if (!this.trimHiddenDays(res)) { | ||
3435 | date = this.skipHiddenDays(date, direction); | ||
3436 | computeRes(); | ||
3437 | } | ||
3438 | return res; | ||
3439 | } | ||
3440 | // Builds the "current" range when a dayCount is specified. | ||
3441 | buildRangeFromDayCount(date, direction, dayCount) { | ||
3442 | let { dateEnv, dateAlignment } = this.props; | ||
3443 | let runningCount = 0; | ||
3444 | let start = date; | ||
3445 | let end; | ||
3446 | if (dateAlignment) { | ||
3447 | start = dateEnv.startOf(start, dateAlignment); | ||
3448 | } | ||
3449 | start = startOfDay(start); | ||
3450 | start = this.skipHiddenDays(start, direction); | ||
3451 | end = start; | ||
3452 | do { | ||
3453 | end = addDays(end, 1); | ||
3454 | if (!this.isHiddenDay(end)) { | ||
3455 | runningCount += 1; | ||
3456 | } | ||
3457 | } while (runningCount < dayCount); | ||
3458 | return { start, end }; | ||
3459 | } | ||
3460 | // Builds a normalized range object for the "visible" range, | ||
3461 | // which is a way to define the currentRange and activeRange at the same time. | ||
3462 | buildCustomVisibleRange(date) { | ||
3463 | let { props } = this; | ||
3464 | let input = props.visibleRangeInput; | ||
3465 | let simpleInput = typeof input === 'function' | ||
3466 | ? input.call(props.calendarApi, props.dateEnv.toDate(date)) | ||
3467 | : input; | ||
3468 | let range = this.refineRange(simpleInput); | ||
3469 | if (range && (range.start == null || range.end == null)) { | ||
3470 | return null; | ||
3471 | } | ||
3472 | return range; | ||
3473 | } | ||
3474 | // Computes the range that will represent the element/cells for *rendering*, | ||
3475 | // but which may have voided days/times. | ||
3476 | // not responsible for trimming hidden days. | ||
3477 | buildRenderRange(currentRange, currentRangeUnit, isRangeAllDay) { | ||
3478 | return currentRange; | ||
3479 | } | ||
3480 | // Compute the duration value that should be added/substracted to the current date | ||
3481 | // when a prev/next operation happens. | ||
3482 | buildDateIncrement(fallback) { | ||
3483 | let { dateIncrement } = this.props; | ||
3484 | let customAlignment; | ||
3485 | if (dateIncrement) { | ||
3486 | return dateIncrement; | ||
3487 | } | ||
3488 | if ((customAlignment = this.props.dateAlignment)) { | ||
3489 | return createDuration(1, customAlignment); | ||
3490 | } | ||
3491 | if (fallback) { | ||
3492 | return fallback; | ||
3493 | } | ||
3494 | return createDuration({ days: 1 }); | ||
3495 | } | ||
3496 | refineRange(rangeInput) { | ||
3497 | if (rangeInput) { | ||
3498 | let range = parseRange(rangeInput, this.props.dateEnv); | ||
3499 | if (range) { | ||
3500 | range = computeVisibleDayRange(range); | ||
3501 | } | ||
3502 | return range; | ||
3503 | } | ||
3504 | return null; | ||
3505 | } | ||
3506 | /* Hidden Days | ||
3507 | ------------------------------------------------------------------------------------------------------------------*/ | ||
3508 | // Initializes internal variables related to calculating hidden days-of-week | ||
3509 | initHiddenDays() { | ||
3510 | let hiddenDays = this.props.hiddenDays || []; // array of day-of-week indices that are hidden | ||
3511 | let isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool) | ||
3512 | let dayCnt = 0; | ||
3513 | let i; | ||
3514 | if (this.props.weekends === false) { | ||
3515 | hiddenDays.push(0, 6); // 0=sunday, 6=saturday | ||
3516 | } | ||
3517 | for (i = 0; i < 7; i += 1) { | ||
3518 | if (!(isHiddenDayHash[i] = hiddenDays.indexOf(i) !== -1)) { | ||
3519 | dayCnt += 1; | ||
3520 | } | ||
3521 | } | ||
3522 | if (!dayCnt) { | ||
3523 | throw new Error('invalid hiddenDays'); // all days were hidden? bad. | ||
3524 | } | ||
3525 | this.isHiddenDayHash = isHiddenDayHash; | ||
3526 | } | ||
3527 | // Remove days from the beginning and end of the range that are computed as hidden. | ||
3528 | // If the whole range is trimmed off, returns null | ||
3529 | trimHiddenDays(range) { | ||
3530 | let { start, end } = range; | ||
3531 | if (start) { | ||
3532 | start = this.skipHiddenDays(start); | ||
3533 | } | ||
3534 | if (end) { | ||
3535 | end = this.skipHiddenDays(end, -1, true); | ||
3536 | } | ||
3537 | if (start == null || end == null || start < end) { | ||
3538 | return { start, end }; | ||
3539 | } | ||
3540 | return null; | ||
3541 | } | ||
3542 | // Is the current day hidden? | ||
3543 | // `day` is a day-of-week index (0-6), or a Date (used for UTC) | ||
3544 | isHiddenDay(day) { | ||
3545 | if (day instanceof Date) { | ||
3546 | day = day.getUTCDay(); | ||
3547 | } | ||
3548 | return this.isHiddenDayHash[day]; | ||
3549 | } | ||
3550 | // Incrementing the current day until it is no longer a hidden day, returning a copy. | ||
3551 | // DOES NOT CONSIDER validRange! | ||
3552 | // If the initial value of `date` is not a hidden day, don't do anything. | ||
3553 | // Pass `isExclusive` as `true` if you are dealing with an end date. | ||
3554 | // `inc` defaults to `1` (increment one day forward each time) | ||
3555 | skipHiddenDays(date, inc = 1, isExclusive = false) { | ||
3556 | while (this.isHiddenDayHash[(date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7]) { | ||
3557 | date = addDays(date, inc); | ||
3558 | } | ||
3559 | return date; | ||
3560 | } | ||
3561 | } | ||
3562 | |||
3563 | function triggerDateSelect(selection, pev, context) { | ||
3564 | context.emitter.trigger('select', Object.assign(Object.assign({}, buildDateSpanApiWithContext(selection, context)), { jsEvent: pev ? pev.origEvent : null, view: context.viewApi || context.calendarApi.view })); | ||
3565 | } | ||
3566 | function triggerDateUnselect(pev, context) { | ||
3567 | context.emitter.trigger('unselect', { | ||
3568 | jsEvent: pev ? pev.origEvent : null, | ||
3569 | view: context.viewApi || context.calendarApi.view, | ||
3570 | }); | ||
3571 | } | ||
3572 | function buildDateSpanApiWithContext(dateSpan, context) { | ||
3573 | let props = {}; | ||
3574 | for (let transform of context.pluginHooks.dateSpanTransforms) { | ||
3575 | Object.assign(props, transform(dateSpan, context)); | ||
3576 | } | ||
3577 | Object.assign(props, buildDateSpanApi(dateSpan, context.dateEnv)); | ||
3578 | return props; | ||
3579 | } | ||
3580 | // Given an event's allDay status and start date, return what its fallback end date should be. | ||
3581 | // TODO: rename to computeDefaultEventEnd | ||
3582 | function getDefaultEventEnd(allDay, marker, context) { | ||
3583 | let { dateEnv, options } = context; | ||
3584 | let end = marker; | ||
3585 | if (allDay) { | ||
3586 | end = startOfDay(end); | ||
3587 | end = dateEnv.add(end, options.defaultAllDayEventDuration); | ||
3588 | } | ||
3589 | else { | ||
3590 | end = dateEnv.add(end, options.defaultTimedEventDuration); | ||
3591 | } | ||
3592 | return end; | ||
3593 | } | ||
3594 | |||
3595 | // applies the mutation to ALL defs/instances within the event store | ||
3596 | function applyMutationToEventStore(eventStore, eventConfigBase, mutation, context) { | ||
3597 | let eventConfigs = compileEventUis(eventStore.defs, eventConfigBase); | ||
3598 | let dest = createEmptyEventStore(); | ||
3599 | for (let defId in eventStore.defs) { | ||
3600 | let def = eventStore.defs[defId]; | ||
3601 | dest.defs[defId] = applyMutationToEventDef(def, eventConfigs[defId], mutation, context); | ||
3602 | } | ||
3603 | for (let instanceId in eventStore.instances) { | ||
3604 | let instance = eventStore.instances[instanceId]; | ||
3605 | let def = dest.defs[instance.defId]; // important to grab the newly modified def | ||
3606 | dest.instances[instanceId] = applyMutationToEventInstance(instance, def, eventConfigs[instance.defId], mutation, context); | ||
3607 | } | ||
3608 | return dest; | ||
3609 | } | ||
3610 | function applyMutationToEventDef(eventDef, eventConfig, mutation, context) { | ||
3611 | let standardProps = mutation.standardProps || {}; | ||
3612 | // if hasEnd has not been specified, guess a good value based on deltas. | ||
3613 | // if duration will change, there's no way the default duration will persist, | ||
3614 | // and thus, we need to mark the event as having a real end | ||
3615 | if (standardProps.hasEnd == null && | ||
3616 | eventConfig.durationEditable && | ||
3617 | (mutation.startDelta || mutation.endDelta)) { | ||
3618 | standardProps.hasEnd = true; // TODO: is this mutation okay? | ||
3619 | } | ||
3620 | let copy = Object.assign(Object.assign(Object.assign({}, eventDef), standardProps), { ui: Object.assign(Object.assign({}, eventDef.ui), standardProps.ui) }); | ||
3621 | if (mutation.extendedProps) { | ||
3622 | copy.extendedProps = Object.assign(Object.assign({}, copy.extendedProps), mutation.extendedProps); | ||
3623 | } | ||
3624 | for (let applier of context.pluginHooks.eventDefMutationAppliers) { | ||
3625 | applier(copy, mutation, context); | ||
3626 | } | ||
3627 | if (!copy.hasEnd && context.options.forceEventDuration) { | ||
3628 | copy.hasEnd = true; | ||
3629 | } | ||
3630 | return copy; | ||
3631 | } | ||
3632 | function applyMutationToEventInstance(eventInstance, eventDef, // must first be modified by applyMutationToEventDef | ||
3633 | eventConfig, mutation, context) { | ||
3634 | let { dateEnv } = context; | ||
3635 | let forceAllDay = mutation.standardProps && mutation.standardProps.allDay === true; | ||
3636 | let clearEnd = mutation.standardProps && mutation.standardProps.hasEnd === false; | ||
3637 | let copy = Object.assign({}, eventInstance); | ||
3638 | if (forceAllDay) { | ||
3639 | copy.range = computeAlignedDayRange(copy.range); | ||
3640 | } | ||
3641 | if (mutation.datesDelta && eventConfig.startEditable) { | ||
3642 | copy.range = { | ||
3643 | start: dateEnv.add(copy.range.start, mutation.datesDelta), | ||
3644 | end: dateEnv.add(copy.range.end, mutation.datesDelta), | ||
3645 | }; | ||
3646 | } | ||
3647 | if (mutation.startDelta && eventConfig.durationEditable) { | ||
3648 | copy.range = { | ||
3649 | start: dateEnv.add(copy.range.start, mutation.startDelta), | ||
3650 | end: copy.range.end, | ||
3651 | }; | ||
3652 | } | ||
3653 | if (mutation.endDelta && eventConfig.durationEditable) { | ||
3654 | copy.range = { | ||
3655 | start: copy.range.start, | ||
3656 | end: dateEnv.add(copy.range.end, mutation.endDelta), | ||
3657 | }; | ||
3658 | } | ||
3659 | if (clearEnd) { | ||
3660 | copy.range = { | ||
3661 | start: copy.range.start, | ||
3662 | end: getDefaultEventEnd(eventDef.allDay, copy.range.start, context), | ||
3663 | }; | ||
3664 | } | ||
3665 | // in case event was all-day but the supplied deltas were not | ||
3666 | // better util for this? | ||
3667 | if (eventDef.allDay) { | ||
3668 | copy.range = { | ||
3669 | start: startOfDay(copy.range.start), | ||
3670 | end: startOfDay(copy.range.end), | ||
3671 | }; | ||
3672 | } | ||
3673 | // handle invalid durations | ||
3674 | if (copy.range.end < copy.range.start) { | ||
3675 | copy.range.end = getDefaultEventEnd(eventDef.allDay, copy.range.start, context); | ||
3676 | } | ||
3677 | return copy; | ||
3678 | } | ||
3679 | |||
3680 | class EventSourceImpl { | ||
3681 | constructor(context, internalEventSource) { | ||
3682 | this.context = context; | ||
3683 | this.internalEventSource = internalEventSource; | ||
3684 | } | ||
3685 | remove() { | ||
3686 | this.context.dispatch({ | ||
3687 | type: 'REMOVE_EVENT_SOURCE', | ||
3688 | sourceId: this.internalEventSource.sourceId, | ||
3689 | }); | ||
3690 | } | ||
3691 | refetch() { | ||
3692 | this.context.dispatch({ | ||
3693 | type: 'FETCH_EVENT_SOURCES', | ||
3694 | sourceIds: [this.internalEventSource.sourceId], | ||
3695 | isRefetch: true, | ||
3696 | }); | ||
3697 | } | ||
3698 | get id() { | ||
3699 | return this.internalEventSource.publicId; | ||
3700 | } | ||
3701 | get url() { | ||
3702 | return this.internalEventSource.meta.url; | ||
3703 | } | ||
3704 | get format() { | ||
3705 | return this.internalEventSource.meta.format; // TODO: bad. not guaranteed | ||
3706 | } | ||
3707 | } | ||
3708 | |||
3709 | class EventImpl { | ||
3710 | // instance will be null if expressing a recurring event that has no current instances, | ||
3711 | // OR if trying to validate an incoming external event that has no dates assigned | ||
3712 | constructor(context, def, instance) { | ||
3713 | this._context = context; | ||
3714 | this._def = def; | ||
3715 | this._instance = instance || null; | ||
3716 | } | ||
3717 | /* | ||
3718 | TODO: make event struct more responsible for this | ||
3719 | */ | ||
3720 | setProp(name, val) { | ||
3721 | if (name in EVENT_DATE_REFINERS) { | ||
3722 | console.warn('Could not set date-related prop \'name\'. Use one of the date-related methods instead.'); | ||
3723 | // TODO: make proper aliasing system? | ||
3724 | } | ||
3725 | else if (name === 'id') { | ||
3726 | val = EVENT_NON_DATE_REFINERS[name](val); | ||
3727 | this.mutate({ | ||
3728 | standardProps: { publicId: val }, // hardcoded internal name | ||
3729 | }); | ||
3730 | } | ||
3731 | else if (name in EVENT_NON_DATE_REFINERS) { | ||
3732 | val = EVENT_NON_DATE_REFINERS[name](val); | ||
3733 | this.mutate({ | ||
3734 | standardProps: { [name]: val }, | ||
3735 | }); | ||
3736 | } | ||
3737 | else if (name in EVENT_UI_REFINERS) { | ||
3738 | let ui = EVENT_UI_REFINERS[name](val); | ||
3739 | if (name === 'color') { | ||
3740 | ui = { backgroundColor: val, borderColor: val }; | ||
3741 | } | ||
3742 | else if (name === 'editable') { | ||
3743 | ui = { startEditable: val, durationEditable: val }; | ||
3744 | } | ||
3745 | else { | ||
3746 | ui = { [name]: val }; | ||
3747 | } | ||
3748 | this.mutate({ | ||
3749 | standardProps: { ui }, | ||
3750 | }); | ||
3751 | } | ||
3752 | else { | ||
3753 | console.warn(`Could not set prop '${name}'. Use setExtendedProp instead.`); | ||
3754 | } | ||
3755 | } | ||
3756 | setExtendedProp(name, val) { | ||
3757 | this.mutate({ | ||
3758 | extendedProps: { [name]: val }, | ||
3759 | }); | ||
3760 | } | ||
3761 | setStart(startInput, options = {}) { | ||
3762 | let { dateEnv } = this._context; | ||
3763 | let start = dateEnv.createMarker(startInput); | ||
3764 | if (start && this._instance) { // TODO: warning if parsed bad | ||
3765 | let instanceRange = this._instance.range; | ||
3766 | let startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity); // what if parsed bad!? | ||
3767 | if (options.maintainDuration) { | ||
3768 | this.mutate({ datesDelta: startDelta }); | ||
3769 | } | ||
3770 | else { | ||
3771 | this.mutate({ startDelta }); | ||
3772 | } | ||
3773 | } | ||
3774 | } | ||
3775 | setEnd(endInput, options = {}) { | ||
3776 | let { dateEnv } = this._context; | ||
3777 | let end; | ||
3778 | if (endInput != null) { | ||
3779 | end = dateEnv.createMarker(endInput); | ||
3780 | if (!end) { | ||
3781 | return; // TODO: warning if parsed bad | ||
3782 | } | ||
3783 | } | ||
3784 | if (this._instance) { | ||
3785 | if (end) { | ||
3786 | let endDelta = diffDates(this._instance.range.end, end, dateEnv, options.granularity); | ||
3787 | this.mutate({ endDelta }); | ||
3788 | } | ||
3789 | else { | ||
3790 | this.mutate({ standardProps: { hasEnd: false } }); | ||
3791 | } | ||
3792 | } | ||
3793 | } | ||
3794 | setDates(startInput, endInput, options = {}) { | ||
3795 | let { dateEnv } = this._context; | ||
3796 | let standardProps = { allDay: options.allDay }; | ||
3797 | let start = dateEnv.createMarker(startInput); | ||
3798 | let end; | ||
3799 | if (!start) { | ||
3800 | return; // TODO: warning if parsed bad | ||
3801 | } | ||
3802 | if (endInput != null) { | ||
3803 | end = dateEnv.createMarker(endInput); | ||
3804 | if (!end) { // TODO: warning if parsed bad | ||
3805 | return; | ||
3806 | } | ||
3807 | } | ||
3808 | if (this._instance) { | ||
3809 | let instanceRange = this._instance.range; | ||
3810 | // when computing the diff for an event being converted to all-day, | ||
3811 | // compute diff off of the all-day values the way event-mutation does. | ||
3812 | if (options.allDay === true) { | ||
3813 | instanceRange = computeAlignedDayRange(instanceRange); | ||
3814 | } | ||
3815 | let startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity); | ||
3816 | if (end) { | ||
3817 | let endDelta = diffDates(instanceRange.end, end, dateEnv, options.granularity); | ||
3818 | if (durationsEqual(startDelta, endDelta)) { | ||
3819 | this.mutate({ datesDelta: startDelta, standardProps }); | ||
3820 | } | ||
3821 | else { | ||
3822 | this.mutate({ startDelta, endDelta, standardProps }); | ||
3823 | } | ||
3824 | } | ||
3825 | else { // means "clear the end" | ||
3826 | standardProps.hasEnd = false; | ||
3827 | this.mutate({ datesDelta: startDelta, standardProps }); | ||
3828 | } | ||
3829 | } | ||
3830 | } | ||
3831 | moveStart(deltaInput) { | ||
3832 | let delta = createDuration(deltaInput); | ||
3833 | if (delta) { // TODO: warning if parsed bad | ||
3834 | this.mutate({ startDelta: delta }); | ||
3835 | } | ||
3836 | } | ||
3837 | moveEnd(deltaInput) { | ||
3838 | let delta = createDuration(deltaInput); | ||
3839 | if (delta) { // TODO: warning if parsed bad | ||
3840 | this.mutate({ endDelta: delta }); | ||
3841 | } | ||
3842 | } | ||
3843 | moveDates(deltaInput) { | ||
3844 | let delta = createDuration(deltaInput); | ||
3845 | if (delta) { // TODO: warning if parsed bad | ||
3846 | this.mutate({ datesDelta: delta }); | ||
3847 | } | ||
3848 | } | ||
3849 | setAllDay(allDay, options = {}) { | ||
3850 | let standardProps = { allDay }; | ||
3851 | let { maintainDuration } = options; | ||
3852 | if (maintainDuration == null) { | ||
3853 | maintainDuration = this._context.options.allDayMaintainDuration; | ||
3854 | } | ||
3855 | if (this._def.allDay !== allDay) { | ||
3856 | standardProps.hasEnd = maintainDuration; | ||
3857 | } | ||
3858 | this.mutate({ standardProps }); | ||
3859 | } | ||
3860 | formatRange(formatInput) { | ||
3861 | let { dateEnv } = this._context; | ||
3862 | let instance = this._instance; | ||
3863 | let formatter = createFormatter(formatInput); | ||
3864 | if (this._def.hasEnd) { | ||
3865 | return dateEnv.formatRange(instance.range.start, instance.range.end, formatter, { | ||
3866 | forcedStartTzo: instance.forcedStartTzo, | ||
3867 | forcedEndTzo: instance.forcedEndTzo, | ||
3868 | }); | ||
3869 | } | ||
3870 | return dateEnv.format(instance.range.start, formatter, { | ||
3871 | forcedTzo: instance.forcedStartTzo, | ||
3872 | }); | ||
3873 | } | ||
3874 | mutate(mutation) { | ||
3875 | let instance = this._instance; | ||
3876 | if (instance) { | ||
3877 | let def = this._def; | ||
3878 | let context = this._context; | ||
3879 | let { eventStore } = context.getCurrentData(); | ||
3880 | let relevantEvents = getRelevantEvents(eventStore, instance.instanceId); | ||
3881 | let eventConfigBase = { | ||
3882 | '': { | ||
3883 | display: '', | ||
3884 | startEditable: true, | ||
3885 | durationEditable: true, | ||
3886 | constraints: [], | ||
3887 | overlap: null, | ||
3888 | allows: [], | ||
3889 | backgroundColor: '', | ||
3890 | borderColor: '', | ||
3891 | textColor: '', | ||
3892 | classNames: [], | ||
3893 | }, | ||
3894 | }; | ||
3895 | relevantEvents = applyMutationToEventStore(relevantEvents, eventConfigBase, mutation, context); | ||
3896 | let oldEvent = new EventImpl(context, def, instance); // snapshot | ||
3897 | this._def = relevantEvents.defs[def.defId]; | ||
3898 | this._instance = relevantEvents.instances[instance.instanceId]; | ||
3899 | context.dispatch({ | ||
3900 | type: 'MERGE_EVENTS', | ||
3901 | eventStore: relevantEvents, | ||
3902 | }); | ||
3903 | context.emitter.trigger('eventChange', { | ||
3904 | oldEvent, | ||
3905 | event: this, | ||
3906 | relatedEvents: buildEventApis(relevantEvents, context, instance), | ||
3907 | revert() { | ||
3908 | context.dispatch({ | ||
3909 | type: 'RESET_EVENTS', | ||
3910 | eventStore, // the ORIGINAL store | ||
3911 | }); | ||
3912 | }, | ||
3913 | }); | ||
3914 | } | ||
3915 | } | ||
3916 | remove() { | ||
3917 | let context = this._context; | ||
3918 | let asStore = eventApiToStore(this); | ||
3919 | context.dispatch({ | ||
3920 | type: 'REMOVE_EVENTS', | ||
3921 | eventStore: asStore, | ||
3922 | }); | ||
3923 | context.emitter.trigger('eventRemove', { | ||
3924 | event: this, | ||
3925 | relatedEvents: [], | ||
3926 | revert() { | ||
3927 | context.dispatch({ | ||
3928 | type: 'MERGE_EVENTS', | ||
3929 | eventStore: asStore, | ||
3930 | }); | ||
3931 | }, | ||
3932 | }); | ||
3933 | } | ||
3934 | get source() { | ||
3935 | let { sourceId } = this._def; | ||
3936 | if (sourceId) { | ||
3937 | return new EventSourceImpl(this._context, this._context.getCurrentData().eventSources[sourceId]); | ||
3938 | } | ||
3939 | return null; | ||
3940 | } | ||
3941 | get start() { | ||
3942 | return this._instance ? | ||
3943 | this._context.dateEnv.toDate(this._instance.range.start) : | ||
3944 | null; | ||
3945 | } | ||
3946 | get end() { | ||
3947 | return (this._instance && this._def.hasEnd) ? | ||
3948 | this._context.dateEnv.toDate(this._instance.range.end) : | ||
3949 | null; | ||
3950 | } | ||
3951 | get startStr() { | ||
3952 | let instance = this._instance; | ||
3953 | if (instance) { | ||
3954 | return this._context.dateEnv.formatIso(instance.range.start, { | ||
3955 | omitTime: this._def.allDay, | ||
3956 | forcedTzo: instance.forcedStartTzo, | ||
3957 | }); | ||
3958 | } | ||
3959 | return ''; | ||
3960 | } | ||
3961 | get endStr() { | ||
3962 | let instance = this._instance; | ||
3963 | if (instance && this._def.hasEnd) { | ||
3964 | return this._context.dateEnv.formatIso(instance.range.end, { | ||
3965 | omitTime: this._def.allDay, | ||
3966 | forcedTzo: instance.forcedEndTzo, | ||
3967 | }); | ||
3968 | } | ||
3969 | return ''; | ||
3970 | } | ||
3971 | // computable props that all access the def | ||
3972 | // TODO: find a TypeScript-compatible way to do this at scale | ||
3973 | get id() { return this._def.publicId; } | ||
3974 | get groupId() { return this._def.groupId; } | ||
3975 | get allDay() { return this._def.allDay; } | ||
3976 | get title() { return this._def.title; } | ||
3977 | get url() { return this._def.url; } | ||
3978 | get display() { return this._def.ui.display || 'auto'; } // bad. just normalize the type earlier | ||
3979 | get startEditable() { return this._def.ui.startEditable; } | ||
3980 | get durationEditable() { return this._def.ui.durationEditable; } | ||
3981 | get constraint() { return this._def.ui.constraints[0] || null; } | ||
3982 | get overlap() { return this._def.ui.overlap; } | ||
3983 | get allow() { return this._def.ui.allows[0] || null; } | ||
3984 | get backgroundColor() { return this._def.ui.backgroundColor; } | ||
3985 | get borderColor() { return this._def.ui.borderColor; } | ||
3986 | get textColor() { return this._def.ui.textColor; } | ||
3987 | // NOTE: user can't modify these because Object.freeze was called in event-def parsing | ||
3988 | get classNames() { return this._def.ui.classNames; } | ||
3989 | get extendedProps() { return this._def.extendedProps; } | ||
3990 | toPlainObject(settings = {}) { | ||
3991 | let def = this._def; | ||
3992 | let { ui } = def; | ||
3993 | let { startStr, endStr } = this; | ||
3994 | let res = { | ||
3995 | allDay: def.allDay, | ||
3996 | }; | ||
3997 | if (def.title) { | ||
3998 | res.title = def.title; | ||
3999 | } | ||
4000 | if (startStr) { | ||
4001 | res.start = startStr; | ||
4002 | } | ||
4003 | if (endStr) { | ||
4004 | res.end = endStr; | ||
4005 | } | ||
4006 | if (def.publicId) { | ||
4007 | res.id = def.publicId; | ||
4008 | } | ||
4009 | if (def.groupId) { | ||
4010 | res.groupId = def.groupId; | ||
4011 | } | ||
4012 | if (def.url) { | ||
4013 | res.url = def.url; | ||
4014 | } | ||
4015 | if (ui.display && ui.display !== 'auto') { | ||
4016 | res.display = ui.display; | ||
4017 | } | ||
4018 | // TODO: what about recurring-event properties??? | ||
4019 | // TODO: include startEditable/durationEditable/constraint/overlap/allow | ||
4020 | if (settings.collapseColor && ui.backgroundColor && ui.backgroundColor === ui.borderColor) { | ||
4021 | res.color = ui.backgroundColor; | ||
4022 | } | ||
4023 | else { | ||
4024 | if (ui.backgroundColor) { | ||
4025 | res.backgroundColor = ui.backgroundColor; | ||
4026 | } | ||
4027 | if (ui.borderColor) { | ||
4028 | res.borderColor = ui.borderColor; | ||
4029 | } | ||
4030 | } | ||
4031 | if (ui.textColor) { | ||
4032 | res.textColor = ui.textColor; | ||
4033 | } | ||
4034 | if (ui.classNames.length) { | ||
4035 | res.classNames = ui.classNames; | ||
4036 | } | ||
4037 | if (Object.keys(def.extendedProps).length) { | ||
4038 | if (settings.collapseExtendedProps) { | ||
4039 | Object.assign(res, def.extendedProps); | ||
4040 | } | ||
4041 | else { | ||
4042 | res.extendedProps = def.extendedProps; | ||
4043 | } | ||
4044 | } | ||
4045 | return res; | ||
4046 | } | ||
4047 | toJSON() { | ||
4048 | return this.toPlainObject(); | ||
4049 | } | ||
4050 | } | ||
4051 | function eventApiToStore(eventApi) { | ||
4052 | let def = eventApi._def; | ||
4053 | let instance = eventApi._instance; | ||
4054 | return { | ||
4055 | defs: { [def.defId]: def }, | ||
4056 | instances: instance | ||
4057 | ? { [instance.instanceId]: instance } | ||
4058 | : {}, | ||
4059 | }; | ||
4060 | } | ||
4061 | function buildEventApis(eventStore, context, excludeInstance) { | ||
4062 | let { defs, instances } = eventStore; | ||
4063 | let eventApis = []; | ||
4064 | let excludeInstanceId = excludeInstance ? excludeInstance.instanceId : ''; | ||
4065 | for (let id in instances) { | ||
4066 | let instance = instances[id]; | ||
4067 | let def = defs[instance.defId]; | ||
4068 | if (instance.instanceId !== excludeInstanceId) { | ||
4069 | eventApis.push(new EventImpl(context, def, instance)); | ||
4070 | } | ||
4071 | } | ||
4072 | return eventApis; | ||
4073 | } | ||
4074 | |||
4075 | /* | ||
4076 | Specifying nextDayThreshold signals that all-day ranges should be sliced. | ||
4077 | */ | ||
4078 | function sliceEventStore(eventStore, eventUiBases, framingRange, nextDayThreshold) { | ||
4079 | let inverseBgByGroupId = {}; | ||
4080 | let inverseBgByDefId = {}; | ||
4081 | let defByGroupId = {}; | ||
4082 | let bgRanges = []; | ||
4083 | let fgRanges = []; | ||
4084 | let eventUis = compileEventUis(eventStore.defs, eventUiBases); | ||
4085 | for (let defId in eventStore.defs) { | ||
4086 | let def = eventStore.defs[defId]; | ||
4087 | let ui = eventUis[def.defId]; | ||
4088 | if (ui.display === 'inverse-background') { | ||
4089 | if (def.groupId) { | ||
4090 | inverseBgByGroupId[def.groupId] = []; | ||
4091 | if (!defByGroupId[def.groupId]) { | ||
4092 | defByGroupId[def.groupId] = def; | ||
4093 | } | ||
4094 | } | ||
4095 | else { | ||
4096 | inverseBgByDefId[defId] = []; | ||
4097 | } | ||
4098 | } | ||
4099 | } | ||
4100 | for (let instanceId in eventStore.instances) { | ||
4101 | let instance = eventStore.instances[instanceId]; | ||
4102 | let def = eventStore.defs[instance.defId]; | ||
4103 | let ui = eventUis[def.defId]; | ||
4104 | let origRange = instance.range; | ||
4105 | let normalRange = (!def.allDay && nextDayThreshold) ? | ||
4106 | computeVisibleDayRange(origRange, nextDayThreshold) : | ||
4107 | origRange; | ||
4108 | let slicedRange = intersectRanges(normalRange, framingRange); | ||
4109 | if (slicedRange) { | ||
4110 | if (ui.display === 'inverse-background') { | ||
4111 | if (def.groupId) { | ||
4112 | inverseBgByGroupId[def.groupId].push(slicedRange); | ||
4113 | } | ||
4114 | else { | ||
4115 | inverseBgByDefId[instance.defId].push(slicedRange); | ||
4116 | } | ||
4117 | } | ||
4118 | else if (ui.display !== 'none') { | ||
4119 | (ui.display === 'background' ? bgRanges : fgRanges).push({ | ||
4120 | def, | ||
4121 | ui, | ||
4122 | instance, | ||
4123 | range: slicedRange, | ||
4124 | isStart: normalRange.start && normalRange.start.valueOf() === slicedRange.start.valueOf(), | ||
4125 | isEnd: normalRange.end && normalRange.end.valueOf() === slicedRange.end.valueOf(), | ||
4126 | }); | ||
4127 | } | ||
4128 | } | ||
4129 | } | ||
4130 | for (let groupId in inverseBgByGroupId) { // BY GROUP | ||
4131 | let ranges = inverseBgByGroupId[groupId]; | ||
4132 | let invertedRanges = invertRanges(ranges, framingRange); | ||
4133 | for (let invertedRange of invertedRanges) { | ||
4134 | let def = defByGroupId[groupId]; | ||
4135 | let ui = eventUis[def.defId]; | ||
4136 | bgRanges.push({ | ||
4137 | def, | ||
4138 | ui, | ||
4139 | instance: null, | ||
4140 | range: invertedRange, | ||
4141 | isStart: false, | ||
4142 | isEnd: false, | ||
4143 | }); | ||
4144 | } | ||
4145 | } | ||
4146 | for (let defId in inverseBgByDefId) { | ||
4147 | let ranges = inverseBgByDefId[defId]; | ||
4148 | let invertedRanges = invertRanges(ranges, framingRange); | ||
4149 | for (let invertedRange of invertedRanges) { | ||
4150 | bgRanges.push({ | ||
4151 | def: eventStore.defs[defId], | ||
4152 | ui: eventUis[defId], | ||
4153 | instance: null, | ||
4154 | range: invertedRange, | ||
4155 | isStart: false, | ||
4156 | isEnd: false, | ||
4157 | }); | ||
4158 | } | ||
4159 | } | ||
4160 | return { bg: bgRanges, fg: fgRanges }; | ||
4161 | } | ||
4162 | function hasBgRendering(def) { | ||
4163 | return def.ui.display === 'background' || def.ui.display === 'inverse-background'; | ||
4164 | } | ||
4165 | function setElSeg(el, seg) { | ||
4166 | el.fcSeg = seg; | ||
4167 | } | ||
4168 | function getElSeg(el) { | ||
4169 | return el.fcSeg || | ||
4170 | el.parentNode.fcSeg || // for the harness | ||
4171 | null; | ||
4172 | } | ||
4173 | // event ui computation | ||
4174 | function compileEventUis(eventDefs, eventUiBases) { | ||
4175 | return mapHash(eventDefs, (eventDef) => compileEventUi(eventDef, eventUiBases)); | ||
4176 | } | ||
4177 | function compileEventUi(eventDef, eventUiBases) { | ||
4178 | let uis = []; | ||
4179 | if (eventUiBases['']) { | ||
4180 | uis.push(eventUiBases['']); | ||
4181 | } | ||
4182 | if (eventUiBases[eventDef.defId]) { | ||
4183 | uis.push(eventUiBases[eventDef.defId]); | ||
4184 | } | ||
4185 | uis.push(eventDef.ui); | ||
4186 | return combineEventUis(uis); | ||
4187 | } | ||
4188 | function sortEventSegs(segs, eventOrderSpecs) { | ||
4189 | let objs = segs.map(buildSegCompareObj); | ||
4190 | objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs)); | ||
4191 | return objs.map((c) => c._seg); | ||
4192 | } | ||
4193 | // returns a object with all primitive props that can be compared | ||
4194 | function buildSegCompareObj(seg) { | ||
4195 | let { eventRange } = seg; | ||
4196 | let eventDef = eventRange.def; | ||
4197 | let range = eventRange.instance ? eventRange.instance.range : eventRange.range; | ||
4198 | let start = range.start ? range.start.valueOf() : 0; // TODO: better support for open-range events | ||
4199 | let end = range.end ? range.end.valueOf() : 0; // " | ||
4200 | return Object.assign(Object.assign(Object.assign({}, eventDef.extendedProps), eventDef), { id: eventDef.publicId, start, | ||
4201 | end, duration: end - start, allDay: Number(eventDef.allDay), _seg: seg }); | ||
4202 | } | ||
4203 | function computeSegDraggable(seg, context) { | ||
4204 | let { pluginHooks } = context; | ||
4205 | let transformers = pluginHooks.isDraggableTransformers; | ||
4206 | let { def, ui } = seg.eventRange; | ||
4207 | let val = ui.startEditable; | ||
4208 | for (let transformer of transformers) { | ||
4209 | val = transformer(val, def, ui, context); | ||
4210 | } | ||
4211 | return val; | ||
4212 | } | ||
4213 | function computeSegStartResizable(seg, context) { | ||
4214 | return seg.isStart && seg.eventRange.ui.durationEditable && context.options.eventResizableFromStart; | ||
4215 | } | ||
4216 | function computeSegEndResizable(seg, context) { | ||
4217 | return seg.isEnd && seg.eventRange.ui.durationEditable; | ||
4218 | } | ||
4219 | function buildSegTimeText(seg, timeFormat, context, defaultDisplayEventTime, // defaults to true | ||
4220 | defaultDisplayEventEnd, // defaults to true | ||
4221 | startOverride, endOverride) { | ||
4222 | let { dateEnv, options } = context; | ||
4223 | let { displayEventTime, displayEventEnd } = options; | ||
4224 | let eventDef = seg.eventRange.def; | ||
4225 | let eventInstance = seg.eventRange.instance; | ||
4226 | if (displayEventTime == null) { | ||
4227 | displayEventTime = defaultDisplayEventTime !== false; | ||
4228 | } | ||
4229 | if (displayEventEnd == null) { | ||
4230 | displayEventEnd = defaultDisplayEventEnd !== false; | ||
4231 | } | ||
4232 | let wholeEventStart = eventInstance.range.start; | ||
4233 | let wholeEventEnd = eventInstance.range.end; | ||
4234 | let segStart = startOverride || seg.start || seg.eventRange.range.start; | ||
4235 | let segEnd = endOverride || seg.end || seg.eventRange.range.end; | ||
4236 | let isStartDay = startOfDay(wholeEventStart).valueOf() === startOfDay(segStart).valueOf(); | ||
4237 | let isEndDay = startOfDay(addMs(wholeEventEnd, -1)).valueOf() === startOfDay(addMs(segEnd, -1)).valueOf(); | ||
4238 | if (displayEventTime && !eventDef.allDay && (isStartDay || isEndDay)) { | ||
4239 | segStart = isStartDay ? wholeEventStart : segStart; | ||
4240 | segEnd = isEndDay ? wholeEventEnd : segEnd; | ||
4241 | if (displayEventEnd && eventDef.hasEnd) { | ||
4242 | return dateEnv.formatRange(segStart, segEnd, timeFormat, { | ||
4243 | forcedStartTzo: startOverride ? null : eventInstance.forcedStartTzo, | ||
4244 | forcedEndTzo: endOverride ? null : eventInstance.forcedEndTzo, | ||
4245 | }); | ||
4246 | } | ||
4247 | return dateEnv.format(segStart, timeFormat, { | ||
4248 | forcedTzo: startOverride ? null : eventInstance.forcedStartTzo, // nooooo, same | ||
4249 | }); | ||
4250 | } | ||
4251 | return ''; | ||
4252 | } | ||
4253 | function getSegMeta(seg, todayRange, nowDate) { | ||
4254 | let segRange = seg.eventRange.range; | ||
4255 | return { | ||
4256 | isPast: segRange.end <= (nowDate || todayRange.start), | ||
4257 | isFuture: segRange.start >= (nowDate || todayRange.end), | ||
4258 | isToday: todayRange && rangeContainsMarker(todayRange, segRange.start), | ||
4259 | }; | ||
4260 | } | ||
4261 | function getEventClassNames(props) { | ||
4262 | let classNames = ['fc-event']; | ||
4263 | if (props.isMirror) { | ||
4264 | classNames.push('fc-event-mirror'); | ||
4265 | } | ||
4266 | if (props.isDraggable) { | ||
4267 | classNames.push('fc-event-draggable'); | ||
4268 | } | ||
4269 | if (props.isStartResizable || props.isEndResizable) { | ||
4270 | classNames.push('fc-event-resizable'); | ||
4271 | } | ||
4272 | if (props.isDragging) { | ||
4273 | classNames.push('fc-event-dragging'); | ||
4274 | } | ||
4275 | if (props.isResizing) { | ||
4276 | classNames.push('fc-event-resizing'); | ||
4277 | } | ||
4278 | if (props.isSelected) { | ||
4279 | classNames.push('fc-event-selected'); | ||
4280 | } | ||
4281 | if (props.isStart) { | ||
4282 | classNames.push('fc-event-start'); | ||
4283 | } | ||
4284 | if (props.isEnd) { | ||
4285 | classNames.push('fc-event-end'); | ||
4286 | } | ||
4287 | if (props.isPast) { | ||
4288 | classNames.push('fc-event-past'); | ||
4289 | } | ||
4290 | if (props.isToday) { | ||
4291 | classNames.push('fc-event-today'); | ||
4292 | } | ||
4293 | if (props.isFuture) { | ||
4294 | classNames.push('fc-event-future'); | ||
4295 | } | ||
4296 | return classNames; | ||
4297 | } | ||
4298 | function buildEventRangeKey(eventRange) { | ||
4299 | return eventRange.instance | ||
4300 | ? eventRange.instance.instanceId | ||
4301 | : `${eventRange.def.defId}:${eventRange.range.start.toISOString()}`; | ||
4302 | // inverse-background events don't have specific instances. TODO: better solution | ||
4303 | } | ||
4304 | function getSegAnchorAttrs(seg, context) { | ||
4305 | let { def, instance } = seg.eventRange; | ||
4306 | let { url } = def; | ||
4307 | if (url) { | ||
4308 | return { href: url }; | ||
4309 | } | ||
4310 | let { emitter, options } = context; | ||
4311 | let { eventInteractive } = options; | ||
4312 | if (eventInteractive == null) { | ||
4313 | eventInteractive = def.interactive; | ||
4314 | if (eventInteractive == null) { | ||
4315 | eventInteractive = Boolean(emitter.hasHandlers('eventClick')); | ||
4316 | } | ||
4317 | } | ||
4318 | // mock what happens in EventClicking | ||
4319 | if (eventInteractive) { | ||
4320 | // only attach keyboard-related handlers because click handler is already done in EventClicking | ||
4321 | return createAriaKeyboardAttrs((ev) => { | ||
4322 | emitter.trigger('eventClick', { | ||
4323 | el: ev.target, | ||
4324 | event: new EventImpl(context, def, instance), | ||
4325 | jsEvent: ev, | ||
4326 | view: context.viewApi, | ||
4327 | }); | ||
4328 | }); | ||
4329 | } | ||
4330 | return {}; | ||
4331 | } | ||
4332 | |||
4333 | const STANDARD_PROPS = { | ||
4334 | start: identity, | ||
4335 | end: identity, | ||
4336 | allDay: Boolean, | ||
4337 | }; | ||
4338 | function parseDateSpan(raw, dateEnv, defaultDuration) { | ||
4339 | let span = parseOpenDateSpan(raw, dateEnv); | ||
4340 | let { range } = span; | ||
4341 | if (!range.start) { | ||
4342 | return null; | ||
4343 | } | ||
4344 | if (!range.end) { | ||
4345 | if (defaultDuration == null) { | ||
4346 | return null; | ||
4347 | } | ||
4348 | range.end = dateEnv.add(range.start, defaultDuration); | ||
4349 | } | ||
4350 | return span; | ||
4351 | } | ||
4352 | /* | ||
4353 | TODO: somehow combine with parseRange? | ||
4354 | Will return null if the start/end props were present but parsed invalidly. | ||
4355 | */ | ||
4356 | function parseOpenDateSpan(raw, dateEnv) { | ||
4357 | let { refined: standardProps, extra } = refineProps(raw, STANDARD_PROPS); | ||
4358 | let startMeta = standardProps.start ? dateEnv.createMarkerMeta(standardProps.start) : null; | ||
4359 | let endMeta = standardProps.end ? dateEnv.createMarkerMeta(standardProps.end) : null; | ||
4360 | let { allDay } = standardProps; | ||
4361 | if (allDay == null) { | ||
4362 | allDay = (startMeta && startMeta.isTimeUnspecified) && | ||
4363 | (!endMeta || endMeta.isTimeUnspecified); | ||
4364 | } | ||
4365 | return Object.assign({ range: { | ||
4366 | start: startMeta ? startMeta.marker : null, | ||
4367 | end: endMeta ? endMeta.marker : null, | ||
4368 | }, allDay }, extra); | ||
4369 | } | ||
4370 | function isDateSpansEqual(span0, span1) { | ||
4371 | return rangesEqual(span0.range, span1.range) && | ||
4372 | span0.allDay === span1.allDay && | ||
4373 | isSpanPropsEqual(span0, span1); | ||
4374 | } | ||
4375 | // the NON-DATE-RELATED props | ||
4376 | function isSpanPropsEqual(span0, span1) { | ||
4377 | for (let propName in span1) { | ||
4378 | if (propName !== 'range' && propName !== 'allDay') { | ||
4379 | if (span0[propName] !== span1[propName]) { | ||
4380 | return false; | ||
4381 | } | ||
4382 | } | ||
4383 | } | ||
4384 | // are there any props that span0 has that span1 DOESN'T have? | ||
4385 | // both have range/allDay, so no need to special-case. | ||
4386 | for (let propName in span0) { | ||
4387 | if (!(propName in span1)) { | ||
4388 | return false; | ||
4389 | } | ||
4390 | } | ||
4391 | return true; | ||
4392 | } | ||
4393 | function buildDateSpanApi(span, dateEnv) { | ||
4394 | return Object.assign(Object.assign({}, buildRangeApi(span.range, dateEnv, span.allDay)), { allDay: span.allDay }); | ||
4395 | } | ||
4396 | function buildRangeApiWithTimeZone(range, dateEnv, omitTime) { | ||
4397 | return Object.assign(Object.assign({}, buildRangeApi(range, dateEnv, omitTime)), { timeZone: dateEnv.timeZone }); | ||
4398 | } | ||
4399 | function buildRangeApi(range, dateEnv, omitTime) { | ||
4400 | return { | ||
4401 | start: dateEnv.toDate(range.start), | ||
4402 | end: dateEnv.toDate(range.end), | ||
4403 | startStr: dateEnv.formatIso(range.start, { omitTime }), | ||
4404 | endStr: dateEnv.formatIso(range.end, { omitTime }), | ||
4405 | }; | ||
4406 | } | ||
4407 | function fabricateEventRange(dateSpan, eventUiBases, context) { | ||
4408 | let res = refineEventDef({ editable: false }, context); | ||
4409 | let def = parseEventDef(res.refined, res.extra, '', // sourceId | ||
4410 | dateSpan.allDay, true, // hasEnd | ||
4411 | context); | ||
4412 | return { | ||
4413 | def, | ||
4414 | ui: compileEventUi(def, eventUiBases), | ||
4415 | instance: createEventInstance(def.defId, dateSpan.range), | ||
4416 | range: dateSpan.range, | ||
4417 | isStart: true, | ||
4418 | isEnd: true, | ||
4419 | }; | ||
4420 | } | ||
4421 | |||
4422 | let calendarSystemClassMap = {}; | ||
4423 | function registerCalendarSystem(name, theClass) { | ||
4424 | calendarSystemClassMap[name] = theClass; | ||
4425 | } | ||
4426 | function createCalendarSystem(name) { | ||
4427 | return new calendarSystemClassMap[name](); | ||
4428 | } | ||
4429 | class GregorianCalendarSystem { | ||
4430 | getMarkerYear(d) { | ||
4431 | return d.getUTCFullYear(); | ||
4432 | } | ||
4433 | getMarkerMonth(d) { | ||
4434 | return d.getUTCMonth(); | ||
4435 | } | ||
4436 | getMarkerDay(d) { | ||
4437 | return d.getUTCDate(); | ||
4438 | } | ||
4439 | arrayToMarker(arr) { | ||
4440 | return arrayToUtcDate(arr); | ||
4441 | } | ||
4442 | markerToArray(marker) { | ||
4443 | return dateToUtcArray(marker); | ||
4444 | } | ||
4445 | } | ||
4446 | registerCalendarSystem('gregory', GregorianCalendarSystem); | ||
4447 | |||
4448 | const ISO_RE = /^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/; | ||
4449 | function parse(str) { | ||
4450 | let m = ISO_RE.exec(str); | ||
4451 | if (m) { | ||
4452 | let marker = new Date(Date.UTC(Number(m[1]), m[3] ? Number(m[3]) - 1 : 0, Number(m[5] || 1), Number(m[7] || 0), Number(m[8] || 0), Number(m[10] || 0), m[12] ? Number(`0.${m[12]}`) * 1000 : 0)); | ||
4453 | if (isValidDate(marker)) { | ||
4454 | let timeZoneOffset = null; | ||
4455 | if (m[13]) { | ||
4456 | timeZoneOffset = (m[15] === '-' ? -1 : 1) * (Number(m[16] || 0) * 60 + | ||
4457 | Number(m[18] || 0)); | ||
4458 | } | ||
4459 | return { | ||
4460 | marker, | ||
4461 | isTimeUnspecified: !m[6], | ||
4462 | timeZoneOffset, | ||
4463 | }; | ||
4464 | } | ||
4465 | } | ||
4466 | return null; | ||
4467 | } | ||
4468 | |||
4469 | class DateEnv { | ||
4470 | constructor(settings) { | ||
4471 | let timeZone = this.timeZone = settings.timeZone; | ||
4472 | let isNamedTimeZone = timeZone !== 'local' && timeZone !== 'UTC'; | ||
4473 | if (settings.namedTimeZoneImpl && isNamedTimeZone) { | ||
4474 | this.namedTimeZoneImpl = new settings.namedTimeZoneImpl(timeZone); | ||
4475 | } | ||
4476 | this.canComputeOffset = Boolean(!isNamedTimeZone || this.namedTimeZoneImpl); | ||
4477 | this.calendarSystem = createCalendarSystem(settings.calendarSystem); | ||
4478 | this.locale = settings.locale; | ||
4479 | this.weekDow = settings.locale.week.dow; | ||
4480 | this.weekDoy = settings.locale.week.doy; | ||
4481 | if (settings.weekNumberCalculation === 'ISO') { | ||
4482 | this.weekDow = 1; | ||
4483 | this.weekDoy = 4; | ||
4484 | } | ||
4485 | if (typeof settings.firstDay === 'number') { | ||
4486 | this.weekDow = settings.firstDay; | ||
4487 | } | ||
4488 | if (typeof settings.weekNumberCalculation === 'function') { | ||
4489 | this.weekNumberFunc = settings.weekNumberCalculation; | ||
4490 | } | ||
4491 | this.weekText = settings.weekText != null ? settings.weekText : settings.locale.options.weekText; | ||
4492 | this.weekTextLong = (settings.weekTextLong != null ? settings.weekTextLong : settings.locale.options.weekTextLong) || this.weekText; | ||
4493 | this.cmdFormatter = settings.cmdFormatter; | ||
4494 | this.defaultSeparator = settings.defaultSeparator; | ||
4495 | } | ||
4496 | // Creating / Parsing | ||
4497 | createMarker(input) { | ||
4498 | let meta = this.createMarkerMeta(input); | ||
4499 | if (meta === null) { | ||
4500 | return null; | ||
4501 | } | ||
4502 | return meta.marker; | ||
4503 | } | ||
4504 | createNowMarker() { | ||
4505 | if (this.canComputeOffset) { | ||
4506 | return this.timestampToMarker(new Date().valueOf()); | ||
4507 | } | ||
4508 | // if we can't compute the current date val for a timezone, | ||
4509 | // better to give the current local date vals than UTC | ||
4510 | return arrayToUtcDate(dateToLocalArray(new Date())); | ||
4511 | } | ||
4512 | createMarkerMeta(input) { | ||
4513 | if (typeof input === 'string') { | ||
4514 | return this.parse(input); | ||
4515 | } | ||
4516 | let marker = null; | ||
4517 | if (typeof input === 'number') { | ||
4518 | marker = this.timestampToMarker(input); | ||
4519 | } | ||
4520 | else if (input instanceof Date) { | ||
4521 | input = input.valueOf(); | ||
4522 | if (!isNaN(input)) { | ||
4523 | marker = this.timestampToMarker(input); | ||
4524 | } | ||
4525 | } | ||
4526 | else if (Array.isArray(input)) { | ||
4527 | marker = arrayToUtcDate(input); | ||
4528 | } | ||
4529 | if (marker === null || !isValidDate(marker)) { | ||
4530 | return null; | ||
4531 | } | ||
4532 | return { marker, isTimeUnspecified: false, forcedTzo: null }; | ||
4533 | } | ||
4534 | parse(s) { | ||
4535 | let parts = parse(s); | ||
4536 | if (parts === null) { | ||
4537 | return null; | ||
4538 | } | ||
4539 | let { marker } = parts; | ||
4540 | let forcedTzo = null; | ||
4541 | if (parts.timeZoneOffset !== null) { | ||
4542 | if (this.canComputeOffset) { | ||
4543 | marker = this.timestampToMarker(marker.valueOf() - parts.timeZoneOffset * 60 * 1000); | ||
4544 | } | ||
4545 | else { | ||
4546 | forcedTzo = parts.timeZoneOffset; | ||
4547 | } | ||
4548 | } | ||
4549 | return { marker, isTimeUnspecified: parts.isTimeUnspecified, forcedTzo }; | ||
4550 | } | ||
4551 | // Accessors | ||
4552 | getYear(marker) { | ||
4553 | return this.calendarSystem.getMarkerYear(marker); | ||
4554 | } | ||
4555 | getMonth(marker) { | ||
4556 | return this.calendarSystem.getMarkerMonth(marker); | ||
4557 | } | ||
4558 | getDay(marker) { | ||
4559 | return this.calendarSystem.getMarkerDay(marker); | ||
4560 | } | ||
4561 | // Adding / Subtracting | ||
4562 | add(marker, dur) { | ||
4563 | let a = this.calendarSystem.markerToArray(marker); | ||
4564 | a[0] += dur.years; | ||
4565 | a[1] += dur.months; | ||
4566 | a[2] += dur.days; | ||
4567 | a[6] += dur.milliseconds; | ||
4568 | return this.calendarSystem.arrayToMarker(a); | ||
4569 | } | ||
4570 | subtract(marker, dur) { | ||
4571 | let a = this.calendarSystem.markerToArray(marker); | ||
4572 | a[0] -= dur.years; | ||
4573 | a[1] -= dur.months; | ||
4574 | a[2] -= dur.days; | ||
4575 | a[6] -= dur.milliseconds; | ||
4576 | return this.calendarSystem.arrayToMarker(a); | ||
4577 | } | ||
4578 | addYears(marker, n) { | ||
4579 | let a = this.calendarSystem.markerToArray(marker); | ||
4580 | a[0] += n; | ||
4581 | return this.calendarSystem.arrayToMarker(a); | ||
4582 | } | ||
4583 | addMonths(marker, n) { | ||
4584 | let a = this.calendarSystem.markerToArray(marker); | ||
4585 | a[1] += n; | ||
4586 | return this.calendarSystem.arrayToMarker(a); | ||
4587 | } | ||
4588 | // Diffing Whole Units | ||
4589 | diffWholeYears(m0, m1) { | ||
4590 | let { calendarSystem } = this; | ||
4591 | if (timeAsMs(m0) === timeAsMs(m1) && | ||
4592 | calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1) && | ||
4593 | calendarSystem.getMarkerMonth(m0) === calendarSystem.getMarkerMonth(m1)) { | ||
4594 | return calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0); | ||
4595 | } | ||
4596 | return null; | ||
4597 | } | ||
4598 | diffWholeMonths(m0, m1) { | ||
4599 | let { calendarSystem } = this; | ||
4600 | if (timeAsMs(m0) === timeAsMs(m1) && | ||
4601 | calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1)) { | ||
4602 | return (calendarSystem.getMarkerMonth(m1) - calendarSystem.getMarkerMonth(m0)) + | ||
4603 | (calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0)) * 12; | ||
4604 | } | ||
4605 | return null; | ||
4606 | } | ||
4607 | // Range / Duration | ||
4608 | greatestWholeUnit(m0, m1) { | ||
4609 | let n = this.diffWholeYears(m0, m1); | ||
4610 | if (n !== null) { | ||
4611 | return { unit: 'year', value: n }; | ||
4612 | } | ||
4613 | n = this.diffWholeMonths(m0, m1); | ||
4614 | if (n !== null) { | ||
4615 | return { unit: 'month', value: n }; | ||
4616 | } | ||
4617 | n = diffWholeWeeks(m0, m1); | ||
4618 | if (n !== null) { | ||
4619 | return { unit: 'week', value: n }; | ||
4620 | } | ||
4621 | n = diffWholeDays(m0, m1); | ||
4622 | if (n !== null) { | ||
4623 | return { unit: 'day', value: n }; | ||
4624 | } | ||
4625 | n = diffHours(m0, m1); | ||
4626 | if (isInt(n)) { | ||
4627 | return { unit: 'hour', value: n }; | ||
4628 | } | ||
4629 | n = diffMinutes(m0, m1); | ||
4630 | if (isInt(n)) { | ||
4631 | return { unit: 'minute', value: n }; | ||
4632 | } | ||
4633 | n = diffSeconds(m0, m1); | ||
4634 | if (isInt(n)) { | ||
4635 | return { unit: 'second', value: n }; | ||
4636 | } | ||
4637 | return { unit: 'millisecond', value: m1.valueOf() - m0.valueOf() }; | ||
4638 | } | ||
4639 | countDurationsBetween(m0, m1, d) { | ||
4640 | // TODO: can use greatestWholeUnit | ||
4641 | let diff; | ||
4642 | if (d.years) { | ||
4643 | diff = this.diffWholeYears(m0, m1); | ||
4644 | if (diff !== null) { | ||
4645 | return diff / asRoughYears(d); | ||
4646 | } | ||
4647 | } | ||
4648 | if (d.months) { | ||
4649 | diff = this.diffWholeMonths(m0, m1); | ||
4650 | if (diff !== null) { | ||
4651 | return diff / asRoughMonths(d); | ||
4652 | } | ||
4653 | } | ||
4654 | if (d.days) { | ||
4655 | diff = diffWholeDays(m0, m1); | ||
4656 | if (diff !== null) { | ||
4657 | return diff / asRoughDays(d); | ||
4658 | } | ||
4659 | } | ||
4660 | return (m1.valueOf() - m0.valueOf()) / asRoughMs(d); | ||
4661 | } | ||
4662 | // Start-Of | ||
4663 | // these DON'T return zoned-dates. only UTC start-of dates | ||
4664 | startOf(m, unit) { | ||
4665 | if (unit === 'year') { | ||
4666 | return this.startOfYear(m); | ||
4667 | } | ||
4668 | if (unit === 'month') { | ||
4669 | return this.startOfMonth(m); | ||
4670 | } | ||
4671 | if (unit === 'week') { | ||
4672 | return this.startOfWeek(m); | ||
4673 | } | ||
4674 | if (unit === 'day') { | ||
4675 | return startOfDay(m); | ||
4676 | } | ||
4677 | if (unit === 'hour') { | ||
4678 | return startOfHour(m); | ||
4679 | } | ||
4680 | if (unit === 'minute') { | ||
4681 | return startOfMinute(m); | ||
4682 | } | ||
4683 | if (unit === 'second') { | ||
4684 | return startOfSecond(m); | ||
4685 | } | ||
4686 | return null; | ||
4687 | } | ||
4688 | startOfYear(m) { | ||
4689 | return this.calendarSystem.arrayToMarker([ | ||
4690 | this.calendarSystem.getMarkerYear(m), | ||
4691 | ]); | ||
4692 | } | ||
4693 | startOfMonth(m) { | ||
4694 | return this.calendarSystem.arrayToMarker([ | ||
4695 | this.calendarSystem.getMarkerYear(m), | ||
4696 | this.calendarSystem.getMarkerMonth(m), | ||
4697 | ]); | ||
4698 | } | ||
4699 | startOfWeek(m) { | ||
4700 | return this.calendarSystem.arrayToMarker([ | ||
4701 | this.calendarSystem.getMarkerYear(m), | ||
4702 | this.calendarSystem.getMarkerMonth(m), | ||
4703 | m.getUTCDate() - ((m.getUTCDay() - this.weekDow + 7) % 7), | ||
4704 | ]); | ||
4705 | } | ||
4706 | // Week Number | ||
4707 | computeWeekNumber(marker) { | ||
4708 | if (this.weekNumberFunc) { | ||
4709 | return this.weekNumberFunc(this.toDate(marker)); | ||
4710 | } | ||
4711 | return weekOfYear(marker, this.weekDow, this.weekDoy); | ||
4712 | } | ||
4713 | // TODO: choke on timeZoneName: long | ||
4714 | format(marker, formatter, dateOptions = {}) { | ||
4715 | return formatter.format({ | ||
4716 | marker, | ||
4717 | timeZoneOffset: dateOptions.forcedTzo != null ? | ||
4718 | dateOptions.forcedTzo : | ||
4719 | this.offsetForMarker(marker), | ||
4720 | }, this); | ||
4721 | } | ||
4722 | formatRange(start, end, formatter, dateOptions = {}) { | ||
4723 | if (dateOptions.isEndExclusive) { | ||
4724 | end = addMs(end, -1); | ||
4725 | } | ||
4726 | return formatter.formatRange({ | ||
4727 | marker: start, | ||
4728 | timeZoneOffset: dateOptions.forcedStartTzo != null ? | ||
4729 | dateOptions.forcedStartTzo : | ||
4730 | this.offsetForMarker(start), | ||
4731 | }, { | ||
4732 | marker: end, | ||
4733 | timeZoneOffset: dateOptions.forcedEndTzo != null ? | ||
4734 | dateOptions.forcedEndTzo : | ||
4735 | this.offsetForMarker(end), | ||
4736 | }, this, dateOptions.defaultSeparator); | ||
4737 | } | ||
4738 | /* | ||
4739 | DUMB: the omitTime arg is dumb. if we omit the time, we want to omit the timezone offset. and if we do that, | ||
4740 | might as well use buildIsoString or some other util directly | ||
4741 | */ | ||
4742 | formatIso(marker, extraOptions = {}) { | ||
4743 | let timeZoneOffset = null; | ||
4744 | if (!extraOptions.omitTimeZoneOffset) { | ||
4745 | if (extraOptions.forcedTzo != null) { | ||
4746 | timeZoneOffset = extraOptions.forcedTzo; | ||
4747 | } | ||
4748 | else { | ||
4749 | timeZoneOffset = this.offsetForMarker(marker); | ||
4750 | } | ||
4751 | } | ||
4752 | return buildIsoString(marker, timeZoneOffset, extraOptions.omitTime); | ||
4753 | } | ||
4754 | // TimeZone | ||
4755 | timestampToMarker(ms) { | ||
4756 | if (this.timeZone === 'local') { | ||
4757 | return arrayToUtcDate(dateToLocalArray(new Date(ms))); | ||
4758 | } | ||
4759 | if (this.timeZone === 'UTC' || !this.namedTimeZoneImpl) { | ||
4760 | return new Date(ms); | ||
4761 | } | ||
4762 | return arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(ms)); | ||
4763 | } | ||
4764 | offsetForMarker(m) { | ||
4765 | if (this.timeZone === 'local') { | ||
4766 | return -arrayToLocalDate(dateToUtcArray(m)).getTimezoneOffset(); // convert "inverse" offset to "normal" offset | ||
4767 | } | ||
4768 | if (this.timeZone === 'UTC') { | ||
4769 | return 0; | ||
4770 | } | ||
4771 | if (this.namedTimeZoneImpl) { | ||
4772 | return this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)); | ||
4773 | } | ||
4774 | return null; | ||
4775 | } | ||
4776 | // Conversion | ||
4777 | toDate(m, forcedTzo) { | ||
4778 | if (this.timeZone === 'local') { | ||
4779 | return arrayToLocalDate(dateToUtcArray(m)); | ||
4780 | } | ||
4781 | if (this.timeZone === 'UTC') { | ||
4782 | return new Date(m.valueOf()); // make sure it's a copy | ||
4783 | } | ||
4784 | if (!this.namedTimeZoneImpl) { | ||
4785 | return new Date(m.valueOf() - (forcedTzo || 0)); | ||
4786 | } | ||
4787 | return new Date(m.valueOf() - | ||
4788 | this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)) * 1000 * 60); | ||
4789 | } | ||
4790 | } | ||
4791 | |||
4792 | class NamedTimeZoneImpl { | ||
4793 | constructor(timeZoneName) { | ||
4794 | this.timeZoneName = timeZoneName; | ||
4795 | } | ||
4796 | } | ||
4797 | |||
4798 | class SegHierarchy { | ||
4799 | constructor(getEntryThickness = (entry) => { | ||
4800 | // if no thickness known, assume 1 (if 0, so small it always fits) | ||
4801 | return entry.thickness || 1; | ||
4802 | }) { | ||
4803 | this.getEntryThickness = getEntryThickness; | ||
4804 | // settings | ||
4805 | this.strictOrder = false; | ||
4806 | this.allowReslicing = false; | ||
4807 | this.maxCoord = -1; // -1 means no max | ||
4808 | this.maxStackCnt = -1; // -1 means no max | ||
4809 | this.levelCoords = []; // ordered | ||
4810 | this.entriesByLevel = []; // parallel with levelCoords | ||
4811 | this.stackCnts = {}; // TODO: use better technique!? | ||
4812 | } | ||
4813 | addSegs(inputs) { | ||
4814 | let hiddenEntries = []; | ||
4815 | for (let input of inputs) { | ||
4816 | this.insertEntry(input, hiddenEntries); | ||
4817 | } | ||
4818 | return hiddenEntries; | ||
4819 | } | ||
4820 | insertEntry(entry, hiddenEntries) { | ||
4821 | let insertion = this.findInsertion(entry); | ||
4822 | if (this.isInsertionValid(insertion, entry)) { | ||
4823 | this.insertEntryAt(entry, insertion); | ||
4824 | } | ||
4825 | else { | ||
4826 | this.handleInvalidInsertion(insertion, entry, hiddenEntries); | ||
4827 | } | ||
4828 | } | ||
4829 | isInsertionValid(insertion, entry) { | ||
4830 | return (this.maxCoord === -1 || insertion.levelCoord + this.getEntryThickness(entry) <= this.maxCoord) && | ||
4831 | (this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt); | ||
4832 | } | ||
4833 | handleInvalidInsertion(insertion, entry, hiddenEntries) { | ||
4834 | if (this.allowReslicing && insertion.touchingEntry) { | ||
4835 | const hiddenEntry = Object.assign(Object.assign({}, entry), { span: intersectSpans(entry.span, insertion.touchingEntry.span) }); | ||
4836 | hiddenEntries.push(hiddenEntry); | ||
4837 | this.splitEntry(entry, insertion.touchingEntry, hiddenEntries); | ||
4838 | } | ||
4839 | else { | ||
4840 | hiddenEntries.push(entry); | ||
4841 | } | ||
4842 | } | ||
4843 | /* | ||
4844 | Does NOT add what hit the `barrier` into hiddenEntries. Should already be done. | ||
4845 | */ | ||
4846 | splitEntry(entry, barrier, hiddenEntries) { | ||
4847 | let entrySpan = entry.span; | ||
4848 | let barrierSpan = barrier.span; | ||
4849 | if (entrySpan.start < barrierSpan.start) { | ||
4850 | this.insertEntry({ | ||
4851 | index: entry.index, | ||
4852 | thickness: entry.thickness, | ||
4853 | span: { start: entrySpan.start, end: barrierSpan.start }, | ||
4854 | }, hiddenEntries); | ||
4855 | } | ||
4856 | if (entrySpan.end > barrierSpan.end) { | ||
4857 | this.insertEntry({ | ||
4858 | index: entry.index, | ||
4859 | thickness: entry.thickness, | ||
4860 | span: { start: barrierSpan.end, end: entrySpan.end }, | ||
4861 | }, hiddenEntries); | ||
4862 | } | ||
4863 | } | ||
4864 | insertEntryAt(entry, insertion) { | ||
4865 | let { entriesByLevel, levelCoords } = this; | ||
4866 | if (insertion.lateral === -1) { | ||
4867 | // create a new level | ||
4868 | insertAt(levelCoords, insertion.level, insertion.levelCoord); | ||
4869 | insertAt(entriesByLevel, insertion.level, [entry]); | ||
4870 | } | ||
4871 | else { | ||
4872 | // insert into existing level | ||
4873 | insertAt(entriesByLevel[insertion.level], insertion.lateral, entry); | ||
4874 | } | ||
4875 | this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt; | ||
4876 | } | ||
4877 | /* | ||
4878 | does not care about limits | ||
4879 | */ | ||
4880 | findInsertion(newEntry) { | ||
4881 | let { levelCoords, entriesByLevel, strictOrder, stackCnts } = this; | ||
4882 | let levelCnt = levelCoords.length; | ||
4883 | let candidateCoord = 0; | ||
4884 | let touchingLevel = -1; | ||
4885 | let touchingLateral = -1; | ||
4886 | let touchingEntry = null; | ||
4887 | let stackCnt = 0; | ||
4888 | for (let trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) { | ||
4889 | const trackingCoord = levelCoords[trackingLevel]; | ||
4890 | // if the current level is past the placed entry, we have found a good empty space and can stop. | ||
4891 | // if strictOrder, keep finding more lateral intersections. | ||
4892 | if (!strictOrder && trackingCoord >= candidateCoord + this.getEntryThickness(newEntry)) { | ||
4893 | break; | ||
4894 | } | ||
4895 | let trackingEntries = entriesByLevel[trackingLevel]; | ||
4896 | let trackingEntry; | ||
4897 | let searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); // find first entry after newEntry's end | ||
4898 | let lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one | ||
4899 | while ( // loop through entries that horizontally intersect | ||
4900 | (trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list | ||
4901 | trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry | ||
4902 | ) { | ||
4903 | let trackingEntryBottom = trackingCoord + this.getEntryThickness(trackingEntry); | ||
4904 | // intersects into the top of the candidate? | ||
4905 | if (trackingEntryBottom > candidateCoord) { | ||
4906 | candidateCoord = trackingEntryBottom; | ||
4907 | touchingEntry = trackingEntry; | ||
4908 | touchingLevel = trackingLevel; | ||
4909 | touchingLateral = lateralIndex; | ||
4910 | } | ||
4911 | // butts up against top of candidate? (will happen if just intersected as well) | ||
4912 | if (trackingEntryBottom === candidateCoord) { | ||
4913 | // accumulate the highest possible stackCnt of the trackingEntries that butt up | ||
4914 | stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1); | ||
4915 | } | ||
4916 | lateralIndex += 1; | ||
4917 | } | ||
4918 | } | ||
4919 | // the destination level will be after touchingEntry's level. find it | ||
4920 | let destLevel = 0; | ||
4921 | if (touchingEntry) { | ||
4922 | destLevel = touchingLevel + 1; | ||
4923 | while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) { | ||
4924 | destLevel += 1; | ||
4925 | } | ||
4926 | } | ||
4927 | // if adding to an existing level, find where to insert | ||
4928 | let destLateral = -1; | ||
4929 | if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) { | ||
4930 | destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0]; | ||
4931 | } | ||
4932 | return { | ||
4933 | touchingLevel, | ||
4934 | touchingLateral, | ||
4935 | touchingEntry, | ||
4936 | stackCnt, | ||
4937 | levelCoord: candidateCoord, | ||
4938 | level: destLevel, | ||
4939 | lateral: destLateral, | ||
4940 | }; | ||
4941 | } | ||
4942 | // sorted by levelCoord (lowest to highest) | ||
4943 | toRects() { | ||
4944 | let { entriesByLevel, levelCoords } = this; | ||
4945 | let levelCnt = entriesByLevel.length; | ||
4946 | let rects = []; | ||
4947 | for (let level = 0; level < levelCnt; level += 1) { | ||
4948 | let entries = entriesByLevel[level]; | ||
4949 | let levelCoord = levelCoords[level]; | ||
4950 | for (let entry of entries) { | ||
4951 | rects.push(Object.assign(Object.assign({}, entry), { thickness: this.getEntryThickness(entry), levelCoord })); | ||
4952 | } | ||
4953 | } | ||
4954 | return rects; | ||
4955 | } | ||
4956 | } | ||
4957 | function getEntrySpanEnd(entry) { | ||
4958 | return entry.span.end; | ||
4959 | } | ||
4960 | function buildEntryKey(entry) { | ||
4961 | return entry.index + ':' + entry.span.start; | ||
4962 | } | ||
4963 | // returns groups with entries sorted by input order | ||
4964 | function groupIntersectingEntries(entries) { | ||
4965 | let merges = []; | ||
4966 | for (let entry of entries) { | ||
4967 | let filteredMerges = []; | ||
4968 | let hungryMerge = { | ||
4969 | span: entry.span, | ||
4970 | entries: [entry], | ||
4971 | }; | ||
4972 | for (let merge of merges) { | ||
4973 | if (intersectSpans(merge.span, hungryMerge.span)) { | ||
4974 | hungryMerge = { | ||
4975 | entries: merge.entries.concat(hungryMerge.entries), | ||
4976 | span: joinSpans(merge.span, hungryMerge.span), | ||
4977 | }; | ||
4978 | } | ||
4979 | else { | ||
4980 | filteredMerges.push(merge); | ||
4981 | } | ||
4982 | } | ||
4983 | filteredMerges.push(hungryMerge); | ||
4984 | merges = filteredMerges; | ||
4985 | } | ||
4986 | return merges; | ||
4987 | } | ||
4988 | function joinSpans(span0, span1) { | ||
4989 | return { | ||
4990 | start: Math.min(span0.start, span1.start), | ||
4991 | end: Math.max(span0.end, span1.end), | ||
4992 | }; | ||
4993 | } | ||
4994 | function intersectSpans(span0, span1) { | ||
4995 | let start = Math.max(span0.start, span1.start); | ||
4996 | let end = Math.min(span0.end, span1.end); | ||
4997 | if (start < end) { | ||
4998 | return { start, end }; | ||
4999 | } | ||
5000 | return null; | ||
5001 | } | ||
5002 | // general util | ||
5003 | // --------------------------------------------------------------------------------------------------------------------- | ||
5004 | function insertAt(arr, index, item) { | ||
5005 | arr.splice(index, 0, item); | ||
5006 | } | ||
5007 | function binarySearch(a, searchVal, getItemVal) { | ||
5008 | let startIndex = 0; | ||
5009 | let endIndex = a.length; // exclusive | ||
5010 | if (!endIndex || searchVal < getItemVal(a[startIndex])) { // no items OR before first item | ||
5011 | return [0, 0]; | ||
5012 | } | ||
5013 | if (searchVal > getItemVal(a[endIndex - 1])) { // after last item | ||
5014 | return [endIndex, 0]; | ||
5015 | } | ||
5016 | while (startIndex < endIndex) { | ||
5017 | let middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2); | ||
5018 | let middleVal = getItemVal(a[middleIndex]); | ||
5019 | if (searchVal < middleVal) { | ||
5020 | endIndex = middleIndex; | ||
5021 | } | ||
5022 | else if (searchVal > middleVal) { | ||
5023 | startIndex = middleIndex + 1; | ||
5024 | } | ||
5025 | else { // equal! | ||
5026 | return [middleIndex, 1]; | ||
5027 | } | ||
5028 | } | ||
5029 | return [startIndex, 0]; | ||
5030 | } | ||
5031 | |||
5032 | class Interaction { | ||
5033 | constructor(settings) { | ||
5034 | this.component = settings.component; | ||
5035 | this.isHitComboAllowed = settings.isHitComboAllowed || null; | ||
5036 | } | ||
5037 | destroy() { | ||
5038 | } | ||
5039 | } | ||
5040 | function parseInteractionSettings(component, input) { | ||
5041 | return { | ||
5042 | component, | ||
5043 | el: input.el, | ||
5044 | useEventCenter: input.useEventCenter != null ? input.useEventCenter : true, | ||
5045 | isHitComboAllowed: input.isHitComboAllowed || null, | ||
5046 | }; | ||
5047 | } | ||
5048 | function interactionSettingsToStore(settings) { | ||
5049 | return { | ||
5050 | [settings.component.uid]: settings, | ||
5051 | }; | ||
5052 | } | ||
5053 | // global state | ||
5054 | const interactionSettingsStore = {}; | ||
5055 | |||
5056 | /* | ||
5057 | An abstraction for a dragging interaction originating on an event. | ||
5058 | Does higher-level things than PointerDragger, such as possibly: | ||
5059 | - a "mirror" that moves with the pointer | ||
5060 | - a minimum number of pixels or other criteria for a true drag to begin | ||
5061 | |||
5062 | subclasses must emit: | ||
5063 | - pointerdown | ||
5064 | - dragstart | ||
5065 | - dragmove | ||
5066 | - pointerup | ||
5067 | - dragend | ||
5068 | */ | ||
5069 | class ElementDragging { | ||
5070 | constructor(el, selector) { | ||
5071 | this.emitter = new Emitter(); | ||
5072 | } | ||
5073 | destroy() { | ||
5074 | } | ||
5075 | setMirrorIsVisible(bool) { | ||
5076 | // optional if subclass doesn't want to support a mirror | ||
5077 | } | ||
5078 | setMirrorNeedsRevert(bool) { | ||
5079 | // optional if subclass doesn't want to support a mirror | ||
5080 | } | ||
5081 | setAutoScrollEnabled(bool) { | ||
5082 | // optional | ||
5083 | } | ||
5084 | } | ||
5085 | |||
5086 | // TODO: get rid of this in favor of options system, | ||
5087 | // tho it's really easy to access this globally rather than pass thru options. | ||
5088 | const config = {}; | ||
5089 | |||
5090 | /* | ||
5091 | Information about what will happen when an external element is dragged-and-dropped | ||
5092 | onto a calendar. Contains information for creating an event. | ||
5093 | */ | ||
5094 | const DRAG_META_REFINERS = { | ||
5095 | startTime: createDuration, | ||
5096 | duration: createDuration, | ||
5097 | create: Boolean, | ||
5098 | sourceId: String, | ||
5099 | }; | ||
5100 | function parseDragMeta(raw) { | ||
5101 | let { refined, extra } = refineProps(raw, DRAG_META_REFINERS); | ||
5102 | return { | ||
5103 | startTime: refined.startTime || null, | ||
5104 | duration: refined.duration || null, | ||
5105 | create: refined.create != null ? refined.create : true, | ||
5106 | sourceId: refined.sourceId, | ||
5107 | leftoverProps: extra, | ||
5108 | }; | ||
5109 | } | ||
5110 | |||
5111 | class CalendarRoot extends BaseComponent { | ||
5112 | constructor() { | ||
5113 | super(...arguments); | ||
5114 | this.state = { | ||
5115 | forPrint: false, | ||
5116 | }; | ||
5117 | this.handleBeforePrint = () => { | ||
5118 | flushSync(() => { | ||
5119 | this.setState({ forPrint: true }); | ||
5120 | }); | ||
5121 | }; | ||
5122 | this.handleAfterPrint = () => { | ||
5123 | flushSync(() => { | ||
5124 | this.setState({ forPrint: false }); | ||
5125 | }); | ||
5126 | }; | ||
5127 | } | ||
5128 | render() { | ||
5129 | let { props } = this; | ||
5130 | let { options } = props; | ||
5131 | let { forPrint } = this.state; | ||
5132 | let isHeightAuto = forPrint || options.height === 'auto' || options.contentHeight === 'auto'; | ||
5133 | let height = (!isHeightAuto && options.height != null) ? options.height : ''; | ||
5134 | let classNames = [ | ||
5135 | 'fc', | ||
5136 | forPrint ? 'fc-media-print' : 'fc-media-screen', | ||
5137 | `fc-direction-${options.direction}`, | ||
5138 | props.theme.getClass('root'), | ||
5139 | ]; | ||
5140 | if (!getCanVGrowWithinCell()) { | ||
5141 | classNames.push('fc-liquid-hack'); | ||
5142 | } | ||
5143 | return props.children(classNames, height, isHeightAuto, forPrint); | ||
5144 | } | ||
5145 | componentDidMount() { | ||
5146 | let { emitter } = this.props; | ||
5147 | emitter.on('_beforeprint', this.handleBeforePrint); | ||
5148 | emitter.on('_afterprint', this.handleAfterPrint); | ||
5149 | } | ||
5150 | componentWillUnmount() { | ||
5151 | let { emitter } = this.props; | ||
5152 | emitter.off('_beforeprint', this.handleBeforePrint); | ||
5153 | emitter.off('_afterprint', this.handleAfterPrint); | ||
5154 | } | ||
5155 | } | ||
5156 | |||
5157 | // Computes a default column header formatting string if `colFormat` is not explicitly defined | ||
5158 | function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) { | ||
5159 | // if more than one week row, or if there are a lot of columns with not much space, | ||
5160 | // put just the day numbers will be in each cell | ||
5161 | if (!datesRepDistinctDays || dayCnt > 10) { | ||
5162 | return createFormatter({ weekday: 'short' }); // "Sat" | ||
5163 | } | ||
5164 | if (dayCnt > 1) { | ||
5165 | return createFormatter({ weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }); // "Sat 11/12" | ||
5166 | } | ||
5167 | return createFormatter({ weekday: 'long' }); // "Saturday" | ||
5168 | } | ||
5169 | |||
5170 | const CLASS_NAME = 'fc-col-header-cell'; // do the cushion too? no | ||
5171 | function renderInner$1(renderProps) { | ||
5172 | return renderProps.text; | ||
5173 | } | ||
5174 | |||
5175 | class ContentInjector extends BaseComponent { | ||
5176 | constructor() { | ||
5177 | super(...arguments); | ||
5178 | this.id = guid(); | ||
5179 | this.queuedDomNodes = []; | ||
5180 | this.currentDomNodes = []; | ||
5181 | this.handleEl = (el) => { | ||
5182 | const { options } = this.context; | ||
5183 | const { generatorName } = this.props; | ||
5184 | if (!options.customRenderingReplaces || !hasCustomRenderingHandler(generatorName, options)) { | ||
5185 | this.updateElRef(el); | ||
5186 | } | ||
5187 | }; | ||
5188 | this.updateElRef = (el) => { | ||
5189 | if (this.props.elRef) { | ||
5190 | setRef(this.props.elRef, el); | ||
5191 | } | ||
5192 | }; | ||
5193 | } | ||
5194 | render() { | ||
5195 | const { props, context } = this; | ||
5196 | const { options } = context; | ||
5197 | const { customGenerator, defaultGenerator, renderProps } = props; | ||
5198 | const attrs = buildElAttrs(props, [], this.handleEl); | ||
5199 | let useDefault = false; | ||
5200 | let innerContent; | ||
5201 | let queuedDomNodes = []; | ||
5202 | let currentGeneratorMeta; | ||
5203 | if (customGenerator != null) { | ||
5204 | const customGeneratorRes = typeof customGenerator === 'function' ? | ||
5205 | customGenerator(renderProps, y) : | ||
5206 | customGenerator; | ||
5207 | if (customGeneratorRes === true) { | ||
5208 | useDefault = true; | ||
5209 | } | ||
5210 | else { | ||
5211 | const isObject = customGeneratorRes && typeof customGeneratorRes === 'object'; // non-null | ||
5212 | if (isObject && ('html' in customGeneratorRes)) { | ||
5213 | attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html }; | ||
5214 | } | ||
5215 | else if (isObject && ('domNodes' in customGeneratorRes)) { | ||
5216 | queuedDomNodes = Array.prototype.slice.call(customGeneratorRes.domNodes); | ||
5217 | } | ||
5218 | else if (isObject | ||
5219 | ? i$1(customGeneratorRes) // vdom node | ||
5220 | : typeof customGeneratorRes !== 'function' // primitive value (like string or number) | ||
5221 | ) { | ||
5222 | // use in vdom | ||
5223 | innerContent = customGeneratorRes; | ||
5224 | } | ||
5225 | else { | ||
5226 | // an exotic object for handleCustomRendering | ||
5227 | currentGeneratorMeta = customGeneratorRes; | ||
5228 | } | ||
5229 | } | ||
5230 | } | ||
5231 | else { | ||
5232 | useDefault = !hasCustomRenderingHandler(props.generatorName, options); | ||
5233 | } | ||
5234 | if (useDefault && defaultGenerator) { | ||
5235 | innerContent = defaultGenerator(renderProps); | ||
5236 | } | ||
5237 | this.queuedDomNodes = queuedDomNodes; | ||
5238 | this.currentGeneratorMeta = currentGeneratorMeta; | ||
5239 | return y(props.elTag, attrs, innerContent); | ||
5240 | } | ||
5241 | componentDidMount() { | ||
5242 | this.applyQueueudDomNodes(); | ||
5243 | this.triggerCustomRendering(true); | ||
5244 | } | ||
5245 | componentDidUpdate() { | ||
5246 | this.applyQueueudDomNodes(); | ||
5247 | this.triggerCustomRendering(true); | ||
5248 | } | ||
5249 | componentWillUnmount() { | ||
5250 | this.triggerCustomRendering(false); // TODO: different API for removal? | ||
5251 | } | ||
5252 | triggerCustomRendering(isActive) { | ||
5253 | var _a; | ||
5254 | const { props, context } = this; | ||
5255 | const { handleCustomRendering, customRenderingMetaMap } = context.options; | ||
5256 | if (handleCustomRendering) { | ||
5257 | const generatorMeta = (_a = this.currentGeneratorMeta) !== null && _a !== void 0 ? _a : customRenderingMetaMap === null || customRenderingMetaMap === void 0 ? void 0 : customRenderingMetaMap[props.generatorName]; | ||
5258 | if (generatorMeta) { | ||
5259 | handleCustomRendering(Object.assign(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.updateElRef, // front-end framework tells us about new container els | ||
5260 | generatorMeta }, props), { elClasses: (props.elClasses || []).filter(isTruthy) })); | ||
5261 | } | ||
5262 | } | ||
5263 | } | ||
5264 | applyQueueudDomNodes() { | ||
5265 | const { queuedDomNodes, currentDomNodes } = this; | ||
5266 | const el = this.base; | ||
5267 | if (!isArraysEqual(queuedDomNodes, currentDomNodes)) { | ||
5268 | currentDomNodes.forEach(removeElement); | ||
5269 | for (let newNode of queuedDomNodes) { | ||
5270 | el.appendChild(newNode); | ||
5271 | } | ||
5272 | this.currentDomNodes = queuedDomNodes; | ||
5273 | } | ||
5274 | } | ||
5275 | } | ||
5276 | ContentInjector.addPropsEquality({ | ||
5277 | elClasses: isArraysEqual, | ||
5278 | elStyle: isPropsEqual, | ||
5279 | elAttrs: isNonHandlerPropsEqual, | ||
5280 | renderProps: isPropsEqual, | ||
5281 | }); | ||
5282 | // Util | ||
5283 | /* | ||
5284 | Does UI-framework provide custom way of rendering that does not use Preact VDOM | ||
5285 | AND does the calendar's options define custom rendering? | ||
5286 | AKA. Should we NOT render the default content? | ||
5287 | */ | ||
5288 | function hasCustomRenderingHandler(generatorName, options) { | ||
5289 | var _a; | ||
5290 | return Boolean(options.handleCustomRendering && | ||
5291 | generatorName && | ||
5292 | ((_a = options.customRenderingMetaMap) === null || _a === void 0 ? void 0 : _a[generatorName])); | ||
5293 | } | ||
5294 | function buildElAttrs(props, extraClassNames, elRef) { | ||
5295 | const attrs = Object.assign(Object.assign({}, props.elAttrs), { ref: elRef }); | ||
5296 | if (props.elClasses || extraClassNames) { | ||
5297 | attrs.className = (props.elClasses || []) | ||
5298 | .concat(extraClassNames || []) | ||
5299 | .concat(attrs.className || []) | ||
5300 | .filter(Boolean) | ||
5301 | .join(' '); | ||
5302 | } | ||
5303 | if (props.elStyle) { | ||
5304 | attrs.style = props.elStyle; | ||
5305 | } | ||
5306 | return attrs; | ||
5307 | } | ||
5308 | function isTruthy(val) { | ||
5309 | return Boolean(val); | ||
5310 | } | ||
5311 | |||
5312 | const RenderId = createContext(0); | ||
5313 | |||
5314 | class ContentContainer extends x$1 { | ||
5315 | constructor() { | ||
5316 | super(...arguments); | ||
5317 | this.InnerContent = InnerContentInjector.bind(undefined, this); | ||
5318 | this.handleEl = (el) => { | ||
5319 | this.el = el; | ||
5320 | if (this.props.elRef) { | ||
5321 | setRef(this.props.elRef, el); | ||
5322 | if (el && this.didMountMisfire) { | ||
5323 | this.componentDidMount(); | ||
5324 | } | ||
5325 | } | ||
5326 | }; | ||
5327 | } | ||
5328 | render() { | ||
5329 | const { props } = this; | ||
5330 | const generatedClassNames = generateClassNames(props.classNameGenerator, props.renderProps); | ||
5331 | if (props.children) { | ||
5332 | const elAttrs = buildElAttrs(props, generatedClassNames, this.handleEl); | ||
5333 | const children = props.children(this.InnerContent, props.renderProps, elAttrs); | ||
5334 | if (props.elTag) { | ||
5335 | return y(props.elTag, elAttrs, children); | ||
5336 | } | ||
5337 | else { | ||
5338 | return children; | ||
5339 | } | ||
5340 | } | ||
5341 | else { | ||
5342 | return y((ContentInjector), Object.assign(Object.assign({}, props), { elRef: this.handleEl, elTag: props.elTag || 'div', elClasses: (props.elClasses || []).concat(generatedClassNames), renderId: this.context })); | ||
5343 | } | ||
5344 | } | ||
5345 | componentDidMount() { | ||
5346 | var _a, _b; | ||
5347 | if (this.el) { | ||
5348 | (_b = (_a = this.props).didMount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el })); | ||
5349 | } | ||
5350 | else { | ||
5351 | this.didMountMisfire = true; | ||
5352 | } | ||
5353 | } | ||
5354 | componentWillUnmount() { | ||
5355 | var _a, _b; | ||
5356 | (_b = (_a = this.props).willUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el })); | ||
5357 | } | ||
5358 | } | ||
5359 | ContentContainer.contextType = RenderId; | ||
5360 | function InnerContentInjector(containerComponent, props) { | ||
5361 | const parentProps = containerComponent.props; | ||
5362 | return y((ContentInjector), Object.assign({ renderProps: parentProps.renderProps, generatorName: parentProps.generatorName, customGenerator: parentProps.customGenerator, defaultGenerator: parentProps.defaultGenerator, renderId: containerComponent.context }, props)); | ||
5363 | } | ||
5364 | // Utils | ||
5365 | function generateClassNames(classNameGenerator, renderProps) { | ||
5366 | const classNames = typeof classNameGenerator === 'function' ? | ||
5367 | classNameGenerator(renderProps) : | ||
5368 | classNameGenerator || []; | ||
5369 | return typeof classNames === 'string' ? [classNames] : classNames; | ||
5370 | } | ||
5371 | |||
5372 | // BAD name for this class now. used in the Header | ||
5373 | class TableDateCell extends BaseComponent { | ||
5374 | render() { | ||
5375 | let { dateEnv, options, theme, viewApi } = this.context; | ||
5376 | let { props } = this; | ||
5377 | let { date, dateProfile } = props; | ||
5378 | let dayMeta = getDateMeta(date, props.todayRange, null, dateProfile); | ||
5379 | let classNames = [CLASS_NAME].concat(getDayClassNames(dayMeta, theme)); | ||
5380 | let text = dateEnv.format(date, props.dayHeaderFormat); | ||
5381 | // if colCnt is 1, we are already in a day-view and don't need a navlink | ||
5382 | let navLinkAttrs = (!dayMeta.isDisabled && props.colCnt > 1) | ||
5383 | ? buildNavLinkAttrs(this.context, date) | ||
5384 | : {}; | ||
5385 | let publicDate = dateEnv.toDate(date); | ||
5386 | // workaround for Luxon (and maybe moment) returning prior-days when start-of-day | ||
5387 | // in DST gap: https://github.com/fullcalendar/fullcalendar/issues/7633 | ||
5388 | if (dateEnv.namedTimeZoneImpl) { | ||
5389 | publicDate = addMs(publicDate, 3600000); // add an hour | ||
5390 | } | ||
5391 | let renderProps = Object.assign(Object.assign(Object.assign({ date: publicDate, view: viewApi }, props.extraRenderProps), { text }), dayMeta); | ||
5392 | return (y(ContentContainer, { elTag: "th", elClasses: classNames, elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan, 'data-date': !dayMeta.isDisabled ? formatDayString(date) : undefined }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent", customGenerator: options.dayHeaderContent, defaultGenerator: renderInner$1, classNameGenerator: options.dayHeaderClassNames, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, (InnerContainer) => (y("div", { className: "fc-scrollgrid-sync-inner" }, !dayMeta.isDisabled && (y(InnerContainer, { elTag: "a", elAttrs: navLinkAttrs, elClasses: [ | ||
5393 | 'fc-col-header-cell-cushion', | ||
5394 | props.isSticky && 'fc-sticky', | ||
5395 | ] })))))); | ||
5396 | } | ||
5397 | } | ||
5398 | |||
5399 | const WEEKDAY_FORMAT = createFormatter({ weekday: 'long' }); | ||
5400 | class TableDowCell extends BaseComponent { | ||
5401 | render() { | ||
5402 | let { props } = this; | ||
5403 | let { dateEnv, theme, viewApi, options } = this.context; | ||
5404 | let date = addDays(new Date(259200000), props.dow); // start with Sun, 04 Jan 1970 00:00:00 GMT | ||
5405 | let dateMeta = { | ||
5406 | dow: props.dow, | ||
5407 | isDisabled: false, | ||
5408 | isFuture: false, | ||
5409 | isPast: false, | ||
5410 | isToday: false, | ||
5411 | isOther: false, | ||
5412 | }; | ||
5413 | let text = dateEnv.format(date, props.dayHeaderFormat); | ||
5414 | let renderProps = Object.assign(Object.assign(Object.assign(Object.assign({ // TODO: make this public? | ||
5415 | date }, dateMeta), { view: viewApi }), props.extraRenderProps), { text }); | ||
5416 | return (y(ContentContainer, { elTag: "th", elClasses: [ | ||
5417 | CLASS_NAME, | ||
5418 | ...getDayClassNames(dateMeta, theme), | ||
5419 | ...(props.extraClassNames || []), | ||
5420 | ], elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent", customGenerator: options.dayHeaderContent, defaultGenerator: renderInner$1, classNameGenerator: options.dayHeaderClassNames, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, (InnerContent) => (y("div", { className: "fc-scrollgrid-sync-inner" }, | ||
5421 | y(InnerContent, { elTag: "a", elClasses: [ | ||
5422 | 'fc-col-header-cell-cushion', | ||
5423 | props.isSticky && 'fc-sticky', | ||
5424 | ], elAttrs: { | ||
5425 | 'aria-label': dateEnv.format(date, WEEKDAY_FORMAT), | ||
5426 | } }))))); | ||
5427 | } | ||
5428 | } | ||
5429 | |||
5430 | class NowTimer extends x$1 { | ||
5431 | constructor(props, context) { | ||
5432 | super(props, context); | ||
5433 | this.handleRefresh = () => { | ||
5434 | let timing = this.computeTiming(); | ||
5435 | if (timing.state.nowDate.valueOf() !== this.state.nowDate.valueOf()) { | ||
5436 | this.setState(timing.state); | ||
5437 | } | ||
5438 | this.clearTimeout(); | ||
5439 | this.setTimeout(timing.waitMs); | ||
5440 | }; | ||
5441 | this.handleVisibilityChange = () => { | ||
5442 | if (!document.hidden) { | ||
5443 | this.handleRefresh(); | ||
5444 | } | ||
5445 | }; | ||
5446 | this.state = this.computeTiming().state; | ||
5447 | } | ||
5448 | render() { | ||
5449 | let { props, state } = this; | ||
5450 | return props.children(state.nowDate, state.todayRange); | ||
5451 | } | ||
5452 | componentDidMount() { | ||
5453 | this.setTimeout(); | ||
5454 | this.context.nowManager.addResetListener(this.handleRefresh); | ||
5455 | // fired tab becomes visible after being hidden | ||
5456 | document.addEventListener('visibilitychange', this.handleVisibilityChange); | ||
5457 | } | ||
5458 | componentDidUpdate(prevProps) { | ||
5459 | if (prevProps.unit !== this.props.unit) { | ||
5460 | this.clearTimeout(); | ||
5461 | this.setTimeout(); | ||
5462 | } | ||
5463 | } | ||
5464 | componentWillUnmount() { | ||
5465 | this.clearTimeout(); | ||
5466 | this.context.nowManager.removeResetListener(this.handleRefresh); | ||
5467 | document.removeEventListener('visibilitychange', this.handleVisibilityChange); | ||
5468 | } | ||
5469 | computeTiming() { | ||
5470 | let { props, context } = this; | ||
5471 | let unroundedNow = context.nowManager.getDateMarker(); | ||
5472 | let currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit); | ||
5473 | let nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit)); | ||
5474 | let waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf(); | ||
5475 | // there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342) | ||
5476 | // ensure no longer than a day | ||
5477 | waitMs = Math.min(1000 * 60 * 60 * 24, waitMs); | ||
5478 | return { | ||
5479 | state: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) }, | ||
5480 | waitMs, | ||
5481 | }; | ||
5482 | } | ||
5483 | setTimeout(waitMs = this.computeTiming().waitMs) { | ||
5484 | // NOTE: timeout could take longer than expected if tab sleeps, | ||
5485 | // which is why we listen to 'visibilitychange' | ||
5486 | this.timeoutId = setTimeout(() => { | ||
5487 | // NOTE: timeout could also return *earlier* than expected, and we need to wait 2 ms more | ||
5488 | // This is why use use same waitMs from computeTiming, so we don't skip an interval while | ||
5489 | // .setState() is executing | ||
5490 | const timing = this.computeTiming(); | ||
5491 | this.setState(timing.state, () => { | ||
5492 | this.setTimeout(timing.waitMs); | ||
5493 | }); | ||
5494 | }, waitMs); | ||
5495 | } | ||
5496 | clearTimeout() { | ||
5497 | if (this.timeoutId) { | ||
5498 | clearTimeout(this.timeoutId); | ||
5499 | } | ||
5500 | } | ||
5501 | } | ||
5502 | NowTimer.contextType = ViewContextType; | ||
5503 | function buildDayRange(date) { | ||
5504 | let start = startOfDay(date); | ||
5505 | let end = addDays(start, 1); | ||
5506 | return { start, end }; | ||
5507 | } | ||
5508 | |||
5509 | class DayHeader extends BaseComponent { | ||
5510 | constructor() { | ||
5511 | super(...arguments); | ||
5512 | this.createDayHeaderFormatter = memoize(createDayHeaderFormatter); | ||
5513 | } | ||
5514 | render() { | ||
5515 | let { context } = this; | ||
5516 | let { dates, dateProfile, datesRepDistinctDays, renderIntro } = this.props; | ||
5517 | let dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, dates.length); | ||
5518 | return (y(NowTimer, { unit: "day" }, (nowDate, todayRange) => (y("tr", { role: "row" }, | ||
5519 | renderIntro && renderIntro('day'), | ||
5520 | dates.map((date) => (datesRepDistinctDays ? (y(TableDateCell, { key: date.toISOString(), date: date, dateProfile: dateProfile, todayRange: todayRange, colCnt: dates.length, dayHeaderFormat: dayHeaderFormat })) : (y(TableDowCell, { key: date.getUTCDay(), dow: date.getUTCDay(), dayHeaderFormat: dayHeaderFormat })))))))); | ||
5521 | } | ||
5522 | } | ||
5523 | function createDayHeaderFormatter(explicitFormat, datesRepDistinctDays, dateCnt) { | ||
5524 | return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt); | ||
5525 | } | ||
5526 | |||
5527 | class DaySeriesModel { | ||
5528 | constructor(range, dateProfileGenerator) { | ||
5529 | let date = range.start; | ||
5530 | let { end } = range; | ||
5531 | let indices = []; | ||
5532 | let dates = []; | ||
5533 | let dayIndex = -1; | ||
5534 | while (date < end) { // loop each day from start to end | ||
5535 | if (dateProfileGenerator.isHiddenDay(date)) { | ||
5536 | indices.push(dayIndex + 0.5); // mark that it's between indices | ||
5537 | } | ||
5538 | else { | ||
5539 | dayIndex += 1; | ||
5540 | indices.push(dayIndex); | ||
5541 | dates.push(date); | ||
5542 | } | ||
5543 | date = addDays(date, 1); | ||
5544 | } | ||
5545 | this.dates = dates; | ||
5546 | this.indices = indices; | ||
5547 | this.cnt = dates.length; | ||
5548 | } | ||
5549 | sliceRange(range) { | ||
5550 | let firstIndex = this.getDateDayIndex(range.start); // inclusive first index | ||
5551 | let lastIndex = this.getDateDayIndex(addDays(range.end, -1)); // inclusive last index | ||
5552 | let clippedFirstIndex = Math.max(0, firstIndex); | ||
5553 | let clippedLastIndex = Math.min(this.cnt - 1, lastIndex); | ||
5554 | // deal with in-between indices | ||
5555 | clippedFirstIndex = Math.ceil(clippedFirstIndex); // in-between starts round to next cell | ||
5556 | clippedLastIndex = Math.floor(clippedLastIndex); // in-between ends round to prev cell | ||
5557 | if (clippedFirstIndex <= clippedLastIndex) { | ||
5558 | return { | ||
5559 | firstIndex: clippedFirstIndex, | ||
5560 | lastIndex: clippedLastIndex, | ||
5561 | isStart: firstIndex === clippedFirstIndex, | ||
5562 | isEnd: lastIndex === clippedLastIndex, | ||
5563 | }; | ||
5564 | } | ||
5565 | return null; | ||
5566 | } | ||
5567 | // Given a date, returns its chronolocial cell-index from the first cell of the grid. | ||
5568 | // If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets. | ||
5569 | // If before the first offset, returns a negative number. | ||
5570 | // If after the last offset, returns an offset past the last cell offset. | ||
5571 | // Only works for *start* dates of cells. Will not work for exclusive end dates for cells. | ||
5572 | getDateDayIndex(date) { | ||
5573 | let { indices } = this; | ||
5574 | let dayOffset = Math.floor(diffDays(this.dates[0], date)); | ||
5575 | if (dayOffset < 0) { | ||
5576 | return indices[0] - 1; | ||
5577 | } | ||
5578 | if (dayOffset >= indices.length) { | ||
5579 | return indices[indices.length - 1] + 1; | ||
5580 | } | ||
5581 | return indices[dayOffset]; | ||
5582 | } | ||
5583 | } | ||
5584 | |||
5585 | class DayTableModel { | ||
5586 | constructor(daySeries, breakOnWeeks) { | ||
5587 | let { dates } = daySeries; | ||
5588 | let daysPerRow; | ||
5589 | let firstDay; | ||
5590 | let rowCnt; | ||
5591 | if (breakOnWeeks) { | ||
5592 | // count columns until the day-of-week repeats | ||
5593 | firstDay = dates[0].getUTCDay(); | ||
5594 | for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) { | ||
5595 | if (dates[daysPerRow].getUTCDay() === firstDay) { | ||
5596 | break; | ||
5597 | } | ||
5598 | } | ||
5599 | rowCnt = Math.ceil(dates.length / daysPerRow); | ||
5600 | } | ||
5601 | else { | ||
5602 | rowCnt = 1; | ||
5603 | daysPerRow = dates.length; | ||
5604 | } | ||
5605 | this.rowCnt = rowCnt; | ||
5606 | this.colCnt = daysPerRow; | ||
5607 | this.daySeries = daySeries; | ||
5608 | this.cells = this.buildCells(); | ||
5609 | this.headerDates = this.buildHeaderDates(); | ||
5610 | } | ||
5611 | buildCells() { | ||
5612 | let rows = []; | ||
5613 | for (let row = 0; row < this.rowCnt; row += 1) { | ||
5614 | let cells = []; | ||
5615 | for (let col = 0; col < this.colCnt; col += 1) { | ||
5616 | cells.push(this.buildCell(row, col)); | ||
5617 | } | ||
5618 | rows.push(cells); | ||
5619 | } | ||
5620 | return rows; | ||
5621 | } | ||
5622 | buildCell(row, col) { | ||
5623 | let date = this.daySeries.dates[row * this.colCnt + col]; | ||
5624 | return { | ||
5625 | key: date.toISOString(), | ||
5626 | date, | ||
5627 | }; | ||
5628 | } | ||
5629 | buildHeaderDates() { | ||
5630 | let dates = []; | ||
5631 | for (let col = 0; col < this.colCnt; col += 1) { | ||
5632 | dates.push(this.cells[0][col].date); | ||
5633 | } | ||
5634 | return dates; | ||
5635 | } | ||
5636 | sliceRange(range) { | ||
5637 | let { colCnt } = this; | ||
5638 | let seriesSeg = this.daySeries.sliceRange(range); | ||
5639 | let segs = []; | ||
5640 | if (seriesSeg) { | ||
5641 | let { firstIndex, lastIndex } = seriesSeg; | ||
5642 | let index = firstIndex; | ||
5643 | while (index <= lastIndex) { | ||
5644 | let row = Math.floor(index / colCnt); | ||
5645 | let nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1); | ||
5646 | segs.push({ | ||
5647 | row, | ||
5648 | firstCol: index % colCnt, | ||
5649 | lastCol: (nextIndex - 1) % colCnt, | ||
5650 | isStart: seriesSeg.isStart && index === firstIndex, | ||
5651 | isEnd: seriesSeg.isEnd && (nextIndex - 1) === lastIndex, | ||
5652 | }); | ||
5653 | index = nextIndex; | ||
5654 | } | ||
5655 | } | ||
5656 | return segs; | ||
5657 | } | ||
5658 | } | ||
5659 | |||
5660 | class Slicer { | ||
5661 | constructor() { | ||
5662 | this.sliceBusinessHours = memoize(this._sliceBusinessHours); | ||
5663 | this.sliceDateSelection = memoize(this._sliceDateSpan); | ||
5664 | this.sliceEventStore = memoize(this._sliceEventStore); | ||
5665 | this.sliceEventDrag = memoize(this._sliceInteraction); | ||
5666 | this.sliceEventResize = memoize(this._sliceInteraction); | ||
5667 | this.forceDayIfListItem = false; // hack | ||
5668 | } | ||
5669 | sliceProps(props, dateProfile, nextDayThreshold, context, ...extraArgs) { | ||
5670 | let { eventUiBases } = props; | ||
5671 | let eventSegs = this.sliceEventStore(props.eventStore, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs); | ||
5672 | return { | ||
5673 | dateSelectionSegs: this.sliceDateSelection(props.dateSelection, dateProfile, nextDayThreshold, eventUiBases, context, ...extraArgs), | ||
5674 | businessHourSegs: this.sliceBusinessHours(props.businessHours, dateProfile, nextDayThreshold, context, ...extraArgs), | ||
5675 | fgEventSegs: eventSegs.fg, | ||
5676 | bgEventSegs: eventSegs.bg, | ||
5677 | eventDrag: this.sliceEventDrag(props.eventDrag, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs), | ||
5678 | eventResize: this.sliceEventResize(props.eventResize, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs), | ||
5679 | eventSelection: props.eventSelection, | ||
5680 | }; // TODO: give interactionSegs? | ||
5681 | } | ||
5682 | sliceNowDate(// does not memoize | ||
5683 | date, dateProfile, nextDayThreshold, context, ...extraArgs) { | ||
5684 | return this._sliceDateSpan({ range: { start: date, end: addMs(date, 1) }, allDay: false }, // add 1 ms, protect against null range | ||
5685 | dateProfile, nextDayThreshold, {}, context, ...extraArgs); | ||
5686 | } | ||
5687 | _sliceBusinessHours(businessHours, dateProfile, nextDayThreshold, context, ...extraArgs) { | ||
5688 | if (!businessHours) { | ||
5689 | return []; | ||
5690 | } | ||
5691 | return this._sliceEventStore(expandRecurring(businessHours, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), context), {}, dateProfile, nextDayThreshold, ...extraArgs).bg; | ||
5692 | } | ||
5693 | _sliceEventStore(eventStore, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs) { | ||
5694 | if (eventStore) { | ||
5695 | let rangeRes = sliceEventStore(eventStore, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold); | ||
5696 | return { | ||
5697 | bg: this.sliceEventRanges(rangeRes.bg, extraArgs), | ||
5698 | fg: this.sliceEventRanges(rangeRes.fg, extraArgs), | ||
5699 | }; | ||
5700 | } | ||
5701 | return { bg: [], fg: [] }; | ||
5702 | } | ||
5703 | _sliceInteraction(interaction, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs) { | ||
5704 | if (!interaction) { | ||
5705 | return null; | ||
5706 | } | ||
5707 | let rangeRes = sliceEventStore(interaction.mutatedEvents, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold); | ||
5708 | return { | ||
5709 | segs: this.sliceEventRanges(rangeRes.fg, extraArgs), | ||
5710 | affectedInstances: interaction.affectedEvents.instances, | ||
5711 | isEvent: interaction.isEvent, | ||
5712 | }; | ||
5713 | } | ||
5714 | _sliceDateSpan(dateSpan, dateProfile, nextDayThreshold, eventUiBases, context, ...extraArgs) { | ||
5715 | if (!dateSpan) { | ||
5716 | return []; | ||
5717 | } | ||
5718 | let activeRange = computeActiveRange(dateProfile, Boolean(nextDayThreshold)); | ||
5719 | let activeDateSpanRange = intersectRanges(dateSpan.range, activeRange); | ||
5720 | if (activeDateSpanRange) { | ||
5721 | dateSpan = Object.assign(Object.assign({}, dateSpan), { range: activeDateSpanRange }); | ||
5722 | let eventRange = fabricateEventRange(dateSpan, eventUiBases, context); | ||
5723 | let segs = this.sliceRange(dateSpan.range, ...extraArgs); | ||
5724 | for (let seg of segs) { | ||
5725 | seg.eventRange = eventRange; | ||
5726 | } | ||
5727 | return segs; | ||
5728 | } | ||
5729 | return []; | ||
5730 | } | ||
5731 | /* | ||
5732 | "complete" seg means it has component and eventRange | ||
5733 | */ | ||
5734 | sliceEventRanges(eventRanges, extraArgs) { | ||
5735 | let segs = []; | ||
5736 | for (let eventRange of eventRanges) { | ||
5737 | segs.push(...this.sliceEventRange(eventRange, extraArgs)); | ||
5738 | } | ||
5739 | return segs; | ||
5740 | } | ||
5741 | /* | ||
5742 | "complete" seg means it has component and eventRange | ||
5743 | */ | ||
5744 | sliceEventRange(eventRange, extraArgs) { | ||
5745 | let dateRange = eventRange.range; | ||
5746 | // hack to make multi-day events that are being force-displayed as list-items to take up only one day | ||
5747 | if (this.forceDayIfListItem && eventRange.ui.display === 'list-item') { | ||
5748 | dateRange = { | ||
5749 | start: dateRange.start, | ||
5750 | end: addDays(dateRange.start, 1), | ||
5751 | }; | ||
5752 | } | ||
5753 | let segs = this.sliceRange(dateRange, ...extraArgs); | ||
5754 | for (let seg of segs) { | ||
5755 | seg.eventRange = eventRange; | ||
5756 | seg.isStart = eventRange.isStart && seg.isStart; | ||
5757 | seg.isEnd = eventRange.isEnd && seg.isEnd; | ||
5758 | } | ||
5759 | return segs; | ||
5760 | } | ||
5761 | } | ||
5762 | /* | ||
5763 | for incorporating slotMinTime/slotMaxTime if appropriate | ||
5764 | TODO: should be part of DateProfile! | ||
5765 | TimelineDateProfile already does this btw | ||
5766 | */ | ||
5767 | function computeActiveRange(dateProfile, isComponentAllDay) { | ||
5768 | let range = dateProfile.activeRange; | ||
5769 | if (isComponentAllDay) { | ||
5770 | return range; | ||
5771 | } | ||
5772 | return { | ||
5773 | start: addMs(range.start, dateProfile.slotMinTime.milliseconds), | ||
5774 | end: addMs(range.end, dateProfile.slotMaxTime.milliseconds - 864e5), // 864e5 = ms in a day | ||
5775 | }; | ||
5776 | } | ||
5777 | |||
5778 | function reduceEventStore(eventStore, action, eventSources, dateProfile, context) { | ||
5779 | switch (action.type) { | ||
5780 | case 'RECEIVE_EVENTS': // raw | ||
5781 | return receiveRawEvents(eventStore, eventSources[action.sourceId], action.fetchId, action.fetchRange, action.rawEvents, context); | ||
5782 | case 'RESET_RAW_EVENTS': | ||
5783 | return resetRawEvents(eventStore, eventSources[action.sourceId], action.rawEvents, dateProfile.activeRange, context); | ||
5784 | case 'ADD_EVENTS': // already parsed, but not expanded | ||
5785 | return addEvent(eventStore, action.eventStore, // new ones | ||
5786 | dateProfile ? dateProfile.activeRange : null, context); | ||
5787 | case 'RESET_EVENTS': | ||
5788 | return action.eventStore; | ||
5789 | case 'MERGE_EVENTS': // already parsed and expanded | ||
5790 | return mergeEventStores(eventStore, action.eventStore); | ||
5791 | case 'PREV': // TODO: how do we track all actions that affect dateProfile :( | ||
5792 | case 'NEXT': | ||
5793 | case 'CHANGE_DATE': | ||
5794 | case 'CHANGE_VIEW_TYPE': | ||
5795 | if (dateProfile) { | ||
5796 | return expandRecurring(eventStore, dateProfile.activeRange, context); | ||
5797 | } | ||
5798 | return eventStore; | ||
5799 | case 'REMOVE_EVENTS': | ||
5800 | return excludeSubEventStore(eventStore, action.eventStore); | ||
5801 | case 'REMOVE_EVENT_SOURCE': | ||
5802 | return excludeEventsBySourceId(eventStore, action.sourceId); | ||
5803 | case 'REMOVE_ALL_EVENT_SOURCES': | ||
5804 | return filterEventStoreDefs(eventStore, (eventDef) => (!eventDef.sourceId // only keep events with no source id | ||
5805 | )); | ||
5806 | case 'REMOVE_ALL_EVENTS': | ||
5807 | return createEmptyEventStore(); | ||
5808 | default: | ||
5809 | return eventStore; | ||
5810 | } | ||
5811 | } | ||
5812 | function receiveRawEvents(eventStore, eventSource, fetchId, fetchRange, rawEvents, context) { | ||
5813 | if (eventSource && // not already removed | ||
5814 | fetchId === eventSource.latestFetchId // TODO: wish this logic was always in event-sources | ||
5815 | ) { | ||
5816 | let subset = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context); | ||
5817 | if (fetchRange) { | ||
5818 | subset = expandRecurring(subset, fetchRange, context); | ||
5819 | } | ||
5820 | return mergeEventStores(excludeEventsBySourceId(eventStore, eventSource.sourceId), subset); | ||
5821 | } | ||
5822 | return eventStore; | ||
5823 | } | ||
5824 | function resetRawEvents(existingEventStore, eventSource, rawEvents, activeRange, context) { | ||
5825 | const { defIdMap, instanceIdMap } = buildPublicIdMaps(existingEventStore); | ||
5826 | let newEventStore = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context, false, defIdMap, instanceIdMap); | ||
5827 | return expandRecurring(newEventStore, activeRange, context); | ||
5828 | } | ||
5829 | function transformRawEvents(rawEvents, eventSource, context) { | ||
5830 | let calEachTransform = context.options.eventDataTransform; | ||
5831 | let sourceEachTransform = eventSource ? eventSource.eventDataTransform : null; | ||
5832 | if (sourceEachTransform) { | ||
5833 | rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform); | ||
5834 | } | ||
5835 | if (calEachTransform) { | ||
5836 | rawEvents = transformEachRawEvent(rawEvents, calEachTransform); | ||
5837 | } | ||
5838 | return rawEvents; | ||
5839 | } | ||
5840 | function transformEachRawEvent(rawEvents, func) { | ||
5841 | let refinedEvents; | ||
5842 | if (!func) { | ||
5843 | refinedEvents = rawEvents; | ||
5844 | } | ||
5845 | else { | ||
5846 | refinedEvents = []; | ||
5847 | for (let rawEvent of rawEvents) { | ||
5848 | let refinedEvent = func(rawEvent); | ||
5849 | if (refinedEvent) { | ||
5850 | refinedEvents.push(refinedEvent); | ||
5851 | } | ||
5852 | else if (refinedEvent == null) { | ||
5853 | refinedEvents.push(rawEvent); | ||
5854 | } // if a different falsy value, do nothing | ||
5855 | } | ||
5856 | } | ||
5857 | return refinedEvents; | ||
5858 | } | ||
5859 | function addEvent(eventStore, subset, expandRange, context) { | ||
5860 | if (expandRange) { | ||
5861 | subset = expandRecurring(subset, expandRange, context); | ||
5862 | } | ||
5863 | return mergeEventStores(eventStore, subset); | ||
5864 | } | ||
5865 | function rezoneEventStoreDates(eventStore, oldDateEnv, newDateEnv) { | ||
5866 | let { defs } = eventStore; | ||
5867 | let instances = mapHash(eventStore.instances, (instance) => { | ||
5868 | let def = defs[instance.defId]; | ||
5869 | if (def.allDay) { | ||
5870 | return instance; // isn't dependent on timezone | ||
5871 | } | ||
5872 | return Object.assign(Object.assign({}, instance), { range: { | ||
5873 | start: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start, instance.forcedStartTzo)), | ||
5874 | end: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end, instance.forcedEndTzo)), | ||
5875 | }, forcedStartTzo: newDateEnv.canComputeOffset ? null : instance.forcedStartTzo, forcedEndTzo: newDateEnv.canComputeOffset ? null : instance.forcedEndTzo }); | ||
5876 | }); | ||
5877 | return { defs, instances }; | ||
5878 | } | ||
5879 | function excludeEventsBySourceId(eventStore, sourceId) { | ||
5880 | return filterEventStoreDefs(eventStore, (eventDef) => eventDef.sourceId !== sourceId); | ||
5881 | } | ||
5882 | // QUESTION: why not just return instances? do a general object-property-exclusion util | ||
5883 | function excludeInstances(eventStore, removals) { | ||
5884 | return { | ||
5885 | defs: eventStore.defs, | ||
5886 | instances: filterHash(eventStore.instances, (instance) => !removals[instance.instanceId]), | ||
5887 | }; | ||
5888 | } | ||
5889 | function buildPublicIdMaps(eventStore) { | ||
5890 | const { defs, instances } = eventStore; | ||
5891 | const defIdMap = {}; | ||
5892 | const instanceIdMap = {}; | ||
5893 | for (let defId in defs) { | ||
5894 | const def = defs[defId]; | ||
5895 | const { publicId } = def; | ||
5896 | if (publicId) { | ||
5897 | defIdMap[publicId] = defId; | ||
5898 | } | ||
5899 | } | ||
5900 | for (let instanceId in instances) { | ||
5901 | const instance = instances[instanceId]; | ||
5902 | const def = defs[instance.defId]; | ||
5903 | const { publicId } = def; | ||
5904 | if (publicId) { | ||
5905 | instanceIdMap[publicId] = instanceId; | ||
5906 | } | ||
5907 | } | ||
5908 | return { defIdMap, instanceIdMap }; | ||
5909 | } | ||
5910 | |||
5911 | // high-level segmenting-aware tester functions | ||
5912 | // ------------------------------------------------------------------------------------------------------------------------ | ||
5913 | function isInteractionValid(interaction, dateProfile, context) { | ||
5914 | let { instances } = interaction.mutatedEvents; | ||
5915 | for (let instanceId in instances) { | ||
5916 | if (!rangeContainsRange(dateProfile.validRange, instances[instanceId].range)) { | ||
5917 | return false; | ||
5918 | } | ||
5919 | } | ||
5920 | return isNewPropsValid({ eventDrag: interaction }, context); // HACK: the eventDrag props is used for ALL interactions | ||
5921 | } | ||
5922 | function isDateSelectionValid(dateSelection, dateProfile, context) { | ||
5923 | if (!rangeContainsRange(dateProfile.validRange, dateSelection.range)) { | ||
5924 | return false; | ||
5925 | } | ||
5926 | return isNewPropsValid({ dateSelection }, context); | ||
5927 | } | ||
5928 | function isNewPropsValid(newProps, context) { | ||
5929 | let calendarState = context.getCurrentData(); | ||
5930 | let props = Object.assign({ businessHours: calendarState.businessHours, dateSelection: '', eventStore: calendarState.eventStore, eventUiBases: calendarState.eventUiBases, eventSelection: '', eventDrag: null, eventResize: null }, newProps); | ||
5931 | return (context.pluginHooks.isPropsValid || isPropsValid)(props, context); | ||
5932 | } | ||
5933 | function isPropsValid(state, context, dateSpanMeta = {}, filterConfig) { | ||
5934 | if (state.eventDrag && !isInteractionPropsValid(state, context, dateSpanMeta, filterConfig)) { | ||
5935 | return false; | ||
5936 | } | ||
5937 | if (state.dateSelection && !isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig)) { | ||
5938 | return false; | ||
5939 | } | ||
5940 | return true; | ||
5941 | } | ||
5942 | // Moving Event Validation | ||
5943 | // ------------------------------------------------------------------------------------------------------------------------ | ||
5944 | function isInteractionPropsValid(state, context, dateSpanMeta, filterConfig) { | ||
5945 | let currentState = context.getCurrentData(); | ||
5946 | let interaction = state.eventDrag; // HACK: the eventDrag props is used for ALL interactions | ||
5947 | let subjectEventStore = interaction.mutatedEvents; | ||
5948 | let subjectDefs = subjectEventStore.defs; | ||
5949 | let subjectInstances = subjectEventStore.instances; | ||
5950 | let subjectConfigs = compileEventUis(subjectDefs, interaction.isEvent ? | ||
5951 | state.eventUiBases : | ||
5952 | { '': currentState.selectionConfig }); | ||
5953 | if (filterConfig) { | ||
5954 | subjectConfigs = mapHash(subjectConfigs, filterConfig); | ||
5955 | } | ||
5956 | // exclude the subject events. TODO: exclude defs too? | ||
5957 | let otherEventStore = excludeInstances(state.eventStore, interaction.affectedEvents.instances); | ||
5958 | let otherDefs = otherEventStore.defs; | ||
5959 | let otherInstances = otherEventStore.instances; | ||
5960 | let otherConfigs = compileEventUis(otherDefs, state.eventUiBases); | ||
5961 | for (let subjectInstanceId in subjectInstances) { | ||
5962 | let subjectInstance = subjectInstances[subjectInstanceId]; | ||
5963 | let subjectRange = subjectInstance.range; | ||
5964 | let subjectConfig = subjectConfigs[subjectInstance.defId]; | ||
5965 | let subjectDef = subjectDefs[subjectInstance.defId]; | ||
5966 | // constraint | ||
5967 | if (!allConstraintsPass(subjectConfig.constraints, subjectRange, otherEventStore, state.businessHours, context)) { | ||
5968 | return false; | ||
5969 | } | ||
5970 | // overlap | ||
5971 | let { eventOverlap } = context.options; | ||
5972 | let eventOverlapFunc = typeof eventOverlap === 'function' ? eventOverlap : null; | ||
5973 | for (let otherInstanceId in otherInstances) { | ||
5974 | let otherInstance = otherInstances[otherInstanceId]; | ||
5975 | // intersect! evaluate | ||
5976 | if (rangesIntersect(subjectRange, otherInstance.range)) { | ||
5977 | let otherOverlap = otherConfigs[otherInstance.defId].overlap; | ||
5978 | // consider the other event's overlap. only do this if the subject event is a "real" event | ||
5979 | if (otherOverlap === false && interaction.isEvent) { | ||
5980 | return false; | ||
5981 | } | ||
5982 | if (subjectConfig.overlap === false) { | ||
5983 | return false; | ||
5984 | } | ||
5985 | if (eventOverlapFunc && !eventOverlapFunc(new EventImpl(context, otherDefs[otherInstance.defId], otherInstance), // still event | ||
5986 | new EventImpl(context, subjectDef, subjectInstance))) { | ||
5987 | return false; | ||
5988 | } | ||
5989 | } | ||
5990 | } | ||
5991 | // allow (a function) | ||
5992 | let calendarEventStore = currentState.eventStore; // need global-to-calendar, not local to component (splittable)state | ||
5993 | for (let subjectAllow of subjectConfig.allows) { | ||
5994 | let subjectDateSpan = Object.assign(Object.assign({}, dateSpanMeta), { range: subjectInstance.range, allDay: subjectDef.allDay }); | ||
5995 | let origDef = calendarEventStore.defs[subjectDef.defId]; | ||
5996 | let origInstance = calendarEventStore.instances[subjectInstanceId]; | ||
5997 | let eventApi; | ||
5998 | if (origDef) { // was previously in the calendar | ||
5999 | eventApi = new EventImpl(context, origDef, origInstance); | ||
6000 | } | ||
6001 | else { // was an external event | ||
6002 | eventApi = new EventImpl(context, subjectDef); // no instance, because had no dates | ||
6003 | } | ||
6004 | if (!subjectAllow(buildDateSpanApiWithContext(subjectDateSpan, context), eventApi)) { | ||
6005 | return false; | ||
6006 | } | ||
6007 | } | ||
6008 | } | ||
6009 | return true; | ||
6010 | } | ||
6011 | // Date Selection Validation | ||
6012 | // ------------------------------------------------------------------------------------------------------------------------ | ||
6013 | function isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig) { | ||
6014 | let relevantEventStore = state.eventStore; | ||
6015 | let relevantDefs = relevantEventStore.defs; | ||
6016 | let relevantInstances = relevantEventStore.instances; | ||
6017 | let selection = state.dateSelection; | ||
6018 | let selectionRange = selection.range; | ||
6019 | let { selectionConfig } = context.getCurrentData(); | ||
6020 | if (filterConfig) { | ||
6021 | selectionConfig = filterConfig(selectionConfig); | ||
6022 | } | ||
6023 | // constraint | ||
6024 | if (!allConstraintsPass(selectionConfig.constraints, selectionRange, relevantEventStore, state.businessHours, context)) { | ||
6025 | return false; | ||
6026 | } | ||
6027 | // overlap | ||
6028 | let { selectOverlap } = context.options; | ||
6029 | let selectOverlapFunc = typeof selectOverlap === 'function' ? selectOverlap : null; | ||
6030 | for (let relevantInstanceId in relevantInstances) { | ||
6031 | let relevantInstance = relevantInstances[relevantInstanceId]; | ||
6032 | // intersect! evaluate | ||
6033 | if (rangesIntersect(selectionRange, relevantInstance.range)) { | ||
6034 | if (selectionConfig.overlap === false) { | ||
6035 | return false; | ||
6036 | } | ||
6037 | if (selectOverlapFunc && !selectOverlapFunc(new EventImpl(context, relevantDefs[relevantInstance.defId], relevantInstance), null)) { | ||
6038 | return false; | ||
6039 | } | ||
6040 | } | ||
6041 | } | ||
6042 | // allow (a function) | ||
6043 | for (let selectionAllow of selectionConfig.allows) { | ||
6044 | let fullDateSpan = Object.assign(Object.assign({}, dateSpanMeta), selection); | ||
6045 | if (!selectionAllow(buildDateSpanApiWithContext(fullDateSpan, context), null)) { | ||
6046 | return false; | ||
6047 | } | ||
6048 | } | ||
6049 | return true; | ||
6050 | } | ||
6051 | // Constraint Utils | ||
6052 | // ------------------------------------------------------------------------------------------------------------------------ | ||
6053 | function allConstraintsPass(constraints, subjectRange, otherEventStore, businessHoursUnexpanded, context) { | ||
6054 | for (let constraint of constraints) { | ||
6055 | if (!anyRangesContainRange(constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, context), subjectRange)) { | ||
6056 | return false; | ||
6057 | } | ||
6058 | } | ||
6059 | return true; | ||
6060 | } | ||
6061 | function constraintToRanges(constraint, subjectRange, // for expanding a recurring constraint, or expanding business hours | ||
6062 | otherEventStore, // for if constraint is an even group ID | ||
6063 | businessHoursUnexpanded, // for if constraint is 'businessHours' | ||
6064 | context) { | ||
6065 | if (constraint === 'businessHours') { | ||
6066 | return eventStoreToRanges(expandRecurring(businessHoursUnexpanded, subjectRange, context)); | ||
6067 | } | ||
6068 | if (typeof constraint === 'string') { // an group ID | ||
6069 | return eventStoreToRanges(filterEventStoreDefs(otherEventStore, (eventDef) => eventDef.groupId === constraint)); | ||
6070 | } | ||
6071 | if (typeof constraint === 'object' && constraint) { // non-null object | ||
6072 | return eventStoreToRanges(expandRecurring(constraint, subjectRange, context)); | ||
6073 | } | ||
6074 | return []; // if it's false | ||
6075 | } | ||
6076 | // TODO: move to event-store file? | ||
6077 | function eventStoreToRanges(eventStore) { | ||
6078 | let { instances } = eventStore; | ||
6079 | let ranges = []; | ||
6080 | for (let instanceId in instances) { | ||
6081 | ranges.push(instances[instanceId].range); | ||
6082 | } | ||
6083 | return ranges; | ||
6084 | } | ||
6085 | // TODO: move to geom file? | ||
6086 | function anyRangesContainRange(outerRanges, innerRange) { | ||
6087 | for (let outerRange of outerRanges) { | ||
6088 | if (rangeContainsRange(outerRange, innerRange)) { | ||
6089 | return true; | ||
6090 | } | ||
6091 | } | ||
6092 | return false; | ||
6093 | } | ||
6094 | |||
6095 | class JsonRequestError extends Error { | ||
6096 | constructor(message, response) { | ||
6097 | super(message); | ||
6098 | this.response = response; | ||
6099 | } | ||
6100 | } | ||
6101 | function requestJson(method, url, params) { | ||
6102 | method = method.toUpperCase(); | ||
6103 | const fetchOptions = { | ||
6104 | method, | ||
6105 | }; | ||
6106 | if (method === 'GET') { | ||
6107 | url += (url.indexOf('?') === -1 ? '?' : '&') + | ||
6108 | new URLSearchParams(params); | ||
6109 | } | ||
6110 | else { | ||
6111 | fetchOptions.body = new URLSearchParams(params); | ||
6112 | fetchOptions.headers = { | ||
6113 | 'Content-Type': 'application/x-www-form-urlencoded', | ||
6114 | }; | ||
6115 | } | ||
6116 | return fetch(url, fetchOptions).then((fetchRes) => { | ||
6117 | if (fetchRes.ok) { | ||
6118 | return fetchRes.json().then((parsedResponse) => { | ||
6119 | return [parsedResponse, fetchRes]; | ||
6120 | }, () => { | ||
6121 | throw new JsonRequestError('Failure parsing JSON', fetchRes); | ||
6122 | }); | ||
6123 | } | ||
6124 | else { | ||
6125 | throw new JsonRequestError('Request failed', fetchRes); | ||
6126 | } | ||
6127 | }); | ||
6128 | } | ||
6129 | |||
6130 | class DelayedRunner { | ||
6131 | constructor(drainedOption) { | ||
6132 | this.drainedOption = drainedOption; | ||
6133 | this.isRunning = false; | ||
6134 | this.isDirty = false; | ||
6135 | this.pauseDepths = {}; | ||
6136 | this.timeoutId = 0; | ||
6137 | } | ||
6138 | request(delay) { | ||
6139 | this.isDirty = true; | ||
6140 | if (!this.isPaused()) { | ||
6141 | this.clearTimeout(); | ||
6142 | if (delay == null) { | ||
6143 | this.tryDrain(); | ||
6144 | } | ||
6145 | else { | ||
6146 | this.timeoutId = setTimeout(// NOT OPTIMAL! TODO: look at debounce | ||
6147 | this.tryDrain.bind(this), delay); | ||
6148 | } | ||
6149 | } | ||
6150 | } | ||
6151 | pause(scope = '') { | ||
6152 | let { pauseDepths } = this; | ||
6153 | pauseDepths[scope] = (pauseDepths[scope] || 0) + 1; | ||
6154 | this.clearTimeout(); | ||
6155 | } | ||
6156 | resume(scope = '', force) { | ||
6157 | let { pauseDepths } = this; | ||
6158 | if (scope in pauseDepths) { | ||
6159 | if (force) { | ||
6160 | delete pauseDepths[scope]; | ||
6161 | } | ||
6162 | else { | ||
6163 | pauseDepths[scope] -= 1; | ||
6164 | let depth = pauseDepths[scope]; | ||
6165 | if (depth <= 0) { | ||
6166 | delete pauseDepths[scope]; | ||
6167 | } | ||
6168 | } | ||
6169 | this.tryDrain(); | ||
6170 | } | ||
6171 | } | ||
6172 | isPaused() { | ||
6173 | return Object.keys(this.pauseDepths).length; | ||
6174 | } | ||
6175 | tryDrain() { | ||
6176 | if (!this.isRunning && !this.isPaused()) { | ||
6177 | this.isRunning = true; | ||
6178 | while (this.isDirty) { | ||
6179 | this.isDirty = false; | ||
6180 | this.drained(); // might set isDirty to true again | ||
6181 | } | ||
6182 | this.isRunning = false; | ||
6183 | } | ||
6184 | } | ||
6185 | clear() { | ||
6186 | this.clearTimeout(); | ||
6187 | this.isDirty = false; | ||
6188 | this.pauseDepths = {}; | ||
6189 | } | ||
6190 | clearTimeout() { | ||
6191 | if (this.timeoutId) { | ||
6192 | clearTimeout(this.timeoutId); | ||
6193 | this.timeoutId = 0; | ||
6194 | } | ||
6195 | } | ||
6196 | drained() { | ||
6197 | if (this.drainedOption) { | ||
6198 | this.drainedOption(); | ||
6199 | } | ||
6200 | } | ||
6201 | } | ||
6202 | |||
6203 | const VISIBLE_HIDDEN_RE = /^(visible|hidden)$/; | ||
6204 | class Scroller extends BaseComponent { | ||
6205 | constructor() { | ||
6206 | super(...arguments); | ||
6207 | this.handleEl = (el) => { | ||
6208 | this.el = el; | ||
6209 | setRef(this.props.elRef, el); | ||
6210 | }; | ||
6211 | } | ||
6212 | render() { | ||
6213 | let { props } = this; | ||
6214 | let { liquid, liquidIsAbsolute } = props; | ||
6215 | let isAbsolute = liquid && liquidIsAbsolute; | ||
6216 | let className = ['fc-scroller']; | ||
6217 | if (liquid) { | ||
6218 | if (liquidIsAbsolute) { | ||
6219 | className.push('fc-scroller-liquid-absolute'); | ||
6220 | } | ||
6221 | else { | ||
6222 | className.push('fc-scroller-liquid'); | ||
6223 | } | ||
6224 | } | ||
6225 | return (y("div", { ref: this.handleEl, className: className.join(' '), style: { | ||
6226 | overflowX: props.overflowX, | ||
6227 | overflowY: props.overflowY, | ||
6228 | left: (isAbsolute && -(props.overcomeLeft || 0)) || '', | ||
6229 | right: (isAbsolute && -(props.overcomeRight || 0)) || '', | ||
6230 | bottom: (isAbsolute && -(props.overcomeBottom || 0)) || '', | ||
6231 | marginLeft: (!isAbsolute && -(props.overcomeLeft || 0)) || '', | ||
6232 | marginRight: (!isAbsolute && -(props.overcomeRight || 0)) || '', | ||
6233 | marginBottom: (!isAbsolute && -(props.overcomeBottom || 0)) || '', | ||
6234 | maxHeight: props.maxHeight || '', | ||
6235 | } }, props.children)); | ||
6236 | } | ||
6237 | needsXScrolling() { | ||
6238 | if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) { | ||
6239 | return false; | ||
6240 | } | ||
6241 | // testing scrollWidth>clientWidth is unreliable cross-browser when pixel heights aren't integers. | ||
6242 | // much more reliable to see if children are taller than the scroller, even tho doesn't account for | ||
6243 | // inner-child margins and absolute positioning | ||
6244 | let { el } = this; | ||
6245 | let realClientWidth = this.el.getBoundingClientRect().width - this.getYScrollbarWidth(); | ||
6246 | let { children } = el; | ||
6247 | for (let i = 0; i < children.length; i += 1) { | ||
6248 | let childEl = children[i]; | ||
6249 | if (childEl.getBoundingClientRect().width > realClientWidth) { | ||
6250 | return true; | ||
6251 | } | ||
6252 | } | ||
6253 | return false; | ||
6254 | } | ||
6255 | needsYScrolling() { | ||
6256 | if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) { | ||
6257 | return false; | ||
6258 | } | ||
6259 | // testing scrollHeight>clientHeight is unreliable cross-browser when pixel heights aren't integers. | ||
6260 | // much more reliable to see if children are taller than the scroller, even tho doesn't account for | ||
6261 | // inner-child margins and absolute positioning | ||
6262 | let { el } = this; | ||
6263 | let realClientHeight = this.el.getBoundingClientRect().height - this.getXScrollbarWidth(); | ||
6264 | let { children } = el; | ||
6265 | for (let i = 0; i < children.length; i += 1) { | ||
6266 | let childEl = children[i]; | ||
6267 | if (childEl.getBoundingClientRect().height > realClientHeight) { | ||
6268 | return true; | ||
6269 | } | ||
6270 | } | ||
6271 | return false; | ||
6272 | } | ||
6273 | getXScrollbarWidth() { | ||
6274 | if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) { | ||
6275 | return 0; | ||
6276 | } | ||
6277 | return this.el.offsetHeight - this.el.clientHeight; // only works because we guarantee no borders. TODO: add to CSS with important? | ||
6278 | } | ||
6279 | getYScrollbarWidth() { | ||
6280 | if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) { | ||
6281 | return 0; | ||
6282 | } | ||
6283 | return this.el.offsetWidth - this.el.clientWidth; // only works because we guarantee no borders. TODO: add to CSS with important? | ||
6284 | } | ||
6285 | } | ||
6286 | |||
6287 | /* | ||
6288 | TODO: somehow infer OtherArgs from masterCallback? | ||
6289 | TODO: infer RefType from masterCallback if provided | ||
6290 | */ | ||
6291 | class RefMap { | ||
6292 | constructor(masterCallback) { | ||
6293 | this.masterCallback = masterCallback; | ||
6294 | this.currentMap = {}; | ||
6295 | this.depths = {}; | ||
6296 | this.callbackMap = {}; | ||
6297 | this.handleValue = (val, key) => { | ||
6298 | let { depths, currentMap } = this; | ||
6299 | let removed = false; | ||
6300 | let added = false; | ||
6301 | if (val !== null) { | ||
6302 | // for bug... ACTUALLY: can probably do away with this now that callers don't share numeric indices anymore | ||
6303 | removed = (key in currentMap); | ||
6304 | currentMap[key] = val; | ||
6305 | depths[key] = (depths[key] || 0) + 1; | ||
6306 | added = true; | ||
6307 | } | ||
6308 | else { | ||
6309 | depths[key] -= 1; | ||
6310 | if (!depths[key]) { | ||
6311 | delete currentMap[key]; | ||
6312 | delete this.callbackMap[key]; | ||
6313 | removed = true; | ||
6314 | } | ||
6315 | } | ||
6316 | if (this.masterCallback) { | ||
6317 | if (removed) { | ||
6318 | this.masterCallback(null, String(key)); | ||
6319 | } | ||
6320 | if (added) { | ||
6321 | this.masterCallback(val, String(key)); | ||
6322 | } | ||
6323 | } | ||
6324 | }; | ||
6325 | } | ||
6326 | createRef(key) { | ||
6327 | let refCallback = this.callbackMap[key]; | ||
6328 | if (!refCallback) { | ||
6329 | refCallback = this.callbackMap[key] = (val) => { | ||
6330 | this.handleValue(val, String(key)); | ||
6331 | }; | ||
6332 | } | ||
6333 | return refCallback; | ||
6334 | } | ||
6335 | // TODO: check callers that don't care about order. should use getAll instead | ||
6336 | // NOTE: this method has become less valuable now that we are encouraged to map order by some other index | ||
6337 | // TODO: provide ONE array-export function, buildArray, which fails on non-numeric indexes. caller can manipulate and "collect" | ||
6338 | collect(startIndex, endIndex, step) { | ||
6339 | return collectFromHash(this.currentMap, startIndex, endIndex, step); | ||
6340 | } | ||
6341 | getAll() { | ||
6342 | return hashValuesToArray(this.currentMap); | ||
6343 | } | ||
6344 | } | ||
6345 | |||
6346 | function computeShrinkWidth(chunkEls) { | ||
6347 | let shrinkCells = findElements(chunkEls, '.fc-scrollgrid-shrink'); | ||
6348 | let largestWidth = 0; | ||
6349 | for (let shrinkCell of shrinkCells) { | ||
6350 | largestWidth = Math.max(largestWidth, computeSmallestCellWidth(shrinkCell)); | ||
6351 | } | ||
6352 | return Math.ceil(largestWidth); // <table> elements work best with integers. round up to ensure contents fits | ||
6353 | } | ||
6354 | function getSectionHasLiquidHeight(props, sectionConfig) { | ||
6355 | return props.liquid && sectionConfig.liquid; // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well) | ||
6356 | } | ||
6357 | function getAllowYScrolling(props, sectionConfig) { | ||
6358 | return sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars | ||
6359 | getSectionHasLiquidHeight(props, sectionConfig); // if the section is liquid height, it might condense enough to require scrollbars | ||
6360 | } | ||
6361 | // TODO: ONLY use `arg`. force out internal function to use same API | ||
6362 | function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) { | ||
6363 | let { expandRows } = arg; | ||
6364 | let content = typeof chunkConfig.content === 'function' ? | ||
6365 | chunkConfig.content(arg) : | ||
6366 | y('table', { | ||
6367 | role: 'presentation', | ||
6368 | className: [ | ||
6369 | chunkConfig.tableClassName, | ||
6370 | sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : '', | ||
6371 | ].join(' '), | ||
6372 | style: { | ||
6373 | minWidth: arg.tableMinWidth, | ||
6374 | width: arg.clientWidth, | ||
6375 | height: expandRows ? arg.clientHeight : '', // css `height` on a <table> serves as a min-height | ||
6376 | }, | ||
6377 | }, arg.tableColGroupNode, y(isHeader ? 'thead' : 'tbody', { | ||
6378 | role: 'presentation', | ||
6379 | }, typeof chunkConfig.rowContent === 'function' | ||
6380 | ? chunkConfig.rowContent(arg) | ||
6381 | : chunkConfig.rowContent)); | ||
6382 | return content; | ||
6383 | } | ||
6384 | function isColPropsEqual(cols0, cols1) { | ||
6385 | return isArraysEqual(cols0, cols1, isPropsEqual); | ||
6386 | } | ||
6387 | function renderMicroColGroup(cols, shrinkWidth) { | ||
6388 | let colNodes = []; | ||
6389 | /* | ||
6390 | for ColProps with spans, it would have been great to make a single <col span=""> | ||
6391 | HOWEVER, Chrome was getting messing up distributing the width to <td>/<th> elements with colspans. | ||
6392 | SOLUTION: making individual <col> elements makes Chrome behave. | ||
6393 | */ | ||
6394 | for (let colProps of cols) { | ||
6395 | let span = colProps.span || 1; | ||
6396 | for (let i = 0; i < span; i += 1) { | ||
6397 | colNodes.push(y("col", { style: { | ||
6398 | width: colProps.width === 'shrink' ? sanitizeShrinkWidth(shrinkWidth) : (colProps.width || ''), | ||
6399 | minWidth: colProps.minWidth || '', | ||
6400 | } })); | ||
6401 | } | ||
6402 | } | ||
6403 | return y('colgroup', {}, ...colNodes); | ||
6404 | } | ||
6405 | function sanitizeShrinkWidth(shrinkWidth) { | ||
6406 | /* why 4? if we do 0, it will kill any border, which are needed for computeSmallestCellWidth | ||
6407 | 4 accounts for 2 2-pixel borders. TODO: better solution? */ | ||
6408 | return shrinkWidth == null ? 4 : shrinkWidth; | ||
6409 | } | ||
6410 | function hasShrinkWidth(cols) { | ||
6411 | for (let col of cols) { | ||
6412 | if (col.width === 'shrink') { | ||
6413 | return true; | ||
6414 | } | ||
6415 | } | ||
6416 | return false; | ||
6417 | } | ||
6418 | function getScrollGridClassNames(liquid, context) { | ||
6419 | let classNames = [ | ||
6420 | 'fc-scrollgrid', | ||
6421 | context.theme.getClass('table'), | ||
6422 | ]; | ||
6423 | if (liquid) { | ||
6424 | classNames.push('fc-scrollgrid-liquid'); | ||
6425 | } | ||
6426 | return classNames; | ||
6427 | } | ||
6428 | function getSectionClassNames(sectionConfig, wholeTableVGrow) { | ||
6429 | let classNames = [ | ||
6430 | 'fc-scrollgrid-section', | ||
6431 | `fc-scrollgrid-section-${sectionConfig.type}`, | ||
6432 | sectionConfig.className, // used? | ||
6433 | ]; | ||
6434 | if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) { | ||
6435 | classNames.push('fc-scrollgrid-section-liquid'); | ||
6436 | } | ||
6437 | if (sectionConfig.isSticky) { | ||
6438 | classNames.push('fc-scrollgrid-section-sticky'); | ||
6439 | } | ||
6440 | return classNames; | ||
6441 | } | ||
6442 | function renderScrollShim(arg) { | ||
6443 | return (y("div", { className: "fc-scrollgrid-sticky-shim", style: { | ||
6444 | width: arg.clientWidth, | ||
6445 | minWidth: arg.tableMinWidth, | ||
6446 | } })); | ||
6447 | } | ||
6448 | function getStickyHeaderDates(options) { | ||
6449 | let { stickyHeaderDates } = options; | ||
6450 | if (stickyHeaderDates == null || stickyHeaderDates === 'auto') { | ||
6451 | stickyHeaderDates = options.height === 'auto' || options.viewHeight === 'auto'; | ||
6452 | } | ||
6453 | return stickyHeaderDates; | ||
6454 | } | ||
6455 | function getStickyFooterScrollbar(options) { | ||
6456 | let { stickyFooterScrollbar } = options; | ||
6457 | if (stickyFooterScrollbar == null || stickyFooterScrollbar === 'auto') { | ||
6458 | stickyFooterScrollbar = options.height === 'auto' || options.viewHeight === 'auto'; | ||
6459 | } | ||
6460 | return stickyFooterScrollbar; | ||
6461 | } | ||
6462 | |||
6463 | class SimpleScrollGrid extends BaseComponent { | ||
6464 | constructor() { | ||
6465 | super(...arguments); | ||
6466 | this.processCols = memoize((a) => a, isColPropsEqual); // so we get same `cols` props every time | ||
6467 | // yucky to memoize VNodes, but much more efficient for consumers | ||
6468 | this.renderMicroColGroup = memoize(renderMicroColGroup); | ||
6469 | this.scrollerRefs = new RefMap(); | ||
6470 | this.scrollerElRefs = new RefMap(this._handleScrollerEl.bind(this)); | ||
6471 | this.state = { | ||
6472 | shrinkWidth: null, | ||
6473 | forceYScrollbars: false, | ||
6474 | scrollerClientWidths: {}, | ||
6475 | scrollerClientHeights: {}, | ||
6476 | }; | ||
6477 | // TODO: can do a really simple print-view. dont need to join rows | ||
6478 | this.handleSizing = () => { | ||
6479 | this.safeSetState(Object.assign({ shrinkWidth: this.computeShrinkWidth() }, this.computeScrollerDims())); | ||
6480 | }; | ||
6481 | } | ||
6482 | render() { | ||
6483 | let { props, state, context } = this; | ||
6484 | let sectionConfigs = props.sections || []; | ||
6485 | let cols = this.processCols(props.cols); | ||
6486 | let microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth); | ||
6487 | let classNames = getScrollGridClassNames(props.liquid, context); | ||
6488 | if (props.collapsibleWidth) { | ||
6489 | classNames.push('fc-scrollgrid-collapsible'); | ||
6490 | } | ||
6491 | // TODO: make DRY | ||
6492 | let configCnt = sectionConfigs.length; | ||
6493 | let configI = 0; | ||
6494 | let currentConfig; | ||
6495 | let headSectionNodes = []; | ||
6496 | let bodySectionNodes = []; | ||
6497 | let footSectionNodes = []; | ||
6498 | while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') { | ||
6499 | headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true)); | ||
6500 | configI += 1; | ||
6501 | } | ||
6502 | while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') { | ||
6503 | bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false)); | ||
6504 | configI += 1; | ||
6505 | } | ||
6506 | while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') { | ||
6507 | footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true)); | ||
6508 | configI += 1; | ||
6509 | } | ||
6510 | // firefox bug: when setting height on table and there is a thead or tfoot, | ||
6511 | // the necessary height:100% on the liquid-height body section forces the *whole* table to be taller. (bug #5524) | ||
6512 | // use getCanVGrowWithinCell as a way to detect table-stupid firefox. | ||
6513 | // if so, use a simpler dom structure, jam everything into a lone tbody. | ||
6514 | let isBuggy = !getCanVGrowWithinCell(); | ||
6515 | const roleAttrs = { role: 'rowgroup' }; | ||
6516 | return y('table', { | ||
6517 | role: 'grid', | ||
6518 | className: classNames.join(' '), | ||
6519 | style: { height: props.height }, | ||
6520 | }, Boolean(!isBuggy && headSectionNodes.length) && y('thead', roleAttrs, ...headSectionNodes), Boolean(!isBuggy && bodySectionNodes.length) && y('tbody', roleAttrs, ...bodySectionNodes), Boolean(!isBuggy && footSectionNodes.length) && y('tfoot', roleAttrs, ...footSectionNodes), isBuggy && y('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes)); | ||
6521 | } | ||
6522 | renderSection(sectionConfig, microColGroupNode, isHeader) { | ||
6523 | if ('outerContent' in sectionConfig) { | ||
6524 | return (y(_, { key: sectionConfig.key }, sectionConfig.outerContent)); | ||
6525 | } | ||
6526 | return (y("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader))); | ||
6527 | } | ||
6528 | renderChunkTd(sectionConfig, microColGroupNode, chunkConfig, isHeader) { | ||
6529 | if ('outerContent' in chunkConfig) { | ||
6530 | return chunkConfig.outerContent; | ||
6531 | } | ||
6532 | let { props } = this; | ||
6533 | let { forceYScrollbars, scrollerClientWidths, scrollerClientHeights } = this.state; | ||
6534 | let needsYScrolling = getAllowYScrolling(props, sectionConfig); // TODO: do lazily. do in section config? | ||
6535 | let isLiquid = getSectionHasLiquidHeight(props, sectionConfig); | ||
6536 | // for `!props.liquid` - is WHOLE scrollgrid natural height? | ||
6537 | // TODO: do same thing in advanced scrollgrid? prolly not b/c always has horizontal scrollbars | ||
6538 | let overflowY = !props.liquid ? 'visible' : | ||
6539 | forceYScrollbars ? 'scroll' : | ||
6540 | !needsYScrolling ? 'hidden' : | ||
6541 | 'auto'; | ||
6542 | let sectionKey = sectionConfig.key; | ||
6543 | let content = renderChunkContent(sectionConfig, chunkConfig, { | ||
6544 | tableColGroupNode: microColGroupNode, | ||
6545 | tableMinWidth: '', | ||
6546 | clientWidth: (!props.collapsibleWidth && scrollerClientWidths[sectionKey] !== undefined) ? scrollerClientWidths[sectionKey] : null, | ||
6547 | clientHeight: scrollerClientHeights[sectionKey] !== undefined ? scrollerClientHeights[sectionKey] : null, | ||
6548 | expandRows: sectionConfig.expandRows, | ||
6549 | syncRowHeights: false, | ||
6550 | rowSyncHeights: [], | ||
6551 | reportRowHeightChange: () => { }, | ||
6552 | }, isHeader); | ||
6553 | return y(isHeader ? 'th' : 'td', { | ||
6554 | ref: chunkConfig.elRef, | ||
6555 | role: 'presentation', | ||
6556 | }, y("div", { className: `fc-scroller-harness${isLiquid ? ' fc-scroller-harness-liquid' : ''}` }, | ||
6557 | y(Scroller, { ref: this.scrollerRefs.createRef(sectionKey), elRef: this.scrollerElRefs.createRef(sectionKey), overflowY: overflowY, overflowX: !props.liquid ? 'visible' : 'hidden' /* natural height? */, maxHeight: sectionConfig.maxHeight, liquid: isLiquid, liquidIsAbsolute // because its within a harness | ||
6558 | : true }, content))); | ||
6559 | } | ||
6560 | _handleScrollerEl(scrollerEl, key) { | ||
6561 | let section = getSectionByKey(this.props.sections, key); | ||
6562 | if (section) { | ||
6563 | setRef(section.chunk.scrollerElRef, scrollerEl); | ||
6564 | } | ||
6565 | } | ||
6566 | componentDidMount() { | ||
6567 | this.handleSizing(); | ||
6568 | this.context.addResizeHandler(this.handleSizing); | ||
6569 | } | ||
6570 | componentDidUpdate() { | ||
6571 | // TODO: need better solution when state contains non-sizing things | ||
6572 | this.handleSizing(); | ||
6573 | } | ||
6574 | componentWillUnmount() { | ||
6575 | this.context.removeResizeHandler(this.handleSizing); | ||
6576 | } | ||
6577 | computeShrinkWidth() { | ||
6578 | return hasShrinkWidth(this.props.cols) | ||
6579 | ? computeShrinkWidth(this.scrollerElRefs.getAll()) | ||
6580 | : 0; | ||
6581 | } | ||
6582 | computeScrollerDims() { | ||
6583 | let scrollbarWidth = getScrollbarWidths(); | ||
6584 | let { scrollerRefs, scrollerElRefs } = this; | ||
6585 | let forceYScrollbars = false; | ||
6586 | let scrollerClientWidths = {}; | ||
6587 | let scrollerClientHeights = {}; | ||
6588 | for (let sectionKey in scrollerRefs.currentMap) { | ||
6589 | let scroller = scrollerRefs.currentMap[sectionKey]; | ||
6590 | if (scroller && scroller.needsYScrolling()) { | ||
6591 | forceYScrollbars = true; | ||
6592 | break; | ||
6593 | } | ||
6594 | } | ||
6595 | for (let section of this.props.sections) { | ||
6596 | let sectionKey = section.key; | ||
6597 | let scrollerEl = scrollerElRefs.currentMap[sectionKey]; | ||
6598 | if (scrollerEl) { | ||
6599 | let harnessEl = scrollerEl.parentNode; // TODO: weird way to get this. need harness b/c doesn't include table borders | ||
6600 | scrollerClientWidths[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().width - (forceYScrollbars | ||
6601 | ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future | ||
6602 | : 0)); | ||
6603 | scrollerClientHeights[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().height); | ||
6604 | } | ||
6605 | } | ||
6606 | return { forceYScrollbars, scrollerClientWidths, scrollerClientHeights }; | ||
6607 | } | ||
6608 | } | ||
6609 | SimpleScrollGrid.addStateEquality({ | ||
6610 | scrollerClientWidths: isPropsEqual, | ||
6611 | scrollerClientHeights: isPropsEqual, | ||
6612 | }); | ||
6613 | function getSectionByKey(sections, key) { | ||
6614 | for (let section of sections) { | ||
6615 | if (section.key === key) { | ||
6616 | return section; | ||
6617 | } | ||
6618 | } | ||
6619 | return null; | ||
6620 | } | ||
6621 | |||
6622 | class EventContainer extends BaseComponent { | ||
6623 | constructor() { | ||
6624 | super(...arguments); | ||
6625 | this.handleEl = (el) => { | ||
6626 | this.el = el; | ||
6627 | if (el) { | ||
6628 | setElSeg(el, this.props.seg); | ||
6629 | } | ||
6630 | }; | ||
6631 | } | ||
6632 | render() { | ||
6633 | const { props, context } = this; | ||
6634 | const { options } = context; | ||
6635 | const { seg } = props; | ||
6636 | const { eventRange } = seg; | ||
6637 | const { ui } = eventRange; | ||
6638 | const renderProps = { | ||
6639 | event: new EventImpl(context, eventRange.def, eventRange.instance), | ||
6640 | view: context.viewApi, | ||
6641 | timeText: props.timeText, | ||
6642 | textColor: ui.textColor, | ||
6643 | backgroundColor: ui.backgroundColor, | ||
6644 | borderColor: ui.borderColor, | ||
6645 | isDraggable: !props.disableDragging && computeSegDraggable(seg, context), | ||
6646 | isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context), | ||
6647 | isEndResizable: !props.disableResizing && computeSegEndResizable(seg), | ||
6648 | isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting), | ||
6649 | isStart: Boolean(seg.isStart), | ||
6650 | isEnd: Boolean(seg.isEnd), | ||
6651 | isPast: Boolean(props.isPast), | ||
6652 | isFuture: Boolean(props.isFuture), | ||
6653 | isToday: Boolean(props.isToday), | ||
6654 | isSelected: Boolean(props.isSelected), | ||
6655 | isDragging: Boolean(props.isDragging), | ||
6656 | isResizing: Boolean(props.isResizing), | ||
6657 | }; | ||
6658 | return (y(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [ | ||
6659 | ...getEventClassNames(renderProps), | ||
6660 | ...seg.eventRange.ui.classNames, | ||
6661 | ...(props.elClasses || []), | ||
6662 | ], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount }))); | ||
6663 | } | ||
6664 | componentDidUpdate(prevProps) { | ||
6665 | if (this.el && this.props.seg !== prevProps.seg) { | ||
6666 | setElSeg(this.el, this.props.seg); | ||
6667 | } | ||
6668 | } | ||
6669 | } | ||
6670 | |||
6671 | // should not be a purecomponent | ||
6672 | class StandardEvent extends BaseComponent { | ||
6673 | render() { | ||
6674 | let { props, context } = this; | ||
6675 | let { options } = context; | ||
6676 | let { seg } = props; | ||
6677 | let { ui } = seg.eventRange; | ||
6678 | let timeFormat = options.eventTimeFormat || props.defaultTimeFormat; | ||
6679 | let timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd); | ||
6680 | return (y(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: { | ||
6681 | borderColor: ui.borderColor, | ||
6682 | backgroundColor: ui.backgroundColor, | ||
6683 | }, elAttrs: getSegAnchorAttrs(seg, context), defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (y(_, null, | ||
6684 | y(InnerContent, { elTag: "div", elClasses: ['fc-event-main'], elStyle: { color: eventContentArg.textColor } }), | ||
6685 | Boolean(eventContentArg.isStartResizable) && (y("div", { className: "fc-event-resizer fc-event-resizer-start" })), | ||
6686 | Boolean(eventContentArg.isEndResizable) && (y("div", { className: "fc-event-resizer fc-event-resizer-end" })))))); | ||
6687 | } | ||
6688 | } | ||
6689 | function renderInnerContent$1(innerProps) { | ||
6690 | return (y("div", { className: "fc-event-main-frame" }, | ||
6691 | innerProps.timeText && (y("div", { className: "fc-event-time" }, innerProps.timeText)), | ||
6692 | y("div", { className: "fc-event-title-container" }, | ||
6693 | y("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || y(_, null, "\u00A0"))))); | ||
6694 | } | ||
6695 | |||
6696 | const NowIndicatorContainer = (props) => (y(ViewContextType.Consumer, null, (context) => { | ||
6697 | let { options } = context; | ||
6698 | let renderProps = { | ||
6699 | isAxis: props.isAxis, | ||
6700 | date: context.dateEnv.toDate(props.date), | ||
6701 | view: context.viewApi, | ||
6702 | }; | ||
6703 | return (y(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount }))); | ||
6704 | })); | ||
6705 | |||
6706 | const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' }); | ||
6707 | class DayCellContainer extends BaseComponent { | ||
6708 | constructor() { | ||
6709 | super(...arguments); | ||
6710 | this.refineRenderProps = memoizeObjArg(refineRenderProps); | ||
6711 | } | ||
6712 | render() { | ||
6713 | let { props, context } = this; | ||
6714 | let { options } = context; | ||
6715 | let renderProps = this.refineRenderProps({ | ||
6716 | date: props.date, | ||
6717 | dateProfile: props.dateProfile, | ||
6718 | todayRange: props.todayRange, | ||
6719 | isMonthStart: props.isMonthStart || false, | ||
6720 | showDayNumber: props.showDayNumber, | ||
6721 | extraRenderProps: props.extraRenderProps, | ||
6722 | viewApi: context.viewApi, | ||
6723 | dateEnv: context.dateEnv, | ||
6724 | monthStartFormat: options.monthStartFormat, | ||
6725 | }); | ||
6726 | return (y(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [ | ||
6727 | ...getDayClassNames(renderProps, context.theme), | ||
6728 | ...(props.elClasses || []), | ||
6729 | ], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator: | ||
6730 | // don't use custom classNames if disabled | ||
6731 | renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount }))); | ||
6732 | } | ||
6733 | } | ||
6734 | function hasCustomDayCellContent(options) { | ||
6735 | return Boolean(options.dayCellContent || hasCustomRenderingHandler('dayCellContent', options)); | ||
6736 | } | ||
6737 | function refineRenderProps(raw) { | ||
6738 | let { date, dateEnv, dateProfile, isMonthStart } = raw; | ||
6739 | let dayMeta = getDateMeta(date, raw.todayRange, null, dateProfile); | ||
6740 | let dayNumberText = raw.showDayNumber ? (dateEnv.format(date, isMonthStart ? raw.monthStartFormat : DAY_NUM_FORMAT)) : ''; | ||
6741 | return Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { isMonthStart, | ||
6742 | dayNumberText }), raw.extraRenderProps); | ||
6743 | } | ||
6744 | |||
6745 | class BgEvent extends BaseComponent { | ||
6746 | render() { | ||
6747 | let { props } = this; | ||
6748 | let { seg } = props; | ||
6749 | return (y(EventContainer, { elTag: "div", elClasses: ['fc-bg-event'], elStyle: { backgroundColor: seg.eventRange.ui.backgroundColor }, defaultGenerator: renderInnerContent, seg: seg, timeText: "", isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, disableDragging: true, disableResizing: true })); | ||
6750 | } | ||
6751 | } | ||
6752 | function renderInnerContent(props) { | ||
6753 | let { title } = props.event; | ||
6754 | return title && (y("div", { className: "fc-event-title" }, props.event.title)); | ||
6755 | } | ||
6756 | function renderFill(fillType) { | ||
6757 | return (y("div", { className: `fc-${fillType}` })); | ||
6758 | } | ||
6759 | |||
6760 | const WeekNumberContainer = (props) => (y(ViewContextType.Consumer, null, (context) => { | ||
6761 | let { dateEnv, options } = context; | ||
6762 | let { date } = props; | ||
6763 | let format = options.weekNumberFormat || props.defaultFormat; | ||
6764 | let num = dateEnv.computeWeekNumber(date); // TODO: somehow use for formatting as well? | ||
6765 | let text = dateEnv.format(date, format); | ||
6766 | let renderProps = { num, text, date }; | ||
6767 | return (y(ContentContainer // why isn't WeekNumberContentArg being auto-detected? | ||
6768 | , Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount }))); | ||
6769 | })); | ||
6770 | function renderInner(innerProps) { | ||
6771 | return innerProps.text; | ||
6772 | } | ||
6773 | |||
6774 | const PADDING_FROM_VIEWPORT = 10; | ||
6775 | class Popover extends BaseComponent { | ||
6776 | constructor() { | ||
6777 | super(...arguments); | ||
6778 | this.state = { | ||
6779 | titleId: getUniqueDomId(), | ||
6780 | }; | ||
6781 | this.handleRootEl = (el) => { | ||
6782 | this.rootEl = el; | ||
6783 | if (this.props.elRef) { | ||
6784 | setRef(this.props.elRef, el); | ||
6785 | } | ||
6786 | }; | ||
6787 | // Triggered when the user clicks *anywhere* in the document, for the autoHide feature | ||
6788 | this.handleDocumentMouseDown = (ev) => { | ||
6789 | // only hide the popover if the click happened outside the popover | ||
6790 | const target = getEventTargetViaRoot(ev); | ||
6791 | if (!this.rootEl.contains(target)) { | ||
6792 | this.handleCloseClick(); | ||
6793 | } | ||
6794 | }; | ||
6795 | this.handleDocumentKeyDown = (ev) => { | ||
6796 | if (ev.key === 'Escape') { | ||
6797 | this.handleCloseClick(); | ||
6798 | } | ||
6799 | }; | ||
6800 | this.handleCloseClick = () => { | ||
6801 | let { onClose } = this.props; | ||
6802 | if (onClose) { | ||
6803 | onClose(); | ||
6804 | } | ||
6805 | }; | ||
6806 | } | ||
6807 | render() { | ||
6808 | let { theme, options } = this.context; | ||
6809 | let { props, state } = this; | ||
6810 | let classNames = [ | ||
6811 | 'fc-popover', | ||
6812 | theme.getClass('popover'), | ||
6813 | ].concat(props.extraClassNames || []); | ||
6814 | return j(y("div", Object.assign({}, props.extraAttrs, { id: props.id, className: classNames.join(' '), "aria-labelledby": state.titleId, ref: this.handleRootEl }), | ||
6815 | y("div", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') }, | ||
6816 | y("span", { className: "fc-popover-title", id: state.titleId }, props.title), | ||
6817 | y("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })), | ||
6818 | y("div", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl); | ||
6819 | } | ||
6820 | componentDidMount() { | ||
6821 | document.addEventListener('mousedown', this.handleDocumentMouseDown); | ||
6822 | document.addEventListener('keydown', this.handleDocumentKeyDown); | ||
6823 | this.updateSize(); | ||
6824 | } | ||
6825 | componentWillUnmount() { | ||
6826 | document.removeEventListener('mousedown', this.handleDocumentMouseDown); | ||
6827 | document.removeEventListener('keydown', this.handleDocumentKeyDown); | ||
6828 | } | ||
6829 | updateSize() { | ||
6830 | let { isRtl } = this.context; | ||
6831 | let { alignmentEl, alignGridTop } = this.props; | ||
6832 | let { rootEl } = this; | ||
6833 | let alignmentRect = computeClippedClientRect(alignmentEl); | ||
6834 | if (alignmentRect) { | ||
6835 | let popoverDims = rootEl.getBoundingClientRect(); | ||
6836 | // position relative to viewport | ||
6837 | let popoverTop = alignGridTop | ||
6838 | ? elementClosest(alignmentEl, '.fc-scrollgrid').getBoundingClientRect().top | ||
6839 | : alignmentRect.top; | ||
6840 | let popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left; | ||
6841 | // constrain | ||
6842 | popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT); | ||
6843 | popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width); | ||
6844 | popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT); | ||
6845 | let origin = rootEl.offsetParent.getBoundingClientRect(); | ||
6846 | applyStyle(rootEl, { | ||
6847 | top: popoverTop - origin.top, | ||
6848 | left: popoverLeft - origin.left, | ||
6849 | }); | ||
6850 | } | ||
6851 | } | ||
6852 | } | ||
6853 | |||
6854 | class MorePopover extends DateComponent { | ||
6855 | constructor() { | ||
6856 | super(...arguments); | ||
6857 | this.handleRootEl = (rootEl) => { | ||
6858 | this.rootEl = rootEl; | ||
6859 | if (rootEl) { | ||
6860 | this.context.registerInteractiveComponent(this, { | ||
6861 | el: rootEl, | ||
6862 | useEventCenter: false, | ||
6863 | }); | ||
6864 | } | ||
6865 | else { | ||
6866 | this.context.unregisterInteractiveComponent(this); | ||
6867 | } | ||
6868 | }; | ||
6869 | } | ||
6870 | render() { | ||
6871 | let { options, dateEnv } = this.context; | ||
6872 | let { props } = this; | ||
6873 | let { startDate, todayRange, dateProfile } = props; | ||
6874 | let title = dateEnv.format(startDate, options.dayPopoverFormat); | ||
6875 | return (y(DayCellContainer, { elRef: this.handleRootEl, date: startDate, dateProfile: dateProfile, todayRange: todayRange }, (InnerContent, renderProps, elAttrs) => (y(Popover, { elRef: elAttrs.ref, id: props.id, title: title, extraClassNames: ['fc-more-popover'].concat(elAttrs.className || []), extraAttrs: elAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose }, | ||
6876 | hasCustomDayCellContent(options) && (y(InnerContent, { elTag: "div", elClasses: ['fc-more-popover-misc'] })), | ||
6877 | props.children)))); | ||
6878 | } | ||
6879 | queryHit(positionLeft, positionTop, elWidth, elHeight) { | ||
6880 | let { rootEl, props } = this; | ||
6881 | if (positionLeft >= 0 && positionLeft < elWidth && | ||
6882 | positionTop >= 0 && positionTop < elHeight) { | ||
6883 | return { | ||
6884 | dateProfile: props.dateProfile, | ||
6885 | dateSpan: Object.assign({ allDay: !props.forceTimed, range: { | ||
6886 | start: props.startDate, | ||
6887 | end: props.endDate, | ||
6888 | } }, props.extraDateSpan), | ||
6889 | dayEl: rootEl, | ||
6890 | rect: { | ||
6891 | left: 0, | ||
6892 | top: 0, | ||
6893 | right: elWidth, | ||
6894 | bottom: elHeight, | ||
6895 | }, | ||
6896 | layer: 1, // important when comparing with hits from other components | ||
6897 | }; | ||
6898 | } | ||
6899 | return null; | ||
6900 | } | ||
6901 | } | ||
6902 | |||
6903 | class MoreLinkContainer extends BaseComponent { | ||
6904 | constructor() { | ||
6905 | super(...arguments); | ||
6906 | this.state = { | ||
6907 | isPopoverOpen: false, | ||
6908 | popoverId: getUniqueDomId(), | ||
6909 | }; | ||
6910 | this.handleLinkEl = (linkEl) => { | ||
6911 | this.linkEl = linkEl; | ||
6912 | if (this.props.elRef) { | ||
6913 | setRef(this.props.elRef, linkEl); | ||
6914 | } | ||
6915 | }; | ||
6916 | this.handleClick = (ev) => { | ||
6917 | let { props, context } = this; | ||
6918 | let { moreLinkClick } = context.options; | ||
6919 | let date = computeRange(props).start; | ||
6920 | function buildPublicSeg(seg) { | ||
6921 | let { def, instance, range } = seg.eventRange; | ||
6922 | return { | ||
6923 | event: new EventImpl(context, def, instance), | ||
6924 | start: context.dateEnv.toDate(range.start), | ||
6925 | end: context.dateEnv.toDate(range.end), | ||
6926 | isStart: seg.isStart, | ||
6927 | isEnd: seg.isEnd, | ||
6928 | }; | ||
6929 | } | ||
6930 | if (typeof moreLinkClick === 'function') { | ||
6931 | moreLinkClick = moreLinkClick({ | ||
6932 | date, | ||
6933 | allDay: Boolean(props.allDayDate), | ||
6934 | allSegs: props.allSegs.map(buildPublicSeg), | ||
6935 | hiddenSegs: props.hiddenSegs.map(buildPublicSeg), | ||
6936 | jsEvent: ev, | ||
6937 | view: context.viewApi, | ||
6938 | }); | ||
6939 | } | ||
6940 | if (!moreLinkClick || moreLinkClick === 'popover') { | ||
6941 | this.setState({ isPopoverOpen: true }); | ||
6942 | } | ||
6943 | else if (typeof moreLinkClick === 'string') { // a view name | ||
6944 | context.calendarApi.zoomTo(date, moreLinkClick); | ||
6945 | } | ||
6946 | }; | ||
6947 | this.handlePopoverClose = () => { | ||
6948 | this.setState({ isPopoverOpen: false }); | ||
6949 | }; | ||
6950 | } | ||
6951 | render() { | ||
6952 | let { props, state } = this; | ||
6953 | return (y(ViewContextType.Consumer, null, (context) => { | ||
6954 | let { viewApi, options, calendarApi } = context; | ||
6955 | let { moreLinkText } = options; | ||
6956 | let { moreCnt } = props; | ||
6957 | let range = computeRange(props); | ||
6958 | let text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals | ||
6959 | ? moreLinkText.call(calendarApi, moreCnt) | ||
6960 | : `+${moreCnt} ${moreLinkText}`; | ||
6961 | let hint = formatWithOrdinals(options.moreLinkHint, [moreCnt], text); | ||
6962 | let renderProps = { | ||
6963 | num: moreCnt, | ||
6964 | shortText: `+${moreCnt}`, | ||
6965 | text, | ||
6966 | view: viewApi, | ||
6967 | }; | ||
6968 | return (y(_, null, | ||
6969 | Boolean(props.moreCnt) && (y(ContentContainer, { elTag: props.elTag || 'a', elRef: this.handleLinkEl, elClasses: [ | ||
6970 | ...(props.elClasses || []), | ||
6971 | 'fc-more-link', | ||
6972 | ], elStyle: props.elStyle, elAttrs: Object.assign(Object.assign(Object.assign({}, props.elAttrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent", customGenerator: options.moreLinkContent, defaultGenerator: props.defaultGenerator || renderMoreLinkInner, classNameGenerator: options.moreLinkClassNames, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, props.children)), | ||
6973 | state.isPopoverOpen && (y(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: this.parentEl, alignmentEl: props.alignmentElRef ? | ||
6974 | props.alignmentElRef.current : | ||
6975 | this.linkEl, alignGridTop: props.alignGridTop, forceTimed: props.forceTimed, onClose: this.handlePopoverClose }, props.popoverContent())))); | ||
6976 | })); | ||
6977 | } | ||
6978 | componentDidMount() { | ||
6979 | this.updateParentEl(); | ||
6980 | } | ||
6981 | componentDidUpdate() { | ||
6982 | this.updateParentEl(); | ||
6983 | } | ||
6984 | updateParentEl() { | ||
6985 | if (this.linkEl) { | ||
6986 | this.parentEl = elementClosest(this.linkEl, '.fc-view-harness'); | ||
6987 | } | ||
6988 | } | ||
6989 | } | ||
6990 | function renderMoreLinkInner(props) { | ||
6991 | return props.text; | ||
6992 | } | ||
6993 | function computeRange(props) { | ||
6994 | if (props.allDayDate) { | ||
6995 | return { | ||
6996 | start: props.allDayDate, | ||
6997 | end: addDays(props.allDayDate, 1), | ||
6998 | }; | ||
6999 | } | ||
7000 | let { hiddenSegs } = props; | ||
7001 | return { | ||
7002 | start: computeEarliestSegStart(hiddenSegs), | ||
7003 | end: computeLatestSegEnd(hiddenSegs), | ||
7004 | }; | ||
7005 | } | ||
7006 | function computeEarliestSegStart(segs) { | ||
7007 | return segs.reduce(pickEarliestStart).eventRange.range.start; | ||
7008 | } | ||
7009 | function pickEarliestStart(seg0, seg1) { | ||
7010 | return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1; | ||
7011 | } | ||
7012 | function computeLatestSegEnd(segs) { | ||
7013 | return segs.reduce(pickLatestEnd).eventRange.range.end; | ||
7014 | } | ||
7015 | function pickLatestEnd(seg0, seg1) { | ||
7016 | return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1; | ||
7017 | } | ||
7018 | |||
7019 | class ViewContainer extends BaseComponent { | ||
7020 | render() { | ||
7021 | let { props, context } = this; | ||
7022 | let { options } = context; | ||
7023 | let renderProps = { view: context.viewApi }; | ||
7024 | return (y(ContentContainer, Object.assign({}, props, { elTag: props.elTag || 'div', elClasses: [ | ||
7025 | ...buildViewClassNames(props.viewSpec), | ||
7026 | ...(props.elClasses || []), | ||
7027 | ], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }), () => props.children)); | ||
7028 | } | ||
7029 | } | ||
7030 | function buildViewClassNames(viewSpec) { | ||
7031 | return [ | ||
7032 | `fc-${viewSpec.type}-view`, | ||
7033 | 'fc-view', | ||
7034 | ]; | ||
7035 | } | ||
7036 | |||
7037 | const EVENT_SOURCE_REFINERS = { | ||
7038 | id: String, | ||
7039 | defaultAllDay: Boolean, | ||
7040 | url: String, | ||
7041 | format: String, | ||
7042 | events: identity, | ||
7043 | eventDataTransform: identity, | ||
7044 | // for any network-related sources | ||
7045 | success: identity, | ||
7046 | failure: identity, | ||
7047 | }; | ||
7048 | function parseEventSource(raw, context, refiners = buildEventSourceRefiners(context)) { | ||
7049 | let rawObj; | ||
7050 | if (typeof raw === 'string') { | ||
7051 | rawObj = { url: raw }; | ||
7052 | } | ||
7053 | else if (typeof raw === 'function' || Array.isArray(raw)) { | ||
7054 | rawObj = { events: raw }; | ||
7055 | } | ||
7056 | else if (typeof raw === 'object' && raw) { // not null | ||
7057 | rawObj = raw; | ||
7058 | } | ||
7059 | if (rawObj) { | ||
7060 | let { refined, extra } = refineProps(rawObj, refiners); | ||
7061 | let metaRes = buildEventSourceMeta(refined, context); | ||
7062 | if (metaRes) { | ||
7063 | return { | ||
7064 | _raw: raw, | ||
7065 | isFetching: false, | ||
7066 | latestFetchId: '', | ||
7067 | fetchRange: null, | ||
7068 | defaultAllDay: refined.defaultAllDay, | ||
7069 | eventDataTransform: refined.eventDataTransform, | ||
7070 | success: refined.success, | ||
7071 | failure: refined.failure, | ||
7072 | publicId: refined.id || '', | ||
7073 | sourceId: guid(), | ||
7074 | sourceDefId: metaRes.sourceDefId, | ||
7075 | meta: metaRes.meta, | ||
7076 | ui: createEventUi(refined, context), | ||
7077 | extendedProps: extra, | ||
7078 | }; | ||
7079 | } | ||
7080 | } | ||
7081 | return null; | ||
7082 | } | ||
7083 | function buildEventSourceRefiners(context) { | ||
7084 | return Object.assign(Object.assign(Object.assign({}, EVENT_UI_REFINERS), EVENT_SOURCE_REFINERS), context.pluginHooks.eventSourceRefiners); | ||
7085 | } | ||
7086 | function buildEventSourceMeta(raw, context) { | ||
7087 | let defs = context.pluginHooks.eventSourceDefs; | ||
7088 | for (let i = defs.length - 1; i >= 0; i -= 1) { // later-added plugins take precedence | ||
7089 | let def = defs[i]; | ||
7090 | let meta = def.parseMeta(raw); | ||
7091 | if (meta) { | ||
7092 | return { sourceDefId: i, meta }; | ||
7093 | } | ||
7094 | } | ||
7095 | return null; | ||
7096 | } | ||
7097 | |||
7098 | class CalendarImpl { | ||
7099 | getCurrentData() { | ||
7100 | return this.currentDataManager.getCurrentData(); | ||
7101 | } | ||
7102 | dispatch(action) { | ||
7103 | this.currentDataManager.dispatch(action); | ||
7104 | } | ||
7105 | get view() { return this.getCurrentData().viewApi; } | ||
7106 | batchRendering(callback) { | ||
7107 | callback(); | ||
7108 | } | ||
7109 | updateSize() { | ||
7110 | this.trigger('_resize', true); | ||
7111 | } | ||
7112 | // Options | ||
7113 | // ----------------------------------------------------------------------------------------------------------------- | ||
7114 | setOption(name, val) { | ||
7115 | this.dispatch({ | ||
7116 | type: 'SET_OPTION', | ||
7117 | optionName: name, | ||
7118 | rawOptionValue: val, | ||
7119 | }); | ||
7120 | } | ||
7121 | getOption(name) { | ||
7122 | return this.currentDataManager.currentCalendarOptionsInput[name]; | ||
7123 | } | ||
7124 | getAvailableLocaleCodes() { | ||
7125 | return Object.keys(this.getCurrentData().availableRawLocales); | ||
7126 | } | ||
7127 | // Trigger | ||
7128 | // ----------------------------------------------------------------------------------------------------------------- | ||
7129 | on(handlerName, handler) { | ||
7130 | let { currentDataManager } = this; | ||
7131 | if (currentDataManager.currentCalendarOptionsRefiners[handlerName]) { | ||
7132 | currentDataManager.emitter.on(handlerName, handler); | ||
7133 | } | ||
7134 | else { | ||
7135 | console.warn(`Unknown listener name '${handlerName}'`); | ||
7136 | } | ||
7137 | } | ||
7138 | off(handlerName, handler) { | ||
7139 | this.currentDataManager.emitter.off(handlerName, handler); | ||
7140 | } | ||
7141 | // not meant for public use | ||
7142 | trigger(handlerName, ...args) { | ||
7143 | this.currentDataManager.emitter.trigger(handlerName, ...args); | ||
7144 | } | ||
7145 | // View | ||
7146 | // ----------------------------------------------------------------------------------------------------------------- | ||
7147 | changeView(viewType, dateOrRange) { | ||
7148 | this.batchRendering(() => { | ||
7149 | this.unselect(); | ||
7150 | if (dateOrRange) { | ||
7151 | if (dateOrRange.start && dateOrRange.end) { // a range | ||
7152 | this.dispatch({ | ||
7153 | type: 'CHANGE_VIEW_TYPE', | ||
7154 | viewType, | ||
7155 | }); | ||
7156 | this.dispatch({ | ||
7157 | type: 'SET_OPTION', | ||
7158 | optionName: 'visibleRange', | ||
7159 | rawOptionValue: dateOrRange, | ||
7160 | }); | ||
7161 | } | ||
7162 | else { | ||
7163 | let { dateEnv } = this.getCurrentData(); | ||
7164 | this.dispatch({ | ||
7165 | type: 'CHANGE_VIEW_TYPE', | ||
7166 | viewType, | ||
7167 | dateMarker: dateEnv.createMarker(dateOrRange), | ||
7168 | }); | ||
7169 | } | ||
7170 | } | ||
7171 | else { | ||
7172 | this.dispatch({ | ||
7173 | type: 'CHANGE_VIEW_TYPE', | ||
7174 | viewType, | ||
7175 | }); | ||
7176 | } | ||
7177 | }); | ||
7178 | } | ||
7179 | // Forces navigation to a view for the given date. | ||
7180 | // `viewType` can be a specific view name or a generic one like "week" or "day". | ||
7181 | // needs to change | ||
7182 | zoomTo(dateMarker, viewType) { | ||
7183 | let state = this.getCurrentData(); | ||
7184 | let spec; | ||
7185 | viewType = viewType || 'day'; // day is default zoom | ||
7186 | spec = state.viewSpecs[viewType] || this.getUnitViewSpec(viewType); | ||
7187 | this.unselect(); | ||
7188 | if (spec) { | ||
7189 | this.dispatch({ | ||
7190 | type: 'CHANGE_VIEW_TYPE', | ||
7191 | viewType: spec.type, | ||
7192 | dateMarker, | ||
7193 | }); | ||
7194 | } | ||
7195 | else { | ||
7196 | this.dispatch({ | ||
7197 | type: 'CHANGE_DATE', | ||
7198 | dateMarker, | ||
7199 | }); | ||
7200 | } | ||
7201 | } | ||
7202 | // Given a duration singular unit, like "week" or "day", finds a matching view spec. | ||
7203 | // Preference is given to views that have corresponding buttons. | ||
7204 | getUnitViewSpec(unit) { | ||
7205 | let { viewSpecs, toolbarConfig } = this.getCurrentData(); | ||
7206 | let viewTypes = [].concat(toolbarConfig.header ? toolbarConfig.header.viewsWithButtons : [], toolbarConfig.footer ? toolbarConfig.footer.viewsWithButtons : []); | ||
7207 | let i; | ||
7208 | let spec; | ||
7209 | for (let viewType in viewSpecs) { | ||
7210 | viewTypes.push(viewType); | ||
7211 | } | ||
7212 | for (i = 0; i < viewTypes.length; i += 1) { | ||
7213 | spec = viewSpecs[viewTypes[i]]; | ||
7214 | if (spec) { | ||
7215 | if (spec.singleUnit === unit) { | ||
7216 | return spec; | ||
7217 | } | ||
7218 | } | ||
7219 | } | ||
7220 | return null; | ||
7221 | } | ||
7222 | // Current Date | ||
7223 | // ----------------------------------------------------------------------------------------------------------------- | ||
7224 | prev() { | ||
7225 | this.unselect(); | ||
7226 | this.dispatch({ type: 'PREV' }); | ||
7227 | } | ||
7228 | next() { | ||
7229 | this.unselect(); | ||
7230 | this.dispatch({ type: 'NEXT' }); | ||
7231 | } | ||
7232 | prevYear() { | ||
7233 | let state = this.getCurrentData(); | ||
7234 | this.unselect(); | ||
7235 | this.dispatch({ | ||
7236 | type: 'CHANGE_DATE', | ||
7237 | dateMarker: state.dateEnv.addYears(state.currentDate, -1), | ||
7238 | }); | ||
7239 | } | ||
7240 | nextYear() { | ||
7241 | let state = this.getCurrentData(); | ||
7242 | this.unselect(); | ||
7243 | this.dispatch({ | ||
7244 | type: 'CHANGE_DATE', | ||
7245 | dateMarker: state.dateEnv.addYears(state.currentDate, 1), | ||
7246 | }); | ||
7247 | } | ||
7248 | today() { | ||
7249 | let state = this.getCurrentData(); | ||
7250 | this.unselect(); | ||
7251 | this.dispatch({ | ||
7252 | type: 'CHANGE_DATE', | ||
7253 | dateMarker: state.nowManager.getDateMarker(), | ||
7254 | }); | ||
7255 | } | ||
7256 | gotoDate(zonedDateInput) { | ||
7257 | let state = this.getCurrentData(); | ||
7258 | this.unselect(); | ||
7259 | this.dispatch({ | ||
7260 | type: 'CHANGE_DATE', | ||
7261 | dateMarker: state.dateEnv.createMarker(zonedDateInput), | ||
7262 | }); | ||
7263 | } | ||
7264 | incrementDate(deltaInput) { | ||
7265 | let state = this.getCurrentData(); | ||
7266 | let delta = createDuration(deltaInput); | ||
7267 | if (delta) { // else, warn about invalid input? | ||
7268 | this.unselect(); | ||
7269 | this.dispatch({ | ||
7270 | type: 'CHANGE_DATE', | ||
7271 | dateMarker: state.dateEnv.add(state.currentDate, delta), | ||
7272 | }); | ||
7273 | } | ||
7274 | } | ||
7275 | getDate() { | ||
7276 | let state = this.getCurrentData(); | ||
7277 | return state.dateEnv.toDate(state.currentDate); | ||
7278 | } | ||
7279 | // Date Formatting Utils | ||
7280 | // ----------------------------------------------------------------------------------------------------------------- | ||
7281 | formatDate(d, formatter) { | ||
7282 | let { dateEnv } = this.getCurrentData(); | ||
7283 | return dateEnv.format(dateEnv.createMarker(d), createFormatter(formatter)); | ||
7284 | } | ||
7285 | // `settings` is for formatter AND isEndExclusive | ||
7286 | formatRange(d0, d1, settings) { | ||
7287 | let { dateEnv } = this.getCurrentData(); | ||
7288 | return dateEnv.formatRange(dateEnv.createMarker(d0), dateEnv.createMarker(d1), createFormatter(settings), settings); | ||
7289 | } | ||
7290 | formatIso(d, omitTime) { | ||
7291 | let { dateEnv } = this.getCurrentData(); | ||
7292 | return dateEnv.formatIso(dateEnv.createMarker(d), { omitTime }); | ||
7293 | } | ||
7294 | // Date Selection / Event Selection / DayClick | ||
7295 | // ----------------------------------------------------------------------------------------------------------------- | ||
7296 | select(dateOrObj, endDate) { | ||
7297 | let selectionInput; | ||
7298 | if (endDate == null) { | ||
7299 | if (dateOrObj.start != null) { | ||
7300 | selectionInput = dateOrObj; | ||
7301 | } | ||
7302 | else { | ||
7303 | selectionInput = { | ||
7304 | start: dateOrObj, | ||
7305 | end: null, | ||
7306 | }; | ||
7307 | } | ||
7308 | } | ||
7309 | else { | ||
7310 | selectionInput = { | ||
7311 | start: dateOrObj, | ||
7312 | end: endDate, | ||
7313 | }; | ||
7314 | } | ||
7315 | let state = this.getCurrentData(); | ||
7316 | let selection = parseDateSpan(selectionInput, state.dateEnv, createDuration({ days: 1 })); | ||
7317 | if (selection) { // throw parse error otherwise? | ||
7318 | this.dispatch({ type: 'SELECT_DATES', selection }); | ||
7319 | triggerDateSelect(selection, null, state); | ||
7320 | } | ||
7321 | } | ||
7322 | unselect(pev) { | ||
7323 | let state = this.getCurrentData(); | ||
7324 | if (state.dateSelection) { | ||
7325 | this.dispatch({ type: 'UNSELECT_DATES' }); | ||
7326 | triggerDateUnselect(pev, state); | ||
7327 | } | ||
7328 | } | ||
7329 | // Public Events API | ||
7330 | // ----------------------------------------------------------------------------------------------------------------- | ||
7331 | addEvent(eventInput, sourceInput) { | ||
7332 | if (eventInput instanceof EventImpl) { | ||
7333 | let def = eventInput._def; | ||
7334 | let instance = eventInput._instance; | ||
7335 | let currentData = this.getCurrentData(); | ||
7336 | // not already present? don't want to add an old snapshot | ||
7337 | if (!currentData.eventStore.defs[def.defId]) { | ||
7338 | this.dispatch({ | ||
7339 | type: 'ADD_EVENTS', | ||
7340 | eventStore: eventTupleToStore({ def, instance }), // TODO: better util for two args? | ||
7341 | }); | ||
7342 | this.triggerEventAdd(eventInput); | ||
7343 | } | ||
7344 | return eventInput; | ||
7345 | } | ||
7346 | let state = this.getCurrentData(); | ||
7347 | let eventSource; | ||
7348 | if (sourceInput instanceof EventSourceImpl) { | ||
7349 | eventSource = sourceInput.internalEventSource; | ||
7350 | } | ||
7351 | else if (typeof sourceInput === 'boolean') { | ||
7352 | if (sourceInput) { // true. part of the first event source | ||
7353 | [eventSource] = hashValuesToArray(state.eventSources); | ||
7354 | } | ||
7355 | } | ||
7356 | else if (sourceInput != null) { // an ID. accepts a number too | ||
7357 | let sourceApi = this.getEventSourceById(sourceInput); // TODO: use an internal function | ||
7358 | if (!sourceApi) { | ||
7359 | console.warn(`Could not find an event source with ID "${sourceInput}"`); // TODO: test | ||
7360 | return null; | ||
7361 | } | ||
7362 | eventSource = sourceApi.internalEventSource; | ||
7363 | } | ||
7364 | let tuple = parseEvent(eventInput, eventSource, state, false); | ||
7365 | if (tuple) { | ||
7366 | let newEventApi = new EventImpl(state, tuple.def, tuple.def.recurringDef ? null : tuple.instance); | ||
7367 | this.dispatch({ | ||
7368 | type: 'ADD_EVENTS', | ||
7369 | eventStore: eventTupleToStore(tuple), | ||
7370 | }); | ||
7371 | this.triggerEventAdd(newEventApi); | ||
7372 | return newEventApi; | ||
7373 | } | ||
7374 | return null; | ||
7375 | } | ||
7376 | triggerEventAdd(eventApi) { | ||
7377 | let { emitter } = this.getCurrentData(); | ||
7378 | emitter.trigger('eventAdd', { | ||
7379 | event: eventApi, | ||
7380 | relatedEvents: [], | ||
7381 | revert: () => { | ||
7382 | this.dispatch({ | ||
7383 | type: 'REMOVE_EVENTS', | ||
7384 | eventStore: eventApiToStore(eventApi), | ||
7385 | }); | ||
7386 | }, | ||
7387 | }); | ||
7388 | } | ||
7389 | // TODO: optimize | ||
7390 | getEventById(id) { | ||
7391 | let state = this.getCurrentData(); | ||
7392 | let { defs, instances } = state.eventStore; | ||
7393 | id = String(id); | ||
7394 | for (let defId in defs) { | ||
7395 | let def = defs[defId]; | ||
7396 | if (def.publicId === id) { | ||
7397 | if (def.recurringDef) { | ||
7398 | return new EventImpl(state, def, null); | ||
7399 | } | ||
7400 | for (let instanceId in instances) { | ||
7401 | let instance = instances[instanceId]; | ||
7402 | if (instance.defId === def.defId) { | ||
7403 | return new EventImpl(state, def, instance); | ||
7404 | } | ||
7405 | } | ||
7406 | } | ||
7407 | } | ||
7408 | return null; | ||
7409 | } | ||
7410 | getEvents() { | ||
7411 | let currentData = this.getCurrentData(); | ||
7412 | return buildEventApis(currentData.eventStore, currentData); | ||
7413 | } | ||
7414 | removeAllEvents() { | ||
7415 | this.dispatch({ type: 'REMOVE_ALL_EVENTS' }); | ||
7416 | } | ||
7417 | // Public Event Sources API | ||
7418 | // ----------------------------------------------------------------------------------------------------------------- | ||
7419 | getEventSources() { | ||
7420 | let state = this.getCurrentData(); | ||
7421 | let sourceHash = state.eventSources; | ||
7422 | let sourceApis = []; | ||
7423 | for (let internalId in sourceHash) { | ||
7424 | sourceApis.push(new EventSourceImpl(state, sourceHash[internalId])); | ||
7425 | } | ||
7426 | return sourceApis; | ||
7427 | } | ||
7428 | getEventSourceById(id) { | ||
7429 | let state = this.getCurrentData(); | ||
7430 | let sourceHash = state.eventSources; | ||
7431 | id = String(id); | ||
7432 | for (let sourceId in sourceHash) { | ||
7433 | if (sourceHash[sourceId].publicId === id) { | ||
7434 | return new EventSourceImpl(state, sourceHash[sourceId]); | ||
7435 | } | ||
7436 | } | ||
7437 | return null; | ||
7438 | } | ||
7439 | addEventSource(sourceInput) { | ||
7440 | let state = this.getCurrentData(); | ||
7441 | if (sourceInput instanceof EventSourceImpl) { | ||
7442 | // not already present? don't want to add an old snapshot | ||
7443 | if (!state.eventSources[sourceInput.internalEventSource.sourceId]) { | ||
7444 | this.dispatch({ | ||
7445 | type: 'ADD_EVENT_SOURCES', | ||
7446 | sources: [sourceInput.internalEventSource], | ||
7447 | }); | ||
7448 | } | ||
7449 | return sourceInput; | ||
7450 | } | ||
7451 | let eventSource = parseEventSource(sourceInput, state); | ||
7452 | if (eventSource) { // TODO: error otherwise? | ||
7453 | this.dispatch({ type: 'ADD_EVENT_SOURCES', sources: [eventSource] }); | ||
7454 | return new EventSourceImpl(state, eventSource); | ||
7455 | } | ||
7456 | return null; | ||
7457 | } | ||
7458 | removeAllEventSources() { | ||
7459 | this.dispatch({ type: 'REMOVE_ALL_EVENT_SOURCES' }); | ||
7460 | } | ||
7461 | refetchEvents() { | ||
7462 | this.dispatch({ type: 'FETCH_EVENT_SOURCES', isRefetch: true }); | ||
7463 | } | ||
7464 | // Scroll | ||
7465 | // ----------------------------------------------------------------------------------------------------------------- | ||
7466 | scrollToTime(timeInput) { | ||
7467 | let time = createDuration(timeInput); | ||
7468 | if (time) { | ||
7469 | this.trigger('_scrollRequest', { time }); | ||
7470 | } | ||
7471 | } | ||
7472 | } | ||
7473 | |||
7474 | class Store { | ||
7475 | constructor() { | ||
7476 | this.handlers = []; | ||
7477 | } | ||
7478 | set(value) { | ||
7479 | this.currentValue = value; | ||
7480 | for (let handler of this.handlers) { | ||
7481 | handler(value); | ||
7482 | } | ||
7483 | } | ||
7484 | subscribe(handler) { | ||
7485 | this.handlers.push(handler); | ||
7486 | if (this.currentValue !== undefined) { | ||
7487 | handler(this.currentValue); | ||
7488 | } | ||
7489 | } | ||
7490 | } | ||
7491 | |||
7492 | /* | ||
7493 | Subscribers will get a LIST of CustomRenderings | ||
7494 | */ | ||
7495 | class CustomRenderingStore extends Store { | ||
7496 | constructor() { | ||
7497 | super(...arguments); | ||
7498 | this.map = new Map(); | ||
7499 | } | ||
7500 | // for consistent order | ||
7501 | handle(customRendering) { | ||
7502 | const { map } = this; | ||
7503 | let updated = false; | ||
7504 | if (customRendering.isActive) { | ||
7505 | map.set(customRendering.id, customRendering); | ||
7506 | updated = true; | ||
7507 | } | ||
7508 | else if (map.has(customRendering.id)) { | ||
7509 | map.delete(customRendering.id); | ||
7510 | updated = true; | ||
7511 | } | ||
7512 | if (updated) { | ||
7513 | this.set(map); | ||
7514 | } | ||
7515 | } | ||
7516 | } | ||
7517 | |||
7518 | var internal = { | ||
7519 | __proto__: null, | ||
7520 | BASE_OPTION_DEFAULTS: BASE_OPTION_DEFAULTS, | ||
7521 | identity: identity, | ||
7522 | refineProps: refineProps, | ||
7523 | createEventInstance: createEventInstance, | ||
7524 | parseEventDef: parseEventDef, | ||
7525 | refineEventDef: refineEventDef, | ||
7526 | parseBusinessHours: parseBusinessHours, | ||
7527 | padStart: padStart, | ||
7528 | isInt: isInt, | ||
7529 | parseFieldSpecs: parseFieldSpecs, | ||
7530 | compareByFieldSpecs: compareByFieldSpecs, | ||
7531 | flexibleCompare: flexibleCompare, | ||
7532 | preventSelection: preventSelection, | ||
7533 | allowSelection: allowSelection, | ||
7534 | preventContextMenu: preventContextMenu, | ||
7535 | allowContextMenu: allowContextMenu, | ||
7536 | compareNumbers: compareNumbers, | ||
7537 | enableCursor: enableCursor, | ||
7538 | disableCursor: disableCursor, | ||
7539 | guid: guid, | ||
7540 | computeVisibleDayRange: computeVisibleDayRange, | ||
7541 | isMultiDayRange: isMultiDayRange, | ||
7542 | diffDates: diffDates, | ||
7543 | removeExact: removeExact, | ||
7544 | isArraysEqual: isArraysEqual, | ||
7545 | memoize: memoize, | ||
7546 | memoizeObjArg: memoizeObjArg, | ||
7547 | memoizeArraylike: memoizeArraylike, | ||
7548 | memoizeHashlike: memoizeHashlike, | ||
7549 | intersectRects: intersectRects, | ||
7550 | pointInsideRect: pointInsideRect, | ||
7551 | constrainPoint: constrainPoint, | ||
7552 | getRectCenter: getRectCenter, | ||
7553 | diffPoints: diffPoints, | ||
7554 | translateRect: translateRect, | ||
7555 | mapHash: mapHash, | ||
7556 | filterHash: filterHash, | ||
7557 | isPropsEqual: isPropsEqual, | ||
7558 | compareObjs: compareObjs, | ||
7559 | collectFromHash: collectFromHash, | ||
7560 | findElements: findElements, | ||
7561 | findDirectChildren: findDirectChildren, | ||
7562 | removeElement: removeElement, | ||
7563 | applyStyle: applyStyle, | ||
7564 | elementMatches: elementMatches, | ||
7565 | elementClosest: elementClosest, | ||
7566 | getEventTargetViaRoot: getEventTargetViaRoot, | ||
7567 | getUniqueDomId: getUniqueDomId, | ||
7568 | parseClassNames: parseClassNames, | ||
7569 | getCanVGrowWithinCell: getCanVGrowWithinCell, | ||
7570 | createEmptyEventStore: createEmptyEventStore, | ||
7571 | mergeEventStores: mergeEventStores, | ||
7572 | getRelevantEvents: getRelevantEvents, | ||
7573 | eventTupleToStore: eventTupleToStore, | ||
7574 | combineEventUis: combineEventUis, | ||
7575 | createEventUi: createEventUi, | ||
7576 | Splitter: Splitter, | ||
7577 | getDayClassNames: getDayClassNames, | ||
7578 | getDateMeta: getDateMeta, | ||
7579 | getSlotClassNames: getSlotClassNames, | ||
7580 | buildNavLinkAttrs: buildNavLinkAttrs, | ||
7581 | preventDefault: preventDefault, | ||
7582 | whenTransitionDone: whenTransitionDone, | ||
7583 | computeInnerRect: computeInnerRect, | ||
7584 | computeEdges: computeEdges, | ||
7585 | getClippingParents: getClippingParents, | ||
7586 | computeRect: computeRect, | ||
7587 | unpromisify: unpromisify, | ||
7588 | Emitter: Emitter, | ||
7589 | rangeContainsMarker: rangeContainsMarker, | ||
7590 | intersectRanges: intersectRanges, | ||
7591 | rangesEqual: rangesEqual, | ||
7592 | rangesIntersect: rangesIntersect, | ||
7593 | rangeContainsRange: rangeContainsRange, | ||
7594 | PositionCache: PositionCache, | ||
7595 | ScrollController: ScrollController, | ||
7596 | ElementScrollController: ElementScrollController, | ||
7597 | WindowScrollController: WindowScrollController, | ||
7598 | Theme: Theme, | ||
7599 | ViewContextType: ViewContextType, | ||
7600 | DateComponent: DateComponent, | ||
7601 | DateProfileGenerator: DateProfileGenerator, | ||
7602 | isDateSpansEqual: isDateSpansEqual, | ||
7603 | addDays: addDays, | ||
7604 | startOfDay: startOfDay, | ||
7605 | addMs: addMs, | ||
7606 | addWeeks: addWeeks, | ||
7607 | diffWeeks: diffWeeks, | ||
7608 | diffWholeWeeks: diffWholeWeeks, | ||
7609 | diffWholeDays: diffWholeDays, | ||
7610 | diffDayAndTime: diffDayAndTime, | ||
7611 | diffDays: diffDays, | ||
7612 | isValidDate: isValidDate, | ||
7613 | createDuration: createDuration, | ||
7614 | asCleanDays: asCleanDays, | ||
7615 | multiplyDuration: multiplyDuration, | ||
7616 | addDurations: addDurations, | ||
7617 | asRoughMinutes: asRoughMinutes, | ||
7618 | asRoughSeconds: asRoughSeconds, | ||
7619 | asRoughMs: asRoughMs, | ||
7620 | wholeDivideDurations: wholeDivideDurations, | ||
7621 | greatestDurationDenominator: greatestDurationDenominator, | ||
7622 | DateEnv: DateEnv, | ||
7623 | createFormatter: createFormatter, | ||
7624 | formatIsoTimeString: formatIsoTimeString, | ||
7625 | formatDayString: formatDayString, | ||
7626 | buildIsoString: buildIsoString, | ||
7627 | formatIsoMonthStr: formatIsoMonthStr, | ||
7628 | NamedTimeZoneImpl: NamedTimeZoneImpl, | ||
7629 | parseMarker: parse, | ||
7630 | SegHierarchy: SegHierarchy, | ||
7631 | buildEntryKey: buildEntryKey, | ||
7632 | getEntrySpanEnd: getEntrySpanEnd, | ||
7633 | binarySearch: binarySearch, | ||
7634 | groupIntersectingEntries: groupIntersectingEntries, | ||
7635 | intersectSpans: intersectSpans, | ||
7636 | Interaction: Interaction, | ||
7637 | interactionSettingsToStore: interactionSettingsToStore, | ||
7638 | interactionSettingsStore: interactionSettingsStore, | ||
7639 | ElementDragging: ElementDragging, | ||
7640 | config: config, | ||
7641 | parseDragMeta: parseDragMeta, | ||
7642 | CalendarRoot: CalendarRoot, | ||
7643 | DayHeader: DayHeader, | ||
7644 | computeFallbackHeaderFormat: computeFallbackHeaderFormat, | ||
7645 | TableDateCell: TableDateCell, | ||
7646 | TableDowCell: TableDowCell, | ||
7647 | DaySeriesModel: DaySeriesModel, | ||
7648 | sliceEventStore: sliceEventStore, | ||
7649 | hasBgRendering: hasBgRendering, | ||
7650 | getElSeg: getElSeg, | ||
7651 | buildSegTimeText: buildSegTimeText, | ||
7652 | sortEventSegs: sortEventSegs, | ||
7653 | getSegMeta: getSegMeta, | ||
7654 | buildEventRangeKey: buildEventRangeKey, | ||
7655 | getSegAnchorAttrs: getSegAnchorAttrs, | ||
7656 | DayTableModel: DayTableModel, | ||
7657 | Slicer: Slicer, | ||
7658 | applyMutationToEventStore: applyMutationToEventStore, | ||
7659 | isPropsValid: isPropsValid, | ||
7660 | isInteractionValid: isInteractionValid, | ||
7661 | isDateSelectionValid: isDateSelectionValid, | ||
7662 | requestJson: requestJson, | ||
7663 | BaseComponent: BaseComponent, | ||
7664 | setRef: setRef, | ||
7665 | DelayedRunner: DelayedRunner, | ||
7666 | SimpleScrollGrid: SimpleScrollGrid, | ||
7667 | hasShrinkWidth: hasShrinkWidth, | ||
7668 | renderMicroColGroup: renderMicroColGroup, | ||
7669 | getScrollGridClassNames: getScrollGridClassNames, | ||
7670 | getSectionClassNames: getSectionClassNames, | ||
7671 | getSectionHasLiquidHeight: getSectionHasLiquidHeight, | ||
7672 | getAllowYScrolling: getAllowYScrolling, | ||
7673 | renderChunkContent: renderChunkContent, | ||
7674 | computeShrinkWidth: computeShrinkWidth, | ||
7675 | sanitizeShrinkWidth: sanitizeShrinkWidth, | ||
7676 | isColPropsEqual: isColPropsEqual, | ||
7677 | renderScrollShim: renderScrollShim, | ||
7678 | getStickyFooterScrollbar: getStickyFooterScrollbar, | ||
7679 | getStickyHeaderDates: getStickyHeaderDates, | ||
7680 | Scroller: Scroller, | ||
7681 | getScrollbarWidths: getScrollbarWidths, | ||
7682 | RefMap: RefMap, | ||
7683 | getIsRtlScrollbarOnLeft: getIsRtlScrollbarOnLeft, | ||
7684 | NowTimer: NowTimer, | ||
7685 | ScrollResponder: ScrollResponder, | ||
7686 | StandardEvent: StandardEvent, | ||
7687 | NowIndicatorContainer: NowIndicatorContainer, | ||
7688 | DayCellContainer: DayCellContainer, | ||
7689 | hasCustomDayCellContent: hasCustomDayCellContent, | ||
7690 | EventContainer: EventContainer, | ||
7691 | renderFill: renderFill, | ||
7692 | BgEvent: BgEvent, | ||
7693 | WeekNumberContainer: WeekNumberContainer, | ||
7694 | MoreLinkContainer: MoreLinkContainer, | ||
7695 | computeEarliestSegStart: computeEarliestSegStart, | ||
7696 | ViewContainer: ViewContainer, | ||
7697 | triggerDateSelect: triggerDateSelect, | ||
7698 | getDefaultEventEnd: getDefaultEventEnd, | ||
7699 | injectStyles: injectStyles, | ||
7700 | CalendarImpl: CalendarImpl, | ||
7701 | EventImpl: EventImpl, | ||
7702 | buildEventApis: buildEventApis, | ||
7703 | buildElAttrs: buildElAttrs, | ||
7704 | ContentContainer: ContentContainer, | ||
7705 | CustomRenderingStore: CustomRenderingStore | ||
7706 | }; | ||
7707 | |||
7708 | const globalLocales = []; | ||
7709 | |||
7710 | const MINIMAL_RAW_EN_LOCALE = { | ||
7711 | code: 'en', | ||
7712 | week: { | ||
7713 | dow: 0, | ||
7714 | doy: 4, // 4 days need to be within the year to be considered the first week | ||
7715 | }, | ||
7716 | direction: 'ltr', | ||
7717 | buttonText: { | ||
7718 | prev: 'prev', | ||
7719 | next: 'next', | ||
7720 | prevYear: 'prev year', | ||
7721 | nextYear: 'next year', | ||
7722 | year: 'year', | ||
7723 | today: 'today', | ||
7724 | month: 'month', | ||
7725 | week: 'week', | ||
7726 | day: 'day', | ||
7727 | list: 'list', | ||
7728 | }, | ||
7729 | weekText: 'W', | ||
7730 | weekTextLong: 'Week', | ||
7731 | closeHint: 'Close', | ||
7732 | timeHint: 'Time', | ||
7733 | eventHint: 'Event', | ||
7734 | allDayText: 'all-day', | ||
7735 | moreLinkText: 'more', | ||
7736 | noEventsText: 'No events to display', | ||
7737 | }; | ||
7738 | const RAW_EN_LOCALE = Object.assign(Object.assign({}, MINIMAL_RAW_EN_LOCALE), { | ||
7739 | // Includes things we don't want other locales to inherit, | ||
7740 | // things that derive from other translatable strings. | ||
7741 | buttonHints: { | ||
7742 | prev: 'Previous $0', | ||
7743 | next: 'Next $0', | ||
7744 | today(buttonText, unit) { | ||
7745 | return (unit === 'day') | ||
7746 | ? 'Today' | ||
7747 | : `This ${buttonText}`; | ||
7748 | }, | ||
7749 | }, viewHint: '$0 view', navLinkHint: 'Go to $0', moreLinkHint(eventCnt) { | ||
7750 | return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`; | ||
7751 | } }); | ||
7752 | function organizeRawLocales(explicitRawLocales) { | ||
7753 | let defaultCode = explicitRawLocales.length > 0 ? explicitRawLocales[0].code : 'en'; | ||
7754 | let allRawLocales = globalLocales.concat(explicitRawLocales); | ||
7755 | let rawLocaleMap = { | ||
7756 | en: RAW_EN_LOCALE, | ||
7757 | }; | ||
7758 | for (let rawLocale of allRawLocales) { | ||
7759 | rawLocaleMap[rawLocale.code] = rawLocale; | ||
7760 | } | ||
7761 | return { | ||
7762 | map: rawLocaleMap, | ||
7763 | defaultCode, | ||
7764 | }; | ||
7765 | } | ||
7766 | function buildLocale(inputSingular, available) { | ||
7767 | if (typeof inputSingular === 'object' && !Array.isArray(inputSingular)) { | ||
7768 | return parseLocale(inputSingular.code, [inputSingular.code], inputSingular); | ||
7769 | } | ||
7770 | return queryLocale(inputSingular, available); | ||
7771 | } | ||
7772 | function queryLocale(codeArg, available) { | ||
7773 | let codes = [].concat(codeArg || []); // will convert to array | ||
7774 | let raw = queryRawLocale(codes, available) || RAW_EN_LOCALE; | ||
7775 | return parseLocale(codeArg, codes, raw); | ||
7776 | } | ||
7777 | function queryRawLocale(codes, available) { | ||
7778 | for (let i = 0; i < codes.length; i += 1) { | ||
7779 | let parts = codes[i].toLocaleLowerCase().split('-'); | ||
7780 | for (let j = parts.length; j > 0; j -= 1) { | ||
7781 | let simpleId = parts.slice(0, j).join('-'); | ||
7782 | if (available[simpleId]) { | ||
7783 | return available[simpleId]; | ||
7784 | } | ||
7785 | } | ||
7786 | } | ||
7787 | return null; | ||
7788 | } | ||
7789 | function parseLocale(codeArg, codes, raw) { | ||
7790 | let merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ['buttonText']); | ||
7791 | delete merged.code; // don't want this part of the options | ||
7792 | let { week } = merged; | ||
7793 | delete merged.week; | ||
7794 | return { | ||
7795 | codeArg, | ||
7796 | codes, | ||
7797 | week, | ||
7798 | simpleNumberFormat: new Intl.NumberFormat(codeArg), | ||
7799 | options: merged, | ||
7800 | }; | ||
7801 | } | ||
7802 | |||
7803 | // TODO: easier way to add new hooks? need to update a million things | ||
7804 | function createPlugin(input) { | ||
7805 | return { | ||
7806 | id: guid(), | ||
7807 | name: input.name, | ||
7808 | premiumReleaseDate: input.premiumReleaseDate ? new Date(input.premiumReleaseDate) : undefined, | ||
7809 | deps: input.deps || [], | ||
7810 | reducers: input.reducers || [], | ||
7811 | isLoadingFuncs: input.isLoadingFuncs || [], | ||
7812 | contextInit: [].concat(input.contextInit || []), | ||
7813 | eventRefiners: input.eventRefiners || {}, | ||
7814 | eventDefMemberAdders: input.eventDefMemberAdders || [], | ||
7815 | eventSourceRefiners: input.eventSourceRefiners || {}, | ||
7816 | isDraggableTransformers: input.isDraggableTransformers || [], | ||
7817 | eventDragMutationMassagers: input.eventDragMutationMassagers || [], | ||
7818 | eventDefMutationAppliers: input.eventDefMutationAppliers || [], | ||
7819 | dateSelectionTransformers: input.dateSelectionTransformers || [], | ||
7820 | datePointTransforms: input.datePointTransforms || [], | ||
7821 | dateSpanTransforms: input.dateSpanTransforms || [], | ||
7822 | views: input.views || {}, | ||
7823 | viewPropsTransformers: input.viewPropsTransformers || [], | ||
7824 | isPropsValid: input.isPropsValid || null, | ||
7825 | externalDefTransforms: input.externalDefTransforms || [], | ||
7826 | viewContainerAppends: input.viewContainerAppends || [], | ||
7827 | eventDropTransformers: input.eventDropTransformers || [], | ||
7828 | componentInteractions: input.componentInteractions || [], | ||
7829 | calendarInteractions: input.calendarInteractions || [], | ||
7830 | themeClasses: input.themeClasses || {}, | ||
7831 | eventSourceDefs: input.eventSourceDefs || [], | ||
7832 | cmdFormatter: input.cmdFormatter, | ||
7833 | recurringTypes: input.recurringTypes || [], | ||
7834 | namedTimeZonedImpl: input.namedTimeZonedImpl, | ||
7835 | initialView: input.initialView || '', | ||
7836 | elementDraggingImpl: input.elementDraggingImpl, | ||
7837 | optionChangeHandlers: input.optionChangeHandlers || {}, | ||
7838 | scrollGridImpl: input.scrollGridImpl || null, | ||
7839 | listenerRefiners: input.listenerRefiners || {}, | ||
7840 | optionRefiners: input.optionRefiners || {}, | ||
7841 | propSetHandlers: input.propSetHandlers || {}, | ||
7842 | }; | ||
7843 | } | ||
7844 | function buildPluginHooks(pluginDefs, globalDefs) { | ||
7845 | let currentPluginIds = {}; | ||
7846 | let hooks = { | ||
7847 | premiumReleaseDate: undefined, | ||
7848 | reducers: [], | ||
7849 | isLoadingFuncs: [], | ||
7850 | contextInit: [], | ||
7851 | eventRefiners: {}, | ||
7852 | eventDefMemberAdders: [], | ||
7853 | eventSourceRefiners: {}, | ||
7854 | isDraggableTransformers: [], | ||
7855 | eventDragMutationMassagers: [], | ||
7856 | eventDefMutationAppliers: [], | ||
7857 | dateSelectionTransformers: [], | ||
7858 | datePointTransforms: [], | ||
7859 | dateSpanTransforms: [], | ||
7860 | views: {}, | ||
7861 | viewPropsTransformers: [], | ||
7862 | isPropsValid: null, | ||
7863 | externalDefTransforms: [], | ||
7864 | viewContainerAppends: [], | ||
7865 | eventDropTransformers: [], | ||
7866 | componentInteractions: [], | ||
7867 | calendarInteractions: [], | ||
7868 | themeClasses: {}, | ||
7869 | eventSourceDefs: [], | ||
7870 | cmdFormatter: null, | ||
7871 | recurringTypes: [], | ||
7872 | namedTimeZonedImpl: null, | ||
7873 | initialView: '', | ||
7874 | elementDraggingImpl: null, | ||
7875 | optionChangeHandlers: {}, | ||
7876 | scrollGridImpl: null, | ||
7877 | listenerRefiners: {}, | ||
7878 | optionRefiners: {}, | ||
7879 | propSetHandlers: {}, | ||
7880 | }; | ||
7881 | function addDefs(defs) { | ||
7882 | for (let def of defs) { | ||
7883 | const pluginName = def.name; | ||
7884 | const currentId = currentPluginIds[pluginName]; | ||
7885 | if (currentId === undefined) { | ||
7886 | currentPluginIds[pluginName] = def.id; | ||
7887 | addDefs(def.deps); | ||
7888 | hooks = combineHooks(hooks, def); | ||
7889 | } | ||
7890 | else if (currentId !== def.id) { | ||
7891 | // different ID than the one already added | ||
7892 | console.warn(`Duplicate plugin '${pluginName}'`); | ||
7893 | } | ||
7894 | } | ||
7895 | } | ||
7896 | if (pluginDefs) { | ||
7897 | addDefs(pluginDefs); | ||
7898 | } | ||
7899 | addDefs(globalDefs); | ||
7900 | return hooks; | ||
7901 | } | ||
7902 | function buildBuildPluginHooks() { | ||
7903 | let currentOverrideDefs = []; | ||
7904 | let currentGlobalDefs = []; | ||
7905 | let currentHooks; | ||
7906 | return (overrideDefs, globalDefs) => { | ||
7907 | if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) { | ||
7908 | currentHooks = buildPluginHooks(overrideDefs, globalDefs); | ||
7909 | } | ||
7910 | currentOverrideDefs = overrideDefs; | ||
7911 | currentGlobalDefs = globalDefs; | ||
7912 | return currentHooks; | ||
7913 | }; | ||
7914 | } | ||
7915 | function combineHooks(hooks0, hooks1) { | ||
7916 | return { | ||
7917 | premiumReleaseDate: compareOptionalDates(hooks0.premiumReleaseDate, hooks1.premiumReleaseDate), | ||
7918 | reducers: hooks0.reducers.concat(hooks1.reducers), | ||
7919 | isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs), | ||
7920 | contextInit: hooks0.contextInit.concat(hooks1.contextInit), | ||
7921 | eventRefiners: Object.assign(Object.assign({}, hooks0.eventRefiners), hooks1.eventRefiners), | ||
7922 | eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders), | ||
7923 | eventSourceRefiners: Object.assign(Object.assign({}, hooks0.eventSourceRefiners), hooks1.eventSourceRefiners), | ||
7924 | isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers), | ||
7925 | eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers), | ||
7926 | eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers), | ||
7927 | dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers), | ||
7928 | datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms), | ||
7929 | dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms), | ||
7930 | views: Object.assign(Object.assign({}, hooks0.views), hooks1.views), | ||
7931 | viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers), | ||
7932 | isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid, | ||
7933 | externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms), | ||
7934 | viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends), | ||
7935 | eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers), | ||
7936 | calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions), | ||
7937 | componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions), | ||
7938 | themeClasses: Object.assign(Object.assign({}, hooks0.themeClasses), hooks1.themeClasses), | ||
7939 | eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs), | ||
7940 | cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter, | ||
7941 | recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes), | ||
7942 | namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl, | ||
7943 | initialView: hooks0.initialView || hooks1.initialView, | ||
7944 | elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl, | ||
7945 | optionChangeHandlers: Object.assign(Object.assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers), | ||
7946 | scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl, | ||
7947 | listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners), | ||
7948 | optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners), | ||
7949 | propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers), | ||
7950 | }; | ||
7951 | } | ||
7952 | function compareOptionalDates(date0, date1) { | ||
7953 | if (date0 === undefined) { | ||
7954 | return date1; | ||
7955 | } | ||
7956 | if (date1 === undefined) { | ||
7957 | return date0; | ||
7958 | } | ||
7959 | return new Date(Math.max(date0.valueOf(), date1.valueOf())); | ||
7960 | } | ||
7961 | |||
7962 | class StandardTheme extends Theme { | ||
7963 | } | ||
7964 | StandardTheme.prototype.classes = { | ||
7965 | root: 'fc-theme-standard', | ||
7966 | tableCellShaded: 'fc-cell-shaded', | ||
7967 | buttonGroup: 'fc-button-group', | ||
7968 | button: 'fc-button fc-button-primary', | ||
7969 | buttonActive: 'fc-button-active', | ||
7970 | }; | ||
7971 | StandardTheme.prototype.baseIconClass = 'fc-icon'; | ||
7972 | StandardTheme.prototype.iconClasses = { | ||
7973 | close: 'fc-icon-x', | ||
7974 | prev: 'fc-icon-chevron-left', | ||
7975 | next: 'fc-icon-chevron-right', | ||
7976 | prevYear: 'fc-icon-chevrons-left', | ||
7977 | nextYear: 'fc-icon-chevrons-right', | ||
7978 | }; | ||
7979 | StandardTheme.prototype.rtlIconClasses = { | ||
7980 | prev: 'fc-icon-chevron-right', | ||
7981 | next: 'fc-icon-chevron-left', | ||
7982 | prevYear: 'fc-icon-chevrons-right', | ||
7983 | nextYear: 'fc-icon-chevrons-left', | ||
7984 | }; | ||
7985 | StandardTheme.prototype.iconOverrideOption = 'buttonIcons'; // TODO: make TS-friendly | ||
7986 | StandardTheme.prototype.iconOverrideCustomButtonOption = 'icon'; | ||
7987 | StandardTheme.prototype.iconOverridePrefix = 'fc-icon-'; | ||
7988 | |||
7989 | function compileViewDefs(defaultConfigs, overrideConfigs) { | ||
7990 | let hash = {}; | ||
7991 | let viewType; | ||
7992 | for (viewType in defaultConfigs) { | ||
7993 | ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs); | ||
7994 | } | ||
7995 | for (viewType in overrideConfigs) { | ||
7996 | ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs); | ||
7997 | } | ||
7998 | return hash; | ||
7999 | } | ||
8000 | function ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs) { | ||
8001 | if (hash[viewType]) { | ||
8002 | return hash[viewType]; | ||
8003 | } | ||
8004 | let viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs); | ||
8005 | if (viewDef) { | ||
8006 | hash[viewType] = viewDef; | ||
8007 | } | ||
8008 | return viewDef; | ||
8009 | } | ||
8010 | function buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) { | ||
8011 | let defaultConfig = defaultConfigs[viewType]; | ||
8012 | let overrideConfig = overrideConfigs[viewType]; | ||
8013 | let queryProp = (name) => ((defaultConfig && defaultConfig[name] !== null) ? defaultConfig[name] : | ||
8014 | ((overrideConfig && overrideConfig[name] !== null) ? overrideConfig[name] : null)); | ||
8015 | let theComponent = queryProp('component'); | ||
8016 | let superType = queryProp('superType'); | ||
8017 | let superDef = null; | ||
8018 | if (superType) { | ||
8019 | if (superType === viewType) { | ||
8020 | throw new Error('Can\'t have a custom view type that references itself'); | ||
8021 | } | ||
8022 | superDef = ensureViewDef(superType, hash, defaultConfigs, overrideConfigs); | ||
8023 | } | ||
8024 | if (!theComponent && superDef) { | ||
8025 | theComponent = superDef.component; | ||
8026 | } | ||
8027 | if (!theComponent) { | ||
8028 | return null; // don't throw a warning, might be settings for a single-unit view | ||
8029 | } | ||
8030 | return { | ||
8031 | type: viewType, | ||
8032 | component: theComponent, | ||
8033 | defaults: Object.assign(Object.assign({}, (superDef ? superDef.defaults : {})), (defaultConfig ? defaultConfig.rawOptions : {})), | ||
8034 | overrides: Object.assign(Object.assign({}, (superDef ? superDef.overrides : {})), (overrideConfig ? overrideConfig.rawOptions : {})), | ||
8035 | }; | ||
8036 | } | ||
8037 | |||
8038 | function parseViewConfigs(inputs) { | ||
8039 | return mapHash(inputs, parseViewConfig); | ||
8040 | } | ||
8041 | function parseViewConfig(input) { | ||
8042 | let rawOptions = typeof input === 'function' ? | ||
8043 | { component: input } : | ||
8044 | input; | ||
8045 | let { component } = rawOptions; | ||
8046 | if (rawOptions.content) { | ||
8047 | // TODO: remove content/classNames/didMount/etc from options? | ||
8048 | component = createViewHookComponent(rawOptions); | ||
8049 | } | ||
8050 | else if (component && !(component.prototype instanceof BaseComponent)) { | ||
8051 | // WHY?: people were using `component` property for `content` | ||
8052 | // TODO: converge on one setting name | ||
8053 | component = createViewHookComponent(Object.assign(Object.assign({}, rawOptions), { content: component })); | ||
8054 | } | ||
8055 | return { | ||
8056 | superType: rawOptions.type, | ||
8057 | component: component, | ||
8058 | rawOptions, // includes type and component too :( | ||
8059 | }; | ||
8060 | } | ||
8061 | function createViewHookComponent(options) { | ||
8062 | return (viewProps) => (y(ViewContextType.Consumer, null, (context) => (y(ContentContainer, { elTag: "div", elClasses: buildViewClassNames(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount })))); | ||
8063 | } | ||
8064 | |||
8065 | function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) { | ||
8066 | let defaultConfigs = parseViewConfigs(defaultInputs); | ||
8067 | let overrideConfigs = parseViewConfigs(optionOverrides.views); | ||
8068 | let viewDefs = compileViewDefs(defaultConfigs, overrideConfigs); | ||
8069 | return mapHash(viewDefs, (viewDef) => buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults)); | ||
8070 | } | ||
8071 | function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults) { | ||
8072 | let durationInput = viewDef.overrides.duration || | ||
8073 | viewDef.defaults.duration || | ||
8074 | dynamicOptionOverrides.duration || | ||
8075 | optionOverrides.duration; | ||
8076 | let duration = null; | ||
8077 | let durationUnit = ''; | ||
8078 | let singleUnit = ''; | ||
8079 | let singleUnitOverrides = {}; | ||
8080 | if (durationInput) { | ||
8081 | duration = createDurationCached(durationInput); | ||
8082 | if (duration) { // valid? | ||
8083 | let denom = greatestDurationDenominator(duration); | ||
8084 | durationUnit = denom.unit; | ||
8085 | if (denom.value === 1) { | ||
8086 | singleUnit = durationUnit; | ||
8087 | singleUnitOverrides = overrideConfigs[durationUnit] ? overrideConfigs[durationUnit].rawOptions : {}; | ||
8088 | } | ||
8089 | } | ||
8090 | } | ||
8091 | let queryButtonText = (optionsSubset) => { | ||
8092 | let buttonTextMap = optionsSubset.buttonText || {}; | ||
8093 | let buttonTextKey = viewDef.defaults.buttonTextKey; | ||
8094 | if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) { | ||
8095 | return buttonTextMap[buttonTextKey]; | ||
8096 | } | ||
8097 | if (buttonTextMap[viewDef.type] != null) { | ||
8098 | return buttonTextMap[viewDef.type]; | ||
8099 | } | ||
8100 | if (buttonTextMap[singleUnit] != null) { | ||
8101 | return buttonTextMap[singleUnit]; | ||
8102 | } | ||
8103 | return null; | ||
8104 | }; | ||
8105 | let queryButtonTitle = (optionsSubset) => { | ||
8106 | let buttonHints = optionsSubset.buttonHints || {}; | ||
8107 | let buttonKey = viewDef.defaults.buttonTextKey; // use same key as text | ||
8108 | if (buttonKey != null && buttonHints[buttonKey] != null) { | ||
8109 | return buttonHints[buttonKey]; | ||
8110 | } | ||
8111 | if (buttonHints[viewDef.type] != null) { | ||
8112 | return buttonHints[viewDef.type]; | ||
8113 | } | ||
8114 | if (buttonHints[singleUnit] != null) { | ||
8115 | return buttonHints[singleUnit]; | ||
8116 | } | ||
8117 | return null; | ||
8118 | }; | ||
8119 | return { | ||
8120 | type: viewDef.type, | ||
8121 | component: viewDef.component, | ||
8122 | duration, | ||
8123 | durationUnit, | ||
8124 | singleUnit, | ||
8125 | optionDefaults: viewDef.defaults, | ||
8126 | optionOverrides: Object.assign(Object.assign({}, singleUnitOverrides), viewDef.overrides), | ||
8127 | buttonTextOverride: queryButtonText(dynamicOptionOverrides) || | ||
8128 | queryButtonText(optionOverrides) || // constructor-specified buttonText lookup hash takes precedence | ||
8129 | viewDef.overrides.buttonText, | ||
8130 | buttonTextDefault: queryButtonText(localeDefaults) || | ||
8131 | viewDef.defaults.buttonText || | ||
8132 | queryButtonText(BASE_OPTION_DEFAULTS) || | ||
8133 | viewDef.type, | ||
8134 | // not DRY | ||
8135 | buttonTitleOverride: queryButtonTitle(dynamicOptionOverrides) || | ||
8136 | queryButtonTitle(optionOverrides) || | ||
8137 | viewDef.overrides.buttonHint, | ||
8138 | buttonTitleDefault: queryButtonTitle(localeDefaults) || | ||
8139 | viewDef.defaults.buttonHint || | ||
8140 | queryButtonTitle(BASE_OPTION_DEFAULTS), | ||
8141 | // will eventually fall back to buttonText | ||
8142 | }; | ||
8143 | } | ||
8144 | // hack to get memoization working | ||
8145 | let durationInputMap = {}; | ||
8146 | function createDurationCached(durationInput) { | ||
8147 | let json = JSON.stringify(durationInput); | ||
8148 | let res = durationInputMap[json]; | ||
8149 | if (res === undefined) { | ||
8150 | res = createDuration(durationInput); | ||
8151 | durationInputMap[json] = res; | ||
8152 | } | ||
8153 | return res; | ||
8154 | } | ||
8155 | |||
8156 | function reduceViewType(viewType, action) { | ||
8157 | switch (action.type) { | ||
8158 | case 'CHANGE_VIEW_TYPE': | ||
8159 | viewType = action.viewType; | ||
8160 | } | ||
8161 | return viewType; | ||
8162 | } | ||
8163 | |||
8164 | function reduceCurrentDate(currentDate, action) { | ||
8165 | switch (action.type) { | ||
8166 | case 'CHANGE_DATE': | ||
8167 | return action.dateMarker; | ||
8168 | default: | ||
8169 | return currentDate; | ||
8170 | } | ||
8171 | } | ||
8172 | // should be initialized once and stay constant | ||
8173 | // this will change too | ||
8174 | function getInitialDate(options, dateEnv, nowManager) { | ||
8175 | let initialDateInput = options.initialDate; | ||
8176 | // compute the initial ambig-timezone date | ||
8177 | if (initialDateInput != null) { | ||
8178 | return dateEnv.createMarker(initialDateInput); | ||
8179 | } | ||
8180 | return nowManager.getDateMarker(); | ||
8181 | } | ||
8182 | |||
8183 | function reduceDynamicOptionOverrides(dynamicOptionOverrides, action) { | ||
8184 | switch (action.type) { | ||
8185 | case 'SET_OPTION': | ||
8186 | return Object.assign(Object.assign({}, dynamicOptionOverrides), { [action.optionName]: action.rawOptionValue }); | ||
8187 | default: | ||
8188 | return dynamicOptionOverrides; | ||
8189 | } | ||
8190 | } | ||
8191 | |||
8192 | function reduceDateProfile(currentDateProfile, action, currentDate, dateProfileGenerator) { | ||
8193 | let dp; | ||
8194 | switch (action.type) { | ||
8195 | case 'CHANGE_VIEW_TYPE': | ||
8196 | return dateProfileGenerator.build(action.dateMarker || currentDate); | ||
8197 | case 'CHANGE_DATE': | ||
8198 | return dateProfileGenerator.build(action.dateMarker); | ||
8199 | case 'PREV': | ||
8200 | dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate); | ||
8201 | if (dp.isValid) { | ||
8202 | return dp; | ||
8203 | } | ||
8204 | break; | ||
8205 | case 'NEXT': | ||
8206 | dp = dateProfileGenerator.buildNext(currentDateProfile, currentDate); | ||
8207 | if (dp.isValid) { | ||
8208 | return dp; | ||
8209 | } | ||
8210 | break; | ||
8211 | } | ||
8212 | return currentDateProfile; | ||
8213 | } | ||
8214 | |||
8215 | function initEventSources(calendarOptions, dateProfile, context) { | ||
8216 | let activeRange = dateProfile ? dateProfile.activeRange : null; | ||
8217 | return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context); | ||
8218 | } | ||
8219 | function reduceEventSources(eventSources, action, dateProfile, context) { | ||
8220 | let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check? | ||
8221 | switch (action.type) { | ||
8222 | case 'ADD_EVENT_SOURCES': // already parsed | ||
8223 | return addSources(eventSources, action.sources, activeRange, context); | ||
8224 | case 'REMOVE_EVENT_SOURCE': | ||
8225 | return removeSource(eventSources, action.sourceId); | ||
8226 | case 'PREV': // TODO: how do we track all actions that affect dateProfile :( | ||
8227 | case 'NEXT': | ||
8228 | case 'CHANGE_DATE': | ||
8229 | case 'CHANGE_VIEW_TYPE': | ||
8230 | if (dateProfile) { | ||
8231 | return fetchDirtySources(eventSources, activeRange, context); | ||
8232 | } | ||
8233 | return eventSources; | ||
8234 | case 'FETCH_EVENT_SOURCES': | ||
8235 | return fetchSourcesByIds(eventSources, action.sourceIds ? // why no type? | ||
8236 | arrayToHash(action.sourceIds) : | ||
8237 | excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context); | ||
8238 | case 'RECEIVE_EVENTS': | ||
8239 | case 'RECEIVE_EVENT_ERROR': | ||
8240 | return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange); | ||
8241 | case 'REMOVE_ALL_EVENT_SOURCES': | ||
8242 | return {}; | ||
8243 | default: | ||
8244 | return eventSources; | ||
8245 | } | ||
8246 | } | ||
8247 | function reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) { | ||
8248 | let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check? | ||
8249 | return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, true, context); | ||
8250 | } | ||
8251 | function computeEventSourcesLoading(eventSources) { | ||
8252 | for (let sourceId in eventSources) { | ||
8253 | if (eventSources[sourceId].isFetching) { | ||
8254 | return true; | ||
8255 | } | ||
8256 | } | ||
8257 | return false; | ||
8258 | } | ||
8259 | function addSources(eventSourceHash, sources, fetchRange, context) { | ||
8260 | let hash = {}; | ||
8261 | for (let source of sources) { | ||
8262 | hash[source.sourceId] = source; | ||
8263 | } | ||
8264 | if (fetchRange) { | ||
8265 | hash = fetchDirtySources(hash, fetchRange, context); | ||
8266 | } | ||
8267 | return Object.assign(Object.assign({}, eventSourceHash), hash); | ||
8268 | } | ||
8269 | function removeSource(eventSourceHash, sourceId) { | ||
8270 | return filterHash(eventSourceHash, (eventSource) => eventSource.sourceId !== sourceId); | ||
8271 | } | ||
8272 | function fetchDirtySources(sourceHash, fetchRange, context) { | ||
8273 | return fetchSourcesByIds(sourceHash, filterHash(sourceHash, (eventSource) => isSourceDirty(eventSource, fetchRange, context)), fetchRange, false, context); | ||
8274 | } | ||
8275 | function isSourceDirty(eventSource, fetchRange, context) { | ||
8276 | if (!doesSourceNeedRange(eventSource, context)) { | ||
8277 | return !eventSource.latestFetchId; | ||
8278 | } | ||
8279 | return !context.options.lazyFetching || | ||
8280 | !eventSource.fetchRange || | ||
8281 | eventSource.isFetching || // always cancel outdated in-progress fetches | ||
8282 | fetchRange.start < eventSource.fetchRange.start || | ||
8283 | fetchRange.end > eventSource.fetchRange.end; | ||
8284 | } | ||
8285 | function fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, context) { | ||
8286 | let nextSources = {}; | ||
8287 | for (let sourceId in prevSources) { | ||
8288 | let source = prevSources[sourceId]; | ||
8289 | if (sourceIdHash[sourceId]) { | ||
8290 | nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context); | ||
8291 | } | ||
8292 | else { | ||
8293 | nextSources[sourceId] = source; | ||
8294 | } | ||
8295 | } | ||
8296 | return nextSources; | ||
8297 | } | ||
8298 | function fetchSource(eventSource, fetchRange, isRefetch, context) { | ||
8299 | let { options, calendarApi } = context; | ||
8300 | let sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId]; | ||
8301 | let fetchId = guid(); | ||
8302 | sourceDef.fetch({ | ||
8303 | eventSource, | ||
8304 | range: fetchRange, | ||
8305 | isRefetch, | ||
8306 | context, | ||
8307 | }, (res) => { | ||
8308 | let { rawEvents } = res; | ||
8309 | if (options.eventSourceSuccess) { | ||
8310 | rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.response) || rawEvents; | ||
8311 | } | ||
8312 | if (eventSource.success) { | ||
8313 | rawEvents = eventSource.success.call(calendarApi, rawEvents, res.response) || rawEvents; | ||
8314 | } | ||
8315 | context.dispatch({ | ||
8316 | type: 'RECEIVE_EVENTS', | ||
8317 | sourceId: eventSource.sourceId, | ||
8318 | fetchId, | ||
8319 | fetchRange, | ||
8320 | rawEvents, | ||
8321 | }); | ||
8322 | }, (error) => { | ||
8323 | let errorHandled = false; | ||
8324 | if (options.eventSourceFailure) { | ||
8325 | options.eventSourceFailure.call(calendarApi, error); | ||
8326 | errorHandled = true; | ||
8327 | } | ||
8328 | if (eventSource.failure) { | ||
8329 | eventSource.failure(error); | ||
8330 | errorHandled = true; | ||
8331 | } | ||
8332 | if (!errorHandled) { | ||
8333 | console.warn(error.message, error); | ||
8334 | } | ||
8335 | context.dispatch({ | ||
8336 | type: 'RECEIVE_EVENT_ERROR', | ||
8337 | sourceId: eventSource.sourceId, | ||
8338 | fetchId, | ||
8339 | fetchRange, | ||
8340 | error, | ||
8341 | }); | ||
8342 | }); | ||
8343 | return Object.assign(Object.assign({}, eventSource), { isFetching: true, latestFetchId: fetchId }); | ||
8344 | } | ||
8345 | function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) { | ||
8346 | let eventSource = sourceHash[sourceId]; | ||
8347 | if (eventSource && // not already removed | ||
8348 | fetchId === eventSource.latestFetchId) { | ||
8349 | return Object.assign(Object.assign({}, sourceHash), { [sourceId]: Object.assign(Object.assign({}, eventSource), { isFetching: false, fetchRange }) }); | ||
8350 | } | ||
8351 | return sourceHash; | ||
8352 | } | ||
8353 | function excludeStaticSources(eventSources, context) { | ||
8354 | return filterHash(eventSources, (eventSource) => doesSourceNeedRange(eventSource, context)); | ||
8355 | } | ||
8356 | function parseInitialSources(rawOptions, context) { | ||
8357 | let refiners = buildEventSourceRefiners(context); | ||
8358 | let rawSources = [].concat(rawOptions.eventSources || []); | ||
8359 | let sources = []; // parsed | ||
8360 | if (rawOptions.initialEvents) { | ||
8361 | rawSources.unshift(rawOptions.initialEvents); | ||
8362 | } | ||
8363 | if (rawOptions.events) { | ||
8364 | rawSources.unshift(rawOptions.events); | ||
8365 | } | ||
8366 | for (let rawSource of rawSources) { | ||
8367 | let source = parseEventSource(rawSource, context, refiners); | ||
8368 | if (source) { | ||
8369 | sources.push(source); | ||
8370 | } | ||
8371 | } | ||
8372 | return sources; | ||
8373 | } | ||
8374 | function doesSourceNeedRange(eventSource, context) { | ||
8375 | let defs = context.pluginHooks.eventSourceDefs; | ||
8376 | return !defs[eventSource.sourceDefId].ignoreRange; | ||
8377 | } | ||
8378 | |||
8379 | function reduceDateSelection(currentSelection, action) { | ||
8380 | switch (action.type) { | ||
8381 | case 'UNSELECT_DATES': | ||
8382 | return null; | ||
8383 | case 'SELECT_DATES': | ||
8384 | return action.selection; | ||
8385 | default: | ||
8386 | return currentSelection; | ||
8387 | } | ||
8388 | } | ||
8389 | |||
8390 | function reduceSelectedEvent(currentInstanceId, action) { | ||
8391 | switch (action.type) { | ||
8392 | case 'UNSELECT_EVENT': | ||
8393 | return ''; | ||
8394 | case 'SELECT_EVENT': | ||
8395 | return action.eventInstanceId; | ||
8396 | default: | ||
8397 | return currentInstanceId; | ||
8398 | } | ||
8399 | } | ||
8400 | |||
8401 | function reduceEventDrag(currentDrag, action) { | ||
8402 | let newDrag; | ||
8403 | switch (action.type) { | ||
8404 | case 'UNSET_EVENT_DRAG': | ||
8405 | return null; | ||
8406 | case 'SET_EVENT_DRAG': | ||
8407 | newDrag = action.state; | ||
8408 | return { | ||
8409 | affectedEvents: newDrag.affectedEvents, | ||
8410 | mutatedEvents: newDrag.mutatedEvents, | ||
8411 | isEvent: newDrag.isEvent, | ||
8412 | }; | ||
8413 | default: | ||
8414 | return currentDrag; | ||
8415 | } | ||
8416 | } | ||
8417 | |||
8418 | function reduceEventResize(currentResize, action) { | ||
8419 | let newResize; | ||
8420 | switch (action.type) { | ||
8421 | case 'UNSET_EVENT_RESIZE': | ||
8422 | return null; | ||
8423 | case 'SET_EVENT_RESIZE': | ||
8424 | newResize = action.state; | ||
8425 | return { | ||
8426 | affectedEvents: newResize.affectedEvents, | ||
8427 | mutatedEvents: newResize.mutatedEvents, | ||
8428 | isEvent: newResize.isEvent, | ||
8429 | }; | ||
8430 | default: | ||
8431 | return currentResize; | ||
8432 | } | ||
8433 | } | ||
8434 | |||
8435 | function parseToolbars(calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) { | ||
8436 | let header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null; | ||
8437 | let footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null; | ||
8438 | return { header, footer }; | ||
8439 | } | ||
8440 | function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) { | ||
8441 | let sectionWidgets = {}; | ||
8442 | let viewsWithButtons = []; | ||
8443 | let hasTitle = false; | ||
8444 | for (let sectionName in sectionStrHash) { | ||
8445 | let sectionStr = sectionStrHash[sectionName]; | ||
8446 | let sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi); | ||
8447 | sectionWidgets[sectionName] = sectionRes.widgets; | ||
8448 | viewsWithButtons.push(...sectionRes.viewsWithButtons); | ||
8449 | hasTitle = hasTitle || sectionRes.hasTitle; | ||
8450 | } | ||
8451 | return { sectionWidgets, viewsWithButtons, hasTitle }; | ||
8452 | } | ||
8453 | /* | ||
8454 | BAD: querying icons and text here. should be done at render time | ||
8455 | */ | ||
8456 | function parseSection(sectionStr, calendarOptions, // defaults+overrides, then refined | ||
8457 | calendarOptionOverrides, // overrides only!, unrefined :( | ||
8458 | theme, viewSpecs, calendarApi) { | ||
8459 | let isRtl = calendarOptions.direction === 'rtl'; | ||
8460 | let calendarCustomButtons = calendarOptions.customButtons || {}; | ||
8461 | let calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {}; | ||
8462 | let calendarButtonText = calendarOptions.buttonText || {}; | ||
8463 | let calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {}; | ||
8464 | let calendarButtonHints = calendarOptions.buttonHints || {}; | ||
8465 | let sectionSubstrs = sectionStr ? sectionStr.split(' ') : []; | ||
8466 | let viewsWithButtons = []; | ||
8467 | let hasTitle = false; | ||
8468 | let widgets = sectionSubstrs.map((buttonGroupStr) => (buttonGroupStr.split(',').map((buttonName) => { | ||
8469 | if (buttonName === 'title') { | ||
8470 | hasTitle = true; | ||
8471 | return { buttonName }; | ||
8472 | } | ||
8473 | let customButtonProps; | ||
8474 | let viewSpec; | ||
8475 | let buttonClick; | ||
8476 | let buttonIcon; // only one of these will be set | ||
8477 | let buttonText; // " | ||
8478 | let buttonHint; | ||
8479 | // ^ for the title="" attribute, for accessibility | ||
8480 | if ((customButtonProps = calendarCustomButtons[buttonName])) { | ||
8481 | buttonClick = (ev) => { | ||
8482 | if (customButtonProps.click) { | ||
8483 | customButtonProps.click.call(ev.target, ev, ev.target); // TODO: use Calendar this context? | ||
8484 | } | ||
8485 | }; | ||
8486 | (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) || | ||
8487 | (buttonIcon = theme.getIconClass(buttonName, isRtl)) || | ||
8488 | (buttonText = customButtonProps.text); | ||
8489 | buttonHint = customButtonProps.hint || customButtonProps.text; | ||
8490 | } | ||
8491 | else if ((viewSpec = viewSpecs[buttonName])) { | ||
8492 | viewsWithButtons.push(buttonName); | ||
8493 | buttonClick = () => { | ||
8494 | calendarApi.changeView(buttonName); | ||
8495 | }; | ||
8496 | (buttonText = viewSpec.buttonTextOverride) || | ||
8497 | (buttonIcon = theme.getIconClass(buttonName, isRtl)) || | ||
8498 | (buttonText = viewSpec.buttonTextDefault); | ||
8499 | let textFallback = viewSpec.buttonTextOverride || | ||
8500 | viewSpec.buttonTextDefault; | ||
8501 | buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride || | ||
8502 | viewSpec.buttonTitleDefault || | ||
8503 | calendarOptions.viewHint, [textFallback, buttonName], // view-name = buttonName | ||
8504 | textFallback); | ||
8505 | } | ||
8506 | else if (calendarApi[buttonName]) { // a calendarApi method | ||
8507 | buttonClick = () => { | ||
8508 | calendarApi[buttonName](); | ||
8509 | }; | ||
8510 | (buttonText = calendarButtonTextOverrides[buttonName]) || | ||
8511 | (buttonIcon = theme.getIconClass(buttonName, isRtl)) || | ||
8512 | (buttonText = calendarButtonText[buttonName]); // everything else is considered default | ||
8513 | if (buttonName === 'prevYear' || buttonName === 'nextYear') { | ||
8514 | let prevOrNext = buttonName === 'prevYear' ? 'prev' : 'next'; | ||
8515 | buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] || | ||
8516 | calendarButtonHints[prevOrNext], [ | ||
8517 | calendarButtonText.year || 'year', | ||
8518 | 'year', | ||
8519 | ], calendarButtonText[buttonName]); | ||
8520 | } | ||
8521 | else { | ||
8522 | buttonHint = (navUnit) => formatWithOrdinals(calendarButtonHintOverrides[buttonName] || | ||
8523 | calendarButtonHints[buttonName], [ | ||
8524 | calendarButtonText[navUnit] || navUnit, | ||
8525 | navUnit, | ||
8526 | ], calendarButtonText[buttonName]); | ||
8527 | } | ||
8528 | } | ||
8529 | return { buttonName, buttonClick, buttonIcon, buttonText, buttonHint }; | ||
8530 | }))); | ||
8531 | return { widgets, viewsWithButtons, hasTitle }; | ||
8532 | } | ||
8533 | |||
8534 | // always represents the current view. otherwise, it'd need to change value every time date changes | ||
8535 | class ViewImpl { | ||
8536 | constructor(type, getCurrentData, dateEnv) { | ||
8537 | this.type = type; | ||
8538 | this.getCurrentData = getCurrentData; | ||
8539 | this.dateEnv = dateEnv; | ||
8540 | } | ||
8541 | get calendar() { | ||
8542 | return this.getCurrentData().calendarApi; | ||
8543 | } | ||
8544 | get title() { | ||
8545 | return this.getCurrentData().viewTitle; | ||
8546 | } | ||
8547 | get activeStart() { | ||
8548 | return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start); | ||
8549 | } | ||
8550 | get activeEnd() { | ||
8551 | return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end); | ||
8552 | } | ||
8553 | get currentStart() { | ||
8554 | return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start); | ||
8555 | } | ||
8556 | get currentEnd() { | ||
8557 | return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end); | ||
8558 | } | ||
8559 | getOption(name) { | ||
8560 | return this.getCurrentData().options[name]; // are the view-specific options | ||
8561 | } | ||
8562 | } | ||
8563 | |||
8564 | let eventSourceDef$2 = { | ||
8565 | ignoreRange: true, | ||
8566 | parseMeta(refined) { | ||
8567 | if (Array.isArray(refined.events)) { | ||
8568 | return refined.events; | ||
8569 | } | ||
8570 | return null; | ||
8571 | }, | ||
8572 | fetch(arg, successCallback) { | ||
8573 | successCallback({ | ||
8574 | rawEvents: arg.eventSource.meta, | ||
8575 | }); | ||
8576 | }, | ||
8577 | }; | ||
8578 | const arrayEventSourcePlugin = createPlugin({ | ||
8579 | name: 'array-event-source', | ||
8580 | eventSourceDefs: [eventSourceDef$2], | ||
8581 | }); | ||
8582 | |||
8583 | let eventSourceDef$1 = { | ||
8584 | parseMeta(refined) { | ||
8585 | if (typeof refined.events === 'function') { | ||
8586 | return refined.events; | ||
8587 | } | ||
8588 | return null; | ||
8589 | }, | ||
8590 | fetch(arg, successCallback, errorCallback) { | ||
8591 | const { dateEnv } = arg.context; | ||
8592 | const func = arg.eventSource.meta; | ||
8593 | unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), (rawEvents) => successCallback({ rawEvents }), errorCallback); | ||
8594 | }, | ||
8595 | }; | ||
8596 | const funcEventSourcePlugin = createPlugin({ | ||
8597 | name: 'func-event-source', | ||
8598 | eventSourceDefs: [eventSourceDef$1], | ||
8599 | }); | ||
8600 | |||
8601 | const JSON_FEED_EVENT_SOURCE_REFINERS = { | ||
8602 | method: String, | ||
8603 | extraParams: identity, | ||
8604 | startParam: String, | ||
8605 | endParam: String, | ||
8606 | timeZoneParam: String, | ||
8607 | }; | ||
8608 | |||
8609 | let eventSourceDef = { | ||
8610 | parseMeta(refined) { | ||
8611 | if (refined.url && (refined.format === 'json' || !refined.format)) { | ||
8612 | return { | ||
8613 | url: refined.url, | ||
8614 | format: 'json', | ||
8615 | method: (refined.method || 'GET').toUpperCase(), | ||
8616 | extraParams: refined.extraParams, | ||
8617 | startParam: refined.startParam, | ||
8618 | endParam: refined.endParam, | ||
8619 | timeZoneParam: refined.timeZoneParam, | ||
8620 | }; | ||
8621 | } | ||
8622 | return null; | ||
8623 | }, | ||
8624 | fetch(arg, successCallback, errorCallback) { | ||
8625 | const { meta } = arg.eventSource; | ||
8626 | const requestParams = buildRequestParams(meta, arg.range, arg.context); | ||
8627 | requestJson(meta.method, meta.url, requestParams).then(([rawEvents, response]) => { | ||
8628 | successCallback({ rawEvents, response }); | ||
8629 | }, errorCallback); | ||
8630 | }, | ||
8631 | }; | ||
8632 | const jsonFeedEventSourcePlugin = createPlugin({ | ||
8633 | name: 'json-event-source', | ||
8634 | eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS, | ||
8635 | eventSourceDefs: [eventSourceDef], | ||
8636 | }); | ||
8637 | function buildRequestParams(meta, range, context) { | ||
8638 | let { dateEnv, options } = context; | ||
8639 | let startParam; | ||
8640 | let endParam; | ||
8641 | let timeZoneParam; | ||
8642 | let customRequestParams; | ||
8643 | let params = {}; | ||
8644 | startParam = meta.startParam; | ||
8645 | if (startParam == null) { | ||
8646 | startParam = options.startParam; | ||
8647 | } | ||
8648 | endParam = meta.endParam; | ||
8649 | if (endParam == null) { | ||
8650 | endParam = options.endParam; | ||
8651 | } | ||
8652 | timeZoneParam = meta.timeZoneParam; | ||
8653 | if (timeZoneParam == null) { | ||
8654 | timeZoneParam = options.timeZoneParam; | ||
8655 | } | ||
8656 | // retrieve any outbound GET/POST data from the options | ||
8657 | if (typeof meta.extraParams === 'function') { | ||
8658 | // supplied as a function that returns a key/value object | ||
8659 | customRequestParams = meta.extraParams(); | ||
8660 | } | ||
8661 | else { | ||
8662 | // probably supplied as a straight key/value object | ||
8663 | customRequestParams = meta.extraParams || {}; | ||
8664 | } | ||
8665 | Object.assign(params, customRequestParams); | ||
8666 | params[startParam] = dateEnv.formatIso(range.start); | ||
8667 | params[endParam] = dateEnv.formatIso(range.end); | ||
8668 | if (dateEnv.timeZone !== 'local') { | ||
8669 | params[timeZoneParam] = dateEnv.timeZone; | ||
8670 | } | ||
8671 | return params; | ||
8672 | } | ||
8673 | |||
8674 | const SIMPLE_RECURRING_REFINERS = { | ||
8675 | daysOfWeek: identity, | ||
8676 | startTime: createDuration, | ||
8677 | endTime: createDuration, | ||
8678 | duration: createDuration, | ||
8679 | startRecur: identity, | ||
8680 | endRecur: identity, | ||
8681 | }; | ||
8682 | |||
8683 | let recurring = { | ||
8684 | parse(refined, dateEnv) { | ||
8685 | if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) { | ||
8686 | let recurringData = { | ||
8687 | daysOfWeek: refined.daysOfWeek || null, | ||
8688 | startTime: refined.startTime || null, | ||
8689 | endTime: refined.endTime || null, | ||
8690 | startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null, | ||
8691 | endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null, | ||
8692 | dateEnv, | ||
8693 | }; | ||
8694 | let duration; | ||
8695 | if (refined.duration) { | ||
8696 | duration = refined.duration; | ||
8697 | } | ||
8698 | if (!duration && refined.startTime && refined.endTime) { | ||
8699 | duration = subtractDurations(refined.endTime, refined.startTime); | ||
8700 | } | ||
8701 | return { | ||
8702 | allDayGuess: Boolean(!refined.startTime && !refined.endTime), | ||
8703 | duration, | ||
8704 | typeData: recurringData, // doesn't need endTime anymore but oh well | ||
8705 | }; | ||
8706 | } | ||
8707 | return null; | ||
8708 | }, | ||
8709 | expand(typeData, framingRange, dateEnv) { | ||
8710 | let clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur }); | ||
8711 | if (clippedFramingRange) { | ||
8712 | return expandRanges(typeData.daysOfWeek, typeData.startTime, typeData.dateEnv, dateEnv, clippedFramingRange); | ||
8713 | } | ||
8714 | return []; | ||
8715 | }, | ||
8716 | }; | ||
8717 | const simpleRecurringEventsPlugin = createPlugin({ | ||
8718 | name: 'simple-recurring-event', | ||
8719 | recurringTypes: [recurring], | ||
8720 | eventRefiners: SIMPLE_RECURRING_REFINERS, | ||
8721 | }); | ||
8722 | function expandRanges(daysOfWeek, startTime, eventDateEnv, calendarDateEnv, framingRange) { | ||
8723 | let dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null; | ||
8724 | let dayMarker = startOfDay(framingRange.start); | ||
8725 | let endMarker = framingRange.end; | ||
8726 | let instanceStarts = []; | ||
8727 | while (dayMarker < endMarker) { | ||
8728 | let instanceStart; | ||
8729 | // if everyday, or this particular day-of-week | ||
8730 | if (!dowHash || dowHash[dayMarker.getUTCDay()]) { | ||
8731 | if (startTime) { | ||
8732 | instanceStart = calendarDateEnv.add(dayMarker, startTime); | ||
8733 | } | ||
8734 | else { | ||
8735 | instanceStart = dayMarker; | ||
8736 | } | ||
8737 | instanceStarts.push(calendarDateEnv.createMarker(eventDateEnv.toDate(instanceStart))); | ||
8738 | } | ||
8739 | dayMarker = addDays(dayMarker, 1); | ||
8740 | } | ||
8741 | return instanceStarts; | ||
8742 | } | ||
8743 | |||
8744 | const changeHandlerPlugin = createPlugin({ | ||
8745 | name: 'change-handler', | ||
8746 | optionChangeHandlers: { | ||
8747 | events(events, context) { | ||
8748 | handleEventSources([events], context); | ||
8749 | }, | ||
8750 | eventSources: handleEventSources, | ||
8751 | }, | ||
8752 | }); | ||
8753 | /* | ||
8754 | BUG: if `event` was supplied, all previously-given `eventSources` will be wiped out | ||
8755 | */ | ||
8756 | function handleEventSources(inputs, context) { | ||
8757 | let unfoundSources = hashValuesToArray(context.getCurrentData().eventSources); | ||
8758 | if (unfoundSources.length === 1 && | ||
8759 | inputs.length === 1 && | ||
8760 | Array.isArray(unfoundSources[0]._raw) && | ||
8761 | Array.isArray(inputs[0])) { | ||
8762 | context.dispatch({ | ||
8763 | type: 'RESET_RAW_EVENTS', | ||
8764 | sourceId: unfoundSources[0].sourceId, | ||
8765 | rawEvents: inputs[0], | ||
8766 | }); | ||
8767 | return; | ||
8768 | } | ||
8769 | let newInputs = []; | ||
8770 | for (let input of inputs) { | ||
8771 | let inputFound = false; | ||
8772 | for (let i = 0; i < unfoundSources.length; i += 1) { | ||
8773 | if (unfoundSources[i]._raw === input) { | ||
8774 | unfoundSources.splice(i, 1); // delete | ||
8775 | inputFound = true; | ||
8776 | break; | ||
8777 | } | ||
8778 | } | ||
8779 | if (!inputFound) { | ||
8780 | newInputs.push(input); | ||
8781 | } | ||
8782 | } | ||
8783 | for (let unfoundSource of unfoundSources) { | ||
8784 | context.dispatch({ | ||
8785 | type: 'REMOVE_EVENT_SOURCE', | ||
8786 | sourceId: unfoundSource.sourceId, | ||
8787 | }); | ||
8788 | } | ||
8789 | for (let newInput of newInputs) { | ||
8790 | context.calendarApi.addEventSource(newInput); | ||
8791 | } | ||
8792 | } | ||
8793 | |||
8794 | function handleDateProfile(dateProfile, context) { | ||
8795 | context.emitter.trigger('datesSet', Object.assign(Object.assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi })); | ||
8796 | } | ||
8797 | |||
8798 | function handleEventStore(eventStore, context) { | ||
8799 | let { emitter } = context; | ||
8800 | if (emitter.hasHandlers('eventsSet')) { | ||
8801 | emitter.trigger('eventsSet', buildEventApis(eventStore, context)); | ||
8802 | } | ||
8803 | } | ||
8804 | |||
8805 | /* | ||
8806 | this array is exposed on the root namespace so that UMD plugins can add to it. | ||
8807 | see the rollup-bundles script. | ||
8808 | */ | ||
8809 | const globalPlugins = [ | ||
8810 | arrayEventSourcePlugin, | ||
8811 | funcEventSourcePlugin, | ||
8812 | jsonFeedEventSourcePlugin, | ||
8813 | simpleRecurringEventsPlugin, | ||
8814 | changeHandlerPlugin, | ||
8815 | createPlugin({ | ||
8816 | name: 'misc', | ||
8817 | isLoadingFuncs: [ | ||
8818 | (state) => computeEventSourcesLoading(state.eventSources), | ||
8819 | ], | ||
8820 | propSetHandlers: { | ||
8821 | dateProfile: handleDateProfile, | ||
8822 | eventStore: handleEventStore, | ||
8823 | }, | ||
8824 | }), | ||
8825 | ]; | ||
8826 | |||
8827 | class TaskRunner { | ||
8828 | constructor(runTaskOption, drainedOption) { | ||
8829 | this.runTaskOption = runTaskOption; | ||
8830 | this.drainedOption = drainedOption; | ||
8831 | this.queue = []; | ||
8832 | this.delayedRunner = new DelayedRunner(this.drain.bind(this)); | ||
8833 | } | ||
8834 | request(task, delay) { | ||
8835 | this.queue.push(task); | ||
8836 | this.delayedRunner.request(delay); | ||
8837 | } | ||
8838 | pause(scope) { | ||
8839 | this.delayedRunner.pause(scope); | ||
8840 | } | ||
8841 | resume(scope, force) { | ||
8842 | this.delayedRunner.resume(scope, force); | ||
8843 | } | ||
8844 | drain() { | ||
8845 | let { queue } = this; | ||
8846 | while (queue.length) { | ||
8847 | let completedTasks = []; | ||
8848 | let task; | ||
8849 | while ((task = queue.shift())) { | ||
8850 | this.runTask(task); | ||
8851 | completedTasks.push(task); | ||
8852 | } | ||
8853 | this.drained(completedTasks); | ||
8854 | } // keep going, in case new tasks were added in the drained handler | ||
8855 | } | ||
8856 | runTask(task) { | ||
8857 | if (this.runTaskOption) { | ||
8858 | this.runTaskOption(task); | ||
8859 | } | ||
8860 | } | ||
8861 | drained(completedTasks) { | ||
8862 | if (this.drainedOption) { | ||
8863 | this.drainedOption(completedTasks); | ||
8864 | } | ||
8865 | } | ||
8866 | } | ||
8867 | |||
8868 | // Computes what the title at the top of the calendarApi should be for this view | ||
8869 | function buildTitle(dateProfile, viewOptions, dateEnv) { | ||
8870 | let range; | ||
8871 | // for views that span a large unit of time, show the proper interval, ignoring stray days before and after | ||
8872 | if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) { | ||
8873 | range = dateProfile.currentRange; | ||
8874 | } | ||
8875 | else { // for day units or smaller, use the actual day range | ||
8876 | range = dateProfile.activeRange; | ||
8877 | } | ||
8878 | return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), { | ||
8879 | isEndExclusive: dateProfile.isRangeAllDay, | ||
8880 | defaultSeparator: viewOptions.titleRangeSeparator, | ||
8881 | }); | ||
8882 | } | ||
8883 | // Generates the format string that should be used to generate the title for the current date range. | ||
8884 | // Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`. | ||
8885 | function buildTitleFormat(dateProfile) { | ||
8886 | let { currentRangeUnit } = dateProfile; | ||
8887 | if (currentRangeUnit === 'year') { | ||
8888 | return { year: 'numeric' }; | ||
8889 | } | ||
8890 | if (currentRangeUnit === 'month') { | ||
8891 | return { year: 'numeric', month: 'long' }; // like "September 2014" | ||
8892 | } | ||
8893 | let days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end); | ||
8894 | if (days !== null && days > 1) { | ||
8895 | // multi-day range. shorter, like "Sep 9 - 10 2014" | ||
8896 | return { year: 'numeric', month: 'short', day: 'numeric' }; | ||
8897 | } | ||
8898 | // one day. longer, like "September 9 2014" | ||
8899 | return { year: 'numeric', month: 'long', day: 'numeric' }; | ||
8900 | } | ||
8901 | |||
8902 | /* | ||
8903 | TODO: test switching timezones when NO timezone plugin | ||
8904 | */ | ||
8905 | class CalendarNowManager { | ||
8906 | constructor() { | ||
8907 | this.resetListeners = new Set(); | ||
8908 | } | ||
8909 | handleInput(dateEnv, // will change if timezone setup changed | ||
8910 | nowInput) { | ||
8911 | const oldDateEnv = this.dateEnv; | ||
8912 | if (dateEnv !== oldDateEnv) { | ||
8913 | if (typeof nowInput === 'function') { | ||
8914 | this.nowFn = nowInput; | ||
8915 | } | ||
8916 | else if (!oldDateEnv) { // first time? | ||
8917 | this.nowAnchorDate = dateEnv.toDate(nowInput | ||
8918 | ? dateEnv.createMarker(nowInput) | ||
8919 | : dateEnv.createNowMarker()); | ||
8920 | this.nowAnchorQueried = Date.now(); | ||
8921 | } | ||
8922 | this.dateEnv = dateEnv; | ||
8923 | // not first time? fire reset handlers | ||
8924 | if (oldDateEnv) { | ||
8925 | for (const resetListener of this.resetListeners.values()) { | ||
8926 | resetListener(); | ||
8927 | } | ||
8928 | } | ||
8929 | } | ||
8930 | } | ||
8931 | getDateMarker() { | ||
8932 | return this.nowAnchorDate | ||
8933 | ? this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf() + | ||
8934 | (Date.now() - this.nowAnchorQueried)) | ||
8935 | : this.dateEnv.createMarker(this.nowFn()); | ||
8936 | } | ||
8937 | addResetListener(handler) { | ||
8938 | this.resetListeners.add(handler); | ||
8939 | } | ||
8940 | removeResetListener(handler) { | ||
8941 | this.resetListeners.delete(handler); | ||
8942 | } | ||
8943 | } | ||
8944 | |||
8945 | // in future refactor, do the redux-style function(state=initial) for initial-state | ||
8946 | // also, whatever is happening in constructor, have it happen in action queue too | ||
8947 | class CalendarDataManager { | ||
8948 | constructor(props) { | ||
8949 | this.computeCurrentViewData = memoize(this._computeCurrentViewData); | ||
8950 | this.organizeRawLocales = memoize(organizeRawLocales); | ||
8951 | this.buildLocale = memoize(buildLocale); | ||
8952 | this.buildPluginHooks = buildBuildPluginHooks(); | ||
8953 | this.buildDateEnv = memoize(buildDateEnv$1); | ||
8954 | this.buildTheme = memoize(buildTheme); | ||
8955 | this.parseToolbars = memoize(parseToolbars); | ||
8956 | this.buildViewSpecs = memoize(buildViewSpecs); | ||
8957 | this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator); | ||
8958 | this.buildViewApi = memoize(buildViewApi); | ||
8959 | this.buildViewUiProps = memoizeObjArg(buildViewUiProps); | ||
8960 | this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual); | ||
8961 | this.buildEventUiBases = memoize(buildEventUiBases); | ||
8962 | this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours); | ||
8963 | this.buildTitle = memoize(buildTitle); | ||
8964 | this.nowManager = new CalendarNowManager(); | ||
8965 | this.emitter = new Emitter(); | ||
8966 | this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this)); | ||
8967 | this.currentCalendarOptionsInput = {}; | ||
8968 | this.currentCalendarOptionsRefined = {}; | ||
8969 | this.currentViewOptionsInput = {}; | ||
8970 | this.currentViewOptionsRefined = {}; | ||
8971 | this.currentCalendarOptionsRefiners = {}; | ||
8972 | this.optionsForRefining = []; | ||
8973 | this.optionsForHandling = []; | ||
8974 | this.getCurrentData = () => this.data; | ||
8975 | this.dispatch = (action) => { | ||
8976 | this.actionRunner.request(action); // protects against recursive calls to _handleAction | ||
8977 | }; | ||
8978 | this.props = props; | ||
8979 | this.actionRunner.pause(); | ||
8980 | this.nowManager = new CalendarNowManager(); | ||
8981 | let dynamicOptionOverrides = {}; | ||
8982 | let optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi); | ||
8983 | let currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView; | ||
8984 | let currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides); | ||
8985 | // wire things up | ||
8986 | // TODO: not DRY | ||
8987 | props.calendarApi.currentDataManager = this; | ||
8988 | this.emitter.setThisContext(props.calendarApi); | ||
8989 | this.emitter.setOptions(currentViewData.options); | ||
8990 | let calendarContext = { | ||
8991 | nowManager: this.nowManager, | ||
8992 | dateEnv: optionsData.dateEnv, | ||
8993 | options: optionsData.calendarOptions, | ||
8994 | pluginHooks: optionsData.pluginHooks, | ||
8995 | calendarApi: props.calendarApi, | ||
8996 | dispatch: this.dispatch, | ||
8997 | emitter: this.emitter, | ||
8998 | getCurrentData: this.getCurrentData, | ||
8999 | }; | ||
9000 | let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv, this.nowManager); | ||
9001 | let dateProfile = currentViewData.dateProfileGenerator.build(currentDate); | ||
9002 | if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) { | ||
9003 | currentDate = dateProfile.currentRange.start; | ||
9004 | } | ||
9005 | // needs to be after setThisContext | ||
9006 | for (let callback of optionsData.pluginHooks.contextInit) { | ||
9007 | callback(calendarContext); | ||
9008 | } | ||
9009 | // NOT DRY | ||
9010 | let eventSources = initEventSources(optionsData.calendarOptions, dateProfile, calendarContext); | ||
9011 | let initialState = { | ||
9012 | dynamicOptionOverrides, | ||
9013 | currentViewType, | ||
9014 | currentDate, | ||
9015 | dateProfile, | ||
9016 | businessHours: this.parseContextBusinessHours(calendarContext), | ||
9017 | eventSources, | ||
9018 | eventUiBases: {}, | ||
9019 | eventStore: createEmptyEventStore(), | ||
9020 | renderableEventStore: createEmptyEventStore(), | ||
9021 | dateSelection: null, | ||
9022 | eventSelection: '', | ||
9023 | eventDrag: null, | ||
9024 | eventResize: null, | ||
9025 | selectionConfig: this.buildViewUiProps(calendarContext).selectionConfig, | ||
9026 | }; | ||
9027 | let contextAndState = Object.assign(Object.assign({}, calendarContext), initialState); | ||
9028 | for (let reducer of optionsData.pluginHooks.reducers) { | ||
9029 | Object.assign(initialState, reducer(null, null, contextAndState)); | ||
9030 | } | ||
9031 | if (computeIsLoading(initialState, calendarContext)) { | ||
9032 | this.emitter.trigger('loading', true); // NOT DRY | ||
9033 | } | ||
9034 | this.state = initialState; | ||
9035 | this.updateData(); | ||
9036 | this.actionRunner.resume(); | ||
9037 | } | ||
9038 | resetOptions(optionOverrides, changedOptionNames) { | ||
9039 | let { props } = this; | ||
9040 | if (changedOptionNames === undefined) { | ||
9041 | props.optionOverrides = optionOverrides; | ||
9042 | } | ||
9043 | else { | ||
9044 | props.optionOverrides = Object.assign(Object.assign({}, (props.optionOverrides || {})), optionOverrides); | ||
9045 | this.optionsForRefining.push(...changedOptionNames); | ||
9046 | } | ||
9047 | if (changedOptionNames === undefined || changedOptionNames.length) { | ||
9048 | this.actionRunner.request({ | ||
9049 | type: 'NOTHING', | ||
9050 | }); | ||
9051 | } | ||
9052 | } | ||
9053 | _handleAction(action) { | ||
9054 | let { props, state, emitter } = this; | ||
9055 | let dynamicOptionOverrides = reduceDynamicOptionOverrides(state.dynamicOptionOverrides, action); | ||
9056 | let optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi); | ||
9057 | let currentViewType = reduceViewType(state.currentViewType, action); | ||
9058 | let currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides); | ||
9059 | // wire things up | ||
9060 | // TODO: not DRY | ||
9061 | props.calendarApi.currentDataManager = this; | ||
9062 | emitter.setThisContext(props.calendarApi); | ||
9063 | emitter.setOptions(currentViewData.options); | ||
9064 | let calendarContext = { | ||
9065 | nowManager: this.nowManager, | ||
9066 | dateEnv: optionsData.dateEnv, | ||
9067 | options: optionsData.calendarOptions, | ||
9068 | pluginHooks: optionsData.pluginHooks, | ||
9069 | calendarApi: props.calendarApi, | ||
9070 | dispatch: this.dispatch, | ||
9071 | emitter, | ||
9072 | getCurrentData: this.getCurrentData, | ||
9073 | }; | ||
9074 | let { currentDate, dateProfile } = state; | ||
9075 | if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { // hack | ||
9076 | dateProfile = currentViewData.dateProfileGenerator.build(currentDate); | ||
9077 | } | ||
9078 | currentDate = reduceCurrentDate(currentDate, action); | ||
9079 | dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator); | ||
9080 | if (action.type === 'PREV' || // TODO: move this logic into DateProfileGenerator | ||
9081 | action.type === 'NEXT' || // " | ||
9082 | !rangeContainsMarker(dateProfile.currentRange, currentDate)) { | ||
9083 | currentDate = dateProfile.currentRange.start; | ||
9084 | } | ||
9085 | let eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext); | ||
9086 | let eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext); | ||
9087 | let isEventsLoading = computeEventSourcesLoading(eventSources); // BAD. also called in this func in computeIsLoading | ||
9088 | let renderableEventStore = (isEventsLoading && !currentViewData.options.progressiveEventRendering) ? | ||
9089 | (state.renderableEventStore || eventStore) : // try from previous state | ||
9090 | eventStore; | ||
9091 | let { eventUiSingleBase, selectionConfig } = this.buildViewUiProps(calendarContext); // will memoize obj | ||
9092 | let eventUiBySource = this.buildEventUiBySource(eventSources); | ||
9093 | let eventUiBases = this.buildEventUiBases(renderableEventStore.defs, eventUiSingleBase, eventUiBySource); | ||
9094 | let newState = { | ||
9095 | dynamicOptionOverrides, | ||
9096 | currentViewType, | ||
9097 | currentDate, | ||
9098 | dateProfile, | ||
9099 | eventSources, | ||
9100 | eventStore, | ||
9101 | renderableEventStore, | ||
9102 | selectionConfig, | ||
9103 | eventUiBases, | ||
9104 | businessHours: this.parseContextBusinessHours(calendarContext), | ||
9105 | dateSelection: reduceDateSelection(state.dateSelection, action), | ||
9106 | eventSelection: reduceSelectedEvent(state.eventSelection, action), | ||
9107 | eventDrag: reduceEventDrag(state.eventDrag, action), | ||
9108 | eventResize: reduceEventResize(state.eventResize, action), | ||
9109 | }; | ||
9110 | let contextAndState = Object.assign(Object.assign({}, calendarContext), newState); | ||
9111 | for (let reducer of optionsData.pluginHooks.reducers) { | ||
9112 | Object.assign(newState, reducer(state, action, contextAndState)); // give the OLD state, for old value | ||
9113 | } | ||
9114 | let wasLoading = computeIsLoading(state, calendarContext); | ||
9115 | let isLoading = computeIsLoading(newState, calendarContext); | ||
9116 | // TODO: use propSetHandlers in plugin system | ||
9117 | if (!wasLoading && isLoading) { | ||
9118 | emitter.trigger('loading', true); | ||
9119 | } | ||
9120 | else if (wasLoading && !isLoading) { | ||
9121 | emitter.trigger('loading', false); | ||
9122 | } | ||
9123 | this.state = newState; | ||
9124 | if (props.onAction) { | ||
9125 | props.onAction(action); | ||
9126 | } | ||
9127 | } | ||
9128 | updateData() { | ||
9129 | let { props, state } = this; | ||
9130 | let oldData = this.data; | ||
9131 | let optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi); | ||
9132 | let currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides); | ||
9133 | let data = this.data = Object.assign(Object.assign(Object.assign({ nowManager: this.nowManager, viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv), calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state); | ||
9134 | let changeHandlers = optionsData.pluginHooks.optionChangeHandlers; | ||
9135 | let oldCalendarOptions = oldData && oldData.calendarOptions; | ||
9136 | let newCalendarOptions = optionsData.calendarOptions; | ||
9137 | if (oldCalendarOptions && oldCalendarOptions !== newCalendarOptions) { | ||
9138 | if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) { | ||
9139 | // hack | ||
9140 | state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data); | ||
9141 | state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv); | ||
9142 | state.renderableEventStore = data.renderableEventStore = rezoneEventStoreDates(data.renderableEventStore, oldData.dateEnv, data.dateEnv); | ||
9143 | } | ||
9144 | for (let optionName in changeHandlers) { | ||
9145 | if (this.optionsForHandling.indexOf(optionName) !== -1 || | ||
9146 | oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) { | ||
9147 | changeHandlers[optionName](newCalendarOptions[optionName], data); | ||
9148 | } | ||
9149 | } | ||
9150 | } | ||
9151 | this.optionsForHandling = []; | ||
9152 | if (props.onData) { | ||
9153 | props.onData(data); | ||
9154 | } | ||
9155 | } | ||
9156 | computeOptionsData(optionOverrides, dynamicOptionOverrides, calendarApi) { | ||
9157 | // TODO: blacklist options that are handled by optionChangeHandlers | ||
9158 | if (!this.optionsForRefining.length && | ||
9159 | optionOverrides === this.stableOptionOverrides && | ||
9160 | dynamicOptionOverrides === this.stableDynamicOptionOverrides) { | ||
9161 | return this.stableCalendarOptionsData; | ||
9162 | } | ||
9163 | let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData, extra, } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides); | ||
9164 | warnUnknownOptions(extra); | ||
9165 | let dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator); | ||
9166 | let viewSpecs = this.buildViewSpecs(pluginHooks.views, this.stableOptionOverrides, this.stableDynamicOptionOverrides, localeDefaults); | ||
9167 | let theme = this.buildTheme(refinedOptions, pluginHooks); | ||
9168 | let toolbarConfig = this.parseToolbars(refinedOptions, this.stableOptionOverrides, theme, viewSpecs, calendarApi); | ||
9169 | return this.stableCalendarOptionsData = { | ||
9170 | calendarOptions: refinedOptions, | ||
9171 | pluginHooks, | ||
9172 | dateEnv, | ||
9173 | viewSpecs, | ||
9174 | theme, | ||
9175 | toolbarConfig, | ||
9176 | localeDefaults, | ||
9177 | availableRawLocales: availableLocaleData.map, | ||
9178 | }; | ||
9179 | } | ||
9180 | // always called from behind a memoizer | ||
9181 | processRawCalendarOptions(optionOverrides, dynamicOptionOverrides) { | ||
9182 | let { locales, locale } = mergeRawOptions([ | ||
9183 | BASE_OPTION_DEFAULTS, | ||
9184 | optionOverrides, | ||
9185 | dynamicOptionOverrides, | ||
9186 | ]); | ||
9187 | let availableLocaleData = this.organizeRawLocales(locales); | ||
9188 | let availableRawLocales = availableLocaleData.map; | ||
9189 | let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options; | ||
9190 | let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins); | ||
9191 | let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners); | ||
9192 | let extra = {}; | ||
9193 | let raw = mergeRawOptions([ | ||
9194 | BASE_OPTION_DEFAULTS, | ||
9195 | localeDefaults, | ||
9196 | optionOverrides, | ||
9197 | dynamicOptionOverrides, | ||
9198 | ]); | ||
9199 | let refined = {}; | ||
9200 | let currentRaw = this.currentCalendarOptionsInput; | ||
9201 | let currentRefined = this.currentCalendarOptionsRefined; | ||
9202 | let anyChanges = false; | ||
9203 | for (let optionName in raw) { | ||
9204 | if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] && | ||
9205 | (optionName in currentRaw) && | ||
9206 | COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])))) { | ||
9207 | refined[optionName] = currentRefined[optionName]; | ||
9208 | } | ||
9209 | else if (refiners[optionName]) { | ||
9210 | refined[optionName] = refiners[optionName](raw[optionName]); | ||
9211 | anyChanges = true; | ||
9212 | } | ||
9213 | else { | ||
9214 | extra[optionName] = currentRaw[optionName]; | ||
9215 | } | ||
9216 | } | ||
9217 | if (anyChanges) { | ||
9218 | this.currentCalendarOptionsInput = raw; | ||
9219 | this.currentCalendarOptionsRefined = refined; | ||
9220 | this.stableOptionOverrides = optionOverrides; | ||
9221 | this.stableDynamicOptionOverrides = dynamicOptionOverrides; | ||
9222 | } | ||
9223 | this.optionsForHandling.push(...this.optionsForRefining); | ||
9224 | this.optionsForRefining = []; | ||
9225 | return { | ||
9226 | rawOptions: this.currentCalendarOptionsInput, | ||
9227 | refinedOptions: this.currentCalendarOptionsRefined, | ||
9228 | pluginHooks, | ||
9229 | availableLocaleData, | ||
9230 | localeDefaults, | ||
9231 | extra, | ||
9232 | }; | ||
9233 | } | ||
9234 | _computeCurrentViewData(viewType, optionsData, optionOverrides, dynamicOptionOverrides) { | ||
9235 | let viewSpec = optionsData.viewSpecs[viewType]; | ||
9236 | if (!viewSpec) { | ||
9237 | throw new Error(`viewType "${viewType}" is not available. Please make sure you've loaded all neccessary plugins`); | ||
9238 | } | ||
9239 | let { refinedOptions, extra } = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides); | ||
9240 | warnUnknownOptions(extra); | ||
9241 | this.nowManager.handleInput(optionsData.dateEnv, refinedOptions.now); | ||
9242 | let dateProfileGenerator = this.buildDateProfileGenerator({ | ||
9243 | dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass, | ||
9244 | nowManager: this.nowManager, | ||
9245 | duration: viewSpec.duration, | ||
9246 | durationUnit: viewSpec.durationUnit, | ||
9247 | usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime, | ||
9248 | dateEnv: optionsData.dateEnv, | ||
9249 | calendarApi: this.props.calendarApi, | ||
9250 | slotMinTime: refinedOptions.slotMinTime, | ||
9251 | slotMaxTime: refinedOptions.slotMaxTime, | ||
9252 | showNonCurrentDates: refinedOptions.showNonCurrentDates, | ||
9253 | dayCount: refinedOptions.dayCount, | ||
9254 | dateAlignment: refinedOptions.dateAlignment, | ||
9255 | dateIncrement: refinedOptions.dateIncrement, | ||
9256 | hiddenDays: refinedOptions.hiddenDays, | ||
9257 | weekends: refinedOptions.weekends, | ||
9258 | validRangeInput: refinedOptions.validRange, | ||
9259 | visibleRangeInput: refinedOptions.visibleRange, | ||
9260 | fixedWeekCount: refinedOptions.fixedWeekCount, | ||
9261 | }); | ||
9262 | let viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv); | ||
9263 | return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi }; | ||
9264 | } | ||
9265 | processRawViewOptions(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) { | ||
9266 | let raw = mergeRawOptions([ | ||
9267 | BASE_OPTION_DEFAULTS, | ||
9268 | viewSpec.optionDefaults, | ||
9269 | localeDefaults, | ||
9270 | optionOverrides, | ||
9271 | viewSpec.optionOverrides, | ||
9272 | dynamicOptionOverrides, | ||
9273 | ]); | ||
9274 | let refiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), VIEW_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners); | ||
9275 | let refined = {}; | ||
9276 | let currentRaw = this.currentViewOptionsInput; | ||
9277 | let currentRefined = this.currentViewOptionsRefined; | ||
9278 | let anyChanges = false; | ||
9279 | let extra = {}; | ||
9280 | for (let optionName in raw) { | ||
9281 | if (raw[optionName] === currentRaw[optionName] || | ||
9282 | (COMPLEX_OPTION_COMPARATORS[optionName] && | ||
9283 | COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName]))) { | ||
9284 | refined[optionName] = currentRefined[optionName]; | ||
9285 | } | ||
9286 | else { | ||
9287 | if (raw[optionName] === this.currentCalendarOptionsInput[optionName] || | ||
9288 | (COMPLEX_OPTION_COMPARATORS[optionName] && | ||
9289 | COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], this.currentCalendarOptionsInput[optionName]))) { | ||
9290 | if (optionName in this.currentCalendarOptionsRefined) { // might be an "extra" prop | ||
9291 | refined[optionName] = this.currentCalendarOptionsRefined[optionName]; | ||
9292 | } | ||
9293 | } | ||
9294 | else if (refiners[optionName]) { | ||
9295 | refined[optionName] = refiners[optionName](raw[optionName]); | ||
9296 | } | ||
9297 | else { | ||
9298 | extra[optionName] = raw[optionName]; | ||
9299 | } | ||
9300 | anyChanges = true; | ||
9301 | } | ||
9302 | } | ||
9303 | if (anyChanges) { | ||
9304 | this.currentViewOptionsInput = raw; | ||
9305 | this.currentViewOptionsRefined = refined; | ||
9306 | } | ||
9307 | return { | ||
9308 | rawOptions: this.currentViewOptionsInput, | ||
9309 | refinedOptions: this.currentViewOptionsRefined, | ||
9310 | extra, | ||
9311 | }; | ||
9312 | } | ||
9313 | } | ||
9314 | function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) { | ||
9315 | let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map); | ||
9316 | return new DateEnv({ | ||
9317 | calendarSystem: 'gregory', | ||
9318 | timeZone, | ||
9319 | namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl, | ||
9320 | locale, | ||
9321 | weekNumberCalculation, | ||
9322 | firstDay, | ||
9323 | weekText, | ||
9324 | cmdFormatter: pluginHooks.cmdFormatter, | ||
9325 | defaultSeparator, | ||
9326 | }); | ||
9327 | } | ||
9328 | function buildTheme(options, pluginHooks) { | ||
9329 | let ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme; | ||
9330 | return new ThemeClass(options); | ||
9331 | } | ||
9332 | function buildDateProfileGenerator(props) { | ||
9333 | let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator; | ||
9334 | return new DateProfileGeneratorClass(props); | ||
9335 | } | ||
9336 | function buildViewApi(type, getCurrentData, dateEnv) { | ||
9337 | return new ViewImpl(type, getCurrentData, dateEnv); | ||
9338 | } | ||
9339 | function buildEventUiBySource(eventSources) { | ||
9340 | return mapHash(eventSources, (eventSource) => eventSource.ui); | ||
9341 | } | ||
9342 | function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) { | ||
9343 | let eventUiBases = { '': eventUiSingleBase }; | ||
9344 | for (let defId in eventDefs) { | ||
9345 | let def = eventDefs[defId]; | ||
9346 | if (def.sourceId && eventUiBySource[def.sourceId]) { | ||
9347 | eventUiBases[defId] = eventUiBySource[def.sourceId]; | ||
9348 | } | ||
9349 | } | ||
9350 | return eventUiBases; | ||
9351 | } | ||
9352 | function buildViewUiProps(calendarContext) { | ||
9353 | let { options } = calendarContext; | ||
9354 | return { | ||
9355 | eventUiSingleBase: createEventUi({ | ||
9356 | display: options.eventDisplay, | ||
9357 | editable: options.editable, | ||
9358 | startEditable: options.eventStartEditable, | ||
9359 | durationEditable: options.eventDurationEditable, | ||
9360 | constraint: options.eventConstraint, | ||
9361 | overlap: typeof options.eventOverlap === 'boolean' ? options.eventOverlap : undefined, | ||
9362 | allow: options.eventAllow, | ||
9363 | backgroundColor: options.eventBackgroundColor, | ||
9364 | borderColor: options.eventBorderColor, | ||
9365 | textColor: options.eventTextColor, | ||
9366 | color: options.eventColor, | ||
9367 | // classNames: options.eventClassNames // render hook will handle this | ||
9368 | }, calendarContext), | ||
9369 | selectionConfig: createEventUi({ | ||
9370 | constraint: options.selectConstraint, | ||
9371 | overlap: typeof options.selectOverlap === 'boolean' ? options.selectOverlap : undefined, | ||
9372 | allow: options.selectAllow, | ||
9373 | }, calendarContext), | ||
9374 | }; | ||
9375 | } | ||
9376 | function computeIsLoading(state, context) { | ||
9377 | for (let isLoadingFunc of context.pluginHooks.isLoadingFuncs) { | ||
9378 | if (isLoadingFunc(state)) { | ||
9379 | return true; | ||
9380 | } | ||
9381 | } | ||
9382 | return false; | ||
9383 | } | ||
9384 | function parseContextBusinessHours(calendarContext) { | ||
9385 | return parseBusinessHours(calendarContext.options.businessHours, calendarContext); | ||
9386 | } | ||
9387 | function warnUnknownOptions(options, viewName) { | ||
9388 | for (let optionName in options) { | ||
9389 | console.warn(`Unknown option '${optionName}'` + | ||
9390 | (viewName ? ` for view '${viewName}'` : '')); | ||
9391 | } | ||
9392 | } | ||
9393 | |||
9394 | class ToolbarSection extends BaseComponent { | ||
9395 | render() { | ||
9396 | let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup)); | ||
9397 | return y('div', { className: 'fc-toolbar-chunk' }, ...children); | ||
9398 | } | ||
9399 | renderWidgetGroup(widgetGroup) { | ||
9400 | let { props } = this; | ||
9401 | let { theme } = this.context; | ||
9402 | let children = []; | ||
9403 | let isOnlyButtons = true; | ||
9404 | for (let widget of widgetGroup) { | ||
9405 | let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget; | ||
9406 | if (buttonName === 'title') { | ||
9407 | isOnlyButtons = false; | ||
9408 | children.push(y("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title)); | ||
9409 | } | ||
9410 | else { | ||
9411 | let isPressed = buttonName === props.activeButton; | ||
9412 | let isDisabled = (!props.isTodayEnabled && buttonName === 'today') || | ||
9413 | (!props.isPrevEnabled && buttonName === 'prev') || | ||
9414 | (!props.isNextEnabled && buttonName === 'next'); | ||
9415 | let buttonClasses = [`fc-${buttonName}-button`, theme.getClass('button')]; | ||
9416 | if (isPressed) { | ||
9417 | buttonClasses.push(theme.getClass('buttonActive')); | ||
9418 | } | ||
9419 | children.push(y("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? y("span", { className: buttonIcon, role: "img" }) : ''))); | ||
9420 | } | ||
9421 | } | ||
9422 | if (children.length > 1) { | ||
9423 | let groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || ''; | ||
9424 | return y('div', { className: groupClassName }, ...children); | ||
9425 | } | ||
9426 | return children[0]; | ||
9427 | } | ||
9428 | } | ||
9429 | |||
9430 | class Toolbar extends BaseComponent { | ||
9431 | render() { | ||
9432 | let { model, extraClassName } = this.props; | ||
9433 | let forceLtr = false; | ||
9434 | let startContent; | ||
9435 | let endContent; | ||
9436 | let sectionWidgets = model.sectionWidgets; | ||
9437 | let centerContent = sectionWidgets.center; | ||
9438 | if (sectionWidgets.left) { | ||
9439 | forceLtr = true; | ||
9440 | startContent = sectionWidgets.left; | ||
9441 | } | ||
9442 | else { | ||
9443 | startContent = sectionWidgets.start; | ||
9444 | } | ||
9445 | if (sectionWidgets.right) { | ||
9446 | forceLtr = true; | ||
9447 | endContent = sectionWidgets.right; | ||
9448 | } | ||
9449 | else { | ||
9450 | endContent = sectionWidgets.end; | ||
9451 | } | ||
9452 | let classNames = [ | ||
9453 | extraClassName || '', | ||
9454 | 'fc-toolbar', | ||
9455 | forceLtr ? 'fc-toolbar-ltr' : '', | ||
9456 | ]; | ||
9457 | return (y("div", { className: classNames.join(' ') }, | ||
9458 | this.renderSection('start', startContent || []), | ||
9459 | this.renderSection('center', centerContent || []), | ||
9460 | this.renderSection('end', endContent || []))); | ||
9461 | } | ||
9462 | renderSection(key, widgetGroups) { | ||
9463 | let { props } = this; | ||
9464 | return (y(ToolbarSection, { key: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled, titleId: props.titleId })); | ||
9465 | } | ||
9466 | } | ||
9467 | |||
9468 | class ViewHarness extends BaseComponent { | ||
9469 | constructor() { | ||
9470 | super(...arguments); | ||
9471 | this.state = { | ||
9472 | availableWidth: null, | ||
9473 | }; | ||
9474 | this.handleEl = (el) => { | ||
9475 | this.el = el; | ||
9476 | setRef(this.props.elRef, el); | ||
9477 | this.updateAvailableWidth(); | ||
9478 | }; | ||
9479 | this.handleResize = () => { | ||
9480 | this.updateAvailableWidth(); | ||
9481 | }; | ||
9482 | } | ||
9483 | render() { | ||
9484 | let { props, state } = this; | ||
9485 | let { aspectRatio } = props; | ||
9486 | let classNames = [ | ||
9487 | 'fc-view-harness', | ||
9488 | (aspectRatio || props.liquid || props.height) | ||
9489 | ? 'fc-view-harness-active' // harness controls the height | ||
9490 | : 'fc-view-harness-passive', // let the view do the height | ||
9491 | ]; | ||
9492 | let height = ''; | ||
9493 | let paddingBottom = ''; | ||
9494 | if (aspectRatio) { | ||
9495 | if (state.availableWidth !== null) { | ||
9496 | height = state.availableWidth / aspectRatio; | ||
9497 | } | ||
9498 | else { | ||
9499 | // while waiting to know availableWidth, we can't set height to *zero* | ||
9500 | // because will cause lots of unnecessary scrollbars within scrollgrid. | ||
9501 | // BETTER: don't start rendering ANYTHING yet until we know container width | ||
9502 | // NOTE: why not always use paddingBottom? Causes height oscillation (issue 5606) | ||
9503 | paddingBottom = `${(1 / aspectRatio) * 100}%`; | ||
9504 | } | ||
9505 | } | ||
9506 | else { | ||
9507 | height = props.height || ''; | ||
9508 | } | ||
9509 | return (y("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height, paddingBottom } }, props.children)); | ||
9510 | } | ||
9511 | componentDidMount() { | ||
9512 | this.context.addResizeHandler(this.handleResize); | ||
9513 | } | ||
9514 | componentWillUnmount() { | ||
9515 | this.context.removeResizeHandler(this.handleResize); | ||
9516 | } | ||
9517 | updateAvailableWidth() { | ||
9518 | if (this.el && // needed. but why? | ||
9519 | this.props.aspectRatio // aspectRatio is the only height setting that needs availableWidth | ||
9520 | ) { | ||
9521 | this.setState({ availableWidth: this.el.offsetWidth }); | ||
9522 | } | ||
9523 | } | ||
9524 | } | ||
9525 | |||
9526 | /* | ||
9527 | Detects when the user clicks on an event within a DateComponent | ||
9528 | */ | ||
9529 | class EventClicking extends Interaction { | ||
9530 | constructor(settings) { | ||
9531 | super(settings); | ||
9532 | this.handleSegClick = (ev, segEl) => { | ||
9533 | let { component } = this; | ||
9534 | let { context } = component; | ||
9535 | let seg = getElSeg(segEl); | ||
9536 | if (seg && // might be the <div> surrounding the more link | ||
9537 | component.isValidSegDownEl(ev.target)) { | ||
9538 | // our way to simulate a link click for elements that can't be <a> tags | ||
9539 | // grab before trigger fired in case trigger trashes DOM thru rerendering | ||
9540 | let hasUrlContainer = elementClosest(ev.target, '.fc-event-forced-url'); | ||
9541 | let url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : ''; | ||
9542 | context.emitter.trigger('eventClick', { | ||
9543 | el: segEl, | ||
9544 | event: new EventImpl(component.context, seg.eventRange.def, seg.eventRange.instance), | ||
9545 | jsEvent: ev, | ||
9546 | view: context.viewApi, | ||
9547 | }); | ||
9548 | if (url && !ev.defaultPrevented) { | ||
9549 | window.location.href = url; | ||
9550 | } | ||
9551 | } | ||
9552 | }; | ||
9553 | this.destroy = listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events | ||
9554 | this.handleSegClick); | ||
9555 | } | ||
9556 | } | ||
9557 | |||
9558 | /* | ||
9559 | Triggers events and adds/removes core classNames when the user's pointer | ||
9560 | enters/leaves event-elements of a component. | ||
9561 | */ | ||
9562 | class EventHovering extends Interaction { | ||
9563 | constructor(settings) { | ||
9564 | super(settings); | ||
9565 | // for simulating an eventMouseLeave when the event el is destroyed while mouse is over it | ||
9566 | this.handleEventElRemove = (el) => { | ||
9567 | if (el === this.currentSegEl) { | ||
9568 | this.handleSegLeave(null, this.currentSegEl); | ||
9569 | } | ||
9570 | }; | ||
9571 | this.handleSegEnter = (ev, segEl) => { | ||
9572 | if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper | ||
9573 | this.currentSegEl = segEl; | ||
9574 | this.triggerEvent('eventMouseEnter', ev, segEl); | ||
9575 | } | ||
9576 | }; | ||
9577 | this.handleSegLeave = (ev, segEl) => { | ||
9578 | if (this.currentSegEl) { | ||
9579 | this.currentSegEl = null; | ||
9580 | this.triggerEvent('eventMouseLeave', ev, segEl); | ||
9581 | } | ||
9582 | }; | ||
9583 | this.removeHoverListeners = listenToHoverBySelector(settings.el, '.fc-event', // on both fg and bg events | ||
9584 | this.handleSegEnter, this.handleSegLeave); | ||
9585 | } | ||
9586 | destroy() { | ||
9587 | this.removeHoverListeners(); | ||
9588 | } | ||
9589 | triggerEvent(publicEvName, ev, segEl) { | ||
9590 | let { component } = this; | ||
9591 | let { context } = component; | ||
9592 | let seg = getElSeg(segEl); | ||
9593 | if (!ev || component.isValidSegDownEl(ev.target)) { | ||
9594 | context.emitter.trigger(publicEvName, { | ||
9595 | el: segEl, | ||
9596 | event: new EventImpl(context, seg.eventRange.def, seg.eventRange.instance), | ||
9597 | jsEvent: ev, | ||
9598 | view: context.viewApi, | ||
9599 | }); | ||
9600 | } | ||
9601 | } | ||
9602 | } | ||
9603 | |||
9604 | class CalendarContent extends PureComponent { | ||
9605 | constructor() { | ||
9606 | super(...arguments); | ||
9607 | this.buildViewContext = memoize(buildViewContext); | ||
9608 | this.buildViewPropTransformers = memoize(buildViewPropTransformers); | ||
9609 | this.buildToolbarProps = memoize(buildToolbarProps); | ||
9610 | this.headerRef = d(); | ||
9611 | this.footerRef = d(); | ||
9612 | this.interactionsStore = {}; | ||
9613 | // eslint-disable-next-line | ||
9614 | this.state = { | ||
9615 | viewLabelId: getUniqueDomId(), | ||
9616 | }; | ||
9617 | // Component Registration | ||
9618 | // ----------------------------------------------------------------------------------------------------------------- | ||
9619 | this.registerInteractiveComponent = (component, settingsInput) => { | ||
9620 | let settings = parseInteractionSettings(component, settingsInput); | ||
9621 | let DEFAULT_INTERACTIONS = [ | ||
9622 | EventClicking, | ||
9623 | EventHovering, | ||
9624 | ]; | ||
9625 | let interactionClasses = DEFAULT_INTERACTIONS.concat(this.props.pluginHooks.componentInteractions); | ||
9626 | let interactions = interactionClasses.map((TheInteractionClass) => new TheInteractionClass(settings)); | ||
9627 | this.interactionsStore[component.uid] = interactions; | ||
9628 | interactionSettingsStore[component.uid] = settings; | ||
9629 | }; | ||
9630 | this.unregisterInteractiveComponent = (component) => { | ||
9631 | let listeners = this.interactionsStore[component.uid]; | ||
9632 | if (listeners) { | ||
9633 | for (let listener of listeners) { | ||
9634 | listener.destroy(); | ||
9635 | } | ||
9636 | delete this.interactionsStore[component.uid]; | ||
9637 | } | ||
9638 | delete interactionSettingsStore[component.uid]; | ||
9639 | }; | ||
9640 | // Resizing | ||
9641 | // ----------------------------------------------------------------------------------------------------------------- | ||
9642 | this.resizeRunner = new DelayedRunner(() => { | ||
9643 | this.props.emitter.trigger('_resize', true); // should window resizes be considered "forced" ? | ||
9644 | this.props.emitter.trigger('windowResize', { view: this.props.viewApi }); | ||
9645 | }); | ||
9646 | this.handleWindowResize = (ev) => { | ||
9647 | let { options } = this.props; | ||
9648 | if (options.handleWindowResize && | ||
9649 | ev.target === window // avoid jqui events | ||
9650 | ) { | ||
9651 | this.resizeRunner.request(options.windowResizeDelay); | ||
9652 | } | ||
9653 | }; | ||
9654 | } | ||
9655 | /* | ||
9656 | renders INSIDE of an outer div | ||
9657 | */ | ||
9658 | render() { | ||
9659 | let { props } = this; | ||
9660 | let { toolbarConfig, options } = props; | ||
9661 | let viewVGrow = false; | ||
9662 | let viewHeight = ''; | ||
9663 | let viewAspectRatio; | ||
9664 | if (props.isHeightAuto || props.forPrint) { | ||
9665 | viewHeight = ''; | ||
9666 | } | ||
9667 | else if (options.height != null) { | ||
9668 | viewVGrow = true; | ||
9669 | } | ||
9670 | else if (options.contentHeight != null) { | ||
9671 | viewHeight = options.contentHeight; | ||
9672 | } | ||
9673 | else { | ||
9674 | viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall | ||
9675 | } | ||
9676 | let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.nowManager, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent); | ||
9677 | let viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle) | ||
9678 | ? this.state.viewLabelId | ||
9679 | : undefined; | ||
9680 | return (y(ViewContextType.Provider, { value: viewContext }, | ||
9681 | y(NowTimer, { unit: "day" }, (nowDate) => { | ||
9682 | let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, nowDate, props.viewTitle); | ||
9683 | return (y(_, null, | ||
9684 | toolbarConfig.header && (y(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))), | ||
9685 | y(ViewHarness, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId }, | ||
9686 | this.renderView(props), | ||
9687 | this.buildAppendContent()), | ||
9688 | toolbarConfig.footer && (y(Toolbar, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps))))); | ||
9689 | }))); | ||
9690 | } | ||
9691 | componentDidMount() { | ||
9692 | let { props } = this; | ||
9693 | this.calendarInteractions = props.pluginHooks.calendarInteractions | ||
9694 | .map((CalendarInteractionClass) => new CalendarInteractionClass(props)); | ||
9695 | window.addEventListener('resize', this.handleWindowResize); | ||
9696 | let { propSetHandlers } = props.pluginHooks; | ||
9697 | for (let propName in propSetHandlers) { | ||
9698 | propSetHandlers[propName](props[propName], props); | ||
9699 | } | ||
9700 | } | ||
9701 | componentDidUpdate(prevProps) { | ||
9702 | let { props } = this; | ||
9703 | let { propSetHandlers } = props.pluginHooks; | ||
9704 | for (let propName in propSetHandlers) { | ||
9705 | if (props[propName] !== prevProps[propName]) { | ||
9706 | propSetHandlers[propName](props[propName], props); | ||
9707 | } | ||
9708 | } | ||
9709 | } | ||
9710 | componentWillUnmount() { | ||
9711 | window.removeEventListener('resize', this.handleWindowResize); | ||
9712 | this.resizeRunner.clear(); | ||
9713 | for (let interaction of this.calendarInteractions) { | ||
9714 | interaction.destroy(); | ||
9715 | } | ||
9716 | this.props.emitter.trigger('_unmount'); | ||
9717 | } | ||
9718 | buildAppendContent() { | ||
9719 | let { props } = this; | ||
9720 | let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props)); | ||
9721 | return y(_, {}, ...children); | ||
9722 | } | ||
9723 | renderView(props) { | ||
9724 | let { pluginHooks } = props; | ||
9725 | let { viewSpec } = props; | ||
9726 | let viewProps = { | ||
9727 | dateProfile: props.dateProfile, | ||
9728 | businessHours: props.businessHours, | ||
9729 | eventStore: props.renderableEventStore, | ||
9730 | eventUiBases: props.eventUiBases, | ||
9731 | dateSelection: props.dateSelection, | ||
9732 | eventSelection: props.eventSelection, | ||
9733 | eventDrag: props.eventDrag, | ||
9734 | eventResize: props.eventResize, | ||
9735 | isHeightAuto: props.isHeightAuto, | ||
9736 | forPrint: props.forPrint, | ||
9737 | }; | ||
9738 | let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers); | ||
9739 | for (let transformer of transformers) { | ||
9740 | Object.assign(viewProps, transformer.transform(viewProps, props)); | ||
9741 | } | ||
9742 | let ViewComponent = viewSpec.component; | ||
9743 | return (y(ViewComponent, Object.assign({}, viewProps))); | ||
9744 | } | ||
9745 | } | ||
9746 | function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) { | ||
9747 | // don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid | ||
9748 | let todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason | ||
9749 | let prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false); | ||
9750 | let nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false); | ||
9751 | return { | ||
9752 | title, | ||
9753 | activeButton: viewSpec.type, | ||
9754 | navUnit: viewSpec.singleUnit, | ||
9755 | isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now), | ||
9756 | isPrevEnabled: prevInfo.isValid, | ||
9757 | isNextEnabled: nextInfo.isValid, | ||
9758 | }; | ||
9759 | } | ||
9760 | // Plugin | ||
9761 | // ----------------------------------------------------------------------------------------------------------------- | ||
9762 | function buildViewPropTransformers(theClasses) { | ||
9763 | return theClasses.map((TheClass) => new TheClass()); | ||
9764 | } | ||
9765 | |||
9766 | class Calendar extends CalendarImpl { | ||
9767 | constructor(el, optionOverrides = {}) { | ||
9768 | super(); | ||
9769 | this.isRendering = false; | ||
9770 | this.isRendered = false; | ||
9771 | this.currentClassNames = []; | ||
9772 | this.customContentRenderId = 0; | ||
9773 | this.handleAction = (action) => { | ||
9774 | // actions we know we want to render immediately | ||
9775 | switch (action.type) { | ||
9776 | case 'SET_EVENT_DRAG': | ||
9777 | case 'SET_EVENT_RESIZE': | ||
9778 | this.renderRunner.tryDrain(); | ||
9779 | } | ||
9780 | }; | ||
9781 | this.handleData = (data) => { | ||
9782 | this.currentData = data; | ||
9783 | this.renderRunner.request(data.calendarOptions.rerenderDelay); | ||
9784 | }; | ||
9785 | this.handleRenderRequest = () => { | ||
9786 | if (this.isRendering) { | ||
9787 | this.isRendered = true; | ||
9788 | let { currentData } = this; | ||
9789 | flushSync(() => { | ||
9790 | D$1(y(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, isHeightAuto, forPrint) => { | ||
9791 | this.setClassNames(classNames); | ||
9792 | this.setHeight(height); | ||
9793 | return (y(RenderId.Provider, { value: this.customContentRenderId }, | ||
9794 | y(CalendarContent, Object.assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData)))); | ||
9795 | }), this.el); | ||
9796 | }); | ||
9797 | } | ||
9798 | else if (this.isRendered) { | ||
9799 | this.isRendered = false; | ||
9800 | D$1(null, this.el); | ||
9801 | this.setClassNames([]); | ||
9802 | this.setHeight(''); | ||
9803 | } | ||
9804 | }; | ||
9805 | ensureElHasStyles(el); | ||
9806 | this.el = el; | ||
9807 | this.renderRunner = new DelayedRunner(this.handleRenderRequest); | ||
9808 | new CalendarDataManager({ | ||
9809 | optionOverrides, | ||
9810 | calendarApi: this, | ||
9811 | onAction: this.handleAction, | ||
9812 | onData: this.handleData, | ||
9813 | }); | ||
9814 | } | ||
9815 | render() { | ||
9816 | let wasRendering = this.isRendering; | ||
9817 | if (!wasRendering) { | ||
9818 | this.isRendering = true; | ||
9819 | } | ||
9820 | else { | ||
9821 | this.customContentRenderId += 1; | ||
9822 | } | ||
9823 | this.renderRunner.request(); | ||
9824 | if (wasRendering) { | ||
9825 | this.updateSize(); | ||
9826 | } | ||
9827 | } | ||
9828 | destroy() { | ||
9829 | if (this.isRendering) { | ||
9830 | this.isRendering = false; | ||
9831 | this.renderRunner.request(); | ||
9832 | } | ||
9833 | } | ||
9834 | updateSize() { | ||
9835 | flushSync(() => { | ||
9836 | super.updateSize(); | ||
9837 | }); | ||
9838 | } | ||
9839 | batchRendering(func) { | ||
9840 | this.renderRunner.pause('batchRendering'); | ||
9841 | func(); | ||
9842 | this.renderRunner.resume('batchRendering'); | ||
9843 | } | ||
9844 | pauseRendering() { | ||
9845 | this.renderRunner.pause('pauseRendering'); | ||
9846 | } | ||
9847 | resumeRendering() { | ||
9848 | this.renderRunner.resume('pauseRendering', true); | ||
9849 | } | ||
9850 | resetOptions(optionOverrides, changedOptionNames) { | ||
9851 | this.currentDataManager.resetOptions(optionOverrides, changedOptionNames); | ||
9852 | } | ||
9853 | setClassNames(classNames) { | ||
9854 | if (!isArraysEqual(classNames, this.currentClassNames)) { | ||
9855 | let { classList } = this.el; | ||
9856 | for (let className of this.currentClassNames) { | ||
9857 | classList.remove(className); | ||
9858 | } | ||
9859 | for (let className of classNames) { | ||
9860 | classList.add(className); | ||
9861 | } | ||
9862 | this.currentClassNames = classNames; | ||
9863 | } | ||
9864 | } | ||
9865 | setHeight(height) { | ||
9866 | applyStyleProp(this.el, 'height', height); | ||
9867 | } | ||
9868 | } | ||
9869 | |||
9870 | function formatDate(dateInput, options = {}) { | ||
9871 | let dateEnv = buildDateEnv(options); | ||
9872 | let formatter = createFormatter(options); | ||
9873 | let dateMeta = dateEnv.createMarkerMeta(dateInput); | ||
9874 | if (!dateMeta) { // TODO: warning? | ||
9875 | return ''; | ||
9876 | } | ||
9877 | return dateEnv.format(dateMeta.marker, formatter, { | ||
9878 | forcedTzo: dateMeta.forcedTzo, | ||
9879 | }); | ||
9880 | } | ||
9881 | function formatRange(startInput, endInput, options) { | ||
9882 | let dateEnv = buildDateEnv(typeof options === 'object' && options ? options : {}); // pass in if non-null object | ||
9883 | let formatter = createFormatter(options); | ||
9884 | let startMeta = dateEnv.createMarkerMeta(startInput); | ||
9885 | let endMeta = dateEnv.createMarkerMeta(endInput); | ||
9886 | if (!startMeta || !endMeta) { // TODO: warning? | ||
9887 | return ''; | ||
9888 | } | ||
9889 | return dateEnv.formatRange(startMeta.marker, endMeta.marker, formatter, { | ||
9890 | forcedStartTzo: startMeta.forcedTzo, | ||
9891 | forcedEndTzo: endMeta.forcedTzo, | ||
9892 | isEndExclusive: options.isEndExclusive, | ||
9893 | defaultSeparator: BASE_OPTION_DEFAULTS.defaultRangeSeparator, | ||
9894 | }); | ||
9895 | } | ||
9896 | // TODO: more DRY and optimized | ||
9897 | function buildDateEnv(settings) { | ||
9898 | let locale = buildLocale(settings.locale || 'en', organizeRawLocales([]).map); // TODO: don't hardcode 'en' everywhere | ||
9899 | return new DateEnv(Object.assign(Object.assign({ timeZone: BASE_OPTION_DEFAULTS.timeZone, calendarSystem: 'gregory' }, settings), { locale })); | ||
9900 | } | ||
9901 | |||
9902 | // HELPERS | ||
9903 | /* | ||
9904 | if nextDayThreshold is specified, slicing is done in an all-day fashion. | ||
9905 | you can get nextDayThreshold from context.nextDayThreshold | ||
9906 | */ | ||
9907 | function sliceEvents(props, allDay) { | ||
9908 | return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg; | ||
9909 | } | ||
9910 | |||
9911 | const version = '6.1.17'; | ||
9912 | |||
9913 | exports.Calendar = Calendar; | ||
9914 | exports.Internal = internal; | ||
9915 | exports.JsonRequestError = JsonRequestError; | ||
9916 | exports.Preact = preact; | ||
9917 | exports.createPlugin = createPlugin; | ||
9918 | exports.formatDate = formatDate; | ||
9919 | exports.formatRange = formatRange; | ||
9920 | exports.globalLocales = globalLocales; | ||
9921 | exports.globalPlugins = globalPlugins; | ||
9922 | exports.sliceEvents = sliceEvents; | ||
9923 | exports.version = version; | ||
9924 | |||
9925 | Object.defineProperty(exports, '__esModule', { value: true }); | ||
9926 | |||
9927 | return exports; | ||
9928 | |||
9929 | })({}); | ||
diff --git a/public/js/fullcalendar/packages/core/index.global.min.js b/public/js/fullcalendar/packages/core/index.global.min.js new file mode 100644 index 0000000..a875d7a --- /dev/null +++ b/public/js/fullcalendar/packages/core/index.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | var FullCalendar=function(e){"use strict";const t=[],n=new Map;function r(e){t.push(e),n.forEach(t=>{o(t,e)})}function i(e){let r=n.get(e);if(!r||!r.isConnected){if(r=e.querySelector("style[data-fullcalendar]"),!r){r=document.createElement("style"),r.setAttribute("data-fullcalendar","");const t=function(){void 0===s&&(s=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");if(t)return t.nonce||"";return""}());return s}();t&&(r.nonce=t);const n=e===document?document.head:e,i=e===document?n.querySelector("script,link[rel=stylesheet],link[as=style],style"):n.firstChild;n.insertBefore(r,i)}n.set(e,r),function(e){for(const n of t)o(e,n)}(r)}}function o(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach((e,t)=>{(e=e.trim())&&n.insertRule(e+"}",r+t)})}let s;"undefined"!=typeof document&&i(document);function a(e){e.parentNode&&e.parentNode.removeChild(e)}function l(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(c(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function c(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function u(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].querySelectorAll(t);for(let e=0;e<i.length;e+=1)r.push(i[e])}return r}r(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');const d=/(top|left|right|bottom|width|height)$/i;function f(e,t){for(let n in t)h(e,n,t[n])}function h(e,t,n){null==n?e.style[t]="":"number"==typeof n&&d.test(t)?e.style[t]=n+"px":e.style[t]=n}function p(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}let g=0;function m(){return g+=1,"fc-dom-"+g}function v(e){e.preventDefault()}function b(e,t,n,r){let i=function(e,t){return n=>{let r=l(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}const A=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function y(e){return Object.assign({onClick:e},_(e))}function _(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let E=0;function D(){return E+=1,String(E)}function C(e){let t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t+=1)n=i[t],"string"==typeof n?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function w(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=S(e,t,n[r]),i)return i;return 0}function S(e,t,n){return n.func?n.func(e,t):T(e[n.field],t[n.field])*(n.order||1)}function T(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function k(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function R(e,t,n){return"function"==typeof e?e(...t):"string"==typeof e?t.reduce((e,t,n)=>e.replace("$"+n,t||""),e):n}function x(e){return e%1==0}function O(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const M=["years","months","days","milliseconds"],I=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function N(e,t){return"string"==typeof e?function(e){let t=I.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?B(e):"number"==typeof e?B({[t||"milliseconds"]:e}):null}function B(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function H(e){return P(e)/864e5}function P(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function U(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}const{hasOwnProperty:j}=Object.prototype;function z(e,t){let n={};if(t)for(let r in t)if(t[r]===Ue){let t=[];for(let i=e.length-1;i>=0;i-=1){let o=e[i][r];if("object"==typeof o&&o)t.unshift(o);else if(void 0!==o){n[r]=o;break}}t.length&&(n[r]=z(t))}for(let t=e.length-1;t>=0;t-=1){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function F(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function L(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function V(e){let t={};for(let n of e)t[n]=!0;return t}function W(e){let t=[];for(let n in e)t.push(e[n]);return t}function Q(e,t){if(e===t)return!0;for(let n in e)if(j.call(e,n)&&!(n in t))return!1;for(let n in t)if(j.call(t,n)&&e[n]!==t[n])return!1;return!0}const G=/^on[A-Z]/;function Z(e,t){let n=[];for(let r in e)j.call(e,r)&&(r in t||n.push(r));for(let r in t)j.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function q(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e)||!Y(e[r],t[r],n[r]))return!1;for(let n in e)if(!(n in t))return!1;return!0}function Y(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function J(e,t=0,n,r=1){let i=[];null==n&&(n=Object.keys(e).length);for(let o=t;o<n;o+=r){let t=e[o];void 0!==t&&i.push(t)}return i}function $(e,t,n){if(e===t)return!0;let r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}const X=["sun","mon","tue","wed","thu","fri","sat"];function K(e,t){let n=ue(e);return n[2]+=t,de(n)}function ee(e,t){let n=ue(e);return n[6]+=t,de(n)}function te(e,t){return(t.valueOf()-e.valueOf())/864e5}function ne(e,t){let n=oe(e),r=oe(t);return{years:0,months:0,days:Math.round(te(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function re(e,t){let n=ie(e,t);return null!==n&&n%7==0?n/7:null}function ie(e,t){return he(e)===he(t)?Math.round(te(e,t)):null}function oe(e){return de([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function se(e,t,n,r){let i=de([t,0,1+ae(t,n,r)]),o=oe(e),s=Math.round(te(i,o));return Math.floor(s/7)+1}function ae(e,t,n){let r=7+t-n;return-((7+de([e,0,r]).getUTCDay()-t)%7)+r-1}function le(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function ce(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function ue(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function de(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC(...e))}function fe(e){return!isNaN(e.valueOf())}function he(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function pe(e,t,n=!1){let r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",me(t,!0)))),r}function ge(e){return e.toISOString().replace(/T.*$/,"")}function me(e,t=!1){let n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?`${n+k(i,2)}:${k(o,2)}`:`GMT${n}${i}${o?":"+k(o,2):""}`}function ve(e,t,n){let r,i;return function(...o){if(r){if(!$(r,o)){n&&n(i);let r=e.apply(this,o);t&&t(r,i)||(i=r)}}else i=e.apply(this,o);return r=o,i}}function be(e,t,n){let r,i;return o=>{if(r){if(!Q(r,o)){n&&n(i);let r=e.call(this,o);t&&t(r,i)||(i=r)}}else i=e.call(this,o);return r=o,i}}const Ae={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},ye={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},_e=/\s*([ap])\.?m\.?/i,Ee=/,/g,De=/\s+/g,Ce=/\u200e/g,we=/UTC|GMT/;class Se{constructor(e){let t={},n={},r=9;for(let i in e)if(i in Ae){n[i]=e[i];Ae[i]<9&&(r=Math.min(Ae[i],r))}else t[i]=e[i],i in ye&&(r=Math.min(ye[i],r));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=ve(Te)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:o}=this,s=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(he(e)!==he(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!s)return this.format(e,n);let a=s;!(a>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);let l=this.format(e,n),c=this.format(t,n);if(l===c)return l;let u=Te(function(e,t){let n={};for(let r in e)(!(r in ye)||ye[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=u(e),f=u(t),h=function(e,t,n,r){let i=0;for(;i<e.length;){let o=e.indexOf(t,i);if(-1===o)break;let s=e.substr(0,o);i=o+t.length;let a=e.substr(i),l=0;for(;l<n.length;){let e=n.indexOf(r,l);if(-1===e)break;let t=n.substr(0,e);l=e+r.length;let i=n.substr(l);if(s===t&&a===i)return{before:s,after:a}}}return null}(l,d,c,f),p=o.separator||r||n.defaultSeparator||"";return h?h.before+d+p+f+h.after:l+p+c}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function Te(e,t,n){let r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?e=>me(e.timeZoneOffset):0===r&&t.week?e=>function(e,t,n,r,i){let o=[];"long"===i?o.push(n):"short"!==i&&"narrow"!==i||o.push(t);"long"!==i&&"short"!==i||o.push(" ");o.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&o.reverse();return o.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):function(e,t,n){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit"));"long"===e.timeZoneName&&(e.timeZoneName="short");t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let r,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,r=new Intl.DateTimeFormat(n.locale.codes,t)}return o=>{let s,{marker:a}=o;return s=r&&!a.getUTCMinutes()?r:i,function(e,t,n,r,i){e=e.replace(Ce,""),"short"===n.timeZoneName&&(e=function(e,t){let n=!1;e=e.replace(we,()=>(n=!0,t)),n||(e+=" "+t);return e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":me(t.timeZoneOffset)));r.omitCommas&&(e=e.replace(Ee,"").trim());r.omitZeroMinute&&(e=e.replace(":00",""));!1===r.meridiem?e=e.replace(_e,"").trim():"narrow"===r.meridiem?e=e.replace(_e,(e,t)=>t.toLocaleLowerCase()):"short"===r.meridiem?e=e.replace(_e,(e,t)=>t.toLocaleLowerCase()+"m"):"lowercase"===r.meridiem&&(e=e.replace(_e,e=>e.toLocaleLowerCase()));return e=(e=e.replace(De," ")).trim()}(s.format(a),o,e,t,n)}}(e,t,n)}function ke(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function Re(e,t,n,r){let i=ke(e,n.calendarSystem);return{date:i,start:i,end:t?ke(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class xe{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,Re(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,Re(e,t,n,r))}}class Oe{constructor(e){this.func=e}format(e,t,n){return this.func(Re(e,null,t,n))}formatRange(e,t,n,r){return this.func(Re(e,t,n,r))}}function Me(e){return"object"==typeof e&&e?new Se(e):"string"==typeof e?new xe(e):"function"==typeof e?new Oe(e):null}const Ie={navLinkDayClick:Ve,navLinkWeekClick:Ve,duration:N,bootstrapFontAwesome:Ve,buttonIcons:Ve,customButtons:Ve,defaultAllDayEventDuration:N,defaultTimedEventDuration:N,nextDayThreshold:N,scrollTime:N,scrollTimeReset:Boolean,slotMinTime:N,slotMaxTime:N,dayPopoverFormat:Me,slotDuration:N,snapDuration:N,headerToolbar:Ve,footerToolbar:Ve,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Me,dayHeaderClassNames:Ve,dayHeaderContent:Ve,dayHeaderDidMount:Ve,dayHeaderWillUnmount:Ve,dayCellClassNames:Ve,dayCellContent:Ve,dayCellDidMount:Ve,dayCellWillUnmount:Ve,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:Ve,weekNumbers:Boolean,weekNumberClassNames:Ve,weekNumberContent:Ve,weekNumberDidMount:Ve,weekNumberWillUnmount:Ve,editable:Boolean,viewClassNames:Ve,viewDidMount:Ve,viewWillUnmount:Ve,nowIndicator:Boolean,nowIndicatorClassNames:Ve,nowIndicatorContent:Ve,nowIndicatorDidMount:Ve,nowIndicatorWillUnmount:Ve,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:Ve,locale:Ve,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:Ve,eventOrder:C,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:Ve,contentHeight:Ve,direction:String,weekNumberFormat:Me,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:Ve,initialDate:Ve,now:Ve,eventDataTransform:Ve,stickyHeaderDates:Ve,stickyFooterScrollbar:Ve,viewHeight:Ve,defaultAllDay:Boolean,eventSourceFailure:Ve,eventSourceSuccess:Ve,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:Ve,eventConstraint:Ve,eventAllow:Ve,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:Ve,eventContent:Ve,eventDidMount:Ve,eventWillUnmount:Ve,selectConstraint:Ve,selectOverlap:Ve,selectAllow:Ve,droppable:Boolean,unselectCancel:String,slotLabelFormat:Ve,slotLaneClassNames:Ve,slotLaneContent:Ve,slotLaneDidMount:Ve,slotLaneWillUnmount:Ve,slotLabelClassNames:Ve,slotLabelContent:Ve,slotLabelDidMount:Ve,slotLabelWillUnmount:Ve,dayMaxEvents:Ve,dayMaxEventRows:Ve,dayMinWidth:Number,slotLabelInterval:N,allDayText:String,allDayClassNames:Ve,allDayContent:Ve,allDayDidMount:Ve,allDayWillUnmount:Ve,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Me,rerenderDelay:Number,moreLinkText:Ve,moreLinkHint:Ve,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:Ve,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:N,hiddenDays:Ve,fixedWeekCount:Boolean,validRange:Ve,visibleRange:Ve,titleFormat:Ve,eventInteractive:Boolean,noEventsText:String,viewHint:Ve,navLinkHint:Ve,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:Ve,moreLinkClassNames:Ve,moreLinkContent:Ve,moreLinkDidMount:Ve,moreLinkWillUnmount:Ve,monthStartFormat:Me,handleCustomRendering:Ve,customRenderingMetaMap:Ve,customRenderingReplaces:Boolean},Ne={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},Be={datesSet:Ve,eventsSet:Ve,eventAdd:Ve,eventChange:Ve,eventRemove:Ve,windowResize:Ve,eventClick:Ve,eventMouseEnter:Ve,eventMouseLeave:Ve,select:Ve,unselect:Ve,loading:Ve,_unmount:Ve,_beforeprint:Ve,_afterprint:Ve,_noEventDrop:Ve,_noEventResize:Ve,_resize:Ve,_scrollRequest:Ve},He={buttonText:Ve,buttonHints:Ve,views:Ve,plugins:Ve,initialEvents:Ve,events:Ve,eventSources:Ve},Pe={headerToolbar:Ue,footerToolbar:Ue,buttonText:Ue,buttonHints:Ue,buttonIcons:Ue,dateIncrement:Ue,plugins:je,events:je,eventSources:je,resources:je};function Ue(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?Q(e,t):e===t}function je(e,t){return Array.isArray(e)&&Array.isArray(t)?$(e,t):e===t}const ze={type:String,component:Ve,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:Ve,usesMinMaxTime:Boolean,classNames:Ve,content:Ve,didMount:Ve,willUnmount:Ve};function Fe(e){return z(e,Pe)}function Le(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function Ve(e){return e}function We(e,t,n,r){return{instanceId:D(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}function Qe(e,t,n){let{dateEnv:r,pluginHooks:i,options:o}=n,{defs:s,instances:a}=e;a=F(a,e=>!s[e.defId].recurringDef);for(let e in s){let n=s[e];if(n.recurringDef){let{duration:s}=n.recurringDef;s||(s=n.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);let l=Ge(n,s,t,r,i.recurringTypes);for(let t of l){let n=We(e,{start:t,end:r.add(t,s)});a[n.instanceId]=n}}}return{defs:s,instances:a}}function Ge(e,t,n,r,i){let o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(oe)),o}function Ze(e,t,n,r,i,o){let s={defs:{},instances:{}},a=ut(n);for(let l of e){let e=lt(l,t,n,r,a,i,o);e&&qe(e,s)}return s}function qe(e,t={defs:{},instances:{}}){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Ye(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=Xe(e,e=>{return n=t,r=e,Boolean(n.groupId&&n.groupId===r.groupId);var n,r});return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return{defs:{},instances:{}}}function Je(){return{defs:{},instances:{}}}function $e(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function Xe(e,t){let n=F(e.defs,t),r=F(e.instances,e=>n[e.defId]);return{defs:n,instances:r}}function Ke(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}const et={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:Ve,overlap:Ve,allow:Ve,className:Ke,classNames:Ke,color:String,backgroundColor:String,borderColor:String,textColor:String},tt={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function nt(e,t){let n=function(e,t){return Array.isArray(e)?Ze(e,null,t,!0):"object"==typeof e&&e?Ze([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function rt(e){return e.reduce(it,tt)}function it(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const ot={id:String,groupId:String,title:String,url:String,interactive:Boolean},st={start:Ve,end:Ve,date:Ve,allDay:Boolean},at=Object.assign(Object.assign(Object.assign({},ot),st),{extendedProps:Ve});function lt(e,t,n,r,i=ut(n),o,s){let{refined:a,extra:l}=ct(e,n,i),c=function(e,t){let n=null;e&&(n=e.defaultAllDay);null==n&&(n=t.options.defaultAllDay);return n}(t,n),u=function(e,t,n,r){for(let i=0;i<r.length;i+=1){let o=r[i].parse(e,n);if(o){let{allDay:n}=e;return null==n&&(n=t,null==n&&(n=o.allDayGuess,null==n&&(n=!1))),{allDay:n,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}(a,c,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let e=dt(a,l,t?t.sourceId:"",u.allDay,Boolean(u.duration),n,o);return e.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:e,instance:null}}let d=function(e,t,n,r){let i,o,{allDay:s}=e,a=null,l=!1,c=null,u=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(u),i)a=i.marker;else if(!r)return null;null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end));null==s&&(s=null!=t?t:(!i||i.isTimeUnspecified)&&(!o||o.isTimeUnspecified));s&&a&&(a=oe(a));o&&(c=o.marker,s&&(c=oe(c)),a&&c<=a&&(c=null));c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration));return{allDay:s,hasEnd:l,range:{start:a,end:c},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(a,c,n,r);if(d){let e=dt(a,l,t?t.sourceId:"",d.allDay,d.hasEnd,n,o),r=We(e.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return s&&e.publicId&&s[e.publicId]&&(r.instanceId=s[e.publicId]),{def:e,instance:r}}return null}function ct(e,t,n=ut(t)){return Le(e,n)}function ut(e){return Object.assign(Object.assign(Object.assign({},et),at),e.pluginHooks.eventRefiners)}function dt(e,t,n,r,i,o,s){let a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(s&&e.id?s[e.id]:"")||D(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:nt(e,o),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of o.pluginHooks.eventDefMemberAdders)Object.assign(a,t(e));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}const ft={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function ht(e,t){return Ze(function(e){let t;t=!0===e?[{}]:Array.isArray(e)?e.filter(e=>e.daysOfWeek):"object"==typeof e&&e?[e]:[];return t=t.map(e=>Object.assign(Object.assign({},ft),e)),t}(e),null,t)}function pt(e){let t=Math.floor(te(e.start,e.end))||1,n=oe(e.start);return{start:n,end:K(n,t)}}function gt(e,t=N(0)){let n=null,r=null;if(e.end){r=oe(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=P(t)&&(r=K(r,1))}return e.start&&(n=oe(e.start),r&&r<=n&&(r=K(n,1))),{start:n,end:r}}function mt(e,t,n,r){return"year"===r?N(n.diffWholeYears(e,t),"year"):"month"===r?N(n.diffWholeMonths(e,t),"month"):ne(e,t)}function vt(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}let bt;function At(){return null==bt&&(bt=function(){if("undefined"==typeof document)return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),bt}const yt={defs:{},instances:{}};function _t(e,t,n){let r=[];e&&r.push(e),t&&r.push(t);let i={"":rt(r)};return n&&Object.assign(i,n),i}function Et(e,t){let n,r,i=[],{start:o}=t;for(e.sort(Dt),n=0;n<e.length;n+=1)r=e[n],r.start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function Dt(e,t){return e.start.valueOf()-t.start.valueOf()}function Ct(e,t){let{start:n,end:r}=e,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function wt(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function St(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function Tt(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function kt(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function Rt(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&(!r.activeRange||!kt(r.activeRange,e))),isOther:Boolean(r&&!kt(r.currentRange,e)),isToday:Boolean(t&&kt(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function xt(e,t){let n=["fc-day","fc-day-"+X[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const Ot=Me({year:"numeric",month:"long",day:"numeric"}),Mt=Me({week:"long"});function It(e,t,n="day",r=!0){const{dateEnv:i,options:o,calendarApi:s}=e;let a=i.format(t,"week"===n?Mt:Ot);if(o.navLinks){let e=i.toDate(t);const l=e=>{let r="day"===n?o.navLinkDayClick:"week"===n?o.navLinkWeekClick:null;"function"==typeof r?r.call(s,i.toDate(t),e):("string"==typeof r&&(n=r),s.zoomTo(t,n))};return Object.assign({title:R(o.navLinkHint,[a,e],a),"data-navlink":""},r?y(l):{onClick:l})}return{"aria-label":a}}let Nt,Bt=null;function Ht(){return null===Bt&&(Bt=function(){let e=document.createElement("div");f(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);let t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return a(e),t}()),Bt}function Pt(){return Nt||(Nt=function(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=Ut(e);return document.body.removeChild(e),t}()),Nt}function Ut(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function jt(e,t=!1){let n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=Ut(e),l=a.y-r-i,c={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return Ht()&&"rtl"===n.direction?c.scrollbarLeft=l:c.scrollbarRight=l,t&&(c.paddingLeft=parseInt(n.paddingLeft,10)||0,c.paddingRight=parseInt(n.paddingRight,10)||0,c.paddingTop=parseInt(n.paddingTop,10)||0,c.paddingBottom=parseInt(n.paddingBottom,10)||0),c}function zt(e){let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,right:t.right+window.scrollX,bottom:t.bottom+window.scrollY}}function Ft(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function Lt(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},o=function(e){r||(r=!0,n(e))},s=e(i,o);s&&"function"==typeof s.then&&s.then(i,o)}class Vt{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)}off(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter(e=>e!==n)):delete e[t]}(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function Wt(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}class Qt{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class Gt{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if("object"==typeof e&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}}Gt.prototype.classes={},Gt.prototype.iconClasses={},Gt.prototype.baseIconClass="",Gt.prototype.iconOverridePrefix="";var Zt,qt,Yt,Jt,$t,Xt,Kt,en,tn,nn={},rn=[],on=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function sn(e,t){for(var n in t)e[n]=t[n];return e}function an(e){var t=e.parentNode;t&&t.removeChild(e)}function ln(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Zt.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return cn(e,s,r,i,null)}function cn(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++Yt:i};return null==i&&null!=qt.vnode&&qt.vnode(o),o}function un(){return{current:null}}function dn(e){return e.children}function fn(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||on.test(t)?n:n+"px"}function hn(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||fn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||fn(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?gn:pn,o):e.removeEventListener(t,o?gn:pn,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function pn(e){$t=!0;try{return this.l[e.type+!1](qt.event?qt.event(e):e)}finally{$t=!1}}function gn(e){$t=!0;try{return this.l[e.type+!0](qt.event?qt.event(e):e)}finally{$t=!1}}function mn(e,t){this.props=e,this.context=t}function vn(e,t){if(null==t)return e.__?vn(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?vn(e):null}function bn(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return bn(e)}}function An(e){$t?setTimeout(e):en(e)}function yn(e){(!e.__d&&(e.__d=!0)&&Xt.push(e)&&!_n.__r++||Kt!==qt.debounceRendering)&&((Kt=qt.debounceRendering)||An)(_n)}function _n(){var e,t,n,r,i,o,s,a;for(Xt.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=Xt.shift();)e.__d&&(t=Xt.length,r=void 0,i=void 0,s=(o=(n=e).__v).__e,(a=n.__P)&&(r=[],(i=sn({},o)).__v=o.__v+1,Tn(a,o,i,n.__n,void 0!==a.ownerSVGElement,null!=o.__h?[s]:null,r,null==s?vn(o):s,o.__h),kn(r,o),o.__e!=s&&bn(o)),Xt.length>t&&Xt.sort((function(e,t){return e.__v.__b-t.__v.__b})));_n.__r=0}function En(e,t,n,r,i,o,s,a,l,c){var u,d,f,h,p,g,m,v=r&&r.__k||rn,b=v.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?cn(null,h,null,null,h):Array.isArray(h)?cn(dn,{children:h},null,null,null):h.__b>0?cn(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=v[u])||f&&h.key==f.key&&h.type===f.type)v[u]=void 0;else for(d=0;d<b;d++){if((f=v[d])&&h.key==f.key&&h.type===f.type){v[d]=void 0;break}f=null}Tn(e,h,f=f||nn,i,o,s,a,l,c),p=h.__e,(d=h.ref)&&f.ref!=d&&(m||(m=[]),f.ref&&m.push(f.ref,null,h),m.push(d,h.__c||p,h)),null!=p?(null==g&&(g=p),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=Dn(h,l,e):l=wn(e,h,f,v,p,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=vn(f))}for(n.__e=g,u=b;u--;)null!=v[u]&&("function"==typeof n.type&&null!=v[u].__e&&v[u].__e==n.__d&&(n.__d=Sn(r).nextSibling),On(v[u],v[u]));if(m)for(u=0;u<m.length;u++)xn(m[u],m[++u],m[++u])}function Dn(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Dn(r,t,n):wn(n,r,r,i,r.__e,t));return t}function Cn(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Cn(e,t)})):t.push(e)),t}function wn(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function Sn(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Sn(n)))return r;return null}function Tn(e,t,n,r,i,o,s,a,l){var c,u,d,f,h,p,g,m,v,b,A,y,_,E,D,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=qt.__b)&&c(t);try{e:if("function"==typeof C){if(m=t.props,v=(c=C.contextType)&&r[c.__c],b=c?v?v.props.value:c.__:r,n.__c?g=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(m,b):(t.__c=u=new mn(m,b),u.constructor=C,u.render=Mn),v&&v.sub(u),u.props=m,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=sn({},u.__s)),sn(u.__s,C.getDerivedStateFromProps(m,u.__s))),f=u.props,h=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&m!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(m,b),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(m,u.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=m,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[],u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(m,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,h,p)}))}if(u.context=b,u.props=m,u.__P=e,y=qt.__r,_=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,y&&y(t),c=u.render(u.props,u.state,u.context),E=0;E<u._sb.length;E++)u.__h.push(u._sb[E]);u._sb=[]}else do{u.__d=!1,y&&y(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++_<25);u.state=u.__s,null!=u.getChildContext&&(r=sn(sn({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(p=u.getSnapshotBeforeUpdate(f,h)),D=null!=c&&c.type===dn&&null==c.key?c.props.children:c,En(e,Array.isArray(D)?D:[D],t,n,r,i,o,s,a,l),u.base=t.__e,t.__h=null,u.__h.length&&s.push(u),g&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Rn(n.__e,t,n,r,i,o,s,l);(c=qt.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),qt.__e(e,t,n)}}function kn(e,t){qt.__c&&qt.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){qt.__e(e,t.__v)}}))}function Rn(e,t,n,r,i,o,s,a){var l,c,u,d=n.props,f=t.props,h=t.type,p=0;if("svg"===h&&(i=!0),null!=o)for(;p<o.length;p++)if((l=o[p])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[p]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),o=null,a=!1}if(null===h)d===f||a&&e.data===f||(e.data=f);else{if(o=o&&Zt.call(e.childNodes),c=(d=n.props||nn).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},p=0;p<e.attributes.length;p++)d[e.attributes[p].name]=e.attributes[p].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||hn(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||hn(e,o,t[o],n[o],r)}(e,f,d,i,a),u)t.__k=[];else if(p=t.props.children,En(e,Array.isArray(p)?p:[p],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&vn(n,0),a),null!=o)for(p=o.length;p--;)null!=o[p]&&an(o[p]);a||("value"in f&&void 0!==(p=f.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==d.value)&&hn(e,"value",p,d.value,!1),"checked"in f&&void 0!==(p=f.checked)&&p!==e.checked&&hn(e,"checked",p,d.checked,!1))}return e}function xn(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){qt.__e(e,n)}}function On(e,t,n){var r,i;if(qt.unmount&&qt.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||xn(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){qt.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&On(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||an(e.__e),e.__=e.__e=e.__d=void 0}function Mn(e,t,n){return this.constructor(e,n)}function In(e,t,n){var r,i,o;qt.__&&qt.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Tn(t,e=(!r&&n||t).__k=ln(dn,null,[e]),i||nn,nn,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?Zt.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),kn(o,e)}Zt=rn.slice,qt={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},Yt=0,Jt=function(e){return null!=e&&void 0===e.constructor},$t=!1,mn.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=sn({},this.state),"function"==typeof e&&(e=e(sn({},n),this.props)),e&&sn(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),yn(this))},mn.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),yn(this))},mn.prototype.render=dn,Xt=[],en="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_n.__r=0,tn=0;var Nn,Bn,Hn,Pn=[],Un=[],jn=qt.__b,zn=qt.__r,Fn=qt.diffed,Ln=qt.__c,Vn=qt.unmount;function Wn(){for(var e;e=Pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Zn),e.__H.__h.forEach(qn),e.__H.__h=[]}catch(t){e.__H.__h=[],qt.__e(t,e.__v)}}qt.__b=function(e){Nn=null,jn&&jn(e)},qt.__r=function(e){zn&&zn(e);var t=(Nn=e.__c).__H;t&&(Bn===Nn?(t.__h=[],Nn.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Un,e.__N=e.i=void 0}))):(t.__h.forEach(Zn),t.__h.forEach(qn),t.__h=[])),Bn=Nn},qt.diffed=function(e){Fn&&Fn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Pn.push(t)&&Hn===qt.requestAnimationFrame||((Hn=qt.requestAnimationFrame)||Gn)(Wn)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Un&&(e.__=e.__V),e.i=void 0,e.__V=Un}))),Bn=Nn=null},qt.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Zn),e.__h=e.__h.filter((function(e){return!e.__||qn(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],qt.__e(n,e.__v)}})),Ln&&Ln(e,t)},qt.unmount=function(e){Vn&&Vn(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Zn(e)}catch(e){t=e}})),n.__H=void 0,t&&qt.__e(t,n.__v))};var Qn="function"==typeof requestAnimationFrame;function Gn(e){var t,n=function(){clearTimeout(r),Qn&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Qn&&(t=requestAnimationFrame(n))}function Zn(e){var t=Nn,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Nn=t}function qn(e){var t=Nn;e.__c=e.__(),Nn=t}function Yn(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Jn(e){this.props=e}(Jn.prototype=new mn).isPureReactComponent=!0,Jn.prototype.shouldComponentUpdate=function(e,t){return Yn(this.props,e)||Yn(this.state,t)};var $n=qt.__b;qt.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),$n&&$n(e)};var Xn=qt.__e;qt.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Xn(e,t,n,r)};var Kn=qt.unmount;function er(){this.__u=0,this.t=null,this.__b=null}function tr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function nr(){this.u=null,this.o=null}qt.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Kn&&Kn(e)},(er.prototype=new mn).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=tr(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},er.prototype.componentWillUnmount=function(){this.t=[]},er.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&ln(dn,null,e.fallback);return i&&(i.__h=null),[ln(dn,null,t.__a?null:e.children),i]};var rr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ir(e){return this.getChildContext=function(){return e.context},e.children}function or(e){var t=this,n=e.i;t.componentWillUnmount=function(){In(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),In(ln(ir,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function sr(e,t){var n=ln(or,{__v:e,i:t});return n.containerInfo=t,n}(nr.prototype=new mn).__a=function(e){var t=this,n=tr(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),rr(t,e,r)):i()};n?n(o):o()}},nr.prototype.render=function(e){this.u=null,this.o=new Map;var t=Cn(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},nr.prototype.componentDidUpdate=nr.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){rr(e,n,t)}))};var ar="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,lr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,cr="undefined"!=typeof document,ur=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};mn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(mn.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var dr=qt.event;function fr(){}function hr(){return this.cancelBubble}function pr(){return this.defaultPrevented}qt.event=function(e){return dr&&(e=dr(e)),e.persist=fr,e.isPropagationStopped=hr,e.isDefaultPrevented=pr,e.nativeEvent=e};var gr={configurable:!0,get:function(){return this.class}},mr=qt.vnode;qt.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];cr&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!ur(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&lr.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=Cn(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=Cn(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(gr.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",gr))}e.$$typeof=ar,mr&&mr(e)};var vr=qt.__r;function br(e){e();let t=qt.debounceRendering,n=[];for(qt.debounceRendering=function(e){n.push(e)},In(ln(Ar,{}),document.createElement("div"));n.length;)n.shift()();qt.debounceRendering=t}qt.__r=function(e){vr&&vr(e),e.__c};class Ar extends mn{render(){return ln("div",{})}componentDidMount(){this.setState({})}}function yr(e){let t=function(e,t){var n={__c:t="__cC"+tn++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,yn(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach(e=>{e.context=t.value,e.forceUpdate()})},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}var _r={__proto__:null,flushSync:br,createContext:yr,createPortal:sr,Component:mn,Fragment:dn,cloneElement:function(e,t,n){var r,i,o,s=sn({},e.props);for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];return arguments.length>2&&(s.children=arguments.length>3?Zt.call(arguments,2):n),cn(e.type,s,r||e.key,i||e.ref,null)},createElement:ln,createRef:un,h:ln,hydrate:function e(t,n){In(t,n,e)},get isValidElement(){return Jt},get options(){return qt},render:In,toChildArray:Cn};class Er{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const Dr=yr({});function Cr(e,t,n,r,i,o,s,a,l,c,u,d,f,h){return{dateEnv:i,nowManager:o,options:n,pluginHooks:a,emitter:u,dispatch:l,getCurrentData:c,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:"rtl"===n.direction,addResizeHandler(e){u.on("_resize",e)},removeResizeHandler(e){u.off("_resize",e)},createScrollResponder:e=>new Er(e,u,N(n.scrollTime),n.scrollTimeReset),registerInteractiveComponent:f,unregisterInteractiveComponent:h}}class wr extends mn{shouldComponentUpdate(e,t){return this.debug&&console.log(Z(e,this.props),Z(t,this.state)),!q(this.props,e,this.propEquality)||!q(this.state,t,this.stateEquality)}safeSetState(e){q(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}wr.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},wr.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},wr.contextType=Dr,wr.prototype.propEquality={},wr.prototype.stateEquality={};class Sr extends wr{}function Tr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}Sr.contextType=Dr;class kr extends Sr{constructor(){super(...arguments),this.uid=D()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!l(e,".fc-event-mirror")}isValidDateDownEl(e){return!(l(e,".fc-event:not(.fc-bg-event)")||l(e,".fc-more-link")||l(e,"a[data-navlink]")||l(e,".fc-popover"))}}class Rr{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let r,i,o,s,a,l,{props:c}=this;var u,d;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(u=e,e=null!=(d=r).start&&u<d.start?d.start:null!=d.end&&u>=d.end?new Date(d.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),s=this.trimHiddenDays(s),a=s,c.showNonCurrentDates||(a=Ct(a,i.range)),a=this.adjustActiveRange(a),a=Ct(a,r),l=St(i.range,r),kt(s,e)||(e=s.start),{currentDate:e,validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}}buildValidRange(){let e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let n,{props:r}=this,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(i=this.getFallbackDuration(),o=U(i).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}}getFallbackDuration(){return N({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:o,end:s}=e;return n&&(H(r)<0&&(o=oe(o),o=t.add(o,r)),H(i)>1&&(s=oe(s),s=K(s,-1),s=t.add(s,i))),{start:o,end:s}}buildRangeFromDuration(e,t,n,r){let i,o,s,{dateEnv:a,dateAlignment:l}=this.props;if(!l){let{dateIncrement:e}=this.props;l=e&&P(e)<P(n)?U(e).unit:r}function c(){i=a.startOf(e,l),o=a.add(i,n),s={start:i,end:o}}return H(n)<=1&&this.isHiddenDay(i)&&(i=this.skipHiddenDays(i,t),i=oe(i)),c(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),c()),s}buildRangeFromDayCount(e,t,n){let r,{dateEnv:i,dateAlignment:o}=this.props,s=0,a=e;o&&(a=i.startOf(a,o)),a=oe(a),a=this.skipHiddenDays(a,t),r=a;do{r=K(r,1),this.isHiddenDay(r)||(s+=1)}while(s<n);return{start:a,end:r}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let t,{dateIncrement:n}=this.props;return n||((t=this.props.dateAlignment)?N(1,t):e||N({days:1}))}refineRange(e){if(e){let t=function(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}(e,this.props.dateEnv);return t&&(t=gt(t)),t}return null}initHiddenDays(){let e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:t,end:n}=e;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=K(e,t);return e}}function xr(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},Or(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Or(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));var r,i;return Object.assign(n,(r=e,i=t.dateEnv,Object.assign(Object.assign({},ti(r.range,i,r.allDay)),{allDay:r.allDay}))),n}function Mr(e,t,n){let{dateEnv:r,options:i}=n,o=t;return e?(o=oe(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function Ir(e,t,n,r){let i=Vr(e.defs,t),o={defs:{},instances:{}};for(let t in e.defs){let s=e.defs[t];o.defs[t]=Nr(s,i[t],n,r)}for(let t in e.instances){let s=e.instances[t],a=o.defs[s.defId];o.instances[t]=Br(s,a,i[s.defId],n,r)}return o}function Nr(e,t,n,r){let i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let o=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(o.extendedProps=Object.assign(Object.assign({},o.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(o,n,r);return!o.hasEnd&&r.options.forceEventDuration&&(o.hasEnd=!0),o}function Br(e,t,n,r,i){let{dateEnv:o}=i,s=r.standardProps&&!0===r.standardProps.allDay,a=r.standardProps&&!1===r.standardProps.hasEnd,l=Object.assign({},e);return s&&(l.range=pt(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:o.add(l.range.start,r.datesDelta),end:o.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:o.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:o.add(l.range.end,r.endDelta)}),a&&(l.range={start:l.range.start,end:Mr(t.allDay,l.range.start,i)}),t.allDay&&(l.range={start:oe(l.range.start),end:oe(l.range.end)}),l.range.end<l.range.start&&(l.range.end=Mr(t.allDay,l.range.start,i)),l}class Hr{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Pr{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in st)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=ot[e](t),this.mutate({standardProps:{publicId:t}});else if(e in ot)t=ot[e](t),this.mutate({standardProps:{[e]:t}});else if(e in et){let n=et[e](t);n="color"===e?{backgroundColor:t,borderColor:t}:"editable"===e?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=mt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:e}):this.mutate({startDelta:e})}}setEnd(e,t={}){let n,{dateEnv:r}=this._context;if((null==e||(n=r.createMarker(e),n))&&this._instance)if(n){let e=mt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,n={}){let r,{dateEnv:i}=this._context,o={allDay:n.allDay},s=i.createMarker(e);var a,l;if(s&&((null==t||(r=i.createMarker(t),r))&&this._instance)){let e=this._instance.range;!0===n.allDay&&(e=pt(e));let t=mt(e.start,s,i,n.granularity);if(r){let s=mt(e.end,r,i,n.granularity);l=s,(a=t).years===l.years&&a.months===l.months&&a.days===l.days&&a.milliseconds===l.milliseconds?this.mutate({datesDelta:t,standardProps:o}):this.mutate({startDelta:t,endDelta:s,standardProps:o})}else o.hasEnd=!1,this.mutate({datesDelta:t,standardProps:o})}}moveStart(e){let t=N(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=N(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=N(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=Me(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let n=this._def,r=this._context,{eventStore:i}=r.getCurrentData(),o=Ye(i,t.instanceId);o=Ir(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,r);let s=new Pr(r,n,t);this._def=o.defs[n.defId],this._instance=o.instances[t.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:o}),r.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:jr(o,r,t),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,t=Ur(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new Hr(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,o={allDay:t.allDay};return t.title&&(o.title=t.title),r&&(o.start=r),i&&(o.end=i),t.publicId&&(o.id=t.publicId),t.groupId&&(o.groupId=t.groupId),t.url&&(o.url=t.url),n.display&&"auto"!==n.display&&(o.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?o.color=n.backgroundColor:(n.backgroundColor&&(o.backgroundColor=n.backgroundColor),n.borderColor&&(o.borderColor=n.borderColor)),n.textColor&&(o.textColor=n.textColor),n.classNames.length&&(o.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(o,t.extendedProps):o.extendedProps=t.extendedProps),o}toJSON(){return this.toPlainObject()}}function Ur(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function jr(e,t,n){let{defs:r,instances:i}=e,o=[],s=n?n.instanceId:"";for(let e in i){let n=i[e],a=r[n.defId];n.instanceId!==s&&o.push(new Pr(t,a,n))}return o}function zr(e,t,n,r){let i={},o={},s={},a=[],l=[],c=Vr(e.defs,t);for(let t in e.defs){let n=e.defs[t];"inverse-background"===c[n.defId].display&&(n.groupId?(i[n.groupId]=[],s[n.groupId]||(s[n.groupId]=n)):o[t]=[])}for(let t in e.instances){let s=e.instances[t],u=e.defs[s.defId],d=c[u.defId],f=s.range,h=!u.allDay&&r?gt(f,r):f,p=Ct(h,n);p&&("inverse-background"===d.display?u.groupId?i[u.groupId].push(p):o[s.defId].push(p):"none"!==d.display&&("background"===d.display?a:l).push({def:u,ui:d,instance:s,range:p,isStart:h.start&&h.start.valueOf()===p.start.valueOf(),isEnd:h.end&&h.end.valueOf()===p.end.valueOf()}))}for(let e in i){let t=Et(i[e],n);for(let n of t){let t=s[e],r=c[t.defId];a.push({def:t,ui:r,instance:null,range:n,isStart:!1,isEnd:!1})}}for(let t in o){let r=Et(o[t],n);for(let n of r)a.push({def:e.defs[t],ui:c[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:a,fg:l}}function Fr(e,t){e.fcSeg=t}function Lr(e){return e.fcSeg||e.parentNode.fcSeg||null}function Vr(e,t){return L(e,e=>Wr(e,t))}function Wr(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),rt(n)}function Qr(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,o=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:o,duration:o-i,allDay:Number(n.allDay),_seg:e})}function Gr(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:o}=e.eventRange,s=o.startEditable;for(let e of r)s=e(s,i,o,t);return s}function Zr(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function qr(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function Yr(e,t,n,r,i,o,s){let{dateEnv:a,options:l}=n,{displayEventTime:c,displayEventEnd:u}=l,d=e.eventRange.def,f=e.eventRange.instance;null==c&&(c=!1!==r),null==u&&(u=!1!==i);let h=f.range.start,p=f.range.end,g=o||e.start||e.eventRange.range.start,m=s||e.end||e.eventRange.range.end,v=oe(h).valueOf()===oe(g).valueOf(),b=oe(ee(p,-1)).valueOf()===oe(ee(m,-1)).valueOf();return c&&!d.allDay&&(v||b)?(g=v?h:g,m=b?p:m,u&&d.hasEnd?a.formatRange(g,m,t,{forcedStartTzo:o?null:f.forcedStartTzo,forcedEndTzo:s?null:f.forcedEndTzo}):a.format(g,t,{forcedTzo:o?null:f.forcedStartTzo})):""}function Jr(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function $r(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:o,options:s}=t,{eventInteractive:a}=s;return null==a&&(a=n.interactive,null==a&&(a=Boolean(o.hasHandlers("eventClick")))),a?_(e=>{o.trigger("eventClick",{el:e.target,event:new Pr(t,n,r),jsEvent:e,view:t.viewApi})}):{}}const Xr={start:Ve,end:Ve,allDay:Boolean};function Kr(e,t,n){let r=function(e,t){let{refined:n,extra:r}=Le(e,Xr),i=n.start?t.createMarkerMeta(n.start):null,o=n.end?t.createMarkerMeta(n.end):null,{allDay:s}=n;null==s&&(s=i&&i.isTimeUnspecified&&(!o||o.isTimeUnspecified));return Object.assign({range:{start:i?i.marker:null,end:o?o.marker:null},allDay:s},r)}(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}function ei(e,t,n){return Object.assign(Object.assign({},ti(e,t,n)),{timeZone:t.timeZone})}function ti(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}let ni={};var ri,ii;ri="gregory",ii=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return de(e)}markerToArray(e){return ue(e)}},ni[ri]=ii;const oi=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function si(e){let t=oi.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(fe(e)){let n=null;return t[13]&&(n=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}class ai{constructor(e){let t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new ni[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):de(le(new Date))}createMarkerMeta(e){if("string"==typeof e)return this.parse(e);let t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=de(e)),null!==t&&fe(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=si(e);if(null===t)return null;let{marker:n}=t,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return he(e)===he(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return he(e)===he(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),null!==n?{unit:"month",value:n}:(n=re(e,t),null!==n?{unit:"week",value:n}:(n=ie(e,t),null!==n?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),x(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),x(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),x(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),null!==r)?r/(H(n)/365):n.months&&(r=this.diffWholeMonths(e,t),null!==r)?r/function(e){return H(e)/30}(n):n.days&&(r=ie(e,t),null!==r)?r/H(n):(t.valueOf()-e.valueOf())/P(n)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?oe(e):"hour"===t?function(e){return de([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return de([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return de([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){let r=e.getUTCFullYear(),i=se(e,r,t,n);if(i<1)return se(e,r-1,t,n);let o=se(e,r+1,t,n);return o>=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=ee(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),pe(e,n,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?de(le(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?de(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-ce(ue(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ue(e)):null}toDate(e,t){return"local"===this.timeZone?ce(ue(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(ue(e))*60):new Date(e.valueOf()-(t||0))}}function li(e){return e.span.end}function ci(e){return e.index+":"+e.span.start}function ui(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function di(e,t,n){e.splice(t,0,n)}function fi(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let o=Math.floor(r+(i-r)/2),s=n(e[o]);if(t<s)i=o;else{if(!(t>s))return[o,1];r=o+1}}return[r,0]}class hi{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}const pi={};const gi={startTime:N,duration:N,create:Boolean,sourceId:String};class mi extends Sr{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{br(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{br(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return At()||o.push("fc-liquid-hack"),e.children(o,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}function vi(e,t){return Me(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}const bi="fc-col-header-cell";function Ai(e){return e.text}class yi extends Sr{constructor(){super(...arguments),this.id=D(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&_i(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Tr(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:o}=e,s=Ei(e,[],this.handleEl);let a,l,c=!1,u=[];if(null!=r){const e="function"==typeof r?r(o,ln):r;if(!0===e)c=!0;else{const t=e&&"object"==typeof e;t&&"html"in e?s.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?u=Array.prototype.slice.call(e.domNodes):(t?Jt(e):"function"!=typeof e)?a=e:l=e}}else c=!_i(e.generatorName,n);return c&&i&&(a=i(o)),this.queuedDomNodes=u,this.currentGeneratorMeta=l,ln(e.elTag,s,a)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:n,context:r}=this,{handleCustomRendering:i,customRenderingMetaMap:o}=r.options;if(i){const r=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null==o?void 0:o[n.generatorName];r&&i(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:r},n),{elClasses:(n.elClasses||[]).filter(Di)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!$(e,t)){t.forEach(a);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}}function _i(e,t){var n;return Boolean(t.handleCustomRendering&&e&&(null===(n=t.customRenderingMetaMap)||void 0===n?void 0:n[e]))}function Ei(e,t,n){const r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),e.elStyle&&(r.style=e.elStyle),r}function Di(e){return Boolean(e)}yi.addPropsEquality({elClasses:$,elStyle:Q,elAttrs:function(e,t){const n=Z(e,t);for(let e of n)if(!G.test(e))return!1;return!0},renderProps:Q});const Ci=yr(0);class wi extends mn{constructor(){super(...arguments),this.InnerContent=Si.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Tr(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,t=function(e,t){const n="function"==typeof e?e(t):e||[];return"string"==typeof n?[n]:n}(e.classNameGenerator,e.renderProps);if(e.children){const n=Ei(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?ln(e.elTag,n,r):r}return ln(yi,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}function Si(e,t){const n=e.props;return ln(yi,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}wi.contextType=Ci;class Ti extends Sr{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:o,dateProfile:s}=i,a=Rt(o,i.todayRange,null,s),l=[bi].concat(xt(a,n)),c=e.format(o,i.dayHeaderFormat),u=!a.isDisabled&&i.colCnt>1?It(this.context,o):{},d=e.toDate(o);e.namedTimeZoneImpl&&(d=ee(d,36e5));let f=Object.assign(Object.assign(Object.assign({date:d,view:r},i.extraRenderProps),{text:c}),a);return ln(wi,{elTag:"th",elClasses:l,elAttrs:Object.assign({role:"columnheader",colSpan:i.colSpan,"data-date":a.isDisabled?void 0:ge(o)},i.extraDataAttrs),renderProps:f,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:Ai,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},e=>ln("div",{className:"fc-scrollgrid-sync-inner"},!a.isDisabled&&ln(e,{elTag:"a",elAttrs:u,elClasses:["fc-col-header-cell-cushion",i.isSticky&&"fc-sticky"]})))}}const ki=Me({weekday:"long"});class Ri extends Sr{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,o=K(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},a=t.format(o,e.dayHeaderFormat),l=Object.assign(Object.assign(Object.assign(Object.assign({date:o},s),{view:r}),e.extraRenderProps),{text:a});return ln(wi,{elTag:"th",elClasses:[bi,...xt(s,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:l,generatorName:"dayHeaderContent",customGenerator:i.dayHeaderContent,defaultGenerator:Ai,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},n=>ln("div",{className:"fc-scrollgrid-sync-inner"},ln(n,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(o,ki)}})))}}class xi extends mn{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,n=t.nowManager.getDateMarker(),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,N(1,e.unit)).valueOf()-n.valueOf();return i=Math.min(864e5,i),{state:{nowDate:r,todayRange:Oi(r)},waitMs:i}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{const e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function Oi(e){let t=oe(e);return{start:t,end:K(t,1)}}xi.contextType=Dr;function Mi(e,t,n){return e||vi(t,n)}function Ii(e,t){let n=e.activeRange;return t?n:{start:ee(n.start,e.slotMinTime.milliseconds),end:ee(n.end,e.slotMaxTime.milliseconds-864e5)}}function Ni(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){let n=Ze(Bi(i,t,o),t,o);return r&&(n=Qe(n,r,o)),$e(Ui(e,t.sourceId),n)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"RESET_RAW_EVENTS":return function(e,t,n,r,i){const{defIdMap:o,instanceIdMap:s}=function(e){const{defs:t,instances:n}=e,r={},i={};for(let e in t){const n=t[e],{publicId:i}=n;i&&(r[i]=e)}for(let e in n){const r=n[e],o=t[r.defId],{publicId:s}=o;s&&(i[s]=e)}return{defIdMap:r,instanceIdMap:i}}(e);return Qe(Ze(Bi(n,t,i),t,i,!1,o,s),r,i)}(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Qe(t,n,r));return $e(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return $e(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Qe(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){let{defs:n,instances:r}=e,i={},o={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(o[e]=r[e]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Ui(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Xe(e,e=>!e.sourceId);case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function Bi(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Hi(e,i)),r&&(e=Hi(e,r)),e}function Hi(e,t){let n;if(t){n=[];for(let r of e){let e=t(r);e?n.push(e):null==e&&n.push(r)}}else n=e;return n}function Pi(e,t,n){let{defs:r}=e,i=L(e.instances,e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo}));return{defs:r,instances:i}}function Ui(e,t){return Xe(e,e=>e.sourceId!==t)}function ji(e,t){let n=t.getCurrentData(),r=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||zi)(r,t)}function zi(e,t,n={},r){return!(e.eventDrag&&!function(e,t,n,r){let i=t.getCurrentData(),o=e.eventDrag,s=o.mutatedEvents,a=s.defs,l=s.instances,c=Vr(a,o.isEvent?e.eventUiBases:{"":i.selectionConfig});r&&(c=L(c,r));let u=(p=e.eventStore,g=o.affectedEvents.instances,{defs:p.defs,instances:F(p.instances,e=>!g[e.instanceId])}),d=u.defs,f=u.instances,h=Vr(d,e.eventUiBases);var p,g;for(let r in l){let s=l[r],p=s.range,g=c[s.defId],m=a[s.defId];if(!Fi(g.constraints,p,u,e.businessHours,t))return!1;let{eventOverlap:v}=t.options,b="function"==typeof v?v:null;for(let e in f){let n=f[e];if(St(p,n.range)){if(!1===h[n.defId].overlap&&o.isEvent)return!1;if(!1===g.overlap)return!1;if(b&&!b(new Pr(t,d[n.defId],n),new Pr(t,m,s)))return!1}}let A=i.eventStore;for(let e of g.allows){let i,o=Object.assign(Object.assign({},n),{range:s.range,allDay:m.allDay}),a=A.defs[m.defId],l=A.instances[r];if(i=a?new Pr(t,a,l):new Pr(t,m),!e(Or(o,t),i))return!1}}return!0}(e,t,n,r))&&!(e.dateSelection&&!function(e,t,n,r){let i=e.eventStore,o=i.defs,s=i.instances,a=e.dateSelection,l=a.range,{selectionConfig:c}=t.getCurrentData();r&&(c=r(c));if(!Fi(c.constraints,l,i,e.businessHours,t))return!1;let{selectOverlap:u}=t.options,d="function"==typeof u?u:null;for(let e in s){let n=s[e];if(St(l,n.range)){if(!1===c.overlap)return!1;if(d&&!d(new Pr(t,o[n.defId],n),null))return!1}}for(let e of c.allows){let r=Object.assign(Object.assign({},n),a);if(!e(Or(r,t),null))return!1}return!0}(e,t,n,r))}function Fi(e,t,n,r,i){for(let o of e)if(!Wi(Li(o,t,n,r,i),t))return!1;return!0}function Li(e,t,n,r,i){return"businessHours"===e?Vi(Qe(r,t,i)):"string"==typeof e?Vi(Xe(n,t=>t.groupId===e)):"object"==typeof e&&e?Vi(Qe(e,t,i)):[]}function Vi(e){let{instances:t}=e,n=[];for(let e in t)n.push(t[e].range);return n}function Wi(e,t){for(let n of e)if(Tt(n,t))return!0;return!1}class Qi extends Error{constructor(e,t){super(e),this.response=t}}function Gi(e,t,n){const r={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then(e=>{if(e.ok)return e.json().then(t=>[t,e],()=>{throw new Qi("Failure parsing JSON",e)});throw new Qi("Request failed",e)})}class Zi{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:n}=this;if(e in n){if(t)delete n[e];else{n[e]-=1,n[e]<=0&&delete n[e]}this.tryDrain()}}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}const qi=/^(visible|hidden)$/;class Yi extends Sr{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Tr(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),ln("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(qi.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1){if(n[e].getBoundingClientRect().width>t)return!0}return!1}needsYScrolling(){if(qi.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1){if(n[e].getBoundingClientRect().height>t)return!0}return!1}getXScrollbarWidth(){return qi.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return qi.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Ji{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,o=!1;null!==e?(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,o=!0):(n[t]-=1,n[t]||(delete r[t],delete this.callbackMap[t],i=!0)),this.masterCallback&&(i&&this.masterCallback(null,String(t)),o&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,n){return J(this.currentMap,e,t,n)}getAll(){return W(this.currentMap)}}function $i(e){let t=u(e,".fc-scrollgrid-shrink"),n=0;for(let e of t)n=Math.max(n,O(e));return Math.ceil(n)}function Xi(e,t){return e.liquid&&t.liquid}function Ki(e,t){return null!=t.maxHeight||Xi(e,t)}function eo(e,t,n,r){let{expandRows:i}=n;return"function"==typeof t.content?t.content(n):ln("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,ln(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function to(e,t){return $(e,t,Q)}function no(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(ln("col",{style:{width:"shrink"===r.width?ro(t):r.width||"",minWidth:r.minWidth||""}}))}return ln("colgroup",{},...n)}function ro(e){return null==e?4:e}function io(e){for(let t of e)if("shrink"===t.width)return!0;return!1}function oo(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function so(e,t){let n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}class ao extends Sr{constructor(){super(...arguments),this.processCols=ve(e=>e,to),this.renderMicroColGroup=ve(no),this.scrollerRefs=new Ji,this.scrollerElRefs=new Ji(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),o=this.renderMicroColGroup(i,t.shrinkWidth),s=oo(e.liquid,n);e.collapsibleWidth&&s.push("fc-scrollgrid-collapsible");let a,l=r.length,c=0,u=[],d=[],f=[];for(;c<l&&"header"===(a=r[c]).type;)u.push(this.renderSection(a,o,!0)),c+=1;for(;c<l&&"body"===(a=r[c]).type;)d.push(this.renderSection(a,o,!1)),c+=1;for(;c<l&&"footer"===(a=r[c]).type;)f.push(this.renderSection(a,o,!0)),c+=1;let h=!At();const p={role:"rowgroup"};return ln("table",{role:"grid",className:s.join(" "),style:{height:e.height}},Boolean(!h&&u.length)&&ln("thead",p,...u),Boolean(!h&&d.length)&&ln("tbody",p,...d),Boolean(!h&&f.length)&&ln("tfoot",p,...f),h&&ln("tbody",p,...u,...d,...f))}renderSection(e,t,n){return"outerContent"in e?ln(dn,{key:e.key},e.outerContent):ln("tr",{key:e.key,role:"presentation",className:so(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if("outerContent"in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:o,scrollerClientWidths:s,scrollerClientHeights:a}=this.state,l=Ki(i,e),c=Xi(i,e),u=i.liquid?o?"scroll":l?"auto":"hidden":"visible",d=e.key,f=eo(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:i.collapsibleWidth||void 0===s[d]?null:s[d],clientHeight:void 0!==a[d]?a[d]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return ln(r?"th":"td",{ref:n.elRef,role:"presentation"},ln("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},ln(Yi,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=function(e,t){for(let n of e)if(n.key===t)return n;return null}(this.props.sections,t);n&&Tr(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return io(this.props.cols)?$i(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=Pt(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},o={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let s=t.key,a=n.currentMap[s];if(a){let t=a.parentNode;i[s]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),o[s]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:o}}}ao.addStateEquality({scrollerClientWidths:Q,scrollerClientHeights:Q});class lo extends Sr{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&Fr(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:o}=i,s={event:new Pr(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&Gr(r,t),isStartResizable:!e.disableResizing&&Zr(r,t),isEndResizable:!e.disableResizing&&qr(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return ln(wi,Object.assign({},e,{elRef:this.handleEl,elClasses:[...Jr(s),...r.eventRange.ui.classNames,...e.elClasses||[]],renderProps:s,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Fr(this.el,this.props.seg)}}function co(e){return ln("div",{className:"fc-event-main-frame"},e.timeText&&ln("div",{className:"fc-event-time"},e.timeText),ln("div",{className:"fc-event-title-container"},ln("div",{className:"fc-event-title fc-sticky"},e.event.title||ln(dn,null," "))))}const uo=Me({day:"numeric"});class fo extends Sr{constructor(){super(...arguments),this.refineRenderProps=be(po)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return ln(wi,Object.assign({},e,{elClasses:[...xt(r,t.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":ge(e.date)}),renderProps:r,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount}))}}function ho(e){return Boolean(e.dayCellContent||_i("dayCellContent",e))}function po(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,o=Rt(t,e.todayRange,null,r),s=e.showDayNumber?n.format(t,i?e.monthStartFormat:uo):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},o),{isMonthStart:i,dayNumberText:s}),e.extraRenderProps)}function go(e){let{title:t}=e.event;return t&&ln("div",{className:"fc-event-title"},e.event.title)}function mo(e){return e.text}class vo extends Sr{constructor(){super(...arguments),this.state={titleId:m()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Tr(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=p(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return sr(ln("div",Object.assign({},n.extraAttrs,{id:n.id,className:i.join(" "),"aria-labelledby":r.titleId,ref:this.handleRootEl}),ln("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},ln("span",{className:"fc-popover-title",id:r.titleId},n.title),ln("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),ln("div",{className:"fc-popover-body "+e.getClass("popoverContent")},n.children)),n.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=function(e){let t=Ft(e),n=e.getBoundingClientRect();for(let e of t){let t=vt(n,e.getBoundingClientRect());if(!t)return null;n=t}return n}(t);if(i){let o=r.getBoundingClientRect(),s=n?l(t,".fc-scrollgrid").getBoundingClientRect().top:i.top,a=e?i.right-o.width:i.left;s=Math.max(s,10),a=Math.min(a,document.documentElement.clientWidth-10-o.width),a=Math.max(a,10);let c=r.offsetParent.getBoundingClientRect();f(r,{top:s-c.top,left:a-c.left})}}}class bo extends kr{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:o}=n,s=t.format(r,e.dayPopoverFormat);return ln(fo,{elRef:this.handleRootEl,date:r,dateProfile:o,todayRange:i},(t,r,i)=>ln(vo,{elRef:i.ref,id:n.id,title:s,extraClassNames:["fc-more-popover"].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},ho(e)&&ln(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children))}queryHit(e,t,n,r){let{rootEl:i,props:o}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:o.dateProfile,dateSpan:Object.assign({allDay:!o.forceTimed,range:{start:o.startDate,end:o.endDate}},o.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}}function Ao(e){return e.text}function yo(e){if(e.allDayDate)return{start:e.allDayDate,end:K(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:_o(t),end:(n=t,n.reduce(Do).eventRange.range.end)};var n}function _o(e){return e.reduce(Eo).eventRange.range.start}function Eo(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function Do(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}function Co(e){return[`fc-${e.type}-view`,"fc-view"]}const wo={id:String,defaultAllDay:Boolean,url:String,format:String,events:Ve,eventDataTransform:Ve,success:Ve,failure:Ve};function So(e,t,n=To(t)){let r;if("string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){let{refined:i,extra:o}=Le(r,n),s=function(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;t-=1){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:D(),sourceDefId:s.sourceDefId,meta:s.meta,ui:nt(i,t),extendedProps:o}}return null}function To(e){return Object.assign(Object.assign(Object.assign({},et),wo),e.pluginHooks.eventSourceRefiners)}class ko{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,t){let n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,n,{viewSpecs:r,toolbarConfig:i}=this.getCurrentData(),o=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(let e in r)o.push(e);for(t=0;t<o.length;t+=1)if(n=r[o[t]],n&&n.singleUnit===e)return n;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=N(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),Me(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),Me(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};let r=this.getCurrentData(),i=Kr(n,r.dateEnv,N({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),xr(i,null,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))}addEvent(e,t){if(e instanceof Pr){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:qe({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n,r=this.getCurrentData();if(t instanceof Hr)n=t.internalEventSource;else if("boolean"==typeof t)t&&([n]=W(r.eventSources));else if(null!=t){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;n=e.internalEventSource}let i=lt(e,n,r,!1);if(i){let e=new Pr(r,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:qe(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:Ur(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let o=n[i];if(o.publicId===e){if(o.recurringDef)return new Pr(t,o,null);for(let e in r){let n=r[e];if(n.defId===o.defId)return new Pr(t,o,n)}}}return null}getEvents(){let e=this.getCurrentData();return jr(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new Hr(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new Hr(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Hr)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=So(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new Hr(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=N(e);t&&this.trigger("_scrollRequest",{time:t})}}var Ro={__proto__:null,BASE_OPTION_DEFAULTS:Ne,identity:Ve,refineProps:Le,createEventInstance:We,parseEventDef:dt,refineEventDef:ct,parseBusinessHours:ht,padStart:k,isInt:x,parseFieldSpecs:C,compareByFieldSpecs:w,flexibleCompare:T,preventSelection:function(e){e.style.userSelect="none",e.style.webkitUserSelect="none",e.addEventListener("selectstart",v)},allowSelection:function(e){e.style.userSelect="",e.style.webkitUserSelect="",e.removeEventListener("selectstart",v)},preventContextMenu:function(e){e.addEventListener("contextmenu",v)},allowContextMenu:function(e){e.removeEventListener("contextmenu",v)},compareNumbers:function(e,t){return e-t},enableCursor:function(){document.body.classList.remove("fc-not-allowed")},disableCursor:function(){document.body.classList.add("fc-not-allowed")},guid:D,computeVisibleDayRange:gt,isMultiDayRange:function(e){let t=gt(e);return te(t.start,t.end)>1},diffDates:mt,removeExact:function(e,t){let n=0,r=0;for(;r<e.length;)e[r]===t?(e.splice(r,1),n+=1):r+=1;return n},isArraysEqual:$,memoize:ve,memoizeObjArg:be,memoizeArraylike:function(e,t,n){let r=[],i=[];return o=>{let s=r.length,a=o.length,l=0;for(;l<s;l+=1)if(o[l]){if(!$(r[l],o[l])){n&&n(i[l]);let r=e.apply(this,o[l]);t&&t(r,i[l])||(i[l]=r)}}else n&&n(i[l]);for(;l<a;l+=1)i[l]=e.apply(this,o[l]);return r=o,i.splice(a),i}},memoizeHashlike:function(e,t,n){let r={},i={};return o=>{let s={};for(let a in o)if(i[a])if($(r[a],o[a]))s[a]=i[a];else{n&&n(i[a]);let r=e.apply(this,o[a]);s[a]=t&&t(r,i[a])?i[a]:r}else s[a]=e.apply(this,o[a]);return r=o,i=s,s}},intersectRects:vt,pointInsideRect:function(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom},constrainPoint:function(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}},getRectCenter:function(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}},diffPoints:function(e,t){return{left:e.left-t.left,top:e.top-t.top}},translateRect:function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},mapHash:L,filterHash:F,isPropsEqual:Q,compareObjs:q,collectFromHash:J,findElements:u,findDirectChildren:function(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].children;for(let e=0;e<i.length;e+=1){let n=i[e];t&&!c(n,t)||r.push(n)}}return r},removeElement:a,applyStyle:f,elementMatches:c,elementClosest:l,getEventTargetViaRoot:p,getUniqueDomId:m,parseClassNames:Ke,getCanVGrowWithinCell:At,createEmptyEventStore:Je,mergeEventStores:$e,getRelevantEvents:Ye,eventTupleToStore:qe,combineEventUis:rt,createEventUi:nt,Splitter:class{constructor(){this.getKeysForEventDefs=ve(this._getKeysForEventDefs),this.splitDateSelection=ve(this._splitDateSpan),this.splitEventStore=ve(this._splitEventStore),this.splitIndividualUi=ve(this._splitIndividualUi),this.splitEventDrag=ve(this._splitInteraction),this.splitEventResize=ve(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,n),o=this.splitEventStore(e.eventStore,n),s=this.splitEventDrag(e.eventDrag),a=this.splitEventResize(e.eventResize),l={};this.eventUiBuilders=L(t,(e,t)=>this.eventUiBuilders[t]||ve(_t));for(let n in t){let c=t[n],u=o[n]||yt,d=this.eventUiBuilders[n];l[n]={businessHours:c.businessHours||e.businessHours,dateSelection:r[n]||null,eventStore:u,eventUiBases:d(e.eventUiBases[""],c.ui,i[n]),eventSelection:u.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[n]||null,eventResize:a[n]||null}}return l}_splitDateSpan(e){let t={};if(e){let n=this.getKeysForDateSpan(e);for(let r of n)t[r]=e}return t}_getKeysForEventDefs(e){return L(e.defs,e=>this.getKeysForEventDef(e))}_splitEventStore(e,t){let{defs:n,instances:r}=e,i={};for(let e in n)for(let r of t[e])i[r]||(i[r]={defs:{},instances:{}}),i[r].defs[e]=n[e];for(let e in r){let n=r[e];for(let r of t[n.defId])i[r]&&(i[r].instances[e]=n)}return i}_splitIndividualUi(e,t){let n={};for(let r in e)if(r)for(let i of t[r])n[i]||(n[i]={}),n[i][r]=e[r];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),o=r=>{t[r]||(t[r]={affectedEvents:n[r]||yt,mutatedEvents:i[r]||yt,isEvent:e.isEvent})};for(let e in n)o(e);for(let e in i)o(e)}return t}},getDayClassNames:xt,getDateMeta:Rt,getSlotClassNames:function(e,t){let n=["fc-slot","fc-slot-"+X[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n},buildNavLinkAttrs:It,preventDefault:v,whenTransitionDone:function(e,t){let n=r=>{t(r),A.forEach(t=>{e.removeEventListener(t,n)})};A.forEach(t=>{e.addEventListener(t,n)})},computeInnerRect:function(e,t=!1,n){let r=n?e.getBoundingClientRect():zt(e),i=jt(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o},computeEdges:jt,getClippingParents:Ft,computeRect:zt,unpromisify:Lt,Emitter:Vt,rangeContainsMarker:kt,intersectRanges:Ct,rangesEqual:wt,rangesIntersect:St,rangeContainsRange:Tt,PositionCache:class{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let t,{lefts:n,rights:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}topToIndex(e){let t,{tops:n,bottoms:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return Wt(this.tops||[],e.tops||[])&&Wt(this.bottoms||[],e.bottoms||[])&&Wt(this.lefts||[],e.lefts||[])&&Wt(this.rights||[],e.rights||[])}},ScrollController:Qt,ElementScrollController:class extends Qt{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}},WindowScrollController:class extends Qt{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}},Theme:Gt,ViewContextType:Dr,DateComponent:kr,DateProfileGenerator:Rr,isDateSpansEqual:function(e,t){return wt(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(let n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}(e,t)},addDays:K,startOfDay:oe,addMs:ee,addWeeks:function(e,t){let n=ue(e);return n[2]+=7*t,de(n)},diffWeeks:function(e,t){return te(e,t)/7},diffWholeWeeks:re,diffWholeDays:ie,diffDayAndTime:ne,diffDays:te,isValidDate:fe,createDuration:N,asCleanDays:function(e){return e.years||e.months||e.milliseconds?0:e.days},multiplyDuration:function(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}},addDurations:function(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}},asRoughMinutes:function(e){return P(e)/6e4},asRoughSeconds:function(e){return P(e)/1e3},asRoughMs:P,wholeDivideDurations:function(e,t){let n=null;for(let r=0;r<M.length;r+=1){let i=M[r];if(t[i]){let r=e[i]/t[i];if(!x(r)||null!==n&&n!==r)return null;n=r}else if(e[i])return null}return n},greatestDurationDenominator:U,DateEnv:ai,createFormatter:Me,formatIsoTimeString:function(e){return k(e.getUTCHours(),2)+":"+k(e.getUTCMinutes(),2)+":"+k(e.getUTCSeconds(),2)},formatDayString:ge,buildIsoString:pe,formatIsoMonthStr:function(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]},NamedTimeZoneImpl:class{constructor(e){this.timeZoneName=e}},parseMarker:si,SegHierarchy:class{constructor(e=(e=>e.thickness||1)){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){const r=Object.assign(Object.assign({},t),{span:ui(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;-1===t.lateral?(di(r,t.level,t.levelCoord),di(n,t.level,[e])):di(n[t.level],t.lateral,e),this.stackCnts[ci(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,o=t.length,s=0,a=-1,l=-1,c=null,u=0;for(let d=0;d<o;d+=1){const o=t[d];if(!r&&o>=s+this.getEntryThickness(e))break;let f,h=n[d],p=fi(h,e.span.start,li),g=p[0]+p[1];for(;(f=h[g])&&f.span.start<e.span.end;){let e=o+this.getEntryThickness(f);e>s&&(s=e,c=f,a=d,l=g),e===s&&(u=Math.max(u,i[ci(f)]+1)),g+=1}}let d=0;if(c)for(d=a+1;d<o&&t[d]<s;)d+=1;let f=-1;return d<o&&t[d]===s&&(f=fi(n[d],e.span.end,li)[0]),{touchingLevel:a,touchingLateral:l,touchingEntry:c,stackCnt:u,levelCoord:s,level:d,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],o=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:o}))}return r}},buildEntryKey:ci,getEntrySpanEnd:li,binarySearch:fi,groupIntersectingEntries:function(e){let t=[];for(let i of e){let e=[],o={span:i.span,entries:[i]};for(let i of t)ui(i.span,o.span)?o={entries:i.entries.concat(o.entries),span:(n=i.span,r=o.span,{start:Math.min(n.start,r.start),end:Math.max(n.end,r.end)})}:e.push(i);e.push(o),t=e}var n,r;return t},intersectSpans:ui,Interaction:hi,interactionSettingsToStore:function(e){return{[e.component.uid]:e}},interactionSettingsStore:pi,ElementDragging:class{constructor(e,t){this.emitter=new Vt}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}},config:{},parseDragMeta:function(e){let{refined:t,extra:n}=Le(e,gi);return{startTime:t.startTime||null,duration:t.duration||null,create:null==t.create||t.create,sourceId:t.sourceId,leftoverProps:n}},CalendarRoot:mi,DayHeader:class extends Sr{constructor(){super(...arguments),this.createDayHeaderFormatter=ve(Mi)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,o=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return ln(xi,{unit:"day"},(e,s)=>ln("tr",{role:"row"},i&&i("day"),t.map(e=>r?ln(Ti,{key:e.toISOString(),date:e,dateProfile:n,todayRange:s,colCnt:t.length,dayHeaderFormat:o}):ln(Ri,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:o}))))}},computeFallbackHeaderFormat:vi,TableDateCell:Ti,TableDowCell:Ri,DaySeriesModel:class{constructor(e,t){let n=e.start,{end:r}=e,i=[],o=[],s=-1;for(;n<r;)t.isHiddenDay(n)?i.push(s+.5):(s+=1,i.push(s),o.push(n)),n=K(n,1);this.dates=o,this.indices=i,this.cnt=o.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(K(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(te(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}},sliceEventStore:zr,hasBgRendering:function(e){return"background"===e.ui.display||"inverse-background"===e.ui.display},getElSeg:Lr,buildSegTimeText:Yr,sortEventSegs:function(e,t){let n=e.map(Qr);return n.sort((e,n)=>w(e,n,t)),n.map(e=>e._seg)},getSegMeta:function(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&kt(t,r.start)}},buildEventRangeKey:function(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`},getSegAnchorAttrs:$r,DayTableModel:class{constructor(e,t){let n,r,i,{dates:o}=e;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n+=1);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,o=e;for(;o<=i;){let s=Math.floor(o/t),a=Math.min((s+1)*t,i+1);r.push({row:s,firstCol:o%t,lastCol:(a-1)%t,isStart:n.isStart&&o===e,isEnd:n.isEnd&&a-1===i}),o=a}}return r}},Slicer:class{constructor(){this.sliceBusinessHours=ve(this._sliceBusinessHours),this.sliceDateSelection=ve(this._sliceDateSpan),this.sliceEventStore=ve(this._sliceEventStore),this.sliceEventDrag=ve(this._sliceInteraction),this.sliceEventResize=ve(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:o}=e,s=this.sliceEventStore(e.eventStore,o,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,o,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag(e.eventDrag,o,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,o,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:ee(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(Qe(e,Ii(t,Boolean(n)),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let o=zr(e,t,Ii(n,Boolean(r)),r);return{bg:this.sliceEventRanges(o.bg,i),fg:this.sliceEventRanges(o.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let o=zr(e.mutatedEvents,t,Ii(n,Boolean(r)),r);return{segs:this.sliceEventRanges(o.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...o){if(!e)return[];let s=Ii(t,Boolean(n)),a=Ct(e.range,s);if(a){let t=function(e,t,n){let r=ct({editable:!1},n),i=dt(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:Wr(i,t),instance:We(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e=Object.assign(Object.assign({},e),{range:a}),r,i),n=this.sliceRange(e.range,...o);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:K(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}},applyMutationToEventStore:Ir,isPropsValid:zi,isInteractionValid:function(e,t,n){let{instances:r}=e.mutatedEvents;for(let e in r)if(!Tt(t.validRange,r[e].range))return!1;return ji({eventDrag:e},n)},isDateSelectionValid:function(e,t,n){return!!Tt(t.validRange,e.range)&&ji({dateSelection:e},n)},requestJson:Gi,BaseComponent:Sr,setRef:Tr,DelayedRunner:Zi,SimpleScrollGrid:ao,hasShrinkWidth:io,renderMicroColGroup:no,getScrollGridClassNames:oo,getSectionClassNames:so,getSectionHasLiquidHeight:Xi,getAllowYScrolling:Ki,renderChunkContent:eo,computeShrinkWidth:$i,sanitizeShrinkWidth:ro,isColPropsEqual:to,renderScrollShim:function(e){return ln("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})},getStickyFooterScrollbar:function(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t},getStickyHeaderDates:function(e){let{stickyHeaderDates:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t},Scroller:Yi,getScrollbarWidths:Pt,RefMap:Ji,getIsRtlScrollbarOnLeft:Ht,NowTimer:xi,ScrollResponder:Er,StandardEvent:class extends Sr{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,o=Yr(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return ln(lo,Object.assign({},e,{elTag:"a",elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:$r(r,t),defaultGenerator:co,timeText:o}),(e,t)=>ln(dn,null,ln(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&ln("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&ln("div",{className:"fc-event-resizer fc-event-resizer-end"})))}},NowIndicatorContainer:e=>ln(Dr.Consumer,null,t=>{let{options:n}=t,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return ln(wi,Object.assign({},e,{elTag:e.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount}))}),DayCellContainer:fo,hasCustomDayCellContent:ho,EventContainer:lo,renderFill:function(e){return ln("div",{className:"fc-"+e})},BgEvent:class extends Sr{render(){let{props:e}=this,{seg:t}=e;return ln(lo,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:go,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}},WeekNumberContainer:e=>ln(Dr.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,o=r.weekNumberFormat||e.defaultFormat,s={num:n.computeWeekNumber(i),text:n.format(i,o),date:i};return ln(wi,Object.assign({},e,{renderProps:s,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:mo,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))}),MoreLinkContainer:class extends Sr{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:m()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Tr(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=yo(t).start;function o(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new Pr(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof r&&(r=r({date:i,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(o),hiddenSegs:t.hiddenSegs.map(o),jsEvent:e,view:n.viewApi})),r&&"popover"!==r?"string"==typeof r&&n.calendarApi.zoomTo(i,r):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return ln(Dr.Consumer,null,n=>{let{viewApi:r,options:i,calendarApi:o}=n,{moreLinkText:s}=i,{moreCnt:a}=e,l=yo(e),c="function"==typeof s?s.call(o,a):`+${a} ${s}`,u=R(i.moreLinkHint,[a],c),d={num:a,shortText:"+"+a,text:c,view:r};return ln(dn,null,Boolean(e.moreCnt)&&ln(wi,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),y(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:d,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||Ao,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&ln(bo,{id:t.popoverId,startDate:l.start,endDate:l.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=l(this.linkEl,".fc-view-harness"))}},computeEarliestSegStart:_o,ViewContainer:class extends Sr{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return ln(wi,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...Co(e.viewSpec),...e.elClasses||[]],renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount}),()=>e.children)}},triggerDateSelect:xr,getDefaultEventEnd:Mr,injectStyles:r,CalendarImpl:ko,EventImpl:Pr,buildEventApis:jr,buildElAttrs:Ei,ContentContainer:wi,CustomRenderingStore:class extends class{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}}};const xo=[],Oo={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Mo=Object.assign(Object.assign({},Oo),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":"This "+e},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function Io(e){let t=e.length>0?e[0].code:"en",n=xo.concat(e),r={en:Mo};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function No(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){let n=[].concat(e||[]),r=function(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split("-");for(let e=r.length;e>0;e-=1){let n=r.slice(0,e).join("-");if(t[n])return t[n]}}return null}(n,t)||Mo;return Bo(e,n,r)}(e,t):Bo(e.code,[e.code],e)}function Bo(e,t,n){let r=z([Oo,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Ho(e){return{id:D(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function Po(){let e,t=[],n=[];return(r,i)=>(e&&$(r,t)&&$(i,n)||(e=function(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let s of e){const e=s.name,a=n[e];void 0===a?(n[e]=s.id,i(s.deps),o=s,r={premiumReleaseDate:Uo((t=r).premiumReleaseDate,o.premiumReleaseDate),reducers:t.reducers.concat(o.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(o.isLoadingFuncs),contextInit:t.contextInit.concat(o.contextInit),eventRefiners:Object.assign(Object.assign({},t.eventRefiners),o.eventRefiners),eventDefMemberAdders:t.eventDefMemberAdders.concat(o.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},t.eventSourceRefiners),o.eventSourceRefiners),isDraggableTransformers:t.isDraggableTransformers.concat(o.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(o.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(o.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(o.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(o.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(o.dateSpanTransforms),views:Object.assign(Object.assign({},t.views),o.views),viewPropsTransformers:t.viewPropsTransformers.concat(o.viewPropsTransformers),isPropsValid:o.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(o.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(o.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(o.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(o.calendarInteractions),componentInteractions:t.componentInteractions.concat(o.componentInteractions),themeClasses:Object.assign(Object.assign({},t.themeClasses),o.themeClasses),eventSourceDefs:t.eventSourceDefs.concat(o.eventSourceDefs),cmdFormatter:o.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(o.recurringTypes),namedTimeZonedImpl:o.namedTimeZonedImpl||t.namedTimeZonedImpl,initialView:t.initialView||o.initialView,elementDraggingImpl:t.elementDraggingImpl||o.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},t.optionChangeHandlers),o.optionChangeHandlers),scrollGridImpl:o.scrollGridImpl||t.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},t.listenerRefiners),o.listenerRefiners),optionRefiners:Object.assign(Object.assign({},t.optionRefiners),o.optionRefiners),propSetHandlers:Object.assign(Object.assign({},t.propSetHandlers),o.propSetHandlers)}):a!==s.id&&console.warn(`Duplicate plugin '${e}'`)}var t,o}return e&&i(e),i(t),r}(r,i)),t=r,n=i,e)}function Uo(e,t){return void 0===e?t:void 0===t?e:new Date(Math.max(e.valueOf(),t.valueOf()))}class jo extends Gt{}function zo(e,t,n,r){if(t[e])return t[e];let i=function(e,t,n,r){let i=n[e],o=r[e],s=e=>i&&null!==i[e]?i[e]:o&&null!==o[e]?o[e]:null,a=s("component"),l=s("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=zo(l,t,n,r)}!a&&c&&(a=c.component);if(!a)return null;return{type:e,component:a,defaults:Object.assign(Object.assign({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),o?o.rawOptions:{})}}(e,t,n,r);return i&&(t[e]=i),i}function Fo(e){return L(e,Lo)}function Lo(e){let t="function"==typeof e?{component:e}:e,{component:n}=t;return t.content?n=Vo(t):!n||n.prototype instanceof Sr||(n=Vo(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function Vo(e){return t=>ln(Dr.Consumer,null,n=>ln(wi,{elTag:"div",elClasses:Co(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function Wo(e,t,n,r){let i=Fo(e),o=Fo(t.views);return L(function(e,t){let n,r={};for(n in e)zo(n,r,e,t);for(n in t)zo(n,r,e,t);return r}(i,o),e=>function(e,t,n,r,i){let o=e.overrides.duration||e.defaults.duration||r.duration||n.duration,s=null,a="",l="",c={};if(o&&(s=function(e){let t=JSON.stringify(e),n=Qo[t];void 0===n&&(n=N(e),Qo[t]=n);return n}(o),s)){let e=U(s);a=e.unit,1===e.value&&(l=a,c=t[a]?t[a].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:s,durationUnit:a,singleUnit:l,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},c),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u(Ne)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d(Ne)}}(e,o,t,n,r))}jo.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},jo.prototype.baseIconClass="fc-icon",jo.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},jo.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},jo.prototype.iconOverrideOption="buttonIcons",jo.prototype.iconOverrideCustomButtonOption="icon",jo.prototype.iconOverridePrefix="fc-icon-";let Qo={};function Go(e,t,n){let r=t?t.activeRange:null;return Yo({},function(e,t){let n=To(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents);e.events&&r.unshift(e.events);for(let e of r){let r=So(e,t,n);r&&i.push(r)}return i}(e,n),r,n)}function Zo(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return Yo(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return o=e,s=t.sourceId,F(o,e=>e.sourceId!==s);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Jo(e,i,r):e;case"FETCH_EVENT_SOURCES":return $o(e,t.sourceIds?V(t.sourceIds):Ko(e,r),i,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){let i=e[t];if(i&&n===i.latestFetchId)return Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})});return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var o,s}function qo(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function Yo(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=Jo(i,n,r)),Object.assign(Object.assign({},e),i)}function Jo(e,t,n){return $o(e,F(e,e=>function(e,t,n){if(!es(e,n))return!e.latestFetchId;return!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end}(e,t,n)),t,!1,n)}function $o(e,t,n,r,i){let o={};for(let s in e){let a=e[s];t[s]?o[s]=Xo(a,n,r,i):o[s]=a}return o}function Xo(e,t,n,r){let{options:i,calendarApi:o}=r,s=r.pluginHooks.eventSourceDefs[e.sourceDefId],a=D();return s.fetch({eventSource:e,range:t,isRefetch:n,context:r},n=>{let{rawEvents:s}=n;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,n.response)||s),e.success&&(s=e.success.call(o,s,n.response)||s),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})},n=>{let s=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(o,n),s=!0),e.failure&&(e.failure(n),s=!0),s||console.warn(n.message,n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:n})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:a})}function Ko(e,t){return F(e,e=>es(e,t))}function es(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function ts(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function ns(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function rs(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function is(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function os(e,t,n,r,i){return{header:e.headerToolbar?ss(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?ss(e.footerToolbar,e,t,n,r,i):null}}function ss(e,t,n,r,i,o){let s={},a=[],l=!1;for(let c in e){let u=as(e[c],t,n,r,i,o);s[c]=u.widgets,a.push(...u.viewsWithButtons),l=l||u.hasTitle}return{sectionWidgets:s,viewsWithButtons:a,hasTitle:l}}function as(e,t,n,r,i,o){let s="rtl"===t.direction,a=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(" "):[],h=[],p=!1;return{widgets:f.map(e=>e.split(",").map(e=>{if("title"===e)return p=!0,{buttonName:e};let n,f,g,m,v,b;if(n=a[e])g=e=>{n.click&&n.click.call(e.target,e,e.target)},(m=r.getCustomButtonIconClass(n))||(m=r.getIconClass(e,s))||(v=n.text),b=n.hint||n.text;else if(f=i[e]){h.push(e),g=()=>{o.changeView(e)},(v=f.buttonTextOverride)||(m=r.getIconClass(e,s))||(v=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;b=R(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(o[e])if(g=()=>{o[e]()},(v=l[e])||(m=r.getIconClass(e,s))||(v=c[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";b=R(u[t]||d[t],[c.year||"year","year"],c[e])}else b=t=>R(u[e]||d[e],[c[t]||t,t],c[e]);return{buttonName:e,buttonClick:g,buttonIcon:m,buttonText:v,buttonHint:b}})),viewsWithButtons:h,hasTitle:p}}class ls{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}function cs(e,t){let n=W(t.getCurrentData().eventSources);if(1===n.length&&1===e.length&&Array.isArray(n[0]._raw)&&Array.isArray(e[0]))return void t.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:e[0]});let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}const us=[Ho({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),Ho({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"==typeof e.events?e.events:null,fetch(e,t,n){const{dateEnv:r}=e.context;Lt(e.eventSource.meta.bind(null,ei(e.range,r)),e=>t({rawEvents:e}),n)}}]}),Ho({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:Ve,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,n){const{meta:r}=e.eventSource,i=function(e,t,n){let r,i,o,s,{dateEnv:a,options:l}=n,c={};r=e.startParam,null==r&&(r=l.startParam);i=e.endParam,null==i&&(i=l.endParam);o=e.timeZoneParam,null==o&&(o=l.timeZoneParam);s="function"==typeof e.extraParams?e.extraParams():e.extraParams||{};Object.assign(c,s),c[r]=a.formatIso(t.start),c[i]=a.formatIso(t.end),"local"!==a.timeZone&&(c[o]=a.timeZone);return c}(r,e.range,e.context);Gi(r.method,r.url,i).then(([e,n])=>{t({rawEvents:e,response:n})},n)}}]}),Ho({name:"simple-recurring-event",recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let i,o={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t};return e.duration&&(i=e.duration),!i&&e.startTime&&e.endTime&&(n=e.endTime,r=e.startTime,i={years:n.years-r.years,months:n.months-r.months,days:n.days-r.days,milliseconds:n.milliseconds-r.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:i,typeData:o}}var n,r;return null},expand(e,t,n){let r=Ct(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r,i){let o=e?V(e):null,s=oe(i.start),a=i.end,l=[];for(;s<a;){let e;o&&!o[s.getUTCDay()]||(e=t?r.add(s,t):s,l.push(r.createMarker(n.toDate(e)))),s=K(s,1)}return l}(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:Ve,startTime:N,endTime:N,duration:N,startRecur:Ve,endRecur:Ve}}),Ho({name:"change-handler",optionChangeHandlers:{events(e,t){cs([e],t)},eventSources:cs}}),Ho({name:"misc",isLoadingFuncs:[e=>qo(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},ei(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",jr(e,t))}}})];class ds{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Zi(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,n=[];for(;t=e.shift();)this.runTask(t),n.push(t);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function fs(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Me(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let n=ie(e.currentRange.start,e.currentRange.end);if(null!==n&&n>1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class hs{constructor(){this.resetListeners=new Set}handleInput(e,t){const n=this.dateEnv;if(e!==n&&("function"==typeof t?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(const e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}}class ps{constructor(e){this.computeCurrentViewData=ve(this._computeCurrentViewData),this.organizeRawLocales=ve(Io),this.buildLocale=ve(No),this.buildPluginHooks=Po(),this.buildDateEnv=ve(gs),this.buildTheme=ve(ms),this.parseToolbars=ve(os),this.buildViewSpecs=ve(Wo),this.buildDateProfileGenerator=be(vs),this.buildViewApi=ve(bs),this.buildViewUiProps=be(_s),this.buildEventUiBySource=ve(As,Q),this.buildEventUiBases=ve(ys),this.parseContextBusinessHours=be(Ds),this.buildTitle=ve(fs),this.nowManager=new hs,this.emitter=new Vt,this.actionRunner=new ds(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new hs;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let o={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},s=function(e,t,n){let r=e.initialDate;return null!=r?t.createMarker(r):n.getDateMarker()}(n.calendarOptions,n.dateEnv,this.nowManager),a=i.dateProfileGenerator.build(s);kt(a.activeRange,s)||(s=a.currentRange.start);for(let e of n.pluginHooks.contextInit)e(o);let l=Go(n.calendarOptions,a,o),c={dynamicOptionOverrides:t,currentViewType:r,currentDate:s,dateProfile:a,businessHours:this.parseContextBusinessHours(o),eventSources:l,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(o).selectionConfig},u=Object.assign(Object.assign({},o),c);for(let e of n.pluginHooks.reducers)Object.assign(c,e(null,null,u));Es(c,o)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;void 0===t?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=function(e,t){switch(t.type){case"SET_OPTION":return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}(n.dynamicOptionOverrides,e),o=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),s=function(e,t){switch(t.type){case"CHANGE_VIEW_TYPE":e=t.viewType}return e}(n.currentViewType,e),a=this.computeCurrentViewData(s,o,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(a.options);let l={nowManager:this.nowManager,dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==a.dateProfileGenerator&&(u=a.dateProfileGenerator.build(c)),c=function(e,t){switch(t.type){case"CHANGE_DATE":return t.dateMarker;default:return e}}(c,e),u=function(e,t,n,r){let i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(i=r.buildPrev(e,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(e,n),i.isValid)return i}return e}(u,e,c,a.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&kt(u.currentRange,c)||(c=u.currentRange.start);let d=Zo(n.eventSources,e,u,l),f=Ni(n.eventStore,e,d,u,l),h=qo(d)&&!a.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:p,selectionConfig:g}=this.buildViewUiProps(l),m=this.buildEventUiBySource(d),v={dynamicOptionOverrides:i,currentViewType:s,currentDate:c,dateProfile:u,eventSources:d,eventStore:f,renderableEventStore:h,selectionConfig:g,eventUiBases:this.buildEventUiBases(h.defs,p,m),businessHours:this.parseContextBusinessHours(l),dateSelection:ts(n.dateSelection,e),eventSelection:ns(n.eventSelection,e),eventDrag:rs(n.eventDrag,e),eventResize:is(n.eventResize,e)},b=Object.assign(Object.assign({},l),v);for(let t of o.pluginHooks.reducers)Object.assign(v,t(n,e,b));let A=Es(n,l),y=Es(v,l);!A&&y?r.trigger("loading",!0):A&&!y&&r.trigger("loading",!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),o=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),s=r.pluginHooks.optionChangeHandlers,a=n&&n.calendarOptions,l=r.calendarOptions;if(a&&a!==l){a.timeZone!==l.timeZone&&(t.eventSources=o.eventSources=function(e,t,n){let r=t?t.activeRange:null;return $o(e,Ko(e,n),r,!0,n)}(o.eventSources,t.dateProfile,o),t.eventStore=o.eventStore=Pi(o.eventStore,n.dateEnv,o.dateEnv),t.renderableEventStore=o.renderableEventStore=Pi(o.renderableEventStore,n.dateEnv,o.dateEnv));for(let e in s)-1===this.optionsForHandling.indexOf(e)&&a[e]===l[e]||s[e](l[e],o)}this.optionsForHandling=[],e.onData&&e.onData(o)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:o,availableLocaleData:s,extra:a}=this.processRawCalendarOptions(e,t);Cs(a);let l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,s,r.defaultRangeSeparator),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,o),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,c,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:l,viewSpecs:c,theme:u,toolbarConfig:d,localeDefaults:o,availableRawLocales:s.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=Fe([Ne,e,t]),i=this.organizeRawLocales(n),o=i.map,s=this.buildLocale(r||i.defaultCode,o).options,a=this.buildPluginHooks(e.plugins||[],us),l=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ie),Be),He),a.listenerRefiners),a.optionRefiners),c={},u=Fe([Ne,s,e,t]),d={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,p=!1;for(let e in u)-1===this.optionsForRefining.indexOf(e)&&(u[e]===f[e]||Pe[e]&&e in f&&Pe[e](f[e],u[e]))?d[e]=h[e]:l[e]?(d[e]=l[e](u[e]),p=!0):c[e]=f[e];return p&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:a,availableLocaleData:i,localeDefaults:s,extra:c}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:o,extra:s}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return Cs(s),this.nowManager.handleInput(t.dateEnv,o.now),{viewSpec:i,options:o,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,showNonCurrentDates:o.showNonCurrentDates,dayCount:o.dayCount,dateAlignment:o.dateAlignment,dateIncrement:o.dateIncrement,hiddenDays:o.hiddenDays,weekends:o.weekends,validRangeInput:o.validRange,visibleRangeInput:o.visibleRange,fixedWeekCount:o.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let o=Fe([Ne,e.optionDefaults,n,r,e.optionOverrides,i]),s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ie),Be),He),ze),t.listenerRefiners),t.optionRefiners),a={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,u=!1,d={};for(let e in o)o[e]===l[e]||Pe[e]&&Pe[e](o[e],l[e])?a[e]=c[e]:(o[e]===this.currentCalendarOptionsInput[e]||Pe[e]&&Pe[e](o[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(a[e]=this.currentCalendarOptionsRefined[e]):s[e]?a[e]=s[e](o[e]):d[e]=o[e],u=!0);return u&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=a),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}}function gs(e,t,n,r,i,o,s,a){let l=No(t||s.defaultCode,s.map);return new ai({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:a})}function ms(e,t){return new(t.themeClasses[e.themeSystem]||jo)(e)}function vs(e){return new(e.dateProfileGeneratorClass||Rr)(e)}function bs(e,t,n){return new ls(e,t,n)}function As(e){return L(e,e=>e.ui)}function ys(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function _s(e){let{options:t}=e;return{eventUiSingleBase:nt({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:nt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Es(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function Ds(e){return ht(e.options.businessHours,e)}function Cs(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:""))}class ws extends Sr{render(){return ln("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map(e=>this.renderWidgetGroup(e)))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let o of e){let{buttonName:e,buttonClick:s,buttonText:a,buttonIcon:l,buttonHint:c}=o;if("title"===e)i=!1,r.push(ln("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let i=e===t.activeButton,o=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,u=[`fc-${e}-button`,n.getClass("button")];i&&u.push(n.getClass("buttonActive")),r.push(ln("button",{type:"button",title:"function"==typeof c?c(t.navUnit):c,disabled:o,"aria-pressed":i,className:u.join(" "),onClick:s},a||(l?ln("span",{className:l,role:"img"}):"")))}}if(r.length>1){return ln("div",{className:i&&n.getClass("buttonGroup")||""},...r)}return r[0]}}class Ss extends Sr{render(){let e,t,{model:n,extraClassName:r}=this.props,i=!1,o=n.sectionWidgets,s=o.center;return o.left?(i=!0,e=o.left):e=o.start,o.right?(i=!0,t=o.right):t=o.end,ln("div",{className:[r||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:n}=this;return ln(ws,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}}class Ts extends Sr{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Tr(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",ln("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class ks extends hi{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=Lr(t);if(i&&n.isValidSegDownEl(e.target)){let o=l(e.target,".fc-event-forced-url"),s=o?o.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:t,event:new Pr(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},this.destroy=b(e.el,"click",".fc-event",this.handleSegClick)}}class Rs extends hi{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{Lr(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,n,r){let i;return b(e,"mouseover",t,(e,t)=>{if(t!==i){i=t,n(e,t);let o=e=>{i=null,r(e,t),t.removeEventListener("mouseleave",o)};t.addEventListener("mouseleave",o)}})}(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,o=Lr(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Pr(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})}}class xs extends wr{constructor(){super(...arguments),this.buildViewContext=ve(Cr),this.buildViewPropTransformers=ve(Ms),this.buildToolbarProps=ve(Os),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:m()},this.registerInteractiveComponent=(e,t)=>{let n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),r=[ks,Rs].concat(this.props.pluginHooks.componentInteractions).map(e=>new e(n));this.interactionsStore[e.uid]=r,pi[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete pi[e.uid]},this.resizeRunner=new Zi(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:n,options:r}=t,i=!1,o="";t.isHeightAuto||t.forPrint?o="":null!=r.height?i=!0:null!=r.contentHeight?o=r.contentHeight:e=Math.max(r.aspectRatio,.5);let s=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.nowManager,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),a=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return ln(Dr.Provider,{value:s},ln(xi,{unit:"day"},r=>{let s=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,r,t.viewTitle);return ln(dn,null,n.header&&ln(Ss,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:a},s)),ln(Ts,{liquid:i,height:o,aspectRatio:e,labeledById:a},this.renderView(t),this.buildAppendContent()),n.footer&&ln(Ss,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},s)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(t=>new t(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return ln(dn,{},...e.pluginHooks.viewContainerAppends.map(t=>t(e)))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));return ln(n.component,Object.assign({},r))}}function Os(e,t,n,r,i,o){let s=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:s.isValid&&!kt(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function Ms(e){return e.map(e=>new e)}function Is(e){let t=No(e.locale||"en",Io([]).map);return new ai(Object.assign(Object.assign({timeZone:Ne.timeZone,calendarSystem:"gregory"},e),{locale:t}))}return e.Calendar=class extends ko{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;br(()=>{In(ln(mi,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),ln(Ci.Provider,{value:this.customContentRenderId},ln(xs,Object.assign({isHeightAuto:r,forPrint:i},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,In(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&e.getRootNode&&i(e.getRootNode())}(e),this.el=e,this.renderRunner=new Zi(this.handleRenderRequest),new ps({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){br(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!$(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){h(this.el,"height",e)}},e.Internal=Ro,e.JsonRequestError=Qi,e.Preact=_r,e.createPlugin=Ho,e.formatDate=function(e,t={}){let n=Is(t),r=Me(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatRange=function(e,t,n){let r=Is("object"==typeof n&&n?n:{}),i=Me(n),o=r.createMarkerMeta(e),s=r.createMarkerMeta(t);return o&&s?r.formatRange(o.marker,s.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:Ne.defaultRangeSeparator}):""},e.globalLocales=xo,e.globalPlugins=us,e.sliceEvents=function(e,t){return zr(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.version="6.1.17",Object.defineProperty(e,"__esModule",{value:!0}),e}({}); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales-all.global.js b/public/js/fullcalendar/packages/core/locales-all.global.js new file mode 100644 index 0000000..fcdb033 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales-all.global.js | |||
@@ -0,0 +1,1933 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var l0 = { | ||
10 | code: 'af', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Vorige', | ||
17 | next: 'Volgende', | ||
18 | today: 'Vandag', | ||
19 | year: 'Jaar', | ||
20 | month: 'Maand', | ||
21 | week: 'Week', | ||
22 | day: 'Dag', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | allDayText: 'Heeldag', | ||
26 | moreLinkText: 'Addisionele', | ||
27 | noEventsText: 'Daar is geen gebeurtenisse nie', | ||
28 | }; | ||
29 | |||
30 | var l1 = { | ||
31 | code: 'ar-dz', | ||
32 | week: { | ||
33 | dow: 0, | ||
34 | doy: 4, // The week that contains Jan 1st is the first week of the year. | ||
35 | }, | ||
36 | direction: 'rtl', | ||
37 | buttonText: { | ||
38 | prev: 'السابق', | ||
39 | next: 'التالي', | ||
40 | today: 'اليوم', | ||
41 | year: 'سنة', | ||
42 | month: 'شهر', | ||
43 | week: 'أسبوع', | ||
44 | day: 'يوم', | ||
45 | list: 'أجندة', | ||
46 | }, | ||
47 | weekText: 'أسبوع', | ||
48 | allDayText: 'اليوم كله', | ||
49 | moreLinkText: 'أخرى', | ||
50 | noEventsText: 'أي أحداث لعرض', | ||
51 | }; | ||
52 | |||
53 | var l2 = { | ||
54 | code: 'ar-kw', | ||
55 | week: { | ||
56 | dow: 0, | ||
57 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
58 | }, | ||
59 | direction: 'rtl', | ||
60 | buttonText: { | ||
61 | prev: 'السابق', | ||
62 | next: 'التالي', | ||
63 | today: 'اليوم', | ||
64 | year: 'سنة', | ||
65 | month: 'شهر', | ||
66 | week: 'أسبوع', | ||
67 | day: 'يوم', | ||
68 | list: 'أجندة', | ||
69 | }, | ||
70 | weekText: 'أسبوع', | ||
71 | allDayText: 'اليوم كله', | ||
72 | moreLinkText: 'أخرى', | ||
73 | noEventsText: 'أي أحداث لعرض', | ||
74 | }; | ||
75 | |||
76 | var l3 = { | ||
77 | code: 'ar-ly', | ||
78 | week: { | ||
79 | dow: 6, | ||
80 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
81 | }, | ||
82 | direction: 'rtl', | ||
83 | buttonText: { | ||
84 | prev: 'السابق', | ||
85 | next: 'التالي', | ||
86 | today: 'اليوم', | ||
87 | year: 'سنة', | ||
88 | month: 'شهر', | ||
89 | week: 'أسبوع', | ||
90 | day: 'يوم', | ||
91 | list: 'أجندة', | ||
92 | }, | ||
93 | weekText: 'أسبوع', | ||
94 | allDayText: 'اليوم كله', | ||
95 | moreLinkText: 'أخرى', | ||
96 | noEventsText: 'أي أحداث لعرض', | ||
97 | }; | ||
98 | |||
99 | var l4 = { | ||
100 | code: 'ar-ma', | ||
101 | week: { | ||
102 | dow: 6, | ||
103 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
104 | }, | ||
105 | direction: 'rtl', | ||
106 | buttonText: { | ||
107 | prev: 'السابق', | ||
108 | next: 'التالي', | ||
109 | today: 'اليوم', | ||
110 | year: 'سنة', | ||
111 | month: 'شهر', | ||
112 | week: 'أسبوع', | ||
113 | day: 'يوم', | ||
114 | list: 'أجندة', | ||
115 | }, | ||
116 | weekText: 'أسبوع', | ||
117 | allDayText: 'اليوم كله', | ||
118 | moreLinkText: 'أخرى', | ||
119 | noEventsText: 'أي أحداث لعرض', | ||
120 | }; | ||
121 | |||
122 | var l5 = { | ||
123 | code: 'ar-sa', | ||
124 | week: { | ||
125 | dow: 0, | ||
126 | doy: 6, // The week that contains Jan 1st is the first week of the year. | ||
127 | }, | ||
128 | direction: 'rtl', | ||
129 | buttonText: { | ||
130 | prev: 'السابق', | ||
131 | next: 'التالي', | ||
132 | today: 'اليوم', | ||
133 | year: 'سنة', | ||
134 | month: 'شهر', | ||
135 | week: 'أسبوع', | ||
136 | day: 'يوم', | ||
137 | list: 'أجندة', | ||
138 | }, | ||
139 | weekText: 'أسبوع', | ||
140 | allDayText: 'اليوم كله', | ||
141 | moreLinkText: 'أخرى', | ||
142 | noEventsText: 'أي أحداث لعرض', | ||
143 | }; | ||
144 | |||
145 | var l6 = { | ||
146 | code: 'ar-tn', | ||
147 | week: { | ||
148 | dow: 1, | ||
149 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
150 | }, | ||
151 | direction: 'rtl', | ||
152 | buttonText: { | ||
153 | prev: 'السابق', | ||
154 | next: 'التالي', | ||
155 | today: 'اليوم', | ||
156 | year: 'سنة', | ||
157 | month: 'شهر', | ||
158 | week: 'أسبوع', | ||
159 | day: 'يوم', | ||
160 | list: 'أجندة', | ||
161 | }, | ||
162 | weekText: 'أسبوع', | ||
163 | allDayText: 'اليوم كله', | ||
164 | moreLinkText: 'أخرى', | ||
165 | noEventsText: 'أي أحداث لعرض', | ||
166 | }; | ||
167 | |||
168 | var l7 = { | ||
169 | code: 'ar', | ||
170 | week: { | ||
171 | dow: 6, | ||
172 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
173 | }, | ||
174 | direction: 'rtl', | ||
175 | buttonText: { | ||
176 | prev: 'السابق', | ||
177 | next: 'التالي', | ||
178 | today: 'اليوم', | ||
179 | year: 'سنة', | ||
180 | month: 'شهر', | ||
181 | week: 'أسبوع', | ||
182 | day: 'يوم', | ||
183 | list: 'أجندة', | ||
184 | }, | ||
185 | weekText: 'أسبوع', | ||
186 | allDayText: 'اليوم كله', | ||
187 | moreLinkText: 'أخرى', | ||
188 | noEventsText: 'أي أحداث لعرض', | ||
189 | }; | ||
190 | |||
191 | var l8 = { | ||
192 | code: 'az', | ||
193 | week: { | ||
194 | dow: 1, | ||
195 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
196 | }, | ||
197 | buttonText: { | ||
198 | prev: 'Əvvəl', | ||
199 | next: 'Sonra', | ||
200 | today: 'Bu Gün', | ||
201 | year: 'Il', | ||
202 | month: 'Ay', | ||
203 | week: 'Həftə', | ||
204 | day: 'Gün', | ||
205 | list: 'Gündəm', | ||
206 | }, | ||
207 | weekText: 'Həftə', | ||
208 | allDayText: 'Bütün Gün', | ||
209 | moreLinkText(n) { | ||
210 | return '+ daha çox ' + n; | ||
211 | }, | ||
212 | noEventsText: 'Göstərmək üçün hadisə yoxdur', | ||
213 | }; | ||
214 | |||
215 | var l9 = { | ||
216 | code: 'bg', | ||
217 | week: { | ||
218 | dow: 1, | ||
219 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
220 | }, | ||
221 | buttonText: { | ||
222 | prev: 'назад', | ||
223 | next: 'напред', | ||
224 | today: 'днес', | ||
225 | year: 'година', | ||
226 | month: 'Месец', | ||
227 | week: 'Седмица', | ||
228 | day: 'Ден', | ||
229 | list: 'График', | ||
230 | }, | ||
231 | allDayText: 'Цял ден', | ||
232 | moreLinkText(n) { | ||
233 | return '+още ' + n; | ||
234 | }, | ||
235 | noEventsText: 'Няма събития за показване', | ||
236 | }; | ||
237 | |||
238 | var l10 = { | ||
239 | code: 'bn', | ||
240 | week: { | ||
241 | dow: 0, | ||
242 | doy: 6, // The week that contains Jan 1st is the first week of the year. | ||
243 | }, | ||
244 | buttonText: { | ||
245 | prev: 'পেছনে', | ||
246 | next: 'সামনে', | ||
247 | today: 'আজ', | ||
248 | year: 'বছর', | ||
249 | month: 'মাস', | ||
250 | week: 'সপ্তাহ', | ||
251 | day: 'দিন', | ||
252 | list: 'তালিকা', | ||
253 | }, | ||
254 | weekText: 'সপ্তাহ', | ||
255 | allDayText: 'সারাদিন', | ||
256 | moreLinkText(n) { | ||
257 | return '+অন্যান্য ' + n; | ||
258 | }, | ||
259 | noEventsText: 'কোনো ইভেন্ট নেই', | ||
260 | }; | ||
261 | |||
262 | var l11 = { | ||
263 | code: 'bs', | ||
264 | week: { | ||
265 | dow: 1, | ||
266 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
267 | }, | ||
268 | buttonText: { | ||
269 | prev: 'Prošli', | ||
270 | next: 'Sljedeći', | ||
271 | today: 'Danas', | ||
272 | year: 'Godina', | ||
273 | month: 'Mjesec', | ||
274 | week: 'Sedmica', | ||
275 | day: 'Dan', | ||
276 | list: 'Raspored', | ||
277 | }, | ||
278 | weekText: 'Sed', | ||
279 | allDayText: 'Cijeli dan', | ||
280 | moreLinkText(n) { | ||
281 | return '+ još ' + n; | ||
282 | }, | ||
283 | noEventsText: 'Nema događaja za prikazivanje', | ||
284 | }; | ||
285 | |||
286 | var l12 = { | ||
287 | code: 'ca', | ||
288 | week: { | ||
289 | dow: 1, | ||
290 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
291 | }, | ||
292 | buttonText: { | ||
293 | prev: 'Anterior', | ||
294 | next: 'Següent', | ||
295 | today: 'Avui', | ||
296 | year: 'Any', | ||
297 | month: 'Mes', | ||
298 | week: 'Setmana', | ||
299 | day: 'Dia', | ||
300 | list: 'Agenda', | ||
301 | }, | ||
302 | weekText: 'Set', | ||
303 | allDayText: 'Tot el dia', | ||
304 | moreLinkText: 'més', | ||
305 | noEventsText: 'No hi ha esdeveniments per mostrar', | ||
306 | }; | ||
307 | |||
308 | var l13 = { | ||
309 | code: 'cs', | ||
310 | week: { | ||
311 | dow: 1, | ||
312 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
313 | }, | ||
314 | buttonText: { | ||
315 | prev: 'Dříve', | ||
316 | next: 'Později', | ||
317 | today: 'Nyní', | ||
318 | year: 'Rok', | ||
319 | month: 'Měsíc', | ||
320 | week: 'Týden', | ||
321 | day: 'Den', | ||
322 | list: 'Agenda', | ||
323 | }, | ||
324 | weekText: 'Týd', | ||
325 | allDayText: 'Celý den', | ||
326 | moreLinkText(n) { | ||
327 | return '+další: ' + n; | ||
328 | }, | ||
329 | noEventsText: 'Žádné akce k zobrazení', | ||
330 | }; | ||
331 | |||
332 | var l14 = { | ||
333 | code: 'cy', | ||
334 | week: { | ||
335 | dow: 1, | ||
336 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
337 | }, | ||
338 | buttonText: { | ||
339 | prev: 'Blaenorol', | ||
340 | next: 'Nesaf', | ||
341 | today: 'Heddiw', | ||
342 | year: 'Blwyddyn', | ||
343 | month: 'Mis', | ||
344 | week: 'Wythnos', | ||
345 | day: 'Dydd', | ||
346 | list: 'Rhestr', | ||
347 | }, | ||
348 | weekText: 'Wythnos', | ||
349 | allDayText: 'Trwy\'r dydd', | ||
350 | moreLinkText: 'Mwy', | ||
351 | noEventsText: 'Dim digwyddiadau', | ||
352 | }; | ||
353 | |||
354 | var l15 = { | ||
355 | code: 'da', | ||
356 | week: { | ||
357 | dow: 1, | ||
358 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
359 | }, | ||
360 | buttonText: { | ||
361 | prev: 'Forrige', | ||
362 | next: 'Næste', | ||
363 | today: 'I dag', | ||
364 | year: 'År', | ||
365 | month: 'Måned', | ||
366 | week: 'Uge', | ||
367 | day: 'Dag', | ||
368 | list: 'Agenda', | ||
369 | }, | ||
370 | weekText: 'Uge', | ||
371 | allDayText: 'Hele dagen', | ||
372 | moreLinkText: 'flere', | ||
373 | noEventsText: 'Ingen arrangementer at vise', | ||
374 | }; | ||
375 | |||
376 | function affix$1(buttonText) { | ||
377 | return (buttonText === 'Tag' || buttonText === 'Monat') ? 'r' : | ||
378 | buttonText === 'Jahr' ? 's' : ''; | ||
379 | } | ||
380 | var l16 = { | ||
381 | code: 'de-at', | ||
382 | week: { | ||
383 | dow: 1, | ||
384 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
385 | }, | ||
386 | buttonText: { | ||
387 | prev: 'Zurück', | ||
388 | next: 'Vor', | ||
389 | today: 'Heute', | ||
390 | year: 'Jahr', | ||
391 | month: 'Monat', | ||
392 | week: 'Woche', | ||
393 | day: 'Tag', | ||
394 | list: 'Terminübersicht', | ||
395 | }, | ||
396 | weekText: 'KW', | ||
397 | weekTextLong: 'Woche', | ||
398 | allDayText: 'Ganztägig', | ||
399 | moreLinkText(n) { | ||
400 | return '+ weitere ' + n; | ||
401 | }, | ||
402 | noEventsText: 'Keine Ereignisse anzuzeigen', | ||
403 | buttonHints: { | ||
404 | prev(buttonText) { | ||
405 | return `Vorherige${affix$1(buttonText)} ${buttonText}`; | ||
406 | }, | ||
407 | next(buttonText) { | ||
408 | return `Nächste${affix$1(buttonText)} ${buttonText}`; | ||
409 | }, | ||
410 | today(buttonText) { | ||
411 | // → Heute, Diese Woche, Dieser Monat, Dieses Jahr | ||
412 | if (buttonText === 'Tag') { | ||
413 | return 'Heute'; | ||
414 | } | ||
415 | return `Diese${affix$1(buttonText)} ${buttonText}`; | ||
416 | }, | ||
417 | }, | ||
418 | viewHint(buttonText) { | ||
419 | // → Tagesansicht, Wochenansicht, Monatsansicht, Jahresansicht | ||
420 | const glue = buttonText === 'Woche' ? 'n' : buttonText === 'Monat' ? 's' : 'es'; | ||
421 | return buttonText + glue + 'ansicht'; | ||
422 | }, | ||
423 | navLinkHint: 'Gehe zu $0', | ||
424 | moreLinkHint(eventCnt) { | ||
425 | return 'Zeige ' + (eventCnt === 1 ? | ||
426 | 'ein weiteres Ereignis' : | ||
427 | eventCnt + ' weitere Ereignisse'); | ||
428 | }, | ||
429 | closeHint: 'Schließen', | ||
430 | timeHint: 'Uhrzeit', | ||
431 | eventHint: 'Ereignis', | ||
432 | }; | ||
433 | |||
434 | function affix(buttonText) { | ||
435 | return (buttonText === 'Tag' || buttonText === 'Monat') ? 'r' : | ||
436 | buttonText === 'Jahr' ? 's' : ''; | ||
437 | } | ||
438 | var l17 = { | ||
439 | code: 'de', | ||
440 | week: { | ||
441 | dow: 1, | ||
442 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
443 | }, | ||
444 | buttonText: { | ||
445 | prev: 'Zurück', | ||
446 | next: 'Vor', | ||
447 | today: 'Heute', | ||
448 | year: 'Jahr', | ||
449 | month: 'Monat', | ||
450 | week: 'Woche', | ||
451 | day: 'Tag', | ||
452 | list: 'Terminübersicht', | ||
453 | }, | ||
454 | weekText: 'KW', | ||
455 | weekTextLong: 'Woche', | ||
456 | allDayText: 'Ganztägig', | ||
457 | moreLinkText(n) { | ||
458 | return '+ weitere ' + n; | ||
459 | }, | ||
460 | noEventsText: 'Keine Ereignisse anzuzeigen', | ||
461 | buttonHints: { | ||
462 | prev(buttonText) { | ||
463 | return `Vorherige${affix(buttonText)} ${buttonText}`; | ||
464 | }, | ||
465 | next(buttonText) { | ||
466 | return `Nächste${affix(buttonText)} ${buttonText}`; | ||
467 | }, | ||
468 | today(buttonText) { | ||
469 | // → Heute, Diese Woche, Dieser Monat, Dieses Jahr | ||
470 | if (buttonText === 'Tag') { | ||
471 | return 'Heute'; | ||
472 | } | ||
473 | return `Diese${affix(buttonText)} ${buttonText}`; | ||
474 | }, | ||
475 | }, | ||
476 | viewHint(buttonText) { | ||
477 | // → Tagesansicht, Wochenansicht, Monatsansicht, Jahresansicht | ||
478 | const glue = buttonText === 'Woche' ? 'n' : buttonText === 'Monat' ? 's' : 'es'; | ||
479 | return buttonText + glue + 'ansicht'; | ||
480 | }, | ||
481 | navLinkHint: 'Gehe zu $0', | ||
482 | moreLinkHint(eventCnt) { | ||
483 | return 'Zeige ' + (eventCnt === 1 ? | ||
484 | 'ein weiteres Ereignis' : | ||
485 | eventCnt + ' weitere Ereignisse'); | ||
486 | }, | ||
487 | closeHint: 'Schließen', | ||
488 | timeHint: 'Uhrzeit', | ||
489 | eventHint: 'Ereignis', | ||
490 | }; | ||
491 | |||
492 | var l18 = { | ||
493 | code: 'el', | ||
494 | week: { | ||
495 | dow: 1, | ||
496 | doy: 4, // The week that contains Jan 4st is the first week of the year. | ||
497 | }, | ||
498 | buttonText: { | ||
499 | prev: 'Προηγούμενος', | ||
500 | next: 'Επόμενος', | ||
501 | today: 'Σήμερα', | ||
502 | year: 'Ετος', | ||
503 | month: 'Μήνας', | ||
504 | week: 'Εβδομάδα', | ||
505 | day: 'Ημέρα', | ||
506 | list: 'Ατζέντα', | ||
507 | }, | ||
508 | weekText: 'Εβδ', | ||
509 | allDayText: 'Ολοήμερο', | ||
510 | moreLinkText: 'περισσότερα', | ||
511 | noEventsText: 'Δεν υπάρχουν γεγονότα προς εμφάνιση', | ||
512 | }; | ||
513 | |||
514 | var l19 = { | ||
515 | code: 'en-au', | ||
516 | week: { | ||
517 | dow: 1, | ||
518 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
519 | }, | ||
520 | buttonHints: { | ||
521 | prev: 'Previous $0', | ||
522 | next: 'Next $0', | ||
523 | today: 'This $0', | ||
524 | }, | ||
525 | viewHint: '$0 view', | ||
526 | navLinkHint: 'Go to $0', | ||
527 | moreLinkHint(eventCnt) { | ||
528 | return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`; | ||
529 | }, | ||
530 | }; | ||
531 | |||
532 | var l20 = { | ||
533 | code: 'en-gb', | ||
534 | week: { | ||
535 | dow: 1, | ||
536 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
537 | }, | ||
538 | buttonHints: { | ||
539 | prev: 'Previous $0', | ||
540 | next: 'Next $0', | ||
541 | today: 'This $0', | ||
542 | }, | ||
543 | viewHint: '$0 view', | ||
544 | navLinkHint: 'Go to $0', | ||
545 | moreLinkHint(eventCnt) { | ||
546 | return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`; | ||
547 | }, | ||
548 | }; | ||
549 | |||
550 | var l21 = { | ||
551 | code: 'en-nz', | ||
552 | week: { | ||
553 | dow: 1, | ||
554 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
555 | }, | ||
556 | buttonHints: { | ||
557 | prev: 'Previous $0', | ||
558 | next: 'Next $0', | ||
559 | today: 'This $0', | ||
560 | }, | ||
561 | viewHint: '$0 view', | ||
562 | navLinkHint: 'Go to $0', | ||
563 | moreLinkHint(eventCnt) { | ||
564 | return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`; | ||
565 | }, | ||
566 | }; | ||
567 | |||
568 | var l22 = { | ||
569 | code: 'eo', | ||
570 | week: { | ||
571 | dow: 1, | ||
572 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
573 | }, | ||
574 | buttonText: { | ||
575 | prev: 'Antaŭa', | ||
576 | next: 'Sekva', | ||
577 | today: 'Hodiaŭ', | ||
578 | year: 'Jaro', | ||
579 | month: 'Monato', | ||
580 | week: 'Semajno', | ||
581 | day: 'Tago', | ||
582 | list: 'Tagordo', | ||
583 | }, | ||
584 | weekText: 'Sm', | ||
585 | allDayText: 'Tuta tago', | ||
586 | moreLinkText: 'pli', | ||
587 | noEventsText: 'Neniuj eventoj por montri', | ||
588 | }; | ||
589 | |||
590 | var l23 = { | ||
591 | code: 'es', | ||
592 | week: { | ||
593 | dow: 0, | ||
594 | doy: 6, // The week that contains Jan 1st is the first week of the year. | ||
595 | }, | ||
596 | buttonText: { | ||
597 | prev: 'Ant', | ||
598 | next: 'Sig', | ||
599 | today: 'Hoy', | ||
600 | year: 'Año', | ||
601 | month: 'Mes', | ||
602 | week: 'Semana', | ||
603 | day: 'Día', | ||
604 | list: 'Agenda', | ||
605 | }, | ||
606 | weekText: 'Sm', | ||
607 | allDayText: 'Todo el día', | ||
608 | moreLinkText: 'más', | ||
609 | noEventsText: 'No hay eventos para mostrar', | ||
610 | }; | ||
611 | |||
612 | var l24 = { | ||
613 | code: 'es', | ||
614 | week: { | ||
615 | dow: 1, | ||
616 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
617 | }, | ||
618 | buttonText: { | ||
619 | prev: 'Ant', | ||
620 | next: 'Sig', | ||
621 | today: 'Hoy', | ||
622 | year: 'Año', | ||
623 | month: 'Mes', | ||
624 | week: 'Semana', | ||
625 | day: 'Día', | ||
626 | list: 'Agenda', | ||
627 | }, | ||
628 | buttonHints: { | ||
629 | prev: '$0 antes', | ||
630 | next: '$0 siguiente', | ||
631 | today(buttonText) { | ||
632 | return (buttonText === 'Día') ? 'Hoy' : | ||
633 | ((buttonText === 'Semana') ? 'Esta' : 'Este') + ' ' + buttonText.toLocaleLowerCase(); | ||
634 | }, | ||
635 | }, | ||
636 | viewHint(buttonText) { | ||
637 | return 'Vista ' + (buttonText === 'Semana' ? 'de la' : 'del') + ' ' + buttonText.toLocaleLowerCase(); | ||
638 | }, | ||
639 | weekText: 'Sm', | ||
640 | weekTextLong: 'Semana', | ||
641 | allDayText: 'Todo el día', | ||
642 | moreLinkText: 'más', | ||
643 | moreLinkHint(eventCnt) { | ||
644 | return `Mostrar ${eventCnt} eventos más`; | ||
645 | }, | ||
646 | noEventsText: 'No hay eventos para mostrar', | ||
647 | navLinkHint: 'Ir al $0', | ||
648 | closeHint: 'Cerrar', | ||
649 | timeHint: 'La hora', | ||
650 | eventHint: 'Evento', | ||
651 | }; | ||
652 | |||
653 | var l25 = { | ||
654 | code: 'et', | ||
655 | week: { | ||
656 | dow: 1, | ||
657 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
658 | }, | ||
659 | buttonText: { | ||
660 | prev: 'Eelnev', | ||
661 | next: 'Järgnev', | ||
662 | today: 'Täna', | ||
663 | year: 'Aasta', | ||
664 | month: 'Kuu', | ||
665 | week: 'Nädal', | ||
666 | day: 'Päev', | ||
667 | list: 'Päevakord', | ||
668 | }, | ||
669 | weekText: 'näd', | ||
670 | allDayText: 'Kogu päev', | ||
671 | moreLinkText(n) { | ||
672 | return '+ veel ' + n; | ||
673 | }, | ||
674 | noEventsText: 'Kuvamiseks puuduvad sündmused', | ||
675 | }; | ||
676 | |||
677 | var l26 = { | ||
678 | code: 'eu', | ||
679 | week: { | ||
680 | dow: 1, | ||
681 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
682 | }, | ||
683 | buttonText: { | ||
684 | prev: 'Aur', | ||
685 | next: 'Hur', | ||
686 | today: 'Gaur', | ||
687 | year: 'Urtea', | ||
688 | month: 'Hilabetea', | ||
689 | week: 'Astea', | ||
690 | day: 'Eguna', | ||
691 | list: 'Agenda', | ||
692 | }, | ||
693 | weekText: 'As', | ||
694 | allDayText: 'Egun osoa', | ||
695 | moreLinkText: 'gehiago', | ||
696 | noEventsText: 'Ez dago ekitaldirik erakusteko', | ||
697 | }; | ||
698 | |||
699 | var l27 = { | ||
700 | code: 'fa', | ||
701 | week: { | ||
702 | dow: 6, | ||
703 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
704 | }, | ||
705 | direction: 'rtl', | ||
706 | buttonText: { | ||
707 | prev: 'قبلی', | ||
708 | next: 'بعدی', | ||
709 | today: 'امروز', | ||
710 | year: 'سال', | ||
711 | month: 'ماه', | ||
712 | week: 'هفته', | ||
713 | day: 'روز', | ||
714 | list: 'برنامه', | ||
715 | }, | ||
716 | weekText: 'هف', | ||
717 | allDayText: 'تمام روز', | ||
718 | moreLinkText(n) { | ||
719 | return 'بیش از ' + n; | ||
720 | }, | ||
721 | noEventsText: 'هیچ رویدادی به نمایش', | ||
722 | }; | ||
723 | |||
724 | var l28 = { | ||
725 | code: 'fi', | ||
726 | week: { | ||
727 | dow: 1, | ||
728 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
729 | }, | ||
730 | buttonText: { | ||
731 | prev: 'Edellinen', | ||
732 | next: 'Seuraava', | ||
733 | today: 'Tänään', | ||
734 | year: 'Vuosi', | ||
735 | month: 'Kuukausi', | ||
736 | week: 'Viikko', | ||
737 | day: 'Päivä', | ||
738 | list: 'Tapahtumat', | ||
739 | }, | ||
740 | weekText: 'Vk', | ||
741 | allDayText: 'Koko päivä', | ||
742 | moreLinkText: 'lisää', | ||
743 | noEventsText: 'Ei näytettäviä tapahtumia', | ||
744 | }; | ||
745 | |||
746 | var l29 = { | ||
747 | code: 'fr', | ||
748 | buttonText: { | ||
749 | prev: 'Précédent', | ||
750 | next: 'Suivant', | ||
751 | today: 'Aujourd\'hui', | ||
752 | year: 'Année', | ||
753 | month: 'Mois', | ||
754 | week: 'Semaine', | ||
755 | day: 'Jour', | ||
756 | list: 'Mon planning', | ||
757 | }, | ||
758 | weekText: 'Sem.', | ||
759 | allDayText: 'Toute la journée', | ||
760 | moreLinkText: 'en plus', | ||
761 | noEventsText: 'Aucun évènement à afficher', | ||
762 | }; | ||
763 | |||
764 | var l30 = { | ||
765 | code: 'fr-ch', | ||
766 | week: { | ||
767 | dow: 1, | ||
768 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
769 | }, | ||
770 | buttonText: { | ||
771 | prev: 'Précédent', | ||
772 | next: 'Suivant', | ||
773 | today: 'Courant', | ||
774 | year: 'Année', | ||
775 | month: 'Mois', | ||
776 | week: 'Semaine', | ||
777 | day: 'Jour', | ||
778 | list: 'Mon planning', | ||
779 | }, | ||
780 | weekText: 'Sm', | ||
781 | allDayText: 'Toute la journée', | ||
782 | moreLinkText: 'en plus', | ||
783 | noEventsText: 'Aucun évènement à afficher', | ||
784 | }; | ||
785 | |||
786 | var l31 = { | ||
787 | code: 'fr', | ||
788 | week: { | ||
789 | dow: 1, | ||
790 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
791 | }, | ||
792 | buttonText: { | ||
793 | prev: 'Précédent', | ||
794 | next: 'Suivant', | ||
795 | today: 'Aujourd\'hui', | ||
796 | year: 'Année', | ||
797 | month: 'Mois', | ||
798 | week: 'Semaine', | ||
799 | day: 'Jour', | ||
800 | list: 'Planning', | ||
801 | }, | ||
802 | weekText: 'Sem.', | ||
803 | weekTextLong: 'Semaine', | ||
804 | allDayText: 'Toute la journée', | ||
805 | moreLinkText: 'en plus', | ||
806 | noEventsText: 'Aucun évènement à afficher', | ||
807 | }; | ||
808 | |||
809 | var l32 = { | ||
810 | code: 'gl', | ||
811 | week: { | ||
812 | dow: 1, | ||
813 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
814 | }, | ||
815 | buttonText: { | ||
816 | prev: 'Ant', | ||
817 | next: 'Seg', | ||
818 | today: 'Hoxe', | ||
819 | year: 'Ano', | ||
820 | month: 'Mes', | ||
821 | week: 'Semana', | ||
822 | day: 'Día', | ||
823 | list: 'Axenda', | ||
824 | }, | ||
825 | buttonHints: { | ||
826 | prev: '$0 antes', | ||
827 | next: '$0 seguinte', | ||
828 | today(buttonText) { | ||
829 | return (buttonText === 'Día') ? 'Hoxe' : | ||
830 | ((buttonText === 'Semana') ? 'Esta' : 'Este') + ' ' + buttonText.toLocaleLowerCase(); | ||
831 | }, | ||
832 | }, | ||
833 | viewHint(buttonText) { | ||
834 | return 'Vista ' + (buttonText === 'Semana' ? 'da' : 'do') + ' ' + buttonText.toLocaleLowerCase(); | ||
835 | }, | ||
836 | weekText: 'Sm', | ||
837 | weekTextLong: 'Semana', | ||
838 | allDayText: 'Todo o día', | ||
839 | moreLinkText: 'máis', | ||
840 | moreLinkHint(eventCnt) { | ||
841 | return `Amosar ${eventCnt} eventos máis`; | ||
842 | }, | ||
843 | noEventsText: 'Non hai eventos para amosar', | ||
844 | navLinkHint: 'Ir ao $0', | ||
845 | closeHint: 'Pechar', | ||
846 | timeHint: 'A hora', | ||
847 | eventHint: 'Evento', | ||
848 | }; | ||
849 | |||
850 | var l33 = { | ||
851 | code: 'he', | ||
852 | direction: 'rtl', | ||
853 | buttonText: { | ||
854 | prev: 'הקודם', | ||
855 | next: 'הבא', | ||
856 | today: 'היום', | ||
857 | year: 'שנה', | ||
858 | month: 'חודש', | ||
859 | week: 'שבוע', | ||
860 | day: 'יום', | ||
861 | list: 'סדר יום', | ||
862 | }, | ||
863 | allDayText: 'כל היום', | ||
864 | moreLinkText: 'נוספים', | ||
865 | noEventsText: 'אין אירועים להצגה', | ||
866 | weekText: 'שבוע', | ||
867 | }; | ||
868 | |||
869 | var l34 = { | ||
870 | code: 'hi', | ||
871 | week: { | ||
872 | dow: 0, | ||
873 | doy: 6, // The week that contains Jan 1st is the first week of the year. | ||
874 | }, | ||
875 | buttonText: { | ||
876 | prev: 'पिछला', | ||
877 | next: 'अगला', | ||
878 | today: 'आज', | ||
879 | year: 'वर्ष', | ||
880 | month: 'महीना', | ||
881 | week: 'सप्ताह', | ||
882 | day: 'दिन', | ||
883 | list: 'कार्यसूची', | ||
884 | }, | ||
885 | weekText: 'हफ्ता', | ||
886 | allDayText: 'सभी दिन', | ||
887 | moreLinkText(n) { | ||
888 | return '+अधिक ' + n; | ||
889 | }, | ||
890 | noEventsText: 'कोई घटनाओं को प्रदर्शित करने के लिए', | ||
891 | }; | ||
892 | |||
893 | var l35 = { | ||
894 | code: 'hr', | ||
895 | week: { | ||
896 | dow: 1, | ||
897 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
898 | }, | ||
899 | buttonText: { | ||
900 | prev: 'Prijašnji', | ||
901 | next: 'Sljedeći', | ||
902 | today: 'Danas', | ||
903 | year: 'Godina', | ||
904 | month: 'Mjesec', | ||
905 | week: 'Tjedan', | ||
906 | day: 'Dan', | ||
907 | list: 'Raspored', | ||
908 | }, | ||
909 | weekText: 'Tje', | ||
910 | allDayText: 'Cijeli dan', | ||
911 | moreLinkText(n) { | ||
912 | return '+ još ' + n; | ||
913 | }, | ||
914 | noEventsText: 'Nema događaja za prikaz', | ||
915 | }; | ||
916 | |||
917 | var l36 = { | ||
918 | code: 'hu', | ||
919 | week: { | ||
920 | dow: 1, | ||
921 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
922 | }, | ||
923 | buttonText: { | ||
924 | prev: 'vissza', | ||
925 | next: 'előre', | ||
926 | today: 'ma', | ||
927 | year: 'Év', | ||
928 | month: 'Hónap', | ||
929 | week: 'Hét', | ||
930 | day: 'Nap', | ||
931 | list: 'Lista', | ||
932 | }, | ||
933 | weekText: 'Hét', | ||
934 | allDayText: 'Egész nap', | ||
935 | moreLinkText: 'további', | ||
936 | noEventsText: 'Nincs megjeleníthető esemény', | ||
937 | }; | ||
938 | |||
939 | var l37 = { | ||
940 | code: 'hy-am', | ||
941 | week: { | ||
942 | dow: 1, | ||
943 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
944 | }, | ||
945 | buttonText: { | ||
946 | prev: 'Նախորդ', | ||
947 | next: 'Հաջորդ', | ||
948 | today: 'Այսօր', | ||
949 | year: 'Տարի', | ||
950 | month: 'Ամիս', | ||
951 | week: 'Շաբաթ', | ||
952 | day: 'Օր', | ||
953 | list: 'Օրվա ցուցակ', | ||
954 | }, | ||
955 | weekText: 'Շաբ', | ||
956 | allDayText: 'Ամբողջ օր', | ||
957 | moreLinkText(n) { | ||
958 | return '+ ևս ' + n; | ||
959 | }, | ||
960 | noEventsText: 'Բացակայում է իրադարձությունը ցուցադրելու', | ||
961 | }; | ||
962 | |||
963 | var l38 = { | ||
964 | code: 'id', | ||
965 | week: { | ||
966 | dow: 1, | ||
967 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
968 | }, | ||
969 | buttonText: { | ||
970 | prev: 'mundur', | ||
971 | next: 'maju', | ||
972 | today: 'hari ini', | ||
973 | year: 'Tahun', | ||
974 | month: 'Bulan', | ||
975 | week: 'Minggu', | ||
976 | day: 'Hari', | ||
977 | list: 'Agenda', | ||
978 | }, | ||
979 | weekText: 'Mg', | ||
980 | allDayText: 'Sehari penuh', | ||
981 | moreLinkText: 'lebih', | ||
982 | noEventsText: 'Tidak ada acara untuk ditampilkan', | ||
983 | }; | ||
984 | |||
985 | var l39 = { | ||
986 | code: 'is', | ||
987 | week: { | ||
988 | dow: 1, | ||
989 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
990 | }, | ||
991 | buttonText: { | ||
992 | prev: 'Fyrri', | ||
993 | next: 'Næsti', | ||
994 | today: 'Í dag', | ||
995 | year: 'Ár', | ||
996 | month: 'Mánuður', | ||
997 | week: 'Vika', | ||
998 | day: 'Dagur', | ||
999 | list: 'Dagskrá', | ||
1000 | }, | ||
1001 | weekText: 'Vika', | ||
1002 | allDayText: 'Allan daginn', | ||
1003 | moreLinkText: 'meira', | ||
1004 | noEventsText: 'Engir viðburðir til að sýna', | ||
1005 | }; | ||
1006 | |||
1007 | var l40 = { | ||
1008 | code: 'it', | ||
1009 | week: { | ||
1010 | dow: 1, | ||
1011 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1012 | }, | ||
1013 | buttonText: { | ||
1014 | prev: 'Prec', | ||
1015 | next: 'Succ', | ||
1016 | today: 'Oggi', | ||
1017 | year: 'Anno', | ||
1018 | month: 'Mese', | ||
1019 | week: 'Settimana', | ||
1020 | day: 'Giorno', | ||
1021 | list: 'Agenda', | ||
1022 | }, | ||
1023 | weekText: 'Sm', | ||
1024 | allDayText: 'Tutto il giorno', | ||
1025 | moreLinkText(n) { | ||
1026 | return '+altri ' + n; | ||
1027 | }, | ||
1028 | noEventsText: 'Non ci sono eventi da visualizzare', | ||
1029 | }; | ||
1030 | |||
1031 | var l41 = { | ||
1032 | code: 'ja', | ||
1033 | buttonText: { | ||
1034 | prev: '前', | ||
1035 | next: '次', | ||
1036 | today: '今日', | ||
1037 | year: '年', | ||
1038 | month: '月', | ||
1039 | week: '週', | ||
1040 | day: '日', | ||
1041 | list: '予定リスト', | ||
1042 | }, | ||
1043 | weekText: '週', | ||
1044 | allDayText: '終日', | ||
1045 | moreLinkText(n) { | ||
1046 | return '他 ' + n + ' 件'; | ||
1047 | }, | ||
1048 | noEventsText: '表示する予定はありません', | ||
1049 | }; | ||
1050 | |||
1051 | var l42 = { | ||
1052 | code: 'ka', | ||
1053 | week: { | ||
1054 | dow: 1, | ||
1055 | doy: 7, | ||
1056 | }, | ||
1057 | buttonText: { | ||
1058 | prev: 'წინა', | ||
1059 | next: 'შემდეგი', | ||
1060 | today: 'დღეს', | ||
1061 | year: 'წელიწადი', | ||
1062 | month: 'თვე', | ||
1063 | week: 'კვირა', | ||
1064 | day: 'დღე', | ||
1065 | list: 'დღის წესრიგი', | ||
1066 | }, | ||
1067 | weekText: 'კვ', | ||
1068 | allDayText: 'მთელი დღე', | ||
1069 | moreLinkText(n) { | ||
1070 | return '+ კიდევ ' + n; | ||
1071 | }, | ||
1072 | noEventsText: 'ღონისძიებები არ არის', | ||
1073 | }; | ||
1074 | |||
1075 | var l43 = { | ||
1076 | code: 'kk', | ||
1077 | week: { | ||
1078 | dow: 1, | ||
1079 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
1080 | }, | ||
1081 | buttonText: { | ||
1082 | prev: 'Алдыңғы', | ||
1083 | next: 'Келесі', | ||
1084 | today: 'Бүгін', | ||
1085 | year: 'Жыл', | ||
1086 | month: 'Ай', | ||
1087 | week: 'Апта', | ||
1088 | day: 'Күн', | ||
1089 | list: 'Күн тәртібі', | ||
1090 | }, | ||
1091 | weekText: 'Не', | ||
1092 | allDayText: 'Күні бойы', | ||
1093 | moreLinkText(n) { | ||
1094 | return '+ тағы ' + n; | ||
1095 | }, | ||
1096 | noEventsText: 'Көрсету үшін оқиғалар жоқ', | ||
1097 | }; | ||
1098 | |||
1099 | var l44 = { | ||
1100 | code: 'km', | ||
1101 | week: { | ||
1102 | dow: 1, | ||
1103 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1104 | }, | ||
1105 | buttonText: { | ||
1106 | prev: 'មុន', | ||
1107 | next: 'បន្ទាប់', | ||
1108 | today: 'ថ្ងៃនេះ', | ||
1109 | year: 'ឆ្នាំ', | ||
1110 | month: 'ខែ', | ||
1111 | week: 'សប្តាហ៍', | ||
1112 | day: 'ថ្ងៃ', | ||
1113 | list: 'បញ្ជី', | ||
1114 | }, | ||
1115 | weekText: 'សប្តាហ៍', | ||
1116 | allDayText: 'ពេញមួយថ្ងៃ', | ||
1117 | moreLinkText: 'ច្រើនទៀត', | ||
1118 | noEventsText: 'គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ', | ||
1119 | }; | ||
1120 | |||
1121 | var l45 = { | ||
1122 | code: 'ko', | ||
1123 | buttonText: { | ||
1124 | prev: '이전달', | ||
1125 | next: '다음달', | ||
1126 | today: '오늘', | ||
1127 | year: '년도', | ||
1128 | month: '월', | ||
1129 | week: '주', | ||
1130 | day: '일', | ||
1131 | list: '일정목록', | ||
1132 | }, | ||
1133 | weekText: '주', | ||
1134 | allDayText: '종일', | ||
1135 | moreLinkText: '개', | ||
1136 | noEventsText: '일정이 없습니다', | ||
1137 | }; | ||
1138 | |||
1139 | var l46 = { | ||
1140 | code: 'ku', | ||
1141 | week: { | ||
1142 | dow: 6, | ||
1143 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
1144 | }, | ||
1145 | direction: 'rtl', | ||
1146 | buttonText: { | ||
1147 | prev: 'پێشتر', | ||
1148 | next: 'دواتر', | ||
1149 | today: 'ئەمڕو', | ||
1150 | year: 'ساڵ', | ||
1151 | month: 'مانگ', | ||
1152 | week: 'هەفتە', | ||
1153 | day: 'ڕۆژ', | ||
1154 | list: 'بەرنامە', | ||
1155 | }, | ||
1156 | weekText: 'هەفتە', | ||
1157 | allDayText: 'هەموو ڕۆژەکە', | ||
1158 | moreLinkText: 'زیاتر', | ||
1159 | noEventsText: 'هیچ ڕووداوێك نیە', | ||
1160 | }; | ||
1161 | |||
1162 | var l47 = { | ||
1163 | code: 'lb', | ||
1164 | week: { | ||
1165 | dow: 1, | ||
1166 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1167 | }, | ||
1168 | buttonText: { | ||
1169 | prev: 'Zréck', | ||
1170 | next: 'Weider', | ||
1171 | today: 'Haut', | ||
1172 | year: 'Joer', | ||
1173 | month: 'Mount', | ||
1174 | week: 'Woch', | ||
1175 | day: 'Dag', | ||
1176 | list: 'Terminiwwersiicht', | ||
1177 | }, | ||
1178 | weekText: 'W', | ||
1179 | allDayText: 'Ganzen Dag', | ||
1180 | moreLinkText: 'méi', | ||
1181 | noEventsText: 'Nee Evenementer ze affichéieren', | ||
1182 | }; | ||
1183 | |||
1184 | var l48 = { | ||
1185 | code: 'lt', | ||
1186 | week: { | ||
1187 | dow: 1, | ||
1188 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1189 | }, | ||
1190 | buttonText: { | ||
1191 | prev: 'Atgal', | ||
1192 | next: 'Pirmyn', | ||
1193 | today: 'Šiandien', | ||
1194 | year: 'Metai', | ||
1195 | month: 'Mėnuo', | ||
1196 | week: 'Savaitė', | ||
1197 | day: 'Diena', | ||
1198 | list: 'Darbotvarkė', | ||
1199 | }, | ||
1200 | weekText: 'SAV', | ||
1201 | allDayText: 'Visą dieną', | ||
1202 | moreLinkText: 'daugiau', | ||
1203 | noEventsText: 'Nėra įvykių rodyti', | ||
1204 | }; | ||
1205 | |||
1206 | var l49 = { | ||
1207 | code: 'lv', | ||
1208 | week: { | ||
1209 | dow: 1, | ||
1210 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1211 | }, | ||
1212 | buttonText: { | ||
1213 | prev: 'Iepr.', | ||
1214 | next: 'Nāk.', | ||
1215 | today: 'Šodien', | ||
1216 | year: 'Gads', | ||
1217 | month: 'Mēnesis', | ||
1218 | week: 'Nedēļa', | ||
1219 | day: 'Diena', | ||
1220 | list: 'Dienas kārtība', | ||
1221 | }, | ||
1222 | weekText: 'Ned.', | ||
1223 | allDayText: 'Visu dienu', | ||
1224 | moreLinkText(n) { | ||
1225 | return '+vēl ' + n; | ||
1226 | }, | ||
1227 | noEventsText: 'Nav notikumu', | ||
1228 | }; | ||
1229 | |||
1230 | var l50 = { | ||
1231 | code: 'mk', | ||
1232 | buttonText: { | ||
1233 | prev: 'претходно', | ||
1234 | next: 'следно', | ||
1235 | today: 'Денес', | ||
1236 | year: 'година', | ||
1237 | month: 'Месец', | ||
1238 | week: 'Недела', | ||
1239 | day: 'Ден', | ||
1240 | list: 'График', | ||
1241 | }, | ||
1242 | weekText: 'Сед', | ||
1243 | allDayText: 'Цел ден', | ||
1244 | moreLinkText(n) { | ||
1245 | return '+повеќе ' + n; | ||
1246 | }, | ||
1247 | noEventsText: 'Нема настани за прикажување', | ||
1248 | }; | ||
1249 | |||
1250 | var l51 = { | ||
1251 | code: 'ms', | ||
1252 | week: { | ||
1253 | dow: 1, | ||
1254 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
1255 | }, | ||
1256 | buttonText: { | ||
1257 | prev: 'Sebelum', | ||
1258 | next: 'Selepas', | ||
1259 | today: 'hari ini', | ||
1260 | year: 'Tahun', | ||
1261 | month: 'Bulan', | ||
1262 | week: 'Minggu', | ||
1263 | day: 'Hari', | ||
1264 | list: 'Agenda', | ||
1265 | }, | ||
1266 | weekText: 'Mg', | ||
1267 | allDayText: 'Sepanjang hari', | ||
1268 | moreLinkText(n) { | ||
1269 | return 'masih ada ' + n + ' acara'; | ||
1270 | }, | ||
1271 | noEventsText: 'Tiada peristiwa untuk dipaparkan', | ||
1272 | }; | ||
1273 | |||
1274 | var l52 = { | ||
1275 | code: 'nb', | ||
1276 | week: { | ||
1277 | dow: 1, | ||
1278 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1279 | }, | ||
1280 | buttonText: { | ||
1281 | prev: 'Forrige', | ||
1282 | next: 'Neste', | ||
1283 | today: 'I dag', | ||
1284 | year: 'År', | ||
1285 | month: 'Måned', | ||
1286 | week: 'Uke', | ||
1287 | day: 'Dag', | ||
1288 | list: 'Agenda', | ||
1289 | }, | ||
1290 | weekText: 'Uke', | ||
1291 | weekTextLong: 'Uke', | ||
1292 | allDayText: 'Hele dagen', | ||
1293 | moreLinkText: 'til', | ||
1294 | noEventsText: 'Ingen hendelser å vise', | ||
1295 | buttonHints: { | ||
1296 | prev: 'Forrige $0', | ||
1297 | next: 'Neste $0', | ||
1298 | today: 'Nåværende $0', | ||
1299 | }, | ||
1300 | viewHint: '$0 visning', | ||
1301 | navLinkHint: 'Gå til $0', | ||
1302 | moreLinkHint(eventCnt) { | ||
1303 | return `Vis ${eventCnt} flere hendelse${eventCnt === 1 ? '' : 'r'}`; | ||
1304 | }, | ||
1305 | }; | ||
1306 | |||
1307 | var l53 = { | ||
1308 | code: 'ne', | ||
1309 | week: { | ||
1310 | dow: 7, | ||
1311 | doy: 1, // The week that contains Jan 1st is the first week of the year. | ||
1312 | }, | ||
1313 | buttonText: { | ||
1314 | prev: 'अघिल्लो', | ||
1315 | next: 'अर्को', | ||
1316 | today: 'आज', | ||
1317 | year: 'वर्ष', | ||
1318 | month: 'महिना', | ||
1319 | week: 'हप्ता', | ||
1320 | day: 'दिन', | ||
1321 | list: 'सूची', | ||
1322 | }, | ||
1323 | weekText: 'हप्ता', | ||
1324 | allDayText: 'दिनभरि', | ||
1325 | moreLinkText: 'थप लिंक', | ||
1326 | noEventsText: 'देखाउनको लागि कुनै घटनाहरू छैनन्', | ||
1327 | }; | ||
1328 | |||
1329 | var l54 = { | ||
1330 | code: 'nl', | ||
1331 | week: { | ||
1332 | dow: 1, | ||
1333 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1334 | }, | ||
1335 | buttonText: { | ||
1336 | prev: 'Vorige', | ||
1337 | next: 'Volgende', | ||
1338 | today: 'Vandaag', | ||
1339 | year: 'Jaar', | ||
1340 | month: 'Maand', | ||
1341 | week: 'Week', | ||
1342 | day: 'Dag', | ||
1343 | list: 'Lijst', | ||
1344 | }, | ||
1345 | allDayText: 'Hele dag', | ||
1346 | moreLinkText: 'extra', | ||
1347 | noEventsText: 'Geen evenementen om te laten zien', | ||
1348 | }; | ||
1349 | |||
1350 | var l55 = { | ||
1351 | code: 'nn', | ||
1352 | week: { | ||
1353 | dow: 1, | ||
1354 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1355 | }, | ||
1356 | buttonText: { | ||
1357 | prev: 'Førre', | ||
1358 | next: 'Neste', | ||
1359 | today: 'I dag', | ||
1360 | year: 'År', | ||
1361 | month: 'Månad', | ||
1362 | week: 'Veke', | ||
1363 | day: 'Dag', | ||
1364 | list: 'Agenda', | ||
1365 | }, | ||
1366 | weekText: 'Veke', | ||
1367 | allDayText: 'Heile dagen', | ||
1368 | moreLinkText: 'til', | ||
1369 | noEventsText: 'Ingen hendelser å vise', | ||
1370 | }; | ||
1371 | |||
1372 | var l56 = { | ||
1373 | code: 'pl', | ||
1374 | week: { | ||
1375 | dow: 1, | ||
1376 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1377 | }, | ||
1378 | buttonText: { | ||
1379 | prev: 'Poprzedni', | ||
1380 | next: 'Następny', | ||
1381 | today: 'Dziś', | ||
1382 | year: 'Rok', | ||
1383 | month: 'Miesiąc', | ||
1384 | week: 'Tydzień', | ||
1385 | day: 'Dzień', | ||
1386 | list: 'Plan dnia', | ||
1387 | }, | ||
1388 | weekText: 'Tydz', | ||
1389 | allDayText: 'Cały dzień', | ||
1390 | moreLinkText: 'więcej', | ||
1391 | noEventsText: 'Brak wydarzeń do wyświetlenia', | ||
1392 | }; | ||
1393 | |||
1394 | var l57 = { | ||
1395 | code: 'pt-br', | ||
1396 | buttonText: { | ||
1397 | prev: 'Anterior', | ||
1398 | next: 'Próximo', | ||
1399 | prevYear: 'Ano anterior', | ||
1400 | nextYear: 'Próximo ano', | ||
1401 | year: 'Ano', | ||
1402 | today: 'Hoje', | ||
1403 | month: 'Mês', | ||
1404 | week: 'Semana', | ||
1405 | day: 'Dia', | ||
1406 | list: 'Lista', | ||
1407 | }, | ||
1408 | buttonHints: { | ||
1409 | prev: '$0 Anterior', | ||
1410 | next: 'Próximo $0', | ||
1411 | today(buttonText) { | ||
1412 | return (buttonText === 'Dia') ? 'Hoje' : | ||
1413 | ((buttonText === 'Semana') ? 'Esta' : 'Este') + ' ' + buttonText.toLocaleLowerCase(); | ||
1414 | }, | ||
1415 | }, | ||
1416 | viewHint(buttonText) { | ||
1417 | return 'Visualizar ' + (buttonText === 'Semana' ? 'a' : 'o') + ' ' + buttonText.toLocaleLowerCase(); | ||
1418 | }, | ||
1419 | weekText: 'Sm', | ||
1420 | weekTextLong: 'Semana', | ||
1421 | allDayText: 'dia inteiro', | ||
1422 | moreLinkText(n) { | ||
1423 | return 'mais +' + n; | ||
1424 | }, | ||
1425 | moreLinkHint(eventCnt) { | ||
1426 | return `Mostrar mais ${eventCnt} eventos`; | ||
1427 | }, | ||
1428 | noEventsText: 'Não há eventos para mostrar', | ||
1429 | navLinkHint: 'Ir para $0', | ||
1430 | closeHint: 'Fechar', | ||
1431 | timeHint: 'A hora', | ||
1432 | eventHint: 'Evento', | ||
1433 | }; | ||
1434 | |||
1435 | var l58 = { | ||
1436 | code: 'pt', | ||
1437 | week: { | ||
1438 | dow: 1, | ||
1439 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1440 | }, | ||
1441 | buttonText: { | ||
1442 | prev: 'Anterior', | ||
1443 | next: 'Seguinte', | ||
1444 | today: 'Hoje', | ||
1445 | year: 'Ano', | ||
1446 | month: 'Mês', | ||
1447 | week: 'Semana', | ||
1448 | day: 'Dia', | ||
1449 | list: 'Agenda', | ||
1450 | }, | ||
1451 | weekText: 'Sem', | ||
1452 | allDayText: 'Todo o dia', | ||
1453 | moreLinkText: 'mais', | ||
1454 | noEventsText: 'Não há eventos para mostrar', | ||
1455 | }; | ||
1456 | |||
1457 | var l59 = { | ||
1458 | code: 'ro', | ||
1459 | week: { | ||
1460 | dow: 1, | ||
1461 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
1462 | }, | ||
1463 | buttonText: { | ||
1464 | prev: 'precedentă', | ||
1465 | next: 'următoare', | ||
1466 | today: 'Azi', | ||
1467 | year: 'An', | ||
1468 | month: 'Lună', | ||
1469 | week: 'Săptămână', | ||
1470 | day: 'Zi', | ||
1471 | list: 'Agendă', | ||
1472 | }, | ||
1473 | weekText: 'Săpt', | ||
1474 | allDayText: 'Toată ziua', | ||
1475 | moreLinkText(n) { | ||
1476 | return '+alte ' + n; | ||
1477 | }, | ||
1478 | noEventsText: 'Nu există evenimente de afișat', | ||
1479 | }; | ||
1480 | |||
1481 | var l60 = { | ||
1482 | code: 'ru', | ||
1483 | week: { | ||
1484 | dow: 1, | ||
1485 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1486 | }, | ||
1487 | buttonText: { | ||
1488 | prev: 'Пред', | ||
1489 | next: 'След', | ||
1490 | today: 'Сегодня', | ||
1491 | year: 'Год', | ||
1492 | month: 'Месяц', | ||
1493 | week: 'Неделя', | ||
1494 | day: 'День', | ||
1495 | list: 'Повестка дня', | ||
1496 | }, | ||
1497 | weekText: 'Нед', | ||
1498 | allDayText: 'Весь день', | ||
1499 | moreLinkText(n) { | ||
1500 | return '+ ещё ' + n; | ||
1501 | }, | ||
1502 | noEventsText: 'Нет событий для отображения', | ||
1503 | }; | ||
1504 | |||
1505 | var l61 = { | ||
1506 | code: 'si-lk', | ||
1507 | week: { | ||
1508 | dow: 1, | ||
1509 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1510 | }, | ||
1511 | buttonText: { | ||
1512 | prev: 'පෙර', | ||
1513 | next: 'පසු', | ||
1514 | today: 'අද', | ||
1515 | year: 'අවුරුදු', | ||
1516 | month: 'මාසය', | ||
1517 | week: 'සතිය', | ||
1518 | day: 'දවස', | ||
1519 | list: 'ලැයිස්තුව', | ||
1520 | }, | ||
1521 | weekText: 'සති', | ||
1522 | allDayText: 'සියලු', | ||
1523 | moreLinkText: 'තවත්', | ||
1524 | noEventsText: 'මුකුත් නැත', | ||
1525 | }; | ||
1526 | |||
1527 | var l62 = { | ||
1528 | code: 'sk', | ||
1529 | week: { | ||
1530 | dow: 1, | ||
1531 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1532 | }, | ||
1533 | buttonText: { | ||
1534 | prev: 'Predchádzajúci', | ||
1535 | next: 'Nasledujúci', | ||
1536 | today: 'Dnes', | ||
1537 | year: 'Rok', | ||
1538 | month: 'Mesiac', | ||
1539 | week: 'Týždeň', | ||
1540 | day: 'Deň', | ||
1541 | list: 'Rozvrh', | ||
1542 | }, | ||
1543 | weekText: 'Ty', | ||
1544 | allDayText: 'Celý deň', | ||
1545 | moreLinkText(n) { | ||
1546 | return '+ďalšie: ' + n; | ||
1547 | }, | ||
1548 | noEventsText: 'Žiadne akcie na zobrazenie', | ||
1549 | }; | ||
1550 | |||
1551 | var l63 = { | ||
1552 | code: 'sl', | ||
1553 | week: { | ||
1554 | dow: 1, | ||
1555 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
1556 | }, | ||
1557 | buttonText: { | ||
1558 | prev: 'Prejšnji', | ||
1559 | next: 'Naslednji', | ||
1560 | today: 'Trenutni', | ||
1561 | year: 'Leto', | ||
1562 | month: 'Mesec', | ||
1563 | week: 'Teden', | ||
1564 | day: 'Dan', | ||
1565 | list: 'Dnevni red', | ||
1566 | }, | ||
1567 | weekText: 'Teden', | ||
1568 | allDayText: 'Ves dan', | ||
1569 | moreLinkText: 'več', | ||
1570 | noEventsText: 'Ni dogodkov za prikaz', | ||
1571 | }; | ||
1572 | |||
1573 | var l64 = { | ||
1574 | code: 'sm', | ||
1575 | buttonText: { | ||
1576 | prev: 'Talu ai', | ||
1577 | next: 'Mulimuli atu', | ||
1578 | today: 'Aso nei', | ||
1579 | year: 'Tausaga', | ||
1580 | month: 'Masina', | ||
1581 | week: 'Vaiaso', | ||
1582 | day: 'Aso', | ||
1583 | list: 'Faasologa', | ||
1584 | }, | ||
1585 | weekText: 'Vaiaso', | ||
1586 | allDayText: 'Aso atoa', | ||
1587 | moreLinkText: 'sili atu', | ||
1588 | noEventsText: 'Leai ni mea na tutupu', | ||
1589 | }; | ||
1590 | |||
1591 | var l65 = { | ||
1592 | code: 'sq', | ||
1593 | week: { | ||
1594 | dow: 1, | ||
1595 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1596 | }, | ||
1597 | buttonText: { | ||
1598 | prev: 'mbrapa', | ||
1599 | next: 'Përpara', | ||
1600 | today: 'Sot', | ||
1601 | year: 'Viti', | ||
1602 | month: 'Muaj', | ||
1603 | week: 'Javë', | ||
1604 | day: 'Ditë', | ||
1605 | list: 'Listë', | ||
1606 | }, | ||
1607 | weekText: 'Ja', | ||
1608 | allDayText: 'Gjithë ditën', | ||
1609 | moreLinkText(n) { | ||
1610 | return '+më tepër ' + n; | ||
1611 | }, | ||
1612 | noEventsText: 'Nuk ka evente për të shfaqur', | ||
1613 | }; | ||
1614 | |||
1615 | var l66 = { | ||
1616 | code: 'sr-cyrl', | ||
1617 | week: { | ||
1618 | dow: 1, | ||
1619 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
1620 | }, | ||
1621 | buttonText: { | ||
1622 | prev: 'Претходна', | ||
1623 | next: 'следећи', | ||
1624 | today: 'Данас', | ||
1625 | year: 'Година', | ||
1626 | month: 'Месец', | ||
1627 | week: 'Недеља', | ||
1628 | day: 'Дан', | ||
1629 | list: 'Планер', | ||
1630 | }, | ||
1631 | weekText: 'Сед', | ||
1632 | allDayText: 'Цео дан', | ||
1633 | moreLinkText(n) { | ||
1634 | return '+ још ' + n; | ||
1635 | }, | ||
1636 | noEventsText: 'Нема догађаја за приказ', | ||
1637 | }; | ||
1638 | |||
1639 | var l67 = { | ||
1640 | code: 'sr', | ||
1641 | week: { | ||
1642 | dow: 1, | ||
1643 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
1644 | }, | ||
1645 | buttonText: { | ||
1646 | prev: 'Prethodna', | ||
1647 | next: 'Sledeći', | ||
1648 | today: 'Danas', | ||
1649 | year: 'Godina', | ||
1650 | month: 'Mеsеc', | ||
1651 | week: 'Nеdеlja', | ||
1652 | day: 'Dan', | ||
1653 | list: 'Planеr', | ||
1654 | }, | ||
1655 | weekText: 'Sed', | ||
1656 | allDayText: 'Cеo dan', | ||
1657 | moreLinkText(n) { | ||
1658 | return '+ još ' + n; | ||
1659 | }, | ||
1660 | noEventsText: 'Nеma događaja za prikaz', | ||
1661 | }; | ||
1662 | |||
1663 | var l68 = { | ||
1664 | code: 'sv', | ||
1665 | week: { | ||
1666 | dow: 1, | ||
1667 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1668 | }, | ||
1669 | buttonText: { | ||
1670 | prev: 'Förra', | ||
1671 | next: 'Nästa', | ||
1672 | today: 'Idag', | ||
1673 | year: 'År', | ||
1674 | month: 'Månad', | ||
1675 | week: 'Vecka', | ||
1676 | day: 'Dag', | ||
1677 | list: 'Program', | ||
1678 | }, | ||
1679 | buttonHints: { | ||
1680 | prev(buttonText) { | ||
1681 | return `Föregående ${buttonText.toLocaleLowerCase()}`; | ||
1682 | }, | ||
1683 | next(buttonText) { | ||
1684 | return `Nästa ${buttonText.toLocaleLowerCase()}`; | ||
1685 | }, | ||
1686 | today(buttonText) { | ||
1687 | return (buttonText === 'Program' ? 'Detta' : 'Denna') + ' ' + buttonText.toLocaleLowerCase(); | ||
1688 | }, | ||
1689 | }, | ||
1690 | viewHint: '$0 vy', | ||
1691 | navLinkHint: 'Gå till $0', | ||
1692 | moreLinkHint(eventCnt) { | ||
1693 | return `Visa ytterligare ${eventCnt} händelse${eventCnt === 1 ? '' : 'r'}`; | ||
1694 | }, | ||
1695 | weekText: 'v.', | ||
1696 | weekTextLong: 'Vecka', | ||
1697 | allDayText: 'Heldag', | ||
1698 | moreLinkText: 'till', | ||
1699 | noEventsText: 'Inga händelser att visa', | ||
1700 | closeHint: 'Stäng', | ||
1701 | timeHint: 'Klockan', | ||
1702 | eventHint: 'Händelse', | ||
1703 | }; | ||
1704 | |||
1705 | var l69 = { | ||
1706 | code: 'ta-in', | ||
1707 | week: { | ||
1708 | dow: 1, | ||
1709 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1710 | }, | ||
1711 | buttonText: { | ||
1712 | prev: 'முந்தைய', | ||
1713 | next: 'அடுத்தது', | ||
1714 | today: 'இன்று', | ||
1715 | year: 'ஆண்டு', | ||
1716 | month: 'மாதம்', | ||
1717 | week: 'வாரம்', | ||
1718 | day: 'நாள்', | ||
1719 | list: 'தினசரி அட்டவணை', | ||
1720 | }, | ||
1721 | weekText: 'வாரம்', | ||
1722 | allDayText: 'நாள் முழுவதும்', | ||
1723 | moreLinkText(n) { | ||
1724 | return '+ மேலும் ' + n; | ||
1725 | }, | ||
1726 | noEventsText: 'காண்பிக்க நிகழ்வுகள் இல்லை', | ||
1727 | }; | ||
1728 | |||
1729 | var l70 = { | ||
1730 | code: 'th', | ||
1731 | week: { | ||
1732 | dow: 1, | ||
1733 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1734 | }, | ||
1735 | buttonText: { | ||
1736 | prev: 'ก่อนหน้า', | ||
1737 | next: 'ถัดไป', | ||
1738 | prevYear: 'ปีก่อนหน้า', | ||
1739 | nextYear: 'ปีถัดไป', | ||
1740 | year: 'ปี', | ||
1741 | today: 'วันนี้', | ||
1742 | month: 'เดือน', | ||
1743 | week: 'สัปดาห์', | ||
1744 | day: 'วัน', | ||
1745 | list: 'กำหนดการ', | ||
1746 | }, | ||
1747 | weekText: 'สัปดาห์', | ||
1748 | allDayText: 'ตลอดวัน', | ||
1749 | moreLinkText: 'เพิ่มเติม', | ||
1750 | noEventsText: 'ไม่มีกิจกรรมที่จะแสดง', | ||
1751 | }; | ||
1752 | |||
1753 | var l71 = { | ||
1754 | code: 'tr', | ||
1755 | week: { | ||
1756 | dow: 1, | ||
1757 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
1758 | }, | ||
1759 | buttonText: { | ||
1760 | prev: 'geri', | ||
1761 | next: 'ileri', | ||
1762 | today: 'bugün', | ||
1763 | year: 'Yıl', | ||
1764 | month: 'Ay', | ||
1765 | week: 'Hafta', | ||
1766 | day: 'Gün', | ||
1767 | list: 'Ajanda', | ||
1768 | }, | ||
1769 | weekText: 'Hf', | ||
1770 | allDayText: 'Tüm gün', | ||
1771 | moreLinkText: 'daha fazla', | ||
1772 | noEventsText: 'Gösterilecek etkinlik yok', | ||
1773 | }; | ||
1774 | |||
1775 | var l72 = { | ||
1776 | code: 'ug', | ||
1777 | buttonText: { | ||
1778 | prev: 'ئالدىنقى', | ||
1779 | next: 'كېيىنكى', | ||
1780 | today: 'بۈگۈن', | ||
1781 | year: 'يىل', | ||
1782 | month: 'ئاي', | ||
1783 | week: 'ھەپتە', | ||
1784 | day: 'كۈن', | ||
1785 | list: 'كۈنتەرتىپ', | ||
1786 | }, | ||
1787 | allDayText: 'پۈتۈن كۈن', | ||
1788 | }; | ||
1789 | |||
1790 | var l73 = { | ||
1791 | code: 'uk', | ||
1792 | week: { | ||
1793 | dow: 1, | ||
1794 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
1795 | }, | ||
1796 | buttonText: { | ||
1797 | prev: 'Попередній', | ||
1798 | next: 'далі', | ||
1799 | today: 'Сьогодні', | ||
1800 | year: 'рік', | ||
1801 | month: 'Місяць', | ||
1802 | week: 'Тиждень', | ||
1803 | day: 'День', | ||
1804 | list: 'Порядок денний', | ||
1805 | }, | ||
1806 | weekText: 'Тиж', | ||
1807 | allDayText: 'Увесь день', | ||
1808 | moreLinkText(n) { | ||
1809 | return '+ще ' + n + '...'; | ||
1810 | }, | ||
1811 | noEventsText: 'Немає подій для відображення', | ||
1812 | }; | ||
1813 | |||
1814 | var l74 = { | ||
1815 | code: 'uz-cy', | ||
1816 | week: { | ||
1817 | dow: 1, | ||
1818 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1819 | }, | ||
1820 | buttonText: { | ||
1821 | prev: 'Олин', | ||
1822 | next: 'Кейин', | ||
1823 | today: 'Бугун', | ||
1824 | month: 'Ой', | ||
1825 | week: 'Ҳафта', | ||
1826 | day: 'Кун', | ||
1827 | list: 'Кун тартиби', | ||
1828 | }, | ||
1829 | weekText: 'Ҳафта', | ||
1830 | allDayText: 'Кун бўйича', | ||
1831 | moreLinkText(n) { | ||
1832 | return '+ яна ' + n; | ||
1833 | }, | ||
1834 | noEventsText: 'Кўрсатиш учун воқеалар йўқ', | ||
1835 | }; | ||
1836 | |||
1837 | var l75 = { | ||
1838 | code: 'uz', | ||
1839 | week: { | ||
1840 | dow: 1, | ||
1841 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1842 | }, | ||
1843 | buttonText: { | ||
1844 | prev: 'Oldingi', | ||
1845 | next: 'Keyingi', | ||
1846 | today: 'Bugun', | ||
1847 | year: 'Yil', | ||
1848 | month: 'Oy', | ||
1849 | week: 'Xafta', | ||
1850 | day: 'Kun', | ||
1851 | list: 'Kun tartibi', | ||
1852 | }, | ||
1853 | allDayText: 'Kun bo\'yi', | ||
1854 | moreLinkText(n) { | ||
1855 | return '+ yana ' + n; | ||
1856 | }, | ||
1857 | noEventsText: 'Ko\'rsatish uchun voqealar yo\'q', | ||
1858 | }; | ||
1859 | |||
1860 | var l76 = { | ||
1861 | code: 'vi', | ||
1862 | week: { | ||
1863 | dow: 1, | ||
1864 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1865 | }, | ||
1866 | buttonText: { | ||
1867 | prev: 'Trước', | ||
1868 | next: 'Tiếp', | ||
1869 | today: 'Hôm nay', | ||
1870 | year: 'Năm', | ||
1871 | month: 'Tháng', | ||
1872 | week: 'Tuần', | ||
1873 | day: 'Ngày', | ||
1874 | list: 'Lịch biểu', | ||
1875 | }, | ||
1876 | weekText: 'Tu', | ||
1877 | allDayText: 'Cả ngày', | ||
1878 | moreLinkText(n) { | ||
1879 | return '+ thêm ' + n; | ||
1880 | }, | ||
1881 | noEventsText: 'Không có sự kiện để hiển thị', | ||
1882 | }; | ||
1883 | |||
1884 | var l77 = { | ||
1885 | code: 'zh-cn', | ||
1886 | week: { | ||
1887 | // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 | ||
1888 | dow: 1, | ||
1889 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
1890 | }, | ||
1891 | buttonText: { | ||
1892 | prev: '上月', | ||
1893 | next: '下月', | ||
1894 | today: '今天', | ||
1895 | year: '年', | ||
1896 | month: '月', | ||
1897 | week: '周', | ||
1898 | day: '日', | ||
1899 | list: '日程', | ||
1900 | }, | ||
1901 | weekText: '周', | ||
1902 | allDayText: '全天', | ||
1903 | moreLinkText(n) { | ||
1904 | return '另外 ' + n + ' 个'; | ||
1905 | }, | ||
1906 | noEventsText: '没有事件显示', | ||
1907 | }; | ||
1908 | |||
1909 | var l78 = { | ||
1910 | code: 'zh-tw', | ||
1911 | buttonText: { | ||
1912 | prev: '上個', | ||
1913 | next: '下個', | ||
1914 | today: '今天', | ||
1915 | year: '年', | ||
1916 | month: '月', | ||
1917 | week: '週', | ||
1918 | day: '天', | ||
1919 | list: '活動列表', | ||
1920 | }, | ||
1921 | weekText: '週', | ||
1922 | allDayText: '整天', | ||
1923 | moreLinkText: '顯示更多', | ||
1924 | noEventsText: '沒有任何活動', | ||
1925 | }; | ||
1926 | |||
1927 | var localesAll = [ | ||
1928 | l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, l32, l33, l34, l35, l36, l37, l38, l39, l40, l41, l42, l43, l44, l45, l46, l47, l48, l49, l50, l51, l52, l53, l54, l55, l56, l57, l58, l59, l60, l61, l62, l63, l64, l65, l66, l67, l68, l69, l70, l71, l72, l73, l74, l75, l76, l77, l78, | ||
1929 | ]; | ||
1930 | |||
1931 | index_js.globalLocales.push(...localesAll); | ||
1932 | |||
1933 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales-all.global.min.js b/public/js/fullcalendar/packages/core/locales-all.global.min.js new file mode 100644 index 0000000..046d0ee --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales-all.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";function t(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}function n(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var o=[{code:"af",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Heeldag",moreLinkText:"Addisionele",noEventsText:"Daar is geen gebeurtenisse nie"},{code:"ar-dz",week:{dow:0,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-kw",week:{dow:0,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-ly",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-ma",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-sa",week:{dow:0,doy:6},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-tn",week:{dow:1,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"az",week:{dow:1,doy:4},buttonText:{prev:"Əvvəl",next:"Sonra",today:"Bu Gün",year:"Il",month:"Ay",week:"Həftə",day:"Gün",list:"Gündəm"},weekText:"Həftə",allDayText:"Bütün Gün",moreLinkText:e=>"+ daha çox "+e,noEventsText:"Göstərmək üçün hadisə yoxdur"},{code:"bg",week:{dow:1,doy:4},buttonText:{prev:"назад",next:"напред",today:"днес",year:"година",month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",moreLinkText:e=>"+още "+e,noEventsText:"Няма събития за показване"},{code:"bn",week:{dow:0,doy:6},buttonText:{prev:"পেছনে",next:"সামনে",today:"আজ",year:"বছর",month:"মাস",week:"সপ্তাহ",day:"দিন",list:"তালিকা"},weekText:"সপ্তাহ",allDayText:"সারাদিন",moreLinkText:e=>"+অন্যান্য "+e,noEventsText:"কোনো ইভেন্ট নেই"},{code:"bs",week:{dow:1,doy:7},buttonText:{prev:"Prošli",next:"Sljedeći",today:"Danas",year:"Godina",month:"Mjesec",week:"Sedmica",day:"Dan",list:"Raspored"},weekText:"Sed",allDayText:"Cijeli dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nema događaja za prikazivanje"},{code:"ca",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Següent",today:"Avui",year:"Any",month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},weekText:"Set",allDayText:"Tot el dia",moreLinkText:"més",noEventsText:"No hi ha esdeveniments per mostrar"},{code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",year:"Rok",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:e=>"+další: "+e,noEventsText:"Žádné akce k zobrazení"},{code:"cy",week:{dow:1,doy:4},buttonText:{prev:"Blaenorol",next:"Nesaf",today:"Heddiw",year:"Blwyddyn",month:"Mis",week:"Wythnos",day:"Dydd",list:"Rhestr"},weekText:"Wythnos",allDayText:"Trwy'r dydd",moreLinkText:"Mwy",noEventsText:"Dim digwyddiadau"},{code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",year:"År",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"},{code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${t(e)} ${e}`,next:e=>`Nächste${t(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${t(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"},{code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${n(e)} ${e}`,next:e=>`Nächste${n(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${n(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"},{code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",year:"Ετος",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"},{code:"en-au",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"en-nz",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"eo",week:{dow:1,doy:4},buttonText:{prev:"Antaŭa",next:"Sekva",today:"Hodiaŭ",year:"Jaro",month:"Monato",week:"Semajno",day:"Tago",list:"Tagordo"},weekText:"Sm",allDayText:"Tuta tago",moreLinkText:"pli",noEventsText:"Neniuj eventoj por montri"},{code:"es",week:{dow:0,doy:6},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",year:"Año",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekText:"Sm",allDayText:"Todo el día",moreLinkText:"más",noEventsText:"No hay eventos para mostrar"},{code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",year:"Año",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:e=>"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:e=>`Mostrar ${e} eventos más`,noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"},{code:"et",week:{dow:1,doy:4},buttonText:{prev:"Eelnev",next:"Järgnev",today:"Täna",year:"Aasta",month:"Kuu",week:"Nädal",day:"Päev",list:"Päevakord"},weekText:"näd",allDayText:"Kogu päev",moreLinkText:e=>"+ veel "+e,noEventsText:"Kuvamiseks puuduvad sündmused"},{code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",year:"Urtea",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"},{code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",year:"سال",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:e=>"بیش از "+e,noEventsText:"هیچ رویدادی به نمایش"},{code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",year:"Vuosi",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"},{code:"fr",buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"fr-ch",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Courant",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sm",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",weekTextLong:"Semaine",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"gl",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Seg",today:"Hoxe",year:"Ano",month:"Mes",week:"Semana",day:"Día",list:"Axenda"},buttonHints:{prev:"$0 antes",next:"$0 seguinte",today:e=>"Día"===e?"Hoxe":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Vista "+("Semana"===e?"da":"do")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo o día",moreLinkText:"máis",moreLinkHint:e=>`Amosar ${e} eventos máis`,noEventsText:"Non hai eventos para amosar",navLinkHint:"Ir ao $0",closeHint:"Pechar",timeHint:"A hora",eventHint:"Evento"},{code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",year:"שנה",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"נוספים",noEventsText:"אין אירועים להצגה",weekText:"שבוע"},{code:"hi",week:{dow:0,doy:6},buttonText:{prev:"पिछला",next:"अगला",today:"आज",year:"वर्ष",month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},weekText:"हफ्ता",allDayText:"सभी दिन",moreLinkText:e=>"+अधिक "+e,noEventsText:"कोई घटनाओं को प्रदर्शित करने के लिए"},{code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",year:"Godina",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nema događaja za prikaz"},{code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",year:"Év",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"},{code:"hy-am",week:{dow:1,doy:4},buttonText:{prev:"Նախորդ",next:"Հաջորդ",today:"Այսօր",year:"Տարի",month:"Ամիս",week:"Շաբաթ",day:"Օր",list:"Օրվա ցուցակ"},weekText:"Շաբ",allDayText:"Ամբողջ օր",moreLinkText:e=>"+ ևս "+e,noEventsText:"Բացակայում է իրադարձությունը ցուցադրելու"},{code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sehari penuh",moreLinkText:"lebih",noEventsText:"Tidak ada acara untuk ditampilkan"},{code:"is",week:{dow:1,doy:4},buttonText:{prev:"Fyrri",next:"Næsti",today:"Í dag",year:"Ár",month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},weekText:"Vika",allDayText:"Allan daginn",moreLinkText:"meira",noEventsText:"Engir viðburðir til að sýna"},{code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",year:"Anno",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:e=>"+altri "+e,noEventsText:"Non ci sono eventi da visualizzare"},{code:"ja",buttonText:{prev:"前",next:"次",today:"今日",year:"年",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:e=>"他 "+e+" 件",noEventsText:"表示する予定はありません"},{code:"ka",week:{dow:1,doy:7},buttonText:{prev:"წინა",next:"შემდეგი",today:"დღეს",year:"წელიწადი",month:"თვე",week:"კვირა",day:"დღე",list:"დღის წესრიგი"},weekText:"კვ",allDayText:"მთელი დღე",moreLinkText:e=>"+ კიდევ "+e,noEventsText:"ღონისძიებები არ არის"},{code:"kk",week:{dow:1,doy:7},buttonText:{prev:"Алдыңғы",next:"Келесі",today:"Бүгін",year:"Жыл",month:"Ай",week:"Апта",day:"Күн",list:"Күн тәртібі"},weekText:"Не",allDayText:"Күні бойы",moreLinkText:e=>"+ тағы "+e,noEventsText:"Көрсету үшін оқиғалар жоқ"},{code:"km",week:{dow:1,doy:4},buttonText:{prev:"មុន",next:"បន្ទាប់",today:"ថ្ងៃនេះ",year:"ឆ្នាំ",month:"ខែ",week:"សប្តាហ៍",day:"ថ្ងៃ",list:"បញ្ជី"},weekText:"សប្តាហ៍",allDayText:"ពេញមួយថ្ងៃ",moreLinkText:"ច្រើនទៀត",noEventsText:"គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ"},{code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",year:"년도",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"},{code:"ku",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"پێشتر",next:"دواتر",today:"ئەمڕو",year:"ساڵ",month:"مانگ",week:"هەفتە",day:"ڕۆژ",list:"بەرنامە"},weekText:"هەفتە",allDayText:"هەموو ڕۆژەکە",moreLinkText:"زیاتر",noEventsText:"هیچ ڕووداوێك نیە"},{code:"lb",week:{dow:1,doy:4},buttonText:{prev:"Zréck",next:"Weider",today:"Haut",year:"Joer",month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},weekText:"W",allDayText:"Ganzen Dag",moreLinkText:"méi",noEventsText:"Nee Evenementer ze affichéieren"},{code:"lt",week:{dow:1,doy:4},buttonText:{prev:"Atgal",next:"Pirmyn",today:"Šiandien",year:"Metai",month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},weekText:"SAV",allDayText:"Visą dieną",moreLinkText:"daugiau",noEventsText:"Nėra įvykių rodyti"},{code:"lv",week:{dow:1,doy:4},buttonText:{prev:"Iepr.",next:"Nāk.",today:"Šodien",year:"Gads",month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},weekText:"Ned.",allDayText:"Visu dienu",moreLinkText:e=>"+vēl "+e,noEventsText:"Nav notikumu"},{code:"mk",buttonText:{prev:"претходно",next:"следно",today:"Денес",year:"година",month:"Месец",week:"Недела",day:"Ден",list:"График"},weekText:"Сед",allDayText:"Цел ден",moreLinkText:e=>"+повеќе "+e,noEventsText:"Нема настани за прикажување"},{code:"ms",week:{dow:1,doy:7},buttonText:{prev:"Sebelum",next:"Selepas",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sepanjang hari",moreLinkText:e=>"masih ada "+e+" acara",noEventsText:"Tiada peristiwa untuk dipaparkan"},{code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",year:"År",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:e=>`Vis ${e} flere hendelse${1===e?"":"r"}`},{code:"ne",week:{dow:7,doy:1},buttonText:{prev:"अघिल्लो",next:"अर्को",today:"आज",year:"वर्ष",month:"महिना",week:"हप्ता",day:"दिन",list:"सूची"},weekText:"हप्ता",allDayText:"दिनभरि",moreLinkText:"थप लिंक",noEventsText:"देखाउनको लागि कुनै घटनाहरू छैनन्"},{code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Lijst"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"},{code:"nn",week:{dow:1,doy:4},buttonText:{prev:"Førre",next:"Neste",today:"I dag",year:"År",month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},weekText:"Veke",allDayText:"Heile dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise"},{code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",year:"Rok",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"},{code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",prevYear:"Ano anterior",nextYear:"Próximo ano",year:"Ano",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},buttonHints:{prev:"$0 Anterior",next:"Próximo $0",today:e=>"Dia"===e?"Hoje":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Visualizar "+("Semana"===e?"a":"o")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"dia inteiro",moreLinkText:e=>"mais +"+e,moreLinkHint:e=>`Mostrar mais ${e} eventos`,noEventsText:"Não há eventos para mostrar",navLinkHint:"Ir para $0",closeHint:"Fechar",timeHint:"A hora",eventHint:"Evento"},{code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",year:"Ano",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"},{code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",year:"An",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:e=>"+alte "+e,noEventsText:"Nu există evenimente de afișat"},{code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",year:"Год",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:e=>"+ ещё "+e,noEventsText:"Нет событий для отображения"},{code:"si-lk",week:{dow:1,doy:4},buttonText:{prev:"පෙර",next:"පසු",today:"අද",year:"අවුරුදු",month:"මාසය",week:"සතිය",day:"දවස",list:"ලැයිස්තුව"},weekText:"සති",allDayText:"සියලු",moreLinkText:"තවත්",noEventsText:"මුකුත් නැත"},{code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",year:"Rok",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:e=>"+ďalšie: "+e,noEventsText:"Žiadne akcie na zobrazenie"},{code:"sl",week:{dow:1,doy:7},buttonText:{prev:"Prejšnji",next:"Naslednji",today:"Trenutni",year:"Leto",month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},weekText:"Teden",allDayText:"Ves dan",moreLinkText:"več",noEventsText:"Ni dogodkov za prikaz"},{code:"sm",buttonText:{prev:"Talu ai",next:"Mulimuli atu",today:"Aso nei",year:"Tausaga",month:"Masina",week:"Vaiaso",day:"Aso",list:"Faasologa"},weekText:"Vaiaso",allDayText:"Aso atoa",moreLinkText:"sili atu",noEventsText:"Leai ni mea na tutupu"},{code:"sq",week:{dow:1,doy:4},buttonText:{prev:"mbrapa",next:"Përpara",today:"Sot",year:"Viti",month:"Muaj",week:"Javë",day:"Ditë",list:"Listë"},weekText:"Ja",allDayText:"Gjithë ditën",moreLinkText:e=>"+më tepër "+e,noEventsText:"Nuk ka evente për të shfaqur"},{code:"sr-cyrl",week:{dow:1,doy:7},buttonText:{prev:"Претходна",next:"следећи",today:"Данас",year:"Година",month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},weekText:"Сед",allDayText:"Цео дан",moreLinkText:e=>"+ још "+e,noEventsText:"Нема догађаја за приказ"},{code:"sr",week:{dow:1,doy:7},buttonText:{prev:"Prethodna",next:"Sledeći",today:"Danas",year:"Godina",month:"Mеsеc",week:"Nеdеlja",day:"Dan",list:"Planеr"},weekText:"Sed",allDayText:"Cеo dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nеma događaja za prikaz"},{code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",year:"År",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:e=>"Föregående "+e.toLocaleLowerCase(),next:e=>"Nästa "+e.toLocaleLowerCase(),today:e=>("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:e=>`Visa ytterligare ${e} händelse${1===e?"":"r"}`,weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"},{code:"ta-in",week:{dow:1,doy:4},buttonText:{prev:"முந்தைய",next:"அடுத்தது",today:"இன்று",year:"ஆண்டு",month:"மாதம்",week:"வாரம்",day:"நாள்",list:"தினசரி அட்டவணை"},weekText:"வாரம்",allDayText:"நாள் முழுவதும்",moreLinkText:e=>"+ மேலும் "+e,noEventsText:"காண்பிக்க நிகழ்வுகள் இல்லை"},{code:"th",week:{dow:1,doy:4},buttonText:{prev:"ก่อนหน้า",next:"ถัดไป",prevYear:"ปีก่อนหน้า",nextYear:"ปีถัดไป",year:"ปี",today:"วันนี้",month:"เดือน",week:"สัปดาห์",day:"วัน",list:"กำหนดการ"},weekText:"สัปดาห์",allDayText:"ตลอดวัน",moreLinkText:"เพิ่มเติม",noEventsText:"ไม่มีกิจกรรมที่จะแสดง"},{code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",year:"Yıl",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"},{code:"ug",buttonText:{prev:"ئالدىنقى",next:"كېيىنكى",today:"بۈگۈن",year:"يىل",month:"ئاي",week:"ھەپتە",day:"كۈن",list:"كۈنتەرتىپ"},allDayText:"پۈتۈن كۈن"},{code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",year:"рік",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText:e=>"+ще "+e+"...",noEventsText:"Немає подій для відображення"},{code:"uz-cy",week:{dow:1,doy:4},buttonText:{prev:"Олин",next:"Кейин",today:"Бугун",month:"Ой",week:"Ҳафта",day:"Кун",list:"Кун тартиби"},weekText:"Ҳафта",allDayText:"Кун бўйича",moreLinkText:e=>"+ яна "+e,noEventsText:"Кўрсатиш учун воқеалар йўқ"},{code:"uz",week:{dow:1,doy:4},buttonText:{prev:"Oldingi",next:"Keyingi",today:"Bugun",year:"Yil",month:"Oy",week:"Xafta",day:"Kun",list:"Kun tartibi"},allDayText:"Kun bo'yi",moreLinkText:e=>"+ yana "+e,noEventsText:"Ko'rsatish uchun voqealar yo'q"},{code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",year:"Năm",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:e=>"+ thêm "+e,noEventsText:"Không có sự kiện để hiển thị"},{code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",year:"年",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:e=>"另外 "+e+" 个",noEventsText:"没有事件显示"},{code:"zh-tw",buttonText:{prev:"上個",next:"下個",today:"今天",year:"年",month:"月",week:"週",day:"天",list:"活動列表"},weekText:"週",allDayText:"整天",moreLinkText:"顯示更多",noEventsText:"沒有任何活動"}];FullCalendar.globalLocales.push(...o)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/af.global.js b/public/js/fullcalendar/packages/core/locales/af.global.js new file mode 100644 index 0000000..6ff6bf4 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/af.global.js | |||
@@ -0,0 +1,32 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'af', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Vorige', | ||
17 | next: 'Volgende', | ||
18 | today: 'Vandag', | ||
19 | year: 'Jaar', | ||
20 | month: 'Maand', | ||
21 | week: 'Week', | ||
22 | day: 'Dag', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | allDayText: 'Heeldag', | ||
26 | moreLinkText: 'Addisionele', | ||
27 | noEventsText: 'Daar is geen gebeurtenisse nie', | ||
28 | }; | ||
29 | |||
30 | index_js.globalLocales.push(locale); | ||
31 | |||
32 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/af.global.min.js b/public/js/fullcalendar/packages/core/locales/af.global.min.js new file mode 100644 index 0000000..31c858b --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/af.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"af",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Heeldag",moreLinkText:"Addisionele",noEventsText:"Daar is geen gebeurtenisse nie"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-dz.global.js b/public/js/fullcalendar/packages/core/locales/ar-dz.global.js new file mode 100644 index 0000000..9702ea1 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-dz.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ar-dz', | ||
11 | week: { | ||
12 | dow: 0, | ||
13 | doy: 4, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'السابق', | ||
18 | next: 'التالي', | ||
19 | today: 'اليوم', | ||
20 | year: 'سنة', | ||
21 | month: 'شهر', | ||
22 | week: 'أسبوع', | ||
23 | day: 'يوم', | ||
24 | list: 'أجندة', | ||
25 | }, | ||
26 | weekText: 'أسبوع', | ||
27 | allDayText: 'اليوم كله', | ||
28 | moreLinkText: 'أخرى', | ||
29 | noEventsText: 'أي أحداث لعرض', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-dz.global.min.js b/public/js/fullcalendar/packages/core/locales/ar-dz.global.min.js new file mode 100644 index 0000000..560f65b --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-dz.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ar-dz",week:{dow:0,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-kw.global.js b/public/js/fullcalendar/packages/core/locales/ar-kw.global.js new file mode 100644 index 0000000..bff8d23 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-kw.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ar-kw', | ||
11 | week: { | ||
12 | dow: 0, | ||
13 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'السابق', | ||
18 | next: 'التالي', | ||
19 | today: 'اليوم', | ||
20 | year: 'سنة', | ||
21 | month: 'شهر', | ||
22 | week: 'أسبوع', | ||
23 | day: 'يوم', | ||
24 | list: 'أجندة', | ||
25 | }, | ||
26 | weekText: 'أسبوع', | ||
27 | allDayText: 'اليوم كله', | ||
28 | moreLinkText: 'أخرى', | ||
29 | noEventsText: 'أي أحداث لعرض', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-kw.global.min.js b/public/js/fullcalendar/packages/core/locales/ar-kw.global.min.js new file mode 100644 index 0000000..7cba542 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-kw.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ar-kw",week:{dow:0,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-ly.global.js b/public/js/fullcalendar/packages/core/locales/ar-ly.global.js new file mode 100644 index 0000000..5c09881 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-ly.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ar-ly', | ||
11 | week: { | ||
12 | dow: 6, | ||
13 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'السابق', | ||
18 | next: 'التالي', | ||
19 | today: 'اليوم', | ||
20 | year: 'سنة', | ||
21 | month: 'شهر', | ||
22 | week: 'أسبوع', | ||
23 | day: 'يوم', | ||
24 | list: 'أجندة', | ||
25 | }, | ||
26 | weekText: 'أسبوع', | ||
27 | allDayText: 'اليوم كله', | ||
28 | moreLinkText: 'أخرى', | ||
29 | noEventsText: 'أي أحداث لعرض', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-ly.global.min.js b/public/js/fullcalendar/packages/core/locales/ar-ly.global.min.js new file mode 100644 index 0000000..1919ece --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-ly.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ar-ly",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-ma.global.js b/public/js/fullcalendar/packages/core/locales/ar-ma.global.js new file mode 100644 index 0000000..1a8432b --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-ma.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ar-ma', | ||
11 | week: { | ||
12 | dow: 6, | ||
13 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'السابق', | ||
18 | next: 'التالي', | ||
19 | today: 'اليوم', | ||
20 | year: 'سنة', | ||
21 | month: 'شهر', | ||
22 | week: 'أسبوع', | ||
23 | day: 'يوم', | ||
24 | list: 'أجندة', | ||
25 | }, | ||
26 | weekText: 'أسبوع', | ||
27 | allDayText: 'اليوم كله', | ||
28 | moreLinkText: 'أخرى', | ||
29 | noEventsText: 'أي أحداث لعرض', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-ma.global.min.js b/public/js/fullcalendar/packages/core/locales/ar-ma.global.min.js new file mode 100644 index 0000000..689cfd4 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-ma.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ar-ma",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-sa.global.js b/public/js/fullcalendar/packages/core/locales/ar-sa.global.js new file mode 100644 index 0000000..7717edc --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-sa.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ar-sa', | ||
11 | week: { | ||
12 | dow: 0, | ||
13 | doy: 6, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'السابق', | ||
18 | next: 'التالي', | ||
19 | today: 'اليوم', | ||
20 | year: 'سنة', | ||
21 | month: 'شهر', | ||
22 | week: 'أسبوع', | ||
23 | day: 'يوم', | ||
24 | list: 'أجندة', | ||
25 | }, | ||
26 | weekText: 'أسبوع', | ||
27 | allDayText: 'اليوم كله', | ||
28 | moreLinkText: 'أخرى', | ||
29 | noEventsText: 'أي أحداث لعرض', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-sa.global.min.js b/public/js/fullcalendar/packages/core/locales/ar-sa.global.min.js new file mode 100644 index 0000000..e383373 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-sa.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ar-sa",week:{dow:0,doy:6},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-tn.global.js b/public/js/fullcalendar/packages/core/locales/ar-tn.global.js new file mode 100644 index 0000000..5a82d3e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-tn.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ar-tn', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'السابق', | ||
18 | next: 'التالي', | ||
19 | today: 'اليوم', | ||
20 | year: 'سنة', | ||
21 | month: 'شهر', | ||
22 | week: 'أسبوع', | ||
23 | day: 'يوم', | ||
24 | list: 'أجندة', | ||
25 | }, | ||
26 | weekText: 'أسبوع', | ||
27 | allDayText: 'اليوم كله', | ||
28 | moreLinkText: 'أخرى', | ||
29 | noEventsText: 'أي أحداث لعرض', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar-tn.global.min.js b/public/js/fullcalendar/packages/core/locales/ar-tn.global.min.js new file mode 100644 index 0000000..2e94ddd --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar-tn.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ar-tn",week:{dow:1,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar.global.js b/public/js/fullcalendar/packages/core/locales/ar.global.js new file mode 100644 index 0000000..9eecbbd --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ar', | ||
11 | week: { | ||
12 | dow: 6, | ||
13 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'السابق', | ||
18 | next: 'التالي', | ||
19 | today: 'اليوم', | ||
20 | year: 'سنة', | ||
21 | month: 'شهر', | ||
22 | week: 'أسبوع', | ||
23 | day: 'يوم', | ||
24 | list: 'أجندة', | ||
25 | }, | ||
26 | weekText: 'أسبوع', | ||
27 | allDayText: 'اليوم كله', | ||
28 | moreLinkText: 'أخرى', | ||
29 | noEventsText: 'أي أحداث لعرض', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ar.global.min.js b/public/js/fullcalendar/packages/core/locales/ar.global.min.js new file mode 100644 index 0000000..bc89a1d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ar.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/az.global.js b/public/js/fullcalendar/packages/core/locales/az.global.js new file mode 100644 index 0000000..24ec228 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/az.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'az', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Əvvəl', | ||
17 | next: 'Sonra', | ||
18 | today: 'Bu Gün', | ||
19 | year: 'Il', | ||
20 | month: 'Ay', | ||
21 | week: 'Həftə', | ||
22 | day: 'Gün', | ||
23 | list: 'Gündəm', | ||
24 | }, | ||
25 | weekText: 'Həftə', | ||
26 | allDayText: 'Bütün Gün', | ||
27 | moreLinkText(n) { | ||
28 | return '+ daha çox ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Göstərmək üçün hadisə yoxdur', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/az.global.min.js b/public/js/fullcalendar/packages/core/locales/az.global.min.js new file mode 100644 index 0000000..c8e74b6 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/az.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"az",week:{dow:1,doy:4},buttonText:{prev:"Əvvəl",next:"Sonra",today:"Bu Gün",year:"Il",month:"Ay",week:"Həftə",day:"Gün",list:"Gündəm"},weekText:"Həftə",allDayText:"Bütün Gün",moreLinkText:e=>"+ daha çox "+e,noEventsText:"Göstərmək üçün hadisə yoxdur"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/bg.global.js b/public/js/fullcalendar/packages/core/locales/bg.global.js new file mode 100644 index 0000000..271e2b6 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/bg.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'bg', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'назад', | ||
17 | next: 'напред', | ||
18 | today: 'днес', | ||
19 | year: 'година', | ||
20 | month: 'Месец', | ||
21 | week: 'Седмица', | ||
22 | day: 'Ден', | ||
23 | list: 'График', | ||
24 | }, | ||
25 | allDayText: 'Цял ден', | ||
26 | moreLinkText(n) { | ||
27 | return '+още ' + n; | ||
28 | }, | ||
29 | noEventsText: 'Няма събития за показване', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/bg.global.min.js b/public/js/fullcalendar/packages/core/locales/bg.global.min.js new file mode 100644 index 0000000..d7ebb07 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/bg.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"bg",week:{dow:1,doy:4},buttonText:{prev:"назад",next:"напред",today:"днес",year:"година",month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",moreLinkText:e=>"+още "+e,noEventsText:"Няма събития за показване"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/bn.global.js b/public/js/fullcalendar/packages/core/locales/bn.global.js new file mode 100644 index 0000000..7037805 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/bn.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'bn', | ||
11 | week: { | ||
12 | dow: 0, | ||
13 | doy: 6, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'পেছনে', | ||
17 | next: 'সামনে', | ||
18 | today: 'আজ', | ||
19 | year: 'বছর', | ||
20 | month: 'মাস', | ||
21 | week: 'সপ্তাহ', | ||
22 | day: 'দিন', | ||
23 | list: 'তালিকা', | ||
24 | }, | ||
25 | weekText: 'সপ্তাহ', | ||
26 | allDayText: 'সারাদিন', | ||
27 | moreLinkText(n) { | ||
28 | return '+অন্যান্য ' + n; | ||
29 | }, | ||
30 | noEventsText: 'কোনো ইভেন্ট নেই', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/bn.global.min.js b/public/js/fullcalendar/packages/core/locales/bn.global.min.js new file mode 100644 index 0000000..c721f2e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/bn.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"bn",week:{dow:0,doy:6},buttonText:{prev:"পেছনে",next:"সামনে",today:"আজ",year:"বছর",month:"মাস",week:"সপ্তাহ",day:"দিন",list:"তালিকা"},weekText:"সপ্তাহ",allDayText:"সারাদিন",moreLinkText:e=>"+অন্যান্য "+e,noEventsText:"কোনো ইভেন্ট নেই"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/bs.global.js b/public/js/fullcalendar/packages/core/locales/bs.global.js new file mode 100644 index 0000000..c9ffc51 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/bs.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'bs', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Prošli', | ||
17 | next: 'Sljedeći', | ||
18 | today: 'Danas', | ||
19 | year: 'Godina', | ||
20 | month: 'Mjesec', | ||
21 | week: 'Sedmica', | ||
22 | day: 'Dan', | ||
23 | list: 'Raspored', | ||
24 | }, | ||
25 | weekText: 'Sed', | ||
26 | allDayText: 'Cijeli dan', | ||
27 | moreLinkText(n) { | ||
28 | return '+ još ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Nema događaja za prikazivanje', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/bs.global.min.js b/public/js/fullcalendar/packages/core/locales/bs.global.min.js new file mode 100644 index 0000000..f42c951 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/bs.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var a={code:"bs",week:{dow:1,doy:7},buttonText:{prev:"Prošli",next:"Sljedeći",today:"Danas",year:"Godina",month:"Mjesec",week:"Sedmica",day:"Dan",list:"Raspored"},weekText:"Sed",allDayText:"Cijeli dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nema događaja za prikazivanje"};FullCalendar.globalLocales.push(a)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ca.global.js b/public/js/fullcalendar/packages/core/locales/ca.global.js new file mode 100644 index 0000000..7d2391e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ca.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ca', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Anterior', | ||
17 | next: 'Següent', | ||
18 | today: 'Avui', | ||
19 | year: 'Any', | ||
20 | month: 'Mes', | ||
21 | week: 'Setmana', | ||
22 | day: 'Dia', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Set', | ||
26 | allDayText: 'Tot el dia', | ||
27 | moreLinkText: 'més', | ||
28 | noEventsText: 'No hi ha esdeveniments per mostrar', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ca.global.min.js b/public/js/fullcalendar/packages/core/locales/ca.global.min.js new file mode 100644 index 0000000..84932ef --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ca.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ca",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Següent",today:"Avui",year:"Any",month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},weekText:"Set",allDayText:"Tot el dia",moreLinkText:"més",noEventsText:"No hi ha esdeveniments per mostrar"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/cs.global.js b/public/js/fullcalendar/packages/core/locales/cs.global.js new file mode 100644 index 0000000..367711e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/cs.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'cs', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Dříve', | ||
17 | next: 'Později', | ||
18 | today: 'Nyní', | ||
19 | year: 'Rok', | ||
20 | month: 'Měsíc', | ||
21 | week: 'Týden', | ||
22 | day: 'Den', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Týd', | ||
26 | allDayText: 'Celý den', | ||
27 | moreLinkText(n) { | ||
28 | return '+další: ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Žádné akce k zobrazení', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/cs.global.min.js b/public/js/fullcalendar/packages/core/locales/cs.global.min.js new file mode 100644 index 0000000..5df71bc --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/cs.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var n={code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",year:"Rok",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:e=>"+další: "+e,noEventsText:"Žádné akce k zobrazení"};FullCalendar.globalLocales.push(n)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/cy.global.js b/public/js/fullcalendar/packages/core/locales/cy.global.js new file mode 100644 index 0000000..3ebb0e1 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/cy.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'cy', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Blaenorol', | ||
17 | next: 'Nesaf', | ||
18 | today: 'Heddiw', | ||
19 | year: 'Blwyddyn', | ||
20 | month: 'Mis', | ||
21 | week: 'Wythnos', | ||
22 | day: 'Dydd', | ||
23 | list: 'Rhestr', | ||
24 | }, | ||
25 | weekText: 'Wythnos', | ||
26 | allDayText: 'Trwy\'r dydd', | ||
27 | moreLinkText: 'Mwy', | ||
28 | noEventsText: 'Dim digwyddiadau', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/cy.global.min.js b/public/js/fullcalendar/packages/core/locales/cy.global.min.js new file mode 100644 index 0000000..75cea2a --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/cy.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"cy",week:{dow:1,doy:4},buttonText:{prev:"Blaenorol",next:"Nesaf",today:"Heddiw",year:"Blwyddyn",month:"Mis",week:"Wythnos",day:"Dydd",list:"Rhestr"},weekText:"Wythnos",allDayText:"Trwy'r dydd",moreLinkText:"Mwy",noEventsText:"Dim digwyddiadau"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/da.global.js b/public/js/fullcalendar/packages/core/locales/da.global.js new file mode 100644 index 0000000..d033e11 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/da.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'da', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Forrige', | ||
17 | next: 'Næste', | ||
18 | today: 'I dag', | ||
19 | year: 'År', | ||
20 | month: 'Måned', | ||
21 | week: 'Uge', | ||
22 | day: 'Dag', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Uge', | ||
26 | allDayText: 'Hele dagen', | ||
27 | moreLinkText: 'flere', | ||
28 | noEventsText: 'Ingen arrangementer at vise', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/da.global.min.js b/public/js/fullcalendar/packages/core/locales/da.global.min.js new file mode 100644 index 0000000..28cd7cc --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/da.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",year:"År",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/de-at.global.js b/public/js/fullcalendar/packages/core/locales/de-at.global.js new file mode 100644 index 0000000..c01eeab --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/de-at.global.js | |||
@@ -0,0 +1,69 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | function affix(buttonText) { | ||
10 | return (buttonText === 'Tag' || buttonText === 'Monat') ? 'r' : | ||
11 | buttonText === 'Jahr' ? 's' : ''; | ||
12 | } | ||
13 | var locale = { | ||
14 | code: 'de-at', | ||
15 | week: { | ||
16 | dow: 1, | ||
17 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
18 | }, | ||
19 | buttonText: { | ||
20 | prev: 'Zurück', | ||
21 | next: 'Vor', | ||
22 | today: 'Heute', | ||
23 | year: 'Jahr', | ||
24 | month: 'Monat', | ||
25 | week: 'Woche', | ||
26 | day: 'Tag', | ||
27 | list: 'Terminübersicht', | ||
28 | }, | ||
29 | weekText: 'KW', | ||
30 | weekTextLong: 'Woche', | ||
31 | allDayText: 'Ganztägig', | ||
32 | moreLinkText(n) { | ||
33 | return '+ weitere ' + n; | ||
34 | }, | ||
35 | noEventsText: 'Keine Ereignisse anzuzeigen', | ||
36 | buttonHints: { | ||
37 | prev(buttonText) { | ||
38 | return `Vorherige${affix(buttonText)} ${buttonText}`; | ||
39 | }, | ||
40 | next(buttonText) { | ||
41 | return `Nächste${affix(buttonText)} ${buttonText}`; | ||
42 | }, | ||
43 | today(buttonText) { | ||
44 | // → Heute, Diese Woche, Dieser Monat, Dieses Jahr | ||
45 | if (buttonText === 'Tag') { | ||
46 | return 'Heute'; | ||
47 | } | ||
48 | return `Diese${affix(buttonText)} ${buttonText}`; | ||
49 | }, | ||
50 | }, | ||
51 | viewHint(buttonText) { | ||
52 | // → Tagesansicht, Wochenansicht, Monatsansicht, Jahresansicht | ||
53 | const glue = buttonText === 'Woche' ? 'n' : buttonText === 'Monat' ? 's' : 'es'; | ||
54 | return buttonText + glue + 'ansicht'; | ||
55 | }, | ||
56 | navLinkHint: 'Gehe zu $0', | ||
57 | moreLinkHint(eventCnt) { | ||
58 | return 'Zeige ' + (eventCnt === 1 ? | ||
59 | 'ein weiteres Ereignis' : | ||
60 | eventCnt + ' weitere Ereignisse'); | ||
61 | }, | ||
62 | closeHint: 'Schließen', | ||
63 | timeHint: 'Uhrzeit', | ||
64 | eventHint: 'Ereignis', | ||
65 | }; | ||
66 | |||
67 | index_js.globalLocales.push(locale); | ||
68 | |||
69 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/de-at.global.min.js b/public/js/fullcalendar/packages/core/locales/de-at.global.min.js new file mode 100644 index 0000000..2bccce2 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/de-at.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";function t(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var n={code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${t(e)} ${e}`,next:e=>`Nächste${t(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${t(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};FullCalendar.globalLocales.push(n)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/de.global.js b/public/js/fullcalendar/packages/core/locales/de.global.js new file mode 100644 index 0000000..2b45fde --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/de.global.js | |||
@@ -0,0 +1,69 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | function affix(buttonText) { | ||
10 | return (buttonText === 'Tag' || buttonText === 'Monat') ? 'r' : | ||
11 | buttonText === 'Jahr' ? 's' : ''; | ||
12 | } | ||
13 | var locale = { | ||
14 | code: 'de', | ||
15 | week: { | ||
16 | dow: 1, | ||
17 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
18 | }, | ||
19 | buttonText: { | ||
20 | prev: 'Zurück', | ||
21 | next: 'Vor', | ||
22 | today: 'Heute', | ||
23 | year: 'Jahr', | ||
24 | month: 'Monat', | ||
25 | week: 'Woche', | ||
26 | day: 'Tag', | ||
27 | list: 'Terminübersicht', | ||
28 | }, | ||
29 | weekText: 'KW', | ||
30 | weekTextLong: 'Woche', | ||
31 | allDayText: 'Ganztägig', | ||
32 | moreLinkText(n) { | ||
33 | return '+ weitere ' + n; | ||
34 | }, | ||
35 | noEventsText: 'Keine Ereignisse anzuzeigen', | ||
36 | buttonHints: { | ||
37 | prev(buttonText) { | ||
38 | return `Vorherige${affix(buttonText)} ${buttonText}`; | ||
39 | }, | ||
40 | next(buttonText) { | ||
41 | return `Nächste${affix(buttonText)} ${buttonText}`; | ||
42 | }, | ||
43 | today(buttonText) { | ||
44 | // → Heute, Diese Woche, Dieser Monat, Dieses Jahr | ||
45 | if (buttonText === 'Tag') { | ||
46 | return 'Heute'; | ||
47 | } | ||
48 | return `Diese${affix(buttonText)} ${buttonText}`; | ||
49 | }, | ||
50 | }, | ||
51 | viewHint(buttonText) { | ||
52 | // → Tagesansicht, Wochenansicht, Monatsansicht, Jahresansicht | ||
53 | const glue = buttonText === 'Woche' ? 'n' : buttonText === 'Monat' ? 's' : 'es'; | ||
54 | return buttonText + glue + 'ansicht'; | ||
55 | }, | ||
56 | navLinkHint: 'Gehe zu $0', | ||
57 | moreLinkHint(eventCnt) { | ||
58 | return 'Zeige ' + (eventCnt === 1 ? | ||
59 | 'ein weiteres Ereignis' : | ||
60 | eventCnt + ' weitere Ereignisse'); | ||
61 | }, | ||
62 | closeHint: 'Schließen', | ||
63 | timeHint: 'Uhrzeit', | ||
64 | eventHint: 'Ereignis', | ||
65 | }; | ||
66 | |||
67 | index_js.globalLocales.push(locale); | ||
68 | |||
69 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/de.global.min.js b/public/js/fullcalendar/packages/core/locales/de.global.min.js new file mode 100644 index 0000000..57008c9 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/de.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";function t(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var n={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${t(e)} ${e}`,next:e=>`Nächste${t(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${t(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};FullCalendar.globalLocales.push(n)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/el.global.js b/public/js/fullcalendar/packages/core/locales/el.global.js new file mode 100644 index 0000000..1907aa2 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/el.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'el', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Προηγούμενος', | ||
17 | next: 'Επόμενος', | ||
18 | today: 'Σήμερα', | ||
19 | year: 'Ετος', | ||
20 | month: 'Μήνας', | ||
21 | week: 'Εβδομάδα', | ||
22 | day: 'Ημέρα', | ||
23 | list: 'Ατζέντα', | ||
24 | }, | ||
25 | weekText: 'Εβδ', | ||
26 | allDayText: 'Ολοήμερο', | ||
27 | moreLinkText: 'περισσότερα', | ||
28 | noEventsText: 'Δεν υπάρχουν γεγονότα προς εμφάνιση', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/el.global.min.js b/public/js/fullcalendar/packages/core/locales/el.global.min.js new file mode 100644 index 0000000..7b99513 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/el.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",year:"Ετος",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/en-au.global.js b/public/js/fullcalendar/packages/core/locales/en-au.global.js new file mode 100644 index 0000000..3f4c00a --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/en-au.global.js | |||
@@ -0,0 +1,29 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'en-au', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonHints: { | ||
16 | prev: 'Previous $0', | ||
17 | next: 'Next $0', | ||
18 | today: 'This $0', | ||
19 | }, | ||
20 | viewHint: '$0 view', | ||
21 | navLinkHint: 'Go to $0', | ||
22 | moreLinkHint(eventCnt) { | ||
23 | return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`; | ||
24 | }, | ||
25 | }; | ||
26 | |||
27 | index_js.globalLocales.push(locale); | ||
28 | |||
29 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/en-au.global.min.js b/public/js/fullcalendar/packages/core/locales/en-au.global.min.js new file mode 100644 index 0000000..46ff188 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/en-au.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var n={code:"en-au",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`};FullCalendar.globalLocales.push(n)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/en-gb.global.js b/public/js/fullcalendar/packages/core/locales/en-gb.global.js new file mode 100644 index 0000000..b824123 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/en-gb.global.js | |||
@@ -0,0 +1,29 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'en-gb', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonHints: { | ||
16 | prev: 'Previous $0', | ||
17 | next: 'Next $0', | ||
18 | today: 'This $0', | ||
19 | }, | ||
20 | viewHint: '$0 view', | ||
21 | navLinkHint: 'Go to $0', | ||
22 | moreLinkHint(eventCnt) { | ||
23 | return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`; | ||
24 | }, | ||
25 | }; | ||
26 | |||
27 | index_js.globalLocales.push(locale); | ||
28 | |||
29 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/en-gb.global.min.js b/public/js/fullcalendar/packages/core/locales/en-gb.global.min.js new file mode 100644 index 0000000..63f7dc2 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/en-gb.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var n={code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`};FullCalendar.globalLocales.push(n)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/en-nz.global.js b/public/js/fullcalendar/packages/core/locales/en-nz.global.js new file mode 100644 index 0000000..8ad907d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/en-nz.global.js | |||
@@ -0,0 +1,29 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'en-nz', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonHints: { | ||
16 | prev: 'Previous $0', | ||
17 | next: 'Next $0', | ||
18 | today: 'This $0', | ||
19 | }, | ||
20 | viewHint: '$0 view', | ||
21 | navLinkHint: 'Go to $0', | ||
22 | moreLinkHint(eventCnt) { | ||
23 | return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`; | ||
24 | }, | ||
25 | }; | ||
26 | |||
27 | index_js.globalLocales.push(locale); | ||
28 | |||
29 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/en-nz.global.min.js b/public/js/fullcalendar/packages/core/locales/en-nz.global.min.js new file mode 100644 index 0000000..ef59c0b --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/en-nz.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var n={code:"en-nz",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`};FullCalendar.globalLocales.push(n)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/eo.global.js b/public/js/fullcalendar/packages/core/locales/eo.global.js new file mode 100644 index 0000000..64cbe55 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/eo.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'eo', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Antaŭa', | ||
17 | next: 'Sekva', | ||
18 | today: 'Hodiaŭ', | ||
19 | year: 'Jaro', | ||
20 | month: 'Monato', | ||
21 | week: 'Semajno', | ||
22 | day: 'Tago', | ||
23 | list: 'Tagordo', | ||
24 | }, | ||
25 | weekText: 'Sm', | ||
26 | allDayText: 'Tuta tago', | ||
27 | moreLinkText: 'pli', | ||
28 | noEventsText: 'Neniuj eventoj por montri', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/eo.global.min.js b/public/js/fullcalendar/packages/core/locales/eo.global.min.js new file mode 100644 index 0000000..fcca6a2 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/eo.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"eo",week:{dow:1,doy:4},buttonText:{prev:"Antaŭa",next:"Sekva",today:"Hodiaŭ",year:"Jaro",month:"Monato",week:"Semajno",day:"Tago",list:"Tagordo"},weekText:"Sm",allDayText:"Tuta tago",moreLinkText:"pli",noEventsText:"Neniuj eventoj por montri"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/es-us.global.js b/public/js/fullcalendar/packages/core/locales/es-us.global.js new file mode 100644 index 0000000..3760b56 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/es-us.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'es', | ||
11 | week: { | ||
12 | dow: 0, | ||
13 | doy: 6, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Ant', | ||
17 | next: 'Sig', | ||
18 | today: 'Hoy', | ||
19 | year: 'Año', | ||
20 | month: 'Mes', | ||
21 | week: 'Semana', | ||
22 | day: 'Día', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Sm', | ||
26 | allDayText: 'Todo el día', | ||
27 | moreLinkText: 'más', | ||
28 | noEventsText: 'No hay eventos para mostrar', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/es-us.global.min.js b/public/js/fullcalendar/packages/core/locales/es-us.global.min.js new file mode 100644 index 0000000..6c95615 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/es-us.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"es",week:{dow:0,doy:6},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",year:"Año",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekText:"Sm",allDayText:"Todo el día",moreLinkText:"más",noEventsText:"No hay eventos para mostrar"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/es.global.js b/public/js/fullcalendar/packages/core/locales/es.global.js new file mode 100644 index 0000000..29e03f1 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/es.global.js | |||
@@ -0,0 +1,52 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'es', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Ant', | ||
17 | next: 'Sig', | ||
18 | today: 'Hoy', | ||
19 | year: 'Año', | ||
20 | month: 'Mes', | ||
21 | week: 'Semana', | ||
22 | day: 'Día', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | buttonHints: { | ||
26 | prev: '$0 antes', | ||
27 | next: '$0 siguiente', | ||
28 | today(buttonText) { | ||
29 | return (buttonText === 'Día') ? 'Hoy' : | ||
30 | ((buttonText === 'Semana') ? 'Esta' : 'Este') + ' ' + buttonText.toLocaleLowerCase(); | ||
31 | }, | ||
32 | }, | ||
33 | viewHint(buttonText) { | ||
34 | return 'Vista ' + (buttonText === 'Semana' ? 'de la' : 'del') + ' ' + buttonText.toLocaleLowerCase(); | ||
35 | }, | ||
36 | weekText: 'Sm', | ||
37 | weekTextLong: 'Semana', | ||
38 | allDayText: 'Todo el día', | ||
39 | moreLinkText: 'más', | ||
40 | moreLinkHint(eventCnt) { | ||
41 | return `Mostrar ${eventCnt} eventos más`; | ||
42 | }, | ||
43 | noEventsText: 'No hay eventos para mostrar', | ||
44 | navLinkHint: 'Ir al $0', | ||
45 | closeHint: 'Cerrar', | ||
46 | timeHint: 'La hora', | ||
47 | eventHint: 'Evento', | ||
48 | }; | ||
49 | |||
50 | index_js.globalLocales.push(locale); | ||
51 | |||
52 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/es.global.min.js b/public/js/fullcalendar/packages/core/locales/es.global.min.js new file mode 100644 index 0000000..d5f0b31 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/es.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",year:"Año",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:e=>"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:e=>`Mostrar ${e} eventos más`,noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/et.global.js b/public/js/fullcalendar/packages/core/locales/et.global.js new file mode 100644 index 0000000..d964bf3 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/et.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'et', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Eelnev', | ||
17 | next: 'Järgnev', | ||
18 | today: 'Täna', | ||
19 | year: 'Aasta', | ||
20 | month: 'Kuu', | ||
21 | week: 'Nädal', | ||
22 | day: 'Päev', | ||
23 | list: 'Päevakord', | ||
24 | }, | ||
25 | weekText: 'näd', | ||
26 | allDayText: 'Kogu päev', | ||
27 | moreLinkText(n) { | ||
28 | return '+ veel ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Kuvamiseks puuduvad sündmused', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/et.global.min.js b/public/js/fullcalendar/packages/core/locales/et.global.min.js new file mode 100644 index 0000000..43ce9db --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/et.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var a={code:"et",week:{dow:1,doy:4},buttonText:{prev:"Eelnev",next:"Järgnev",today:"Täna",year:"Aasta",month:"Kuu",week:"Nädal",day:"Päev",list:"Päevakord"},weekText:"näd",allDayText:"Kogu päev",moreLinkText:e=>"+ veel "+e,noEventsText:"Kuvamiseks puuduvad sündmused"};FullCalendar.globalLocales.push(a)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/eu.global.js b/public/js/fullcalendar/packages/core/locales/eu.global.js new file mode 100644 index 0000000..5084791 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/eu.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'eu', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Aur', | ||
17 | next: 'Hur', | ||
18 | today: 'Gaur', | ||
19 | year: 'Urtea', | ||
20 | month: 'Hilabetea', | ||
21 | week: 'Astea', | ||
22 | day: 'Eguna', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'As', | ||
26 | allDayText: 'Egun osoa', | ||
27 | moreLinkText: 'gehiago', | ||
28 | noEventsText: 'Ez dago ekitaldirik erakusteko', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/eu.global.min.js b/public/js/fullcalendar/packages/core/locales/eu.global.min.js new file mode 100644 index 0000000..b3bcd30 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/eu.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",year:"Urtea",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fa.global.js b/public/js/fullcalendar/packages/core/locales/fa.global.js new file mode 100644 index 0000000..ca54ee3 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fa.global.js | |||
@@ -0,0 +1,36 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'fa', | ||
11 | week: { | ||
12 | dow: 6, | ||
13 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'قبلی', | ||
18 | next: 'بعدی', | ||
19 | today: 'امروز', | ||
20 | year: 'سال', | ||
21 | month: 'ماه', | ||
22 | week: 'هفته', | ||
23 | day: 'روز', | ||
24 | list: 'برنامه', | ||
25 | }, | ||
26 | weekText: 'هف', | ||
27 | allDayText: 'تمام روز', | ||
28 | moreLinkText(n) { | ||
29 | return 'بیش از ' + n; | ||
30 | }, | ||
31 | noEventsText: 'هیچ رویدادی به نمایش', | ||
32 | }; | ||
33 | |||
34 | index_js.globalLocales.push(locale); | ||
35 | |||
36 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fa.global.min.js b/public/js/fullcalendar/packages/core/locales/fa.global.min.js new file mode 100644 index 0000000..b3d6019 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fa.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",year:"سال",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:e=>"بیش از "+e,noEventsText:"هیچ رویدادی به نمایش"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fi.global.js b/public/js/fullcalendar/packages/core/locales/fi.global.js new file mode 100644 index 0000000..fae57ac --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fi.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'fi', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Edellinen', | ||
17 | next: 'Seuraava', | ||
18 | today: 'Tänään', | ||
19 | year: 'Vuosi', | ||
20 | month: 'Kuukausi', | ||
21 | week: 'Viikko', | ||
22 | day: 'Päivä', | ||
23 | list: 'Tapahtumat', | ||
24 | }, | ||
25 | weekText: 'Vk', | ||
26 | allDayText: 'Koko päivä', | ||
27 | moreLinkText: 'lisää', | ||
28 | noEventsText: 'Ei näytettäviä tapahtumia', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fi.global.min.js b/public/js/fullcalendar/packages/core/locales/fi.global.min.js new file mode 100644 index 0000000..2b0bacc --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fi.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",year:"Vuosi",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fr-ca.global.js b/public/js/fullcalendar/packages/core/locales/fr-ca.global.js new file mode 100644 index 0000000..92f4bc4 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fr-ca.global.js | |||
@@ -0,0 +1,29 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'fr', | ||
11 | buttonText: { | ||
12 | prev: 'Précédent', | ||
13 | next: 'Suivant', | ||
14 | today: 'Aujourd\'hui', | ||
15 | year: 'Année', | ||
16 | month: 'Mois', | ||
17 | week: 'Semaine', | ||
18 | day: 'Jour', | ||
19 | list: 'Mon planning', | ||
20 | }, | ||
21 | weekText: 'Sem.', | ||
22 | allDayText: 'Toute la journée', | ||
23 | moreLinkText: 'en plus', | ||
24 | noEventsText: 'Aucun évènement à afficher', | ||
25 | }; | ||
26 | |||
27 | index_js.globalLocales.push(locale); | ||
28 | |||
29 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fr-ca.global.min.js b/public/js/fullcalendar/packages/core/locales/fr-ca.global.min.js new file mode 100644 index 0000000..339ce95 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fr-ca.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"fr",buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fr-ch.global.js b/public/js/fullcalendar/packages/core/locales/fr-ch.global.js new file mode 100644 index 0000000..b5986b9 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fr-ch.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'fr-ch', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Précédent', | ||
17 | next: 'Suivant', | ||
18 | today: 'Courant', | ||
19 | year: 'Année', | ||
20 | month: 'Mois', | ||
21 | week: 'Semaine', | ||
22 | day: 'Jour', | ||
23 | list: 'Mon planning', | ||
24 | }, | ||
25 | weekText: 'Sm', | ||
26 | allDayText: 'Toute la journée', | ||
27 | moreLinkText: 'en plus', | ||
28 | noEventsText: 'Aucun évènement à afficher', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fr-ch.global.min.js b/public/js/fullcalendar/packages/core/locales/fr-ch.global.min.js new file mode 100644 index 0000000..de265b6 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fr-ch.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"fr-ch",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Courant",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sm",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fr.global.js b/public/js/fullcalendar/packages/core/locales/fr.global.js new file mode 100644 index 0000000..0f6a712 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fr.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'fr', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Précédent', | ||
17 | next: 'Suivant', | ||
18 | today: 'Aujourd\'hui', | ||
19 | year: 'Année', | ||
20 | month: 'Mois', | ||
21 | week: 'Semaine', | ||
22 | day: 'Jour', | ||
23 | list: 'Planning', | ||
24 | }, | ||
25 | weekText: 'Sem.', | ||
26 | weekTextLong: 'Semaine', | ||
27 | allDayText: 'Toute la journée', | ||
28 | moreLinkText: 'en plus', | ||
29 | noEventsText: 'Aucun évènement à afficher', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/fr.global.min.js b/public/js/fullcalendar/packages/core/locales/fr.global.min.js new file mode 100644 index 0000000..7f0886c --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/fr.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",weekTextLong:"Semaine",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/gl.global.js b/public/js/fullcalendar/packages/core/locales/gl.global.js new file mode 100644 index 0000000..cc297f4 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/gl.global.js | |||
@@ -0,0 +1,52 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'gl', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Ant', | ||
17 | next: 'Seg', | ||
18 | today: 'Hoxe', | ||
19 | year: 'Ano', | ||
20 | month: 'Mes', | ||
21 | week: 'Semana', | ||
22 | day: 'Día', | ||
23 | list: 'Axenda', | ||
24 | }, | ||
25 | buttonHints: { | ||
26 | prev: '$0 antes', | ||
27 | next: '$0 seguinte', | ||
28 | today(buttonText) { | ||
29 | return (buttonText === 'Día') ? 'Hoxe' : | ||
30 | ((buttonText === 'Semana') ? 'Esta' : 'Este') + ' ' + buttonText.toLocaleLowerCase(); | ||
31 | }, | ||
32 | }, | ||
33 | viewHint(buttonText) { | ||
34 | return 'Vista ' + (buttonText === 'Semana' ? 'da' : 'do') + ' ' + buttonText.toLocaleLowerCase(); | ||
35 | }, | ||
36 | weekText: 'Sm', | ||
37 | weekTextLong: 'Semana', | ||
38 | allDayText: 'Todo o día', | ||
39 | moreLinkText: 'máis', | ||
40 | moreLinkHint(eventCnt) { | ||
41 | return `Amosar ${eventCnt} eventos máis`; | ||
42 | }, | ||
43 | noEventsText: 'Non hai eventos para amosar', | ||
44 | navLinkHint: 'Ir ao $0', | ||
45 | closeHint: 'Pechar', | ||
46 | timeHint: 'A hora', | ||
47 | eventHint: 'Evento', | ||
48 | }; | ||
49 | |||
50 | index_js.globalLocales.push(locale); | ||
51 | |||
52 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/gl.global.min.js b/public/js/fullcalendar/packages/core/locales/gl.global.min.js new file mode 100644 index 0000000..0464163 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/gl.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var a={code:"gl",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Seg",today:"Hoxe",year:"Ano",month:"Mes",week:"Semana",day:"Día",list:"Axenda"},buttonHints:{prev:"$0 antes",next:"$0 seguinte",today:e=>"Día"===e?"Hoxe":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Vista "+("Semana"===e?"da":"do")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo o día",moreLinkText:"máis",moreLinkHint:e=>`Amosar ${e} eventos máis`,noEventsText:"Non hai eventos para amosar",navLinkHint:"Ir ao $0",closeHint:"Pechar",timeHint:"A hora",eventHint:"Evento"};FullCalendar.globalLocales.push(a)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/he.global.js b/public/js/fullcalendar/packages/core/locales/he.global.js new file mode 100644 index 0000000..a48d134 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/he.global.js | |||
@@ -0,0 +1,30 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'he', | ||
11 | direction: 'rtl', | ||
12 | buttonText: { | ||
13 | prev: 'הקודם', | ||
14 | next: 'הבא', | ||
15 | today: 'היום', | ||
16 | year: 'שנה', | ||
17 | month: 'חודש', | ||
18 | week: 'שבוע', | ||
19 | day: 'יום', | ||
20 | list: 'סדר יום', | ||
21 | }, | ||
22 | allDayText: 'כל היום', | ||
23 | moreLinkText: 'נוספים', | ||
24 | noEventsText: 'אין אירועים להצגה', | ||
25 | weekText: 'שבוע', | ||
26 | }; | ||
27 | |||
28 | index_js.globalLocales.push(locale); | ||
29 | |||
30 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/he.global.min.js b/public/js/fullcalendar/packages/core/locales/he.global.min.js new file mode 100644 index 0000000..459495b --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/he.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",year:"שנה",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"נוספים",noEventsText:"אין אירועים להצגה",weekText:"שבוע"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/hi.global.js b/public/js/fullcalendar/packages/core/locales/hi.global.js new file mode 100644 index 0000000..190515d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/hi.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'hi', | ||
11 | week: { | ||
12 | dow: 0, | ||
13 | doy: 6, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'पिछला', | ||
17 | next: 'अगला', | ||
18 | today: 'आज', | ||
19 | year: 'वर्ष', | ||
20 | month: 'महीना', | ||
21 | week: 'सप्ताह', | ||
22 | day: 'दिन', | ||
23 | list: 'कार्यसूची', | ||
24 | }, | ||
25 | weekText: 'हफ्ता', | ||
26 | allDayText: 'सभी दिन', | ||
27 | moreLinkText(n) { | ||
28 | return '+अधिक ' + n; | ||
29 | }, | ||
30 | noEventsText: 'कोई घटनाओं को प्रदर्शित करने के लिए', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/hi.global.min.js b/public/js/fullcalendar/packages/core/locales/hi.global.min.js new file mode 100644 index 0000000..cc115b0 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/hi.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"hi",week:{dow:0,doy:6},buttonText:{prev:"पिछला",next:"अगला",today:"आज",year:"वर्ष",month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},weekText:"हफ्ता",allDayText:"सभी दिन",moreLinkText:e=>"+अधिक "+e,noEventsText:"कोई घटनाओं को प्रदर्शित करने के लिए"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/hr.global.js b/public/js/fullcalendar/packages/core/locales/hr.global.js new file mode 100644 index 0000000..4423c16 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/hr.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'hr', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Prijašnji', | ||
17 | next: 'Sljedeći', | ||
18 | today: 'Danas', | ||
19 | year: 'Godina', | ||
20 | month: 'Mjesec', | ||
21 | week: 'Tjedan', | ||
22 | day: 'Dan', | ||
23 | list: 'Raspored', | ||
24 | }, | ||
25 | weekText: 'Tje', | ||
26 | allDayText: 'Cijeli dan', | ||
27 | moreLinkText(n) { | ||
28 | return '+ još ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Nema događaja za prikaz', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/hr.global.min.js b/public/js/fullcalendar/packages/core/locales/hr.global.min.js new file mode 100644 index 0000000..05e1388 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/hr.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var a={code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",year:"Godina",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nema događaja za prikaz"};FullCalendar.globalLocales.push(a)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/hu.global.js b/public/js/fullcalendar/packages/core/locales/hu.global.js new file mode 100644 index 0000000..89d48e6 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/hu.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'hu', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'vissza', | ||
17 | next: 'előre', | ||
18 | today: 'ma', | ||
19 | year: 'Év', | ||
20 | month: 'Hónap', | ||
21 | week: 'Hét', | ||
22 | day: 'Nap', | ||
23 | list: 'Lista', | ||
24 | }, | ||
25 | weekText: 'Hét', | ||
26 | allDayText: 'Egész nap', | ||
27 | moreLinkText: 'további', | ||
28 | noEventsText: 'Nincs megjeleníthető esemény', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/hu.global.min.js b/public/js/fullcalendar/packages/core/locales/hu.global.min.js new file mode 100644 index 0000000..d769d24 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/hu.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",year:"Év",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/hy-am.global.js b/public/js/fullcalendar/packages/core/locales/hy-am.global.js new file mode 100644 index 0000000..528fef8 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/hy-am.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'hy-am', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Նախորդ', | ||
17 | next: 'Հաջորդ', | ||
18 | today: 'Այսօր', | ||
19 | year: 'Տարի', | ||
20 | month: 'Ամիս', | ||
21 | week: 'Շաբաթ', | ||
22 | day: 'Օր', | ||
23 | list: 'Օրվա ցուցակ', | ||
24 | }, | ||
25 | weekText: 'Շաբ', | ||
26 | allDayText: 'Ամբողջ օր', | ||
27 | moreLinkText(n) { | ||
28 | return '+ ևս ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Բացակայում է իրադարձությունը ցուցադրելու', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/hy-am.global.min.js b/public/js/fullcalendar/packages/core/locales/hy-am.global.min.js new file mode 100644 index 0000000..3a3e4dc --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/hy-am.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"hy-am",week:{dow:1,doy:4},buttonText:{prev:"Նախորդ",next:"Հաջորդ",today:"Այսօր",year:"Տարի",month:"Ամիս",week:"Շաբաթ",day:"Օր",list:"Օրվա ցուցակ"},weekText:"Շաբ",allDayText:"Ամբողջ օր",moreLinkText:e=>"+ ևս "+e,noEventsText:"Բացակայում է իրադարձությունը ցուցադրելու"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/id.global.js b/public/js/fullcalendar/packages/core/locales/id.global.js new file mode 100644 index 0000000..5371826 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/id.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'id', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'mundur', | ||
17 | next: 'maju', | ||
18 | today: 'hari ini', | ||
19 | year: 'Tahun', | ||
20 | month: 'Bulan', | ||
21 | week: 'Minggu', | ||
22 | day: 'Hari', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Mg', | ||
26 | allDayText: 'Sehari penuh', | ||
27 | moreLinkText: 'lebih', | ||
28 | noEventsText: 'Tidak ada acara untuk ditampilkan', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/id.global.min.js b/public/js/fullcalendar/packages/core/locales/id.global.min.js new file mode 100644 index 0000000..db80508 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/id.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(a){"use strict";FullCalendar.globalLocales.push({code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sehari penuh",moreLinkText:"lebih",noEventsText:"Tidak ada acara untuk ditampilkan"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/is.global.js b/public/js/fullcalendar/packages/core/locales/is.global.js new file mode 100644 index 0000000..94387ff --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/is.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'is', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Fyrri', | ||
17 | next: 'Næsti', | ||
18 | today: 'Í dag', | ||
19 | year: 'Ár', | ||
20 | month: 'Mánuður', | ||
21 | week: 'Vika', | ||
22 | day: 'Dagur', | ||
23 | list: 'Dagskrá', | ||
24 | }, | ||
25 | weekText: 'Vika', | ||
26 | allDayText: 'Allan daginn', | ||
27 | moreLinkText: 'meira', | ||
28 | noEventsText: 'Engir viðburðir til að sýna', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/is.global.min.js b/public/js/fullcalendar/packages/core/locales/is.global.min.js new file mode 100644 index 0000000..b9e0b5d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/is.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"is",week:{dow:1,doy:4},buttonText:{prev:"Fyrri",next:"Næsti",today:"Í dag",year:"Ár",month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},weekText:"Vika",allDayText:"Allan daginn",moreLinkText:"meira",noEventsText:"Engir viðburðir til að sýna"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/it.global.js b/public/js/fullcalendar/packages/core/locales/it.global.js new file mode 100644 index 0000000..aead14e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/it.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'it', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Prec', | ||
17 | next: 'Succ', | ||
18 | today: 'Oggi', | ||
19 | year: 'Anno', | ||
20 | month: 'Mese', | ||
21 | week: 'Settimana', | ||
22 | day: 'Giorno', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Sm', | ||
26 | allDayText: 'Tutto il giorno', | ||
27 | moreLinkText(n) { | ||
28 | return '+altri ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Non ci sono eventi da visualizzare', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/it.global.min.js b/public/js/fullcalendar/packages/core/locales/it.global.min.js new file mode 100644 index 0000000..c5e4f8a --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/it.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",year:"Anno",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:e=>"+altri "+e,noEventsText:"Non ci sono eventi da visualizzare"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ja.global.js b/public/js/fullcalendar/packages/core/locales/ja.global.js new file mode 100644 index 0000000..9e2e7a6 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ja.global.js | |||
@@ -0,0 +1,31 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ja', | ||
11 | buttonText: { | ||
12 | prev: '前', | ||
13 | next: '次', | ||
14 | today: '今日', | ||
15 | year: '年', | ||
16 | month: '月', | ||
17 | week: '週', | ||
18 | day: '日', | ||
19 | list: '予定リスト', | ||
20 | }, | ||
21 | weekText: '週', | ||
22 | allDayText: '終日', | ||
23 | moreLinkText(n) { | ||
24 | return '他 ' + n + ' 件'; | ||
25 | }, | ||
26 | noEventsText: '表示する予定はありません', | ||
27 | }; | ||
28 | |||
29 | index_js.globalLocales.push(locale); | ||
30 | |||
31 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ja.global.min.js b/public/js/fullcalendar/packages/core/locales/ja.global.min.js new file mode 100644 index 0000000..b03bc39 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ja.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"ja",buttonText:{prev:"前",next:"次",today:"今日",year:"年",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:e=>"他 "+e+" 件",noEventsText:"表示する予定はありません"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ka.global.js b/public/js/fullcalendar/packages/core/locales/ka.global.js new file mode 100644 index 0000000..ee54efb --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ka.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ka', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'წინა', | ||
17 | next: 'შემდეგი', | ||
18 | today: 'დღეს', | ||
19 | year: 'წელიწადი', | ||
20 | month: 'თვე', | ||
21 | week: 'კვირა', | ||
22 | day: 'დღე', | ||
23 | list: 'დღის წესრიგი', | ||
24 | }, | ||
25 | weekText: 'კვ', | ||
26 | allDayText: 'მთელი დღე', | ||
27 | moreLinkText(n) { | ||
28 | return '+ კიდევ ' + n; | ||
29 | }, | ||
30 | noEventsText: 'ღონისძიებები არ არის', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ka.global.min.js b/public/js/fullcalendar/packages/core/locales/ka.global.min.js new file mode 100644 index 0000000..01e3e82 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ka.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"ka",week:{dow:1,doy:7},buttonText:{prev:"წინა",next:"შემდეგი",today:"დღეს",year:"წელიწადი",month:"თვე",week:"კვირა",day:"დღე",list:"დღის წესრიგი"},weekText:"კვ",allDayText:"მთელი დღე",moreLinkText:e=>"+ კიდევ "+e,noEventsText:"ღონისძიებები არ არის"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/kk.global.js b/public/js/fullcalendar/packages/core/locales/kk.global.js new file mode 100644 index 0000000..da17bf7 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/kk.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'kk', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Алдыңғы', | ||
17 | next: 'Келесі', | ||
18 | today: 'Бүгін', | ||
19 | year: 'Жыл', | ||
20 | month: 'Ай', | ||
21 | week: 'Апта', | ||
22 | day: 'Күн', | ||
23 | list: 'Күн тәртібі', | ||
24 | }, | ||
25 | weekText: 'Не', | ||
26 | allDayText: 'Күні бойы', | ||
27 | moreLinkText(n) { | ||
28 | return '+ тағы ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Көрсету үшін оқиғалар жоқ', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/kk.global.min.js b/public/js/fullcalendar/packages/core/locales/kk.global.min.js new file mode 100644 index 0000000..bdb4cad --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/kk.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"kk",week:{dow:1,doy:7},buttonText:{prev:"Алдыңғы",next:"Келесі",today:"Бүгін",year:"Жыл",month:"Ай",week:"Апта",day:"Күн",list:"Күн тәртібі"},weekText:"Не",allDayText:"Күні бойы",moreLinkText:e=>"+ тағы "+e,noEventsText:"Көрсету үшін оқиғалар жоқ"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/km.global.js b/public/js/fullcalendar/packages/core/locales/km.global.js new file mode 100644 index 0000000..6aea51d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/km.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'km', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'មុន', | ||
17 | next: 'បន្ទាប់', | ||
18 | today: 'ថ្ងៃនេះ', | ||
19 | year: 'ឆ្នាំ', | ||
20 | month: 'ខែ', | ||
21 | week: 'សប្តាហ៍', | ||
22 | day: 'ថ្ងៃ', | ||
23 | list: 'បញ្ជី', | ||
24 | }, | ||
25 | weekText: 'សប្តាហ៍', | ||
26 | allDayText: 'ពេញមួយថ្ងៃ', | ||
27 | moreLinkText: 'ច្រើនទៀត', | ||
28 | noEventsText: 'គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/km.global.min.js b/public/js/fullcalendar/packages/core/locales/km.global.min.js new file mode 100644 index 0000000..72bbd9d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/km.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"km",week:{dow:1,doy:4},buttonText:{prev:"មុន",next:"បន្ទាប់",today:"ថ្ងៃនេះ",year:"ឆ្នាំ",month:"ខែ",week:"សប្តាហ៍",day:"ថ្ងៃ",list:"បញ្ជី"},weekText:"សប្តាហ៍",allDayText:"ពេញមួយថ្ងៃ",moreLinkText:"ច្រើនទៀត",noEventsText:"គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ko.global.js b/public/js/fullcalendar/packages/core/locales/ko.global.js new file mode 100644 index 0000000..2879070 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ko.global.js | |||
@@ -0,0 +1,29 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ko', | ||
11 | buttonText: { | ||
12 | prev: '이전달', | ||
13 | next: '다음달', | ||
14 | today: '오늘', | ||
15 | year: '년도', | ||
16 | month: '월', | ||
17 | week: '주', | ||
18 | day: '일', | ||
19 | list: '일정목록', | ||
20 | }, | ||
21 | weekText: '주', | ||
22 | allDayText: '종일', | ||
23 | moreLinkText: '개', | ||
24 | noEventsText: '일정이 없습니다', | ||
25 | }; | ||
26 | |||
27 | index_js.globalLocales.push(locale); | ||
28 | |||
29 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ko.global.min.js b/public/js/fullcalendar/packages/core/locales/ko.global.min.js new file mode 100644 index 0000000..295e5fe --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ko.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",year:"년도",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ku.global.js b/public/js/fullcalendar/packages/core/locales/ku.global.js new file mode 100644 index 0000000..69bcd62 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ku.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ku', | ||
11 | week: { | ||
12 | dow: 6, | ||
13 | doy: 12, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | direction: 'rtl', | ||
16 | buttonText: { | ||
17 | prev: 'پێشتر', | ||
18 | next: 'دواتر', | ||
19 | today: 'ئەمڕو', | ||
20 | year: 'ساڵ', | ||
21 | month: 'مانگ', | ||
22 | week: 'هەفتە', | ||
23 | day: 'ڕۆژ', | ||
24 | list: 'بەرنامە', | ||
25 | }, | ||
26 | weekText: 'هەفتە', | ||
27 | allDayText: 'هەموو ڕۆژەکە', | ||
28 | moreLinkText: 'زیاتر', | ||
29 | noEventsText: 'هیچ ڕووداوێك نیە', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ku.global.min.js b/public/js/fullcalendar/packages/core/locales/ku.global.min.js new file mode 100644 index 0000000..2437d34 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ku.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ku",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"پێشتر",next:"دواتر",today:"ئەمڕو",year:"ساڵ",month:"مانگ",week:"هەفتە",day:"ڕۆژ",list:"بەرنامە"},weekText:"هەفتە",allDayText:"هەموو ڕۆژەکە",moreLinkText:"زیاتر",noEventsText:"هیچ ڕووداوێك نیە"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/lb.global.js b/public/js/fullcalendar/packages/core/locales/lb.global.js new file mode 100644 index 0000000..6df58ae --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/lb.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'lb', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Zréck', | ||
17 | next: 'Weider', | ||
18 | today: 'Haut', | ||
19 | year: 'Joer', | ||
20 | month: 'Mount', | ||
21 | week: 'Woch', | ||
22 | day: 'Dag', | ||
23 | list: 'Terminiwwersiicht', | ||
24 | }, | ||
25 | weekText: 'W', | ||
26 | allDayText: 'Ganzen Dag', | ||
27 | moreLinkText: 'méi', | ||
28 | noEventsText: 'Nee Evenementer ze affichéieren', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/lb.global.min.js b/public/js/fullcalendar/packages/core/locales/lb.global.min.js new file mode 100644 index 0000000..7c9d383 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/lb.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"lb",week:{dow:1,doy:4},buttonText:{prev:"Zréck",next:"Weider",today:"Haut",year:"Joer",month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},weekText:"W",allDayText:"Ganzen Dag",moreLinkText:"méi",noEventsText:"Nee Evenementer ze affichéieren"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/lt.global.js b/public/js/fullcalendar/packages/core/locales/lt.global.js new file mode 100644 index 0000000..c91c0ef --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/lt.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'lt', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Atgal', | ||
17 | next: 'Pirmyn', | ||
18 | today: 'Šiandien', | ||
19 | year: 'Metai', | ||
20 | month: 'Mėnuo', | ||
21 | week: 'Savaitė', | ||
22 | day: 'Diena', | ||
23 | list: 'Darbotvarkė', | ||
24 | }, | ||
25 | weekText: 'SAV', | ||
26 | allDayText: 'Visą dieną', | ||
27 | moreLinkText: 'daugiau', | ||
28 | noEventsText: 'Nėra įvykių rodyti', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/lt.global.min.js b/public/js/fullcalendar/packages/core/locales/lt.global.min.js new file mode 100644 index 0000000..6f77a76 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/lt.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"lt",week:{dow:1,doy:4},buttonText:{prev:"Atgal",next:"Pirmyn",today:"Šiandien",year:"Metai",month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},weekText:"SAV",allDayText:"Visą dieną",moreLinkText:"daugiau",noEventsText:"Nėra įvykių rodyti"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/lv.global.js b/public/js/fullcalendar/packages/core/locales/lv.global.js new file mode 100644 index 0000000..4ec201a --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/lv.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'lv', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Iepr.', | ||
17 | next: 'Nāk.', | ||
18 | today: 'Šodien', | ||
19 | year: 'Gads', | ||
20 | month: 'Mēnesis', | ||
21 | week: 'Nedēļa', | ||
22 | day: 'Diena', | ||
23 | list: 'Dienas kārtība', | ||
24 | }, | ||
25 | weekText: 'Ned.', | ||
26 | allDayText: 'Visu dienu', | ||
27 | moreLinkText(n) { | ||
28 | return '+vēl ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Nav notikumu', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/lv.global.min.js b/public/js/fullcalendar/packages/core/locales/lv.global.min.js new file mode 100644 index 0000000..3b93150 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/lv.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"lv",week:{dow:1,doy:4},buttonText:{prev:"Iepr.",next:"Nāk.",today:"Šodien",year:"Gads",month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},weekText:"Ned.",allDayText:"Visu dienu",moreLinkText:e=>"+vēl "+e,noEventsText:"Nav notikumu"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/mk.global.js b/public/js/fullcalendar/packages/core/locales/mk.global.js new file mode 100644 index 0000000..1422017 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/mk.global.js | |||
@@ -0,0 +1,31 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'mk', | ||
11 | buttonText: { | ||
12 | prev: 'претходно', | ||
13 | next: 'следно', | ||
14 | today: 'Денес', | ||
15 | year: 'година', | ||
16 | month: 'Месец', | ||
17 | week: 'Недела', | ||
18 | day: 'Ден', | ||
19 | list: 'График', | ||
20 | }, | ||
21 | weekText: 'Сед', | ||
22 | allDayText: 'Цел ден', | ||
23 | moreLinkText(n) { | ||
24 | return '+повеќе ' + n; | ||
25 | }, | ||
26 | noEventsText: 'Нема настани за прикажување', | ||
27 | }; | ||
28 | |||
29 | index_js.globalLocales.push(locale); | ||
30 | |||
31 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/mk.global.min.js b/public/js/fullcalendar/packages/core/locales/mk.global.min.js new file mode 100644 index 0000000..5d4c3f9 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/mk.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"mk",buttonText:{prev:"претходно",next:"следно",today:"Денес",year:"година",month:"Месец",week:"Недела",day:"Ден",list:"График"},weekText:"Сед",allDayText:"Цел ден",moreLinkText:e=>"+повеќе "+e,noEventsText:"Нема настани за прикажување"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ms.global.js b/public/js/fullcalendar/packages/core/locales/ms.global.js new file mode 100644 index 0000000..9d9f5fd --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ms.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ms', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Sebelum', | ||
17 | next: 'Selepas', | ||
18 | today: 'hari ini', | ||
19 | year: 'Tahun', | ||
20 | month: 'Bulan', | ||
21 | week: 'Minggu', | ||
22 | day: 'Hari', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Mg', | ||
26 | allDayText: 'Sepanjang hari', | ||
27 | moreLinkText(n) { | ||
28 | return 'masih ada ' + n + ' acara'; | ||
29 | }, | ||
30 | noEventsText: 'Tiada peristiwa untuk dipaparkan', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ms.global.min.js b/public/js/fullcalendar/packages/core/locales/ms.global.min.js new file mode 100644 index 0000000..06644cf --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ms.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(a){"use strict";var e={code:"ms",week:{dow:1,doy:7},buttonText:{prev:"Sebelum",next:"Selepas",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sepanjang hari",moreLinkText:a=>"masih ada "+a+" acara",noEventsText:"Tiada peristiwa untuk dipaparkan"};FullCalendar.globalLocales.push(e)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/nb.global.js b/public/js/fullcalendar/packages/core/locales/nb.global.js new file mode 100644 index 0000000..9283d70 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/nb.global.js | |||
@@ -0,0 +1,44 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'nb', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Forrige', | ||
17 | next: 'Neste', | ||
18 | today: 'I dag', | ||
19 | year: 'År', | ||
20 | month: 'Måned', | ||
21 | week: 'Uke', | ||
22 | day: 'Dag', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Uke', | ||
26 | weekTextLong: 'Uke', | ||
27 | allDayText: 'Hele dagen', | ||
28 | moreLinkText: 'til', | ||
29 | noEventsText: 'Ingen hendelser å vise', | ||
30 | buttonHints: { | ||
31 | prev: 'Forrige $0', | ||
32 | next: 'Neste $0', | ||
33 | today: 'Nåværende $0', | ||
34 | }, | ||
35 | viewHint: '$0 visning', | ||
36 | navLinkHint: 'Gå til $0', | ||
37 | moreLinkHint(eventCnt) { | ||
38 | return `Vis ${eventCnt} flere hendelse${eventCnt === 1 ? '' : 'r'}`; | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | index_js.globalLocales.push(locale); | ||
43 | |||
44 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/nb.global.min.js b/public/js/fullcalendar/packages/core/locales/nb.global.min.js new file mode 100644 index 0000000..449f281 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/nb.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var n={code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",year:"År",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:e=>`Vis ${e} flere hendelse${1===e?"":"r"}`};FullCalendar.globalLocales.push(n)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ne.global.js b/public/js/fullcalendar/packages/core/locales/ne.global.js new file mode 100644 index 0000000..93a07a2 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ne.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ne', | ||
11 | week: { | ||
12 | dow: 7, | ||
13 | doy: 1, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'अघिल्लो', | ||
17 | next: 'अर्को', | ||
18 | today: 'आज', | ||
19 | year: 'वर्ष', | ||
20 | month: 'महिना', | ||
21 | week: 'हप्ता', | ||
22 | day: 'दिन', | ||
23 | list: 'सूची', | ||
24 | }, | ||
25 | weekText: 'हप्ता', | ||
26 | allDayText: 'दिनभरि', | ||
27 | moreLinkText: 'थप लिंक', | ||
28 | noEventsText: 'देखाउनको लागि कुनै घटनाहरू छैनन्', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ne.global.min.js b/public/js/fullcalendar/packages/core/locales/ne.global.min.js new file mode 100644 index 0000000..a87c609 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ne.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ne",week:{dow:7,doy:1},buttonText:{prev:"अघिल्लो",next:"अर्को",today:"आज",year:"वर्ष",month:"महिना",week:"हप्ता",day:"दिन",list:"सूची"},weekText:"हप्ता",allDayText:"दिनभरि",moreLinkText:"थप लिंक",noEventsText:"देखाउनको लागि कुनै घटनाहरू छैनन्"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/nl.global.js b/public/js/fullcalendar/packages/core/locales/nl.global.js new file mode 100644 index 0000000..9bfa4a1 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/nl.global.js | |||
@@ -0,0 +1,32 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'nl', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Vorige', | ||
17 | next: 'Volgende', | ||
18 | today: 'Vandaag', | ||
19 | year: 'Jaar', | ||
20 | month: 'Maand', | ||
21 | week: 'Week', | ||
22 | day: 'Dag', | ||
23 | list: 'Lijst', | ||
24 | }, | ||
25 | allDayText: 'Hele dag', | ||
26 | moreLinkText: 'extra', | ||
27 | noEventsText: 'Geen evenementen om te laten zien', | ||
28 | }; | ||
29 | |||
30 | index_js.globalLocales.push(locale); | ||
31 | |||
32 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/nl.global.min.js b/public/js/fullcalendar/packages/core/locales/nl.global.min.js new file mode 100644 index 0000000..157b489 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/nl.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Lijst"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/nn.global.js b/public/js/fullcalendar/packages/core/locales/nn.global.js new file mode 100644 index 0000000..685c02c --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/nn.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'nn', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Førre', | ||
17 | next: 'Neste', | ||
18 | today: 'I dag', | ||
19 | year: 'År', | ||
20 | month: 'Månad', | ||
21 | week: 'Veke', | ||
22 | day: 'Dag', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Veke', | ||
26 | allDayText: 'Heile dagen', | ||
27 | moreLinkText: 'til', | ||
28 | noEventsText: 'Ingen hendelser å vise', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/nn.global.min.js b/public/js/fullcalendar/packages/core/locales/nn.global.min.js new file mode 100644 index 0000000..a48d4a5 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/nn.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"nn",week:{dow:1,doy:4},buttonText:{prev:"Førre",next:"Neste",today:"I dag",year:"År",month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},weekText:"Veke",allDayText:"Heile dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/pl.global.js b/public/js/fullcalendar/packages/core/locales/pl.global.js new file mode 100644 index 0000000..5456866 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/pl.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'pl', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Poprzedni', | ||
17 | next: 'Następny', | ||
18 | today: 'Dziś', | ||
19 | year: 'Rok', | ||
20 | month: 'Miesiąc', | ||
21 | week: 'Tydzień', | ||
22 | day: 'Dzień', | ||
23 | list: 'Plan dnia', | ||
24 | }, | ||
25 | weekText: 'Tydz', | ||
26 | allDayText: 'Cały dzień', | ||
27 | moreLinkText: 'więcej', | ||
28 | noEventsText: 'Brak wydarzeń do wyświetlenia', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/pl.global.min.js b/public/js/fullcalendar/packages/core/locales/pl.global.min.js new file mode 100644 index 0000000..cc5f1cc --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/pl.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",year:"Rok",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/pt-br.global.js b/public/js/fullcalendar/packages/core/locales/pt-br.global.js new file mode 100644 index 0000000..99b1633 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/pt-br.global.js | |||
@@ -0,0 +1,52 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'pt-br', | ||
11 | buttonText: { | ||
12 | prev: 'Anterior', | ||
13 | next: 'Próximo', | ||
14 | prevYear: 'Ano anterior', | ||
15 | nextYear: 'Próximo ano', | ||
16 | year: 'Ano', | ||
17 | today: 'Hoje', | ||
18 | month: 'Mês', | ||
19 | week: 'Semana', | ||
20 | day: 'Dia', | ||
21 | list: 'Lista', | ||
22 | }, | ||
23 | buttonHints: { | ||
24 | prev: '$0 Anterior', | ||
25 | next: 'Próximo $0', | ||
26 | today(buttonText) { | ||
27 | return (buttonText === 'Dia') ? 'Hoje' : | ||
28 | ((buttonText === 'Semana') ? 'Esta' : 'Este') + ' ' + buttonText.toLocaleLowerCase(); | ||
29 | }, | ||
30 | }, | ||
31 | viewHint(buttonText) { | ||
32 | return 'Visualizar ' + (buttonText === 'Semana' ? 'a' : 'o') + ' ' + buttonText.toLocaleLowerCase(); | ||
33 | }, | ||
34 | weekText: 'Sm', | ||
35 | weekTextLong: 'Semana', | ||
36 | allDayText: 'dia inteiro', | ||
37 | moreLinkText(n) { | ||
38 | return 'mais +' + n; | ||
39 | }, | ||
40 | moreLinkHint(eventCnt) { | ||
41 | return `Mostrar mais ${eventCnt} eventos`; | ||
42 | }, | ||
43 | noEventsText: 'Não há eventos para mostrar', | ||
44 | navLinkHint: 'Ir para $0', | ||
45 | closeHint: 'Fechar', | ||
46 | timeHint: 'A hora', | ||
47 | eventHint: 'Evento', | ||
48 | }; | ||
49 | |||
50 | index_js.globalLocales.push(locale); | ||
51 | |||
52 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/pt-br.global.min.js b/public/js/fullcalendar/packages/core/locales/pt-br.global.min.js new file mode 100644 index 0000000..f2f63be --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/pt-br.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var a={code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",prevYear:"Ano anterior",nextYear:"Próximo ano",year:"Ano",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},buttonHints:{prev:"$0 Anterior",next:"Próximo $0",today:e=>"Dia"===e?"Hoje":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Visualizar "+("Semana"===e?"a":"o")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"dia inteiro",moreLinkText:e=>"mais +"+e,moreLinkHint:e=>`Mostrar mais ${e} eventos`,noEventsText:"Não há eventos para mostrar",navLinkHint:"Ir para $0",closeHint:"Fechar",timeHint:"A hora",eventHint:"Evento"};FullCalendar.globalLocales.push(a)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/pt.global.js b/public/js/fullcalendar/packages/core/locales/pt.global.js new file mode 100644 index 0000000..35b07ed --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/pt.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'pt', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Anterior', | ||
17 | next: 'Seguinte', | ||
18 | today: 'Hoje', | ||
19 | year: 'Ano', | ||
20 | month: 'Mês', | ||
21 | week: 'Semana', | ||
22 | day: 'Dia', | ||
23 | list: 'Agenda', | ||
24 | }, | ||
25 | weekText: 'Sem', | ||
26 | allDayText: 'Todo o dia', | ||
27 | moreLinkText: 'mais', | ||
28 | noEventsText: 'Não há eventos para mostrar', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/pt.global.min.js b/public/js/fullcalendar/packages/core/locales/pt.global.min.js new file mode 100644 index 0000000..159ec8e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/pt.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",year:"Ano",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ro.global.js b/public/js/fullcalendar/packages/core/locales/ro.global.js new file mode 100644 index 0000000..cb9123f --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ro.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ro', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'precedentă', | ||
17 | next: 'următoare', | ||
18 | today: 'Azi', | ||
19 | year: 'An', | ||
20 | month: 'Lună', | ||
21 | week: 'Săptămână', | ||
22 | day: 'Zi', | ||
23 | list: 'Agendă', | ||
24 | }, | ||
25 | weekText: 'Săpt', | ||
26 | allDayText: 'Toată ziua', | ||
27 | moreLinkText(n) { | ||
28 | return '+alte ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Nu există evenimente de afișat', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ro.global.min.js b/public/js/fullcalendar/packages/core/locales/ro.global.min.js new file mode 100644 index 0000000..1b72c31 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ro.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",year:"An",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:e=>"+alte "+e,noEventsText:"Nu există evenimente de afișat"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ru.global.js b/public/js/fullcalendar/packages/core/locales/ru.global.js new file mode 100644 index 0000000..da6022a --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ru.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ru', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Пред', | ||
17 | next: 'След', | ||
18 | today: 'Сегодня', | ||
19 | year: 'Год', | ||
20 | month: 'Месяц', | ||
21 | week: 'Неделя', | ||
22 | day: 'День', | ||
23 | list: 'Повестка дня', | ||
24 | }, | ||
25 | weekText: 'Нед', | ||
26 | allDayText: 'Весь день', | ||
27 | moreLinkText(n) { | ||
28 | return '+ ещё ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Нет событий для отображения', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ru.global.min.js b/public/js/fullcalendar/packages/core/locales/ru.global.min.js new file mode 100644 index 0000000..21bbddc --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ru.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",year:"Год",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:e=>"+ ещё "+e,noEventsText:"Нет событий для отображения"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/si-lk.global.js b/public/js/fullcalendar/packages/core/locales/si-lk.global.js new file mode 100644 index 0000000..c6a9b50 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/si-lk.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'si-lk', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'පෙර', | ||
17 | next: 'පසු', | ||
18 | today: 'අද', | ||
19 | year: 'අවුරුදු', | ||
20 | month: 'මාසය', | ||
21 | week: 'සතිය', | ||
22 | day: 'දවස', | ||
23 | list: 'ලැයිස්තුව', | ||
24 | }, | ||
25 | weekText: 'සති', | ||
26 | allDayText: 'සියලු', | ||
27 | moreLinkText: 'තවත්', | ||
28 | noEventsText: 'මුකුත් නැත', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/si-lk.global.min.js b/public/js/fullcalendar/packages/core/locales/si-lk.global.min.js new file mode 100644 index 0000000..110fd41 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/si-lk.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"si-lk",week:{dow:1,doy:4},buttonText:{prev:"පෙර",next:"පසු",today:"අද",year:"අවුරුදු",month:"මාසය",week:"සතිය",day:"දවස",list:"ලැයිස්තුව"},weekText:"සති",allDayText:"සියලු",moreLinkText:"තවත්",noEventsText:"මුකුත් නැත"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sk.global.js b/public/js/fullcalendar/packages/core/locales/sk.global.js new file mode 100644 index 0000000..06995b9 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sk.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'sk', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Predchádzajúci', | ||
17 | next: 'Nasledujúci', | ||
18 | today: 'Dnes', | ||
19 | year: 'Rok', | ||
20 | month: 'Mesiac', | ||
21 | week: 'Týždeň', | ||
22 | day: 'Deň', | ||
23 | list: 'Rozvrh', | ||
24 | }, | ||
25 | weekText: 'Ty', | ||
26 | allDayText: 'Celý deň', | ||
27 | moreLinkText(n) { | ||
28 | return '+ďalšie: ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Žiadne akcie na zobrazenie', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sk.global.min.js b/public/js/fullcalendar/packages/core/locales/sk.global.min.js new file mode 100644 index 0000000..dc2f029 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sk.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var a={code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",year:"Rok",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:e=>"+ďalšie: "+e,noEventsText:"Žiadne akcie na zobrazenie"};FullCalendar.globalLocales.push(a)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sl.global.js b/public/js/fullcalendar/packages/core/locales/sl.global.js new file mode 100644 index 0000000..9f72659 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sl.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'sl', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Prejšnji', | ||
17 | next: 'Naslednji', | ||
18 | today: 'Trenutni', | ||
19 | year: 'Leto', | ||
20 | month: 'Mesec', | ||
21 | week: 'Teden', | ||
22 | day: 'Dan', | ||
23 | list: 'Dnevni red', | ||
24 | }, | ||
25 | weekText: 'Teden', | ||
26 | allDayText: 'Ves dan', | ||
27 | moreLinkText: 'več', | ||
28 | noEventsText: 'Ni dogodkov za prikaz', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sl.global.min.js b/public/js/fullcalendar/packages/core/locales/sl.global.min.js new file mode 100644 index 0000000..f2b4d36 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sl.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"sl",week:{dow:1,doy:7},buttonText:{prev:"Prejšnji",next:"Naslednji",today:"Trenutni",year:"Leto",month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},weekText:"Teden",allDayText:"Ves dan",moreLinkText:"več",noEventsText:"Ni dogodkov za prikaz"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sm.global.js b/public/js/fullcalendar/packages/core/locales/sm.global.js new file mode 100644 index 0000000..052e182 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sm.global.js | |||
@@ -0,0 +1,29 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'sm', | ||
11 | buttonText: { | ||
12 | prev: 'Talu ai', | ||
13 | next: 'Mulimuli atu', | ||
14 | today: 'Aso nei', | ||
15 | year: 'Tausaga', | ||
16 | month: 'Masina', | ||
17 | week: 'Vaiaso', | ||
18 | day: 'Aso', | ||
19 | list: 'Faasologa', | ||
20 | }, | ||
21 | weekText: 'Vaiaso', | ||
22 | allDayText: 'Aso atoa', | ||
23 | moreLinkText: 'sili atu', | ||
24 | noEventsText: 'Leai ni mea na tutupu', | ||
25 | }; | ||
26 | |||
27 | index_js.globalLocales.push(locale); | ||
28 | |||
29 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sm.global.min.js b/public/js/fullcalendar/packages/core/locales/sm.global.min.js new file mode 100644 index 0000000..6945eba --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sm.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(a){"use strict";FullCalendar.globalLocales.push({code:"sm",buttonText:{prev:"Talu ai",next:"Mulimuli atu",today:"Aso nei",year:"Tausaga",month:"Masina",week:"Vaiaso",day:"Aso",list:"Faasologa"},weekText:"Vaiaso",allDayText:"Aso atoa",moreLinkText:"sili atu",noEventsText:"Leai ni mea na tutupu"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sq.global.js b/public/js/fullcalendar/packages/core/locales/sq.global.js new file mode 100644 index 0000000..c4f4fb6 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sq.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'sq', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'mbrapa', | ||
17 | next: 'Përpara', | ||
18 | today: 'Sot', | ||
19 | year: 'Viti', | ||
20 | month: 'Muaj', | ||
21 | week: 'Javë', | ||
22 | day: 'Ditë', | ||
23 | list: 'Listë', | ||
24 | }, | ||
25 | weekText: 'Ja', | ||
26 | allDayText: 'Gjithë ditën', | ||
27 | moreLinkText(n) { | ||
28 | return '+më tepër ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Nuk ka evente për të shfaqur', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sq.global.min.js b/public/js/fullcalendar/packages/core/locales/sq.global.min.js new file mode 100644 index 0000000..8e61a8a --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sq.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"sq",week:{dow:1,doy:4},buttonText:{prev:"mbrapa",next:"Përpara",today:"Sot",year:"Viti",month:"Muaj",week:"Javë",day:"Ditë",list:"Listë"},weekText:"Ja",allDayText:"Gjithë ditën",moreLinkText:e=>"+më tepër "+e,noEventsText:"Nuk ka evente për të shfaqur"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sr-cyrl.global.js b/public/js/fullcalendar/packages/core/locales/sr-cyrl.global.js new file mode 100644 index 0000000..a31a7c5 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sr-cyrl.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'sr-cyrl', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Претходна', | ||
17 | next: 'следећи', | ||
18 | today: 'Данас', | ||
19 | year: 'Година', | ||
20 | month: 'Месец', | ||
21 | week: 'Недеља', | ||
22 | day: 'Дан', | ||
23 | list: 'Планер', | ||
24 | }, | ||
25 | weekText: 'Сед', | ||
26 | allDayText: 'Цео дан', | ||
27 | moreLinkText(n) { | ||
28 | return '+ још ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Нема догађаја за приказ', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sr-cyrl.global.min.js b/public/js/fullcalendar/packages/core/locales/sr-cyrl.global.min.js new file mode 100644 index 0000000..3f93d6e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sr-cyrl.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"sr-cyrl",week:{dow:1,doy:7},buttonText:{prev:"Претходна",next:"следећи",today:"Данас",year:"Година",month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},weekText:"Сед",allDayText:"Цео дан",moreLinkText:e=>"+ још "+e,noEventsText:"Нема догађаја за приказ"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sr.global.js b/public/js/fullcalendar/packages/core/locales/sr.global.js new file mode 100644 index 0000000..626d059 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sr.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'sr', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Prethodna', | ||
17 | next: 'Sledeći', | ||
18 | today: 'Danas', | ||
19 | year: 'Godina', | ||
20 | month: 'Mеsеc', | ||
21 | week: 'Nеdеlja', | ||
22 | day: 'Dan', | ||
23 | list: 'Planеr', | ||
24 | }, | ||
25 | weekText: 'Sed', | ||
26 | allDayText: 'Cеo dan', | ||
27 | moreLinkText(n) { | ||
28 | return '+ još ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Nеma događaja za prikaz', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sr.global.min.js b/public/js/fullcalendar/packages/core/locales/sr.global.min.js new file mode 100644 index 0000000..338bb2e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sr.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(a){"use strict";var e={code:"sr",week:{dow:1,doy:7},buttonText:{prev:"Prethodna",next:"Sledeći",today:"Danas",year:"Godina",month:"Mеsеc",week:"Nеdеlja",day:"Dan",list:"Planеr"},weekText:"Sed",allDayText:"Cеo dan",moreLinkText:a=>"+ još "+a,noEventsText:"Nеma događaja za prikaz"};FullCalendar.globalLocales.push(e)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sv.global.js b/public/js/fullcalendar/packages/core/locales/sv.global.js new file mode 100644 index 0000000..2c5c4e4 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sv.global.js | |||
@@ -0,0 +1,53 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'sv', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Förra', | ||
17 | next: 'Nästa', | ||
18 | today: 'Idag', | ||
19 | year: 'År', | ||
20 | month: 'Månad', | ||
21 | week: 'Vecka', | ||
22 | day: 'Dag', | ||
23 | list: 'Program', | ||
24 | }, | ||
25 | buttonHints: { | ||
26 | prev(buttonText) { | ||
27 | return `Föregående ${buttonText.toLocaleLowerCase()}`; | ||
28 | }, | ||
29 | next(buttonText) { | ||
30 | return `Nästa ${buttonText.toLocaleLowerCase()}`; | ||
31 | }, | ||
32 | today(buttonText) { | ||
33 | return (buttonText === 'Program' ? 'Detta' : 'Denna') + ' ' + buttonText.toLocaleLowerCase(); | ||
34 | }, | ||
35 | }, | ||
36 | viewHint: '$0 vy', | ||
37 | navLinkHint: 'Gå till $0', | ||
38 | moreLinkHint(eventCnt) { | ||
39 | return `Visa ytterligare ${eventCnt} händelse${eventCnt === 1 ? '' : 'r'}`; | ||
40 | }, | ||
41 | weekText: 'v.', | ||
42 | weekTextLong: 'Vecka', | ||
43 | allDayText: 'Heldag', | ||
44 | moreLinkText: 'till', | ||
45 | noEventsText: 'Inga händelser att visa', | ||
46 | closeHint: 'Stäng', | ||
47 | timeHint: 'Klockan', | ||
48 | eventHint: 'Händelse', | ||
49 | }; | ||
50 | |||
51 | index_js.globalLocales.push(locale); | ||
52 | |||
53 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/sv.global.min.js b/public/js/fullcalendar/packages/core/locales/sv.global.min.js new file mode 100644 index 0000000..e5472db --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/sv.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",year:"År",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:e=>"Föregående "+e.toLocaleLowerCase(),next:e=>"Nästa "+e.toLocaleLowerCase(),today:e=>("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:e=>`Visa ytterligare ${e} händelse${1===e?"":"r"}`,weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ta-in.global.js b/public/js/fullcalendar/packages/core/locales/ta-in.global.js new file mode 100644 index 0000000..2e3d6bf --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ta-in.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ta-in', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'முந்தைய', | ||
17 | next: 'அடுத்தது', | ||
18 | today: 'இன்று', | ||
19 | year: 'ஆண்டு', | ||
20 | month: 'மாதம்', | ||
21 | week: 'வாரம்', | ||
22 | day: 'நாள்', | ||
23 | list: 'தினசரி அட்டவணை', | ||
24 | }, | ||
25 | weekText: 'வாரம்', | ||
26 | allDayText: 'நாள் முழுவதும்', | ||
27 | moreLinkText(n) { | ||
28 | return '+ மேலும் ' + n; | ||
29 | }, | ||
30 | noEventsText: 'காண்பிக்க நிகழ்வுகள் இல்லை', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ta-in.global.min.js b/public/js/fullcalendar/packages/core/locales/ta-in.global.min.js new file mode 100644 index 0000000..6fa7117 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ta-in.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"ta-in",week:{dow:1,doy:4},buttonText:{prev:"முந்தைய",next:"அடுத்தது",today:"இன்று",year:"ஆண்டு",month:"மாதம்",week:"வாரம்",day:"நாள்",list:"தினசரி அட்டவணை"},weekText:"வாரம்",allDayText:"நாள் முழுவதும்",moreLinkText:e=>"+ மேலும் "+e,noEventsText:"காண்பிக்க நிகழ்வுகள் இல்லை"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/th.global.js b/public/js/fullcalendar/packages/core/locales/th.global.js new file mode 100644 index 0000000..8383e1c --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/th.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'th', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'ก่อนหน้า', | ||
17 | next: 'ถัดไป', | ||
18 | prevYear: 'ปีก่อนหน้า', | ||
19 | nextYear: 'ปีถัดไป', | ||
20 | year: 'ปี', | ||
21 | today: 'วันนี้', | ||
22 | month: 'เดือน', | ||
23 | week: 'สัปดาห์', | ||
24 | day: 'วัน', | ||
25 | list: 'กำหนดการ', | ||
26 | }, | ||
27 | weekText: 'สัปดาห์', | ||
28 | allDayText: 'ตลอดวัน', | ||
29 | moreLinkText: 'เพิ่มเติม', | ||
30 | noEventsText: 'ไม่มีกิจกรรมที่จะแสดง', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/th.global.min.js b/public/js/fullcalendar/packages/core/locales/th.global.min.js new file mode 100644 index 0000000..fa82694 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/th.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"th",week:{dow:1,doy:4},buttonText:{prev:"ก่อนหน้า",next:"ถัดไป",prevYear:"ปีก่อนหน้า",nextYear:"ปีถัดไป",year:"ปี",today:"วันนี้",month:"เดือน",week:"สัปดาห์",day:"วัน",list:"กำหนดการ"},weekText:"สัปดาห์",allDayText:"ตลอดวัน",moreLinkText:"เพิ่มเติม",noEventsText:"ไม่มีกิจกรรมที่จะแสดง"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/tr.global.js b/public/js/fullcalendar/packages/core/locales/tr.global.js new file mode 100644 index 0000000..4338516 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/tr.global.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'tr', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'geri', | ||
17 | next: 'ileri', | ||
18 | today: 'bugün', | ||
19 | year: 'Yıl', | ||
20 | month: 'Ay', | ||
21 | week: 'Hafta', | ||
22 | day: 'Gün', | ||
23 | list: 'Ajanda', | ||
24 | }, | ||
25 | weekText: 'Hf', | ||
26 | allDayText: 'Tüm gün', | ||
27 | moreLinkText: 'daha fazla', | ||
28 | noEventsText: 'Gösterilecek etkinlik yok', | ||
29 | }; | ||
30 | |||
31 | index_js.globalLocales.push(locale); | ||
32 | |||
33 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/tr.global.min.js b/public/js/fullcalendar/packages/core/locales/tr.global.min.js new file mode 100644 index 0000000..7d67a7c --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/tr.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",year:"Yıl",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ug.global.js b/public/js/fullcalendar/packages/core/locales/ug.global.js new file mode 100644 index 0000000..b62a917 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ug.global.js | |||
@@ -0,0 +1,26 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'ug', | ||
11 | buttonText: { | ||
12 | prev: 'ئالدىنقى', | ||
13 | next: 'كېيىنكى', | ||
14 | today: 'بۈگۈن', | ||
15 | year: 'يىل', | ||
16 | month: 'ئاي', | ||
17 | week: 'ھەپتە', | ||
18 | day: 'كۈن', | ||
19 | list: 'كۈنتەرتىپ', | ||
20 | }, | ||
21 | allDayText: 'پۈتۈن كۈن', | ||
22 | }; | ||
23 | |||
24 | index_js.globalLocales.push(locale); | ||
25 | |||
26 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/ug.global.min.js b/public/js/fullcalendar/packages/core/locales/ug.global.min.js new file mode 100644 index 0000000..dfa983e --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/ug.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"ug",buttonText:{prev:"ئالدىنقى",next:"كېيىنكى",today:"بۈگۈن",year:"يىل",month:"ئاي",week:"ھەپتە",day:"كۈن",list:"كۈنتەرتىپ"},allDayText:"پۈتۈن كۈن"})}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/uk.global.js b/public/js/fullcalendar/packages/core/locales/uk.global.js new file mode 100644 index 0000000..0c3e82f --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/uk.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'uk', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 7, // The week that contains Jan 1st is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Попередній', | ||
17 | next: 'далі', | ||
18 | today: 'Сьогодні', | ||
19 | year: 'рік', | ||
20 | month: 'Місяць', | ||
21 | week: 'Тиждень', | ||
22 | day: 'День', | ||
23 | list: 'Порядок денний', | ||
24 | }, | ||
25 | weekText: 'Тиж', | ||
26 | allDayText: 'Увесь день', | ||
27 | moreLinkText(n) { | ||
28 | return '+ще ' + n + '...'; | ||
29 | }, | ||
30 | noEventsText: 'Немає подій для відображення', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/uk.global.min.js b/public/js/fullcalendar/packages/core/locales/uk.global.min.js new file mode 100644 index 0000000..64bff36 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/uk.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",year:"рік",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText:e=>"+ще "+e+"...",noEventsText:"Немає подій для відображення"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/uz-cy.global.js b/public/js/fullcalendar/packages/core/locales/uz-cy.global.js new file mode 100644 index 0000000..0a93d42 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/uz-cy.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'uz-cy', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Олин', | ||
17 | next: 'Кейин', | ||
18 | today: 'Бугун', | ||
19 | month: 'Ой', | ||
20 | week: 'Ҳафта', | ||
21 | day: 'Кун', | ||
22 | list: 'Кун тартиби', | ||
23 | }, | ||
24 | weekText: 'Ҳафта', | ||
25 | allDayText: 'Кун бўйича', | ||
26 | moreLinkText(n) { | ||
27 | return '+ яна ' + n; | ||
28 | }, | ||
29 | noEventsText: 'Кўрсатиш учун воқеалар йўқ', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/uz-cy.global.min.js b/public/js/fullcalendar/packages/core/locales/uz-cy.global.min.js new file mode 100644 index 0000000..461632a --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/uz-cy.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"uz-cy",week:{dow:1,doy:4},buttonText:{prev:"Олин",next:"Кейин",today:"Бугун",month:"Ой",week:"Ҳафта",day:"Кун",list:"Кун тартиби"},weekText:"Ҳафта",allDayText:"Кун бўйича",moreLinkText:e=>"+ яна "+e,noEventsText:"Кўрсатиш учун воқеалар йўқ"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/uz.global.js b/public/js/fullcalendar/packages/core/locales/uz.global.js new file mode 100644 index 0000000..e55e79b --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/uz.global.js | |||
@@ -0,0 +1,34 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'uz', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Oldingi', | ||
17 | next: 'Keyingi', | ||
18 | today: 'Bugun', | ||
19 | year: 'Yil', | ||
20 | month: 'Oy', | ||
21 | week: 'Xafta', | ||
22 | day: 'Kun', | ||
23 | list: 'Kun tartibi', | ||
24 | }, | ||
25 | allDayText: 'Kun bo\'yi', | ||
26 | moreLinkText(n) { | ||
27 | return '+ yana ' + n; | ||
28 | }, | ||
29 | noEventsText: 'Ko\'rsatish uchun voqealar yo\'q', | ||
30 | }; | ||
31 | |||
32 | index_js.globalLocales.push(locale); | ||
33 | |||
34 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/uz.global.min.js b/public/js/fullcalendar/packages/core/locales/uz.global.min.js new file mode 100644 index 0000000..89d1e2b --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/uz.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var a={code:"uz",week:{dow:1,doy:4},buttonText:{prev:"Oldingi",next:"Keyingi",today:"Bugun",year:"Yil",month:"Oy",week:"Xafta",day:"Kun",list:"Kun tartibi"},allDayText:"Kun bo'yi",moreLinkText:e=>"+ yana "+e,noEventsText:"Ko'rsatish uchun voqealar yo'q"};FullCalendar.globalLocales.push(a)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/vi.global.js b/public/js/fullcalendar/packages/core/locales/vi.global.js new file mode 100644 index 0000000..13a447d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/vi.global.js | |||
@@ -0,0 +1,35 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'vi', | ||
11 | week: { | ||
12 | dow: 1, | ||
13 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
14 | }, | ||
15 | buttonText: { | ||
16 | prev: 'Trước', | ||
17 | next: 'Tiếp', | ||
18 | today: 'Hôm nay', | ||
19 | year: 'Năm', | ||
20 | month: 'Tháng', | ||
21 | week: 'Tuần', | ||
22 | day: 'Ngày', | ||
23 | list: 'Lịch biểu', | ||
24 | }, | ||
25 | weekText: 'Tu', | ||
26 | allDayText: 'Cả ngày', | ||
27 | moreLinkText(n) { | ||
28 | return '+ thêm ' + n; | ||
29 | }, | ||
30 | noEventsText: 'Không có sự kiện để hiển thị', | ||
31 | }; | ||
32 | |||
33 | index_js.globalLocales.push(locale); | ||
34 | |||
35 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/vi.global.min.js b/public/js/fullcalendar/packages/core/locales/vi.global.min.js new file mode 100644 index 0000000..42690bc --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/vi.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",year:"Năm",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:e=>"+ thêm "+e,noEventsText:"Không có sự kiện để hiển thị"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/zh-cn.global.js b/public/js/fullcalendar/packages/core/locales/zh-cn.global.js new file mode 100644 index 0000000..8517b34 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/zh-cn.global.js | |||
@@ -0,0 +1,36 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'zh-cn', | ||
11 | week: { | ||
12 | // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 | ||
13 | dow: 1, | ||
14 | doy: 4, // The week that contains Jan 4th is the first week of the year. | ||
15 | }, | ||
16 | buttonText: { | ||
17 | prev: '上月', | ||
18 | next: '下月', | ||
19 | today: '今天', | ||
20 | year: '年', | ||
21 | month: '月', | ||
22 | week: '周', | ||
23 | day: '日', | ||
24 | list: '日程', | ||
25 | }, | ||
26 | weekText: '周', | ||
27 | allDayText: '全天', | ||
28 | moreLinkText(n) { | ||
29 | return '另外 ' + n + ' 个'; | ||
30 | }, | ||
31 | noEventsText: '没有事件显示', | ||
32 | }; | ||
33 | |||
34 | index_js.globalLocales.push(locale); | ||
35 | |||
36 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/zh-cn.global.min.js b/public/js/fullcalendar/packages/core/locales/zh-cn.global.min.js new file mode 100644 index 0000000..ff80a62 --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/zh-cn.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";var t={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",year:"年",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:e=>"另外 "+e+" 个",noEventsText:"没有事件显示"};FullCalendar.globalLocales.push(t)}(); \ No newline at end of file | ||
diff --git a/public/js/fullcalendar/packages/core/locales/zh-tw.global.js b/public/js/fullcalendar/packages/core/locales/zh-tw.global.js new file mode 100644 index 0000000..6b3822d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/zh-tw.global.js | |||
@@ -0,0 +1,29 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | (function (index_js) { | ||
7 | 'use strict'; | ||
8 | |||
9 | var locale = { | ||
10 | code: 'zh-tw', | ||
11 | buttonText: { | ||
12 | prev: '上個', | ||
13 | next: '下個', | ||
14 | today: '今天', | ||
15 | year: '年', | ||
16 | month: '月', | ||
17 | week: '週', | ||
18 | day: '天', | ||
19 | list: '活動列表', | ||
20 | }, | ||
21 | weekText: '週', | ||
22 | allDayText: '整天', | ||
23 | moreLinkText: '顯示更多', | ||
24 | noEventsText: '沒有任何活動', | ||
25 | }; | ||
26 | |||
27 | index_js.globalLocales.push(locale); | ||
28 | |||
29 | })(FullCalendar); | ||
diff --git a/public/js/fullcalendar/packages/core/locales/zh-tw.global.min.js b/public/js/fullcalendar/packages/core/locales/zh-tw.global.min.js new file mode 100644 index 0000000..5bae25d --- /dev/null +++ b/public/js/fullcalendar/packages/core/locales/zh-tw.global.min.js | |||
@@ -0,0 +1,6 @@ | |||
1 | /*! | ||
2 | FullCalendar Core v6.1.17 | ||
3 | Docs & License: https://fullcalendar.io | ||
4 | (c) 2024 Adam Shaw | ||
5 | */ | ||
6 | !function(e){"use strict";FullCalendar.globalLocales.push({code:"zh-tw",buttonText:{prev:"上個",next:"下個",today:"今天",year:"年",month:"月",week:"週",day:"天",list:"活動列表"},weekText:"週",allDayText:"整天",moreLinkText:"顯示更多",noEventsText:"沒有任何活動"})}(); \ No newline at end of file | ||