@daypilot/daypilot-lite-vue 4.8.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/daypilot-vue.min.d.ts +19 -1
- package/daypilot-vue.min.js +14 -14
- package/package.json +2 -2
package/daypilot-vue.min.js
CHANGED
|
@@ -3,18 +3,18 @@ DayPilot Lite
|
|
|
3
3
|
Copyright (c) 2005 - 2025 Annpoint s.r.o.
|
|
4
4
|
https://www.daypilot.org/
|
|
5
5
|
Licensed under Apache Software License 2.0
|
|
6
|
-
Version: 2025.4.
|
|
6
|
+
Version: 2025.4.766-lite
|
|
7
7
|
*/
|
|
8
|
-
"use strict";var DayPilot={Global:{}};!function(DayPilot){function e(e,t){return DayPilot.isArray(t)||(t=e.areas,t||(e.cache?t=e.cache.areas:e.data&&(t=e.data.areas))),t}function t(e){var t=DayPilot.Date.Cache.Ticks;if(t[e])return DayPilot.Stats.cacheHitsTicks+=1,t[e];var n,a=new Date(e),i=a.getUTCMilliseconds();n=0===i?"":i<10?".00"+i:i<100?".0"+i:"."+i;var r=a.getUTCSeconds();r<10&&(r="0"+r);var o=a.getUTCMinutes();o<10&&(o="0"+o);var s=a.getUTCHours();s<10&&(s="0"+s);var l=a.getUTCDate();l<10&&(l="0"+l);var d=a.getUTCMonth()+1;d<10&&(d="0"+d);var c=a.getUTCFullYear();if(c<=0)throw"The minimum year supported is 1.";c<10?c="000"+c:c<100?c="00"+c:c<1e3&&(c="0"+c);var u=c+"-"+d+"-"+l+"T"+s+":"+o+":"+r+n;return t[e]=u,u}function n(e,t){"string"==typeof t&&(t=DayPilot.Locale.find(t)),t=t||DayPilot.Locale.US;var n=[{"seq":"yyyy","expr":"[0-9]{4,4}","str":function(e){return e.getYear()}},{"seq":"yy","expr":"[0-9]{2,2}","str":function(e){return e.getYear()%100},"transform":function(e){return parseInt(e)+2e3}},{"seq":"mm","expr":"[0-9]{2,2}","str":function(e){var t=e.getMinutes();return t<10?"0"+t:t}},{"seq":"m","expr":"[0-9]{1,2}","str":function(e){return e.getMinutes()}},{"seq":"HH","expr":"[0-9]{2,2}","str":function(e){var t=e.getHours();return t<10?"0"+t:t}},{"seq":"H","expr":"[0-9]{1,2}","str":function(e){return e.getHours()}},{"seq":"hh","expr":"[0-9]{2,2}","str":function(e){var t=e.getHours();t%=12,0===t&&(t=12);var n=t;return n<10?"0"+n:n}},{"seq":"h","expr":"[0-9]{1,2}","str":function(e){var t=e.getHours();return t%=12,0===t&&(t=12),t}},{"seq":"ss","expr":"[0-9]{2,2}","str":function(e){var t=e.getSeconds();return t<10?"0"+t:t}},{"seq":"s","expr":"[0-9]{1,2}","str":function(e){return e.getSeconds()}},{"seq":"MMMM","expr":"[^\\s0-9]*","str":function(e){return t.monthNames[e.getMonth()]},"transform":function(e){var n=DayPilot.indexOf(t.monthNames,e,a);return n<0?null:n+1}},{"seq":"MMM","expr":"[^\\s0-9]*","str":function(e){return t.monthNamesShort[e.getMonth()]},"transform":function(e){var n=DayPilot.indexOf(t.monthNamesShort,e,a);return n<0?null:n+1}},{"seq":"MM","expr":"[0-9]{2,2}","str":function(e){var t=e.getMonth()+1;return t<10?"0"+t:t}},{"seq":"M","expr":"[0-9]{1,2}","str":function(e){return e.getMonth()+1}},{"seq":"dddd","expr":"[^\\s0-9]*","str":function(e){return t.dayNames[e.getDayOfWeek()]}},{"seq":"ddd","expr":"[^\\s0-9]*","str":function(e){return t.dayNamesShort[e.getDayOfWeek()]}},{"seq":"dd","expr":"[0-9]{2,2}","str":function(e){var t=e.getDay();return t<10?"0"+t:t}},{"seq":"%d","expr":"[0-9]{1,2}","str":function(e){return e.getDay()}},{"seq":"d","expr":"[0-9]{1,2}","str":function(e){return e.getDay()}},{"seq":"tt","expr":"(AM|PM|am|pm)","str":function(e){return e.getHours()<12?"AM":"PM"},"transform":function(e){return e.toUpperCase()}}],i=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};this.init=function(){this.year=this.findSequence("yyyy")||this.findSequence("yy"),this.month=this.findSequence("MMMM")||this.findSequence("MMM")||this.findSequence("MM")||this.findSequence("M"),this.day=this.findSequence("dd")||this.findSequence("d"),this.hours=this.findSequence("HH")||this.findSequence("H"),this.minutes=this.findSequence("mm")||this.findSequence("m"),this.seconds=this.findSequence("ss")||this.findSequence("s"),this.ampm=this.findSequence("tt"),this.hours12=this.findSequence("hh")||this.findSequence("h")},this.findSequence=function(t){function a(e){return parseInt(e)}return e.indexOf(t)===-1?null:{"findValue":function(r){for(var o=i(e),s=null,l=0;l<n.length;l++){var d=t===n[l].seq,c=n[l].expr;d&&(c="("+c+")",s=n[l].transform),o=o.replace(n[l].seq,c)}o="^"+o+"$";try{var u=new RegExp(o),h=u.exec(r);return h?(s=s||a)(h[1]):null}catch(e){throw"unable to create regex from: "+o}}}},this.print=function(t){for(var a=function(e){for(var t=0;t<n.length;t++)if(n[t]&&n[t].seq===e)return n[t];return null},i=e.length<=0,r=0,o=[];!i;){var s=e.substring(r),l=/%?(.)\1*/.exec(s);if(l&&l.length>0){var d=l[0],c=a(d);c?o.push(c):o.push(d),r+=d.length,i=e.length<=r}else i=!0}for(var u=0;u<o.length;u++){var h=o[u];"string"!=typeof h&&(o[u]=h.str(t))}return o.join("")},this.parse=function(e){var t=this.year.findValue(e);if(!t)return null;var n=this.month.findValue(e);if(DayPilot.Util.isNullOrUndefined(n))return null;if(n>12||n<1)return null;var a=this.day.findValue(e),i=DayPilot.Date.fromYearMonthDay(t,n).daysInMonth();if(a<1||a>i)return null;var r=this.hours?this.hours.findValue(e):0,o=this.minutes?this.minutes.findValue(e):0,s=this.seconds?this.seconds.findValue(e):0,l=this.ampm?this.ampm.findValue(e):null;if(this.ampm&&this.hours12){var d=this.hours12.findValue(e);if(d<1||d>12)return null;r="PM"===l?12===d?12:d+12:12===d?0:d}if(r<0||r>23)return null;if(o<0||o>59)return null;if(s<0||s>59)return null;var c=new Date;return c.setUTCFullYear(t,n-1,a),c.setUTCHours(r),c.setUTCMinutes(o),c.setUTCSeconds(s),c.setUTCMilliseconds(0),new DayPilot.Date(c)},this.init()}function a(e,t){return!DayPilot.Util.isNullOrUndefined(e)&&(!DayPilot.Util.isNullOrUndefined(t)&&e.toLocaleLowerCase()===t.toLocaleLowerCase())}function i(e){e=Math.min(e,255),e=Math.max(e,0);var t=e.toString(16);return e<16?"0"+t:t}if("undefined"==typeof DayPilot.$){"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),DayPilot.$=function(e){return document.getElementById(e)},DayPilot.touch={},DayPilot.touch.start="touchstart",DayPilot.touch.move="touchmove",DayPilot.touch.end="touchend",DayPilot.mo3=function(e,t){var n=t.touches&&t.touches[0]?t.touches[0]:t;if(!e){return{x:void 0!==n.pageX?n.pageX:n.clientX+window.pageXOffset,y:void 0!==n.pageY?n.pageY:n.clientY+window.pageYOffset,shift:!!t.shiftKey,meta:!!t.metaKey,ctrl:!!t.ctrlKey,alt:!!t.altKey}}var a=e.getBoundingClientRect(),i=n.clientX-a.left,r=n.clientY-a.top;return i=Math.round(i),r=Math.round(r),{x:i,y:r,shift:!!t.shiftKey,meta:!!t.metaKey,ctrl:!!t.ctrlKey,alt:!!t.altKey}},DayPilot.browser={get ios(){var e,t;return"undefined"!=typeof navigator&&((null===(e=navigator.userAgent)||void 0===e?void 0:e.includes("iPad"))||(null===(t=navigator.userAgent)||void 0===t?void 0:t.includes("iPhone")))},get hover(){return!window.matchMedia("(any-hover: none)").matches}},DayPilot.debounce=function(e,t){var n;return function(){var a=this,i=arguments,r=function(){n=null,e.apply(a,i)};clearTimeout(n),n=setTimeout(r,t)}},DayPilot.page=function(e){var t=e.changedTouches&&e.changedTouches[0]?e.changedTouches[0]:e;return"undefined"!=typeof t.pageX?{x:t.pageX,y:t.pageY}:"undefined"!=typeof e.clientX&&document.body&&document.documentElement?{x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop}:null},DayPilot.abs=function(e,t){if(!e)return null;if(e.getBoundingClientRect){var n=DayPilot.absBoundingClientBased(e);if(t){var a=DayPilot.absOffsetBased(e,!1),i=DayPilot.absOffsetBased(e,!0);n.x+=i.x-a.x,n.y+=i.y-a.y,n.w=i.w,n.h=i.h}return n}return DayPilot.absOffsetBased(e,t)},DayPilot.absBoundingClientBased=function(e){var t=e.getBoundingClientRect();return{x:t.left+window.pageXOffset,y:t.top+window.pageYOffset,w:e.clientWidth,h:e.clientHeight,toString:function(){return"x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h}}},DayPilot.absOffsetBased=function(e,t){for(var n={x:e.offsetLeft,y:e.offsetTop,w:e.clientWidth,h:e.clientHeight,toString:function(){return"x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h}};e.offsetParent;)e=e.offsetParent,n.x-=e.scrollLeft,n.y-=e.scrollTop,t&&(n.x<0&&(n.w+=n.x,n.x=0),n.y<0&&(n.h+=n.y,n.y=0),e.scrollLeft>0&&n.x+n.w>e.clientWidth&&(n.w-=n.x+n.w-e.clientWidth),e.scrollTop&&n.y+n.h>e.clientHeight&&(n.h-=n.y+n.h-e.clientHeight)),n.x+=e.offsetLeft,n.y+=e.offsetTop;var a=DayPilot.pageOffset();return n.x+=a.x,n.y+=a.y,n},DayPilot.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},DayPilot.distance=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},DayPilot.sheet=function(){function e(){for(var e=document.querySelectorAll("style[nonce]"),t=0;t<e.length;t++){var n=e[t];if(n.nonce)return n.nonce}if(document.currentScript&&document.currentScript.nonce)return document.currentScript.nonce;for(var a=document.querySelectorAll("script[nonce]"),i=0;i<a.length;i++){var r=a[i];if(r.nonce)return r.nonce}return""}if("undefined"==typeof window){var t={};return t.add=function(){},t.commit=function(){},t}var n=document.createElement("style");n.nonce=e(),n.styleSheet||n.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(n);var a=!!n.styleSheet,i={};return i.rules=[],i.commit=function(){a&&(n.styleSheet.cssText=this.rules.join("\n"))},i.add=function(e,t,i){return a?void this.rules.push(e+"{"+t+"}"):void(n.sheet.insertRule?("undefined"==typeof i&&(i=n.sheet.cssRules.length),n.sheet.insertRule(e+"{"+t+"}",i)):n.sheet.addRule&&n.sheet.addRule(e,t,i))},i},DayPilot.gs=function(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)||""},DayPilot.StyleReader=function(e){this.get=function(t){return e?DayPilot.gs(e,t):null},this.getPx=function(e){var t=this.get(e);return t.indexOf("px")===-1?void 0:parseInt(t,10)}},function(){if(!DayPilot.Global.defaultCss){var e=DayPilot.sheet();e.add(".menu_default_main","user-select:none; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size: 13px;border: 1px solid #dddddd;background-color: white;padding: 0px;cursor: default;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAABCAIAAABG0om7AAAAKXRFWHRDcmVhdGlvbiBUaW1lAHBvIDEwIDUgMjAxMCAyMjozMzo1OSArMDEwMGzy7+IAAAAHdElNRQfaBQoUJAesj4VUAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAABGdBTUEAALGPC/xhBQAAABVJREFUeNpj/P//PwO1weMnT2RlZAAYuwX/4oA3BgAAAABJRU5ErkJggg==);background-repeat: repeat-y;xborder-radius: 5px;-moz-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);-webkit-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);"),e.add(".menu_default_main, .menu_default_main *, .menu_default_main *:before, .menu_default_main *:after","box-sizing: content-box;"),e.add(".menu_default_title","background-color: #f2f2f2;border-bottom: 1px solid gray;padding: 4px 4px 4px 37px;"),e.add(".menu_default_main a","padding: 2px 2px 2px 35px;color: black;text-decoration: none;cursor: default;"),e.add(".menu_default_main.menu_default_withchildren a","padding: 2px 35px 2px 35px;"),e.add(".menu_default_main a img","margin-left: 6px;margin-top: 2px;"),e.add(".menu_default_item_text","display: block;height: 20px;line-height: 20px; overflow:hidden;padding-left: 2px;padding-right: 20px; white-space: nowrap;"),e.add(".menu_default_main a:hover","background-color: #f3f3f3;"),e.add(".menu_default_main div div","border-top: 1px solid #dddddd;margin-top: 2px;margin-bottom: 2px;margin-left: 28px;"),e.add(".menu_default_main a.menu_default_item_disabled","color: #ccc"),e.add(".menu_default_item_haschildren.menu_default_item_haschildren_active","background-color: #f3f3f3;"),e.add(".menu_default_item_haschildren a:before","content: ''; border-width: 5px; border-color: transparent transparent transparent #666; border-style: solid; width: 0px; height:0px; position: absolute; right: 5px; margin-top: 5px;"),e.add(".menu_default_item_icon","position: absolute; top:0px; left: 0px; padding: 2px 2px 2px 8px;"),e.add(".menu_default_item a i","height: 20px;line-height: 20px;"),e.add(".menu_default_item .menu_default_item_symbol","width: 18px; height: 18px; color: #999; margin-left: 6px;margin-top: 2px;"),e.add(".menubar_default_main","border-bottom: 1px solid #ccc; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px; user-select:none;"),e.add(".menubar_default_item","display: inline-block; padding: 6px 10px; cursor: default;"),e.add(".menubar_default_item:hover","background-color: #f2f2f2;"),e.add(".menubar_default_item_active","background-color: #f2f2f2;"),e.add(".calendar_default_main","--dp-calendar-border-color: #c0c0c0;--dp-calendar-font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;--dp-calendar-font-size: 13px;--dp-calendar-header-bg-color: #f3f3f3;--dp-calendar-header-color: #333;--dp-calendar-colheader-padding: 0px;--dp-calendar-rowheader-font-size: 16pt;--dp-calendar-rowheader-padding: 3px;--dp-calendar-cell-bg-color: #f9f9f9;--dp-calendar-cell-business-bg-color: #ffffff;--dp-calendar-cell-border-color: #ddd;--dp-calendar-colheader-horizontal-align: center;--dp-calendar-colheader-vertical-align: center;--dp-calendar-allday-event-color: #333;--dp-calendar-allday-event-border-color: #999;--dp-calendar-allday-event-border: 1px solid var(--dp-calendar-allday-event-border-color);--dp-calendar-allday-event-border-radius: 0px;--dp-calendar-allday-event-bg-top-color: #ffffff;--dp-calendar-allday-event-bg-bottom-color: #eeeeee;--dp-calendar-allday-event-background: linear-gradient(to bottom, var(--dp-calendar-allday-event-bg-top-color) 0%, var(--dp-calendar-allday-event-bg-bottom-color) 100%);--dp-calendar-allday-event-box-shadow: none;--dp-calendar-allday-event-padding: 4px;--dp-calendar-allday-event-horizontal-align: flex-start;--dp-calendar-event-color: #333;--dp-calendar-event-border-color: #999;--dp-calendar-event-border: 1px solid var(--dp-calendar-event-border-color);--dp-calendar-event-border-radius: 0px;--dp-calendar-event-box-shadow: none;--dp-calendar-event-bg-top-color: #ffffff;--dp-calendar-event-bg-bottom-color: #eeeeee;--dp-calendar-event-background: linear-gradient(to bottom, var(--dp-calendar-event-bg-top-color) 0%, var(--dp-calendar-event-bg-bottom-color) 100%);--dp-calendar-event-bar-bg-color: #9dc8e8;--dp-calendar-event-bar-color: #1066a8;--dp-calendar-event-bar-width: 6px;--dp-calendar-event-bar-left: 0px;--dp-calendar-event-bar-bottom: 0px;--dp-calendar-event-bar-top: 0px;--dp-calendar-event-bar-display: block;--dp-calendar-event-padding: 2px;--dp-calendar-event-padding-left: 8px;--dp-calendar-message-bg-color: #ffa216;--dp-calendar-message-color: #ffffff;--dp-calendar-message-padding: 10px;--dp-calendar-message-opacity: 0.9;--dp-calendar-selected-event-bg-color: #ddd;--dp-calendar-shadow-color: #bbbbbb;--dp-calendar-shadow-border-color: #888888;--dp-calendar-forbidden-shadow-border-color: #cc0000;--dp-calendar-forbidden-shadow-bg-color: #cc4125;--dp-calendar-now-indicator-color: red;--dp-calendar-scroll-bg-color: #f3f3f3;"),e.add(".calendar_default_main *, .calendar_default_main *:before, .calendar_default_main *:after","box-sizing: content-box;"),e.add(".calendar_default_main","border:1px solid var(--dp-calendar-border-color); font-family:var(--dp-calendar-font-family); font-size:var(--dp-calendar-font-size);"),e.add(".calendar_default_rowheader_inner, .calendar_default_cornerright_inner, .calendar_default_corner_inner, .calendar_default_colheader_inner, .calendar_default_alldayheader_inner","color: var(--dp-calendar-header-color); background: var(--dp-calendar-header-bg-color);"),e.add(".calendar_default_colheader_back","background: var(--dp-calendar-header-bg-color); border-bottom: 1px solid red;"),e.add(".calendar_default_colheader_back_inner","position: absolute; inset: 0; border-bottom: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_cornerright_inner","position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-bottom: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_direction_rtl .calendar_default_cornerright_inner","border-right: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_rowheader_inner","font-size: var(--dp-calendar-rowheader-font-size); text-align: right; position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-right: 1px solid var(--dp-calendar-border-color); border-bottom: 1px solid var(--dp-calendar-border-color); padding: var(--dp-calendar-rowheader-padding);"),e.add(".calendar_default_rowheader_simple .calendar_default_rowheader_inner","font-size: inherit; display: flex; align-items: center; justify-content: center; white-space: nowrap;"),e.add(".calendar_default_direction_rtl .calendar_default_rowheader_inner","border-right: none;"),e.add(".calendar_default_corner_inner","position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-right: 1px solid var(--dp-calendar-border-color); border-bottom: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_direction_rtl .calendar_default_corner_inner","border-right: none;"),e.add(".calendar_default_rowheader_minutes","font-size: 10px; vertical-align: super; padding-left: 2px; padding-right: 2px;"),e.add(".calendar_default_colheader_inner","position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; padding: var(--dp-calendar-colheader-padding);border-right: 1px solid var(--dp-calendar-border-color); border-bottom: 1px solid var(--dp-calendar-border-color); display: flex; align-items: var(--dp-calendar-colheader-vertical-align); justify-content: var(--dp-calendar-colheader-horizontal-align);"),e.add(".calendar_default_cell_inner","position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-right: 1px solid var(--dp-calendar-cell-border-color); border-bottom: 1px solid var(--dp-calendar-cell-border-color); background: var(--dp-calendar-cell-bg-color);"),e.add(".calendar_default_cell_business .calendar_default_cell_inner","background: var(--dp-calendar-cell-business-bg-color);"),e.add(".calendar_default_alldayheader_inner","text-align: center; position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-right: 1px solid var(--dp-calendar-border-color); border-bottom: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_message","opacity: var(--dp-calendar-message-opacity); padding: var(--dp-calendar-message-padding); color: var(--dp-calendar-message-color); background: var(--dp-calendar-message-bg-color);"),e.add(".calendar_default_event_inner","color: var(--dp-calendar-event-color); border: var(--dp-calendar-event-border); border-radius: var(--dp-calendar-event-border-radius); background: var(--dp-calendar-event-background);"),e.add(".calendar_default_alldayevent","box-shadow: var(--dp-calendar-allday-event-box-shadow); border-radius: var(--dp-calendar-allday-event-border-radius);"),e.add(".calendar_default_alldayevent_inner","color: var(--dp-calendar-allday-event-color); border: var(--dp-calendar-allday-event-border); border-radius: var(--dp-calendar-allday-event-border-radius); background: var(--dp-calendar-allday-event-background);"),e.add(".calendar_default_event_bar","display: var(--dp-calendar-event-bar-display); top: var(--dp-calendar-event-bar-top); bottom: var(--dp-calendar-event-bar-bottom); left: var(--dp-calendar-event-bar-left); width: var(--dp-calendar-event-bar-width); background-color: var(--dp-calendar-event-bar-bg-color);"),e.add(".calendar_default_direction_rtl .calendar_default_event_bar","top: 0px; bottom: 0px; right: 0px; width: var(--dp-calendar-event-bar-width); background-color: var(--dp-calendar-event-bar-bg-color);"),e.add(".calendar_default_event_bar_inner","position: absolute; width: var(--dp-calendar-event-bar-width); background-color: var(--dp-calendar-event-bar-color);"),e.add(".calendar_default_selected .calendar_default_event_inner","background: var(--dp-calendar-selected-event-bg-color);"),e.add(".calendar_default_alldayevent_inner","position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; overflow: hidden; padding: var(--dp-calendar-allday-event-padding); margin-right: 0px; display: flex; align-items: center; justify-content: var(--dp-calendar-allday-event-horizontal-align);"),e.add(".calendar_default_event_withheader .calendar_default_event_inner","padding-top: 15px;"),e.add(".calendar_default_event","box-shadow: var(--dp-calendar-event-box-shadow); border-radius: var(--dp-calendar-event-border-radius); cursor: default;"),e.add(".calendar_default_event_inner","position: absolute; overflow: hidden; top: 0px; bottom: 0px; left: 0px; right: 0px; padding: var(--dp-calendar-event-padding) var(--dp-calendar-event-padding) var(--dp-calendar-event-padding) var(--dp-calendar-event-padding-left);"),e.add(".calendar_default_direction_rtl .calendar_default_event_inner","padding: 2px 8px 2px 2px;"),e.add(".calendar_default_shadow_inner","box-sizing: border-box; background-color: var(--dp-calendar-shadow-color); border: 1px solid var(--dp-calendar-shadow-border-color); opacity: 0.5; height: 100%;"),e.add(".calendar_default_shadow","box-shadow: 0 2px 5px rgba(0,0,0,0.2);"),e.add(".calendar_default_shadow_forbidden:after","content: ''; position: absolute; top: 5px; left: calc(50% - 10px); border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background-image: url('data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2720%27 height=%2720%27 viewBox=%270 0 20 20%27%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%279%27 fill=%27%23cc0000aa%27 /%3E%3Cline x1=%275%27 y1=%275%27 x2=%2715%27 y2=%2715%27 stroke=%27white%27 stroke-width=%271.5%27/%3E%3Cline x1=%2715%27 y1=%275%27 x2=%275%27 y2=%2715%27 stroke=%27white%27 stroke-width=%271.5%27/%3E%3C/svg%3E'); background-repeat: no-repeat; background-position: center; background-size: contain;"),e.add(".calendar_default_shadow_forbidden .calendar_default_shadow_inner","border: 1px solid var(--dp-calendar-forbidden-shadow-border-color); background: var(--dp-calendar-forbidden-shadow-bg-color);"),e.add(".calendar_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer;"),e.add(".calendar_default_event_delete:hover","opacity: 1; -ms-filter: none;"),e.add(".calendar_default_scroll_up","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAB3RJTUUH2wESDiYcrhwCiQAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAARnQU1BAACxjwv8YQUAAACcSURBVHjaY2AgF9wWsTW6yGMlhi7OhC7AyMDQzMnBXIpFHAFuCtuaMTP+P8nA8P/b1x//FfW/HHuF1UQmxv+NUP1c3OxMVVhNvCVi683E8H8LXOY/w9+fTH81tF8fv4NiIpBRj+YoZtZ/LDUoJmKYhsVUpv0MDiyMDP96sIYV0FS2/8z9ICaLlOhvS4b/jC//MzC8xBG0vJeF7GQBlK0xdiUzCtsAAAAASUVORK5CYII=);"),e.add(".calendar_default_scroll_down","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAACqSURBVChTY7wpam3L9J+xmQEP+PGPKZZxP4MDi4zI78uMDIwa2NT+Z2DYovrmiC+TI8OBP/8ZmEqwGvif4e8vxr+FIDkmEKH25vBWBgbG0+iK/zEwLtF+ffwOXCGI8Y+BoRFFIdC030x/WmBiYBNhpgLdswNJ8RSYaSgmgk39z1gPUfj/29ef/9rwhQTDHRHbrbdEbLvRFcGthkkAra/9/uMvhkK8piNLAgCRpTnNn4AEmAAAAABJRU5ErkJggg==);"),e.add(".calendar_default_now","background-color: var(--dp-calendar-now-indicator-color);"),e.add(".calendar_default_now:before","content: ''; top: -5px; border-width: 5px; border-color: transparent transparent transparent var(--dp-calendar-now-indicator-color); border-style: solid; width: 0px; height: 0px; position: absolute; -moz-transform: scale(.9999);"),e.add(".calendar_default_shadow_top","box-sizing: border-box; padding: 2px; border: 1px solid var(--dp-calendar-border-color); background: linear-gradient(to bottom, #ffffff 0%, #eeeeee); pointer-events: none;"),e.add(".calendar_default_shadow_bottom","box-sizing: border-box; padding: 2px; border: 1px solid var(--dp-calendar-border-color); background: linear-gradient(to bottom, #ffffff 0%, #eeeeee); pointer-events: none;"),e.add(".calendar_default_crosshair_vertical, .calendar_default_crosshair_horizontal, .calendar_default_crosshair_left, .calendar_default_crosshair_top","background-color: gray; opacity: 0.2;"),e.add(".calendar_default_loading","background-color: orange; color: white; padding: 2px;"),e.add(".calendar_default_scroll","background-color: var(--dp-calendar-header-bg-color);"),e.add(".calendar_default_event_moving_source","opacity: 0.5;"),e.add(".calendar_default_colmove_handle","background-repeat: no-repeat; background-position: center center; background-color: #ccc; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAKCAYAAACT+/8OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAClJREFUGFdj+P//P4O9vX2Bg4NDP4gNFgBytgPxebgAMsYuQGMz/jMAAFsTZDPYJlDHAAAAAElFTkSuQmCC); cursor: move;"),e.add(".calendar_default_colheader:hover .calendar_default_colheader_splitter","background-color: #c0c0c0;"),e.add(".calendar_default_colmove_source","background-color: black; opacity: 0.5;"),e.add(".calendar_default_colmove_position_before","box-sizing: border-box; border-left: 2px solid #999999;"),e.add(".calendar_default_colmove_position_before:before","content: ''; border-width: 6px; border-color: transparent #999999 transparent transparent; border-style: solid; width: 0px; height: 0px; position: absolute;"),e.add(".calendar_default_colmove_position_after","box-sizing: border-box; border-right: 2px solid #999999;"),e.add(".calendar_default_colmove_position_after:before","content: ''; border-width: 6px; border-color: transparent transparent transparent #999999; border-style: solid; width: 0px; height: 0px; position: absolute;"),e.add(".calendar_default_colmove_position_child","box-sizing: border-box; border-bottom: 2px solid #999999;"),e.add(".calendar_default_colmove_position_child:before","content: ''; border-width: 6px; border-color: #999999 transparent transparent transparent; border-style: solid; width: 0px; height: 0px; position: absolute;"),e.add(".calendar_default_colmove_position_forbidden","border-top: 2px solid red;"),e.add(".calendar_default_colheader .calendar_default_colheader_splitter:hover","background-color: #999999;"),e.add(".calendar_default_block","background-color: #808080; opacity: 0.5;"),e.add(".month_default_main","--dp-month-border-color: #c0c0c0;--dp-month-font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--dp-month-font-size: 13px;--dp-month-cell-border-color: #ddd;--dp-month-cell-bg-color: #f9f9f9;--dp-month-cell-business-bg-color: #ffffff;--dp-month-event-color: #333;--dp-month-event-border-color: #999;--dp-month-event-border: 1px solid var(--dp-month-event-border-color);--dp-month-event-bg-top-color: #ffffff;--dp-month-event-bg-bottom-color: #eeeeee;--dp-month-event-background: linear-gradient(to bottom, var(--dp-month-event-bg-top-color) 0%, var(--dp-month-event-bg-bottom-color) 100%);--dp-month-event-horizontal-align: flex-start;--dp-month-event-vertical-align: center;--dp-month-event-padding: 2px;--dp-month-event-padding-left: 10px;--dp-month-event-padding-rtl: 2px 10px 2px 1px;--dp-month-event-border-radius: 0px;--dp-month-event-box-shadow: none;--dp-month-event-bar-top: 1px;--dp-month-event-bar-left: 2px;--dp-month-event-bar-bottom: 1px;--dp-month-event-bar-width: 6px;--dp-month-event-bar-color: #1066a8;--dp-month-event-bar-display: block;--dp-month-header-bg-color: #f3f3f3;--dp-month-header-color: #333;--dp-month-header-horizontal-align: center;--dp-month-header-vertical-align: center;--dp-month-header-padding: 0px;--dp-month-message-bg-color: #ffa216;--dp-month-message-color: #ffffff;--dp-month-message-padding: 10px;--dp-month-selected-event-bg-color: #ddd;--dp-month-shadow-color: #bbbbbb;--dp-month-shadow-border-color: #888888;"),e.add(".month_default_main *, .month_default_main *:before, .month_default_main *:after","box-sizing: content-box; "),e.add(".month_default_main","border: 1px solid var(--dp-month-border-color); font-family: var(--dp-month-font-family); font-size: var(--dp-month-font-size); color: #333; "),e.add(".month_default_cell_inner","border-right: 1px solid var(--dp-month-cell-border-color); border-bottom: 1px solid var(--dp-month-cell-border-color); position: absolute; top: 0; left: 0; bottom: 0; right: 0; background-color: var(--dp-month-cell-bg-color); "),e.add(".month_default_cell_business .month_default_cell_inner","background-color: var(--dp-month-cell-business-bg-color); "),e.add(".month_default_cell_header","text-align: right; padding: 4px; box-sizing: border-box; "),e.add(".month_default_header_inner","position: absolute; inset: 0; border-right: 1px solid var(--dp-month-border-color); border-bottom: 1px solid var(--dp-month-border-color); cursor: default; color: var(--dp-month-header-color); background: var(--dp-month-header-bg-color); overflow: hidden; display: flex; align-items: var(--dp-month-header-vertical-align); justify-content: var(--dp-month-header-horizontal-align); padding: var(--dp-month-header-padding);"),e.add(".month_default_message","opacity: 0.9; color: var(--dp-month-message-color); background: var(--dp-month-message-bg-color); padding: var(--dp-month-message-padding); "),e.add(".month_default_event","border-radius: var(--dp-month-event-border-radius); box-shadow: var(--dp-month-event-box-shadow); "),e.add(".month_default_event_inner","position: absolute; top: 0; bottom: 0; left: 1px; right: 1px; overflow: hidden; padding: var(--dp-month-event-padding) var(--dp-month-event-padding) var(--dp-month-event-padding) var(--dp-month-event-padding-left); color: var(--dp-month-event-color); background: var(--dp-month-event-background); border: var(--dp-month-event-border); border-radius: var(--dp-month-event-border-radius); display: flex; align-items: var(--dp-month-event-vertical-align); justify-content: var(--dp-month-event-horizontal-align); "),e.add(".month_default_direction_rtl .month_default_event_inner","right: 2px; padding: var(--dp-month-event-padding-rtl); "),e.add(".month_default_event_continueright .month_default_event_inner","border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dotted; "),e.add(".month_default_event_continueleft .month_default_event_inner","border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dotted; "),e.add(".month_default_event_bar","display: var(--dp-month-event-bar-display); top: var(--dp-month-event-bar-top); bottom: var(--dp-month-event-bar-bottom); left: var(--dp-month-event-bar-left); width: var(--dp-month-event-bar-width); "),e.add(".month_default_direction_rtl .month_default_event_bar","top: 1px; bottom: 1px; right: 3px; width: var(--dp-month-event-bar-width); "),e.add(".month_default_event_bar_inner","position: absolute; width: var(--dp-month-event-bar-width); background-color: var(--dp-month-event-bar-color); "),e.add(".month_default_event_continueleft .month_default_event_bar","display: none; "),e.add(".month_default_selected .month_default_event_inner","background: var(--dp-month-selected-event-bg-color); "),e.add(".month_default_shadow_inner","box-sizing: border-box; background-color: var(--dp-month-shadow-color); border: 1px solid var(--dp-month-shadow-border-color); opacity: 0.5; height: 100%; "),e.add(".month_default_shadow","box-shadow: 0 2px 5px rgba(0, 0, 0, .2); "),e.add(".month_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer; "),e.add(".month_default_event_delete:hover","opacity: 1; "),e.add(".month_default_event_timeleft","color: #ccc; font-size: 11px; display: flex; align-items: center; "),
|
|
9
|
-
e.add(".month_default_event_timeright","color: #ccc; font-size: 11px; display: flex; align-items: center; justify-content: end; "),e.add(".month_default_loading","background-color: orange; color: white; padding: 2px; "),e.add(".month_default_shadow_forbidden:after","content: ''; position: absolute; top: calc(50% - 10px); left: 10px; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background-image: url('data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2720%27 height=%2720%27 viewBox=%270 0 20 20%27%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%279%27 fill=%27%23cc0000aa%27 /%3E%3Cline x1=%275%27 y1=%275%27 x2=%2715%27 y2=%2715%27 stroke=%27white%27 stroke-width=%271.5%27/%3E%3Cline x1=%2715%27 y1=%275%27 x2=%275%27 y2=%2715%27 stroke=%27white%27 stroke-width=%271.5%27/%3E%3C/svg%3E'); background-repeat: no-repeat; background-position: center; background-size: contain; "),e.add(".month_default_shadow_forbidden .month_default_shadow_inner","border: 1px solid #cc0000; background: #cc4125; "),e.add(".navigator_default_main","--dp-nav-border-color: #c0c0c0;--dp-nav-font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;--dp-nav-font-size: 12px;--dp-nav-title-color: #333;--dp-nav-title-bg-color: #f3f3f3;--dp-nav-dayheader-color: #333;--dp-nav-dayheader-bg-color: #ffffff;--dp-nav-weeknumber-color: #999;--dp-nav-weeknumber-bg-color: #ffffff;--dp-nav-day-color: #000;--dp-nav-day-bg-color: #ffffff;--dp-nav-dayother-color: gray;--dp-nav-dayother-bg-color: #ffffff;--dp-nav-weekend-bg-color: #f0f0f0;--dp-nav-select-bg-color: #FFE794;--dp-nav-text-align: center;"),e.add(".navigator_default_main *, .navigator_default_main *:before, .navigator_default_main *:after","box-sizing: content-box;"),e.add(".navigator_default_main","border-left: 1px solid var(--dp-nav-border-color);border-right: 1px solid var(--dp-nav-border-color);border-bottom: 1px solid var(--dp-nav-border-color);background-color: white;color: var(--dp-nav-day-color);box-sizing: content-box;"),e.add(".navigator_default_month","font-family: var(--dp-nav-font-family);font-size: var(--dp-nav-font-size);"),e.add(".navigator_default_day","color: var(--dp-nav-day-color); background-color: var(--dp-nav-day-bg-color);"),e.add(".navigator_default_weekend","background-color: var(--dp-nav-weekend-bg-color);"),e.add(".navigator_default_dayheader","color: var(--dp-nav-dayheader-color);background-color: var(--dp-nav-dayheader-bg-color);text-align: var(--dp-nav-text-align);padding: 0px;"),e.add(".navigator_default_line","border-bottom: 1px solid var(--dp-nav-border-color);"),e.add(".navigator_default_dayother","color: var(--dp-nav-dayother-color); background-color: var(--dp-nav-dayother-bg-color);"),e.add(".navigator_default_todaybox","border: 1px solid red;"),e.add(".navigator_default_title, .navigator_default_titleleft, .navigator_default_titleright","box-sizing: border-box; border-top: 1px solid var(--dp-nav-border-color);border-bottom: 1px solid var(--dp-nav-border-color);color: var(--dp-nav-title-color);background: var(--dp-nav-title-bg-color);text-align: var(--dp-nav-text-align);"),e.add(".navigator_default_busy","font-weight: bold;"),e.add(".navigator_default_cell","text-align: var(--dp-nav-text-align);"),e.add(".navigator_default_select .navigator_default_cell_box","background-color: var(--dp-nav-select-bg-color);opacity: 0.5;"),e.add(".navigator_default_weeknumber","text-align: var(--dp-nav-text-align);color: var(--dp-nav-weeknumber-color);background: var(--dp-nav-weeknumber-bg-color);"),e.add(".navigator_default_cell_text","cursor: pointer;"),e.add(".navigator_default_todaysection","box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--dp-nav-border-color);"),e.add(".navigator_default_todaysection_button","cursor: pointer; color: #333; background-color: #f0f0f0; border: 1px solid var(--dp-nav-border-color); padding: 5px 10px; border-radius: 0px; "),e.add(".scheduler_default_main",'--dp-scheduler-border-color: #c0c0c0;--dp-scheduler-border-inner-color: #e0e0e0;--dp-scheduler-cell-bg-color: #f9f9f9;--dp-scheduler-cell-business-bg-color: #ffffff;--dp-scheduler-event-background: linear-gradient(to bottom, var(--dp-scheduler-event-bg-top-color) 0%, var(--dp-scheduler-event-bg-bottom-color) 100%);--dp-scheduler-event-bg-bottom-color: #eeeeee;--dp-scheduler-event-bg-top-color: #ffffff;--dp-scheduler-event-bar-bg-color: #9dc8e8;--dp-scheduler-event-bar-color: #1066a8;--dp-scheduler-event-bar-display: block;--dp-scheduler-event-bar-height: 4px;--dp-scheduler-event-bar-left: 0px;--dp-scheduler-event-bar-right: 0px;--dp-scheduler-event-bar-top: 0px;--dp-scheduler-event-border: 1px solid var(--dp-scheduler-event-border-color);--dp-scheduler-event-border-color: #ccc;--dp-scheduler-event-border-radius: 0px;--dp-scheduler-event-box-shadow: none;--dp-scheduler-event-color: #333;--dp-scheduler-event-horizontal-align: flex-start;--dp-scheduler-event-milestone-color: #38761d;--dp-scheduler-event-padding: 2px;--dp-scheduler-event-selected-bg-color: #ddd;--dp-scheduler-event-vertical-align: center;--dp-scheduler-focus-outline-color: red;--dp-scheduler-font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--dp-scheduler-font-size: 13px;--dp-scheduler-grid-line-break-color: #999;--dp-scheduler-grid-line-color: #eee;--dp-scheduler-header-bg-color: #f3f3f3;--dp-scheduler-header-color: #333;--dp-scheduler-link-color: #cc0000;--dp-scheduler-message-bg-color: #ffa216;--dp-scheduler-message-color: #ffffff;--dp-scheduler-message-padding: 10px;--dp-scheduler-rowheader-padding: 7px;--dp-scheduler-rowheader-vertical-align: center;--dp-scheduler-selectionrectangle-color: #1066a8;--dp-scheduler-shadow-border-color: #888888;--dp-scheduler-shadow-color: #bbbbbb;--dp-scheduler-timeheader-horizontal-align: center;--dp-scheduler-timeheader-padding: 0px;--dp-scheduler-timeheader-vertical-align: center;'),e.add(".scheduler_default_main *, .scheduler_default_main *:before, .scheduler_default_main *:after","box-sizing: content-box;"),e.add(".scheduler_default_main, .scheduler_default_main svg text","box-sizing: content-box; border: 1px solid var(--dp-scheduler-border-color); font-family: var(--dp-scheduler-font-family); font-size: var(--dp-scheduler-font-size);"),e.add(".scheduler_default_selected .scheduler_default_event_inner","background: var(--dp-scheduler-event-selected-bg-color);"),e.add(".scheduler_default_timeheader_scroll","background: var(--dp-scheduler-header-bg-color);"),e.add(".scheduler_default_message","opacity: 0.9; padding: var(--dp-scheduler-message-padding); color: var(--dp-scheduler-message-color); background: var(--dp-scheduler-message-bg-color);"),e.add(".scheduler_default_timeheadergroup,.scheduler_default_timeheadercol","color: var(--dp-scheduler-header-color); background: var(--dp-scheduler-header-bg-color);"),e.add(".scheduler_default_rowheader,.scheduler_default_corner","color: var(--dp-scheduler-header-color); background: var(--dp-scheduler-header-bg-color);"),e.add(".scheduler_default_rowheader.scheduler_default_rowheader_selected","background-color: #aaa; background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent); background-size: 20px 20px;"),e.add(".scheduler_default_rowheader_inner","position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; border-right: 1px solid var(--dp-scheduler-border-inner-color); padding: var(--dp-scheduler-rowheader-padding); display: flex; align-items: var(--dp-scheduler-rowheader-vertical-align);"),e.add(".scheduler_default_timeheadergroup_inner, .scheduler_default_timeheadercol_inner","position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-right: 1px solid var(--dp-scheduler-border-color);"),e.add(".scheduler_default_timeheadergroup_inner","border-bottom: 1px solid var(--dp-scheduler-border-color);"),e.add(".scheduler_default_timeheadergroup_inner, .scheduler_default_timeheadercol_inner, .scheduler_default_timeheader_float","display: flex; align-items: var(--dp-scheduler-timeheader-vertical-align); justify-content: var(--dp-scheduler-timeheader-horizontal-align); padding: var(--dp-scheduler-timeheader-padding);"),e.add(".scheduler_default_divider, .scheduler_default_splitter","background-color: var(--dp-scheduler-border-color);"),e.add(".scheduler_default_divider_horizontal","background-color: var(--dp-scheduler-border-color);"),e.add(".scheduler_default_matrix_vertical_line","background-color: var(--dp-scheduler-grid-line-color);"),e.add(".scheduler_default_matrix_vertical_break","background-color: var(--dp-scheduler-grid-line-break-color);"),e.add(".scheduler_default_matrix_horizontal_line","background-color: var(--dp-scheduler-grid-line-color);"),e.add(".scheduler_default_resourcedivider","background-color: var(--dp-scheduler-border-color);"),e.add(".scheduler_default_shadow_inner","box-sizing: border-box; background-color: var(--dp-scheduler-shadow-color); border: 1px solid var(--dp-scheduler-shadow-border-color); border-radius: var(--dp-scheduler-event-border-radius); opacity: 0.5; height: 100%;"),e.add(".scheduler_default_shadow","box-shadow: 0 2px 5px rgba(0,0,0,.2); border-radius: var(--dp-scheduler-event-border-radius);"),e.add(".scheduler_default_event","font-size: var(--dp-scheduler-font-size); color: var(--dp-scheduler-event-color); border-radius: var(--dp-scheduler-event-border-radius); box-shadow: var(--dp-scheduler-event-box-shadow);"),e.add(".scheduler_default_event_inner","position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; border-radius: var(--dp-scheduler-event-border-radius); padding: var(--dp-scheduler-event-padding); overflow: hidden; border: var(--dp-scheduler-event-border); display: flex; align-items: var(--dp-scheduler-event-vertical-align); justify-content: var(--dp-scheduler-event-horizontal-align); background: var(--dp-scheduler-event-background);"),e.add(".scheduler_default_event_bar","display: var(--dp-scheduler-event-bar-display);top: var(--dp-scheduler-event-bar-top); left: var(--dp-scheduler-event-bar-left); right: var(--dp-scheduler-event-bar-right); height: var(--dp-scheduler-event-bar-height); background-color: var(--dp-scheduler-event-bar-bg-color);"),e.add(".scheduler_default_event_bar_inner","position:absolute; height: var(--dp-scheduler-event-bar-height); background-color: var(--dp-scheduler-event-bar-color);"),e.add(".scheduler_default_event_float","display: flex; align-items: center;"),e.add(".scheduler_default_event_float_inner","padding: var(--dp-scheduler-event-padding) var(--dp-scheduler-event-padding) var(--dp-scheduler-event-padding) 8px; position: relative;"),e.add(".scheduler_default_event_float_inner:after",'content:""; border-color: transparent #666 transparent transparent; border-style:solid; border-width:5px; width:0; height:0; position:absolute; top: calc(50% - 5px); left:-4px;'),e.add(".scheduler_default_event_focus","outline: var(--dp-scheduler-focus-outline-color) 2px solid; z-index: 100; opacity: 0.5;"),e.add(".scheduler_default_columnheader_inner","font-weight: bold;"),e.add(".scheduler_default_columnheader_splitter","box-sizing: border-box; border-right: 1px solid var(--dp-scheduler-border-color);"),e.add(".scheduler_default_columnheader_splitter:hover","background-color: var(--dp-scheduler-border-color);"),e.add(".scheduler_default_columnheader_cell_inner","position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; padding: 2px; display: flex; align-items: center;"),e.add(".scheduler_default_cell","background-color: var(--dp-scheduler-cell-bg-color);"),e.add(".scheduler_default_cell.scheduler_default_cell_business","background-color: var(--dp-scheduler-cell-business-bg-color);"),e.add(".scheduler_default_cell.scheduler_default_cell_business.scheduler_default_cell_selected, .scheduler_default_cell.scheduler_default_cell_selected","background-color: #ccc; background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent); background-size: 20px 20px;"),e.add(".scheduler_default_tree_image_no_children",""),e.add(".scheduler_default_tree_image_expand","background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00gMS41IDAuNSBMIDYuNSA1IEwgMS41IDkuNScgc3R5bGU9J2ZpbGw6bm9uZTtzdHJva2U6Izk5OTk5OTtzdHJva2Utd2lkdGg6MjtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWxpbmVjYXA6YnV0dCcgLz48L3N2Zz4=);"),e.add(".scheduler_default_tree_image_collapse","background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMS41IEwgNSA2LjUgTCA5LjUgMS41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==);"),e.add(".scheduler_default_event_delete","background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTInIGhlaWdodD0nMTInIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgMTEuNSAxMS41IE0gMC41IDExLjUgTCAxMS41IDAuNScgc3R5bGU9J2ZpbGw6bm9uZTtzdHJva2U6IzQ2NDY0NjtzdHJva2Utd2lkdGg6MztzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWxpbmVjYXA6YnV0dCcgLz48L3N2Zz4=) no-repeat center center; opacity: 0.6; cursor: pointer;"),e.add(".scheduler_default_event_delete:hover","opacity: 1;"),e.add(".scheduler_default_rowmove_handle","background-repeat: no-repeat; background-position: center center; background-color: #ccc; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAKCAYAAACT+/8OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAClJREFUGFdj+P//P4O9vX2Bg4NDP4gNFgBytgPxebgAMsYuQGMz/jMAAFsTZDPYJlDHAAAAAElFTkSuQmCC); cursor: move;"),e.add(".scheduler_default_rowmove_source","background-color: black; opacity: 0.2;"),e.add(".scheduler_default_rowmove_position_before, .scheduler_default_rowmove_position_after","background-color: #999; height: 2px;"),e.add(".scheduler_default_rowmove_position_child","margin-left: 20px; background-color: #999; height: 2px;"),e.add(".scheduler_default_rowmove_position_forbidden","background-color: #cc0000; height: 2px; margin-left: 20px;"),e.add(".scheduler_default_link_horizontal","border-bottom-style: solid; border-bottom-color: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_vertical","border-right-style: solid; border-right-color: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_arrow_right:before","content: ''; border-width: 6px; border-color: transparent transparent transparent var(--dp-scheduler-link-color); border-style: solid; width: 0; height:0; position: absolute;"),e.add(".scheduler_default_link_arrow_left:before","content: ''; border-width: 6px; border-color: transparent var(--dp-scheduler-link-color) transparent transparent; border-style: solid; width: 0; height:0; position: absolute;"),e.add(".scheduler_default_link_arrow_down:before","content: ''; border-width: 6px; border-color: var(--dp-scheduler-link-color) transparent transparent transparent; border-style: solid; width: 0; height:0; position: absolute;"),e.add(".scheduler_default_link_arrow_up:before","content: ''; border-width: 6px; border-color: transparent transparent var(--dp-scheduler-link-color) transparent; border-style: solid; width: 0; height:0; position: absolute;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_horizontal","border-bottom-color: #aaaaaa;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_vertical","border-right-color: #aaaaaa;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_arrow_right:before","border-color: transparent transparent transparent #aaaaaa;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_arrow_left:before","border-color: transparent #aaaaaa transparent transparent;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_arrow_down:before","border-color: #aaaaaa transparent transparent transparent;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_arrow_up:before","border-color: transparent transparent #aaaaaa transparent;"),e.add(".scheduler_default_block","background-color: #808080; opacity: 0.5;"),e.add(".scheduler_default_main .scheduler_default_event_group","box-sizing: border-box; font-size: 13px; color: #666; padding: 2px; overflow:hidden; border:1px solid var(--dp-scheduler-event-border-color); background-color: #fff; display: flex; align-items: center; white-space: nowrap;"),e.add(".scheduler_default_main .scheduler_default_header_icon","box-sizing: border-box; border: 1px solid var(--dp-scheduler-border-color); background-color: var(--dp-scheduler-header-bg-color); color: var(--dp-scheduler-header-color);"),e.add(".scheduler_default_header_icon:hover","background-color: #ccc;"),e.add(".scheduler_default_header_icon_hide:before","content: '\\00AB';"),e.add(".scheduler_default_header_icon_show:before","content: '\\00BB';"),e.add(".scheduler_default_row_new .scheduler_default_rowheader_inner","padding-left: 10px; color: #666; cursor: text; background-position: 0px 50%; background-repeat: no-repeat; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABUSURBVChTY0ACslAaK2CC0iCQDMSlECYmQFYIAl1AjFUxukIQwKoYm0IQwFCMSyEIaEJpMMClcD4Qp0CYEIBNIUzRPzAPCtAVYlWEDgyAGIdTGBgAbqEJYyjqa3oAAAAASUVORK5CYII=);"),e.add(".scheduler_default_row_new .scheduler_default_rowheader_inner:hover","background: white; color: white;"),e.add(".scheduler_default_rowheader textarea","padding: 3px;"),e.add(".scheduler_default_rowheader_scroll","cursor: default; background: var(--dp-scheduler-header-bg-color);"),e.add(".scheduler_default_shadow_forbidden .scheduler_default_shadow_inner, .scheduler_default_shadow_overlap .scheduler_default_shadow_inner","border: 1px solid #cc0000; background: #cc4125;"),e.add(".scheduler_default_event_moving_source","opacity: 0.5;"),e.add(".scheduler_default_linkpoint","background-color: white; border: 1px solid gray; border-radius: 5px;"),e.add(".scheduler_default_linkpoint.scheduler_default_linkpoint_hover","background-color: black;"),e.add(".scheduler_default_event.scheduler_default_event_version .scheduler_default_event_inner","overflow:hidden; background-color: #cfdde8; background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); background-size: 20px 20px;"),e.add(".scheduler_default_crosshair_vertical, .scheduler_default_crosshair_horizontal, .scheduler_default_crosshair_left, .scheduler_default_crosshair_top","background-color: gray; opacity: 0.2;"),e.add(".scheduler_default_link_dot","border-radius: 10px; background-color: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_task_milestone .scheduler_default_event_inner","position:absolute; top:16%; left:16%; right:16%; bottom:16%; background: var(--dp-scheduler-event-milestone-color); border: 0px none; transform: rotate(45deg); filter: none;"),e.add(".scheduler_default_event_left, .scheduler_default_event_right","white-space: nowrap; color: #666; cursor: default; display: flex; align-items: center;");e.add(".scheduler_default_main:focus","outline: none;");e.add(".scheduler_default_cell_focus","outline: var(--dp-scheduler-focus-outline-color) 2px solid; outline-offset: -2px; z-index: 100; opacity: 0.5;"),e.add(".scheduler_default_cell_focus.scheduler_default_cell_focus_top","border-top: 4px solid var(--dp-scheduler-focus-outline-color);"),e.add(".scheduler_default_cell_focus.scheduler_default_cell_focus_bottom","border-bottom: 4px solid var(--dp-scheduler-focus-outline-color);"),e.add(".scheduler_default_selectionrectangle","background-color: var(--dp-scheduler-selectionrectangle-color); border: 1px solid #000033; opacity: 0.4;"),e.add(".scheduler_default_link_shadow","border:1px solid black;"),e.add(".scheduler_default_link_shadow_circle","background-color:black;"),e.add(".scheduler_default_event_move_left","box-sizing: border-box; padding: 2px; border: 1px solid #ccc; background: #fff; background: linear-gradient(to bottom, #ffffff 0%, #eeeeee); display: flex; align-items: center;"),e.add(".scheduler_default_event_move_right","box-sizing: border-box; padding: 2px; border: 1px solid #ccc; background: #fff; background: linear-gradient(to bottom, #ffffff 0%, #eeeeee); display: flex; align-items: center;"),e.add(".scheduler_default_link_hover","box-shadow: 0px 0px 2px 2px rgba(255, 0, 0, 0.3)"),e.add(".scheduler_default_sorticon","opacity: 0.2;background-position: center center; background-repeat: no-repeat; cursor: pointer;"),e.add(".scheduler_default_sorticon.scheduler_default_sorticon_asc","background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBvbHlnb24gcG9pbnRzPSI1IDEuNSwgMTAgMTAsIDAgMTAiLz48L3N2Zz4=');"),e.add(".scheduler_default_sorticon.scheduler_default_sorticon_desc","background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBvbHlnb24gcG9pbnRzPSI1IDguNSwgMCAwLCAxMCAwIi8+PC9zdmc+');"),e.add(".scheduler_default_sorticon.scheduler_default_sorticon_active","opacity: 1;"),e.add(".scheduler_default_loading","background-color: orange; color: white; padding: 2px;"),e.add(".scheduler_default_link_curve","stroke: var(--dp-scheduler-link-color); fill: none; stroke-width: 2;"),e.add(".scheduler_default_link_curve:hover","stroke-opacity: 0.5;"),e.add(".scheduler_default_link_curve_dot","fill: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_curve_marker","fill: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_curve_text","fill: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_curve_mshadow.scheduler_default_link_curve","stroke: #aaaaaa;"),e.add(".scheduler_default_link_curve_mshadow.scheduler_default_link_curve_dot","fill: #aaaaaa;"),e.add(".scheduler_default_link_curve_mshadow.scheduler_default_link_curve_marker","fill: #aaaaaa;"),e.add(".scheduler_default_link_curve_mshadow.scheduler_default_link_curve_text","fill: #aaaaaa;"),e.commit(),DayPilot.Global.defaultCss=!0}}(),DayPilot.doc=function(){var e=document.documentElement;return e&&e.clientHeight?e:document.body},DayPilot.sh=function(e){return e?e.offsetHeight-e.clientHeight:0},DayPilot.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return""+e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},DayPilot.ua=function(e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.ua() - array required");var t=[];return e.forEach(function(e){DayPilot.contains(t,e)||t.push(e)}),t},DayPilot.pageOffset=function(){if("undefined"!=typeof pageXOffset)return{x:pageXOffset,y:pageYOffset};var e=DayPilot.doc();return{x:e.scrollLeft,y:e.scrollTop}},DayPilot.indexOf=function(e,t){if(!e||!e.length)return-1;for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},DayPilot.contains=function(e,t){if(2!==arguments.length)throw new DayPilot.Exception("DayPilot.contains() requires two arguments.");return!!e&&(e===t&&!DayPilot.isArray(e)||DayPilot.indexOf(e,t)!==-1)},DayPilot.ac=function(e,t){t||(t=[]);for(var n=0;e.children&&n<e.children.length;n++)t.push(e.children[n]),DayPilot.ac(e.children[n],t);return t},DayPilot.rfa=function(e,t){var n=DayPilot.indexOf(e,t);n!==-1&&e.splice(n,1)},DayPilot.mc=function(e){return e.pageX||e.pageY?{x:e.pageX,y:e.pageY}:{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}},DayPilot.Stats={},DayPilot.Stats.eventObjects=0,DayPilot.Stats.dateObjects=0,DayPilot.Stats.cacheHitsCtor=0,DayPilot.Stats.cacheHitsParsing=0,DayPilot.Stats.cacheHitsTicks=0,DayPilot.re=function(e,t,n){n&&t&&e&&e.addEventListener(t,n,!1)},DayPilot.rePassive=function(e,t,n){n&&t&&e&&e.addEventListener(t,n,{"passive":!0})},DayPilot.reNonPassive=function(e,t,n){n&&t&&e&&e.addEventListener(t,n,{"passive":!1})},DayPilot.ue=function(e,t,n){e.removeEventListener(t,n,!1)},DayPilot.pu=function(e){var t,n,a,i=e.attributes;if(i)for(n=i.length,t=0;t<n;t+=1)i[t]&&(a=i[t].name,"function"==typeof e[a]&&(e[a]=null));if(i=e.childNodes)for(n=i.length,t=0;t<n;t+=1)DayPilot.pu(e.childNodes[t])},DayPilot.de=function(e){if(e)if(DayPilot.isArray(e))for(var t=0;t<e.length;t++)DayPilot.de(e[t]);else e.remove()},DayPilot.sw=function(e){return e?e.offsetWidth-e.clientWidth:0},DayPilot.am=function(){return"undefined"==typeof angular?null:(DayPilot.am.cached||(DayPilot.am.cached=angular.module("daypilot",[])),DayPilot.am.cached)},DayPilot.Selection=function(e,t,n,a){this.type="selection",this.start=e.isDayPilotDate?e:new DayPilot.Date(e),this.end=t.isDayPilotDate?t:new DayPilot.Date(t),this.resource=n,this.root=a,this.toJSON=function(){var e={};return e.start=this.start,e.end=this.end,e.resource=this.resource,e}},DayPilot.request=function(e,t,n,a){var i=DayPilot.createXmlHttp();i&&(i.open("POST",e,!0),i.setRequestHeader("Content-type","text/plain"),i.onreadystatechange=function(){if(4===i.readyState)return 200!==i.status&&304!==i.status?void(a?a(i):window.console&&console.log("HTTP error "+i.status)):void t(i)},4!==i.readyState&&("object"==typeof n&&(n=JSON.stringify(n)),i.send(n)))},DayPilot.ajax=function(e){if(!e)throw new DayPilot.Exception("Parameter object required.");if("string"!=typeof e.url)throw new DayPilot.Exception("The parameter object must have 'url' property.");var t=DayPilot.createXmlHttp();if(!t)throw new DayPilot.Exception("Unable to create XMLHttpRequest object");var n="object"==typeof e.data,a=e.data,i=e.method||(e.data?"POST":"GET"),r=e.success||function(){},o=e.error||function(){},s=e.url,l=e.contentType||(n?"application/json":"text/plain"),d=e.headers||{};t.open(i,s,!0),t.setRequestHeader("Content-type",l),DayPilot.Util.ownPropsAsArray(d).forEach(function(e){t.setRequestHeader(e.key,e.val)}),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status||201===t.status||204===t.status||304===t.status){var e={};e.request=t,t.responseText&&(e.data=JSON.parse(t.responseText)),r(e)}else if(o){var n={};n.request=t,o(n)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&(n&&(a=JSON.stringify(a)),t.send(a))},DayPilot.createXmlHttp=function(){return new XMLHttpRequest},DayPilot.Http={},DayPilot.Http.ajax=function(e){DayPilot.ajax(e)},DayPilot.Http.get=function(e,t){return t=t||{},new Promise(function(n,a){var i={};i.url=e,i.method="GET",i.success=function(e){n(e)},i.error=function(e){a(e)},i.contentType=t.contentType,i.headers=t.headers,DayPilot.ajax(i)})},DayPilot.Http.post=function(e,t,n){return n=n||{},new Promise(function(a,i){var r={};r.url=e,r.method="POST",r.data=t,r.success=function(e){a(e)},r.error=function(e){i(e)},r.contentType=n.contentType,r.headers=n.headers,DayPilot.ajax(r)})},DayPilot.Http.put=function(e,t,n){return n=n||{},new Promise(function(a,i){var r={};r.url=e,r.method="PUT",r.data=t,r.success=function(e){a(e)},r.error=function(e){i(e)},r.contentType=n.contentType,r.headers=n.headers,DayPilot.ajax(r)})},DayPilot.Http.delete=function(e,t){return t=t||{},new Promise(function(n,a){var i={};i.url=e,i.method="DELETE",i.success=function(e){n(e)},i.error=function(e){a(e)},i.contentType=t.contentType,i.headers=t.headers,DayPilot.ajax(i)})},DayPilot.Util={},DayPilot.Util.addClass=function(e,t){if(e){if(!e.className)return void(e.className=t);new RegExp("(^|\\s)"+t+"($|\\s)").test(e.className)||(e.className=e.className+" "+t)}},DayPilot.Util.removeClass=function(e,t){if(e){var n=new RegExp("(^|\\s)"+t+"($|\\s)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}},DayPilot.Util.copyProps=function(e,t,n){if(void 0===t&&(t={}),!e)return t;if("undefined"==typeof n)for(var a=0,i=Object.entries(e);a<i.length;a++){var r=i[a],o=r[0],s=r[1];"undefined"!=typeof s&&(t[o]=s)}else for(var l=0,d=n;l<d.length;l++){var c=d[l],s=e[c];"undefined"!=typeof s&&(t[c]=s)}return t},DayPilot.Util.ownPropsAsArray=function(e){return e?Object.entries(e).map(function(e){return{key:e[0],val:e[1]}}):[]},DayPilot.Util.atLeast=function(e,t){return Math.max(e,t)},DayPilot.Util.mouseButton=function(e){var t={};switch(e.button){case 0:t.left=!0;break;case 1:t.middle=!0;break;case 2:t.right=!0}return t},DayPilot.Util.replaceCharAt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},DayPilot.Util.isNullOrUndefined=function(e){return null===e||"undefined"==typeof e},DayPilot.Util.escapeHtml=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML},DayPilot.Util.escapeTextHtml=function(e,t){return DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":DayPilot.Util.escapeHtml(e):t},DayPilot.Util.isSameEvent=function(e,t){return!(!e||!t)&&(e=e instanceof DayPilot.Event?e.data:e,t=t instanceof DayPilot.Event?t.data:t,e===t||!DayPilot.Util.isNullOrUndefined(e.id)&&e.id===t.id)},DayPilot.Util.overlaps=function(e,t,n,a){return!(t<=n||e>=a)},DayPilot.Util.isVueVNode=function(e){return!!e&&(DayPilot.isArray(e)?DayPilot.Util.isVueVNode(e[0]):e["__v_isVNode"])},DayPilot.Util.isReactComponent=function(e){if(!e)return!1;var t="function"==typeof Symbol&&Symbol.for,n=t&&Symbol.for("react.element")||60103,a=t&&Symbol.for("react.transitional.element")||null,i=e.$$typeof;return i===n||i===a||60103===i},DayPilot.Util.isMouseEvent=function(e){return!!e&&("mouse"===e.pointerType||e instanceof MouseEvent)},DayPilot.Areas={},DayPilot.Areas.attach=function(t,n,a){a=a||{};var i=a.areas,r=a.allowed||function(){return!0},o=a.offsetX||0;i=e(n,i),i&&DayPilot.isArray(i)&&0!==i.length&&(DayPilot.re(t,"mousemove",function(e){t.active||t.areasDisabled||!r()||DayPilot.Areas.showAreas(t,n,e,i,{"offsetX":o,"eventDiv":a.eventDiv})}),DayPilot.re(t,"mouseleave",function(e){DayPilot.Areas.hideAreas(t,e)}),i.forEach(function(e){if(DayPilot.Areas.isVisible(e)){var i=DayPilot.Areas.createArea(t,n,e,{"offsetX":o,"eventDiv":a.eventDiv});t.appendChild(i)}}))},DayPilot.Areas.disable=function(e){e.areasDisabled=!0,Array.from(e.childNodes).filter(function(e){return e.isActiveArea&&!e.area.start}).forEach(function(e){e.c=e.style.display,e.style.display="none"})},DayPilot.Areas.enable=function(e){e.areasDisabled=!1,Array.from(e.childNodes).filter(function(e){return e.isActiveArea&&!e.area.start}).forEach(function(e){e.c?e.style.display=e.c:e.style.display=""})},DayPilot.Areas.remove=function(e){var t=Array.from(e.childNodes).filter(function(e){return e.isActiveArea});DayPilot.de(t)},DayPilot.Areas.isVisible=function(e){var t=e.visibility||e.v||"Visible";return"Visible"===t||"TouchVisible"===t&&!DayPilot.browser.hover},DayPilot.Areas.copy=function(e){return DayPilot.isArray(e)?e.map(function(e){return DayPilot.Util.copyProps(e,{})}):[]},DayPilot.Areas.showAreas=function(e,t,n,a,i){if(!DayPilot.Global.resizing&&!DayPilot.Global.moving&&!DayPilot.Global.selecting&&!e.active&&DayPilot.browser.hover){if(DayPilot.Areas.all&&DayPilot.Areas.all.length>0)for(var r=0;r<DayPilot.Areas.all.length;r++){var o=DayPilot.Areas.all[r];o!==e&&DayPilot.Areas.hideAreas(o,n)}if(e.active={},DayPilot.isArray(a)||(a=t.areas,a||(t.cache?a=t.cache.areas:t.data&&(a=t.data.areas))),a&&0!==a.length&&!(e.areas&&e.areas.length>0)){e.areas=[];for(var r=0;r<a.length;r++){var s=a[r];if(!DayPilot.Areas.isVisible(s)){var l=DayPilot.Areas.createArea(e,t,s,i);e.areas.push(l),e.appendChild(l),DayPilot.Areas.all.push(e)}}e.active.children=DayPilot.ac(e)}}},DayPilot.Areas.createArea=function(e,t,n,a){function i(e,t,n){var a={};return a.area=e,a.source=t,a.originalEvent=n,a.preventDefault=function(){a.preventDefault.value=!0;
|
|
10
|
-
},"function"==typeof e.onClick&&e.onClick(a),a}function r(e,t,n){DayPilot.Bubble&&DayPilot.Bubble.touchPosition(n),e.calendar.bubble&&e.calendar.bubble.showEvent(e,!0)}function o(e,t,n,a){DayPilot.Menu&&DayPilot.Menu.touchPosition(a);var i=n.contextMenu||n.menu;if(i instanceof DayPilot.Menu||(t.isEvent&&t.client.contextMenu()?i=t.client.contextMenu():t.isEvent&&t.calendar.contextMenu&&(i=t.calendar.contextMenu)),i&&i.show){var r={"type":"area","div":e,"e":t,"area":n,"a":d};i.show(t,{"initiator":r})}}function s(e){return"string"==typeof e&&isNaN(e)?e:"undefined"!=typeof e?e+"px":void 0}a=a||{};var l=a.eventDiv||e,d=document.createElement("div");d.isActiveArea=!0,d.area=n,d.setAttribute("unselectable","on");var c=n.w||n.width,u=n.h||n.height,h=n.cssClass||n.css||n.className;if("undefined"!=typeof n.style&&d.setAttribute("style",n.style),d.style.position="absolute",d.style.width=s(c),d.style.height=s(u),d.style.right=s(n.right),d.style.top=s(n.top),d.style.left=s(n.left),d.style.bottom=s(n.bottom),d.style.borderRadius=s(n.borderRadius),"undefined"!=typeof n.html||"undefined"!=typeof n.text)d.innerHTML=DayPilot.Util.escapeTextHtml(n.text,n.html);else if(n.icon){var f=document.createElement("i");f.className=n.icon,d.appendChild(f)}else if(n.image){var v=document.createElement("img");v.src=n.image,d.appendChild(v)}else if(n.symbol){var p="http://www.w3.org/2000/svg",m=document.createElementNS(p,"svg");m.setAttribute("width","100%"),m.setAttribute("height","100%");var g=document.createElementNS(p,"use");g.setAttribute("href",n.symbol),m.appendChild(g),d.appendChild(m)}if(h&&(d.className=h),n.toolTip&&d.setAttribute("title",n.toolTip),n.backColor&&(d.style.background=n.backColor),n.background&&(d.style.background=n.background),n.fontColor&&(d.style.color=n.fontColor),n.padding&&(d.style.padding=n.padding+"px",d.style.boxSizing="border-box"),n.borderColor){var y=n.borders;y?(y.top&&(d.style.borderTop="1px solid "+n.borderColor),y.right&&(d.style.borderRight="1px solid "+n.borderColor),y.bottom&&(d.style.borderBottom="1px solid "+n.borderColor),y.left&&(d.style.borderLeft="1px solid "+n.borderColor)):d.style.border="1px solid "+n.borderColor,d.style.boxSizing="border-box"}if(n.verticalAlignment)switch(d.style.display="flex",n.verticalAlignment){case"center":d.style.alignItems="center";break;case"top":d.style.alignItems="flex-start";break;case"bottom":d.style.alignItems="flex-end"}if(n.horizontalAlignment)switch(d.style.display="flex",n.horizontalAlignment){case"right":d.style.justifyContent="flex-end";break;case"left":d.style.justifyContent="flex-start";break;case"center":d.style.justifyContent="center"}if("ResizeEnd"===n.action||"ResizeStart"===n.action||"Move"===n.action){if(t.calendar.isCalendar)switch(n.action){case"ResizeEnd":n.cursor="s-resize",n.dpBorder="bottom";break;case"ResizeStart":n.cursor="n-resize",n.dpBorder="top";break;case"Move":n.cursor="move"}if(t.calendar.isScheduler||t.calendar.isMonth)switch(n.action){case"ResizeEnd":n.cursor="e-resize",n.dpBorder="right";break;case"ResizeStart":n.cursor="w-resize",n.dpBorder="left";break;case"Move":n.cursor="move"}d.onmousemove=function(e,t,n){return function(a){t.calendar.internal&&t.calendar.internal.dragInProgress&&t.calendar.internal.dragInProgress()||(a.cancelBubble=!0,e.style.cursor=n.cursor,n.dpBorder&&(e.dpBorder=n.dpBorder))}}(l,t,n),d.onmouseout=function(e,t,n){return function(){e.style.cursor=""}}(l,t,n)}if(("ResizeEnd"===n.action||"ResizeStart"===n.action)&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,n){return function(a){a.cancelBubble=!0;var i=t.calendar.internal.touch,r=a.touches?a.touches[0]:a,o={x:r.pageX,y:r.pageY};t.calendar.coords=i.relativeCoords(a),i.preventEventTap=!0,t.calendar.isScheduler?i.startResizing(e,"ResizeEnd"===n.action?"right":"left"):t.calendar.isCalendar&&i.startResizing(e,"ResizeEnd"===n.action?"bottom":"top",o)}}(l,t,n);DayPilot.rePassive(d,DayPilot.touch.start,b)}if("ContextMenu"===n.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,n){return function(a){a.cancelBubble=!0,a.preventDefault(),o(e,t,n,a),t.calendar.internal.touch.preventEventTap=!0}}(l,t,n),w=function(e,t,n){return function(e){e.cancelBubble=!0,e.preventDefault()}}(l,t,n);DayPilot.reNonPassive(d,DayPilot.touch.start,b),DayPilot.reNonPassive(d,DayPilot.touch.end,w)}if("Bubble"===n.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,n){return function(e){e.cancelBubble=!0,e.preventDefault();var a=i(n,t,e);if(!a.preventDefault.value){r(t,n,e);t.calendar.internal.touch.preventEventTap=!0,"function"==typeof n.onClicked&&n.onClicked(a)}}}(l,t,n),w=function(e,t,n){return function(e){e.cancelBubble=!0,e.preventDefault()}}(l,t,n);DayPilot.reNonPassive(d,DayPilot.touch.start,b),DayPilot.reNonPassive(d,DayPilot.touch.end,w)}if("Move"===n.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,n){return function(n){n.cancelBubble=!0;var a=t.calendar.internal.touch,i=n.touches?n.touches[0]:n,r={x:i.pageX,y:i.pageY};t.calendar.coords=a.relativeCoords(n),DayPilot.Global&&DayPilot.Global.touch&&(DayPilot.Global.touch.active=!0),a.preventEventTap=!0,a.startMoving(e,r)}}(l,t,n);DayPilot.rePassive(d,DayPilot.touch.start,b)}if("Bubble"===n.action&&t.isEvent?(d.onmousemove=function(e,t,n){return function(){n.bubble?n.bubble.showEvent(t,!0):t.calendar.bubble&&t.calendar.bubble.showEvent(t,!0)}}(e,t,n),d.onmouseout=function(e,t,n){return function(){"undefined"!=typeof DayPilot.Bubble&&(n.bubble?n.bubble.hideOnMouseOut():t.calendar.bubble&&t.calendar.bubble.hideOnMouseOut())}}(e,t,n)):"Bubble"===n.action&&t.isRow?(d.onmousemove=function(e,t,n){return function(){n.bubble?n.bubble.showResource(t,!0):t.calendar.resourceBubble&&t.calendar.resourceBubble.showResource(t,!0)}}(e,t,n),d.onmouseout=function(e,t,n){return function(){"undefined"!=typeof DayPilot.Bubble&&(n.bubble?n.bubble.hideOnMouseOut():t.calendar.resourceBubble&&t.calendar.resourceBubble.hideOnMouseOut())}}(e,t,n)):"Bubble"===n.action&&"undefined"!=typeof DayPilot.Bubble&&n.bubble instanceof DayPilot.Bubble&&(d.onmousemove=function(e,t,n){return function(){n.bubble.showHtml(null,null)}}(e,t,n),d.onmouseout=function(e,t,n){return function(){"undefined"!=typeof DayPilot.Bubble&&n.bubble&&n.bubble.hideOnMouseOut()}}(e,t,n)),"HoverMenu"===n.action&&(d.onmousemove=function(e,t,n){return function(){var e=n.menu;e&&e.show&&(e.visible?e.source&&"undefined"!=typeof e.source.id&&e.source.id!==t.id&&e.show(t):e.show(t),e.cancelHideTimeout())}}(e,t,n),d.onmouseout=function(e,t,n){return function(){var e=n.menu;e&&e.hideOnMouseOver&&e.delayedHide()}}(e,t,n)),"None"===n.action){var b=function(e,t,n){return function(e){var a=i(n,t,e);"function"==typeof n.onClicked&&n.onClicked(a),e.preventDefault(),e.stopPropagation()}}(l,t,n);DayPilot.reNonPassive(d,DayPilot.touch.start,b)}return d.onmousedown=function(e,t,n){return function(a){if("function"==typeof n.onmousedown&&n.onmousedown(a),"function"==typeof n.mousedown){var i={};i.area=n,i.div=e,i.originalEvent=a,i.source=t,n.mousedown(i)}if("Move"===n.action&&t.isRow){var r=t.$.row;(0,t.calendar.internal.rowStartMoving)(r)}"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),"Move"===n.action&&(DayPilot.Global.movingAreaData=n.data),"Move"===n.action&&t.isEvent&&t.calendar.internal&&t.calendar.internal.startMoving&&t.calendar.internal.startMoving(e,a);"Move"!==n.action&&"ResizeEnd"!==n.action&&"ResizeStart"!==n.action&&n.action&&"Default"!==n.action&&(a.preventDefault(),a.cancelBubble=!0)}}(e,t,n),d.onclick=function(e,t,n){return function(a){var r=i(n,t,a);if(!r.preventDefault.value){switch(n.action){case"ContextMenu":o(e,t,n,a),a.cancelBubble=!0;break;case"None":a.cancelBubble=!0}"function"==typeof n.onClicked&&n.onClicked(r)}}}(e,t,n),"function"==typeof n.onMouseEnter&&d.addEventListener("mouseenter",function(e,t,n){return function(e){var a={};a.area=n,a.source=t,a.originalEvent=e,n.onMouseEnter(a)}}(e,t,n)),"function"==typeof n.onMouseLeave&&d.addEventListener("mouseleave",function(e,t,n){return function(e){var a={};a.area=n,a.source=t,a.originalEvent=e,n.onMouseLeave(a)}}(e,t,n)),d},DayPilot.Areas.all=[],DayPilot.Areas.hideAreas=function(e,t){if(e&&e&&e.active){var n=e.active,a=e.areas;if(n&&n.children&&t){var i=t.toElement||t.relatedTarget;if(~DayPilot.indexOf(n.children,i))return}if(!a||0===a.length)return void(e.active=null);DayPilot.de(a),e.active=null,e.areas=[],DayPilot.rfa(DayPilot.Areas.all,e),n.children=null}},DayPilot.Areas.hideAll=function(e){if(DayPilot.Areas.all&&0!==DayPilot.Areas.all.length)for(var t=0;t<DayPilot.Areas.all.length;t++)DayPilot.Areas.hideAreas(DayPilot.Areas.all[t],e)},DayPilot.Exception=function(e){return new Error(e)},DayPilot.Locale=function(e,t){if(this.id=e,this.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.dayNamesShort=["Su","Mo","Tu","We","Th","Fr","Sa"],this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this.datePattern="M/d/yyyy",this.timePattern="H:mm",this.dateTimePattern="M/d/yyyy H:mm",this.timeFormat="Clock12Hours",this.weekStarts=0,t)for(var n in t)this[n]=t[n]},DayPilot.Locale.all={},DayPilot.Locale.find=function(e){if(!e)return null;var t=e.toLowerCase();return t.length>2&&(t=DayPilot.Util.replaceCharAt(t,2,"-")),DayPilot.Locale.all[t]},DayPilot.Locale.register=function(e){DayPilot.Locale.all[e.id]=e},DayPilot.Locale.register(new DayPilot.Locale("ca-es",{"dayNames":["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],"dayNamesShort":["dg","dl","dt","dc","dj","dv","ds"],"monthNames":["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],"monthNamesShort":["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("cs-cz",{"dayNames":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"dayNamesShort":["ne","po","út","st","čt","pá","so"],"monthNames":["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],"monthNamesShort":["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""],"timePattern":"H:mm","datePattern":"d. M. yyyy","dateTimePattern":"d. M. yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("da-dk",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"dd-MM-yyyy","dateTimePattern":"dd-MM-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-at",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-ch",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-de",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-lu",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-au",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-ca",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("en-gb",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-us",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"M/d/yyyy","dateTimePattern":"M/d/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("es-es",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["D","L","M","X","J","V","S"],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("es-mx",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["do.","lu.","ma.","mi.","ju.","vi.","sá."],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"hh:mm tt","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy hh:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("eu-es",{"dayNames":["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],"dayNamesShort":["ig","al","as","az","og","or","lr"],"monthNames":["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],"monthNamesShort":["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fi-fi",{"dayNames":["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],"dayNamesShort":["su","ma","ti","ke","to","pe","la"],"monthNames":["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],"monthNamesShort":["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-be",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd-MM-yy","dateTimePattern":"dd-MM-yy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-ca",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("fr-ch",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-fr",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-lu",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("gl-es",{"dayNames":["domingo","luns","martes","mércores","xoves","venres","sábado"],"dayNamesShort":["do","lu","ma","mé","xo","ve","sá"],"monthNames":["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],"monthNamesShort":["xan","feb","mar","abr","maio","xuño","xul","ago","set","out","nov","dec",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-it",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-ch",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ja-jp",{"dayNames":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"dayNamesShort":["日","月","火","水","木","金","土"],"monthNames":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("ko-kr",{"dayNames":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"dayNamesShort":["일","월","화","수","목","금","토"],"monthNames":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"tt h:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd tt h:mm","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("nb-no",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-nl",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"d-M-yyyy","dateTimePattern":"d-M-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-be",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"H:mm","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nn-no",{"dayNames":["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],"dayNamesShort":["sø","må","ty","on","to","fr","la"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-br",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("pl-pl",{"dayNames":["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],"dayNamesShort":["N","Pn","Wt","Śr","Cz","Pt","So"],"monthNames":["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],"monthNamesShort":["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-pt",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("ro-ro",{"dayNames":["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"],"dayNamesShort":["D","L","Ma","Mi","J","V","S"],"monthNames":["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],"monthNamesShort":["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ru-ru",{"dayNames":["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],"dayNamesShort":["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],"monthNamesShort":["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sk-sk",{"dayNames":["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],"dayNamesShort":["ne","po","ut","st","št","pi","so"],"monthNames":["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sv-se",{"dayNames":["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],"dayNamesShort":["sö","må","ti","on","to","fr","lö"],"monthNames":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("tr-tr",{"dayNames":["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],"dayNamesShort":["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],"monthNames":["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],"monthNamesShort":["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""],"timePattern":"HH:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("uk-ua",{"dayNames":["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],"dayNamesShort":["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень",""],"monthNamesShort":["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("zh-cn",{"dayNames":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dayNamesShort":["日","一","二","三","四","五","六"],"monthNames":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"monthNamesShort":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"timePattern":"H:mm","datePattern":"yyyy/M/d","dateTimePattern":"yyyy/M/d H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("zh-tw",{"dayNames":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dayNamesShort":["日","一","二","三","四","五","六"],"monthNames":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"monthNamesShort":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"timePattern":"tt hh:mm","datePattern":"yyyy/M/d","dateTimePattern":"yyyy/M/d tt hh:mm","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.US=DayPilot.Locale.find("en-us"),DayPilot.Switcher=function(e){function t(e,t,a){var i={};i.start=e,i.end=t,i.day=a,i.target=n.l.control,i.preventDefault=function(){this.preventDefault.value=!0};var r=n.I;r&&r.start===i.start&&r.end===i.end&&r.day===i.day&&r.target===i.target||(n.I=i,"function"==typeof n.onChange&&(n.onChange(i),i.preventDefault.value)||"function"==typeof n.onTimeRangeSelect&&(n.onTimeRangeSelect(i),i.preventDefault.value)||(n.l.t(n.m),"function"==typeof n.onChanged&&n.onChanged(i),"function"==typeof n.onTimeRangeSelected&&n.onTimeRangeSelected(i)))}var n=this;this.f=[],this.j=[],this.k={},this.selectedClass=null,this.syncScrollbar=!0,this.l=null,this.m=DayPilot.Date.today(),this.n=null,this.onChange=null,this.onChanged=null,this.onSelect=null,this.k.updateMode=function(e){var t=n.k.control;t&&(t.selectMode=e,t.select(n.m))},this.addView=function(e,t){var a;if("string"==typeof e){if(a=document.getElementById(e),!a)throw"Element not found: "+e}else a=e;var i=a,r={};return r.o=!0,
|
|
11
|
-
r.p=i.id,r.control=i,r.q=t||{},r.s=function(){i.hide?i.hide():i.nav&&i.nav.top?i.nav.top.style.display="none":i.style.display="none"},r.t=function(e){(function(){return!!i.backendUrl||!("function"!=typeof WebForm_DoCallback||!i.uniqueID)})()?i.commandCallBack&&i.commandCallBack("navigate",{"day":e}):(i.startDate=e,i.update())},r.u=function(){n.z(),i.show?i.show():i.nav&&i.nav.top?i.nav.top.style.display="":i.style.display=""},r.A=function(){if(r.q.navigatorSelectMode)return r.q.navigatorSelectMode;if(i.isCalendar)switch(i.viewType){case"Day":return"day";case"Week":return"week";case"WorkWeek":return"week";default:return"day"}else if(i.isMonth)switch(i.viewType){case"Month":return"month";case"Weeks":return"week";default:return"day"}return"day"},this.f.push(r),r},this.addTrigger=function(e,t){var a;if("string"==typeof e){if(a=document.getElementById(e),!a)throw"Element not found: "+e}else a=e;var i=this.B(t);i||(i=this.addView(t));var r={};return r.C=!0,r.D=a,r.p=a.id,r.E=i,r.F=function(e){n.show(r),n.G(r),null===e||void 0===e?void 0:e.preventDefault()},DayPilot.re(a,"click",r.F),this.j.push(r),r},this.addButton=this.addTrigger,this.select=function(e){var t=this.H(e);t?t.F():this.j.length>0&&this.j[0].F()},this.H=function(e){for(var t=0;t<this.j.length;t++){var n=this.j[t];if(n.p===e)return n}return null},this.G=function(e){if(this.selectedClass){for(var t=0;t<this.j.length;t++){var n=this.j[t];DayPilot.Util.removeClass(n.D,this.selectedClass)}DayPilot.Util.addClass(e.D,this.selectedClass)}},this.addNavigator=function(e){n.k.control=e,e.timeRangeSelectedHandling="JavaScript",e.onTimeRangeSelected=function(){var a,i,r;if(1===e.api)a=arguments[0],i=arguments[1],r=arguments[2];else{var o=arguments[0];a=o.start,i=o.end,r=o.day}n.m=r,t(a,i,r)}},this.show=function(e){var a,i;if(e.C)i=e,a=i.E;else if(a=e.o?e:this.B(e),this.l===a)return;if(n.onSelect){var r={};r.source=i?i.D:null,r.target=a.control,n.onSelect(r)}if(n.syncScrollbar){var o=this.l&&this.l.control;o&&o.isCalendar&&(n.n=o.getScrollY())}this.l=a,a.u(),null!==n.n&&a.control.isCalendar&&a.control.setScrollY(n.n);var s=a.A();n.k.updateMode(s),t(n.k.control.selectionStart,n.k.control.selectionEnd.addDays(1),n.k.control.selectionDay)},this.B=function(e){for(var t=0;t<this.f.length;t++)if(this.f[t].control===e)return this.f[t];return null},this.z=function(){for(var e=0;e<this.f.length;e++)this.f[e].s()},Object.defineProperty(this,"active",{get:function(){return n.l}}),this.events={},this.events.load=function(e,t,a){if(!n.l||!n.l.control)throw"DayPilot.Switcher.events.load(): Active view not found";n.l.control.events.load(e,t,a)},this.I=null,this.J=function(){if(e)for(var t in e)if("triggers"===t){var a=e.triggers||[];a.forEach(function(e){n.addTrigger(e.id,e.view)})}else"navigator"===t?n.addNavigator(e.navigator):n[t]=e[t]},this.J()},DayPilot.Duration=function(e){var t=this,n=864e5,a=36e5,i=6e4,r=1e3;if(2===arguments.length){var o=arguments[0],s=arguments[1];if(!(o instanceof DayPilot.Date)&&"string"!=typeof o)throw"DayPilot.Duration(): Invalid start argument, DayPilot.Date expected";if(!(s instanceof DayPilot.Date)&&"string"!=typeof s)throw"DayPilot.Duration(): Invalid end argument, DayPilot.Date expected";"string"==typeof o&&(o=new DayPilot.Date(o)),"string"==typeof s&&(s=new DayPilot.Date(s)),e=s.getTime()-o.getTime()}return this.ticks=e,DayPilot.Date.Cache.DurationCtor[""+e]?DayPilot.Date.Cache.DurationCtor[""+e]:(DayPilot.Date.Cache.DurationCtor[""+e]=this,this.toString=function(e){if(!e)return t.days()+"."+t.hours()+":"+t.minutes()+":"+t.seconds()+"."+t.milliseconds();var n=t.minutes();n=(n<10?"0":"")+n;var a=e;return a=a.replace("mm",n),a=a.replace("m",t.minutes()),a=a.replace("H",t.hours()),a=a.replace("h",t.hours()),a=a.replace("d",t.days()),a=a.replace("s",t.seconds())},this.totalHours=function(){return t.ticks/a},this.totalDays=function(){return t.ticks/n},this.totalMinutes=function(){return t.ticks/i},this.totalSeconds=function(){return t.ticks/r},this.days=function(){return Math.floor(t.totalDays())},this.hours=function(){var e=t.ticks-t.days()*n;return Math.floor(e/a)},this.minutes=function(){var e=t.ticks-Math.floor(t.totalHours())*a;return Math.floor(e/i)},this.seconds=function(){var e=t.ticks-Math.floor(t.totalMinutes())*i;return Math.floor(e/r)},void(this.milliseconds=function(){return t.ticks%r}))},DayPilot.Duration.weeks=function(e){return new DayPilot.Duration(1e3*e*60*60*24*7)},DayPilot.Duration.days=function(e){return new DayPilot.Duration(1e3*e*60*60*24)},DayPilot.Duration.hours=function(e){return new DayPilot.Duration(1e3*e*60*60)},DayPilot.Duration.minutes=function(e){return new DayPilot.Duration(1e3*e*60)},DayPilot.Duration.seconds=function(e){return new DayPilot.Duration(1e3*e)},DayPilot.TimeSpan=function(){throw"Please use DayPilot.Duration class instead of DayPilot.TimeSpan."};try{DayPilot.TimeSpan.prototype=Object.create(DayPilot.Duration.prototype)}catch(e){}DayPilot.Date=function(e,n){if(e instanceof DayPilot.Date)return e;var a;DayPilot.Util.isNullOrUndefined(e)&&(a=DayPilot.DateUtil.fromLocal().getTime(),e=a);var i=DayPilot.Date.Cache.Ctor;if(i[e])return DayPilot.Stats.cacheHitsCtor+=1,i[e];var r=!1;if("string"==typeof e||e instanceof String){try{a=DayPilot.DateUtil.fromStringSortable(e,n).getTime()}catch(t){throw new DayPilot.Exception("DayPilot.Date - Unable to parse ISO8601 date/time string: "+e)}r=!0}else if("number"==typeof e||e instanceof Number){if(isNaN(e))throw"Cannot create DayPilot.Date from NaN";a=e}else{if(!(e instanceof Date))throw"Unrecognized parameter: use Date, number or string in ISO 8601 format";a=n?DayPilot.DateUtil.fromLocal(e).getTime():e.getTime()}var o=t(a);return i[o]?i[o]:(i[o]=this,i[a]=this,r&&o!==e&&DayPilot.DateUtil.hasTzSpec(e)&&(i[e]=this),Object.defineProperty?(Object.defineProperty(this,"ticks",{get:function(){return a}}),Object.defineProperty(this,"value",{"value":o,"writable":!1,"enumerable":!0})):(this.ticks=a,this.value=o),DayPilot.Date.Config.legacyShowD&&(this.d=new Date(a)),void(DayPilot.Stats.dateObjects+=1))},DayPilot.Date.Config={},DayPilot.Date.Config.legacyShowD=!1,DayPilot.Date.Cache={},DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={},DayPilot.Date.Cache.clear=function(){DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={}},DayPilot.Date.prototype.addDays=function(e){return e?new DayPilot.Date(this.ticks+24*e*60*60*1e3):this},DayPilot.Date.prototype.addHours=function(e){return e?this.addTime(60*e*60*1e3):this},DayPilot.Date.prototype.addMilliseconds=function(e){return e?this.addTime(e):this},DayPilot.Date.prototype.addMinutes=function(e){return e?this.addTime(60*e*1e3):this},DayPilot.Date.prototype.addMonths=function(e){if(!e)return this;var t=new Date(this.ticks),n=t.getUTCFullYear(),a=t.getUTCMonth()+1;if(e>0){for(;e>=12;)e-=12,n++;e>12-a?(n++,a=e-(12-a)):a+=e}else{for(;e<=-12;)e+=12,n--;a+e<=0?(n--,a=12+a+e):a+=e}var i=new Date(t.getTime());i.setUTCDate(1),i.setUTCFullYear(n),i.setUTCMonth(a-1);var r=new DayPilot.Date(i).daysInMonth();return i.setUTCDate(Math.min(r,t.getUTCDate())),new DayPilot.Date(i)},DayPilot.Date.prototype.addSeconds=function(e){return e?this.addTime(1e3*e):this},DayPilot.Date.prototype.addTime=function(e){return e?(e instanceof DayPilot.Duration&&(e=e.ticks),new DayPilot.Date(this.ticks+e)):this},DayPilot.Date.prototype.addYears=function(e){var t=new Date(this.ticks),n=new Date(this.ticks),a=this.getYear()+e,i=this.getMonth();n.setUTCDate(1),n.setUTCFullYear(a),n.setUTCMonth(i);var r=new DayPilot.Date(n).daysInMonth();return n.setUTCDate(Math.min(r,t.getUTCDate())),new DayPilot.Date(n)},DayPilot.Date.prototype.dayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.dayOfWeekISO=function(){return new Date(this.ticks).getUTCDay()||7},DayPilot.Date.prototype.getDayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfYear=function(){var e=this.firstDayOfYear();return DayPilot.DateUtil.daysDiff(e,this)+1},DayPilot.Date.prototype.daysInMonth=function(){var e=new Date(this.ticks),t=e.getUTCMonth()+1,n=e.getUTCFullYear(),a=[31,28,31,30,31,30,31,31,30,31,30,31];return 2!==t?a[t-1]:n%4!==0?a[1]:n%100===0&&n%400!==0?a[1]:a[1]+1},DayPilot.Date.prototype.daysInYear=function(){var e=this.getYear();return e%4!==0?365:e%100===0&&e%400!==0?365:366},DayPilot.Date.prototype.dayOfYear=function(){return Math.ceil((this.getDatePart().getTime()-this.firstDayOfYear().getTime())/864e5)+1},DayPilot.Date.prototype.equals=function(e){if(null===e)return!1;if(e instanceof DayPilot.Date)return this===e;throw"The parameter must be a DayPilot.Date object (DayPilot.Date.equals())"},DayPilot.Date.prototype.firstDayOfMonth=function(){var e=new Date;return e.setUTCFullYear(this.getYear(),this.getMonth(),1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.firstDayOfYear=function(){var e=this.getYear(),t=new Date;return t.setUTCFullYear(e,0,1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),new DayPilot.Date(t)},DayPilot.Date.prototype.firstDayOfWeek=function(e){var t=this;if(e instanceof DayPilot.Locale)e=e.weekStarts;else if("string"==typeof e&&DayPilot.Locale.find(e)){var n=DayPilot.Locale.find(e);e=n.weekStarts}else e=e||0;for(var a=t.dayOfWeek();a!==e;)t=t.addDays(-1),a=t.dayOfWeek();return new DayPilot.Date(t)},DayPilot.Date.prototype.getDay=function(){return new Date(this.ticks).getUTCDate()},DayPilot.Date.prototype.getDatePart=function(){var e=new Date(this.ticks);return e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.getYear=function(){return new Date(this.ticks).getUTCFullYear()},DayPilot.Date.prototype.getHours=function(){return new Date(this.ticks).getUTCHours()},DayPilot.Date.prototype.getMilliseconds=function(){return new Date(this.ticks).getUTCMilliseconds()},DayPilot.Date.prototype.getMinutes=function(){return new Date(this.ticks).getUTCMinutes()},DayPilot.Date.prototype.getMonth=function(){return new Date(this.ticks).getUTCMonth()},DayPilot.Date.prototype.getSeconds=function(){return new Date(this.ticks).getUTCSeconds()},DayPilot.Date.prototype.getTotalTicks=function(){return this.getTime()},DayPilot.Date.prototype.getTime=function(){return this.ticks},DayPilot.Date.prototype.getTimePart=function(){var e=this.getDatePart();return DayPilot.DateUtil.diff(this,e)},DayPilot.Date.prototype.lastDayOfMonth=function(){var e=new Date(this.firstDayOfMonth().getTime()),t=this.daysInMonth();return e.setUTCDate(t),new DayPilot.Date(e)},DayPilot.Date.prototype.weekNumber=function(){var e=this.firstDayOfYear(),t=(this.getTime()-e.getTime())/864e5;return Math.ceil((t+e.dayOfWeek()+1)/7)},DayPilot.Date.prototype.weekNumberISO=function(){var e=!1,t=this.dayOfYear(),n=this.firstDayOfYear().dayOfWeek(),a=this.firstDayOfYear().addYears(1).addDays(-1).dayOfWeek();0===n&&(n=7),0===a&&(a=7);var i=8-n;4!==n&&4!==a||(e=!0);var r=Math.ceil((t-i)/7),o=r;return i>=4&&(o+=1),o>52&&!e&&(o=1),0===o&&(o=this.firstDayOfYear().addDays(-1).weekNumberISO()),o},DayPilot.Date.prototype.toDateLocal=function(){var e=new Date(this.ticks),t=new Date;return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours()),t.setMinutes(e.getUTCMinutes()),t.setSeconds(e.getUTCSeconds()),t.setMilliseconds(e.getUTCMilliseconds()),t},DayPilot.Date.prototype.toDate=function(){return new Date(this.ticks)},DayPilot.Date.prototype.toJSON=function(){return this.value},DayPilot.Date.prototype.toString=function(e,t){return e?new n(e,t).print(this):this.toStringSortable()},DayPilot.Date.prototype.toStringSortable=function(){return t(this.ticks)},DayPilot.Date.parse=function(e,t,a){return new n(t,a).parse(e)},DayPilot.Date.today=function(){return new DayPilot.Date(DayPilot.DateUtil.localToday(),!0)},DayPilot.Date.now=function(){return new DayPilot.Date},DayPilot.Date.fromYearMonthDay=function(e,t,n){t=t||1,n=n||1;var a=new Date(0);return a.setUTCFullYear(e),a.setUTCMonth(t-1),a.setUTCDate(n),new DayPilot.Date(a)},DayPilot.DateUtil={},DayPilot.DateUtil.fromStringSortable=function(e,t){if(!e)throw"Can't create DayPilot.Date from an empty string";var n=e.length,a=10===n,i=19===n,r=n>19;if(!a&&!i&&!r)throw"Invalid string format (use '2010-01-01' or '2010-01-01T00:00:00'): "+e;if(DayPilot.Date.Cache.Parsing[e]&&!t)return DayPilot.Stats.cacheHitsParsing+=1,DayPilot.Date.Cache.Parsing[e];var o=e.substring(0,4),s=e.substring(5,7),l=e.substring(8,10),d=new Date(0);if(d.setUTCFullYear(o,s-1,l),a)return DayPilot.Date.Cache.Parsing[e]=d,d;var c=e.substring(11,13),u=e.substring(14,16),h=e.substring(17,19);if(d.setUTCHours(c),d.setUTCMinutes(u),d.setUTCSeconds(h),i)return DayPilot.Date.Cache.Parsing[e]=d,d;var f=e[19],v=0;if("."===f){var p=parseInt(e.substring(20,23));d.setUTCMilliseconds(p),v=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(23))}else v=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(19));var m=new DayPilot.Date(d);return t||(m=m.addMinutes(-v)),d=m.toDate(),DayPilot.Date.Cache.Parsing[e]=d,d},DayPilot.DateUtil.getTzOffsetMinutes=function(e){if(DayPilot.Util.isNullOrUndefined(e)||""===e)return 0;if("Z"===e)return 0;var t=e[0],n=parseInt(e.substring(1,3)),a=parseInt(e.substring(4)),i=60*n+a;if("-"===t)return-i;if("+"===t)return i;throw"Invalid timezone spec: "+e},DayPilot.DateUtil.hasTzSpec=function(e){return!!e.indexOf("+")||!!e.indexOf("-")},DayPilot.DateUtil.daysDiff=function(e,t){if(!e||!t)throw new Error("two parameters required");if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()>t.getTime())return null;for(var n=0,a=e.getDatePart(),i=t.getDatePart();a.getTime()<i.getTime();)a=a.addDays(1),n++;return n},DayPilot.DateUtil.daysSpan=function(e,t){if(!e||!t)throw new Error("two parameters required");if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()===t.getTime())return 0;var n=DayPilot.DateUtil.daysDiff(e,t);return t.getTime()===t.getDatePart().getTime()&&n--,n},DayPilot.DateUtil.diff=function(e,t){if(!(e&&t&&e.getTime&&t.getTime))throw"Both compared objects must be Date objects (DayPilot.Date.diff).";return e.getTime()-t.getTime()},DayPilot.DateUtil.fromLocal=function(e){e||(e=new Date);var t=new Date;return t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours()),t.setUTCMinutes(e.getMinutes()),t.setUTCSeconds(e.getSeconds()),t.setUTCMilliseconds(e.getMilliseconds()),t},DayPilot.DateUtil.localToday=function(){var e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e},DayPilot.DateUtil.hours=function(e,t){var n=e.getUTCMinutes();n<10&&(n="0"+n);var a=e.getUTCHours();if(t){var i=a<12;a%=12,0===a&&(a=12);return a+":"+n+" "+(i?"AM":"PM")}return a+":"+n},DayPilot.DateUtil.max=function(e,t){return e.getTime()>t.getTime()?e:t},DayPilot.DateUtil.min=function(e,t){return e.getTime()<t.getTime()?e:t},DayPilot.ColorUtil={},DayPilot.ColorUtil.hexToRgb=function(e){if(!/^#[0-9a-f]{6}$/i.test(e))throw new DayPilot.Exception("Invalid color, only full hex color string accepted, eg. '#ffaaff'.");return e=e.replace("#",""),{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16)}},DayPilot.ColorUtil.rgbToHex=function(e){return"#"+i(e.r)+i(e.g)+i(e.b)},DayPilot.ColorUtil.adjustLuminance=function(e,t){return{r:e.r+t,g:e.g+t,b:e.b+t}},DayPilot.ColorUtil.darker=function(e,t){var n="";9===e.length&&(n=e.slice(7,9),e=e.slice(0,7));var a=DayPilot.ColorUtil.hexToRgb(e);"number"!=typeof t&&(t=1);var i=17,r=Math.round(t*i),o=DayPilot.ColorUtil.adjustLuminance(a,-r);return DayPilot.ColorUtil.rgbToHex(o)+n},DayPilot.ColorUtil.lighter=function(e,t){return"number"!=typeof t&&(t=1),DayPilot.ColorUtil.darker(e,-t)},DayPilot.ColorUtil.pl=function(e){var t=DayPilot.ColorUtil.hexToRgb(e),n=t.r/255,a=t.g/255,i=t.b/255;return Math.sqrt(.299*n*n+.587*a*a+.114*i*i)},DayPilot.ColorUtil.contrasting=function(e,t,n){var a=DayPilot.ColorUtil.pl(e);return t=t||"#ffffff",n=n||"#000000",a>.5?n:t},DayPilot.Event=function(e,t,n){var a=this;this.calendar=t,this.data=e?e:{},this.part=n?n:{},"undefined"==typeof this.data.id&&(this.data.id=this.data.value);var i={},r=["id","text","start","end","resource"];this.isEvent=!0,this.temp=function(){if(i.dirty)return i;for(var e=0;e<r.length;e++)i[r[e]]=a.data[r[e]];return i.dirty=!0,i},this.copy=function(){for(var e={},t=0;t<r.length;t++)e[r[t]]=a.data[r[t]];return e},this.commit=function(){if(i.dirty){for(var e=0;e<r.length;e++)a.data[r[e]]=i[r[e]];i.dirty=!1}},this.dirty=function(){return i.dirty},this.id=function(e){return"undefined"==typeof e?a.data.id:void(this.temp().id=e)},this.value=function(e){return"undefined"==typeof e?a.id():void a.id(e)},this.text=function(e){return"undefined"==typeof e?a.data.text:(this.temp().text=e,void this.client.innerHTML(e))},this.start=function(e){return"undefined"==typeof e?new DayPilot.Date(a.data.start):void(this.temp().start=new DayPilot.Date(e))},this.end=function(e){return"undefined"==typeof e?new DayPilot.Date(a.data.end):void(this.temp().end=new DayPilot.Date(e))},this.resource=function(e){return"undefined"==typeof e?a.data.resource:void(this.temp().resource=e)},this.duration=function(){return new DayPilot.Duration(this.start(),this.end())},this.rawend=function(e){if("undefined"==typeof e)return t&&t.internal.adjustEndIn?t.internal.adjustEndIn(new DayPilot.Date(a.data.end)):new DayPilot.Date(a.data.end);throw new DayPilot.Exception("DayPilot.Event.rawend() is readonly")},this.partStart=function(){return new DayPilot.Date(this.part.start)},this.partEnd=function(){return new DayPilot.Date(this.part.end)},this.tag=function(e){var t=a.data.tag;if(!t)return null;if("undefined"==typeof e)return a.data.tag;for(var n=a.calendar.tagFields,i=-1,r=0;r<n.length;r++)e===n[r]&&(i=r);if(i===-1)throw"Field name not found.";return t[i]},this.client={},this.client.innerHTML=function(e){if("undefined"==typeof e){var t=a.cache||a.data,n=a.calendar&&a.calendar.internal&&a.calendar.internal.xssTextHtml;return n?n(t.text,t.html):DayPilot.Util.escapeTextHtml(t.text,t.html)}a.data.html=e},this.client.html=this.client.innerHTML,this.client.header=function(e){return"undefined"==typeof e?a.data.header:void(a.data.header=e)},this.client.cssClass=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.cssClass?a.cache.cssClass:a.data.cssClass:void(a.data.cssClass=e)},this.client.toolTip=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.toolTip?a.cache.toolTip:"undefined"!=typeof a.data.toolTip?a.data.toolTip:a.data.text:void(a.data.toolTip=e)},this.client.barVisible=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.barHidden?!a.cache.barHidden:a.calendar.durationBarVisible&&!a.data.barHidden:void(a.data.barHidden=!e)},this.client.backColor=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.backColor?a.cache.backColor:"undefined"!=typeof a.data.backColor?a.data.backColor:a.calendar.eventBackColor:void(a.data.backColor=e)},this.client.borderColor=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.borderColor?a.cache.borderColor:"undefined"!=typeof a.data.borderColor?a.data.borderColor:a.calendar.eventBorderColor:void(a.data.borderColor=e)},this.client.contextMenu=function(e){if("undefined"==typeof e){if(a.oContextMenu)return a.oContextMenu;return a.cache?a.cache.contextMenu:a.data.contextMenu}a.oContextMenu=e},this.client.moveEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.moveDisabled?!a.cache.moveDisabled:"Disabled"!==a.calendar.eventMoveHandling&&!a.data.moveDisabled:void(a.data.moveDisabled=!e)},this.client.resizeEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.resizeDisabled?!a.cache.resizeDisabled:"Disabled"!==a.calendar.eventResizeHandling&&!a.data.resizeDisabled:void(a.data.resizeDisabled=!e)},this.client.clickEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.clickDisabled?!a.cache.clickDisabled:"Disabled"!==a.calendar.eventClickHandling&&!a.data.clickDisabled:void(a.data.clickDisabled=!e)},this.client.rightClickEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.rightClickDisabled?!a.cache.rightClickDisabled:"Disabled"!==a.calendar.eventRightClickHandling&&!a.data.rightClickDisabled:void(a.data.rightClickDisabled=!e)},this.client.deleteEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.deleteDisabled?!a.cache.deleteDisabled:"Disabled"!==a.calendar.eventDeleteHandling&&!a.data.deleteDisabled:void(a.data.deleteDisabled=!e)},this.toJSON=function(){var e={};if(e.value=this.id(),e.id=this.id(),e.text=this.text(),e.start=this.start(),e.end=this.end(),e.tag={},a.calendar&&a.calendar.tagFields)for(var t=a.calendar.tagFields,n=0;n<t.length;n++)e.tag[t[n]]=this.tag(t[n]);return e}}}}(DayPilot),function(DayPilot){var e=function(){};if("undefined"==typeof DayPilot.Calendar||!DayPilot.Calendar.events){var t={};t.selectedCells=[],t.topSelectedCell=null,t.bottomSelectedCell=null,t.column=null,t.firstSelected=null,t.firstMousePos=null,t.originalMouse=null,t.originalHeight=null,t.originalTop=null,t.resizing=null,t.globalHandlers=!1,t.moving=null,t.register=function(e){t.registered||(t.registered=[]);for(var n=t.registered,a=0;a<n.length;a++)if(n[a]===e)return;n.push(e)},t.unregister=function(e){var n=t.registered;if(n){var a=DayPilot.indexOf(n,e);a!==-1&&n.splice(a,1)}},t.getCellsAbove=function(e){for(var n=[],a=t.getColumn(e),i=e.parentNode,r=null;i&&r!==t.firstSelected;)for(r=i.getElementsByTagName("td")[a],n.push(r),i=i.previousSibling;i&&"TR"!==i.tagName;)i=i.previousSibling;return n},t.getCellsBelow=function(e){for(var n=[],a=t.getColumn(e),i=e.parentNode,r=null;i&&r!==t.firstSelected;)for(r=i.getElementsByTagName("td")[a],n.push(r),i=i.nextSibling;i&&"TR"!==i.tagName;)i=i.nextSibling;return n},t.getColumn=function(e){for(var t=0;e.previousSibling;)e=e.previousSibling,"TD"===e.tagName&&t++;return t},t.gUnload=function(){if(t.registered)for(var e=t.registered,n=0;n<e.length;n++){var a=e[n];a.dispose(),t.unregister(a)}},t.gMouseUp=function(n){if(t.resizing){if(!t.resizingShadow)return t.resizing.style.cursor="default",document.body.style.cursor="default",t.resizing=null,void(DayPilot.Global.resizing=null);var a=t.resizing.event,i=t.resizingShadow.clientHeight,r=t.resizingShadow.offsetTop,o=t.resizing.dpBorder;t.deleteShadow(t.resizingShadow),t.resizingShadow=null,t.resizing.style.cursor="default",a.calendar.nav.top.style.cursor="auto",t.resizing.onclick=null,t.resizing=null,DayPilot.Global.resizing=null,a.calendar.K(a,i,r,o)}else if(t.moving){if(!t.movingShadow)return t.moving=null,DayPilot.Global.moving=null,void(document.body.style.cursor="default");var s=t.movingShadow.offsetTop,a=t.moving.event;t.deleteShadow(t.movingShadow),DayPilot.Util.removeClass(t.moving,a.calendar.L("_event_moving_source"));var l=t.movingShadow.column;t.moving=null,DayPilot.Global.moving=null,t.movingShadow=null,a.calendar.nav.top.style.cursor="auto",a.calendar.M(a,l,s,n)}else if(DayPilot.Global.selecting){var d=DayPilot.Global.selecting.calendar;d.N=DayPilot.Global.selecting,DayPilot.Global.selecting=null;var c=d.getSelection();d.O(c.start,c.end,c.resource),"Hold"!==d.timeRangeSelectedHandling&&"HoldForever"!==d.timeRangeSelectedHandling&&e()}else t.selecting=!1},t.deleteShadow=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},t.moveShadow=function(e){var n=t.movingShadow,a=n.parentNode;a.style.display="none",n.parentNode.removeChild(n),e.firstChild.appendChild(n),n.style.left="0px",a.style.display="",n.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"};var n=DayPilot.Util.isVueVNode,a=DayPilot.Util.overlaps;t.Calendar=function(e,i){var r=!1;if(this instanceof t.Calendar&&!this.P&&(r=!0,this.P=!0),!r)throw"DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";var o=this;this.uniqueID=null,this.isCalendar=!0,this.v="${v}",this.id=e,this.clientName=e,this.cache={},this.cache.pixels={},this.elements={},this.elements.events=[],this.elements.selection=[],this.nav={},this.afterRender=function(){},this.fasterDispose=!0,this.angularAutoApply=!1,this.api=2,this.businessBeginsHour=9,this.businessEndsHour=18,this.cellDuration=30,this.cellHeight=30,this.columnMarginLeft=0,this.columnMarginRight=5,this.columnsLoadMethod="GET",this.contextMenu=null,this.days=1,this.durationBarVisible=!0,this.eventBorderRadius=null,this.eventsLoadMethod="GET",this.headerDateFormat=null,this.headerHeight=30,this.headerTextWrappingEnabled=!1,this.height=300,this.heightSpec="BusinessHours",this.hideUntilInit=!0,this.hourWidth=60,this.initScrollPos="Auto",this.loadingLabelHtml=null,this.loadingLabelText="Loading...",this.loadingLabelVisible=!0,this.locale="en-us",this.rtl=!1,this.snapToGrid=!0,this.showToolTip=!0,this.startDate=(new DayPilot.Date).getDatePart(),this.cssClassPrefix="calendar_default",this.theme=null,this.timeFormat="Auto",this.useEventBoxes="Always",this.viewType="Days",this.visible=!0,this.xssProtection="Enabled",this.headerClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.eventMoveHandling="Update",this.eventDeleteHandling="Disabled",this.timeRangeSelectedHandling="Enabled",this.onBeforeCellRender=null,this.onBeforeEventRender=null,this.onBeforeHeaderRender=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onHeaderClick=null,this.onHeaderClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.Q=!1,this.R={};var s=this.R;this.clearSelection=function(){t.topSelectedCell=null,t.bottomSelectedCell=null,this.S()},this.S=function(){DayPilot.de(o.elements.selection),o.elements.selection=[],o.nav.activeSelection=null},this.T=function(e,t,n){var a={};a.action=e,a.parameters=n,a.data=t,a.header=this.U();var i="JSON"+JSON.stringify(a);__doPostBack(o.uniqueID,i)},this.V=function(e,t,n){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.callbackTimeout=window.setTimeout(function(){o.loadingStart()},100);var a={};a.action=e,a.parameters=n,a.data=t,a.header=this.U();var i="JSON"+JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.W,i,this.ajaxError):"function"==typeof WebForm_DoCallback&&WebForm_DoCallback(this.uniqueID,i,this.X,this.clientName,this.onCallbackError,!0)},this.onCallbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.dispose=function(){var e=o;e.Q||(e.Q=!0,clearInterval(e.Y),e.Z(),e.nav.scroll.root=null,DayPilot.pu(e.nav.loading),e._(),e.aa(),e.nav.select=null,e.nav.cornerRight=null,e.nav.scrollable=null,e.nav.zoom=null,e.nav.loading=null,e.nav.header=null,e.nav.hourTable=null,e.nav.scrolltop=null,e.nav.scroll.onscroll=null,e.nav.scroll=null,e.nav.main=null,e.nav.message=null,e.nav.messageClose=null,e.nav.top=null,t.unregister(e))},this.disposed=function(){return this.Q},this.ba=function(){this.nav.top.dispose=this.dispose},this.W=function(e){o.X(e.responseText)},this.U=function(){var e={};return e.control="dpc",e.id=this.id,e.v=this.v,e.days=o.days,e.startDate=o.startDate,e.heightSpec=o.heightSpec,e.businessBeginsHour=o.businessBeginsHour,e.businessEndsHour=o.businessEndsHour,e.hashes=o.hashes,e.timeFormat=o.timeFormat,e.viewType=o.viewType,e.locale=o.locale,e},this.ca=function(e){for(var t=e.parentNode;t&&"TD"!==t.tagName;)t=t.parentNode;var n=o.eventBorderRadius;"number"==typeof n&&(n+="px");var a=document.createElement("div");a.setAttribute("unselectable","on"),a.style.position="absolute",a.style.width=e.offsetWidth+"px",a.style.height=e.offsetHeight+"px",a.style.left=e.offsetLeft+"px",a.style.top=e.offsetTop+"px",a.style.boxSizing="border-box",a.style.zIndex=101,a.className=o.L("_shadow");var i=document.createElement("div");return i.className=o.L("_shadow_inner"),n&&(i.style.borderRadius=n,a.style.borderRadius=n),a.appendChild(i),t.firstChild.appendChild(a),a},this.R.locale=function(){var e=DayPilot.Locale.find(o.locale);return e?e:DayPilot.Locale.US},this.R.timeFormat=function(){return"Auto"!==o.timeFormat?o.timeFormat:this.locale().timeFormat},this.R.da=function(){return"Disabled"!==o.xssProtection},this.R.ea=function(){if("Auto"===o.weekStarts){var e=s.locale();return e?e.weekStarts:0}return o.weekStarts||0},this.R.fa=function(){var e=o.cellDuration;if(e<=1)return 1;if(e>=60)return 60;var t=[1,2,3,4,5,6,10,12,15,20,30,60],n=Math.floor(e);return Math.max.apply(null,t.filter(function(e){return e<=n}))},this.X=function(e){if(e&&0===e.indexOf("$$$")){if(!window.console)throw"Error received from the server side: "+e;return void console.log("Error received from the server side: "+e)}var t=JSON.parse(e);if(t.CallBackRedirect)return void(document.location.href=t.CallBackRedirect);if("None"===t.UpdateType)return o.loadingStop(),void o.u();if(o.Z(),"Full"===t.UpdateType&&(o.columns=t.Columns,o.days=t.Days,o.startDate=new DayPilot.Date(t.StartDate),o.heightSpec=t.HeightSpec?t.HeightSpec:o.heightSpec,o.businessBeginsHour=t.BusinessBeginsHour?t.BusinessBeginsHour:o.businessBeginsHour,o.businessEndsHour=t.BusinessEndsHour?t.BusinessEndsHour:o.businessEndsHour,o.headerDateFormat=t.HeaderDateFormat?t.HeaderDateFormat:o.headerDateFormat,o.viewType=t.ViewType,o.backColor=t.BackColor?t.BackColor:o.backColor,o.eventHeaderVisible=t.EventHeaderVisible?t.EventHeaderVisible:o.eventHeaderVisible,o.timeFormat=t.TimeFormat?t.TimeFormat:o.timeFormat,o.locale=t.Locale?t.Locale:o.locale,o.ga()),t.Hashes)for(var n in t.Hashes)o.hashes[n]=t.Hashes[n];o.events.list=t.Events,o.ha(),o.ia(),"Full"===t.UpdateType&&(o.ja(),o.ka(),o.la(),o.ma()),o.u(),o.na(),o.clearSelection(),o.afterRender(t.CallBackData,!0),o.loadingStop()},this.oa=function(){return this.pa()/36e5},this.qa=function(){return this.businessBeginsHour>this.businessEndsHour?24-this.businessBeginsHour+this.businessEndsHour:this.businessEndsHour-this.businessBeginsHour},this.ra=function(){return this.pa()/(60*s.fa()*1e3)},this.pa=function(){var e=0;return e="BusinessHoursNoScroll"===this.heightSpec?this.qa():24,60*e*60*1e3},this.sa=function(){return"BusinessHoursNoScroll"===this.heightSpec?this.businessBeginsHour:0},this.ta=function(){return 2===o.api},this.eventClickCallBack=function(e,t){this.V("EventClick",t,e)},this.eventClickPostBack=function(e,t){this.T("EventClick",t,e)},this.va=function(e){var t=e.currentTarget,n=t.event;if(n.client.clickEnabled())if(o.ta()){var a={};if(a.e=n,a.originalEvent=e,a.meta=e.metaKey,a.ctrl=e.ctrlKey,a.control=o,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventClick&&(o.wa.apply(function(){o.onEventClick(a)}),a.preventDefault.value))return;switch(o.eventClickHandling){case"CallBack":o.eventClickCallBack(n);break;case"PostBack":o.eventClickPostBack(n);break;case"ContextMenu":var i=n.client.contextMenu();i?i.show(n):o.contextMenu&&o.contextMenu.show(n)}"function"==typeof o.onEventClicked&&o.wa.apply(function(){o.onEventClicked(a)})}else switch(o.eventClickHandling){case"PostBack":o.eventClickPostBack(n);break;case"CallBack":o.eventClickCallBack(n);break;case"JavaScript":o.onEventClick(n)}},this.xa=function(e){var t=e.currentTarget.event;if(e.stopPropagation(),!t.client.rightClickEnabled())return!1;var n={};if(n.e=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventRightClick&&(o.onEventRightClick(n),n.preventDefault.value))return!1;switch(o.eventRightClickHandling){case"ContextMenu":var a=t.client.contextMenu();a?a.show(t):o.contextMenu&&o.contextMenu.show(t);
|
|
12
|
-
}return"function"==typeof o.onEventRightClicked&&o.onEventRightClicked(n),e.preventDefault&&e.preventDefault(),!1},this.eventDeleteCallBack=function(e,t){this.V("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.T("EventDelete",t,e)},this.ya=function(e){if(o.ta()){var t={};if(t.e=e,t.control=o,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventDelete&&(o.wa.apply(function(){o.onEventDelete(t)}),t.preventDefault.value))return;switch(o.eventDeleteHandling){case"CallBack":o.eventDeleteCallBack(e);break;case"PostBack":o.eventDeletePostBack(e);break;case"Update":o.events.remove(e)}"function"==typeof o.onEventDeleted&&o.wa.apply(function(){o.onEventDeleted(t)})}else switch(o.eventDeleteHandling){case"PostBack":o.eventDeletePostBack(e);break;case"CallBack":o.eventDeleteCallBack(e);break;case"JavaScript":o.onEventDelete(e)}},this.eventResizeCallBack=function(e,t,n,a){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var i={};i.e=e,i.newStart=t,i.newEnd=n,this.V("EventResize",a,i)},this.eventResizePostBack=function(e,t,n,a){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var i={};i.e=e,i.newStart=t,i.newEnd=n,this.T("EventResize",a,i)},this.K=function(e,t,n,a){var i=0,r=new Date,s=new Date;if("top"===a?(r=o.za(e,n-i),s=e.end()):"bottom"===a&&(r=e.start(),s=o.Aa(e,n+t-i)),o.ta()){var l={};if(l.e=e,l.control=o,l.newStart=r,l.newEnd=s,l.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventResize&&(o.wa.apply(function(){o.onEventResize(l)}),l.preventDefault.value))return;switch(o.eventResizeHandling){case"PostBack":o.eventResizePostBack(e,r,s);break;case"CallBack":o.eventResizeCallBack(e,r,s);break;case"Update":e.start(r),e.end(s),o.events.update(e)}"function"==typeof o.onEventResized&&o.wa.apply(function(){o.onEventResized(l)})}else switch(o.eventResizeHandling){case"PostBack":o.eventResizePostBack(e,r,s);break;case"CallBack":o.eventResizeCallBack(e,r,s);break;case"JavaScript":o.onEventResize(e,r,s)}},this.za=function(e,t){var n=o.Ba[e.part.dayIndex].start,a=Math.floor(t/o.cellHeight);o.snapToGrid||(a=t/o.cellHeight);var i=Math.floor(a*s.fa()),r=60*i*1e3,l=60*o.sa()*60*1e3;return n.addTime(r+l)},this.Aa=function(e,t){var n=Math.floor(t/o.cellHeight);o.snapToGrid||(n=t/o.cellHeight);var a=Math.floor(n*s.fa()),i=60*a*1e3,r=60*o.sa()*60*1e3;return o.Ba[e.part.dayIndex].start.addTime(i+r)},this.eventMovePostBack=function(e,t,n,a,i){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var r={};r.e=e,r.newStart=t,r.newEnd=n,this.T("EventMove",i,r)},this.eventMoveCallBack=function(e,t,n,a,i){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var r={};r.e=e,r.newStart=t,r.newEnd=n,this.V("EventMove",i,r)},this.M=function(e,t,n,a){var i=0,r=Math.floor((n-i)/o.cellHeight);o.snapToGrid||(r=(n-i)/o.cellHeight);var l=s.fa(),d=r*l*60*1e3,c=e.start(),u=e.end(),h=new Date;c instanceof DayPilot.Date&&(c=c.toDate()),h.setTime(Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()));var f=c.getTime()-(h.getTime()+3600*c.getUTCHours()*1e3+Math.floor(c.getUTCMinutes()/l)*l*60*1e3);"Never"===o.useEventBoxes&&(f=0);var v=u.getTime()-c.getTime(),p=this.Ba[t],m=p.id;o.snapToGrid||(f=0);var g=p.start.getTime(),y=new Date;y.setTime(g+d+f);var b=new DayPilot.Date(y),w=b.addTime(v);if(o.ta()){var x={};if(x.e=e,x.newStart=b,x.newEnd=w,x.newResource=m,x.ctrl=a.ctrlKey,x.shift=a.shiftKey,x.control=o,x.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventMove&&(o.wa.apply(function(){o.onEventMove(x)}),x.preventDefault.value))return;switch(o.eventMoveHandling){case"PostBack":o.eventMovePostBack(e,b,w,p.id);break;case"CallBack":o.eventMoveCallBack(e,b,w,p.id);break;case"Update":e.start(b),e.end(w),e.resource(m),o.events.update(e)}"function"==typeof o.onEventMoved&&o.wa.apply(function(){o.onEventMoved(x)})}else switch(o.eventMoveHandling){case"PostBack":o.eventMovePostBack(e,b,w,p.id);break;case"CallBack":o.eventMoveCallBack(e,b,w,p.id);break;case"JavaScript":o.onEventMove(e,b,w,p.id,!1)}},this.timeRangeSelectedPostBack=function(e,t,n,a){var i={};i.start=e,i.end=t,this.T("TimeRangeSelected",a,i)},this.timeRangeSelectedCallBack=function(e,t,n,a){var i={};i.start=e,i.end=t,this.V("TimeRangeSelected",a,i)},this.O=function(e,t,n){if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),this.ta()){var a={};if(a.start=e,a.end=t,a.resource=n,a.control=o,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onTimeRangeSelect&&(o.wa.apply(function(){o.onTimeRangeSelect(a)}),a.preventDefault.value))return;switch(o.timeRangeSelectedHandling){case"PostBack":o.timeRangeSelectedPostBack(e,t);break;case"CallBack":o.timeRangeSelectedCallBack(e,t)}"function"==typeof o.onTimeRangeSelected&&o.wa.apply(function(){o.onTimeRangeSelected(a)})}else switch(o.timeRangeSelectedHandling){case"PostBack":o.timeRangeSelectedPostBack(e,t);break;case"CallBack":o.timeRangeSelectedCallBack(e,t);break;case"JavaScript":o.onTimeRangeSelected(e,t)}},this.Ca=function(e){if(!DayPilot.Global.selecting&&"Disabled"!==o.timeRangeSelectedHandling){var t=e.which;if(1===t||0===t){var n=o.nav.scrollable;o.coords=DayPilot.mo3(n,e),DayPilot.Global.selecting={calendar:o,start:o.coords};var a=DayPilot.Global.selecting;return a.start.time=o.Da(o.coords.x,o.coords.y),a.start.columnIndex=o.Ea(o.coords.x),a.start.column=o.Ba[a.start.columnIndex],o.Fa(),o.Ga(),!1}}},this.Ga=function(){var e=DayPilot.Global.selecting;!function(){var t=e.start.column,n=e.start.columnIndex,a=t.start,i=o.getPixels(e.startTime,a),r=o.getPixels(e.endTime,a),s=i.boxTop,l=r.boxBottom;o.snapToGrid||(s=i.top,l=r.top);var d=l-s,c=o.eventBorderRadius;"number"==typeof c&&(c+="px");var u=function(){if(o.nav.activeSelection)return o.nav.activeSelection;var e=document.createElement("div");e.setAttribute("unselectable","on"),e.style.position="absolute",e.style.left="0px",e.style.width="100%";var t=document.createElement("div");return t.setAttribute("unselectable","on"),t.className=o.L("_shadow_inner"),c&&(t.style.borderRadius=c,e.style.borderRadius=c),e.appendChild(t),o.nav.events.rows[0].cells[n].selection.appendChild(e),o.elements.selection.push(e),o.nav.activeSelection=e,e}();u.className=o.L("_shadow"),u.firstChild.innerHTML="",u.style.top=s+"px",u.style.height=d+"px",o.nav.events.rows[0].cells[n].selection.appendChild(u)}()},this.Fa=function(){var e=DayPilot.Global.selecting;e.end=o.coords,e.end.time=o.Da(e.start.x,e.end.y),e.end.column=o.Ba[o.Ea(e.end.x)],o.Ha(e)},this.Ha=function(e){var t,n,a;o.snapToGrid?e.end.time<e.start.time?(t=o.Ia(e.end.time,e.start.column.start),n=o.Ja(e.start.time,e.start.column.start),a=e.endTime):(t=o.Ia(e.start.time,e.start.column.start),n=o.Ja(e.end.time,e.start.column.start),a=e.startTime):e.end.time<e.start.time?(t=e.end.time,n=e.start.time,a=e.endTime):(t=e.start.time,n=e.end.time,a=e.startTime),e.startTime=t,e.endTime=n,e.anchor=a},this.getSelection=function(){if(!o.N)return null;var e=o.N;return new DayPilot.Selection(e.startTime,e.endTime,e.start.column.id,o)},this.Ea=function(e){if(e<0)return 0;o.rtl?e=o.nav.main.offsetWidth-e:e-=o.hourWidth;for(var t=0,n=o.nav.events.rows[0].cells,a=0;a<n.length;a++){if(t+=n[a].offsetWidth,e<t)return a}return null},this.Da=function(e,t){e=DayPilot.Util.atLeast(e,0);var n=this.Ea(e),a=t/(60/s.fa())/o.cellHeight,i=60*a*60*1e3,r=6e4*Math.floor(i/6e4),l=this.Ba[n];return l?l.start.addTime(r):null},this.Ia=function(e,t){var n=e.getTime();t&&(n-=t.getTime());var a=60*s.fa()*1e3,i=n%a;return e.addTime(-i)},this.Ja=function(e,t){var n=this.Ia(e,t);return n.getTime()===e.getTime()?n:n.addTime(60*s.fa()*1e3)},this.Ka={},this.Ka.getCellCoords=function(){var e={};if(e.x=0,e.y=0,!o.coords)return null;e.x=o.Ea(o.coords.x);var t=0,n=Math.floor((o.coords.y-t)/o.cellHeight);return e.y=n,e.x<0?null:e},this.columns={},this.columns.list=[],this.columns.load=function(e,t,n){if(!e)throw new DayPilot.Exception("columns.load(): 'url' parameter required");var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},i=function(e){var n,i=e.request;try{n=JSON.parse(i.responseText)}catch(e){var r={};return r.exception=e,void a(r)}if(DayPilot.isArray(n)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=n,"function"==typeof t&&t(s),s.preventDefault.value)return;o.columns.list=n,o.La&&o.update()}};o.columnsLoadMethod&&"POST"===o.columnsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":i,"error":a}):DayPilot.ajax({"method":"GET","url":e,"success":i,"error":a})},this.ga=function(){var e;e="Resources"!==o.viewType?this.Ma():o.columns.list,this.Ba=[];for(var t=0;t<e.length;t++){var n=this.Na(e[t]);this.Ba.push(n)}},this.Na=function(e){var t={};if(t.name=e.name,t.html=e.html,t.id=e.id,t.toolTip=e.toolTip,t.data=e,e.start?t.start=new DayPilot.Date(e.start):t.start=new DayPilot.Date(o.startDate),"BusinessHoursNoScroll"===this.heightSpec){var n=t.start.getDatePart();t.start=n.addHours(this.businessBeginsHour)}return t.putIntoBlock=function(e){for(var t=0;t<this.blocks.length;t++){var n=this.blocks[t];if(n.overlapsWith(e.part.top,e.part.height))return n.events.push(e),n.min=Math.min(n.min,e.part.top),n.max=Math.max(n.max,e.part.top+e.part.height),t}var a=[];return a.lines=[],a.events=[],a.overlapsWith=function(e,t){return!(e+t-1<this.min||e>this.max-1)},a.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.isFree(e.part.top,e.part.height))return n.push(e),t}var a=[];return a.isFree=function(e,t){for(var n=e+t-1,a=this.length,i=0;i<a;i++){var r=this[i];if(!(n<r.part.top||e>r.part.top+r.part.height-1))return!1}return!0},a.push(e),this.lines.push(a),this.lines.length-1},a.events.push(e),a.min=e.part.top,a.max=e.part.top+e.part.height,this.blocks.push(a),this.blocks.length-1},t.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.isFree(e.part.top,e.part.height))return n.push(e),t}var a=[];return a.isFree=function(e,t){for(var n=e+t-1,a=this.length,i=0;i<a;i++){var r=this[i];if(!(n<r.part.top||e>r.part.top+r.part.height-1))return!1}return!0},a.push(e),this.lines.push(a),this.lines.length-1},t},this.Ma=function(){var e=[],t=this.startDate.getDatePart(),n=this.days;switch(this.viewType){case"Day":n=1;break;case"Week":n=7;var a=s.ea();t=t.firstDayOfWeek(a);break;case"WorkWeek":n=5,t=t.firstDayOfWeek(1)}for(var i=0;i<n;i++){var r=o.headerDateFormat?o.headerDateFormat:s.locale().datePattern,l={};l.start=t.addDays(i),l.name=l.start.toString(r,s.locale()),e.push(l)}return e},this.visibleStart=function(){if("Resources"===o.viewType){if(0===o.Ba.length)return DayPilot.Date.today();var e=o.Ba.map(function(e){return e.start.getTime()}),t=Math.min.apply(null,e);return new DayPilot.Date(t)}return this.Ba[0].start},this.visibleEnd=function(){if("Resources"===o.viewType){if(0===o.Ba.length)return DayPilot.Date.today().addDays(1);var e=o.Ba.map(function(e){return e.start.getTime()}),t=Math.max.apply(null,e);return new DayPilot.Date(t).addDays(1)}var n=this.Ba.length-1;return this.Ba[n].start.addDays(1)},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Z=function(){if(this.elements.events)for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];o.Oa(t)}this.elements.events=[]},this.Oa=function(e){!function(){var t=e.domArgs;if(e.domArgs=null,t&&"function"==typeof o.onBeforeEventDomRemove&&o.onBeforeEventDomRemove(t),t&&"function"==typeof o.onBeforeEventDomAdd){var a=t&&t.Pa;if(a){o.Ra.Qa&&n(t.element)&&(o.Ra.Sa=!0,o.Ra.Ta(a),o.Ra.Sa=!1)}}}();var t=e.event;if(t&&(t.calendar=null),e.onclick=null,e.onclickSave=null,e.onmouseover=null,e.onmouseout=null,e.onmousemove=null,e.onmousedown=null,e.firstChild&&e.firstChild.firstChild&&e.firstChild.firstChild.tagName&&"IMG"===e.firstChild.firstChild.tagName.toUpperCase()){var a=e.firstChild.firstChild;a.onmousedown=null,a.onmousemove=null,a.onclick=null}e.helper=null,e.data=null,e.event=null,DayPilot.de(e)},this.Ua=function(e){var a=e.cache||e.data,i=this.nav.events,r=a.borderRadius||o.eventBorderRadius;"number"==typeof r&&(r+="px");var s=document.createElement("div");s.style.position="absolute",s.style.left=e.part.left+"%",s.style.top=e.part.top+"px",s.style.width=e.part.width+"%",s.style.height=Math.max(e.part.height,2)+"px",s.style.overflow="hidden",s.data=e,s.event=e,s.unselectable="on",s.style.MozUserSelect="none",s.style.KhtmlUserSelect="none",s.className=this.L("_event"),a.cssClass&&DayPilot.Util.addClass(s,a.cssClass),o.showToolTip&&e.client.toolTip()&&(s.title=e.client.toolTip()),s.isFirst=e.part.start.getTime()===e.start().getTime(),s.isLast=e.part.end.getTime()===e.end().getTime(),s.onclick=this.va,DayPilot.re(s,"contextmenu",this.xa),s.onmouseout=function(){s.deleteIcon&&(s.deleteIcon.style.display="none")},s.onmousemove=function(n){var a=5;if("undefined"!=typeof t){var i=DayPilot.mo3(s,n);if(i&&!t.resizing&&!t.moving){s.deleteIcon&&(s.deleteIcon.style.display="");var r=this.isLast;i.y<=a&&e.client.resizeEnabled()?(this.style.cursor="n-resize",this.dpBorder="top"):this.offsetHeight-i.y<=a&&e.client.resizeEnabled()?r?(this.style.cursor="s-resize",this.dpBorder="bottom"):this.style.cursor="not-allowed":t.resizing||t.moving||("Disabled"!==o.eventClickHandling?this.style.cursor="pointer":this.style.cursor="default")}}},s.onmousedown=function(n){var a=n.which||n.button;if("n-resize"!==this.style.cursor&&"s-resize"!==this.style.cursor||1!==a){if(1===a&&e.client.moveEnabled()){t.moving=this,DayPilot.Global.moving=this,t.moving.event=this.event;var i=t.moving.helper={};i.oldColumn=o.Ba[this.data.part.dayIndex].id,t.originalMouse=DayPilot.mc(n),t.originalTop=this.offsetTop;var r=DayPilot.mo3(this,n);r?t.moveOffsetY=r.y:t.moveOffsetY=0,o.nav.top.style.cursor="move"}}else t.resizing=this,DayPilot.Global.resizing=this,t.originalMouse=DayPilot.mc(n),t.originalHeight=this.offsetHeight,t.originalTop=this.offsetTop,o.nav.top.style.cursor=this.style.cursor;return!1};var l=document.createElement("div");if(l.setAttribute("unselectable","on"),l.className=o.L("_event_inner"),"darker"===a.borderColor&&a.backColor?l.style.borderColor=DayPilot.ColorUtil.darker(a.backColor,2):l.style.borderColor=a.borderColor,a.backColor&&(l.style.background=a.backColor),a.fontColor&&(l.style.color=a.fontColor),r&&(s.style.borderRadius=r,l.style.borderRadius=r),s.appendChild(l),e.client.barVisible()){var d=e.part.height-2,c=100*e.part.barTop/d,u=Math.ceil(100*e.part.barHeight/d),h=document.createElement("div");h.setAttribute("unselectable","on"),h.className=this.L("_event_bar"),h.style.position="absolute",a.barBackColor&&(h.style.backgroundColor=a.barBackColor);var f=document.createElement("div");f.setAttribute("unselectable","on"),f.className=this.L("_event_bar_inner"),f.style.top=c+"%",0<u&&u<=1?f.style.height="1px":f.style.height=u+"%",a.barColor&&(f.style.backgroundColor=a.barColor),h.appendChild(f),s.appendChild(h)}if(e.client.deleteEnabled()){var v=document.createElement("div");v.style.position="absolute",v.style.right="2px",v.style.top="2px",v.style.width="17px",v.style.height="17px",v.className=o.L("_event_delete"),v.onmousedown=function(e){e.stopPropagation()},v.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&o.ya(t)},v.style.display="none",s.deleteIcon=v,s.appendChild(v)}var p=a.areas?DayPilot.Areas.copy(a.areas):[];if(DayPilot.Areas.attach(s,e,{"areas":p}),"function"==typeof o.onAfterEventRender){var m={};m.e=s.event,m.div=s,o.onAfterEventRender(m)}if(function(){var t={};if(t.control=o,t.e=e,t.element=null,s.domArgs=t,"function"==typeof o.onBeforeEventDomAdd&&o.onBeforeEventDomAdd(t),t.element){var a=l;if(a){t.Pa=a;if(n(t.element)){if(!o.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");o.Ra.Sa=!0,o.Ra.Va(t.element,a),o.Ra.Sa=!1}else a.appendChild(t.element)}}else l.innerHTML=e.client.innerHTML()}(),i.rows[0].cells[e.part.dayIndex]){i.rows[0].cells[e.part.dayIndex].firstChild.appendChild(s)}o.elements.events.push(s)},this.na=function(){for(var e=0;e<this.Ba.length;e++){var t=this.Ba[e];if(t.blocks)for(var n=0;n<t.blocks.length;n++)for(var a=t.blocks[n],i=0;i<a.lines.length;i++)for(var r=a.lines[i],o=0;o<r.length;o++){var s=r[o];s.part.width=100/a.lines.length,s.part.left=s.part.width*i;var l=i===a.lines.length-1;l||(s.part.width=1.5*s.part.width),this.Ua(s)}}},this.Wa=function(){var e=this.nav.top;e.innerHTML="",DayPilot.Util.addClass(e,this.L("_main")),e.style.MozUserSelect="none",e.style.KhtmlUserSelect="none",e.style.position="relative",e.style.width=this.width?this.width:"100%",this.hideUntilInit&&(e.style.visibility="hidden"),this.visible||(e.style.display="none"),this.rtl&&(e.style.direction="rtl"),this.nav.scroll=document.createElement("div"),this.nav.scroll.style.height=this.Xa()+"px","BusinessHours"===this.heightSpec?this.nav.scroll.style.overflow="auto":this.nav.scroll.style.overflow="hidden",this.nav.scroll.style.position="relative";var t=this.Ya();this.nav.top.appendChild(t),this.nav.scroll.style.zoom=1;var n=this.Za();this.nav.scrollable=n.firstChild,this.nav.scroll.appendChild(n),e.appendChild(this.nav.scroll),this.nav.scrollLayer=document.createElement("div"),this.nav.scrollLayer.style.position="absolute",this.nav.scrollLayer.style.top="0px",this.nav.scrollLayer.style.left="0px",e.appendChild(this.nav.scrollLayer),this.nav.loading=document.createElement("div"),this.nav.loading.style.position="absolute",this.nav.loading.style.top="0px",this.nav.loading.style.left=this.hourWidth+5+"px",this.nav.loading.innerHTML=o.$a(o.loadingLabelText,o.loadingLabelHtml),this.nav.loading.style.display="none",e.appendChild(this.nav.loading)},this.la=function(){this.fasterDispose||DayPilot.pu(this.nav.hourTable),this.nav.scrollable.rows[0].cells[0].innerHTML="",this.nav.hourTable=this._a(),this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable)},this.Za=function(){var e=document.createElement("div");e.style.zoom=1,e.style.position="relative";var t=document.createElement("table");t.cellSpacing="0",t.cellPadding="0",t.border="0",t.style.border="0px none",t.style.width="100%",t.style.position="absolute";var n,a=t.insertRow(-1);n=a.insertCell(-1),n.valign="top",n.style.padding="0px",n.style.border="0px none",this.nav.hourTable=this._a(),n.appendChild(this.nav.hourTable),n=a.insertCell(-1),n.valign="top",n.width="100%",n.style.padding="0px",n.style.border="0px none";var i=document.createElement("div");return i.style.position="relative",n.appendChild(i),i.appendChild(this.ab()),i.appendChild(this.bb()),e.appendChild(t),this.nav.zoom=e,e},this.ab=function(){var e=document.createElement("table");return e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.main=e,this.nav.events=e,e},this.bb=function(){var e=document.createElement("table");e.style.top="0px",e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.position="absolute",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.events=e;for(var t=this.Ba,n=t.length,a=e.insertRow(-1),i=0;i<n;i++){var r=a.insertCell(-1);r.style.padding="0px",r.style.border="0px none",r.style.height="0px",r.style.overflow="visible",o.rtl||(r.style.textAlign="left");var s=document.createElement("div");s.style.marginRight=o.columnMarginRight+"px",s.style.marginLeft=o.columnMarginLeft+"px",s.style.position="relative",s.style.height="1px",s.style.marginTop="-1px";var l=document.createElement("div");r.selection=l,r.appendChild(s),r.appendChild(l)}return e},this._a=function(){var e=document.createElement("table");e.cellSpacing="0",e.cellPadding="0",e.border="0",e.style.border="0px none",e.style.width=this.hourWidth+"px",e.oncontextmenu=function(){return!1};for(var t=o.oa(),n=0;n<t;n++)this.cb(e,n);return e},this.cb=function(e,t){var n=60*o.cellHeight/s.fa(),a=e.insertRow(-1);a.style.height=n+"px";var i=a.insertCell(-1);i.valign="bottom",i.unselectable="on",i.style.cursor="default",i.style.padding="0px",i.style.border="0px none";var r=document.createElement("div");r.style.position="relative",r.className=this.L("_rowheader"),r.style.width=this.hourWidth+"px",r.style.height=n+"px",r.style.overflow="hidden",r.unselectable="on";var l=document.createElement("div");l.className=this.L("_rowheader_inner"),l.unselectable="on";var d=document.createElement("div");d.unselectable="on";var c=this.startDate.addHours(t).addHours(o.sa()),u=c.getHours(),h=u<12,f=s.timeFormat();"Clock12Hours"===f&&(u%=12,0===u&&(u=12)),d.innerHTML=u;var v=document.createElement("span");v.unselectable="on",v.className=this.L("_rowheader_minutes");var p;p="Clock12Hours"===f?h?"AM":"PM":"00",v.innerHTML=p,d.appendChild(v),l.appendChild(d),r.appendChild(l),i.appendChild(r)},this.Xa=function(){var e=s.fa(),t=60/e;switch(this.heightSpec){case"Full":return 24*t*this.cellHeight;case"BusinessHours":var n=this.qa();return n*this.cellHeight*t;case"BusinessHoursNoScroll":var n=this.qa();return n*this.cellHeight*t;default:throw"DayPilot.Calendar: Unexpected 'heightSpec' value."}},this.db=function(){var e=o.nav.corner?o.nav.corner.parentNode:null;if(e){e.innerHTML="";var t=this.eb();e.appendChild(t),o.nav.corner=t}},this.Ya=function(){var e=document.createElement("div");e.style.overflow="auto";var t=document.createElement("table");t.cellPadding="0",t.cellSpacing="0",t.border="0",t.style.width="100%",t.style.borderCollapse="separate",t.style.border="0px none";var n=t.insertRow(-1),a=n.insertCell(-1);a.style.padding="0px",a.style.border="0px none";var i=this.eb();a.appendChild(i),this.nav.corner=i,a=n.insertCell(-1),a.style.width="100%",a.valign="top",a.style.position="relative",a.style.padding="0px",a.style.border="0px none",this.nav.header=document.createElement("table"),this.nav.header.cellPadding="0",this.nav.header.cellSpacing="0",this.nav.header.border="0",this.nav.header.width="100%",this.nav.header.style.tableLayout="fixed",this.nav.header.oncontextmenu=function(){return!1};var r="hidden"!==this.nav.scroll.style.overflow;if(a.appendChild(this.nav.header),r){a=n.insertCell(-1),a.unselectable="on";var o=document.createElement("div");o.unselectable="on",o.style.position="relative",o.style.width="16px",o.style.height=this.headerHeight+"px",o.className=this.L("_cornerright");var s=document.createElement("div");s.className=this.L("_cornerright_inner"),o.appendChild(s),a.appendChild(o),this.nav.cornerRight=o}return e.appendChild(t),e},this.eb=function(){var e=document.createElement("div");e.style.position="relative",e.className=this.L("_corner"),e.style.width=this.hourWidth+"px",e.style.height=this.headerHeight+"px",e.oncontextmenu=function(){return!1};var t=document.createElement("div");return t.unselectable="on",t.className=this.L("_corner_inner"),e.appendChild(t),e},this._=function(){var e=this.nav.main;e.root=null,e.onmouseup=null;for(var t=0;t<e.rows.length;t++)for(var n=e.rows[t],a=0;a<n.cells.length;a++){var i=n.cells[a];o.fb(i)}this.fasterDispose||DayPilot.pu(e)},this.fb=function(e){e&&(!function(){var t=e,a=t.domArgs;if(t.domArgs=null,a&&"function"==typeof o.onBeforeCellDomRemove&&o.onBeforeCellDomRemove(a),a&&"function"==typeof o.onBeforeCellDomAdd){var i=a&&a.Pa;if(i){o.Ra.Qa&&n(a.element)&&(o.Ra.Sa=!0,o.Ra.Ta(i),o.Ra.Sa=!1)}}}(),e.root=null,e.onmousedown=null,e.onmousemove=null,e.onmouseout=null,e.onmouseup=null)},this.ka=function(){var e=s.fa(),a=this.nav.main,i=60*e*1e3,r=this.ra(),l=o.Ba;for(a&&this._();a&&a.rows&&a.rows.length>0;)this.fasterDispose||DayPilot.pu(a.rows[0]),a.deleteRow(0);this.tableCreated=!0;for(var d=this.nav.events;d&&d.rows&&d.rows.length>0;)this.fasterDispose||DayPilot.pu(d.rows[0]),d.deleteRow(0);for(var c=l.length,u=d.insertRow(-1),h=0;h<c;h++){var f=u.insertCell(-1);f.style.padding="0px",f.style.border="0px none",f.style.height="0px",f.style.overflow="visible",o.rtl||(f.style.textAlign="left");var v=document.createElement("div");v.style.marginRight=o.columnMarginRight+"px",v.style.marginLeft=o.columnMarginLeft+"px",v.style.position="relative",v.style.height="1px",v.style.marginTop="-1px";var p=document.createElement("div");p.style.position="relative",f.selection=p,f.appendChild(v),f.appendChild(p)}for(var m=0;m<r;m++){var g=a.insertRow(-1);g.style.MozUserSelect="none",g.style.KhtmlUserSelect="none";for(var y=function(e){var t=b.Ba[e],a=g.insertCell(-1);a.start=t.start.addTime(m*i),a.end=a.start.addTime(i),a.resource=t.id,a.onmousedown=b.Ca,a.onmouseup=function(){return!1},a.onclick=function(){return!1},a.root=b,a.style.padding="0px",a.style.border="0px none",a.style.verticalAlign="top",a.style.height=o.cellHeight+"px",a.style.overflow="hidden",a.unselectable="on";var r=document.createElement("div");r.unselectable="on",r.style.height=o.cellHeight+"px",r.style.position="relative",r.className=b.L("_cell");var s=b.gb(a.start,a.end),l={"business":s,"text":null,"html":null,"cssClass":null,"backColor":null,"backImage":null,"backRepeat":null,"fontColor":null},d={"start":a.start,"end":a.end,"resource":a.resource,"properties":l,"x":e,"y":m};!function(){if("function"==typeof o.onBeforeCellRender){var e={};e.cell=d,o.onBeforeCellRender(e)}}(),l.business&&DayPilot.Util.addClass(r,o.L("_cell_business")),l.cssClass&&DayPilot.Util.addClass(r,l.cssClass);var c=document.createElement("div");c.setAttribute("unselectable","on"),c.className=b.L("_cell_inner");var u=DayPilot.Util.escapeTextHtml(l.text,l.html);u&&(c.innerHTML=u),l.backColor&&(c.style.backgroundColor=l.backColor),l.backImage&&(c.style.backgroundImage="url("+l.backImage+")"),l.backRepeat&&(c.style.backgroundRepeat=l.backRepeat),l.fontColor&&(c.style.color=l.fontColor),r.appendChild(c),function(){if("function"==typeof o.onBeforeCellDomAdd||"function"==typeof o.onBeforeCellDomRemove){var e={};if(e.control=o,e.cell=d,e.element=null,a.domArgs=e,"function"==typeof o.onBeforeCellDomAdd&&o.onBeforeCellDomAdd(e),e.element){var t=c;if(t){e.Pa=t;if(n(e.element)){if(!o.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");o.Ra.Sa=!0,o.Ra.Va(e.element,t),o.Ra.Sa=!1}else t.appendChild(e.element)}}}}(),a.appendChild(r)},b=this,h=0;h<c;h++)y(h)}a.root=this,o.nav.scrollable.onmousemove=function(e){var n=o.nav.scrollable;o.coords=DayPilot.mo3(n,e);var a=DayPilot.mc(e);if(t.resizing){t.resizingShadow||(t.resizingShadow=o.ca(t.resizing,!1,o.shadow));var i=o.cellHeight,r=0,s=a.y-t.originalMouse.y;if("bottom"===t.resizing.dpBorder){var l=t.originalHeight+s;o.snapToGrid&&(l=Math.floor((t.originalHeight+t.originalTop+s+i/2)/i)*i-t.originalTop+r),l<i&&(l=i);var d=o.nav.main.clientHeight;t.originalTop+l>d&&(l=d-t.originalTop),t.resizingShadow.style.height=l+"px"}else if("top"===t.resizing.dpBorder){var c=t.originalTop+s;o.snapToGrid&&(c=Math.floor((t.originalTop+s-r+i/2)/i)*i+r),c<r&&(c=r),c>t.originalTop+t.originalHeight-i&&(c=t.originalTop+t.originalHeight-i);var l=t.originalHeight-(c-t.originalTop);l<i?l=i:t.resizingShadow.style.top=c+"px",t.resizingShadow.style.height=l+"px"}}else if(t.moving){if(!o.coords)return;if(!t.movingShadow){var u=3,h=DayPilot.mc(e),f=Math.abs(h.x-t.originalMouse.x)+Math.abs(h.y-t.originalMouse.y);if(f<=u)return;t.movingShadow=o.ca(t.moving,!0,o.shadow),t.movingShadow.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"}var i=o.cellHeight,r=0,v=t.moveOffsetY;v||(v=i/2);var c=o.coords.y-v;o.snapToGrid&&(c=Math.floor((o.coords.y-v-r+i/2)/i)*i+r),c<r&&(c=r);var p=o.nav.events,d=o.nav.main.clientHeight+r,m=parseInt(t.movingShadow.style.height);c+m>d&&(c=d-m),DayPilot.Util.addClass(t.moving,o.L("_event_moving_source")),t.movingShadow.parentNode.style.display="none",t.movingShadow.style.top=c+"px",t.movingShadow.parentNode.style.display="";var g=p.clientWidth/p.rows[0].cells.length,y=Math.floor((o.coords.x-o.hourWidth)/g);o.rtl&&(y=o.Ba.length-y-1),y<0&&(y=0),y<p.rows[0].cells.length&&y>=0&&t.movingShadow.column!==y&&(t.movingShadow.column=y,t.moveShadow(p.rows[0].cells[y]))}else DayPilot.Global.selecting&&(o.Fa(),o.Ga())},o.nav.scrollable.style.display=""},this.gb=function(e){return this.businessBeginsHour<this.businessEndsHour?!(e.getHours()<this.businessBeginsHour||e.getHours()>=this.businessEndsHour||6===e.getDayOfWeek()||0===e.getDayOfWeek()):e.getHours()>=this.businessBeginsHour||e.getHours()<this.businessEndsHour},this.aa=function(){var e=this.nav.header;if(e&&e.rows)for(var t=0;t<e.rows.length;t++)for(var n=e.rows[t],a=0;a<n.cells.length;a++){var i=n.cells[a];i.onclick=null,i.onmousemove=null,i.onmouseout=null}this.fasterDispose||DayPilot.pu(e)},this.hb=function(e){function t(t){var i=a[t],r=e?n.insertCell(-1):n.cells[t];r.data=i,r.style.overflow="hidden",r.style.padding="0px",r.style.border="0px none",r.style.height=o.headerHeight+"px",r.onclick=o.ib;var s,l=e?document.createElement("div"):r.firstChild;e?(l.unselectable="on",l.style.MozUserSelect="none",l.style.cursor="default",l.style.position="relative",l.className=o.L("_colheader"),l.style.height=o.headerHeight+"px",o.headerTextWrappingEnabled||(l.style.whiteSpace="nowrap"),s=document.createElement("div"),s.className=o.L("_colheader_inner"),s.unselectable="on",l.appendChild(s),r.appendChild(l)):s=l.firstChild;var d={};d.header={},d.header.cssClass=null,d.header.verticalAlignment="center",d.header.horizontalAlignment="center",d.column=o.jb(i,o),"function"==typeof o.onBeforeHeaderRender&&(DayPilot.Util.copyProps(i,d.header,["id","start","name","html","backColor","toolTip","areas"]),o.onBeforeHeaderRender(d),DayPilot.Util.copyProps(d.header,i,["html","backColor","toolTip","areas","cssClass","verticalAlignment","horizontalAlignment"])),i.toolTip&&(s.title=i.toolTip),i.cssClass&&DayPilot.Util.addClass(l,i.cssClass),i.backColor&&(s.style.background=i.backColor),i.areas&&DayPilot.Areas.attach(l,i);var c=i.verticalAlignment;if(c)switch(s.style.display="flex",c){case"center":s.style.alignItems="center";break;case"top":s.style.alignItems="flex-start";break;case"bottom":s.style.alignItems="flex-end"}var u=i.horizontalAlignment;if(u)switch(u){case"center":s.style.justifyContent="center";break;case"left":s.style.justifyContent="flex-start";break;case"right":s.style.justifyContent="flex-end"}l.firstChild.innerHTML=o.$a(i.name,i.html)}for(var n=e?this.nav.header.insertRow(-1):this.nav.header.rows[0],a=this.Ba,i=a.length,r=0;r<i;r++)t(r)},this.ib=function(e){if("Disabled"!==o.headerClickHandling){var t=this.data,n=o.jb(t),a={};a.header={},a.header.id=t.id,a.header.name=t.name,a.header.start=t.start,a.column=n,a.originalEvent=e,a.shift=e.shiftKey,a.ctrl=e.ctrlKey,a.meta=e.metaKey,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onHeaderClick&&(o.onHeaderClick(a),a.preventDefault.value)||"function"==typeof o.onHeaderClicked&&o.onHeaderClicked(a)}},this.jb=function(e){return new DayPilot.CalendarColumn(e,o)},this.kb=function(){return this.width&&this.width.indexOf("px")!==-1?"Pixel":"Percentage"},this.ja=function(){for(var e=this.nav.header,t=!0;this.headerCreated&&e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.headerCreated=!0;this.hb(t)},this.loadingStart=function(){this.loadingLabelVisible&&(this.nav.loading.innerHTML=this.loadingLabelText,this.nav.loading.style.top=this.headerHeight+5+"px",this.nav.loading.style.display="")},this.commandCallBack=function(e,t){var n={};n.command=e,this.V("Command",t,n)},this.loadingStop=function(){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.nav.loading.style.display="none"},this.lb=function(){var e=this.nav.scroll;e.root=this,o.mb(),e.onscroll||(e.onscroll=function(){o.nb()})},this.callbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.ob=function(){var e=DayPilot.sw(this.nav.scroll),t=this.nav.cornerRight;t&&(t.style.width=e+"px")},this.pb=function(){t.globalHandlers||(t.globalHandlers=!0,DayPilot.re(document,"mouseup",t.gMouseUp))},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";
|
|
13
|
-
t=e}o.events.list||(o.events.list=[]),o.events.list.push(t),o.qb({"eventsOnly":!0}),o.wa.notify()},this.events.find=function(e){if(!o.events.list)return null;if("function"==typeof e){for(var t=e,n=0;n<o.events.list.length;n++){var a=new DayPilot.Event(o.events.list[n],o);if(t(a))return a}return null}for(var n=0;n<o.events.list.length;n++){var i=o.events.list[n];if(i.id===e)return new DayPilot.Event(i,o)}return null},this.events.forRange=function(e,t){return e=new DayPilot.Date(e),t=new DayPilot.Date(t),(o.events.list||[]).filter(function(n){return a(e,t,new DayPilot.Date(n.start),new DayPilot.Date(n.end))}).map(function(e){return new DayPilot.Event(e,o)})},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=o.events.find(e.id);if(t){var n=DayPilot.indexOf(o.events.list,t.data);o.events.list.splice(n,1,e)}}o.qb({"eventsOnly":!0}),o.wa.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var n=o.events.find(e.id);n&&(t=n.data)}else if("string"==typeof e||"number"==typeof e){var n=o.events.find(e);n&&(t=n.data)}var a=DayPilot.indexOf(o.events.list,t);o.events.list.splice(a,1),o.qb({"eventsOnly":!0}),o.wa.notify()},this.events.load=function(e,t,n){var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},i=function(e){var n,i=e.request;try{n=JSON.parse(i.responseText)}catch(e){var r={};return r.exception=e,void a(r)}if(DayPilot.isArray(n)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=n,"function"==typeof t&&t(s),s.preventDefault.value)return;o.events.list=n,o.La&&o.qb({"eventsOnly":!0})}};if(o.eventsLoadMethod&&"POST"===o.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":o.visibleStart().toString(),"end":o.visibleEnd().toString()},"url":e,"success":i,"error":a});else{var r=e,s="start="+o.visibleStart().toString()+"&end="+o.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":r,"success":i,"error":a})}},this.rb=function(){var e=o.L("_main");if(o.cssClass&&(e+=" "+o.cssClass),o.rtl&&(e+=" "+o.L("_direction_rtl")),o.nav.top.className!==e){o.nav.top.className=e;var t=o.nav.corner;t.className=o.L("_corner"),t.firstChild.className=o.L("_corner_inner");var n=o.nav.cornerRight;n&&(n.className=o.L("_cornerright"),n.firstChild.className=o.L("_cornerright_inner"))}},this.update=function(e){if(o.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Calendar instance that has been disposed.");o.sb(e),o.qb()},this.qb=function(e){if(this.La){e=e||{};var t=!e.eventsOnly;o.tb(),o.Z(),o.nav.top.style.cursor="auto",t&&(o.ga(),o.ja(),o.ka(),o.la(),o.ma(),o.db(),o.ob(),o.rb(),o.mb()),o.ha(),o.ia(),o.na(),o.clearSelection(),this.visible?this.show():this.hide()}},this.ub=null,this.sb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?o.events.list=e.list:o.events.list=e}},"columns":{"preInit":function(){o.columns.list=this.data}}};this.ub=t;for(var n in e)if(t[n]){var a=t[n];a.data=e[n],a.preInit&&a.preInit()}else o[n]=e[n]}},this.vb=function(){var e=this.ub;for(var t in e){var n=e[t];n.postInit&&n.postInit()}},this.wb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Calendar() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Calendar: The placeholder element not found: '"+e+"'."}},this.xb={},this.xb.events=[],this.yb=function(e){var t=this.xb.events,n=this.events.list[e],a={};for(var i in n)a[i]=n[i];if(a.start=new DayPilot.Date(n.start),a.end=new DayPilot.Date(n.end),"function"==typeof this.onBeforeEventRender){var r={};r.control=o,r.data=a,this.onBeforeEventRender(r)}t[e]=a},this.ha=function(){var e=this.events.list;if(o.xb.events=[],e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: "+typeof e);var t=e.length,n=864e5;this.cache.pixels={};var a=[];this.scrollLabels=[],this.minStart=1e4,this.maxEnd=0;for(var i=0;i<t;i++){var r=e[i],s=r;if("object"!=typeof s)throw new DayPilot.Exception("Event data item must be an object");if(!s.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!s.end)throw new DayPilot.Exception("Event data item must specify 'end' property");if(s instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.")}if("function"==typeof this.onBeforeEventRender)for(var i=0;i<t;i++)this.yb(i);for(var i=0;i<this.Ba.length;i++){var l={};l.minEnd=1e6,l.maxStart=-1,this.scrollLabels.push(l);var d=this.Ba[i];d.events=[],d.lines=[],d.blocks=[];for(var c=new DayPilot.Date(d.start),u=c.getTime(),h=c.addTime(n),f=h.getTime(),v=0;v<t;v++)if(!a[v]){var r=e[v],p=new DayPilot.Date(r.start),m=new DayPilot.Date(r.end),g=p.getTime(),y=m.getTime();if(!(y<g)){var b=!(y<=u||g>=f);if("Resources"===o.viewType&&(b=b&&d.id===r.resource),b){var w=new DayPilot.Event(r,o);w.part.dayIndex=i,w.part.start=u<g?p:c,w.part.end=f>y?m:h;var x=this.getPixels(w.part.start,d.start),_=this.getPixels(w.part.end,d.start),C=x.top,k=_.top;if(C===k&&(x.cut||_.cut))continue;var D=_.boxBottom,S="Always"===o.useEventBoxes;S?(w.part.top=Math.floor(C/this.cellHeight)*this.cellHeight+1,w.part.height=Math.max(Math.ceil(D/this.cellHeight)*this.cellHeight-w.part.top,this.cellHeight-1)+1):(w.part.top=C+1,w.part.height=k-C),w.part.barTop=Math.max(C-w.part.top-1,0),w.part.barHeight=Math.max(k-C-2,1);var M=w.part.top,T=w.part.top+w.part.height;M>l.maxStart&&(l.maxStart=M),T<l.minEnd&&(l.minEnd=T),M<this.minStart&&(this.minStart=M),T>this.maxEnd&&(this.maxEnd=T),d.events.push(w),"function"==typeof this.onBeforeEventRender&&(w.cache=this.xb.events[v]),w.part.start.getTime()===g&&w.part.end.getTime()===y&&(a[v]=!0)}}}}for(var i=0;i<this.Ba.length;i++){var d=this.Ba[i];d.events.sort(this.zb);for(var v=0;v<d.events.length;v++){var r=d.events[v];d.putIntoBlock(r)}for(var v=0;v<d.blocks.length;v++){var A=d.blocks[v];A.events.sort(this.zb);for(var E=0;E<A.events.length;E++){var r=A.events[E];A.putIntoLine(r)}}}}},this.zb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var n=e.start().getTime()-t.start().getTime();return 0!==n?n:t.end().getTime()-e.end().getTime()},this.debug=function(e){this.debuggingEnabled&&(o.debugMessages||(o.debugMessages=[]),o.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.getPixels=function(e,t){t||(t=this.startDate);var n=t.getTime(),a=e.getTime(),i=s.fa(),r=this.cache.pixels[a+"_"+n];if(r)return r;n=t.getTime();var o=60*i*1e3,l=a-n,d=l%o,c=l-d,u=c+o;0===d&&(u=c);var h={};return h.cut=!1,h.top=this.Ab(l),h.boxTop=this.Ab(c),h.boxBottom=this.Ab(u),this.cache.pixels[a+"_"+n]=h,h},this.Ab=function(e){return Math.floor(this.cellHeight*e/(6e4*s.fa()))},this.tb=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart()},this.ia=function(){this.nav.corner&&(this.nav.corner.style.height=this.headerHeight+"px")},this.ma=function(){var e=this.Xa();this.nav.scroll&&e>0&&(this.nav.scroll.style.height=e+"px")},this.wa={},this.wa.scope=null,this.wa.notify=function(){o.wa.scope&&o.wa.scope["$apply"]()},this.wa.apply=function(e){e()},this.nb=function(){if(o.nav.scroll&&o.Bb()){var e=o.nav.scroll.scrollTop,t=s.fa(),n=60/t,a=e/(n*o.cellHeight);o.Cb.scrollHour=a}},this.mb=function(){var e=0,t=60/s.fa();e="number"==typeof o.Cb.scrollHour?t*o.cellHeight*o.Cb.scrollHour:"Auto"===o.initScrollPos?"BusinessHours"===this.heightSpec?t*this.cellHeight*this.businessBeginsHour:0:this.initScrollPos;var n=o.nav.top;"none"===n.style.display?(n.style.display="",o.nav.scroll.scrollTop=e,n.style.display="none"):o.nav.scroll.scrollTop=e},this.getScrollY=function(){return o.nav.scroll.scrollTop},this.setScrollY=function(e){o.nav.scroll.scrollTop=e,o.nb()},this.Db=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof o.events.list||!o.events.list)},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){o.visible=!0,o.nav.top.style.display="",this.ob()},this.hide=function(){o.visible=!1,o.nav.top.style.display="none"},this.Eb=function(){this.tb(),this.ga(),this.Wa(),this.ja(),this.ka(),this.ob(),this.lb(),this.pb(),t.register(this),this.Fb(),this.V("Init")},this.Cb={},this.Gb=function(){this.Cb.themes=[],this.Cb.themes.push(this.theme||this.cssClassPrefix)},this.Hb=function(){for(var e=this.Cb.themes,t=0;t<e.length;t++){var n=e[t];DayPilot.Util.removeClass(this.nav.top,n+"_main")}this.Cb.themes=[]},this.Ib=function(){if(this.afterRender(null,!1),"function"==typeof this.onAfterRender){var e={};e.isCallBack=!1,this.onAfterRender(e)}},this.Jb=function(){if("function"==typeof this.onInit&&!this.Kb){this.Kb=!0;var e={};this.onInit(e)}},this.Bb=function(){var e=o.nav.top;return!!e&&(e.offsetWidth>0&&e.offsetHeight>0)},this.Fb=function(){var e=o.Bb;e()||(o.Y=setInterval(function(){e()&&(o.lb(),o.ob(),clearInterval(o.Y))},100))},this.$a=function(e,t){return o.R.da()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ra={},this.Ra.Qa=null,this.Ra.Lb=function(e,t,n){var a=o.Ra.Qa;if("function"==typeof a.createVNode&&"function"==typeof a.render){var i=a.createVNode(e,n);a.render(i,t)}},this.Ra.Va=function(e,t){var n=o.Ra.Qa;if("function"==typeof n.render){var a=e;DayPilot.isArray(e)&&(a=n.h("div",null,e)),n.render(a,t)}},this.Ra.Ta=function(e){var t=o.Ra.Qa;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=o.sb,this.internal.xssTextHtml=o.$a,this.internal.enableVue=function(e){o.Ra.Qa=e},this.internal.vueRef=function(){return o.Ra.Qa},this.internal.vueRendering=function(){return o.Ra.Sa},this.init=function(){this.wb();var e=this.Db();return this.Gb(),e?void this.Eb():(this.tb(),this.ga(),this.ha(),this.Wa(),this.ja(),this.ka(),this.u(),this.ob(),this.lb(),this.pb(),t.register(this),this.events&&(this.ia(),this.na()),this.Ib(),this.Jb(),this.Fb(),this.La=!0,this)},this.Init=this.init,this.sb(i)},DayPilot.CalendarColumn=function(e,t){var n=this;n.id=e.id,n.name=e.name,n.data=e.data,n.start=new DayPilot.Date(e.start),n.calendar=t,n.toJSON=function(){var e={};return e.id=this.id,this.start&&(e.start=this.start.toString()),e.name=this.name,e}},DayPilot.Calendar=t.Calendar,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotCalendar=function(e){var t=null,n=this.each(function(){if(!this.daypilot){var n=new DayPilot.Calendar(this.id);this.daypilot=n;for(var a in e)n[a]=e[a];n.init(),t||(t=n)}});return 1===this.length?t:n}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotCalendar",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,n,a){var i=new DayPilot.Calendar(n[0]);i.wa.scope=t,i.init();var r=a["id"];r&&(t[r]=i);var o=a["publishAs"];if(o){(0,e(o).assign)(t,i)}for(var s in a)0===s.indexOf("on")&&!function(n){i[n]=function(i){var r=e(a[n]);t["$apply"](function(){r(t,{"args":i})})}}(s);var l=t["$watch"],d=a["config"]||a["daypilotConfig"],c=a["events"]||a["daypilotEvents"];l.call(t,d,function(e){for(var t in e)i[t]=e[t];i.update(),i.Jb()},!0),l.call(t,c,function(e){i.events.list=e,i.update()},!0)}}}])}()}}(DayPilot),function(DayPilot){"undefined"==typeof DayPilot.DatePicker&&(DayPilot.DatePicker=function(e){this.v="${v}";var t="navigator_"+(new Date).getTime(),n=this;this.onShow=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.prepare=function(){if(this.locale="en-us",this.target=null,this.targetAlignment="left",this.resetTarget=!0,this.pattern=this.R.locale().datePattern,this.theme="navigator_default",this.patterns=[],this.zIndex=null,this.showToday=!0,this.todayText="Today",this.weekStarts="Auto",e)for(var t in e)this[t]=e[t]},this.init=function(){this.date=new DayPilot.Date(this.date);var e=this.Mb();this.resetTarget&&!e?this.Nb(this.date):!this.resetTarget&&e&&(n.date=e);var t=this.D();return t&&t.addEventListener("input",function(){n.date=n.Mb(),n.date&&n.navigator.select(n.date,{dontNotify:!0})}),this},this.close=function(){document.removeEventListener("mousedown",n.close),document.removeEventListener("wheel",n.close),window.removeEventListener("resize",n.close),n.Bb&&(n.Bb=!1,n.navigator&&n.navigator.dispose(),n.div.innerHTML="",n.div&&n.div.parentNode===document.body&&document.body.removeChild(n.div))},this.Ob=function(e){this.date=new DayPilot.Date(e),this.Nb(this.date)},this.select=function(e){var t={};t.date=new DayPilot.Date(e),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.onTimeRangeSelect(t),t.preventDefault.value)||(this.Ob(e),"function"==typeof n.onTimeRangeSelected&&n.onTimeRangeSelected(t))},this.Mb=function(){var e=this.D();if(!e)return this.date;var t=null;if(t="INPUT"===e.tagName?e.value:e.innerText,!t)return null;for(var a=DayPilot.Date.parse(t,n.pattern),i=0;i<n.patterns.length;i++){if(a)return a;a=DayPilot.Date.parse(t,n.patterns[i])}return a},this.Nb=function(e){var t=this.D();if(t){var a=e.toString(n.pattern,n.locale);"INPUT"===t.tagName?t.value=a:t.innerHTML=a}},this.R={},this.R.locale=function(){return DayPilot.Locale.find(n.locale)},this.D=function(){var e=this.target;return e&&e.nodeType&&1===e.nodeType?e:document.getElementById(e)},Object.defineProperty(this,"visible",{get:function(){return n.Bb}}),this.show=function(){if(!this.Bb){document.addEventListener("mousedown",n.close),document.addEventListener("wheel",n.close),window.addEventListener("resize",n.close);var e=this.D(),a=new DayPilot.Navigator(t);a.api=2,a.cssOnly=!0,a.theme=n.theme,a.weekStarts="Auto",a.locale=n.locale,a.showToday=n.showToday,a.todayText=n.todayText,a.weekStarts=n.weekStarts,a.onTodayClick=function(e){a.onTimeRangeSelected({start:DayPilot.Date.today()}),e.preventDefault()},a.onTimeRangeSelected=function(e){n.date=e.start;var t=e.start.addTime(a.Pb),i=t.toString(n.pattern,n.locale),r={};r.start=t,r.date=t,r.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.onTimeRangeSelect(r),r.preventDefault.value)||(n.Nb(i),n.close(),"function"==typeof n.onTimeRangeSelected&&n.onTimeRangeSelected(r))},this.navigator=a;var i={x:0,y:0,w:0,h:0};e&&(i=DayPilot.abs(e));var r=i.h,o=n.targetAlignment,s=document.createElement("div");s.style.position="absolute","left"===o&&(s.style.left=i.x+"px"),s.style.top=i.y+r+"px",n.zIndex&&(s.style.zIndex=n.zIndex);var l=document.createElement("div");l.id=t,s.appendChild(l),s.addEventListener("mousedown",function(e){e.stopPropagation()}),document.body.appendChild(s),this.div=s;var d=n.Mb()||n.date;if(a.startDate=d,a.Pb=d.getTimePart(),a.selectionDay=d.getDatePart(),a.init(),"right"===o){var c=i.x+i.w-a.nav.top.offsetWidth;s.style.left=c+"px"}if(this.Bb=!0,this.onShow){var u={};this.onShow(u)}}},this.prepare(),this.init()})}(DayPilot),function(DayPilot){if("undefined"==typeof DayPilot.Menu||!DayPilot.Menu.def){var e=function(){},t={};t.mouse=null,t.menu=null,t.handlersRegistered=!1,t.hideTimeout=null,t.waitingSubmenu=null,DayPilot.Menu=function(n){var a=this,i=null;this.v="${v}",this.zIndex=120,this.cssClassPrefix="menu_default",this.cssOnly=!0,this.menuTitle=null,this.showMenuTitle=!1,this.hideOnMouseOut=!1,this.hideAfter=200,this.theme=null,this.onShow=null;var r=DayPilot.isArray(n)?null:n;if(this.Qb=function(){},n&&DayPilot.isArray(n)&&(this.items=n),this.toJSON=function(){return null},this.show=function(n,r){r=r||{};var o=null;if(n?"string"==typeof n.id||"number"==typeof n.id?o=n.id:"function"==typeof n.id?o=n.id():"function"==typeof n.value&&(o=n.value()):o=null,"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),r.submenu||t.menuClean(),this.Qb.submenu=null,null!==t.mouse){a.cssOnly||(a.cssOnly=!0);var s=null;if(n&&n.isRow&&n.$.row.task?(s=new DayPilot.Task(n.$.row.task,n.calendar),s.menuType="resource"):s=n&&n.isEvent&&n.data.task?new DayPilot.Task(n,n.calendar):n,"function"==typeof a.onShow){var l={};if(l.source=s,l.menu=a,l.preventDefault=function(){l.preventDefault.value=!0},a.onShow(l),l.preventDefault.value)return}var d=document.createElement("div");if(d.style.position="absolute",d.style.top="0px",d.style.left="0px",d.style.display="none",d.style.overflow="hidden",d.style.zIndex=this.zIndex+1,d.className=this.Rb("main"),d.onclick=function(e){e.cancelBubble=!0,this.parentNode.removeChild(this)},this.hideOnMouseOut&&(d.onmousemove=function(){clearTimeout(t.hideTimeout)},d.onmouseleave=function(){a.delayedHide({"hideParent":!0})}),!this.items||0===this.items.length)throw"No menu items defined.";if(this.showMenuTitle){var c=document.createElement("div");c.innerHTML=this.menuTitle,c.className=this.Rb("title"),d.appendChild(c)}for(var u=0;u<this.items.length;u++){var h=this.items[u],f=document.createElement("div");if(DayPilot.Util.addClass(f,this.Rb("item")),h.items&&(DayPilot.Util.addClass(f,this.Rb("item_haschildren")),DayPilot.Util.addClass(d,this.Rb("withchildren"))),"undefined"!=typeof h&&!h.hidden){if("-"===h.text){var v=document.createElement("div");v.addEventListener("click",function(e){e.stopPropagation()}),f.appendChild(v)}else{var p=document.createElement("a");if(p.style.position="relative",p.style.display="block",h.cssClass&&DayPilot.Util.addClass(p,h.cssClass),h.disabled)DayPilot.Util.addClass(p,a.Rb("item_disabled"));else{if(h.onclick||h.onClick){p.item=h,p.onclick=function(e,t){return function(n){if("function"==typeof e.onClick){var a={};if(a.item=e,a.source=t.source,a.originalEvent=n,a.preventDefault=function(){a.preventDefault.value=!0},e.onClick(a),a.preventDefault.value)return void n.stopPropagation()}e.onclick&&e.onclick.call(t,n)}}(h,p);var m=function(e,t){return function(e){e.stopPropagation(),e.preventDefault(),t.source.calendar&&t.source.calendar.internal.touch&&(t.source.calendar.internal.touch.active=!0)}},g=function(e,n){return function(a){a.stopPropagation(),a.preventDefault();var i=function(){window.setTimeout(function(){n.source.calendar&&n.source.calendar.internal.touch&&(n.source.calendar.internal.touch.active=!1)},500)};if("function"==typeof e.onClick){var r={};if(r.item=e,r.source=n.source,r.originalEvent=a,r.preventDefault=function(){r.preventDefault.value=!0},e.onClick(r),r.preventDefault.value)return void i()}e.onclick&&e.onclick.call(n,a),t.menuClean(),i()}};DayPilot.reNonPassive(p,"touchstart",m(h,p)),DayPilot.reNonPassive(p,"touchend",g(h,p))}if(h.items&&!h.disabled){var y=function(e,t){return function(n){n.preventDefault(),n.stopPropagation(),a.Sb(e,t)}};p.ontouchend=y(h,p)}if(h.onclick)e();else if(h.href)p.href=h.href.replace(/\x7B0\x7D/gim,o),h.target&&p.setAttribute("target",h.target);else if(h.command){var y=function(e,t){return function(n){var a=t.source,i=e;i.action=i.action?i.action:"CallBack";var r=a.calendar||a.root;if(n.preventDefault(),a instanceof DayPilot.Link)r.internal.linkMenuClick(i.command,a,i.action);else if(a instanceof DayPilot.Selection)r.internal.timeRangeMenuClick(i.command,a,i.action);else if(a instanceof DayPilot.Event)r.internal.eventMenuClick(i.command,a,i.action);else if(a instanceof DayPilot.Task)"resource"===a.menuType?r.internal.resourceHeaderMenuClick(i.command,t.menuSource,i.action):r.internal.eventMenuClick(i.command,t.menuSource,i.action);else switch(a.menuType){case"resource":r.internal.resourceHeaderMenuClick(i.command,a,i.action);break;case"selection":r.internal.timeRangeMenuClick(i.command,a,i.action);break;default:r.internal.eventMenuClick(i.command,a,i.action)}}};p.onclick=y(h,p),p.ontouchend=y(h,p)}}h.items&&p.addEventListener("click",function(e){e.stopPropagation()}),p.source=s,p.menuSource=n;var b=document.createElement("span");if(b.className=a.Rb("item_text"),b.innerHTML=DayPilot.Util.escapeTextHtml(h.text,h.html),p.appendChild(b),h.image){var w=document.createElement("img");w.src=h.image,w.style.position="absolute",w.style.top="0px",w.style.left="0px",p.appendChild(w)}if(h.icon){var x=document.createElement("span");x.className=a.Rb("item_icon");var _=document.createElement("i");_.className=h.icon,x.appendChild(_),p.appendChild(x)}if(h.symbol){var C="http://www.w3.org/2000/svg",k=document.createElementNS(C,"svg");k.setAttribute("width","100%"),k.setAttribute("height","100%");var D=document.createElementNS(C,"use");D.setAttribute("href",h.symbol),k.appendChild(D);var S=document.createElement("span");S.className=a.Rb("item_symbol"),S.style.position="absolute",S.style.top="0px",S.style.left="0px",S.appendChild(k),p.appendChild(S)}var M=function(e,n){return function(){var i=e,r=t.waitingSubmenu;if(r){if(r.parent===i)return;clearTimeout(r.timeout),t.waitingSubmenu=null}e.disabled||(t.waitingSubmenu={},t.waitingSubmenu.parent=i,t.waitingSubmenu.timeout=setTimeout(function(){t.waitingSubmenu=null,a.Sb(i,n)},300))}};p.onmouseover=M(h,p),f.appendChild(p)}d.appendChild(f)}}var T=function(){window.setTimeout(function(){t.menuClean(),DayPilot.MenuBar.deactivate()},100)};d.onclick=T,d.ontouchend=T,d.onmousedown=function(e){e.stopPropagation()},d.oncontextmenu=function(){return!1},document.body.appendChild(d),a.Qb.visible=!0,a.Qb.source=n,d.style.display="";var A=d.offsetHeight,E=d.offsetWidth;d.style.display="none";var H=document.documentElement.clientHeight,R=window.innerWidth,N="number"==typeof r.windowMargin?r.windowMargin:5;if(function(){var e=r.initiator;if(e){var t=e.div,n=e.e,a=e.area,o=a.visibility||a.v||"Visible",s=e.a;if("Visible"!==o&&(s=DayPilot.Areas.createArea(t,n,a),t.appendChild(s),i=s),s){var l=DayPilot.abs(s);r.x=l.x,r.y=l.y+l.h+2}}}(),function(){var e="number"==typeof r.x?r.x:t.mouse.x+1,n="number"==typeof r.y?r.y:t.mouse.y+1,i=document.body.scrollTop||document.documentElement.scrollTop,o=document.body.scrollLeft||document.documentElement.scrollLeft,s=0,l=0;if(n-i>H-A&&0!==H){s=n-(n-i-(H-A)+N)}else s=n;if(a.Qb.y=s,d.style.top=s+"px","right"===r.align&&(e-=E),e-o>R-E&&0!==R){l=e-(e-o-(R-E)+N)}else l=e;a.Qb.x=l,d.style.left=l+"px"}(),r.parentLink){var I=r.parentLink,L=parseInt(new DayPilot.StyleReader(d).get("border-top-width")),P=DayPilot.abs(r.parentLink.parentNode),B=P.x+I.offsetWidth,z=P.y-L;B+E>R&&(B=Math.max(0,P.x-E));var U=document.body.scrollTop+document.documentElement.scrollTop;z+A-U>H&&(z=Math.max(0,H-A+U)),d.style.left=B+"px",d.style.top=z+"px"}d.style.display="",this.addShadow(d),this.Qb.div=d,r.submenu||(DayPilot.Menu.active=this)}},this.update=function(){if(a.Qb.visible){var e=a.Qb.source;a.hide(),a.show(e,{"x":a.Qb.x,"y":a.Qb.y})}},this.Sb=function(e,t){var n=e,i=t.source;if((!a.Qb.submenu||a.Qb.submenu.item!==e)&&(a.Qb.submenu&&a.Qb.submenu.item!==e&&(DayPilot.Util.removeClass(a.Qb.submenu.link.parentNode,a.Rb("item_haschildren_active")),a.Qb.submenu.menu.hide(),a.Qb.submenu=null),e.items)){var r=a.cloneOptions();r.items=e.items,a.Qb.submenu={},a.Qb.submenu.menu=new DayPilot.Menu(r),a.Qb.submenu.menu.Tb=a,a.Qb.submenu.menu.show(i,{"submenu":!0,"parentLink":t,"parentItem":n}),a.Qb.submenu.item=e,a.Qb.submenu.link=t,DayPilot.Util.addClass(t.parentNode,a.Rb("item_haschildren_active"))}},this.Rb=function(e){var t=this.theme||this.cssClassPrefix,n=this.cssOnly?"_":"";return t?t+n+e:""},this.cloneOptions=function(){return DayPilot.Util.copyProps(r,{},["cssClassPrefix","theme","hideAfter","hideOnMouseOut","zIndex"])},this.hide=function(e){e=e||{},this.Qb.submenu&&this.Qb.submenu.menu.hide();var n=t.waitingSubmenu;if(n&&(t.waitingSubmenu=null,clearTimeout(n.timeout)),this.removeShadow(),this.Qb.div&&this.Qb.div.parentNode===document.body&&document.body.removeChild(this.Qb.div),i&&(DayPilot.de(i),i=null),a.Qb.visible=!1,a.Qb.source=null,a.Tb&&e.hideParent&&a.Tb.hide(e),DayPilot.Menu.active===a&&(DayPilot.Menu.active=null),"function"==typeof this.onHide){var r={};this.onHide(r)}},this.delayedHide=function(e){t.hideTimeout=setTimeout(function(){a.hide(e)},a.hideAfter)},this.cancelHideTimeout=function(){clearTimeout(t.hideTimeout)},this.init=function(e){return t.mouseMove(e),this},this.addShadow=function(){},this.removeShadow=function(){},r)for(var o in r)this[o]=r[o]},DayPilot.MenuBar=function(e,t){var n=this;t=t||{},this.items=[],this.theme="menubar_default",this.windowMargin=0,this.nav={},this.elements={},this.elements.items=DayPilot.list(),this.l=null,this.La=!1;for(var a in t)this[a]=t[a];this.Ub=function(e){return this.theme+"_"+e},this.u=function(){this.nav.top=document.getElementById(e);var t=this.nav.top;t.className=this.Ub("main"),DayPilot.list(n.items).forEach(function(e){var a=document.createElement("span");a.innerHTML=DayPilot.Util.escapeTextHtml(e.text,e.html),a.className=n.Ub("item"),e.cssClass&&a.classList.add(e.cssClass),a.data=e,a.onclick=function(t){if(n.active&&n.active.item===e)n.Vb();else if(e.children)return void n.Wb(a);if("function"==typeof e.onClick){var i={};i.item=e,i.originalEvent=t,e.onClick(i)}},a.onmousedown=function(e){e.stopPropagation()},a.onmouseover=function(){n.active&&n.active.item!==e&&n.Wb(a)},t.appendChild(a),n.elements.items.push(a)})},this.Vb=function(){var e=n.Ub("item_active");n.elements.items.forEach(function(t){DayPilot.Util.removeClass(t,e)}),n.active&&n.active.menu&&n.active.menu.hide(),n.active=null},this.Xb=function(e){return!!n.active&&n.active.item===e.data},this.Wb=function(e){if(!n.Xb(e)){n.Vb();var t=e.data,a=n.active={};a.item=t,a.div=e;var i=n.Ub("item_active");DayPilot.Util.addClass(e,i);var r=DayPilot.abs(e);if(t.children){a.menu=new DayPilot.Menu({"items":t.children});var o=r.x;"right"===t.align&&(o+=r.w),a.menu.show(null,{"x":o,"y":r.y+r.h,"align":t.align,"windowMargin":n.windowMargin})}DayPilot.MenuBar.active=n}},this.init=function(){return this.u(),this.La=!0,this},this.dispose=function(){this.La&&(this.nav.top.innerHTML="",this.elements.items=[])}},DayPilot.MenuBar.deactivate=function(){DayPilot.MenuBar.active&&(DayPilot.MenuBar.active.Vb(),DayPilot.MenuBar.active=null)},t.menuClean=function(){"undefined"!=typeof DayPilot.Menu.active&&DayPilot.Menu.active&&(DayPilot.Menu.active.hide(),DayPilot.Menu.active=null)},t.mouseDown=function(){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.wheel=function(){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.resize=function(){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.mouseMove=function(e){"undefined"!=typeof t&&(t.mouse=t.mousePosition(e))},t.touchMove=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchStart=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchEnd=function(){},t.touchPosition=function(e){if(!e||!e.touches)return null;var t=e.touches[0],n={};return n.x=t.pageX,n.y=t.pageY,n},t.mousePosition=function(e){return DayPilot.mo3(null,e)},DayPilot.Menu.touchPosition=function(e){e.touches&&(t.mouse=t.touchPosition(e))},DayPilot.Menu.mousePosition=function(e){t.mouse=t.mousePosition(e)},DayPilot.Menu.hide=function(e){if(e=e||{},e.calendar){var n=DayPilot.Menu.active;if(n){var a=n.Qb.source;a&&a.calendar===e.calendar&&t.menuClean()}}else t.menuClean()},t.handlersRegistered||"undefined"==typeof document||(DayPilot.re(document,"mousemove",t.mouseMove),DayPilot.re(document,"mousedown",t.mouseDown),DayPilot.re(document,"wheel",t.wheel),DayPilot.re(document,"touchmove",t.touchMove),DayPilot.re(document,"touchstart",t.touchStart),DayPilot.re(document,"touchend",t.touchEnd),DayPilot.re(window,"resize",t.resize),t.handlersRegistered=!0),DayPilot.Menu.def={}}}(DayPilot),function(DayPilot){function e(t,n,a){var i=n.indexOf(".");if(i===-1)return void("__proto__"!==n&&"constructor"!==n&&(t[n]=a));var r=n.substring(0,i);if("__proto__"!==r&&"constructor"!==r){var o=n.substring(i+1),s=t[r];"object"==typeof s&&null!==s||(t[r]={},s=t[r]),e(s,o,a)}}function t(e){this.form=[],this.data={},this.theme="form_default",this.zIndex=99999,this.locale="en-us",this.plugins={},this.onKey=null,this.yc=[],this.zc=null,this.canceling=!1,this.Ac=[],this.f=[],this.Bc=null,e=e||{};for(var t in e)this[t]=e[t]}function n(){this.id=this.guid(),this.field=null,this.data=null,this.type=null,this.level=0,this.enabled=!0,this.value=null,this.text=null,this.interactive=!0,this.isValue=!1,this.checked=!1,this.resolved=null}function a(){this.element=null,this.canFocus=function(){return!1},this.apply=function(){},this.focus=function(){},this.save=function(){return{}}}function i(e,t,n){t=t||{},n=n||"";for(var a in e){var r=e[a];"object"==typeof r?"[object Array]"===Object.prototype.toString.call(r)?t[n+a]=r:r&&r.toJSON?t[n+a]=r.toJSON():i(r,t,n+a+"."):t[n+a]=r}return t}function r(e){this.data=[],this.name=null,this.theme="searchable_default",this.Hc=!1,this.listZIndex=1e5,this.onSelect=null,this.Ic=null,this.Jc=null,this.Kc=!1,this.Lc=null,this.Mc=null,this.q=[],this.Nc=null,e=e||{};var t=this,n={"selected":{post:function(e){"object"==typeof e&&e.id?t.Ic=e:"string"!=typeof e&&"number"!=typeof e||t.select(e)}}};Object.defineProperty(this,"selected",{get:function(){return this.Ic}}),Object.defineProperty(this,"disabled",{get:function(){return this.Hc},set:function(e){this.Hc=e,this.Lc&&(this.Lc.disabled=e,e&&this.Oc())}});for(var a in e)n[a]||(this[a]=e[a]);for(var i in e)n[i]&&n[i].post(e[i])}function o(e){this.form=null,this.item=null,this.data=null,this.name=null,this.theme="edit_table_default",this.onInput=null,this.nav={},this.Qc=null,this.yc=[],e=e||{};for(var t in e)this[t]=e[t]}if(!DayPilot.ModalStatic){DayPilot.ModalStatic={},DayPilot.ModalStatic.list=[],DayPilot.ModalStatic.hide=function(){if(this.list.length>0){var e=this.list.pop();e&&e.hide()}},DayPilot.ModalStatic.remove=function(e){for(var t=DayPilot.ModalStatic.list,n=0;n<t.length;n++)if(t[n]===e)return void t.splice(n,1)},DayPilot.ModalStatic.close=function(e){DayPilot.ModalStatic.result(e),DayPilot.ModalStatic.hide()},DayPilot.ModalStatic.result=function(e){var t=DayPilot.ModalStatic.list;t.length>0&&(t[t.length-1].result=e)},DayPilot.ModalStatic.displayed=function(e){for(var t=DayPilot.ModalStatic.list,n=0;n<t.length;n++)if(t[n]===e)return!0;return!1},DayPilot.ModalStatic.stretch=function(){if(this.list.length>0){var e=this.list[this.list.length-1];e&&e.stretch()}},DayPilot.ModalStatic.last=function(){var e=DayPilot.ModalStatic.list;return e.length>0?e[e.length-1]:null};var s=function(){function e(){for(var e=document.querySelectorAll("style[nonce]"),t=0;t<e.length;t++){var n=e[t];if(n.nonce)return n.nonce}if(document.currentScript&&document.currentScript.nonce)return document.currentScript.nonce;for(var a=document.querySelectorAll("script[nonce]"),i=0;i<a.length;i++){var r=a[i];if(r.nonce)return r.nonce}return""}if("undefined"==typeof window){var t={};return t.add=function(){},t.commit=function(){},t}var n=document.createElement("style");n.nonce=e(),n.styleSheet||n.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(n);var a=!!n.styleSheet,i={};return i.rules=[],i.commit=function(){try{a&&(n.styleSheet.cssText=this.rules.join("\n"))}catch(e){}},i.add=function(e,t,i){if(a)return void this.rules.push(e+"{"+t+"}");if(n.sheet.insertRule)"undefined"==typeof i&&(i=n.sheet.cssRules.length),n.sheet.insertRule(e+"{"+t+"}",i);else{if(!n.sheet.addRule)throw"No CSS registration method found";n.sheet.addRule(e,t,i)}},i.print=function(){for(var e=n.sheet.cssRules,t=[],a=0;a<e.length;a++)t.push(e[a].cssText);return t.join("\n")},i},l="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",d=new s;
|
|
14
|
-
d.add(".modal_default_main","border: 10px solid #ccc; max-width: 90%;"),d.add(".modal_default_main:focus","outline: none;"),d.add(".modal_default_content","padding: 10px 0px;"),d.add(".modal_default_inner","padding: 20px;"),d.add(".modal_default_input","padding: 10px 0px;"),d.add(".modal_default_buttons","margin-top: 10px;"),d.add(".modal_default_buttons","padding: 10px 0px;"),d.add(".modal_default_form_item","padding: 10px 0px; position: relative;"),d.add(".modal_default_form_item_level1","border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"),d.add(".modal_default_form_item.modal_default_form_title","font-size: 1.5rem; font-weight: bold;"),d.add(".modal_default_form_item input[type=text]","width: 100%; box-sizing: border-box;"),d.add(".modal_default_form_item textarea","width: 100%; height: 200px; box-sizing: border-box;"),d.add(".modal_default_form_item input[type=select]","width: 100%; box-sizing: border-box;"),d.add(".modal_default_form_item label","display: block;"),d.add(".modal_default_form_item select","width: 100%; box-sizing: border-box;"),d.add(".modal_default_form_item_label","margin: 2px 0px;"),d.add(".modal_default_form_item_image img","max-width: 100%; height: auto;"),d.add(".modal_default_form_item_invalid",""),d.add(".modal_default_form_item_invalid_message","position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"),d.add(".modal_default_background","opacity: 0.5; background-color: #000;"),d.add(".modal_default_ok","padding: 3px; width: 80px;"),d.add(".modal_default_cancel","padding: 3px; width: 80px;"),d.add(".modal_default_form_item_date","position: relative;"),d.add(".modal_default_form_item_date:after","content: ''; position: absolute; right: 7px; top: 50%; margin-top: 3px; width: 10px; height: 15px; background-image:url("+"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojY2NjY2NjO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjM4MDM3MzM2O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDE5MjgiCiAgICAgICB3aWR0aD0iOS45MTUzMDYxIgogICAgICAgaGVpZ2h0PSIxMS4zNjkzNyIKICAgICAgIHg9IjAuMTE3MTg3NSIKICAgICAgIHk9Ii0zLjAwOTk5NTciCiAgICAgICByeT0iMS4zMTE4NTA1IiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNjY2NjY2M7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNTk4MTQwMTI7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MTkzMCIKICAgICAgIHdpZHRoPSIxLjUzNDQxMzYiCiAgICAgICBoZWlnaHQ9IjIuMjE5ODI1IgogICAgICAgeD0iMi4xNTU4NDgzIgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHJ5PSIwLjY3MTc4OTE3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iMS41MjM5NTA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QxOTQ4IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjY3MTc4OTE3IgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHg9IjYuNDUyNzIzNSIKICAgICAgIGhlaWdodD0iMi4yMTk4MjUiCiAgICAgICB3aWR0aD0iMS41MzQ0MTM2IgogICAgICAgaWQ9InJlY3QyMDAzIgogICAgICAgc3R5bGU9ImZpbGw6I2NjY2NjYztmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS41OTgxNDAxMjtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAwNSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIHk9Ii0xLjE2NTg0NjYiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iNi45OTI3MDA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDA3IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAxMyIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjEuNTIzOTUwNiIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHJ5PSIwLjI5NjAxNDciIC8+CiAgICA8cmVjdAogICAgICAgcnk9IjAuMjk2MDE0NyIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGlkPSJyZWN0MjAxNSIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIgLz4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDIwMTciCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB4PSI2Ljk5MjcwMDYiCiAgICAgICB5PSIxLjgwMjkwMzQiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSI0LjczMjU5MDciCiAgICAgICB4PSIxLjU2MzAxMzEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBpZD0icmVjdDIwMTkiCiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiIC8+CiAgICA8cmVjdAogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgICAgaWQ9InJlY3QyMDIxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgeD0iNC4yNTgzMjU2IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgcnk9IjAuMjk2MDE0NyIgLz4KICAgIDxyZWN0CiAgICAgICByeT0iMC4yOTYwMTQ3IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgeD0iNy4wMzE3NjMxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDIzIgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogIDwvZz4KPC9zdmc+Cg=="+")"),"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Edge")!==-1&&d.add(".modal_default_form_item_date input::-ms-clear","display: none;"),d.add(".modal_default_form_item_scrollable_scroll","width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"),d.add(".modal_default_form_item_scrollable_scroll_content","padding: 5px;"),d.add(".modal_default_form_item_searchable","position: relative;"),d.add(".modal_default_form_item_searchable_icon",""),d.add(".modal_default_form_item_searchable_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+l+");"),d.add(".modal_default_form_item_searchable_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),d.add(".modal_default_form_item_searchable_list_item","background: white; padding: 2px; cursor: default;"),d.add(".modal_default_form_item_searchable_list_item_highlight","background: #ccc;"),d.add(".modal_default_form_item_time","position: relative;"),d.add(".modal_default_form_item_time_icon",""),d.add(".modal_default_form_item_time_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+l+");"),d.add(".modal_default_form_item_time_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),d.add(".modal_default_form_item_time_list_item","background: white; padding: 2px; cursor: default;"),d.add(".modal_default_form_item_time_list_item_highlight","background: #ccc;"),d.add(".modal_default_form_item_datetime_parent","display: flex;"),d.add(".modal_default_form_item_datetime .modal_default_form_item_time_main","margin-left: 5px;"),d.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ",""),d.add(".modal_default_form_item_tabular_main","margin-top: 10px;"),d.add(".modal_default_form_item_tabular_table","display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"),d.add(".modal_default_form_item_tabular_tbody","display: table-row-group;"),d.add(".modal_default_form_item_tabular_row","display: table-row;"),d.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header",""),d.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction","padding: 0px; width: 23px;"),d.add(".modal_default_form_item_tabular_cell","display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"),d.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell","padding-left: 0px; padding-bottom: 0px;"),d.add(".modal_default_form_item_tabular_table input[type=text], .modal_default_form_item_tabular_table input[type=number]","width:100%; box-sizing: border-box;"),d.add(".modal_default_form_item_tabular_table select","width:100%; height:100%; box-sizing: border-box;"),d.add(".modal_default_form_item_tabular_plus","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),d.add(".modal_default_form_item_tabular_plus:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSA1LjAgMC41IEwgNS4wIDkuNSBNIDAuNSA1LjAgTCA5LjUgNS4wJyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),d.add(".modal_default_form_item_tabular_delete","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),d.add(".modal_default_form_item_tabular_delete:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgOS41IDkuNSBNIDAuNSA5LjUgTCA5LjUgMC41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),d.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus","display: none;"),d.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus","display: none;"),d.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete","visibility: hidden;"),d.add(".modal_default_form_item_tabular_empty","height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"),d.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell","padding: 0px;"),d.add(".modal_min_main","border: 1px solid #ccc; max-width: 90%;"),d.add(".modal_min_background","opacity: 0.5; background-color: #000;"),d.add(".modal_min_ok","padding: 3px 10px;"),d.add(".modal_min_cancel","padding: 3px 10px;"),d.add(".navigator_modal_main","border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"),d.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after","box-sizing: content-box;"),d.add(".navigator_modal_month","font-size: 11px;"),d.add(".navigator_modal_day","color: black;"),d.add(".navigator_modal_weekend","background-color: #f0f0f0;"),d.add(".navigator_modal_dayheader","color: black;"),d.add(".navigator_modal_line","border-bottom: 1px solid #c0c0c0;"),d.add(".navigator_modal_dayother","color: gray;"),d.add(".navigator_modal_todaybox","border: 1px solid red;"),d.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),d.add(".navigator_modal_busy","font-weight: bold;"),d.add(".navigator_modal_cell","text-align: center;"),d.add(".navigator_modal_select .navigator_modal_cell_box","background-color: #FFE794; opacity: 0.5;"),d.add(".navigator_modal_title","text-align: center;"),d.add(".navigator_modal_titleleft, .navigator_modal_titleright","text-align: center;"),d.add(".navigator_modal_dayheader","text-align: center;"),d.add(".navigator_modal_weeknumber","text-align: center;"),d.add(".navigator_modal_cell_text","cursor: pointer;"),d.add(".navigator_modal_todaysection","box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--dp-nav-border-color);"),d.add(".navigator_modal_todaysection_button","cursor: pointer; color: #333; background-color: #f0f0f0; border: 1px solid var(--dp-nav-border-color); padding: 5px 10px; border-radius: 0px; "),d.commit(),DayPilot.Modal=function(e){this.autoFocus=!0,this.focus=null,this.autoStretch=!0,this.autoStretchFirstLoadOnly=!1,this.className=null,this.theme="modal_default",this.disposeOnClose=!0,this.dragDrop=!0,this.loadingHtml=null,this.maxHeight=null,this.scrollWithPage=!0,this.useIframe=!0,this.zIndex=99999,this.left=null,this.width=600,this.top=20,this.height=200,this.locale=null,this.closed=null,this.onClose=null,this.onClosed=null,this.onShow=null;var t=this;this.id="_"+(new Date).getTime()+"n"+10*Math.random(),this.Yb=!1,this.Zb=null,this.$b=null,this.showHtml=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.div||this._b(),this.qb(),this.useIframe){var t=function(e,t){return function(){e.setInnerHTML(e.id+"iframe",t)}};window.setTimeout(t(this,e),0)}else e.nodeType?this.div.appendChild(e):this.div.innerHTML=e;this.qb(),this.bc(),this.cc()},this.showUrl=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.useIframe){this.div||this._b();var n=this.loadingHtml;n&&(this.iframe.src="about:blank",this.setInnerHTML(this.id+"iframe",n)),this.re(this.iframe,"load",this.dc),this.iframe.src=e,this.qb(),this.bc(),this.cc()}else t.ec({"url":e,"success":function(e){var n=e.request.responseText;t.showHtml(n)},"error":function(){t.showHtml("Error loading the modal dialog")}})},this.cc=function(){if("function"==typeof t.onShow){var e={};e.root=t.fc(),e.modal=t,t.onShow(e)}},this.fc=function(){return t.iframe?t.iframe.contentWindow.document:t.div},this.ec=function(e){var t=new XMLHttpRequest;if(t){var n=e.method||"GET",a=e.success||function(){},i=e.error||function(){},r=e.data,o=e.url;t.open(n,o,!0),t.setRequestHeader("Content-type","text/plain"),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status||304===t.status){var e={};e.request=t,a(e)}else if(i){var n={};n.request=t,i(n)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&("object"==typeof r&&(r=JSON.stringify(r)),t.send(r))}},this.qb=function(){delete this.result;var e=window,n=document,a=e.pageYOffset?e.pageYOffset:n.documentElement&&n.documentElement.scrollTop?n.documentElement.scrollTop:n.body.scrollTop;this.theme&&(this.hideDiv.className=this.theme+"_background"),this.zIndex&&(this.hideDiv.style.zIndex=this.zIndex),this.hideDiv.style.display="",window.setTimeout(function(){t.hideDiv&&(t.hideDiv.onclick=function(){t.hide({"backgroundClick":!0})})},500),this.theme?this.div.className=this.theme+"_main":this.div.className="",this.className&&(this.div.className+=" "+this.className),this.left?this.div.style.left=this.left+"px":this.div.style.marginLeft="-"+Math.floor(this.width/2)+"px",this.div.style.position="absolute",this.div.style.boxSizing="content-box",this.div.style.top=a+this.top+"px",this.div.style.width=this.width+"px",this.zIndex&&(this.div.style.zIndex=this.zIndex),this.height&&(this.useIframe||!this.autoStretch?this.div.style.height=this.height+"px":this.div.style.height=""),this.useIframe&&this.height&&(this.iframe.style.height=this.height+"px"),this.div.style.display="",this.gc(),DayPilot.ModalStatic.remove(this),DayPilot.ModalStatic.list.push(this)},this.dc=function(){t.iframe.contentWindow.modal=t,t.autoStretch&&t.stretch()},this.stretch=function(){var e=function(){return t.hc().y},n=function(){return t.hc().x};if(this.useIframe){for(var a=n()-40,i=this.width;i<a&&this.ic();i+=10)this.div.style.width=i+"px",this.div.style.marginLeft="-"+Math.floor(i/2)+"px";for(var r=this.maxHeight||e()-2*this.top,o=this.height;o<r&&this.jc();o+=10)this.iframe.style.height=o+"px",this.div.style.height=o+"px";this.autoStretchFirstLoadOnly&&this.ue(this.iframe,"load",this.dc)}else this.div.style.height=""},this.ic=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,n=t.scrollWidth,a=e.body.children,i=0;i<a.length;i++){var r=a[i].offsetLeft+a[i].offsetWidth;n=Math.max(n,r)}return n>t.clientWidth},this.jc=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,n=t.scrollHeight,a=e.body.children,i=0;i<a.length;i++){var r=a[i].offsetTop+a[i].offsetHeight;n=Math.max(n,r)}return n>t.clientHeight},this.hc=function(){var e=document;if("CSS1Compat"===e.compatMode&&e.documentElement&&e.documentElement.clientWidth){var t=e.documentElement.clientWidth,n=e.documentElement.clientHeight;return{x:t,y:n}}var t=e.body.clientWidth,n=e.body.clientHeight;return{x:t,y:n}},this.bc=function(){this.Yb||(this.re(window,"resize",this.kc),this.re(window,"scroll",this.lc),this.dragDrop&&(this.re(document,"mousemove",this.nc),this.re(document,"mouseup",this.oc)),this.Yb=!0)},this.pc=function(){this.ue(window,"resize",this.kc),this.ue(window,"scroll",this.lc),this.dragDrop&&(this.ue(document,"mousemove",this.nc),this.ue(document,"mouseup",this.oc)),this.Yb=!1},this.qc=function(e){e.target===t.div&&(e.preventDefault(),t.div.style.cursor="move",t.rc(),t.$b=t.mc(e||window.event),t.Zb={x:t.div.offsetLeft,y:t.div.offsetTop})},this.nc=function(e){if(t.$b){var n=t.mc(e),a=n.x-t.$b.x,i=n.y-t.$b.y;t.div.style.marginLeft="0px",t.div.style.top=t.Zb.y+i+"px",t.div.style.left=t.Zb.x+a+"px"}},this.oc=function(){t.$b&&(t.sc(),t.div.style.cursor=null,t.$b=null)},this.rc=function(){if(this.useIframe){var e=document.createElement("div");e.style.backgroundColor="#ffffff",e.style.filter="alpha(opacity=80)",e.style.opacity="0.80",e.style.width="100%",e.style.height=this.height+"px",e.style.position="absolute",e.style.left="0px",e.style.top="0px",this.div.appendChild(e),this.mask=e}},this.sc=function(){this.useIframe&&(this.div.removeChild(this.mask),this.mask=null)},this.kc=function(){t.tc(),t.gc()},this.lc=function(){t.tc()},this.gc=function(){if(!t.left&&t.div){var e=t.div.offsetWidth;t.div.style.marginLeft="-"+Math.floor(e/2)+"px"}},this.tc=function(){if(t.hideDiv&&t.div&&"none"!==t.hideDiv.style.display&&"none"!==t.div.style.display){var e=t.uc.scrollY();t.scrollWithPage||(t.div.style.top=e+t.top+"px")}},this.uc={},this.uc.container=function(){return t.container||document.body},this.uc.scrollY=function(){var e=t.uc.container();return e===document.body?window.pageYOffset?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop:e.scrollTop},this.re=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},this.ue=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},this.mc=function(e){return e.pageX||e.pageY?{x:e.pageX,y:e.pageY}:{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}},this.abs=function(e){for(var t={x:e.offsetLeft,y:e.offsetTop};e.offsetParent;)e=e.offsetParent,t.x+=e.offsetLeft,t.y+=e.offsetTop;return t},this._b=function(){var e=t.uc.container(),n=e===document.body,a=n?"fixed":"absolute",i=document.createElement("div");i.id=this.id+"hide",i.style.position=a,i.style.left="0px",i.style.top="0px",i.style.right="0px",i.style.bottom="0px",i.oncontextmenu=function(){return!1},i.onmousedown=function(){return!1},e.appendChild(i);var r=document.createElement("div");r.id=this.id+"popup",r.style.position=a,r.style.left="50%",r.style.top="0px",r.style.backgroundColor="white",r.style.width="50px",r.style.height="50px",this.dragDrop&&(r.onmousedown=this.qc),r.addEventListener("keydown",function(e){e.stopPropagation()});var o=null;this.useIframe&&(o=document.createElement("iframe"),o.id=this.id+"iframe",o.name=this.id+"iframe",o.frameBorder="0",o.style.width="100%",o.style.height="50px",r.appendChild(o)),e.appendChild(r),this.div=r,this.iframe=o,this.hideDiv=i},this.setInnerHTML=function(e,n){var a=window.frames[e],i=a.contentWindow||a.document||a.contentDocument;i.document&&(i=i.document),null==i.body&&i.write("<body></body>"),n.nodeType?i.body.appendChild(n):i.body.innerHTML=n,t.autoStretch&&(t.autoStretchFirstLoadOnly&&t.vc||(t.stretch(),t.vc=!0))},this.close=function(e){this.result=e,this.hide()},this.closeSerialized=function(){for(var e=t.fc(),n=e.querySelectorAll("input, textarea, select"),a={},i=0;i<n.length;i++){var r=n[i],o=r.name;if(o){var s=r.value;a[o]=s}}t.close(a)},this.hide=function(e){e=e||{};var n={};n.backgroundClick=!!e.backgroundClick,n.result=this.result,n.canceled="undefined"==typeof this.result,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof this.onClose&&(this.onClose(n),n.preventDefault.value)||(this.div&&(this.div.style.display="none",this.hideDiv.style.display="none",this.useIframe||(this.div.innerHTML=null)),window.focus(),DayPilot.ModalStatic.remove(this),"function"==typeof this.onClosed?this.onClosed(n):this.closed&&this.closed(),delete this.result,this.disposeOnClose&&(t.pc(),t.wc(t.div),t.wc(t.hideDiv),t.div=null,t.hideDiv=null,t.iframe=null))},this.wc=function(e){var t;e&&(null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e))},this.xc=function(){if(e)for(var t in e)this[t]=e[t]},this.xc()},DayPilot.Modal.alert=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var n=t.okText||"OK";return DayPilot.getPromise(function(a){t.onClosed=function(e){a(e)};var i=new DayPilot.Modal(t),r=document.createElement("div");r.className=i.theme+"_inner";var o=document.createElement("div");o.className=i.theme+"_content",o.innerHTML=e;var s=document.createElement("div");s.className=i.theme+"_buttons";var l=document.createElement("button");l.innerText=n,l.className=i.theme+"_ok",l.onclick=function(){DayPilot.ModalStatic.close("OK")},s.appendChild(l),r.appendChild(o),r.appendChild(s),i.showHtml(r),i.autoFocus&&l.focus()})},DayPilot.Modal.confirm=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var n=t.okText||"OK",a=t.cancelText||"Cancel";return DayPilot.getPromise(function(i){t.onClosed=function(e){i(e)};var r=new DayPilot.Modal(t),o=document.createElement("div");o.className=r.theme+"_inner";var s=document.createElement("div");s.className=r.theme+"_content",s.innerHTML=e;var l=document.createElement("div");l.className=r.theme+"_buttons";var d=document.createElement("button");d.innerText=n,d.className=r.theme+"_ok",d.onclick=function(){DayPilot.ModalStatic.close("OK")};var c=document.createTextNode(" "),u=document.createElement("button");u.innerText=a,u.className=r.theme+"_cancel",u.onclick=function(){DayPilot.ModalStatic.close()},l.appendChild(d),l.appendChild(c),l.appendChild(u),o.appendChild(s),o.appendChild(l),r.showHtml(o),r.autoFocus&&d.focus()})},DayPilot.Modal.prompt=function(e,t,n){"object"==typeof t&&(n=t,t=""),n=n||{},n.height=n.height||40,n.useIframe=!1;var a=n.okText||"OK",i=n.cancelText||"Cancel",r=t||"";return DayPilot.getPromise(function(t){n.onClosed=function(e){t(e)};var o=new DayPilot.Modal(n),s=document.createElement("div");s.className=o.theme+"_inner";var l=document.createElement("div");l.className=o.theme+"_content",l.innerHTML=e;var d=document.createElement("div");d.className=o.theme+"_input";var c=document.createElement("input");c.value=r,c.style.width="100%",c.onkeydown=function(e){var t=!1;switch(e.keyCode){case 13:o.close(this.value);break;case 27:o.close();break;default:t=!0}t||(e.preventDefault(),e.stopPropagation())},d.appendChild(c);var u=document.createElement("div");u.className=o.theme+"_buttons";var h=document.createElement("button");h.innerText=a,h.className=o.theme+"_ok",h.onclick=function(){o.close(c.value)};var f=document.createTextNode(" "),v=document.createElement("button");v.innerText=i,v.className=o.theme+"_cancel",v.onclick=function(){o.close()},u.appendChild(h),u.appendChild(f),u.appendChild(v),s.appendChild(l),s.appendChild(d),s.appendChild(u),o.showHtml(s),o.autoFocus&&c.focus()})};var c=function(e){return"[object Array]"===Object.prototype.toString.call(e)};DayPilot.Modal.form=function(n,a,i){if(1===arguments.length){var r=n;if(c(r))a={};else{if("object"!=typeof r)throw"Invalid DayPilot.Modal.form() parameter";a=n,n=[];for(var o in a){var s={};s.name=o,s.id=o,n.push(s)}}}var l={};for(var d in i)l[d]=i[d];l.height=l.height||40,l.useIframe=!1;var u=l.okText||"OK",h=l.cancelText||"Cancel";return DayPilot.getPromise(function(i){l.onClosed=function(t){if(t.result){var n=JSON.parse(JSON.stringify(a));for(var r in t.result)e(n,r,t.result[r]);t.result=n}i(t)};var r=new DayPilot.Modal(l),o=document.createElement("div");o.className=r.theme+"_inner";var s=document.createElement("div");s.className=r.theme+"_input";var d=new t({theme:r.theme,form:n,data:a,zIndex:r.zIndex,locale:r.locale,plugins:r.plugins,onKey:function(e){switch(e.key){case"Enter":d.validate()&&r.close(d.serialize());break;case"Escape":r.close()}},onChange:function(e){"function"==typeof r.onChange&&r.onChange(e)}}),c=d.create();s.append(c);var f=document.createElement("div");f.className=r.theme+"_buttons";var v=document.createElement("button");v.innerText=u,v.className=r.theme+"_ok",l.okDisabled&&(v.disabled=!0),v.onclick=function(){d.validate()&&r.close(d.serialize())};var p=document.createTextNode(" "),m=document.createElement("button");if(m.innerText=h,m.className=r.theme+"_cancel",m.onclick=function(){r.close()},m.onmousedown=function(){d.canceling=!0},f.appendChild(v),f.appendChild(p),f.appendChild(m),o.appendChild(s),o.appendChild(f),r.showHtml(o),r.div.setAttribute("tabindex","-1"),r.div.addEventListener("keydown",function(e){switch(e.keyCode){case 27:r.close();break;case 13:d.validate()&&r.close(d.serialize())}}),r.focus){var g=null;if("object"==typeof r.focus){var y=r.focus.id,b=r.focus.value;g=d.findViewById(y,b)}else"string"==typeof r.focus&&(g=d.findViewById(r.focus));g&&g.focus()}else{var w=d.firstFocusable();r.autoFocus&&w?w.focus():r.div.focus()}})},DayPilot.Modal.close=function(e){var t=DayPilot.Modal.opener();t&&t.close(e)},DayPilot.Modal.stretch=function(){var e=DayPilot.Modal.opener();if(!e)throw"Unable to find the opener DayPilot.Modal instance.";e.stretch()},DayPilot.Modal.closeSerialized=function(){var e=DayPilot.Modal.opener()||DayPilot.ModalStatic.last();e&&e.closeSerialized()},DayPilot.Modal.opener=function(){return"undefined"!=typeof DayPilot&&"undefined"!=typeof DayPilot.ModalStatic&&DayPilot.ModalStatic.list.length>0?DayPilot.ModalStatic.list[DayPilot.ModalStatic.list.length-1]:parent&&parent.DayPilot&&parent.DayPilot.ModalStatic&&parent.DayPilot.ModalStatic.list[parent.DayPilot.ModalStatic.list.length-1]},"undefined"==typeof DayPilot.getPromise&&(DayPilot.getPromise=function(e){return"undefined"!=typeof Promise?new Promise(e):(DayPilot.Promise=function(e){var t=this;this.then=function(t,n){return t=t||function(){},n=n||function(){},e(t,n),DayPilot.getPromise(e)},this["catch"]=function(n){return t.then(null,n),DayPilot.getPromise(e)}},new DayPilot.Promise(e))}),t.prototype.create=function(){return this.load(),this.render(),this.Bc},t.prototype.render=function(){var e=this;this.Bc=document.createElement("div"),this.yc.forEach(function(t){e.createView(t)}),this.applyState()},t.prototype.createView=function(e){var t=this.theme,n=this,a=document.createElement("div");if(a.className=t+"_form_item "+t+"_form_item_level"+e.level,e.interactive||"title"!==e.type?a.className+=" "+t+"_form_item_"+e.type:a.className+=" "+t+"_form_title",e.data.cssClass&&(a.className+=" "+e.data.cssClass),!e.isValue){var i=document.createElement("div");i.className=t+"_form_item_label",i.innerText=e.text,a.appendChild(i)}var r=this.createInteractive(e);r.onInput=function(e){if(e=e||{},n.Cc(r,{"debounce":!e.immediate}),"function"==typeof n.onChange){var t={};t.result=n.serialize(),n.onChange(t)}},r.onBlur=function(){n.canceling||n.Cc(r)},r.apply(e),r.Bc=a,r.row=e,r.element&&a.appendChild(r.element),this.f.push(r),this.Bc.appendChild(a)},t.prototype.validate=function(){var e=this,t=!0;return this.f.forEach(function(n){var a=e.Cc(n);t=t&&a}),t},t.prototype.Cc=function(e,t){function n(){e.Dc&&(e.Dc.remove(),e.Dc=null),e.Bc.classList.add(u);var t=document.createElement("div");t.classList.add(h),t.innerText=c.message,e.Dc=t,e.Bc.appendChild(t)}t=t||{};var a=t.debounce,i=t.silent,r=e.row,o=!0,s="function"==typeof r.data.onValidate?r.data.onValidate:null,l="function"==typeof r.data.validate?r.data.validate:null,d=s||l;if(d){var c={};c.valid=!0,c.value=e.save()[r.field],c.message="Error",c.values=this.serialize(),c.result=this.serialize(),d(c);var u=this.theme+"_form_item_invalid",h=this.theme+"_form_item_invalid_message";if(c.valid)clearTimeout(this.Ac[r.field]),e.Dc&&(e.Dc.remove(),e.Dc=null),e.Bc.classList.remove(u);else if(!i)if(a){var f=1e3;clearTimeout(this.Ac[r.field]),this.Ac[r.field]=setTimeout(function(){n()},f)}else n();o=c.valid}return o},t.prototype.load=function(){var e=this;this.form.forEach(function(t){e.processFormItem(t,0)});var t;try{var n=JSON.stringify(this.data);t=i(JSON.parse(n))}catch(e){throw new Error("The 'data' object is not serializable (it may contain circular dependencies): "+e)}for(var a in t)this.setValue(a,t[a])},t.prototype.setValue=function(e,t){this.yc.forEach(function(n){n.applyValue(e,t)})},t.prototype.updateDependentState=function(){var e=this,t=[!0];(this.zc?this.zc:this.yc).forEach(function(n){var a=e.updateState(n,{enabled:t[n.level]&&!n.data.disabled});a.isValue&&(t[a.level+1]=a.enabled&&a.checked)})},t.prototype.processFormItem=function(e,t){var a=this,i=this.getFieldType(e),r=[];if("radio"===i){if(e.name){var o=new n;o.field=e.id,o.data=e,o.level=t,o.type="label",o.interactive=!1,o.text=e.name,a.yc.push(o),r.push(o)}e.options.forEach(function(o){var s=new n;s.field=e.id,s.data=o,s.level=t,s.type=i,s.isValue=!0,s.text=o.name,s.resolved=o.id,
|
|
15
|
-
a.yc.push(s),r.push(s),o.children&&o.children.forEach(function(e){var n=a.processFormItem(e,t+1);r=r.concat(n)})})}else if("title"===i){var o=new n;o.field=e.id,o.data=e,o.level=t,o.type=i,o.interactive=!1,o.text=e.name,a.yc.push(o),r.push(o)}else if("image"===i){var o=new n;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=i,o.interactive=!1,o.text=null,a.yc.push(o),r.push(o)}else if("html"===i){var o=new n;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=i,o.interactive=!1,o.text=null,a.yc.push(o),r.push(o)}else if("scrollable"===i){var o=new n;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=i,o.interactive=!1,o.text=null,a.yc.push(o),r.push(o)}else{var o=new n;o.field=e.id,o.data=e,o.level=t,o.type=i,o.text=e.name,o.children=[],a.yc.push(o),r.push(o),"checkbox"===i&&(o.isValue=!0,o.resolved=!0,e.children&&e.children.forEach(function(e){var n=a.processFormItem(e,t+1);r=r.concat(n)}))}return r},t.prototype.doOnKey=function(e){if("function"==typeof this.onKey){var t={key:e};this.onKey(t)}},t.prototype.createInteractive=function(e){var t=this,n={"label":function(){return new a},"title":function(){return new a},"image":function(){var t=new a,n=document.createElement("img");return n.src=e.data.image,t.element=n,t},"html":function(){var t=new a,n=document.createElement("div");return"string"==typeof e.data.text?n.innerText=e.data.text:"string"==typeof e.data.html&&(n.innerHTML=e.data.html),t.element=n,t},"scrollable":function(){var n=new a,i=document.createElement("div");i.className=t.theme+"_form_item_scrollable_scroll",e.data.height&&(i.style.height=e.data.height+"px");var r=document.createElement("div");return r.className=t.theme+"_form_item_scrollable_scroll_content","string"==typeof e.data.text?r.innerText=e.data.text:"string"==typeof e.data.html&&(r.innerHTML=e.data.html),i.appendChild(r),n.element=i,n},"text":function(){var n=new a;n.apply=function(e){n.row=e;var t=n.element;t.value=e.value,t.disabled=!e.enabled};var i=document.createElement("input");return i.name=e.field,i.type="text",i.autocomplete="off",i.onkeydown=function(e){var n=!1;switch(e.keyCode){case 13:t.doOnKey("Enter");break;case 27:t.doOnKey("Escape");break;default:n=!0}n||(e.preventDefault(),e.stopPropagation())},i.oninput=function(){n.onInput()},i.onblur=function(){n.onBlur()},n.element=i,n.canFocus=function(){return!n.element.disabled},n.focus=function(){n.element.focus(),n.element.setSelectionRange(0,n.element.value.length)},n.save=function(){var t={};return t[e.field]=i.value,t},n},"textarea":function(){var n=new a;n.apply=function(e){n.row=e;var t=n.element;t.value=e.value,t.disabled=!e.enabled};var i=document.createElement("textarea");return i.name=e.field,e.data.height&&(i.style.height=e.data.height+"px"),i.onkeydown=function(e){var n=!1;switch(e.keyCode){case 13:(e.ctrlKey||e.metaKey)&&t.doOnKey("Enter"),n=!1;break;case 27:t.doOnKey("Escape");break;default:n=!0}n||e.stopPropagation()},i.oninput=function(){n.onInput()},i.onblur=function(){n.onBlur()},n.element=i,n.canFocus=function(){return!n.element.disabled},n.focus=function(){n.element.focus(),n.element.setSelectionRange(0,0)},n.save=function(){var t={};return t[e.field]=i.value,t},n},"date":function(){var n=new a;n.apply=function(e){n.row=e;var a=n.element,i=n.picker;e.data.dateFormat&&(i.pattern=e.data.dateFormat);var r=e.data.locale||t.locale;r&&(i.locale=r),a.disabled=!e.enabled,i.date=new DayPilot.Date(e.value);var o=new DayPilot.Date(e.value).toString(e.data.dateFormat||i.pattern,i.locale);a.value=o};var i=document.createElement("input");i.name=e.field;var r=new DayPilot.DatePicker({target:i,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(){n.onInput({"immediate":!0})}});return i.picker=r,i.className=t.theme+"_input_date",i.type="text",i.onkeydown=function(e){var n=!1;switch(e.keyCode){case 13:r.visible?r.close():t.doOnKey("Enter");break;case 27:r.visible?r.close():t.doOnKey("Escape");break;case 9:r.close(),n=!0;break;default:n=!0}n||(e.preventDefault(),e.stopPropagation())},i.onfocus=function(){r.show()},i.onclick=function(){r.show()},i.oninput=function(){n.onInput()},i.onblur=function(){n.onBlur()},n.element=i,n.picker=r,n.canFocus=function(){return!n.element.disabled},n.focus=function(){n.element.focus()},n.save=function(){var t=r.date?r.date.toString():null,n={};return n[e.field]=t,n},n},"time":function(){return t.Ec(e)},"datetime":function(){return t.Fc(e)},"select":function(){var t=new a;t.apply=function(e){t.row=e;var n=t.element;n.value=e.value,n.disabled=!e.enabled};var n=document.createElement("select");return n.name=e.field,e.data.options&&e.data.options.forEach&&e.data.options.forEach(function(e){var t=document.createElement("option");t.innerText=e.name||e.id,t.value=e.id,t.Gc=e.id,n.appendChild(t)}),n.onchange=function(){t.onInput({"immediate":!0})},n.onblur=function(){t.onBlur()},t.element=n,t.canFocus=function(){return!t.element.disabled},t.focus=function(){t.element.focus()},t.save=function(){var t=null,a=n.options[n.selectedIndex];a&&"undefined"!=typeof a.Gc&&(t=a.Gc);var i={};return i[e.field]=t,i},t},"searchable":function(){var n=new a;n.apply=function(e){n.row=e;var t=n.searchable;t.disabled=!e.enabled,t.select(e.value)};var i=new r({data:e.data.options||[],name:e.field,theme:t.theme+"_form_item_searchable",listZIndex:t.zIndex+1,onSelect:function(e){e.ui&&n.onInput({"immediate":!0})}}),o=i.create();return n.element=o,n.searchable=i,n.canFocus=function(){return!n.searchable.disabled},n.focus=function(){n.searchable.focus()},n.save=function(){var t=i.selected&&i.selected.id,n={};return n[e.field]=t,n},n},"radio":function(){var n=new a;n.apply=function(e){n.row=e;var t=n.radio;t.checked=e.checked,t.disabled=!e.enabled};var i=document.createElement("label"),r=document.createElement("input");r.type="radio",r.name=e.field,r.Gc=e.resolved,r.onchange=function(){var e=n.row;t.findRowsByField(e.field).forEach(function(e){t.updateState(e,{checked:!1})}),t.updateState(e,{checked:!0}),t.applyState(),n.onInput({"immediate":!0})},r.onblur=function(){n.onBlur()},i.appendChild(r);var o=document.createTextNode(e.text);return i.append(o),n.element=i,n.radio=r,n.canFocus=function(){return!1},n.focus=function(){n.radio.focus()},n.save=function(){if(!r.checked)return{};var t=r.Gc,n={};return n[e.field]=t,n},n},"checkbox":function(){var n=new a;n.apply=function(e){n.row=e;var t=n.checkbox;t.checked=e.checked,t.disabled=!e.enabled};var i=document.createElement("label"),r=document.createElement("input");r.type="checkbox",r.name=e.field,r.Gc=e.resolved,r.onchange=function(){var e=n.row;t.updateState(e,{checked:this.checked}),t.applyState(),n.onInput({"immediate":!0})},r.onblur=function(){n.onBlur()},i.appendChild(r);var o=document.createTextNode(e.text);return i.append(o),n.element=i,n.checkbox=r,n.canFocus=function(){return!1},n.focus=function(){n.checkbox.focus()},n.save=function(){var t=r.checked,n={};return n[e.field]=t,n},n},"table":function(){var n=new a;n.apply=function(e){n.row=e;var t=n.table;t.disabled=!e.enabled,t.load(e.value||[])};var i=new o({name:e.field,form:t,theme:t.theme+"_form_item_tabular",item:e.data,onInput:function(){n.onInput()}}),r=i.create();return n.element=r,n.table=i,n.canFocus=function(){return!1},n.focus=function(){n.table.focus()},n.save=function(){var t=i.save(),n={};return n[e.field]=t,n},n}};return t.plugins&&t.plugins[e.type]?t.plugins[e.type](e):n[e.type]()},t.prototype.Ec=function(e){var t=this,n=new a;n.apply=function(e){n.row=e;var t=n.searchable;t.disabled=!e.enabled,t.select(e.value)};var i=[],o=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(o)||(o=15);for(var s=60/o,l=e.data.locale||t.locale,d=DayPilot.Locale.find(l)||DayPilot.Locale.US,c=DayPilot.Date.today(),u=0;u<24*s;u++){var h=c.addMinutes(o*u),f={};f.name=h.toString(e.data.timeFormat||d.timePattern,d),f.id=h.toString("HH:mm"),i.push(f)}var v=new r({data:i,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&n.onInput({"immediate":!0})}}),p=v.create();return n.element=p,n.searchable=v,n.canFocus=function(){return!n.searchable.disabled},n.focus=function(){n.searchable.focus()},n.save=function(){var t=v.selected&&v.selected.id,n={};return n[e.field]=t,n},n},t.prototype.Fc=function(e){var t=this,n=new a;n.apply=function(e){n.row=e;var a=n.searchable;a.disabled=!e.enabled;var i=new DayPilot.Date(e.value).toString("HH:mm");a.select(i);var r=n.dateInput,o=n.picker;e.data.dateFormat&&(o.pattern=e.data.dateFormat);var s=e.data.locale||t.locale;if(s){var l=DayPilot.Locale.find(s)||DayPilot.Locale.US;o.locale=s,o.pattern=l.datePattern}r.disabled=!e.enabled,o.date=new DayPilot.Date(e.value);var d=new DayPilot.Date(e.value).toString(e.data.dateFormat||o.pattern,o.locale);r.value=d};var i=function(){var a=document.createElement("input");a.name=e.field;var i=new DayPilot.DatePicker({target:a,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(){n.onInput({"immediate":!0})}});return a.picker=i,a.className=t.theme+"_input_date",a.type="text",a.onkeydown=function(e){var n=!1;switch(e.keyCode){case 13:i.visible?i.close():t.doOnKey("Enter");break;case 27:i.visible?i.close():t.doOnKey("Escape");break;case 9:i.close(),n=!0;break;default:n=!0}n||(e.preventDefault(),e.stopPropagation())},a.onfocus=function(){i.show()},a.onclick=function(){i.show()},a.oninput=function(){n.onInput()},a.onblur=function(){n.onBlur()},n.dateInput=a,n.picker=i,a}(),o=function(){var a=[],i=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(i)||(i=15);for(var o=60/i,s=e.data.locale||t.locale,l=DayPilot.Locale.find(s)||DayPilot.Locale.US,d=DayPilot.Date.today(),c=0;c<24*o;c++){var u=d.addMinutes(i*c),h={};h.name=u.toString(e.data.timeFormat||l.timePattern,l),h.id=u.toString("HH:mm"),a.push(h)}var f=new r({data:a,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&n.onInput({"immediate":!0})}});return n.searchable=f,f.create()}(),s=document.createElement("div");return s.className=t.theme+"_form_item_datetime_parent",s.appendChild(i),s.appendChild(o),n.element=s,n.canFocus=function(){return!n.searchable.disabled},n.focus=function(){n.dateInput.focus()},n.save=function(){var t=n.searchable.selected&&n.searchable.selected.id,a=n.picker.date?n.picker.date.toString():null,i=new DayPilot.Date(a).getDatePart(),r=DayPilot.Date.parse(i.toString("yyyy-dd-MM ")+t,"yyyy-dd-MM HH:mm"),o={};return o[e.field]=r,o},n},t.prototype.findRowsByField=function(e){return this.yc.filter(function(t){return t.field===e})},t.prototype.findViewById=function(e,t){return this.f.find(function(n){return n.row.field===e&&("radio"!==n.row.type||n.row.resolved===t)})},t.prototype.firstFocusable=function(){return this.f.find(function(e){return e.canFocus&&e.canFocus()})},t.prototype.updateState=function(e,t){var n=this.zc?this.zc:this.yc,a=n.indexOf(e);return this.zc=n.map(function(n){if(n!==e)return n;if(e.propsEqual(t))return e;var a=e.clone();for(var i in t)a[i]=t[i];return a}),this.zc[a]},t.prototype.updateInteractive=function(e){var t=this.zc.indexOf(e);this.f[t].apply(e)},t.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.zc){this.zc.filter(function(t,n){return e.yc[n]!==t}).forEach(function(t){e.updateInteractive(t)}),this.yc=this.zc,this.zc=null}},t.prototype.getFieldType=function(e){return["text","date","select","searchable","radio","checkbox","table","title","image","html","textarea","scrollable","time","datetime"].indexOf(e.type)!==-1?e.type:e.type&&this.plugins&&this.plugins[e.type]?e.type:e.image?"image":e.html||e.text?"html":e.id?e.options?"searchable":e.dateFormat?"date":e.columns?"table":"text":"title"},t.prototype.serialize=function(){var e={};return this.f.forEach(function(t){var n=t.save();for(var a in n)e[a]=n[a]}),e},n.prototype.clone=function(){var e=new n;for(var t in this)"id"!==t&&(e[t]=this[t]);return e},n.prototype.propsEqual=function(e){for(var t in e)if(this[t]!==e[t])return!1;return!0},n.prototype.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return""+e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},n.prototype.applyValue=function(e,t){this.field===e&&(this.value=t,this.isValue&&t===this.resolved&&(this.checked=!0))},DayPilot.Modal.Experimental={},DayPilot.Modal.Experimental.Form=t,r.prototype.select=function(e){return this.Ic=this.data.find(function(t){return t.id===e}),this.Pc(!1),this},r.prototype.create=function(){function e(e){var n=l.strategy;"includes"!==l.strategy&&"startsWith"!==l.strategy&&(n="includes"),e=e||n||"includes",h.style.display="",h.style.top=v.offsetHeight+"px",h.style.left="0px",h.style.width=v.offsetWidth+"px",h.innerHTML="",h.addEventListener("mousedown",function(e){e.preventDefault()}),l.Jc=null,l.q=[];var i=null;l.data.forEach(function(n){var r=n.name||n.id;if("includes"===e){if(r.toLowerCase().indexOf(v.value.toLowerCase())===-1)return}else if("startsWith"===e&&0!==r.toLowerCase().indexOf(v.value.toLowerCase()))return;var o=document.createElement("div");o.className=l.theme+"_list_item",o.innerText=r,o.item=n,n===l.Ic&&(l.Jc=o),i||(i=o),o.addEventListener("mousedown",function(e){a(o),e.preventDefault()}),o.addEventListener("mousemove",function(){l.Jc!==o&&(l.Jc=o,t({dontScroll:!0}))}),h.appendChild(o),l.q.push(o)}),l.Jc||(l.Jc=i),t()}function t(e){e=e||{};var t=!e.dontScroll;document.querySelectorAll("."+l.theme+"_list_item_highlight").forEach(function(e){e.className=e.className.replace(l.theme+"_list_item_highlight","")}),l.Jc&&(l.Jc.className+=" "+l.theme+"_list_item_highlight",t&&!n(l.Jc,h)&&l.Jc.scrollIntoView())}function n(e,t){var n=e.getBoundingClientRect(),a=t.getBoundingClientRect();return n.top>=a.top&&n.bottom<=a.bottom}function a(e){var t=e.item;l.Ic=t,l.Pc(!0),r(),o()}function i(){l.Oc()}function r(){l.s()}function o(){l.Kc=!0,v.setAttribute("readonly","readonly"),v.focus()}function s(){l.Kc=!1,v.removeAttribute("readonly"),v.select(),e("all")}var l=this,d=this,c=document.createElement("div");c.className=this.theme+"_main",c.style.position="relative";var u=document.createElement("div");u.className=this.theme+"_icon",u.style.position="absolute",u.style.right="0",u.style.top="0",u.style.bottom="0",u.style.width="20px",u.addEventListener("mousedown",function(e){e.preventDefault(),l.Kc?(l.focus(),s()):(i(),o())});var h=document.createElement("div");h.className=this.theme+"_list",h.style.display="none",h.style.position="absolute",h.style.zIndex=this.listZIndex;var f=document.createElement("input");f.type="hidden",f.name=this.name,f.searchable=d,this.Nc=f;var v=document.createElement("input");return v.type="text",v.className=this.theme+"_input",v.disabled=this.Hc,v.addEventListener("click",function(){s()}),v.addEventListener("focus",function(){e("all")}),v.addEventListener("input",function(){e()}),v.addEventListener("blur",function(){v.removeAttribute("readonly"),i()}),v.addEventListener("keydown",function(e){if(l.Kc){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;s()}if("ArrowDown"===e.key){var n=d.q.indexOf(d.Jc);n+1<d.q.length&&(d.Jc=d.q[n+1]),t()}else if("ArrowUp"===e.key){var n=d.q.indexOf(d.Jc);n-1>=0&&(d.Jc=d.q[n-1]),t()}else"Enter"===e.key?l.Jc?(e.stopPropagation(),a(l.Jc)):(e.stopPropagation(),i(),o()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),i(),o())}),this.Lc=v,this.Mc=h,this.Ic||(this.Ic=this.data[0],this.Ic&&(v.value=this.Ic.name)),c.appendChild(v),c.appendChild(u),c.appendChild(f),c.appendChild(h),c},r.prototype.Oc=function(){this.s(),this.Ic?this.Lc.value=this.Ic.name:(this.Lc.value="",this.Pc(!0))},r.prototype.focus=function(){this.Kc=!0,this.Lc.setAttribute("readonly","readonly"),this.Lc.focus(),this.Oc()},r.prototype.s=function(){this.Mc.style.display="none"},r.prototype.Pc=function(e){if(this.Nc.value=this.selected?this.selected.id:null,this.Ic?this.Lc.value=this.Ic.name:this.Lc.value="","function"==typeof this.onSelect){var t={control:this,ui:e};this.onSelect(t)}},o.prototype.create=function(){var e=this,t=document.createElement("div");t.className=this.theme+"_main",t.style.position="relative";var n=document.createElement("input");n.type="hidden",n.name=e.name,n.table=this,t.appendChild(n);var a=document.createElement("div");a.className=this.theme+"_table";var i=this.Rc();a.appendChild(i);var r=e.Sc({});r.spacer=!0;var o=this.Tc(r);o.classList.add(e.theme+"_spacer"),a.appendChild(o);var s=document.createElement("div");s.className=e.theme+"_tbody",a.appendChild(s),t.appendChild(a);var l=document.createElement("div");t.appendChild(l),this.nav.body=s,this.nav.table=a,this.nav.main=t,this.nav.after=l;var d=document.createElement("div"),c=document.createElement("span");return c.className=this.theme+"_plus",c.addEventListener("click",function(){if(!e.disabled){var t=e.item.onNewRow,n={};if("function"==typeof t){var a={};a.result=e.form.serialize(),a.value={},t(a),n=a.value}var i=e.Sc(n);e.yc.push(i),e.Uc(),e.Vc()}}),this.nav.plus=c,d.appendChild(c),t.appendChild(d),t},o.prototype.Rc=function(){var e=this,t=document.createElement("div");return t.classList.add(this.theme+"_row"),t.classList.add(this.theme+"_header"),this.item.columns.forEach(function(n){var a=document.createElement("div");a.classList.add(e.theme+"_cell"),a.innerText=n.name,t.appendChild(a)}),t},o.prototype.Wc=function(){var e=this.item.max||0;return!!(e&&this.yc.length>=e)},o.prototype.save=function(){var e=this,t=[];return e.yc.forEach(function(e){var n={};e.cells.forEach(function(e){n[e.id]=e.value}),t.push(n)}),t},o.prototype.load=function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Array expected");this.data=e,this.Xc(),this.Uc()},o.prototype.Yc=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.Wc()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},o.prototype.Xc=function(){var e=this;this.yc=[],this.data.forEach(function(t){var n=e.Sc(t);e.yc.push(n)})},o.prototype.Zc=function(e){var t=this,n=t.yc.indexOf(e);t.yc.splice(n,1)},o.prototype.Sc=function(e){var t=this,n={};return n.data=e,n.cells=[],t.item.columns.forEach(function(a){var i=a.id,r=e[i],o=t.$c(a);if("undefined"==typeof r)if("text"===o)r="";else if("number"===o)r=0;else if("select"===o){var s=a.options;r=s&&s[0].id}var l={};l.id=i,l.value=r,l.type=o,l.data=a,n.cells.push(l)}),n},o.prototype.$c=function(e){var t=e.type;return t||(t=e.options?"select":"text"),t},o.prototype.Uc=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.yc.forEach(function(t){var n=e.Tc(t);e.nav.body.appendChild(n)}),0===this.yc.length){var t=e._c();e.nav.after.appendChild(t)}this.Yc()},o.prototype._c=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},o.prototype.Tc=function(e){var t=this,n=document.createElement("div");n.className=t.theme+"_row",e.cells.forEach(function(a){var i=document.createElement("div");i.className=t.theme+"_cell";var r=t.ad(a);if(e.spacer){var o=document.createElement("div");o.style.height="0px",o.style.overflow="hidden",o.appendChild(r),i.appendChild(o)}else i.appendChild(r);n.appendChild(i)});var a=document.createElement("div");a.classList.add(t.theme+"_cell"),a.classList.add(t.theme+"_rowaction");var i=document.createElement("span");return i.className=this.theme+"_delete",i.addEventListener("click",function(){t.disabled||(t.Zc(e),t.Uc(),t.Vc())}),e.spacer||a.appendChild(i),n.appendChild(a),n},o.prototype.Vc=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},o.prototype.ad=function(e){var t=this,n=e.type;if("text"===n||"number"===n){var a=document.createElement("input");return a.type=n,t.disabled&&(a.disabled=!0),e.value&&(a.value=e.value),a.addEventListener("keyup",function(){"number"===n?e.value=Number(this.value):e.value=this.value,t.Vc()}),a}if("select"===n){var i=document.createElement("select");return t.disabled&&(i.disabled=!0),e.data.options.forEach(function(t){var n=document.createElement("option");n.innerText=t.name,n.value=t.id,n.Gc=t.id,i.appendChild(n),e.value===t.id&&n.setAttribute("selected",!0)}),i.addEventListener("change",function(){var n=i.options[i.selectedIndex];n&&"undefined"!=typeof n.Gc&&(e.value=n.Gc),t.Vc()}),i}throw new Error("Unsupported item type: "+n)},o.prototype.focus=function(){}}}(DayPilot),function(DayPilot){if("undefined"==typeof DayPilot.Month||!DayPilot.Month.events){var e={},t=DayPilot.Util.isVueVNode;e.Month=function(n,a){this.v="${v}",this.nav={};var i=this;this.id=n,this.isMonth=!0,this.api=2,this.backendUrl=null,this.cellHeaderHeight=24,this.cellHeight=100,this.cellMarginBottom=0,this.contextMenu=null,this.cssClassPrefix="month_default",this.eventBarVisible=!0,this.eventBorderRadius=null,this.eventHeight=25,this.eventsLoadMethod="GET",this.headerHeight=30,this.hideUntilInit=!0,this.lineSpace=1,this.locale="en-us",this.showToolTip=!0,this.startDate=new DayPilot.Date,this.theme=null,this.visible=!0,this.weekStarts="Auto",this.width="100%",this.xssProtection="Enabled",this.afterRender=function(){},this.cellHeaderClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventDeleteHandling="Disabled",this.eventMoveHandling="Update",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.headerClickHandling="Enabled",this.timeRangeSelectedHandling="Enabled",this.onCellHeaderClick=null,this.onCellHeaderClicked=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.onBeforeEventRender=null,this.onBeforeCellRender=null,this.cellEvents=[],this.elements={},this.elements.events=[],this.cache={},this.Q=!1,this.R={};var r=this.R;this.X=function(e){var t=JSON.parse(e);return t.CallBackRedirect?void(document.location.href=t.CallBackRedirect):"None"===t.UpdateType?void i.fireAfterRenderDetached(t.CallBackData,!0):(i.events.list=t.Events,"Full"===t.UpdateType&&(i.startDate=t.StartDate,i.timeFormat=t.TimeFormat?t.TimeFormat:i.timeFormat,"undefined"!=typeof t.WeekStarts&&(i.weekStarts=t.WeekStarts),i.hashes=t.Hashes),i.Z(),i.bd(),i.ha(),"Full"===t.UpdateType&&(i.cd(),i.dd()),i.ma(),i.show(),i.na(),void i.fireAfterRenderDetached(t.CallBackData,!0))},this.fireAfterRenderDetached=function(e,t){var n=function(e,t){return function(){i.afterRender&&i.afterRender(e,t)}};window.setTimeout(n(e,t),0)},this.lineHeight=function(){return this.eventHeight+this.lineSpace},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Month.events.add() expects an object or DayPilot.Event instance.";t=e}i.events.list||(i.events.list=[]),i.events.list.push(t),i.update(),i.wa.notify()},this.events.find=function(e){if(!i.events.list)return null;if("function"==typeof e){for(var t=e,n=0;n<i.events.list.length;n++){var a=new DayPilot.Event(i.events.list[n],i);if(t(a))return a}return null}for(var n=0;n<i.events.list.length;n++){var r=i.events.list[n];if(r.id===e)return new DayPilot.Event(r,i)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=i.events.find(e.id);if(t){var n=DayPilot.indexOf(i.events.list,t.data);i.events.list.splice(n,1,e)}}i.update(),i.wa.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var n=i.events.find(e.id);n&&(t=n.data)}else if("string"==typeof e||"number"==typeof e){var n=i.events.find(e);n&&(t=n.data)}var a=DayPilot.indexOf(i.events.list,t);i.events.list.splice(a,1),i.update(),i.wa.notify()},this.events.load=function(e,t,n){var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},r=function(e){var n,r=e.request;try{n=JSON.parse(r.responseText)}catch(e){var o={};return o.exception=e,void a(o)}if(DayPilot.isArray(n)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=n,"function"==typeof t&&t(s),s.preventDefault.value)return;i.events.list=n,i.La&&i.update()}};if(i.eventsLoadMethod&&"POST"===i.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":i.visibleStart().toString(),"end":i.visibleEnd().toString()},"url":e,"success":r,"error":a});else{var o=e,s="start="+i.visibleStart().toString()+"&end="+i.visibleEnd().toString();o+=o.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":o,"success":r,"error":a})}},this.events.forRange=function(e,t){e=new DayPilot.Date(e),t=new DayPilot.Date(t);var n=(i.events.list||[]).map(function(e){return new DayPilot.Event(e)});return n.sort(i.zb),n.filter(function(n){var a=n.start(),i=n.end();return a===i&&a===e||DayPilot.Util.overlaps(e,t,a,i)})},this.update=function(e){if(i.sb(e),this.La){if(i.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Month instance that has been disposed.");if(this.cells){i.Z(),i.bd(),i.ha(),i.cd(),i.dd(),i.ma(),i.u(),i.na(),this.visible?this.show():this.hide()}}},this.ub=null,this.sb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?i.events.list=e.list:i.events.list=e}}};this.ub=t;for(var n in e)if(t[n]){var a=t[n];a.data=e[n],a.preInit&&a.preInit()}else i[n]=e[n]}},this.vb=function(){var e=this.ub;for(var t in e){var n=e[t];n.postInit&&n.postInit()}},this.xb={},this.xb.events=[],this.yb=function(e){var t=this.xb.events,n=this.events.list[e],a={};for(var r in n)a[r]=n[r];if("function"==typeof this.onBeforeEventRender){var o={};o.control=i,o.data=a,this.onBeforeEventRender(o)}t[e]=a},this.ha=function(){var e=this.events.list;if(e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Month.events.list expects an array object. You supplied: "+typeof e);if("function"==typeof this.onBeforeEventRender)for(var t=0;t<e.length;t++)this.yb(t);for(var n=0;n<e.length;n++){var a=e[n];if("object"!=typeof a)throw new DayPilot.Exception("Event data item must be an object");if(!a.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!a.end)throw new DayPilot.Exception("Event data item must specify 'end' property");var i=new DayPilot.Date(a.start),r=new DayPilot.Date(a.end);if(!(i.getTime()>r.getTime()))for(var t=0;t<this.rows.length;t++){var o=this.rows[t],s=new DayPilot.Event(a,this);o.belongsHere(s)&&(o.events.push(s),"function"==typeof this.onBeforeEventRender&&(s.cache=this.xb.events[n]))}}for(var l=0;l<this.rows.length;l++){var o=this.rows[l];o.events.sort(this.zb);for(var d=0;d<this.rows[l].events.length;d++){var c=o.events[d],u=o.getStartColumn(c),h=o.getWidth(c);o.putIntoLine(c,u,h,l)}}}},this.Z=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];i.Oa(t)}this.elements.events=[]},this.Oa=function(e){!function(){var n=e.domArgs;if(e.domArgs=null,n&&"function"==typeof i.onBeforeEventDomRemove&&i.onBeforeEventDomRemove(n),n&&"function"==typeof i.onBeforeEventDomAdd){var a=n&&n.Pa;if(a){i.Ra.Qa&&t(n.element)&&(i.Ra.Sa=!0,i.Ra.Ta(a),i.Ra.Sa=!1)}}}(),e.event=null,e.click=null,e.parentNode.removeChild(e)},this.na=function(){this.ed()},this.ed=function(){this.elements.events=[];for(var e=0;e<this.rows.length;e++)for(var t=this.rows[e],n=0;n<t.lines.length;n++)for(var a=t.lines[n],i=0;i<a.length;i++)this.Ua(a[i])},this.zb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var n=e.start().getTime()-t.start().getTime();return 0!==n?n:t.end().getTime()-e.end().getTime()},this.drawShadow=function(t,n,a,r,o){o||(o=0);var s=r;this.shadow={},this.shadow.list=[],this.shadow.start={x:t,y:n},this.shadow.width=r;var l=7*n+t-o;l<0&&(s+=l,t=0,n=0);for(var d=o;d>=7;)n--,d-=7;if(d>t){d>t+(7-this.getColCount())?(n--,t=t+7-d):(s=s-d+t,t=0)}else t-=d;n<0&&(n=0,t=0);var c=null;e.resizingEvent?c="w-resize":e.movingEvent&&(c="move"),this.nav.top.style.cursor=c;var u=i.eventBorderRadius;for("number"==typeof u&&(u+="px");s>0&&n<this.rows.length;){var h=Math.min(this.getColCount()-t,s),f=this.rows[n],v=this.getRowTop(n),p=f.getHeight(),m=document.createElement("div");m.setAttribute("unselectable","on"),m.style.position="absolute",m.style.left=this.getCellWidth()*t+"%",m.style.width=this.getCellWidth()*h+"%",m.style.top=v+"px",m.style.height=p+"px",m.style.cursor=c,m.classList.add(i.L("_shadow"));var g=document.createElement("div");g.setAttribute("unselectable","on"),m.appendChild(g),g.style.position="absolute",g.style.top="0px",g.style.right="0px",g.style.left="0px",g.style.bottom="0px",g.classList.add(i.L("_shadow_inner")),u&&(s===r&&(m.style.borderTopLeftRadius=u,m.style.borderBottomLeftRadius=u,g.style.borderTopLeftRadius=u,g.style.borderBottomLeftRadius=u),s<=h&&(m.style.borderTopRightRadius=u,m.style.borderBottomRightRadius=u,g.style.borderTopRightRadius=u,g.style.borderBottomRightRadius=u)),this.nav.top.appendChild(m),this.shadow.list.push(m),s-=h+7-this.getColCount(),t=0,n++}},this.clearShadow=function(){if(this.shadow){for(var e=0;e<this.shadow.list.length;e++)this.nav.top.removeChild(this.shadow.list[e]);this.shadow=null,this.nav.top.style.cursor=""}},this.getEventTop=function(e,t){for(var n=this.headerHeight,a=0;a<e;a++)n+=this.rows[a].getHeight();return n+=this.cellHeaderHeight,n+=t*this.lineHeight()},this.getDateFromCell=function(e,t){return this.firstDate.addDays(7*t+e)},this.Ua=function(n){var a=n.cache||n.data,r=a.borderRadius||i.eventBorderRadius;"number"==typeof r&&(r+="px");var o=n.part.row,s=n.part.line,l=n.part.colStart,d=n.part.colWidth,c=this.getCellWidth()*l,u=this.getCellWidth()*d,h=this.getEventTop(o,s),f=document.createElement("div");f.setAttribute("unselectable","on"),f.style.height=this.eventHeight+"px",f.style.overflow="hidden",f.className=this.L("_event"),a.cssClass&&DayPilot.Util.addClass(f,a.cssClass),n.part.startsHere||DayPilot.Util.addClass(f,this.L("_event_continueleft")),n.part.endsHere||DayPilot.Util.addClass(f,this.L("_event_continueright")),f.event=n,f.style.width=u+"%",f.style.position="absolute",f.style.left=c+"%",f.style.top=h+"px",this.showToolTip&&n.client.toolTip()&&(f.title=n.client.toolTip()),f.onclick=i.va,f.oncontextmenu=i.fd,f.onmousedown=function(t){t=t||window.event;var a=t.which||t.button;if(t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),1===a)if(e.movingEvent=null,"w-resize"===this.style.cursor||"e-resize"===this.style.cursor){var r={};r.start={},r.start.x=l,r.start.y=o,r.event=f.event,r.width=DayPilot.DateUtil.daysSpan(r.event.start(),r.event.end())+1,r.direction=this.style.cursor,e.resizingEvent=r}else if("move"===this.style.cursor||n.client.moveEnabled()){i.clearShadow();var c=DayPilot.mo3(i.nav.top,t);if(!c)return;var u=i.getCellBelowPoint(c.x,c.y),h=DayPilot.DateUtil.daysDiff(n.start(),i.rows[o].start),v=7*u.y+u.x-(7*o+l);h&&(v+=h);var p={};p.start={},p.start.x=l,p.start.y=o,p.start.line=s,p.offset=i.eventMoveToPosition?0:v,p.colWidth=d,p.event=f.event,p.coords=c,e.movingEvent=p}},f.onmousemove=function(t){if("undefined"!=typeof e&&!e.movingEvent&&!e.resizingEvent){var a=DayPilot.mo3(f,t);if(a){f.deleteIcon&&(f.deleteIcon.style.display="");var i=6;a.x<=i&&n.client.resizeEnabled()?n.part.startsHere?(f.style.cursor="w-resize",f.dpBorder="left"):f.style.cursor="not-allowed":f.clientWidth-a.x<=i&&n.client.resizeEnabled()?n.part.endsHere?(f.style.cursor="e-resize",f.dpBorder="right"):f.style.cursor="not-allowed":n.client.clickEnabled()?f.style.cursor="pointer":f.style.cursor="default"}}},f.onmouseleave=function(){f.deleteIcon&&(f.deleteIcon.style.display="none"),f.style.cursor=""},f.onmouseenter=function(){f.deleteIcon&&(f.deleteIcon.style.display="")};var v=document.createElement("div");if(v.setAttribute("unselectable","on"),v.className=this.L("_event_inner"),
|
|
16
|
-
"darker"===a.borderColor&&a.backColor?v.style.borderColor=DayPilot.ColorUtil.darker(a.backColor,2):v.style.borderColor=a.borderColor,a.backColor&&(v.style.background=a.backColor),a.fontColor&&(v.style.color=a.fontColor),r&&(f.style.borderRadius=r,v.style.borderRadius=r),f.appendChild(v),n.client.barVisible()){var p=document.createElement("div");p.setAttribute("unselectable","on"),p.className=this.L("_event_bar"),p.style.position="absolute";var m=document.createElement("div");m.setAttribute("unselectable","on"),m.className=this.L("_event_bar_inner"),m.style.top="0%",m.style.height="100%",a.barColor&&(m.style.backgroundColor=a.barColor),p.appendChild(m),f.appendChild(p)}if(n.client.deleteEnabled()){var g=Math.floor(i.eventHeight/2-9),y=document.createElement("div");y.style.position="absolute",y.style.right="2px",y.style.top=g+"px",y.style.width="18px",y.style.height="18px",y.className=i.L("_event_delete"),y.onmousedown=function(e){e.stopPropagation()},y.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&i.ya(t)},y.style.display="none",f.deleteIcon=y,f.appendChild(y)}var b=a.areas?DayPilot.Areas.copy(a.areas):[];if(DayPilot.Areas.attach(f,n,{"areas":b}),"function"==typeof i.onAfterEventRender){var w={};w.e=f.event,w.div=f,i.onAfterEventRender(w)}!function(){var e={};if(e.control=i,e.e=n,e.element=null,f.domArgs=e,"function"==typeof i.onBeforeEventDomAdd&&i.onBeforeEventDomAdd(e),e.element){var a=v;if(a){e.Pa=a;if(t(e.element)){if(!i.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");i.Ra.Sa=!0,i.Ra.Va(e.element,a,{"style":{"flexGrow":1}}),i.Ra.Sa=!1}else a.appendChild(e.element)}}else v.innerHTML=n.client.innerHTML()}(),this.elements.events.push(f),this.nav.events.appendChild(f)},this.lastVisibleDayOfMonth=function(){return this.startDate.lastDayOfMonth()},this.bd=function(){"string"==typeof this.startDate&&(this.startDate=new DayPilot.Date(this.startDate)),this.startDate=this.startDate.firstDayOfMonth(),this.firstDate=this.startDate.firstDayOfWeek(this.getWeekStart());var e=this.lastVisibleDayOfMonth(),t=DayPilot.DateUtil.daysDiff(this.firstDate,e)+1,n=Math.ceil(t/7);this.days=7*n,this.rows=[];for(var a=function(e){var t={};t.start=r.firstDate.addDays(7*e),t.end=t.start.addDays(r.getColCount()),t.events=[],t.lines=[],t.index=e,t.minHeight=r.cellHeight,t.calendar=r,t.belongsHere=function(e){return e.end().getTime()===e.start().getTime()&&e.start().getTime()===this.start.getTime()||!(e.end().getTime()<=this.start.getTime()||e.start().getTime()>=this.end.getTime())},t.getPartStart=function(e){return DayPilot.DateUtil.max(this.start,e.start())},t.getPartEnd=function(e){return DayPilot.DateUtil.min(this.end,e.end())},t.getStartColumn=function(e){var t=this.getPartStart(e);return DayPilot.DateUtil.daysDiff(this.start,t)},t.getWidth=function(e){return DayPilot.DateUtil.daysSpan(this.getPartStart(e),this.getPartEnd(e))+1},t.putIntoLine=function(e,n,a,i){for(var r=t,o=0;o<this.lines.length;o++){var s=this.lines[o];if(s.isFree(n,a))return s.addEvent(e,n,a,i,o),o}var l=[];return l.isFree=function(e,t){for(var n=!0,a=0;a<this.length;a++)e+t-1<this[a].part.colStart||e>this[a].part.colStart+this[a].part.colWidth-1||(n=!1);return n},l.addEvent=function(e,t,n,a,i){e.part.colStart=t,e.part.colWidth=n,e.part.row=a,e.part.line=i,e.part.startsHere=r.start.getTime()<=e.start().getTime(),e.part.endsHere=r.end.getTime()>=e.end().getTime(),this.push(e)},l.addEvent(e,n,a,i,this.lines.length),this.lines.push(l),this.lines.length-1},t.getHeight=function(){return Math.max(this.lines.length*i.lineHeight()+i.cellHeaderHeight+i.cellMarginBottom,this.calendar.cellHeight)},r.rows.push(t)},r=this,o=0;o<n;o++)a(o);this.endDate=this.firstDate.addDays(7*n)},this.visibleStart=function(){return i.firstDate},this.visibleEnd=function(){return i.endDate},this.getHeight=function(){for(var e=this.headerHeight,t=0;t<this.rows.length;t++)e+=this.rows[t].getHeight();return e},this.getWidth=function(e,t){return 7*t.y+t.x-(7*e.y+e.x)+1},this.getMinCoords=function(e,t){return 7*e.y+e.x<7*t.y+t.x?e:t},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Wa=function(){var t=this.nav.top;t.setAttribute("unselectable","on"),t.style.MozUserSelect="none",t.style.KhtmlUserSelect="none",t.style.WebkitUserSelect="none",t.style.position="relative",this.width&&(t.style.width=this.width),t.style.height=this.getHeight()+"px",t.onselectstart=function(){return!1},this.hideUntilInit&&(t.style.visibility="hidden"),this.visible||(t.style.display="none"),t.className=this.L("_main");var n=document.createElement("div");this.nav.cells=n,n.style.position="absolute",n.style.left="0px",n.style.right="0px",n.setAttribute("unselectable","on"),t.appendChild(n);var a=document.createElement("div");this.nav.events=a,a.style.position="absolute",a.style.left="0px",a.style.right="0px",a.setAttribute("unselectable","on"),t.appendChild(a),t.onmousemove=function(t){if(e.resizingEvent){var n=DayPilot.mo3(i.nav.top,t);if(!n)return;var a=i.getCellBelowPoint(n.x,n.y);i.clearShadow();var r=e.resizingEvent,o=void 0,s=void 0;if("w-resize"===r.direction){s=a;var l=r.event.end();l.getDatePart()===l&&(l=l.addDays(-1));var d=i.getCellFromDate(l);o=i.getWidth(a,d)}else s=i.getCellFromDate(r.event.start()),o=i.getWidth(s,a);o<1&&(o=1),i.drawShadow(s.x,s.y,0,o)}else if(e.movingEvent){var n=DayPilot.mo3(i.nav.top,t);if(!n)return;if(n.x===e.movingEvent.coords.x&&n.y===e.movingEvent.coords.y)return;var c=3,u=Math.abs(n.x-e.movingEvent.coords.x)+Math.abs(n.y-e.movingEvent.coords.y);if(u<=c)return;var a=i.getCellBelowPoint(n.x,n.y);i.clearShadow();var h=e.movingEvent.event,f=e.movingEvent.offset,o=i.cellMode?1:DayPilot.DateUtil.daysSpan(h.start(),h.end())+1;o<1&&(o=1),i.drawShadow(a.x,a.y,0,o,f,h)}else if(e.timeRangeSelecting){var n=DayPilot.mo3(i.nav.top,t);if(!n)return;var a=i.getCellBelowPoint(n.x,n.y);i.clearShadow();var s=e.timeRangeSelecting,v=7*s.y+s.x,p=7*a.y+a.x,o=Math.abs(p-v)+1;o<1&&(o=1);var m=v<p?s:a;e.timeRangeSelecting.from={x:m.x,y:m.y},e.timeRangeSelecting.width=o,e.timeRangeSelecting.moved=!0,i.drawShadow(m.x,m.y,0,o,0,null)}}},this.ma=function(){this.nav.top.style.height=this.getHeight()+"px";for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++)this.cells[e][t].style.top=this.getRowTop(t)+"px",this.cells[e][t].style.height=this.rows[t].getHeight()+"px"},this.getCellBelowPoint=function(e,t){for(var n=Math.floor(this.nav.top.clientWidth/this.getColCount()),a=Math.min(Math.floor(e/n),this.getColCount()-1),i=null,r=this.headerHeight,o=0,s=0;s<this.rows.length;s++){var l=r;if(r+=this.rows[s].getHeight(),t<r){o=t-l,i=s;break}}null===i&&(i=this.rows.length-1);var d={};return d.x=a,d.y=i,d.relativeY=o,d},this.getCellFromDate=function(e){for(var t=DayPilot.DateUtil.daysDiff(this.firstDate,e),n={x:0,y:0};t>=7;)n.y++,t-=7;return n.x=t,n},this.dd=function(){var e=document.createElement("div");e.oncontextmenu=function(){return!1},this.nav.cells.appendChild(e),this.cells=[];for(var t=0;t<this.getColCount();t++){this.cells[t]=[];var n=document.createElement("div");n.setAttribute("unselectable","on"),n.style.position="absolute",n.style.left=this.getCellWidth()*t+"%",n.style.width=this.getCellWidth()+"%",n.style.top="0px",n.style.height=this.headerHeight+"px";var a=t+this.getWeekStart();a>6&&(a-=7),n.className=this.L("_header");var i=document.createElement("div");i.setAttribute("unselectable","on"),i.innerHTML=r.locale().dayNames[a],n.appendChild(i),i.style.position="absolute",i.style.top="0px",i.style.bottom="0px",i.style.left="0px",i.style.right="0px",i.className=this.L("_header_inner"),i.innerHTML=r.locale().dayNames[a],e.appendChild(n);for(var o=0;o<this.rows.length;o++)this.gd(t,o,e)}},this.cd=function(){for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++){var n=i.cells[e][t];i.fb(n)}this.nav.cells.innerHTML=""},this.fb=function(e){!function(){var n=e.domArgs;if(e.domArgs=null,n&&"function"==typeof i.onBeforeCellDomRemove&&i.onBeforeCellDomRemove(n),n&&"function"==typeof i.onBeforeCellDomAdd){var a=n&&n.Pa;if(a){i.Ra.Qa&&t(n.element)&&(i.Ra.Sa=!0,i.Ra.Ta(a),i.Ra.Sa=!1)}}}(),e.onclick=null},this.ta=function(){return 2===i.api},this.gd=function(n,a,o){var s=this.rows[a],l=this.firstDate.addDays(7*a+n),d=l.getDay(),c=null;c=1===d?r.locale().monthNames[l.getMonth()]+" "+d:""+d;var u=!i.isWeekend(l),h={"start":l,"end":l.addDays(1),"properties":{"headerHtml":c,"backColor":null,"business":u,"html":null}},f={};f.control=i,f.cell=h,"function"==typeof i.onBeforeCellRender&&i.onBeforeCellRender(f);var v=f.cell.properties,p=document.createElement("div");if(p.setAttribute("unselectable","on"),p.style.position="absolute",p.style.cursor="default",p.style.left=this.getCellWidth()*n+"%",p.style.width=this.getCellWidth()+"%",p.style.top=this.getRowTop(a)+"px",p.style.height=s.getHeight()+"px",p.className=this.L("_cell"),v.business){var m=this.L("_cell_business");DayPilot.Util.addClass(p,m)}var g=document.createElement("div");g.setAttribute("unselectable","on"),p.appendChild(g),g.style.position="absolute",g.style.left="0px",g.style.right="0px",g.style.top="0px",g.style.bottom="0px",g.className=this.L("_cell_inner"),v.backColor&&(g.style.backgroundColor=f.cell.properties.backColor),p.onmousedown=function(){"Disabled"!==i.timeRangeSelectedHandling&&(i.clearShadow(),e.timeRangeSelecting={"root":i,"x":n,"y":a,"from":{x:n,y:a},"width":1})},p.onclick=function(){var e=function(e){var t=new DayPilot.Date(e),n=t.addDays(1);i.O(t,n)};if("Disabled"!==i.timeRangeSelectedHandling)return void e(l)};var y=document.createElement("div");if(y.setAttribute("unselectable","on"),y.style.height=this.cellHeaderHeight+"px",y.className=this.L("_cell_header"),y.onclick=function(e){if("Enabled"===i.cellHeaderClickHandling){e.stopPropagation();var t={};t.control=i,t.start=l,t.end=l.addDays(1),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onCellHeaderClick&&(i.onCellHeaderClick(t),t.preventDefault.value)||"function"==typeof i.onCellHeaderClicked&&i.onCellHeaderClicked(t)}},y.innerHTML=v.headerHtml,g.appendChild(y),v.html){var b=document.createElement("div");b.style.height=s.getHeight()-this.cellHeaderHeight+"px",b.style.overflow="hidden",b.innerHTML=v.html,g.appendChild(b)}!function(){if("function"==typeof i.onBeforeCellDomAdd||"function"==typeof i.onBeforeCellDomRemove){var e={};if(e.control=i,e.cell=h,e.element=null,p.domArgs=e,"function"==typeof i.onBeforeCellDomAdd&&i.onBeforeCellDomAdd(e),e.element){var n=g;if(n){e.Pa=n;if(t(e.element)){if(!i.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");i.Ra.Sa=!0,i.Ra.Va(e.element,n),i.Ra.Sa=!1}else n.appendChild(e.element)}}}}(),this.cells[n][a]=p,o.appendChild(p)},this.getWeekStart=function(){if("Auto"===i.weekStarts){var e=r.locale();return e?e.weekStarts:0}return i.weekStarts||0},this.getColCount=function(){return 7},this.getCellWidth=function(){return 14.285},this.getRowTop=function(e){for(var t=this.headerHeight,n=0;n<e;n++)t+=this.rows[n].getHeight();return t},this.V=function(e,t,n){var a={};a.action=e,a.parameters=n,a.data=t,a.header=this.U();var i="JSON"+JSON.stringify(a);this.backendUrl&&DayPilot.request(this.backendUrl,this.W,i,this.ajaxError)},this.W=function(e){i.X(e.responseText)},this.U=function(){var e={};return e.control="dpm",e.id=this.id,e.v=this.v,e.visibleStart=new DayPilot.Date(this.firstDate),e.visibleEnd=e.visibleStart.addDays(this.days),e.startDate=i.startDate,e.timeFormat=this.timeFormat,e.weekStarts=this.weekStarts,e},this.eventClickCallBack=function(e,t){this.V("EventClick",t,e)},this.va=function(t){e.movingEvent=null,e.resizingEvent=null;var n=t.currentTarget;t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),i.eventClickSingle(n,t)},this.eventClickSingle=function(e,t){var n=e.event;if(n&&n.client.clickEnabled())if(i.ta()){var a={};if(a.e=n,a.control=i,a.div=e,a.originalEvent=t,a.meta=t.metaKey,a.ctrl=t.ctrlKey,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onEventClick&&(i.wa.apply(function(){i.onEventClick(a)}),a.preventDefault.value))return;switch(i.eventClickHandling){case"CallBack":i.eventClickCallBack(n);break;case"ContextMenu":var r=n.client.contextMenu();r?r.show(n):i.contextMenu&&i.contextMenu.show(n)}"function"==typeof i.onEventClicked&&i.wa.apply(function(){i.onEventClicked(a)})}else switch(i.eventClickHandling){case"CallBack":i.eventClickCallBack(n);break;case"JavaScript":i.onEventClick(n)}},this.fd=function(e){var t=e.currentTarget;return i.xa(t.event),!1},this.xa=function(e){if(this.event=e,!e.client.rightClickEnabled())return!1;var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},"function"!=typeof i.onEventRightClick||(i.onEventRightClick(t),!t.preventDefault.value)){switch(i.eventRightClickHandling){case"ContextMenu":var n=e.client.contextMenu();n?n.show(e):i.contextMenu&&i.contextMenu.show(this.event)}return"function"==typeof i.onEventRightClicked&&i.onEventRightClicked(t),!1}},this.ya=function(e){if(i.ta()){var t={};if(t.e=e,t.control=i,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onEventDelete&&(i.wa.apply(function(){i.onEventDelete(t)}),t.preventDefault.value))return;switch(i.eventDeleteHandling){case"CallBack":i.eventDeleteCallBack(e);break;case"PostBack":i.eventDeletePostBack(e);break;case"Update":i.events.remove(e)}"function"==typeof i.onEventDeleted&&i.wa.apply(function(){i.onEventDeleted(t)})}else switch(i.eventDeleteHandling){case"PostBack":i.eventDeletePostBack(e);break;case"CallBack":i.eventDeleteCallBack(e);break;case"JavaScript":i.onEventDelete(e)}},this.eventDeleteCallBack=function(e,t){this.V("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.T("EventDelete",t,e)},this.eventMoveCallBack=function(e,t,n,a,i){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var r={};r.e=e,r.newStart=t,r.newEnd=n,r.position=i,this.V("EventMove",a,r)},this.M=function(e,t,n,a,r){var o=e.start().getTimePart(),s=e.end().getDatePart();s.getTime()!==e.end().getTime()&&(s=s.addDays(1));var l=DayPilot.DateUtil.diff(e.end(),s),d=this.getDateFromCell(t,n);d=d.addDays(-a);var c=DayPilot.DateUtil.daysSpan(e.start(),e.end())+1,u=d.addDays(c),h=d.addTime(o),f=u.addTime(l);if(i.ta()){var v={};if(v.e=e,v.control=i,v.newStart=h,v.newEnd=f,v.ctrl=r.ctrlKey,v.shift=r.shiftKey,v.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onEventMove&&(i.wa.apply(function(){i.onEventMove(v)}),v.preventDefault.value))return;switch(i.eventMoveHandling){case"CallBack":i.eventMoveCallBack(e,h,f);break;case"Update":e.start(h),e.end(f),i.events.update(e)}"function"==typeof i.onEventMoved&&i.wa.apply(function(){i.onEventMoved(v)})}else switch(i.eventMoveHandling){case"CallBack":i.eventMoveCallBack(e,h,f);break;case"JavaScript":i.onEventMove(e,h,f)}},this.eventResizeCallBack=function(e,t,n,a){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var i={};i.e=e,i.newStart=t,i.newEnd=n,this.V("EventResize",a,i)},this.K=function(e,t,n){var a=e.start().getTimePart(),r=e.end().getDatePart();r.getTime()!==e.end().getTime()&&(r=r.addDays(1));var o=DayPilot.DateUtil.diff(e.end(),r),s=this.getDateFromCell(t.x,t.y),l=s.addDays(n),d=s.addTime(a),c=l.addTime(o);if(i.ta()){var u={};if(u.e=e,u.control=i,u.newStart=d,u.newEnd=c,u.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onEventResize&&(i.wa.apply(function(){i.onEventResize(u)}),u.preventDefault.value))return;switch(i.eventResizeHandling){case"CallBack":i.eventResizeCallBack(e,d,c);break;case"Update":e.start(d),e.end(c),i.events.update(e)}"function"==typeof i.onEventResized&&i.wa.apply(function(){i.onEventResized(u)})}else switch(i.eventResizeHandling){case"CallBack":i.eventResizeCallBack(e,d,c);break;case"JavaScript":i.onEventResize(e,d,c)}},this.timeRangeSelectedCallBack=function(e,t,n){var a={};a.start=e,a.end=t,this.V("TimeRangeSelected",n,a)},this.O=function(e,t){if(this.ta()){var n={};if(n.control=i,n.start=e,n.end=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.wa.apply(function(){i.onTimeRangeSelect(n)}),n.preventDefault.value))return;switch(i.timeRangeSelectedHandling){case"CallBack":i.timeRangeSelectedCallBack(e,t)}"function"==typeof i.onTimeRangeSelected&&i.wa.apply(function(){i.onTimeRangeSelected(n)})}else switch(i.timeRangeSelectedHandling){case"CallBack":i.timeRangeSelectedCallBack(e,t);break;case"JavaScript":i.onTimeRangeSelected(e,t)}},this.wa={},this.wa.scope=null,this.wa.notify=function(){i.wa.scope&&i.wa.scope["$apply"]()},this.wa.apply=function(e){e()},this.clearSelection=function(){i.clearShadow()},this.commandCallBack=function(e,t){var n={};n.command=e,this.V("Command",t,n)},this.isWeekend=function(e){return e=new DayPilot.Date(e),0===e.dayOfWeek()||6===e.dayOfWeek()},this.R.locale=function(){var e=DayPilot.Locale.find(i.locale);return e?e:DayPilot.Locale.US},this.R.da=function(){return"Disabled"!==i.xssProtection},this.debug=function(e){this.debuggingEnabled&&(i.debugMessages||(i.debugMessages=[]),i.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.dispose=function(){var e=i;e.Q||(e.Q=!0,e.cd(),e.Z(),e.nav.top.removeAttribute("style"),e.nav.top.removeAttribute("class"),e.nav.top.innerHTML="",e.nav.top.dp=null,e.nav.top.onmousemove=null,e.nav.top=null)},this.disposed=function(){return this.Q},this.pb=function(){e.globalHandlers||(e.globalHandlers=!0,DayPilot.re(document,"mouseup",e.gMouseUp))},this.loadFromServer=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof i.events.list||!i.events.list)},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){i.visible=!0,i.nav.top.style.display=""},this.hide=function(){i.visible=!1,i.nav.top.style.display="none"},this.wb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Month() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Month: The placeholder element not found: '"+this.id+"'."}},this.Eb=function(){this.bd(),this.Wa(),this.dd(),this.pb(),this.V("Init")},this.$a=function(e,t){return i.R.da()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ra={},this.Ra.Qa=null,this.Ra.Lb=function(e,t,n){var a=i.Ra.Qa;if("function"==typeof a.createVNode&&"function"==typeof a.render){var r=a.createVNode(e,n);a.render(r,t)}},this.Ra.Va=function(e,t,n){var a=i.Ra.Qa;if("function"==typeof a.render){var r=e;DayPilot.isArray(e)&&(r=a.h("div",n,e)),a.render(r,t)}},this.Ra.Ta=function(e){var t=i.Ra.Qa;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=this.sb,this.internal.xssTextHtml=i.$a,this.internal.enableVue=function(e){i.Ra.Qa=e},this.internal.vueRef=function(){return i.Ra.Qa},this.internal.vueRendering=function(){return i.Ra.Sa},this.init=function(){return this.wb(),this.loadFromServer()?void this.Eb():(this.bd(),this.ha(),this.Wa(),this.dd(),this.u(),this.na(),this.pb(),this.fireAfterRenderDetached(null,!1),this.La=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return i.eventBarVisible}}),this.sb(a)},e.gMouseUp=function(t){if(e.movingEvent){var n=e.movingEvent;if(!n.event)return;if(!n.event.calendar)return;if(!n.event.calendar.shadow)return;if(!n.event.calendar.shadow.start)return;var a=e.movingEvent.event.calendar,i=e.movingEvent.event,r=a.shadow.start,o=a.shadow.position,s=e.movingEvent.offset;return a.clearShadow(),e.movingEvent=null,a.M(i,r.x,r.y,s,t,o),t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),e.movingEvent=null,!1}if(e.resizingEvent){var n=e.resizingEvent;if(!n.event)return;if(!n.event.calendar)return;if(!n.event.calendar.shadow)return;if(!n.event.calendar.shadow.start)return;var a=e.resizingEvent.event.calendar,i=e.resizingEvent.event,r=a.shadow.start,l=a.shadow.width;return a.clearShadow(),e.resizingEvent=null,a.K(i,r,l),t.cancelBubble=!0,e.resizingEvent=null,!1}if(e.timeRangeSelecting){if(e.timeRangeSelecting.moved){var d=e.timeRangeSelecting,a=d.root,r=new DayPilot.Date(a.getDateFromCell(d.from.x,d.from.y)),c=r.addDays(d.width);a.O(r,c)}e.timeRangeSelecting=null}},DayPilot.Month=e.Month,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotMonth=function(e){var t=null,n=this.each(function(){if(!this.daypilot){var n=new DayPilot.Month(this.id);this.daypilot=n;for(var a in e)n[a]=e[a];n.Init(),t||(t=n)}});return 1===this.length?t:n}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotMonth",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,n,a){var i=new DayPilot.Month(n[0]);i.wa.scope=t,i.init();var r=a["id"];r&&(t[r]=i);var o=a["publishAs"];if(o){(0,e(o).assign)(t,i)}for(var s in a)0===s.indexOf("on")&&!function(n){i[n]=function(i){var r=e(a[n]);t["$apply"](function(){r(t,{"args":i})})}}(s);var l=t["$watch"],d=a["config"]||a["daypilotConfig"],c=a["events"]||a["daypilotEvents"];l.call(t,d,function(e){for(var t in e)i[t]=e[t];i.update()},!0),l.call(t,c,function(e){i.events.list=e,i.update()},!0)}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(DayPilot),function(DayPilot){if("undefined"==typeof DayPilot.Navigator||!DayPilot.Navigator.def){var e=DayPilot.Util.isVueVNode;DayPilot.Navigator=function(t,n){function a(e,t,n){var r=this;if(e instanceof a)return e;if("object"==typeof e){var o=e;this.month=o.month,this.x=o.x,this.y=o.y}else this.month=e,this.x=t,this.y=n;this.is=function(e){return this.month===e.month&&this.x===e.x&&this.y===e.y},this.next=function(){var e=r;if(e.x<6)return{"month":e.month,"x":e.x+1,"y":e.y};var t=i.months[e.month];return e.y<t.rowCount-1?{"month":e.month,"x":0,"y":e.y+1}:e.month<i.months.length-1?{"month":e.month+1,"x":0,"y":0}:null},this.visible=function(){var e=this.cell();return!!e.isCurrentMonth||(!(!e.isPrevMonth||!e.showBefore)||!(!e.isNextMonth||!e.showAfter))},this.nextVisible=function(){for(var e=r;!e.visible();){var t=e.next();if(!t)return null;e=new a(t)}return e},this.previous=function(){var e=r;if(e.x>0)return{"month":e.month,"x":e.x-1,"y":e.y};if(e.y>0)return{"month":e.month,"x":6,"y":e.y-1};if(e.month>0){var t=i.months[e.month-1];return{"month":e.month-1,"x":6,"y":t.rowCount-1}}return null},this.previousVisible=function(){for(var e=r;!e.visible();){var t=e.previous();if(!t)return null;e=new a(t)}return e},this.cell=function(){return i.months[this.month].cells[this.x][this.y]},this.date=function(){return this.cell().day},this.before=function(e){return this.date()<new a(e).date()}}this.v="${v}";var i=this;this.id=t,this.api=2,this.isNavigator=!0,this.autoFocusOnClick=!0,this.weekStarts="Auto",this.selectMode="Day",this.titleHeight=30,this.dayHeaderHeight=30,this.bound=null,this.cellWidth=30,this.cellHeight=30,this.cssClassPrefix="navigator_default",this.freeHandSelectionEnabled=!1,this.selectionStart=(new DayPilot.Date).getDatePart(),this.selectionEnd=null,this.selectionDay=null,this.showMonths=1,this.skipMonths=1,this.command="navigate",this.year=(new DayPilot.Date).getYear(),this.month=(new DayPilot.Date).getMonth()+1,this.showToday=!1,this.showWeekNumbers=!1,this.todayHtml=null,this.todayHeight=40,this.todayPosition="Bottom",this.todayText="Today",this.weekNumberAlgorithm="Auto",this.rowsPerMonth="Six",this.orientation="Vertical",this.locale="en-us",this.rtl=!1,this.visible=!0,this.timeRangeSelectedHandling="Bind",this.visibleRangeChangedHandling="Enabled",this.onVisibleRangeChange=null,this.onVisibleRangeChanged=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.onTodayClick=null,this.R={};var r=this.R;this.hd={};var o=this.hd;this.nav={},this.xb={},this.jd=function(){this.root.dp=this,this.root.className=this.L("_main"),"Horizontal"===this.orientation?(r.kd()||(this.root.style.width=this.showMonths*(7*r.cellWidth()+this.ld())+"px"),this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):r.kd()||(this.root.style.width=7*r.cellWidth()+this.ld()+"px"),this.rtl&&(this.root.style.direction="rtl"),this.root.style.position="relative",this.visible||(this.root.style.display="none");var e=document.createElement("input");e.type="hidden",e.name=i.id+"_state",e.id=e.name,this.root.appendChild(e),this.state=e,this.startDate?this.startDate=new DayPilot.Date(this.startDate).firstDayOfMonth():this.selectionDay?this.startDate=new DayPilot.Date(this.selectionDay).firstDayOfMonth():this.startDate=DayPilot.Date.fromYearMonthDay(this.year,this.month),this.calendars=[],this.selected=[],this.months=[]},this.ta=function(){return 2===i.api},this.cd=function(){this.root.innerHTML=""},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.md=function(e,t){var n=this.L("_"+t);DayPilot.Util.addClass(e,n)},this.nd=function(e,t){var n=this.L("_"+t);DayPilot.Util.removeClass(e,n)},this.od=function(){if(!r.kd())return null;var e=7;return this.showWeekNumbers&&e++,100/e},this.pd=function(){return r.kd()?null:r.cellWidth()},this.qd=function(e){return"number"!=typeof e&&(e=1),r.kd()?this.od()*e:this.pd()*e},this.rd=function(e){var t=r.kd()?"%":"px";return this.qd(e)+t},this.dd=function(t,n){var a={};a.cells=[],a.days=[],a.weeks=[];var o=this.startDate.addMonths(t),s=n.before,l=n.after,d=o.firstDayOfMonth(),c=d.firstDayOfWeek(r.weekStarts()),u=d.addMonths(1),h=DayPilot.DateUtil.daysDiff(c,u),f="Auto"===this.rowsPerMonth?Math.ceil(h/7):6;a.rowCount=f;var v=(new DayPilot.Date).getDatePart(),p=7*r.cellWidth()+this.ld();a.width=p;var m=this.cellHeight*f+this.titleHeight+this.dayHeaderHeight;a.height=m;var g=document.createElement("div");if(r.kd()?"Horizontal"===this.orientation&&(g.style.width=100/i.showMonths+"%"):g.style.width=p+"px",g.style.height=m+"px","Horizontal"===this.orientation)g.style.position="absolute",r.kd()?(g.style.left=100/i.showMonths*t+"%",a.leftPct=100/i.showMonths*t):g.style.left=p*t+"px",g.style.top="0px",a.top=0,a.left=p*t;else{g.style.position="relative";var y=t>0?i.months[t-1].top+i.months[t-1].height:0;a.top=y,a.left=0,a.leftPct=0}g.className=this.L("_month"),g.style.cursor="default",g.style.userSelect="none",g.style.webkitUserSelect="none",g.month=a,a.div=g,this.root.appendChild(g);var b=this.titleHeight+this.dayHeaderHeight,w=document.createElement("div");w.style.position="absolute",w.style.left="0px",w.style.right="0px",w.style.top="0px",w.style.width=i.rd(),w.style.height=this.titleHeight+"px",w.style.lineHeight=this.titleHeight+"px",w.className=this.L("_titleleft"),n.left&&(w.style.cursor="pointer",w.innerHTML="<span><</span>",w.onclick=this.sd),g.appendChild(w);var x=document.createElement("div");x.style.position="absolute",x.style.left=i.rd(),x.style.top="0px",x.style.width=i.rd(i.showWeekNumbers?6:5),x.style.height=this.titleHeight+"px",x.style.lineHeight=this.titleHeight+"px",x.className=this.L("_title"),x.innerHTML=r.locale().monthNames[o.getMonth()]+" "+o.getYear(),g.appendChild(x),this.ti=x;var _=document.createElement("div");_.style.position="absolute",_.style.left=i.rd(i.showWeekNumbers?7:6),_.style.right=i.rd(i.showWeekNumbers?7:6),_.style.top="0px",_.style.width=i.rd(),_.style.height=this.titleHeight+"px",_.style.lineHeight=this.titleHeight+"px",_.className=this.L("_titleright"),n.right&&(_.style.cursor="pointer",_.innerHTML="<span>></span>",_.onclick=this.td),g.appendChild(_),this.tr=_;var C=i.showWeekNumbers?1:0;if(this.showWeekNumbers)for(var k=0;k<f;k++){var D=c.addDays(7*k),S=null;switch(this.weekNumberAlgorithm){case"Auto":S=1===r.weekStarts()?D.weekNumberISO():D.weekNumber();break;case"US":S=D.weekNumber();break;case"ISO8601":S=D.weekNumberISO();break;default:throw"Unknown weekNumberAlgorithm value."}var M=document.createElement("div");M.style.position="absolute",M.style.left="0px",M.style.right="0px",M.style.top=k*this.cellHeight+b+"px",M.style.width=i.rd(),M.style.height=this.cellHeight+"px",M.style.lineHeight=this.cellHeight+"px",M.className=this.L("_weeknumber"),M.innerHTML="<span>"+S+"</span>",g.appendChild(M),a.weeks.push(M)}if(i.showWeekNumbers){var M=document.createElement("div");M.style.position="absolute",M.style.left="0px",M.style.right="0px",M.style.top=this.titleHeight+"px",M.style.width=i.rd(),M.style.height=this.dayHeaderHeight+"px",M.className=this.L("_dayheader"),g.appendChild(M)}for(var T=0;T<7;T++){a.cells[T]=[];var M=document.createElement("div");M.style.position="absolute",M.style.left=i.rd(T+C),M.style.right=i.rd(T+C),M.style.top=this.titleHeight+"px",M.style.width=i.rd(),M.style.height=this.dayHeaderHeight+"px",M.style.lineHeight=this.dayHeaderHeight+"px",M.className=this.L("_dayheader"),M.innerHTML="<span>"+this.ud(T)+"</span>",g.appendChild(M),a.days.push(M);for(var A=function(t){var n=c.addDays(7*t+T),d=E.vd(n)&&"none"!==E.wd(),u=n.firstDayOfMonth()===o,h=n<o,f=n>=o.addMonths(1);if("month"===E.wd())d=d&&u;else if("day"===E.wd())d=d&&(u||s&&h||l&&f);else if("week"===E.wd()){var p=n.firstDayOfMonth()===o;d=d&&(p||s&&h||l&&f)}var m=document.createElement("div");a.cells[T][t]=m;var y=i.xd(T,t),b=y.x,w=y.y,x=r.kd()?"%":"px";m.day=n,m.x=T,m.y=t,m.left=b,m.top=w,m.isCurrentMonth=u,m.isNextMonth=f,m.isPrevMonth=h,m.showBefore=s,m.showAfter=l,m.className=E.L(u?"_day":"_dayother"),i.md(m,"cell"),n.getTime()===v.getTime()&&u&&E.md(m,"today"),0!==n.dayOfWeek()&&6!==n.dayOfWeek()||E.md(m,"weekend"),m.style.position="absolute",m.style.left=b+x,m.style.right=b+x,m.style.top=w+"px",m.style.width=i.rd(),m.style.height=E.cellHeight+"px",m.style.lineHeight=E.cellHeight+"px";var _=document.createElement("div");_.style.position="absolute",_.className=n.getTime()===v.getTime()&&u?E.L("_todaybox"):E.L("_daybox"),i.md(_,"cell_box"),_.style.left="0px",_.style.top="0px",_.style.right="0px",_.style.bottom="0px",m.appendChild(_);var C=null;E.cells&&E.cells[n.toStringSortable()]&&(C=E.cells[n.toStringSortable()]);var k=C||{};if(k.day=n,k.isCurrentMonth=u,k.isToday=n.getTime()===v.getTime()&&u,k.isWeekend=0===n.dayOfWeek()||6===n.dayOfWeek(),C?(k.html=C.html||n.getDay(),k.cssClass=C.css):(k.html=n.getDay(),k.cssClass=null),"function"==typeof i.onBeforeCellRender){var D={};D.cell=k,i.onBeforeCellRender(D),C=D.cell}if(C&&DayPilot.Util.addClass(m,C.cssClass||C.css),u||s&&h||l&&f){var S=document.createElement("div");S.innerHTML=n.getDay(),S.style.position="absolute",S.style.left="0px",S.style.top="0px",S.style.right="0px",S.style.bottom="0px",i.md(S,"cell_text"),m.isClickable=!0,C&&C.html&&(S.innerHTML=C.html),m.appendChild(S)}m.onclick=E.yd,function(){if("function"==typeof i.onBeforeCellDomAdd||"function"==typeof i.onBeforeCellDomRemove){var t={};if(t.control=i,t.cell=k,t.element=null,m.domArgs=t,"function"==typeof i.onBeforeCellDomAdd&&i.onBeforeCellDomAdd(t),t.element){var n=_;if(n){t.Pa=n;if(e(t.element)){if(!i.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");i.Ra.Sa=!0,i.Ra.Va(t.element,n),i.Ra.Sa=!1}else n.appendChild(t.element)}}}}(),g.appendChild(m),d&&(i.zd(g,T,t),E.selected.push(m))},E=this,k=0;k<f;k++)A(k)}var H=document.createElement("div");H.style.position="absolute",H.style.left="0px",H.style.top=b-2+"px",H.style.width=i.rd(7+C),H.style.height="1px",H.style.fontSize="1px",H.style.lineHeight="1px",H.className=this.L("_line"),g.appendChild(H),this.months.push(a)},this.xd=function(e,t){var n=this.titleHeight+this.dayHeaderHeight,a=this.showWeekNumbers?1:0;return{"x":i.qd(e+a),"y":t*this.cellHeight+n}},this.zd=function(e,t,n){var a=e.month.cells[t][n];i.md(a,"select")},this.Ad=function(e,t,n){var a=e.month.cells[t][n];i.nd(a,"select")},this.ld=function(){return this.showWeekNumbers?r.cellWidth():0},this.Bd=function(){if(this.items)for(var e=0;e<this.showMonths;e++)for(var t=0;t<7;t++)for(var n=0;n<6;n++){var a=this.months[e].cells[t][n];a&&(1===this.items[a.day.toStringSortable()]?(this.md(a,"busy"),this.nd(a,"free")):(this.nd(a,"busy"),
|
|
17
|
-
this.md(a,"free")))}},this.Cd=function(){var e={};e.startDate=i.startDate,e.selectionStart=i.selectionStart,e.selectionEnd=i.selectionEnd.addDays(1),i.state.value=JSON.stringify(e)},this.wd=function(){return(this.selectMode||"").toLowerCase()},this.Dd=function(){var e=this.selectionDay||this.selectionStart;switch(e||(e=DayPilot.Date.today()),e=new DayPilot.Date(e),this.wd()){case"day":this.selectionStart=e,this.selectionDay=e,this.selectionEnd=e;break;case"week":this.selectionDay=e,this.selectionStart=e.firstDayOfWeek(r.weekStarts()),this.selectionEnd=this.selectionStart.addDays(6);break;case"month":this.selectionDay=e,this.selectionStart=e.firstDayOfMonth(),this.selectionEnd=this.selectionStart.lastDayOfMonth();break;case"none":this.selectionEnd=e;break;default:throw"Unknown selectMode value."}},this.Ed=null,this.select=function(e,t,n){if(!this.Q){var a=t&&(t instanceof DayPilot.Date||"string"==typeof t),r=t&&"object"==typeof t||"boolean"==typeof t,o=e,s=a?t:null,l=r?t:n;if(!this.La)return void(this.Ed={"date1":o,"date2":s,"options":l});var d=!0,c=!0;l&&"object"==typeof l?(l.dontFocus&&(d=!1),l.dontNotify&&(c=!1)):"boolean"==typeof l&&(d=!l);var u=this.selectionStart,h=this.selectionEnd;this.selectionStart=new DayPilot.Date(o).getDatePart(),this.selectionDay=this.selectionStart;var f=!1;if(d){var v=this.startDate;(this.selectionStart<this.Fd()||this.selectionStart>=this.Gd())&&(v=this.selectionStart.firstDayOfMonth()),v.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=v}s&&i.freeHandSelectionEnabled?i.selectionEnd=new DayPilot.Date(s):this.Dd(),this.cd(),this.jd(),this.Hd(),this.Bd(),this.Cd(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.O(),f&&this.Id()}},this.update=function(e){i.Jd(e)},this.Jd=function(e){if(i.sb(e),this.La){if(i.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");i.Kd();var t={"day":i.selectionDay,"start":i.selectionStart,"end":i.selectionEnd};i.qb(),t.start===i.selectionStart&&t.end===i.selectionEnd&&t.day===i.selectionDay||i.O()}},this.qb=function(){this.cd(),this.jd(),this.Dd(),this.Hd(),this.ha(),this.Bd(),this.Cd(),this.visible?this.show():this.hide()},this.Kd=function(){i.xb={}},this.ub=null,this.sb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data;e&&(DayPilot.isArray(e.list)?i.events.list=e.list:i.events.list=e)}}};this.ub=t;for(var n in e)if(t[n]){var a=t[n];a.data=e[n],a.preInit&&a.preInit()}else i[n]=e[n]}},this.vb=function(){var e=this.ub;for(var t in e){var n=e[t];n.postInit&&n.postInit()}},this.V=function(e,t,n){var a={};a.action=e,a.parameters=n,a.data=t,a.header=this.U();var i="JSON"+JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.W,i,this.Ld):WebForm_DoCallback(this.uniqueID,i,this.X,null,this.callbackError,!0)},this.Ld=function(e){if("function"==typeof i.onAjaxError){var t={};t.request=e,i.onAjaxError(t)}else"function"==typeof i.ajaxError&&i.ajaxError(e)},this.W=function(e){i.X(e.responseText)},this.T=function(e,t,n){var a={};a.action=e,a.parameters=n,a.data=t,a.header=this.U();var r="JSON"+JSON.stringify(a);__doPostBack(i.uniqueID,r)},this.U=function(){var e={};return e.v=this.v,e.startDate=this.startDate,e.selectionStart=this.selectionStart,e.showMonths=this.showMonths,e},this.ud=function(e){var t=e+r.weekStarts();return t>6&&(t-=7),r.locale().dayNamesShort[t]},this.vd=function(e){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=e.getTime()&&e.getTime()<=this.selectionEnd.getTime())},this.Md=function(e){for(var t=0;t<i.months.length;t++){var n=i.months[t];if(!n)return null;if(e.x<n.left)return null;if(!(n.left+n.width<e.x)&&n.top<=e.y&&e.y<n.top+n.height)return t}return null},this.Nd=function(){if(!r.kd())return void(i.Od=i.cellWidth);var e=i.months[0].cells[0][0],t=e.clientWidth;i.Od=t,i.months.forEach(function(e){e.width=e.div.clientWidth,"Horizontal"===i.orientation&&(e.left=e.div.offsetLeft),e.cells.forEach(function(e,n){e.forEach(function(e){e.width=t,e.left=n*t})})})},this.Pd=function(e){i.Nd();var t=DayPilot.mo3(i.nav.top,e),n=i.Md(t);if(null===n)return null;var a=i.months[n],r=this.titleHeight+this.dayHeaderHeight;if(a.top<=t.y&&t.y<a.top+r)return{"month":n,"x":0,"y":0,"coords":t,"header":!0};for(var o=0;o<a.cells.length;o++)for(var s=0;s<a.cells[o].length;s++){var l=a.cells[o][s],d=l.top+a.top,c=l.left+a.left;if(c<=t.x&&t.x<c+i.Od&&d<=t.y&&t.y<d+i.cellHeight)return{"month":n,"x":o,"y":s,"coords":t}}return null},this.Qd=function(e){if(i.freeHandSelectionEnabled){var t=i.Pd(e);t&&!t.header&&(o.start=t),e.preventDefault()}},this.Rd=function(e){if(o.start){var t=i.Pd(e);if(o.end)o.end=t;else if(t){var n=3,a=DayPilot.distance(o.start.coords,t.coords);a>n&&(o.end=t)}o.end&&(o.clear(),o.draw())}},o.start=null,o.drawCell=function(e){var t=i.months[e.month],n=i.xd(e.x,e.y),a=t.top+n.y,s=t.left+n.x,l="px",d=i.rd();if(r.kd()){var c="Horizontal"===i.orientation?i.showMonths:1;s=t.leftPct+n.x/c,l="%",d=i.rd(1/c)}var u=document.createElement("div");u.style.position="absolute",u.style.left=s+l,u.style.top=a+"px",u.style.height=i.cellHeight+"px",u.style.width=d,u.style.backgroundColor="#ccc",u.style.opacity=.5,u.style.cursor="default",i.nav.preselection.appendChild(u),o.cells.push(u)},o.clear=function(){if(o.cells){for(var e=0;e<o.cells.length;e++)i.nav.preselection.removeChild(o.cells[e]);o.cells=[]}},o.draw=function(){var e=o.ordered(),t=new a(e.start),n=e.end;if(n){if(n===o.end&&n.header&&n.month>0){n.month-=1;var r=i.months[n.month];n.x=6,n.y=r.rowCount-1}for(o.cells=[];!t.is(n);){t.visible()&&o.drawCell(t);var s=new a(t).next();if(!s)return;t.month=s.month,t.x=s.x,t.y=s.y}t.visible()&&o.drawCell(t)}},o.ordered=function(){var e=o.start,t=o.end,n={};return!t||new a(e).before(t)?(n.start=e,n.end=t):(n.start=t,n.end=e),n},this.yd=function(e){var t=e.currentTarget,n=t.parentNode,a=t.parentNode.month,r=t.x,o=t.y,s=a.cells[r][o].day;if(a.cells[r][o].isClickable){switch(i.clearSelection(),i.selectionDay=s,i.wd()){case"none":i.selectionStart=s,i.selectionEnd=s;break;case"day":if(i.autoFocusOnClick&&(s<i.Fd()||s>=i.Gd()))return void i.select(s);var l=a.cells[r][o];i.zd(n,r,o),i.selected.push(l),i.selectionStart=l.day,i.selectionEnd=l.day;break;case"week":if(i.autoFocusOnClick){var d=a.cells[0][o].day,c=a.cells[6][o].day;if(d.firstDayOfMonth()===c.firstDayOfMonth()&&(d<i.Fd()||c>=i.Gd()))return void i.select(s)}for(var u=0;u<7;u++)i.zd(n,u,o),i.selected.push(a.cells[u][o]);i.selectionStart=a.cells[0][o].day,i.selectionEnd=a.cells[6][o].day;break;case"month":if(i.autoFocusOnClick&&(s<i.Fd()||s>=i.Gd()))return void i.select(s);for(var d=null,c=null,h=0;h<6;h++)for(var f=0;f<7;f++){var l=a.cells[f][h];l&&l.day.getYear()===s.getYear()&&l.day.getMonth()===s.getMonth()&&(i.zd(n,f,h),i.selected.push(l),null===d&&(d=l.day),c=l.day)}i.selectionStart=d,i.selectionEnd=c;break;default:throw"unknown selectMode"}i.Cd(),i.O()}},this.O=function(e){var t=i.selectionStart,n=i.selectionEnd.addDays(1),a=DayPilot.DateUtil.daysDiff(t,n),r=i.selectionDay;if(e=e||{},i.ta()){var o={};if(o.start=t,o.end=n,o.day=r,o.days=a,o.mode=e.mode||i.selectMode,o.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(o),o.preventDefault.value))return;switch(i.timeRangeSelectedHandling){case"Bind":var s=i.bound;if(s&&"object"==typeof s){var l={};l.start=t,l.end=n,l.days=a,l.day=r,s.commandCallBack(i.command,l)}break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(t,n,r)}"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(o)}else switch(i.timeRangeSelectedHandling){case"Bind":var s=i.bound;if(s&&"object"==typeof s){var l={};l.start=t,l.end=n,l.days=a,l.day=r,s.commandCallBack(i.command,l)}break;case"JavaScript":i.onTimeRangeSelected(t,n,r);break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(t,n,r)}},this.timeRangeSelectedPostBack=function(e,t,n,a){var i={};i.start=e,i.end=t,i.day=a,this.T("TimeRangeSelected",n,i)},this.td=function(){i.Sd(i.skipMonths)},this.sd=function(){i.Sd(-i.skipMonths)},this.Sd=function(e){this.startDate=this.startDate.addMonths(e),this.cd(),this.jd(),this.Hd(),this.Cd(),this.Id(),this.Bd()},this.Fd=function(){return i.startDate.firstDayOfMonth()},this.Gd=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths)},this.visibleStart=function(){return i.startDate.firstDayOfMonth().firstDayOfWeek(r.weekStarts())},this.visibleEnd=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(r.weekStarts()).addDays(42)},this.Id=function(){var e=this.visibleStart(),t=this.visibleEnd();if(i.ta()){var n={};if(n.start=e,n.end=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onVisibleRangeChange&&(i.onVisibleRangeChange(n),n.preventDefault.value))return;switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"Disabled":}"function"==typeof i.onVisibleRangeChanged&&i.onVisibleRangeChanged(n)}else switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"JavaScript":this.onVisibleRangeChanged(e,t);break;case"Disabled":}},this.visibleRangeChangedCallBack=function(e){var t={};this.V("Visible",e,t)},this.visibleRangeChangedPostBack=function(e){var t={};this.T("Visible",e,t)},this.X=function(e){var t=JSON.parse(e);i.items=t.Items,i.cells=t.Cells,i.cells?i.update():i.Bd()},this.Hd=function(){this.showToday&&"Top"===this.todayPosition&&this.Td();for(var e=0;e<this.showMonths;e++){var t=this.Ud(e);this.dd(e,t)}this.showToday&&"Bottom"===this.todayPosition&&this.Td(),this.root.style.height=this.Vd()+"px",this.nav.preselection=document.createElement("div"),this.nav.preselection.style.position="absolute",this.nav.preselection.style.left="0px",this.nav.preselection.style.right="0px",this.nav.preselection.style.top="0px",this.root.appendChild(this.nav.preselection)},this.Td=function(){if(this.showToday){var e=document.createElement("span");e.className=this.L("_todaysection_button"),this.todayHtml?e.innerHTML=this.todayHtml:e.innerText=this.todayText,e.onclick=function(){if("function"==typeof i.onTodayClick){var e={};if(e.preventDefault=function(){this.preventDefault.value=!0},i.onTodayClick(e),e.preventDefault.value)return}i.select(DayPilot.Date.today())};var t=document.createElement("div");t.style.height=this.todayHeight+"px",t.className=this.L("_todaysection"),t.appendChild(e),this.root.appendChild(t)}},this.Vd=function(){var e=0;if(this.showToday&&(e+=this.todayHeight),"Horizontal"===this.orientation){for(var t=0;t<this.months.length;t++){var n=this.months[t];n.height>e&&(e=n.height)}return e}for(var t=0;t<this.months.length;t++){var n=this.months[t];e+=n.height}return e},this.Ud=function(e){if(this.internal.showLinks)return this.internal.showLinks;var t={};return t.left=0===e,t.right=0===e,t.before=0===e,t.after=e===this.showMonths-1,"Horizontal"===this.orientation&&(t.right=e===this.showMonths-1),t},this.wa={},this.wa.scope=null,this.wa.notify=function(){i.wa.scope&&i.wa.scope["$apply"]()},this.Ra={},this.Ra.Qa=null,this.Ra.Lb=function(e,t,n){var a=i.Ra.Qa;if("function"==typeof a.createVNode&&"function"==typeof a.render){var r=a.createVNode(e,n);a.render(r,t)}},this.Ra.Va=function(e,t){var n=i.Ra.Qa;if("function"==typeof n.render){var a=e;DayPilot.isArray(e)&&(a=n.h("div",null,e)),n.render(a,t)}},this.Ra.Ta=function(e){var t=i.Ra.Qa;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=i.sb,this.internal.initialized=function(){return i.La},this.internal.enableVue=function(e){i.Ra.Qa=e},this.internal.vueRef=function(){return i.Ra.Qa},this.internal.vueRendering=function(){return i.Ra.Sa},this.internal.upd=function(e){i.Jd(e)},r.locale=function(){return DayPilot.Locale.find(i.locale)},r.weekStarts=function(){if("Auto"===i.weekStarts){var e=r.locale();return e?e.weekStarts:0}return i.weekStarts},r.cellWidth=function(){if(i.xb.cellWidth)return i.xb.cellWidth;var e=i.Wd("_cell_dimensions").width;return e||(e=i.cellWidth),i.xb.cellWidth=e,e},r.kd=function(){return"Auto"===i.R.cellWidth()},this.clearSelection=function(){for(var e=0;e<this.selected.length;e++){var t=this.selected[e];i.Ad(t.parentNode,t.x,t.y)}this.selected=[]},this.Xd=function(){return!!this.backendUrl&&("undefined"==typeof i.items||!i.items)},this.events={},this.ha=function(){if(DayPilot.isArray(this.events.list)){this.items={};for(var e=0;e<this.events.list.length;e++){var t=this.events.list[e];if(!t.hidden){var n=this.Yd(t);for(var a in n)this.items[a]=1}}}},this.Wd=function(e){var t=document.createElement("div");t.style.position="absolute",t.style.top="-2000px",t.style.left="-2000px",t.className=this.L(e);var n=i.root||document.body;n.appendChild(t);var a=t.offsetHeight,r=t.offsetWidth;n.removeChild(t);var o={};return o.height=a,o.width=r,o},this.Yd=function(e){for(var t=new DayPilot.Date(e.start),n=new DayPilot.Date(e.end),a={},i=t.getDatePart();i.getTime()<=n.getTime();)a[i.toStringSortable()]=1,i=i.addDays(1);return a},this.show=function(){i.visible=!0,i.root.style.display=""},this.hide=function(){i.visible=!1,i.root.style.display="none"},this.wb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Navigator() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Navigator: The placeholder element not found: '"+t+"'."}this.root=this.nav.top},this.init=function(){if(this.wb(),!this.root.dp){this.Dd(),this.jd(),this.Hd(),this.ha(),this.Bd(),this.ba(),this.Zd(),this.pb();if(this.Xd()&&this.Id(),this.La=!0,this.vb(),this.Ed){var e=this.Ed;this.select(e.date1,e.date2,e.options),this.Ed=null}return this}},this.Zd=function(){i.nav.top.onmousedown=this.Qd,i.nav.top.onmousemove=this.Rd},this.pb=function(){DayPilot.re(document,"mouseup",i.$d)},this.$d=function(e){if(o.start&&o.end){var t=DayPilot.mo3(i.nav.top,e);if(t.x===o.start.coords.x&&t.y===o.start.coords.y)return o.start=null,void o.clear();o.clear();var n=o.ordered();n.start=new a(n.start).nextVisible(),n.end=new a(n.end).previousVisible(),i.selectionDay=new a(n.start).date(),i.selectionStart=i.selectionDay,i.selectionEnd=new a(n.end).date(),o.start=null,o.end=null,i.cd(),i.jd(),i.Hd(),i.Bd(),i.Cd();i.O({"mode":"FreeHand"})}o.start=null,o.end=null},this.dispose=function(){var e=i;e.root&&(e.root.removeAttribute("style"),e.root.removeAttribute("class"),e.root.dp=null,e.root.innerHTML=null,e.root=null,e.Q=!0)},this.disposed=function(){return this.Q},this.ba=function(){this.root.dispose=this.dispose},this.Init=this.init,this.sb(n)},"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotNavigator=function(e){var t=null,n=this.each(function(){if(!this.daypilot){var n=new DayPilot.Navigator(this.id);this.daypilot=n;for(var a in e)n[a]=e[a];n.Init(),t||(t=n)}});return 1===this.length?t:n}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotNavigator",["$parse",function(e){return{"restrict":"E","template":"<div id='{{id}}'></div>","compile":function(t,n){return t.replaceWith(this["template"].replace("{{id}}",n["id"])),function(t,n,a){var i=new DayPilot.Navigator(n[0]);i.wa.scope=t,i.init();var r=a["id"];r&&(t[r]=i);var o=a["publishAs"];if(o){(0,e(o).assign)(t,i)}for(var s in a)if(0===s.indexOf("on")){var l=DayPilot.Util.shouldApply(s);l?!function(n){i[n]=function(i){var r=e(a[n]);t["$apply"](function(){r(t,{"args":i})})}}(s):!function(n){i[n]=function(i){e(a[n])(t,{"args":i})}}(s)}var d=t["$watch"],c=a["config"]||a["daypilotConfig"],u=a["events"]||a["daypilotEvents"];d.call(t,c,function(e){for(var t in e)i[t]=e[t];i.update()},!0),d.call(t,u,function(e){i.events.list=e,i.ha(),i.Bd()},!0)}}}}])}(),DayPilot.Navigator.def={},"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(DayPilot),function(DayPilot){function e(e){var t=e.touches[0].pageX,n=e.touches[0].pageY,a={};return a.x=t,a.y=n,a}if("undefined"==typeof DayPilot.Scheduler){var t={},n=function(){},a=!1,i=function(){return document.body},r=function(){return document.createElement("div")};DayPilot.Scheduler=function(a,o){this.v="${v}";var s=this;this.isScheduler=!0,this.id=a,this.beforeCellRenderCaching=!0,this.businessBeginsHour=9,this.businessEndsHour=18,this.businessWeekends=!1,this.cellDuration=60,this.cellGroupBy="Day",this.cellSweeping=!0,this.cellSweepingCacheSize=1e3,this.cellWidth=40,this.cellsMarkBusiness=!0,this.cssClassPrefix="scheduler_default",this.days=1,this.durationBarHeight=3,this.durationBarVisible=!0,this.dynamicEventRendering="Progressive",this.dynamicEventRenderingMargin=50,this.dynamicEventRenderingMarginX=null,this.dynamicEventRenderingMarginY=null,this.dynamicEventRenderingCacheSweeping=!1,this.dynamicEventRenderingCacheSize=200,this.eventBorderRadius=null,this.eventEndSpec="DateTime",this.eventHeight=35,this.eventMinWidth=1,this.eventPadding=null,this.eventResizeMargin=5,this.eventTapAndHoldHandling="Move",this.eventTextWrappingEnabled=!1,this.eventsLoadMethod="GET",this.floatingEvents=!DayPilot.browser.ios,this.floatingTimeHeaders=!0,this.headerHeight=30,this.heightSpec="Max",this.height=600,this.locale="en-us",this.progressiveRowRendering=!0,this.progressiveRowRenderingPreload=25,this.rowHeaderWidth=80,this.rowMarginTop=0,this.rowMarginBottom=0,this.rowsLoadMethod="GET",this.scale="CellDuration",this.scrollDelayEvents=200,this.scrollDelayCells=DayPilot.browser.ios?100:0,this.scrollDelayFloats=0,this.scrollDelayRows=0,this.showToolTip=!0,this.snapToGrid=!0,this.startDate=DayPilot.Date.today(),this.tapAndHoldTimeout=300,this.timeHeaders=[{"groupBy":"Default"},{"groupBy":"Cell"}],this.timeHeaderTextWrappingEnabled=!1,this.timeFormat="Auto",this.useEventBoxes="Always",this.visible=!0,this.weekStarts="Auto",this.width=null,this.xssProtection="Enabled",this.eventClickHandling="Enabled",this.eventDeleteHandling="Disabled",this.eventMoveHandling="Update",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.timeHeaderClickHandling="Enabled",this.timeHeaderRightClickHandling="Enabled",this.timeRangeClickHandling="Enabled",this.timeRangeSelectedHandling="Enabled",this.onEventClick=null,this.onEventClicked=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onRowClick=null,this.onRowClicked=null,this.onTimeHeaderClick=null,this.onTimeHeaderClicked=null,this.onTimeHeaderRightClick=null,this.onTimeHeaderRightClicked=null,this.onTimeRangeClick=null,this.onTimeRangeClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.onBeforeCellRender=null,this.onBeforeEventRender=null,this.onBeforeRowHeaderRender=null,this.onBeforeTimeHeaderRender=null,this.onAfterUpdate=null,this.Q=!1,this._d=-1,this.ae=!0,this.rowlist=[],this.events={},this.cells={},this.elements={},this.elements.events=[],this.elements.bars=[],this.elements.text=[],this.elements.cells=[],this.elements.linesVertical=[],this.elements.range=[],this.elements.timeHeader=[],this.xb={},this.xb.cells=[],this.xb.linesVertical={},this.xb.linesHorizontal={},this.xb.timeHeaderGroups=[],this.xb.timeHeader={},this.xb.events=[],this.nav={},this.R={};var l=this.R;this.be={};var d=s.be;this.ce={};var c=this.ce,u={};this.scrollTo=function(e){s.ee(e)},this.ee=function(e){if(e){if(!s.La)return void(s.fe=e);var t;if(e instanceof DayPilot.Date)t=this.getPixels(e).left;else if("string"==typeof e)t=this.getPixels(new DayPilot.Date(e)).left;else{if("number"!=typeof e)throw new DayPilot.Exception("Invalid scrollTo() parameter. Accepted parameters: string (ISO date), number (pixels), DayPilot.Date object");t=e}var n=s.ge.clientWidth,a=s.nav.scroll.clientWidth;t<0&&(t=0),t>n-a&&(t=n-a),s.he(t)}},this.scrollToResource=function(e){DayPilot.complete(function(){var t;if("string"==typeof e||"number"==typeof e)t=s.ie(e);else{if(!(e instanceof DayPilot.Row))throw new DayPilot.Exception("Invalid scrollToResource() argument: id or DayPilot.Row expected");t=s.ie(e.id)}t&&setTimeout(function(){var e=t.top;s.nav.scroll.scrollTop=e},100)})},this.je=function(){if(this.floatingTimeHeaders&&this.timeHeader){var e=s.ke();if(e){s.le();for(var t=e.pixels.left,n=e.pixels.right+e.sw,a=[],i=0;i<this.timeHeader.length;i++)for(var r=0;r<this.timeHeader[i].length;r++){var o=this.timeHeader[i][r],l=o.left,d=o.left+o.width,c=null;if(l<t&&t<d&&(c={},c.x=r,c.y=i,c.marginLeft=t-l,c.marginRight=0,c.div=s.xb.timeHeader[r+"_"+i],a.push(c)),l<n&&n<d){c||(c={},c.x=r,c.y=i,c.marginLeft=0,c.div=s.xb.timeHeader[r+"_"+i],a.push(c)),c.marginRight=d-n;break}}for(var u=0;u<a.length;u++){var c=a[u];s.me(c.div,c.marginLeft,c.marginRight)}}}},this.ne=function(){s.je(),s.oe()},this.pe={};var h=s.pe;h.qe=function(e,t,n,a){var i=e,r=e+n,o=t,l=t+a;return s.elements.events.filter(function(e){var t=e.event,n=t.part.left,a=t.part.left+t.part.width,d=s.rowlist[t.part.dayIndex],c=d.top+t.part.top,u=c+s.eventHeight;if(DayPilot.Util.overlaps(n,a,i,r)&&DayPilot.Util.overlaps(c,u,o,l))return!0})},h.se=function(){var e=[],t=s.ke();if(!t)return e;for(var n=t.pixels.left,a=0;a<s.elements.events.length;a++){var i=s.elements.events[a],r=i.event,o=r.part.left,l=r.part.left+r.part.width;o<n&&n<l&&e.push(i)}return e.area=t,e},this.oe=function(){if(this.floatingEvents){var e=h.se();s.te=performance.now(),e.forEach(function(t){var n=t.event,a=e.area.pixels.left,i=n.part.left,r=a-i;s.ve(t,r,0)}),s.we()}},this.elements.sections=[],this.elements.hsections=[],this.me=function(e,t,n){var a=r();a.className=s.L("_timeheader_float"),a.style.position="absolute",a.style.left=t+"px",a.style.right=n+"px",a.style.top="0px",a.style.bottom="0px",a.style.overflow="hidden";var i=r();i.className=s.L("_timeheader_float_inner");var o=e.cell.th;i.innerHTML=s.$a(o.text,o.html),o.fontColor&&(i.style.color=o.fontColor),a.appendChild(i),a.xe={marginLeft:t,marginRight:n},e.section=a,e.insertBefore(a,e.firstChild.nextSibling),e.firstChild.innerHTML="",this.elements.hsections.push(e)},this.le=function(){for(var e=0;e<this.elements.hsections.length;e++){var t=this.elements.hsections[e],n=t.cell;n&&t.firstChild&&(t.firstChild.innerHTML=s.$a(n.th.text,n.th.html)),DayPilot.de(t.section),t.section=null}this.elements.hsections=[]},this.ve=function(e,t,n){var a=e.section;if(a)return a.xe&&a.xe.marginLeft===t&&a.xe.marginRight===n?void(a.xe.stamp=s.te):(e.section.style.left=t+"px",e.section.style.right=n+"px",void(a.xe={marginLeft:t,marginRight:n,stamp:s.te}));a=r(),a.className=s.L("_event_float"),a.style.position="absolute",a.style.left=t+"px",a.style.right=n+"px",a.style.top="0px",a.style.bottom="0px",a.style.overflow="hidden";var i=r();i.className=s.L("_event_float_inner"),i.innerHTML=e.event.client.html(),a.appendChild(i),a.xe={marginLeft:t,marginRight:n,stamp:s.te},e.section=a,e.insertBefore(a,e.firstChild.nextSibling),e.firstChild.innerHTML="";var o=e.event,l=o.cache||o.data;l.fontColor&&(i.style.color=l.fontColor),this.elements.sections.push(e)},this.we=function(){for(var e=[],t=0;t<this.elements.sections.length;t++){var n=this.elements.sections[t];if(n.section&&n.section.xe&&n.section.xe.stamp===s.te)e.push(n);else{var a=n.event;a&&(n.firstChild.innerHTML=a.client.html()),DayPilot.de(n.section),n.section=null}}this.elements.sections=e},this.setScrollX=function(e){s.ye.enabled?(s.ye.scrollXRequested=e,setTimeout(function(){var e=s.ye.scrollXRequested;"number"==typeof e&&s.he(e)},0)):s.he(e)},this.he=function(e){var t=s.nav.scroll,n=s.ze();t.clientWidth+e>n&&(e=n-t.clientWidth),s.divTimeScroll.scrollLeft=e,t.scrollLeft=e},this.setScrollY=function(e){s.ye.enabled?(s.ye.scrollYRequested=e,setTimeout(function(){var e=s.ye.scrollYRequested;"number"==typeof e&&s.Ae(e)},0)):s.Ae(e)},this.Ae=function(e){var t=s.nav.scroll,n=s._d;t.clientHeight+e>n&&(e=n-t.clientHeight),s.divResScroll.scrollTop=e,t.scrollTop=e},this.setScroll=function(e,t){s.setScrollX(e),s.setScrollY(t)},this.ma=function(){if(this.nav.scroll){!function(){var e=s.ze();s.ge.style.height=s._d+"px",s.ge.style.width=e+"px",e>s.nav.scroll.clientWidth?s.nav.scroll.style.overflowX="auto":s.nav.scroll.style.overflowX="hidden"}();var e=1;this.nav.scroll.style.height="30px";var t=this.Xa(),n=t+this.Be()+e;if(t>=0&&(this.nav.scroll.style.height=t+"px",this.Ce.style.height=t+"px"),this.nav.divider&&((!n||isNaN(n)||n<0)&&(n=0),this.nav.divider.style.height=n+"px"),this.nav.top.style.height=n+"px",s.nav.resScrollSpace){var a=30;"Auto"===s.heightSpec&&(a=DayPilot.sh(s.nav.scroll)),s.nav.resScrollSpace.style.height=a+"px"}for(var i=0;i<this.elements.linesVertical.length;i++)this.elements.linesVertical[i].style.height=this._d+"px"}},this.De=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart(),this.timeHeader=[];var e=this.timeHeaders;e||(e=[{"groupBy":this.cellGroupBy},{"groupBy":"Cell"}]);for(var t=s.startDate.addDays(s.days),n=0;n<e.length;n++){var a=e[n].groupBy,i=e[n].format;"Default"===a&&(a=this.cellGroupBy);for(var r=[],o=s.startDate;o.ticks<t.ticks;){var d={};if(d.start=o,d.end=this.Ee(d.start,a),d.start.ticks===d.end.ticks)break;d.left=this.getPixels(d.start).left;var c=this.getPixels(d.end).left,u=c-d.left;if(d.width=u,"string"==typeof i?d.text=d.start.toString(i,l.Fe()):d.text=this.Ge(d,a),u>0){if("function"==typeof this.onBeforeTimeHeaderRender){var h={};h.start=d.start,h.end=d.end,h.text=d.text,h.html=null,h.toolTip=s.$a(d.text),h.backColor=null,h.fontColor=null,h.level=this.timeHeader.length,h.cssClass=null;var f={};f.header=h,f.control=s,this.onBeforeTimeHeaderRender(f),d.text=h.text,d.html=h.html,d.backColor=h.backColor,d.fontColor=h.fontColor,d.toolTip=h.toolTip,d.areas=h.areas,d.cssClass=h.cssClass}r.push(d)}o=d.end}this.timeHeader.push(r)}},this.getPixels=function(e){var t=e.ticks-this.startDate.ticks,n=s.Ab(t),a=s.cellWidth,i=Math.floor(n/a),r=i*a;r=r<0?0:r;var o=r+a;n%a===0&&(o=r);var l=s.ze();return o=o>l?l:o,{left:n,boxLeft:r,boxRight:o,i:i}},this.getDate=function(e,t,n){var a=this.He(e,n);if(!a)return null;var i=a.x,r=s.Ie(i);if(!r)return null;var o=n&&!t?r.end:r.start;return t?o.addTime(this.Je(a.offset)):o},this.He=function(e,t){t&&(e-=1);var n=Math.floor(e/s.cellWidth),a=s.Ie(n);if(!a)return null;var i={};return i.x=n,i.offset=e%s.cellWidth,i.cell=a,i},this.Ke=function(e){var t=e.ticks-this.startDate.ticks,n=60*s.Le()*1e3;if(t<0)return{past:!0};var a=Math.floor(t/n);return{i:a,current:s.Ie(a)}},this.Ab=function(e){var t=60*s.Le()*1e3,n=s.cellWidth;return Math.floor(n*e/t)},this.Je=function(e){var t=60*s.Le()*1e3,n=s.cellWidth;return Math.floor(e/n*t)},this.Me=function(e){DayPilot.Global.touch.start||t.Ne||(s.Oe={},s.va(this,e))},this.va=function(e,t){e.event&&s.Pe(e,t)},this.xa=function(e){if(!DayPilot.Global.touch.active&&!DayPilot.Global.touch.start){var t=this.event;if(e.cancelBubble=!0,e.preventDefault(),!this.event.client.rightClickEnabled())return!1;s.Qe(e);var n={};if(n.e=t,n.div=this,n.originalEvent=e,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onEventRightClick&&(s.onEventRightClick(n),n.preventDefault.value))return!1;switch(s.eventRightClickHandling){case"ContextMenu":var a=t.client.contextMenu();a?a.show(t):s.contextMenu&&s.contextMenu.show(this.event)}return"function"==typeof s.onEventRightClicked&&s.onEventRightClicked(n),!1}},this.Ie=function(e){var t=s.Le(),n=60*t*1e3;return{start:s.startDate.addTime(e*n),end:s.startDate.addTime((e+1)*n),left:e*s.cellWidth,width:s.cellWidth}},this.Pe=function(e,t){if("boolean"==typeof t)throw new DayPilot.Exception("Invalid _eventClickSingle parameters");var n=e.event;if(n){var a=t.ctrlKey,i=t.metaKey;if(n.client.clickEnabled()){s.Qe(t);var r={};r.e=n,r.control=s,r.div=e,r.originalEvent=t,r.ctrl=a,r.meta=i,r.shift=t.shiftKey,r.preventDefault=function(){this.preventDefault.value=!0},r.toJSON=function(){return DayPilot.Util.copyProps(r,{},["e","ctrl","meta","shift"])},"function"==typeof s.onEventClick&&(s.onEventClick(r),r.preventDefault.value)||"function"==typeof s.onEventClicked&&s.onEventClicked(r)}}},this.ya=function(e){var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},t.control=s,t.toJSON=function(){return DayPilot.Util.copyProps(t,{},["e"])},"function"!=typeof s.onEventDelete||(s.onEventDelete(t),!t.preventDefault.value)){switch(s.eventDeleteHandling){case"Update":s.events.remove(e)}"function"==typeof s.onEventDeleted&&s.onEventDeleted(t)}},this.getScrollX=function(){return this.nav.scroll.scrollLeft},this.getScrollY=function(){return this.nav.scroll.scrollTop},this.K=function(e,t,n,a){function i(){if(!r.preventDefault.value){switch(r.loaded={},t=r.newStart,n=r.newEnd,s.eventResizeHandling){case"Update":s.Se(r)}"function"==typeof s.onEventResized&&s.onEventResized(r)}}if("Disabled"!==this.eventResizeHandling){n=s.Re(n);var r={};r.e=e,r.async=!1,r.loaded=function(){i()},r.newStart=t,r.newEnd=n,r.what=a,r.preventDefault=function(){this.preventDefault.value=!0},r.control=s,r.toJSON=function(){return DayPilot.Util.copyProps(r,{},["e","async","newStart","newEnd"])},"function"==typeof s.onEventResize&&s.onEventResize(r),r.async||i()}},this.qb=function(e){e=e||{},clearTimeout(s.Te),s.timeHeader=null,s.cellProperties={},s.De(),s.Ue(),s.events.Ve(),s.R.Kd(),s.clearSelection(),s.ha(),s.We(),s.Xe(),s.rb(),s.Ye(),s.Ze(),s.$e(),s.ia(),s.Z(),s._e(),s.af={},s.bf(),s.ma(),s.cf(),e.immediateEvents?s.na():setTimeout(function(){s.na()},100),this.visible?s.ae!==s.visible&&this.show():this.hide(),this.ae=this.visible,this.ne(),s.df(),this.ef()},this.ef=function(){if("function"==typeof s.onAfterUpdate){var e={};s.onAfterUpdate(e)}},this.update=function(e){if(!s.La)throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that hasn't been initialized.");if(s.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that has been disposed already. Calling .dispose() destroys the object and makes it unusable.");u.request(e)},u.timeout=null,u.options=null,u.enabled=!1,u.request=function(e){u.enabled?(clearTimeout(u.timeout),u.ff(e),u.timeout=setTimeout(u.doit)):(u.ff(e),u.doit())},u.ff=function(e){if(e){u.options||(u.options={});for(var t in e)u.options[t]=e[t]}},u.doit=function(){var e=u.options;return u.options=null,s.La?(s.sb(e),s.qb({"immediateEvents":!0}),void s.vb()):void s.sb(e)},this.gf=function(e){e.forEach(function(e){s.hf(e.index)})},this.if=function(e){return e&&0!==e.length?e[0].isRow?e:e.map(function(e){return s.rowlist[e]}):[]},this.jf=function(e,t,n){e=DayPilot.ua(e),e=s.if(e),s.gf(e),this.kf?(this.We(),this.Ze(),this._e(),e.forEach(function(e){s.lf(e.index)}),e.forEach(function(e){s.mf(e.index)}),this.cf(),this.nf()):(e.forEach(function(e){t||s.lf(e.index),s.mf(e.index)}),e.forEach(function(e){s.of(e.index)}),s.cf()),s.oe(),n&&n(),this.bf()},this.Re=function(e){return"DateTime"===s.eventEndSpec?e:e.getDatePart().ticks===e.ticks?e.addDays(-1):e.getDatePart()},this.pf=function(e){return"DateTime"===s.eventEndSpec?e:e.getDatePart().addDays(1)},this.qf=function(e){return"DateTime"===s.eventEndSpec?e:e.getDatePart()},this.M=function(e,t,n,a,i){if(s.rf=null,"Disabled"!==s.eventMoveHandling){n=s.Re(n);var r={};r.e=e,r.newStart=t,r.newEnd=n,r.newResource=a,r.ctrl=!1,r.meta=!1,r.shift=!1,i&&(r.shift=i.shiftKey,r.ctrl=i.ctrlKey,r.meta=i.metaKey),r.control=s,r.areaData=DayPilot.Global.movingAreaData,r.toJSON=function(){return DayPilot.Util.copyProps(r,{},["e","newStart","newEnd","newResource","ctrl","meta","shift"])},r.preventDefault=function(){this.preventDefault.value=!0};var o=function(){if(r.loaded=function(){},r.preventDefault.value)return void s.sf();switch(t=r.newStart,n=r.newEnd,s.eventMoveHandling){case"Update":s.Se(r)}s.sf(),"function"==typeof s.onEventMoved&&s.onEventMoved(r)};r.async=!1,r.loaded=function(){
|
|
18
|
-
o()},"function"==typeof s.onEventMove&&s.onEventMove(r),r.async||o()}},this.Se=function(e){var t=e.e,n=e.newStart,a=e.newEnd,i=e.newResource;t.start(n),t.end(a),t.resource(i),s.events.update(t),s.events.tf()},this.uf=function(e){if(e)if(e.args)s.O(e.args.start,e.args.end,e.args.resource);else{var t=s.vf(e);if(!t)return;s.O(t.start,t.end,t.resource)}},this.O=function(e,t,n){if("Disabled"!==s.timeRangeSelectedHandling){var a=t;t=s.Re(a);var i={};if(i.control=s,i.start=e,i.end=t,i.resource=n,i.preventDefault=function(){this.preventDefault.value=!0},i.toJSON=function(){return DayPilot.Util.copyProps(i,{},["start","end","resource"])},"function"==typeof s.onTimeRangeSelect){if(s.onTimeRangeSelect(i),i.preventDefault.value)return;e=i.start,t=i.end}t=s.pf(t),s.wf(s.xf,e,t),s.yf(s.xf),"function"==typeof s.onTimeRangeSelected&&s.onTimeRangeSelected(i)}},this.wf=function(e,t,n){if(e){var a,i=n;t.getTime()<s.startDate.getTime()?(e.start.x=0,e.start.time=s.startDate.getTime()):(a=s.Ke(t),e.start.x=a.i,e.start.time=t);var r=s.startDate.addDays(s.days);i.getTime()>r.getTime()?(e.end.x=s.zf(),e.end.time=r.getTime()):(a=s.Ke(i.addMilliseconds(-1)),e.end.x=a.i,e.end.time=n)}},this.Af=function(e,t){s.Bf(e,t)},this.Bf=function(e,t){var n={};n.resource=e,n.row=e,n.ctrl=t.ctrlKey,n.shift=t.shiftKey,n.meta=t.metaKey,n.originalEvent=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onRowClick&&(s.onRowClick(n),n.preventDefault.value)||"function"==typeof s.onRowClicked&&s.onRowClicked(n)},this.Cf=function(e){var t={};t.header=e,t.control=s,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onTimeHeaderClick&&(s.onTimeHeaderClick(t),t.preventDefault.value)||"function"==typeof s.onTimeHeaderClicked&&s.onTimeHeaderClicked(t)},this.getViewport=function(){var e=this.nav.scroll.scrollLeft,t=this.nav.scroll.scrollTop,n={},a=s.Df(e,t),i=s.Ef(a),r=s.Ie(a.start.x),o=s.Ie(a.end.x);return n.start=s.getDate(e,!0),n.end=s.getDate(e+s.nav.scroll.clientWidth,!0,!0),n.resources=i,r&&(n.topLeft={"start":r.start,"end":r.end,x:a.start.x,y:a.start.y,"resource":i[0]}),o&&(n.bottomRight={"start":o.start,"end":o.end,x:a.end.x,y:a.end.y,"resource":i[i.length-1]}),n.rows=function(){return n.resources.map(function(e){return s.rows.find(e)})},n.events=function(){var e=[];return n.rows().forEach(function(t){e=e.concat(t.events.forRange(n.start,n.end))}),e},n},this.Df=function(e,t){var n={};n.start={},n.end={};var a=s.He(e),i=s.He(e+s.nav.scroll.clientWidth);a&&(n.start.x=a.x),i&&(n.end.x=i.x);var r=t,o=t+s.nav.scroll.clientHeight;n.start.y=s.Ff(r).i,n.end.y=s.Ff(o).i,n.start.x=DayPilot.Util.atLeast(n.start.x,0);var l=s.zf();return n.end.x>=l&&(n.end.x=l-1),n},this.Ef=function(e){e||(e=this.Df(this.nav.scroll.scrollLeft,this.nav.scroll.scrollTop));var t=[];t.ignoreToJSON=!0;for(var n=e.start.y;n<=e.end.y;n++){var a=s.rowlist[n];a&&t.push(a.id)}return t},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.rb=function(){s.nav.top.className!==s.L("_main")&&(s.nav.top.className=s.L("_main"),s.nav.dh1.className=s.L("_divider_horizontal"),s.nav.dh2.className=s.L("_divider_horizontal"),s.divResScroll.className=s.L("_rowheader_scroll"),s.nav.divider.className=s.L("_divider")+" "+s.L("_splitter"),s.nav.scroll.className=s.L("_scrollable"),s.ge.className=s.L("_matrix")+" "+s.L("_grid_main"))},this.ba=function(){this.nav.top.dispose=this.dispose},this.dispose=function(){var e=s;if(e.La&&!e.Q){e.Q=!0;for(var n in e.Gf){var a=e.Gf[n];DayPilot.isArray(a)?a.forEach(function(e){clearTimeout(e)}):clearTimeout(a)}e.Z(),e.divCells=null,e.divCorner=null,e.divEvents=null,e.divHeader&&(e.divHeader.rows=null),e.divHeader=null,e.divLines=null,e.divNorth=null,e.divRange=null,e.divResScroll=null,e.divStretch=null,e.divTimeScroll=null,e.Ce=null,e.ge.calendar=null,e.ge=null,e.nav.top.onmousemove=null,e.nav.top.onmouseout=null,e.nav.top.dispose=null,e.nav.top.ontouchstart=null,e.nav.top.ontouchmove=null,e.nav.top.ontouchend=null,e.nav.top.removeAttribute("style"),e.nav.top.removeAttribute("class"),e.nav.top.innerHTML="",e.nav.top.dp=null,e.nav.top=null,e.nav.scroll.onscroll=null,e.nav.scroll.root=null,e.nav.scroll=null,t.pc(e),c=null}},this.disposed=function(){return s.Q},this.ca=function(e){var t=null;t=e.nodeType?e.event:e;var n=s.eventBorderRadius;"number"==typeof n&&(n+="px");var a=s.Hf(t),i=s.rowlist,o=s.eventHeight,l=t.part&&t.part.top&&i[t.part.dayIndex]?t.part.top+i[t.part.dayIndex].top:a.top,d=a.left,c=a.width,u=document.createElement("div");u.style.position="absolute",u.style.width=c+"px",u.style.height=o+"px",u.style.left=d+"px",u.style.top=l+"px",u.style.overflow="hidden";var h=r();return u.appendChild(h),u.className=this.L("_shadow"),h.className=this.L("_shadow_inner"),n&&(u.style.borderRadius=n,h.style.borderRadius=n),s.divShadow.appendChild(u),u.calendar=s,u},this.Ff=function(e){for(var t,n=s.rowlist,a={},i=0,r=0,o=n.length,l=0;l<o;l++){var d=n[l];if(r+=d.height,i=r-d.height,t=d,a.top=i,a.bottom=r,a.i=l,a.element=t,e<r)break}return a},this.If=function(e){if(e>this.rowlist.length-1)throw new DayPilot.Exception("Row index too high");for(var t=0,n=0;n<=e;n++)t+=this.rowlist[n].height;var a=this.rowlist[e];return{top:t-a.height,height:a.height,bottom:t,i:e,data:a}},this.events.find=function(e){if(!s.events.list||"undefined"==typeof s.events.list.length)return null;if("function"==typeof e)return s.Jf(e);for(var t=s.events.list.length,n=0;n<t;n++)if(s.events.list[n].id===e)return new DayPilot.Event(s.events.list[n],s);return null},this.events.findAll=function(e){if("function"==typeof e){for(var t=s.events.list.length,n=[],a=0;a<t;a++){var i=new DayPilot.Event(s.events.list[a],s);e(i)&&n.push(i)}return n}if("object"==typeof e)return s.events.findAll(function(t){for(var n in e)if(e[n]!==t.data[n])return!1;return!0});throw new DayPilot.Exception("function or object argument expected")},this.Jf=function(e){for(var t=s.events.list.length,n=0;n<t;n++){var a=new DayPilot.Event(s.events.list[n],s);if(e(a))return a}return null},this.events.focus=function(e){var t=s.Kf(e);null===t||void 0===t?void 0:t.focus()},this.events.scrollIntoView=function(e){if(s.Kf(e)){var t=e.start(),n=s.getViewport();!DayPilot.Util.overlaps(n.start,n.end,e.start(),e.end())&&DayPilot.Util.overlaps(s.sa(),s.Lf(),e.start(),e.end())&&s.scrollTo(t,"fast","middle");var a=e.resource();s.getViewport().resources.indexOf(a)===-1&&s.scrollToResource(a)}},this.events.all=function(){for(var e=[],t=0;t<s.events.list.length;t++){var n=new DayPilot.Event(s.events.list[t],s);e.push(n)}return e},this.events.forRange=function(e,t){e=e?new DayPilot.Date(e):s.visibleStart(),t=t?new DayPilot.Date(t):s.visibleEnd();for(var n=[],a=0;a<s.events.list.length;a++){var i=new DayPilot.Event(s.events.list[a],s);DayPilot.Util.overlaps(i.start(),i.end(),e,t)&&n.push(i)}return n},this.events.load=function(e,t,n){if(!e)throw new DayPilot.Exception("events.load(): 'url' parameter required");var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},i=function(e){var n,i=e.request;try{n=JSON.parse(i.responseText)}catch(e){var r={};return r.exception=e,void a(r)}if(DayPilot.isArray(n)){var o={};if(o.preventDefault=function(){this.preventDefault.value=!0},o.data=n,"function"==typeof t&&t(o),o.preventDefault.value)return;s.events.list=o.data,s.La&&s.update()}};if(s.eventsLoadMethod&&"POST"===s.eventsLoadMethod.toUpperCase())DayPilot.ajax({"method":"POST","contentType":"application/json","data":{"start":s.visibleStart().toString(),"end":s.visibleEnd().toString()},"url":e,"success":i,"error":a});else{var r=e,o="start="+s.visibleStart().toString()+"&end="+s.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+o:"?"+o,DayPilot.ajax({"method":"GET","url":r,"success":i,"error":a})}},this.events.Mf=function(e){var t=[];return s.rowlist.forEach(function(n){s.Nf(n.index);for(var a=0;a<n.events.length;a++){var i=n.events[a].data;if(s.Of(i,e)){t.push(n),n.events.splice(a,1);break}}}),t},this.events.Pf=function(e){if(!e)return null;for(var t=s.rowlist,n=0;n<t.length;n++){var a=t[n];s.Nf(a.index);for(var i=0;i<a.events.length;i++){var r=a.events[i];if(s.Of(r.data,e))return a.events[i]}}return null},this.events.Qf=function(e){var t=[],n=s.Rf(),a=DayPilot.indexOf(s.events.list,e);s.yb(a);var i=s.rowlist,r=!1;return i.forEach(function(i){if(!r){s.Nf(i.index);var o=s.Sf(e,i);o&&("function"==typeof s.onBeforeEventRender&&(o.cache=s.xb.events[a]),t.push(i),n||(r=!0))}}),t},this.Of=function(e,t){return DayPilot.Util.isSameEvent(e,t)},this.events.update=function(e){if("object"==typeof e&&!(e instanceof DayPilot.Event)){var t=s.events.find(e.id);return s.events.remove(t),void s.events.add(e)}if(s.events.list.find(function(t){return s.Of(t,e.data)})){s.ye.Tf&&(s.ye.skip=!0);var n=s.events.Mf(e.data);e.commit(),n=n.concat(s.events.Qf(e.data)),s.events.Uf(n)}},this.events.remove=function(e){if(e){if("string"==typeof e||"number"==typeof e){var t=s.events.find(e);return void s.events.remove(t)}var n=s.Vf(e.data);n&&s.events.list.splice(n.index,1),s.ye.Tf&&(s.ye.skip=!0);var a=s.events.Mf(e.data);s.events.Uf(a)}},this.events.add=function(e,t,n){n=n||{};var a=n.renderOnly;e instanceof DayPilot.Event||(e=new DayPilot.Event(e)),e.calendar=s,s.events.list||(s.events.list=[]);var i=s.Vf(e);if(a){if(!i)throw new DayPilot.Exception("Unexpected: event not found in list")}else{if(i)throw new DayPilot.Exception("The event you are trying to add using DayPilot.Scheduler.events.add() is already loaded. A unique ID is required.");i||s.events.list.push(e.data)}if(s.La){s.ye.Tf&&(s.ye.skip=!0);var r=s.events.Qf(e.data);s.events.Uf(r)}},this.events.Wf=function(e){var t=e instanceof DayPilot.Event?e.data:e,n=new DayPilot.Date(t.start),a=new DayPilot.Date(t.end);return!!s.events.list.find(function(e){if(s.Of(t,e))return!1;if(t.resource!==e.resource)return!1;var i=new DayPilot.Date(e.start),r=new DayPilot.Date(e.end);return DayPilot.Util.overlaps(n,a,i,r)})},this.events.Xf={"rows":[]},this.events.Yf=null,this.events.Ve=function(){clearTimeout(s.events.Yf),s.events.Yf=null,s.events.Xf.rows=[]},this.events.Zf=0,this.events.Uf=function(e){var t=s.events.Xf.rows;e.forEach(function(e){t.push(e)}),s.events.Xf.rows=DayPilot.ua(t);var n=s.events.tf;s.events.Yf||(s.events.Yf=setTimeout(n,s.events.Zf))},this.events.tf=function(){clearTimeout(s.events.Yf),s.events.Yf=null;var e=s.events.Xf.rows;s.events.Xf.rows=[],s.$f(e),s._f(),s.La&&(s.kf&&s.We(),s.ma(),s.jf(e))},this.ye={},this.ye.enabled=!1,this.ye.skip=!1,this.ye.skipUpdate=function(){return s.ye.skip},this.ye.skipped=function(){s.ye.skip=!1},this.ye.ag=!1,this.ye.Tf=!1,this.bg={},this.bg.reactDOM=null,this.bg.react=null,this.cg=function(e){var t=s.startDate;if(e.ticks===t.ticks)return e;var n=t;if(e.ticks<t.ticks){for(;n.ticks>e.ticks;)n=n.addTime(60*-s.Le()*1e3);return n}var a=this.Ke(e);if(a.current)return a.current.start;throw new DayPilot.Exception("getBoxStart(): time not found")},this.Hf=function(e){var n=this.Ff(s.coords.y);if("function"!=typeof e.end)throw new DayPilot.Exception("e.end function is not defined");if(!e.end())throw new DayPilot.Exception("e.end() returns null");var a=DayPilot.DateUtil.diff(e.rawend(),e.start());a=DayPilot.Util.atLeast(a,1);var i=l.dg(a),r=0,o=s.coords.x;i&&(r=e.start().getTime()-this.cg(e.start()).getTime());var d=0;if(t.eg)if(i){var c=e.start(),u=this.cg(c);d=t.eg.getTime()-u.getTime();var h=60*s.Le()*1e3;d=Math.floor(d/h)*h}else d=t.eg.getTime()-e.start().getTime();var f=this.getDate(o,!0).addTime(-d);t.fg&&(f=e.start());var v=s.snapToGrid;v&&(f=this.cg(f)),f=f.addTime(r);var p=f.addTime(a),m=f,g=p,y=this.getPixels(m),b=this.getPixels(g),w=v?y.boxLeft:y.left,x=v&&i?b.boxRight-w:b.left-w,_={};return _.top=n.top,_.left=w,_.row=n.element,_.rowIndex=n.i,_.width=x,_.start=f,_.end=p,_.relativeY=s.coords.y-n.top,_},this.Le=function(){switch(this.scale){case"CellDuration":return this.cellDuration;case"Minute":return 1;case"Hour":return 60;case"Day":return 1440;case"Week":return 10080}throw new DayPilot.Exception("can't guess cellDuration value")},this.gg=function(e){return e.end.ticks-e.start.ticks},this.hg=function(){var e=t.ig.width,n=t.ig.left,a=t.jg,i=t.fg.dpBorder,r=null,o=null,l=s.snapToGrid,d=!l;"left"===i?(r=s.getDate(n,d),o=a.rawend()):"right"===i&&(r=a.start(),o=s.getDate(n+e,d,!0)),t.ig.start=r,t.ig.end=o},this.kg=function(){var e=s.coords,n=t.fg.dpBorder,a=t.fg.event,i=a.part.left;"right"===n&&(i+=a.part.width);var r,o,l=t.fg.event.calendar.cellWidth,d=a.part.width,c=a.part.left,u=0,h=e.x-i,f=s.snapToGrid;if("right"===n){if(r=c,f){var v=s.He(d+c+h).cell,p=s.He(c).cell,m=p.left+p.width-c;o=v.left+v.width-c,o<m&&(o=m)}else o=d+h;var g=s.ze();c+o>g&&(o=g-c),t.ig.left=c,t.ig.width=o,t.ig.style.left=c+"px",t.ig.style.width=o+"px"}else{if("left"!==n)throw new DayPilot.Exception("Invalid dpBorder.");f?(h>=d&&(h=d),r=Math.floor((c+h+0)/l)*l,r<u&&(r=u)):r=c+h,o=d-(r-c);var y=c+d,b=l;f?"Never"===s.useEventBoxes&&(b=d<l?d:1):b=1,o<b&&(o=b,r=y-o),t.ig.left=r,t.ig.width=o,t.ig.style.left=r+"px",t.ig.style.width=o+"px"}s.hg()},this.lg=function(){if(s.coords&&t.mg){var e=t.ng,n=this.Hf(t.mg);e.row=n.row,e.style.height=DayPilot.Util.atLeast(n.row.height,0)+"px",e.style.top=n.top+"px",e.style.left=n.left+"px",e.style.width=n.width+"px",e.start=n.start,e.end=n.end}},this.og=function(){return this.rowHeaderWidth},this.pg=function(){return this.qg(s.progressiveRowRenderingPreload)},this.qg=function(e){e=e||0;var t=0,n=s.rowlist.length;if(s.progressiveRowRendering){var a=s.ke();t=a.yStart,n=a.yEnd+1,t=DayPilot.Util.atLeast(0,t-e),n=Math.min(s.rowlist.length,n+e)}return{"start":t,"end":n}},this.Xe=function(){function e(){var e=s.divHeader;e&&(e.rows=[]);var t=e;t&&(t.innerHTML="")}this.rg=!0;var t=this.og();e();var a=this.divHeader;if(a.style.width=t+"px",a.style.height=s._d+"px",s.divHeader=a,s.progressiveRowRendering)n();else for(var i=this.rowlist.length,r=0;r<i;r++)s.sg(r);s.tg(),this.divResScroll.appendChild(a)},this.ug=function(){if(s.progressiveRowRendering)for(var e=this.pg(),t=0;t<s.rowlist.length;t++)e.start<=t&&t<e.end?s.sg(t):s.vg(t)},this.tg=function(){if(!s.R.wg()){var e=s.divHeader,t=r();t.style.position="absolute",e.appendChild(t),s.nav.resScrollSpace=t;var n=r();n.style.position="relative",n.style.height="100%",n.className=this.L("_rowheader"),t.appendChild(n);var a=this.og();t.style.width=a+"px",t.style.top=this._d+"px"}},this.vg=function(e){var t=s.divHeader.rows[e];t&&(DayPilot.de(t),s.divHeader.rows[e]=null)},this.hf=function(e){this.vg(e),this.sg(e)},this.sg=function(e){var t=s.rowlist,n=s.divHeader;if(n&&!n.rows[e]){var a=this.og(),i=t[e];if(i){var o=this.xg(i),l=r();l.style.position="absolute",l.style.top=i.top+"px",n.rows[e]=l,l.row=i,l.index=e;var d=o.row,c=this.rowHeaderWidth;l.style.width=c+"px",l.style.border="0px none";var u=d.toolTip||d.toolTip;u&&(l.title=u),"undefined"!=typeof d.ariaLabel?l.setAttribute("aria-label",d.ariaLabel):l.setAttribute("aria-label",d.text||""),l.onclick=s.yg;var h=r();h.style.width=c+"px",h.className=this.L("_rowheader"),d.cssClass&&DayPilot.Util.addClass(h,d.cssClass),d.cssClass&&DayPilot.Util.addClass(h,d.cssClass);var f=d.backColor||d.backColor;f&&(h.style.background=f);var v=d.fontColor||d.fontColor;v&&(h.style.color=v);var p=d.horizontalAlignment||d.horizontalAlignment;p&&(h.style.textAlign=p),h.style.height=i.height+"px",h.style.overflow="hidden",h.style.position="relative";var m=r();switch(m.className=this.L("_rowheader_inner"),p){case"right":m.style.justifyContent="flex-end";break;case"left":m.style.justifyContent="flex-start";break;case"center":m.style.justifyContent="center"}h.appendChild(m);var g=d.areas||[],y=s.zg(i);DayPilot.Areas.attach(h,y,{areas:g});var b=r();b.style.position="absolute",b.style.bottom="0px",b.style.width="100%",b.style.height="0px",b.style.boxSizing="content-box",b.style.borderBottom="1px solid transparent",b.className=this.L("_resourcedivider"),h.appendChild(b);var w=r(),x=r();x.innerHTML=s.$a(d.text,d.html),x.className=s.L("_rowheader_inner_text"),l.textDiv=x,l.cellDiv=h,w.appendChild(x),m.appendChild(w);var _=d.verticalAlignment||d.verticalAlignment;if(_)switch(m.style.display="flex",_){case"center":m.style.alignItems="center";break;case"top":m.style.alignItems="flex-start";break;case"bottom":m.style.alignItems="flex-end"}l.appendChild(h),n.appendChild(l),h.style.width=a+"px"}}},this.yg=function(e){var t=this.row,n=s.zg(t,this.index);s.Af(n,e)},this.Ag=function(){if("Disabled"!==s.timeHeaderClickHandling){var e={};e.start=this.cell.start,e.level=this.cell.level,e.end=this.cell.end,e.end||(e.end=new DayPilot.Date(e.start).addMinutes(s.Le())),s.Cf(e)}},this.Bg=function(e){if("Disabled"!==s.timeHeaderRightClickHandling){e.cancelBubble=!0,e.preventDefault();var t={};t.start=this.cell.start,t.level=this.cell.level,t.end=this.cell.end,t.end||(t.end=new DayPilot.Date(t.start).addMinutes(s.Le()));var n={};n.header=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onTimeHeaderRightClick&&(s.onTimeHeaderRightClick(n),n.preventDefault.value)||"function"==typeof s.onTimeHeaderRightClicked&&s.onTimeHeaderRightClicked(n)}},this.zg=function(e){return new DayPilot.Row(e,s)},this.Nf=function(e){var t=s.rowlist,n=t[e];n.events||n.resetEvents()},this.Cg={},this.ha=function(e){if(e?this.events.list=e:this.events.list||(this.events.list=[]),null!=this.events.list&&!DayPilot.isArray(this.events.list))throw new DayPilot.Exception("DayPilot.Scheduler.events.list expects an array object");c.prepareRows(!0);var t,n=this.events.list,a="function"==typeof this.onBeforeEventRender;s.Cg={};for(var i=0;i<n.length;i++){var r=n[i];if(r){if("object"!=typeof r)throw new DayPilot.Exception("Event data item must be an object");if(!r.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(r instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Scheduler: DayPilot.Event object detected in events.list array. Use raw event data instead.");if(!("string"==typeof r.id||"number"==typeof r.id))throw new DayPilot.Exception("All events must have an id property (string or number)");var o="_"+r.id;if(s.Cg[o])throw new DayPilot.Exception("Duplicate event IDs are not allowed: "+o);s.Cg[o]=!0,a&&this.yb(i),t=s.Dg(r.resource);for(var l=0;t&&l<t.length;l++){var d=t[l],u=this.Sf(r,d);u&&a&&(u.cache=this.xb.events[i])}}}s.rowlist.forEach(function(e){s.Eg(e)}),s._f()},c.rowcache={},c.prepareRows=function(e){c.rowcache={};for(var t=s.rowlist,n=0;n<t.length;n++){var a=t[n];if(e&&a.resetEvents(),s.Nf(a.index),a.id){var i=typeof a.id+"_"+a.id;c.rowcache[i]||(c.rowcache[i]=[]),c.rowcache[i].push(a)}}},this.Dg=function(e){var t=typeof e+"_"+e;return c.rowcache[t]||[]},this.Rf=function(){for(var e={},t=0;t<s.rowlist.length;t++){var n=s.rowlist[t],a=n.id;if(e[a])return!0;e[a]=!0}return!1},this.yb=function(e){var t=this.xb.events,n=this.events.list[e],a={};n instanceof DayPilot.Event&&(n=n.data);for(var i in n)a[i]=n[i];if("string"==typeof a.start&&(a.start=new DayPilot.Date(a.start)),"string"==typeof a.end&&(a.end=new DayPilot.Date(a.end)),"function"==typeof this.onBeforeEventRender){var r={};r.e=a,r.data=a,this.onBeforeEventRender(r)}t[e]=a},this.Eg=function(e){e.lines=[],e.sections=null,e.events.sort(this.zb);for(var t=0;t<e.events.length;t++){var n=e.events[t];e.putIntoLine(n)}},this.$f=function(e){e=DayPilot.ua(e),e=s.if(e),e.forEach(function(e){s.Eg(e)}),e.forEach(function(e){s.Fg(e)})},this.Sf=function(e,t){var n=new DayPilot.Date(e.start),a=new DayPilot.Date(e.end);a=s.pf(a);var i=n.ticks,r=a.ticks,o=s.startDate.ticks,d=s.startDate.addDays(s.days).ticks;if(r<i)return null;var c=null;if("function"==typeof s.onBeforeEventRender){var u=DayPilot.indexOf(s.events.list,e);c=s.xb.events[u]}if(t.id!==e.resource||(r<=o||i>=d)&&(i!==r||i!==o))return null;var h=new DayPilot.Event(e,s);h.part.dayIndex=s.rowlist.indexOf(t),h.part.start=o<i?n:s.startDate,h.part.end=d>r?a:s.startDate.addDays(s.days);var f=this.getPixels(h.part.start),v=this.getPixels(h.part.end);h.part.start===h.part.end&&(v=this.getPixels(h.part.end.addMilliseconds(1)));var p=f.left,m=v.left;if(l.dg(r-i)){var g=f.boxLeft,y=v.boxRight;h.part.left=g,h.part.width=y-g,h.part.barLeft=Math.max(p-h.part.left,0),h.part.barWidth=Math.max(m-p,1)}else h.part.left=p,h.part.width=Math.max(m-p,1),h.part.barLeft=0,h.part.barWidth=Math.max(m-p,1);var b=s.eventMinWidth;return h.part.width=Math.max(h.part.width,b),h.part.right=h.part.left+h.part.width,h.cache=c,t.events.push(h),h},this.zb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var n=e.start().ticks-t.start().ticks;return 0!==n?n:t.end().ticks-e.end().ticks},this.rows={},this.rows.all=function(){for(var e=[],t=0;t<s.rowlist.length;t++){var n=s.zg(s.rowlist[t]);e.push(n)}return e},this.rows.each=function(e){s.rows.all().forEach(e)},this.rows.forEach=function(e){s.rows.all().forEach(e)},this.rows.find=function(e,t){if("string"==typeof e||"number"==typeof e||!e&&t){var n=s.Dg(e);e||(n=s.rowlist);var a=null;return"string"==typeof t||t instanceof DayPilot.Date?(t=new DayPilot.Date(t),a=n.find(function(e){return t===e.start})):a=n[0],a?new DayPilot.Row(a,s):null}if("function"!=typeof e)throw new DayPilot.Exception("Invalid rows.find() argument: id or function expected");var i=t||0,r=s.rowlist.find(function(t,n){return!(n<i)&&e(s.zg(t))});if(r)return s.zg(r)},this.rows.load=function(e,t,n){if(!e)throw new DayPilot.Exception("rows.load(): 'url' parameter required");var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},i=function(e){var n,i=e.request;try{n=JSON.parse(i.responseText)}catch(e){var r={};return r.exception=e,void a(r)}if(DayPilot.isArray(n)){var o={};if(o.preventDefault=function(){this.preventDefault.value=!0},o.data=n,"function"==typeof t&&t(o),o.preventDefault.value)return;s.resources=o.data,s.La&&s.update()}};s.rowsLoadMethod&&"POST"===s.rowsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":i,"error":a}):DayPilot.ajax({"method":"GET","url":e,"success":i,"error":a})},this.rows.remove=function(e){if("number"==typeof e||"string"==typeof e){var t=s.rows.find(e);if(!t)throw new DayPilot.Exception("The row to be removed was not found");return void s.rows.remove(t)}var n=e.$.row.resource,a=DayPilot.indexOf(s.resources,n);s.resources.splice(a,1),s.update()},this.rows.add=function(e){s.resources.push(e),s.qb()},this.rows.update=function(e){if(!(e instanceof DayPilot.Row||"object"==typeof e))throw new DayPilot.Exception("DayPilot.Scheduler.rows.update() expects a DayPilot.Row object or a data object.");if(!(e instanceof DayPilot.Row)){var t=e;if(e=s.rows.find(t.id),!e)return;e.data=t}var n=e.index,a=s.rowlist,i=a[n],r=e.data,o=s.Gg(r),l=s.Hg(o);l.level=i.level,l.index=n,l.top=i.top,l.height=i.height,a[n]=l,l.resetEvents(),s.Nf(l.index),s.Ig(l),s.Eg(l),s.hf(l.index),s._e(),s.cf()},this.Ig=function(e){for(var t=s.events.list,n=t.length,a="function"==typeof s.onBeforeEventRender,i=0;i<n;i++){var r=t[i];if(r){if(r instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Scheduler: DayPilot.Event object detected in events.list array. Use raw event data instead.");if(r.resource===e.id){a&&this.yb(i);var o=this.Sf(r,e);o&&a&&(o.cache=this.xb.events[i])}}}},this.Ue=function(){var e=this.resources;if({}.i=0,null!=e&&!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Scheduler.resources expects an array object");e=e||[],s.rowlist=[],this.Jg(e)},this.sa=function(){return new DayPilot.Date(this.startDate)},this.Lf=function(){return new DayPilot.Date(s.startDate).addDays(s.days)},this.visibleStart=function(){return this.sa()},this.visibleEnd=function(){return this.Lf()},this.Hg=function(e){var t={};return t.backColor=e.backColor,t.fontColor=e.fontColor,t.cssClass=e.cssClass,t.name=e.name,t.html=s.$a(e.name,e.html),t.id=e.id,t.toolTip=e.toolTip,t.areas=e.areas,t.tags=e.tags,t.height=s.eventHeight,t.level=0,t.resource=e.xe,t.lines=[],t.isRow=!0,t.getHeight=function(){return Math.max(s.eventHeight,this.lines.length*s.eventHeight)},t.resetEvents=function(){var e=t;e.events=[],e.events.forRange=function(t,n){t=new DayPilot.Date(t),n=n?new DayPilot.Date(n):s.startDate.addDays(s.days);for(var a=[],i=0;i<e.events.length;i++){var r=e.events[i],o=s.pf(r.end());DayPilot.Util.overlaps(r.start(),o,t,n)&&a.push(r)}return a}},t.Kg=function(){var e=[];return e.add=function(e){this.push(e)},e.isFree=function(e,t,n){for(var a=e+t-1,i=this.length,r=0;r<i;r++){var o=this[r];if(!(a<o.part.left||e>o.part.left+o.part.width-1)){if(DayPilot.contains(n,o.data))continue;return!1}}return!0},e},t.findFreeLine=function(e,n){for(var a=0;a<this.lines.length;a++){if(this.lines[a].isFree(e,n))return a}var i=t.Kg();return this.lines.push(i),this.lines.length-1},t.putIntoLine=function(e){var n=t.findFreeLine(e.part.left,e.part.width);return this.lines[n].add(e),n},t},this.Jg=function(e){if(e)for(var t=s.rowlist,n=0;n<e.length;n++)if(e[n]){var a={};a.index=n;var i=this.Gg(e[n],a),r=s.Hg(i,parent);r.index=n,t.push(r)}},this.xg=function(e){var t={};return t.row=this.zg(e),DayPilot.Util.copyProps(e,t.row,["html","backColor","fontColor","cssClass","toolTip","areas"]),"function"==typeof this.onBeforeRowHeaderRender&&this.onBeforeRowHeaderRender(t),t},this.Gg=function(e,t){var n={get $data(){return this.xe}};for(var a in t)n[a]=t[a];for(var i in e)n[i]=e[i];return n.html=s.$a(e.name,e.html),n.xe=e,n},this.Lg=function(){this.nav.top.dp=this,this.nav.top.innerHTML="",DayPilot.Util.addClass(this.nav.top,this.L("_main")),this.nav.top.setAttribute("role","region"),this.nav.top.setAttribute("aria-label","scheduler"),this.nav.top.style.userSelect="none",this.nav.top.style.webkitUserSelect="none",this.nav.top.style.WebkitTapHighlightColor="rgba(0,0,0,0)",this.nav.top.style.WebkitTouchCallout="none",this.width&&(this.nav.top.style.width=this.width),this.nav.top.style.lineHeight="1.2",this.nav.top.style.position="relative",this.visible||(this.nav.top.style.display="none"),this.nav.top.ontouchstart=d.Mg,this.nav.top.ontouchmove=d.Ng,this.nav.top.ontouchend=d.Og;var e=this.rowHeaderWidth,t=r();t.style.position="absolute",t.style.left="0px",t.style.width=e+"px";var n=r();n.style.height="0px",n.style.boxSizing="content-box",n.style.borderTop="1px solid transparent",n.className=this.L("_divider_horizontal"),this.nav.dh1=n,this.nav.left=t,t.appendChild(this.eb()),t.appendChild(n),t.appendChild(this.Pg());var a=r();a.style.position="absolute",a.style.left=e+"px",a.style.width="1px",a.style.height=this.Be()+this.Xa()+"px",a.className=this.L("_splitter"),this.nav.divider=a;var i=r();i.style.marginLeft=e+1+"px",i.style.position="relative",this.nav.right=i;var o=r();o.style.position="absolute",o.style.top=this.Be()+"px",o.style.width="100%",o.style.height="1px",o.style.boxSizing="border-box",o.style.borderBottom="1px solid transparent",o.setAttribute("data-dh2","true"),o.className=this.L("_divider_horizontal"),this.nav.dh2=o,i.appendChild(s.Qg()),i.appendChild(s.Rg()),i.appendChild(o);var l=r();l.style.clear="left";var c=r();c.style.height="1px",c.style.position="absolute",c.style.left="0px",c.style.right="0px",c.style.display="none",c.className=this.L("_divider_horizontal"),this.nav.dividerTop=c;var u=r();u.style.height="1px",u.style.position="absolute",u.style.left="0px",u.style.right="0px",u.style.display="none",u.className=this.L("_divider_horizontal")+" "+this.L("_divider_horizontal_frozen_bottom"),this.nav.dividerBottom=u,this.nav.top.appendChild(t),this.nav.top.appendChild(a),this.nav.top.appendChild(i),this.nav.top.appendChild(l),this.nav.top.appendChild(c),this.nav.top.appendChild(u)},this.ia=function(){var e=this.Be();this.nav.corner&&(this.nav.corner.style.height=e+"px"),this.divTimeScroll&&(this.divTimeScroll.style.height=e+"px"),this.divNorth&&(this.divNorth.style.height=e+"px"),this.nav.dh1&&this.nav.dh2&&(this.nav.dh1.style.top=e+"px",this.nav.dh2.style.top=e+"px"),this.nav.scroll.style.top=e+1+"px"},this.Sg=function(){var e=this.rowHeaderWidth;this.nav.corner&&(this.nav.corner.style.width=e+"px"),this.divResScroll.style.width=e+"px",this.nav.left.style.width=e+"px",this.nav.divider.style.left=e-1+"px",this.nav.right.style.marginLeft=e+"px"},this.Tg=function(){var e=this.rowHeaderWidth,t=this.divHeader;t.style.width=e+"px";for(var n=s.pg(),a=n.start;a<n.end;a++){var i=t.rows[a];if(i){var r=s.rowHeaderWidth;i.style.width=r+"px";i.firstChild.style.width=r+"px"}}s.nav.resScrollSpace&&(s.nav.resScrollSpace.style.width=e+"px")},this.$e=function(){this.Sg(),this.Tg()},this.eb=function(){var e=this.rowHeaderWidth,t=r();s.nav.corner=t,t.style.width=e+"px",t.style.height=this.Be()+"px",t.style.overflow="hidden",t.style.position="relative",t.oncontextmenu=function(){return!1},t.className=this.L("_corner");var n=r();return n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.style.right="0px",n.style.bottom="0px",n.className=this.L("_corner_inner"),n.innerHTML=" ",this.divCorner=n,t.appendChild(n),t},this.Be=function(){return s.timeHeaders?s.timeHeaders.length*s.headerHeight:0},this.Ug=null,this.Pg=function(){var e=r();e.style.width=this.rowHeaderWidth+"px",e.style.height=this.Xa()+"px",e.style.overflow="hidden",e.style.position="relative",e.className=s.L("_rowheader_scroll");var n=s.R.wg();n&&(e.style.overflowY="auto"),e.ontouchstart=function(){t.Vg=!0},e.oncontextmenu=function(){return!1},e.onscroll=function(){if(s.Ug&&clearTimeout(s.Ug),n){var a=function(){var t=s.Wg()-s.nav.scroll.offsetHeight;e.scrollTop=Math.min(e.scrollTop,t),s.nav.scroll.scrollTop=e.scrollTop};DayPilot.browser.ios?t.Vg&&(s.Ug=setTimeout(a,10)):s.Ug=setTimeout(a,10)}else s.Ug=setTimeout(function(){s.nav.scroll.scrollTop=e.scrollTop},500)},e.setAttribute("role","region"),e.setAttribute("aria-label","scheduler rows");var a=r();return this.divHeader=a,e.appendChild(a),this.divResScroll=e,this.Ce=e,e},this.Xg=null,this.Yg=null,this.Zg=function(){var e=function(){s.$g(),s.df()},t=function(){var t=s.nav.top;if(t){if(!s.Xg)return s.Xg={},void(s.Xg.width=t.offsetWidth);s.Xg.width!==t.offsetWidth&&(s.Xg.width=t.offsetWidth,e())}};if(!s.Yg){var n=new ResizeObserver(DayPilot.debounce(t,100));n.observe(s.nav.top),s.Yg=n}},this.$g=function(){s.Q||(s.ma(),s._g(),s.xb.drawArea=null)},this._g=function(){var e=s.xf;s.clearSelection(),s.xf=e,s.yf(e,{"justDraw":!0})},this.Qg=function(){var e=r();e.style.overflow="hidden",e.style.display="block",e.style.position="absolute",e.style.top="0px",e.style.width="100%",e.style.height=this.Be()+"px",e.style.overflow="hidden",e.className=s.L("_timeheader_scroll"),this.divTimeScroll=e;var t=r();return t.style.width=this.ze()+5e3+"px",this.divNorth=t,e.appendChild(t),e},this.Xa=function(){var e=0,t=s.heightSpec;return"Fixed"===t?this.height?this.height:0:(e=s.Wg(),"Max"===t&&e>s.height?s.height:e)},this.Wg=function(){var e;return this._d!==-1?(e=this._d,this._d>0&&"auto"===s.nav.scroll.style.overflowX&&(e+=DayPilot.sh(s.nav.scroll)+1)):e=this.rowlist.length*s.eventHeight,e},this.Rg=function(){var e=r();e.style.overflow="auto",e.style.overflowX="auto",e.style.overflowY="auto",e.style.height=this.Xa()+"px",e.style.top=this.Be()+1+"px",e.style.position="absolute",e.style.width="100%",e.className=this.L("_scrollable"),e.oncontextmenu=function(){return!1},this.nav.scroll=e,this.ge=r();var t=this.ge;t.style.userSelect="none",t.style.webkitUserSelect="none",t.calendar=this,t.style.position="absolute";var n=this.ze();return n>0&&(t.style.width=n+"px"),t.onmousedown=this.ah,t.onmousemove=this.bh,t.onmouseup=this.ch,t.oncontextmenu=this.dh,t.className=this.L("_matrix"),this.divStretch=r(),this.divStretch.style.position="absolute",this.divStretch.style.height="1px",t.appendChild(this.divStretch),this.divCells=r(),this.divCells.style.position="absolute",this.divCells.oncontextmenu=this.dh,t.appendChild(this.divCells),this.divLines=r(),this.divLines.style.position="absolute",this.divLines.oncontextmenu=this.dh,t.appendChild(this.divLines),this.divSeparators=r(),this.divSeparators.style.position="absolute",
|
|
19
|
-
this.divSeparators.oncontextmenu=this.dh,t.appendChild(this.divSeparators),this.divRange=r(),this.divRange.style.position="absolute",this.divRange.oncontextmenu=this.dh,t.appendChild(this.divRange),this.divEvents=r(),this.divEvents.style.position="absolute",t.appendChild(this.divEvents),this.divShadow=r(),this.divShadow.style.position="absolute",t.appendChild(this.divShadow),e.appendChild(t),e},this.pb=function(){t.eh||(t.eh=!0,DayPilot.re(document,"mouseup",t.$d),DayPilot.reNonPassive(document,"touchmove",t.fh),DayPilot.re(document,"touchend",t.gh))},this.hh=function(){this.nav.scroll.root=this,this.nav.scroll.onscroll=this.df,s.ih=this.nav.scroll.scrollLeft,s.jh=this.nav.scroll.scrollTop,this.divNorth&&(s.kh=this.divNorth.clientWidth)},this.lh={},this.lh.step=300,this.lh.delay=10,this.lh.mode="display",this.lh.layers=!1,this.Fg=function(e){for(var t=0,n=0;n<e.lines.length;n++){for(var a=e.lines[n],i=0;i<a.length;i++){var r=a[i];r.part.line=n,r.part.top=t+s.rowMarginTop,r.part.right=r.part.left+r.part.width}t+=s.eventHeight}},this.Te=null,this.na=function(e){if(!s.Q){var t=this.lh.step;"display"===this.lh.mode?this.divEvents.style.display="none":"visibility"===this.lh.mode&&(this.divEvents.style.visibility="hidden"),this.divEvents.setAttribute("role","region"),this.divEvents.setAttribute("aria-label","scheduler events");var n="Progressive"===this.dynamicEventRendering,a=this.ke(),i=a.pixels.top,r=a.pixels.bottom;s.rowlist.filter(function(e){var t=e.top-l.mh(),a=t+e.height+2*l.mh();return!n||!(a<=i||t>=r)}).forEach(function(n){s.Fg(n);for(var a=0;a<n.lines.length;a++)for(var i=n.lines[a],r=0;r<i.length;r++){var o=i[r],l=s.Ua(o);if(e&&l&&(t--,t<=0))return s.divEvents.style.visibility="",s.divEvents.style.display="",void(s.Te=setTimeout(function(){s.na(e)},s.lh.delay))}}),this.divEvents.style.display="",this.oe()}},this.mf=function(e){var t=s.rowlist[e];this.Fg(t);for(var n=0;n<t.lines.length;n++)for(var a=t.lines[n],i=0;i<a.length;i++){var r=a[i];this.Ua(r)}},this.Z=function(){if(this.elements.events)for(var e=this.elements.events.length,t=0;t<e;t++){var n=this.elements.events[t];this.Oa(n)}this.elements.events=[]},this.lf=function(e){if(this.elements.events){for(var t=this.elements.events.length,n=[],a=0;a<t;a++){var i=this.elements.events[a];i.event.part.dayIndex===e&&(this.Oa(i),n.push(a))}for(var a=n.length-1;a>=0;a--)this.elements.events.splice(n[a],1)}},this.Oa=function(e){var t=e.domArgs;if(e.domArgs=null,t&&"function"==typeof s.onBeforeEventDomRemove&&s.onBeforeEventDomRemove(t),t&&"function"==typeof s.onBeforeEventDomAdd){var n=t&&t.Pa;if(n){var a=s.bg.reactDOM&&DayPilot.Util.isReactComponent(t.element),i=s.Ra.Qa&&DayPilot.Util.isVueVNode(t.element);a?s.bg.nh(n):i&&(s.Ra.Sa=!0,s.Ra.Ta(n),s.Ra.Sa=!1)}}e.remove(),e.onclick=null,e.oncontextmenu=null,e.onmouseover=null,e.onmouseout=null,e.onmousemove=null,e.onmousedown=null,e.ondblclick=null,e.event&&(e.event.rendered=null,e.event=null)},this.oh=function(){if("Progressive"===this.dynamicEventRendering){if(s.dynamicEventRenderingCacheSweeping){var e=s.dynamicEventRenderingCacheSize||0;this.divEvents.style.display="none";for(var t=[],n=this.elements.events.length,a=n-1;a>=0;a--){var i=this.elements.events[a];this.ph(i.event)?e>0?(e--,t.unshift(i)):this.Oa(i):t.unshift(i)}this.elements.events=t,this.divEvents.style.display=""}}},this.qh=function(e){for(var t=this.ke(),n=this.elements.cells.length,a=n-1;a>=0;a--){var i=this.elements.cells[a];t.xStart<i.coords.x&&i.coords.x<=t.xEnd&&t.yStart<i.coords.y&&i.coords.y<=t.yEnd||(e>0?e--:this.fb(i))}},this.fb=function(e){if(e&&e.coords){var t=e.coords.x,n=e.coords.y;!function(){var t=e.domArgs;if(e.domArgs=null,t&&"function"==typeof s.onBeforeCellDomRemove&&s.onBeforeCellDomRemove(t),t&&"function"==typeof s.onBeforeCellDomAdd){var n=t&&t.Pa;if(n){var a=s.bg.reactDOM&&DayPilot.Util.isReactComponent(t.element),i=s.Ra.Qa&&DayPilot.Util.isVueVNode(t.element);a?s.bg.nh(n):i&&(s.Ra.Sa=!0,s.Ra.Ta(n),s.Ra.Sa=!1)}}}(),DayPilot.rfa(s.elements.cells,e),DayPilot.de(e),s.xb.cells[t+"_"+n]=null}},this.rh=function(){var e="Progressive"===this.dynamicEventRendering;if(!this.nav.scroll)return!1;for(var t=this.nav.scroll.scrollTop-l.mh(),n=t+this.nav.scroll.clientHeight+2*l.mh(),a=0;a<this.rowlist.length;a++){var i=this.rowlist[a],r=i.top,o=i.top+i.height;if(!e||!(r>=n||o<=t))for(var s=0;s<i.lines.length;s++)for(var d=i.lines[s],c=0;c<d.length;c++){var u=d[c];if(this.uh(u))return!0}}return!1},this.uh=function(e){if(e.rendered)return!1;var t="Progressive"===this.dynamicEventRendering,n=this.nav.scroll.scrollLeft-l.vh(),a=n+this.nav.scroll.clientWidth+2*l.vh(),i=e.part.left,r=e.part.left+e.part.width;return!t||!(a<=i||n>=r)},this.ph=function(e){if(!e.rendered)return!0;var t=this.ke(),n=t.pixels.top,a=t.pixels.bottom,i=t.pixels.left-this.dynamicEventRenderingMargin,r=t.pixels.right+this.dynamicEventRenderingMargin,o=e.part.left,l=e.part.right,d=e.part.top,c=e.part.top+s.eventHeight;return r<=o||i>=l||(a<=d||n>=c)},this.Ua=function(e,t){t=t||{};var n=t.forced;if(e.rendered)return!1;var a="Progressive"===this.dynamicEventRendering,i=e.part.dayIndex,o=s.divEvents,c=s.rowlist,u=c[i],h=u.top,f=this.ke(),v=f.pixels.left-l.vh(),p=f.pixels.right+l.vh(),m=f.pixels.top,g=f.pixels.bottom,y=e.part.left,b=e.part.left+e.part.width,w=e.part.top+h,x=w+s.eventHeight,_=p<=y||v>=b,C=g<=w||m>=x;if(!n&&a&&(_||C))return!1;var k=e.part.width,D=s.eventHeight,S=e.cache||e.data,M=S.borderRadius||s.eventBorderRadius;"number"==typeof M&&(M+="px");var T=S.padding||s.eventPadding;"number"==typeof T&&(T+="px"),k=DayPilot.Util.atLeast(0,k),D=DayPilot.Util.atLeast(0,D);var A=r();A.style.position="absolute",A.style.left=e.part.left+"px",A.style.top=h+e.part.top+"px",A.style.width=k+"px",A.style.height=D+"px",s.eventTextWrappingEnabled||(A.style.whiteSpace="nowrap"),A.style.overflow="hidden",A.className=this.L("_event"),S.cssClass&&DayPilot.Util.addClass(A,S.cssClass);"number"==typeof e.part.line&&DayPilot.Util.addClass(A,this.L("_event_line"+e.part.line)),M&&(A.style.borderRadius=M),this.showToolTip&&(A.title=e.client.toolTip()||""),A.onmousemove=this.wh,A.onmousedown=this.xh,A.onmouseup=this.yh,A.ontouchstart=d.zh,A.ontouchmove=d.Ah,A.ontouchend=d.Bh,e.client.clickEnabled()&&(A.onclick=this.Me),"undefined"!=typeof S.ariaLabel?A.setAttribute("aria-label",S.ariaLabel):A.setAttribute("aria-label",S.text),A.setAttribute("tabindex","-1");var E=r();E.className=s.L("_event_inner"),M&&(E.style.borderRadius=M),T&&(E.style.padding=T),S.backColor&&(E.style.background=S.backColor),S.fontColor&&(E.style.color=S.fontColor),"darker"===S.borderColor&&S.backColor?E.style.borderColor=DayPilot.ColorUtil.darker(S.backColor,2):E.style.borderColor=S.borderColor,S.backImage&&(E.style.backgroundImage="url("+S.backImage+")",S.backRepeat&&(E.style.backgroundRepeat=S.backRepeat)),A.appendChild(E);var H=e.start().getTime()===e.part.start.getTime(),R=e.rawend().getTime()===e.part.end.getTime();if(H||DayPilot.Util.addClass(A,this.L("_event_continueleft")),R||DayPilot.Util.addClass(A,this.L("_event_continueright")),e.client.barVisible()&&k>0){var N=100*e.part.barLeft/k,I=Math.ceil(100*e.part.barWidth/k),L=r();L.className=this.L("_event_bar"),L.style.position="absolute",S.barBackColor&&(L.style.backgroundColor=S.barBackColor);var P=r();P.className=this.L("_event_bar_inner"),P.style.left=N+"%",0<I&&I<=1?P.style.width="1px":P.style.width=I+"%",S.barColor&&(P.style.backgroundColor=S.barColor),S.barImageUrl&&(P.style.backgroundImage="url("+S.barImageUrl+")"),L.appendChild(P),A.appendChild(L)}A.row=i,A.event=e,function(){if("function"!=typeof s.onBeforeEventDomAdd&&"function"!=typeof s.onBeforeEventDomRemove)return void s.Ch(E,S.text,S.html);var t={};if(t.control=s,t.e=e,t.element=null,A.domArgs=t,"function"==typeof s.onBeforeEventDomAdd&&s.onBeforeEventDomAdd(t),t.element){var n=E;if(n){t.Pa=n;var a=DayPilot.Util.isReactComponent(t.element),i=DayPilot.Util.isVueVNode(t.element);if(a){if(!s.bg.reactDOM)throw new DayPilot.Exception("Can't reach ReactDOM");s.bg.Uc(t.element,n)}else if(i){if(!s.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");s.Ra.Sa=!0,s.Ra.Va(t.element,n),s.Ra.Sa=!1}else n.appendChild(t.element)}}else E.innerHTML=e.client.innerHTML()}();var B=[];return function(){if("Disabled"!==s.eventDeleteHandling&&!S.deleteDisabled){var e=s.durationBarVisible?s.durationBarHeight:0;B.push({v:"Hover",w:17,h:17,top:e+2,right:2,css:s.L("_event_delete"),onClick:function(e){s.ya(e.source)}})}}(),S.areas&&(B=B.concat(S.areas)),DayPilot.Areas.attach(A,e,{areas:B}),this.elements.events.push(A),o.appendChild(A),e.rendered=!0,!0},this.$a=function(e,t){return s.R.da()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ch=function(e,t,n){DayPilot.Util.isNullOrUndefined(n)?null!==t&&void 0!==t&&(s.R.da()?e.innerText=t:e.innerHTML=t):e.innerHTML=n},this.nf=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e],n=t.event,a=n.part.dayIndex,i=s.rowlist[a],r=i.top,o=r+n.part.top,l=i.height,d=s.eventHeight;n.part.top+d>l&&(d=Math.max(0,l-n.part.top)),t.style.top=o+"px",t.style.height=d+"px"}},this.Dh=function(e){if(!e)return null;for(var t=0;t<s.elements.events.length;t++){var n=s.elements.events[t];if(n.event===e||n.event.data===e.data)return n}return null},this.Kf=function(e){var t=s.events.Pf(e.data);if(!t)return null;var n=s.rowlist[t.part.dayIndex];return s.Fg(n),s.Ua(t,{"forced":!0}),s.Dh(t)},this.wh=function(e){for(var t=e.currentTarget;t&&!t.event;)t=t.parentNode;s.Eh(t,e),s.Qe(e)},this.Oe={},this.xh=function(e){s.Qe(e);var n=DayPilot.Util.mouseButton(e);e.preventDefault(),e.stopPropagation(),n.left&&("w-resize"===this.style.cursor||"e-resize"===this.style.cursor?(t.Ne=!0,t.fg=this,t.jg=this.event,t.Fh=DayPilot.mc(e),i().style.cursor=this.style.cursor):("move"===this.style.cursor||this.event.client.moveEnabled())&&s.Gh(this,e))},this.yh=function(e){DayPilot.Util.mouseButton(e).right&&s.xa.call(this,e)},this.Gh=function(e,t){var n=s.Oe;s.Qe(t),n.Hh=!0,n.Oe=e,n.mg=e.event,n.Fh=DayPilot.mc(t),n.Ih=DayPilot.mo3(e,t).x,n.eg=s.getDate(s.coords.x,!0)},"undefined"==typeof DayPilot.Global.touch&&(DayPilot.Global.touch={}),DayPilot.Global.touch.active=!1,DayPilot.Global.touch.start=!1;d.Gf=[];d.relativeCoords=function(e){return d.Jh(e)},d.startResizing=function(e,t){d.Kh(e,t)},d.startMoving=function(e,t){d.Gh(e,t)},d.zh=function(t){if(!DayPilot.Global.touch.active&&!DayPilot.Global.touch.start){t.stopPropagation(),d.Lh(),DayPilot.Global.touch.start=!0,DayPilot.Global.touch.active=!1;var n=t.currentTarget;s.coords=d.Jh(t);var a=s.tapAndHoldTimeout;d.Gf.push(setTimeout(function(){DayPilot.Global.touch.active=!0,DayPilot.Global.touch.start=!1,t.preventDefault();var a=n.event;switch(s.eventTapAndHoldHandling){case"Move":if(a.client.moveEnabled()){var i=e(t);d.Gh(n,i)}}},a))}},d.Ah=function(){d.Lh(),DayPilot.Global.touch.start=!1},d.Bh=function(e){if(!DayPilot.Util.isMouseEvent(e)){if(d.Lh(),DayPilot.Global.touch.start){DayPilot.Global.touch.start=!1,e.preventDefault(),e.stopPropagation();var t=e.currentTarget;setTimeout(function(){s.Pe(t,e)})}setTimeout(function(){DayPilot.Global.touch.start=!1,DayPilot.Global.touch.active=!1},500)}},d.Mg=function(e){if(!(DayPilot.Global.touch.active||DayPilot.Global.touch.start||e.touches.length>1||"Disabled"===s.timeRangeSelectedHandling)){d.Lh(),DayPilot.Global.touch.start=!0,DayPilot.Global.touch.active=!1;var t=s.tapAndHoldTimeout;d.Gf.push(setTimeout(function(){DayPilot.Global.touch.active=!0,DayPilot.Global.touch.start=!1,e.preventDefault(),s.coords=d.Jh(e),d.Mh=s.Nh()},t));s.coords=d.Jh(e)}},d.Ng=function(e){if(d.Lh(),DayPilot.Global.touch.start=!1,t.fg)return e.preventDefault(),void d.Oh();if(DayPilot.Global.touch.active){if(e.preventDefault(),s.coords=d.Jh(e),t.Oe)return void d.Ph();if(d.Mh){var n=d.Mh;n.end={x:Math.floor(s.coords.x/s.cellWidth),"time":s.getDate(s.coords.x,!0)},s.yf(n)}}},d.debug=function(){},d.Og=function(e){d.Lh();if(DayPilot.Global.touch.active){if(t.Oe){e.preventDefault();var n=t.mg;if(s!==t.ng.calendar)return;var a=t.ng.start,r=t.ng.end,o=t.ng.row.id;DayPilot.Util.removeClass(t.Oe,s.L("_event_moving_source")),DayPilot.de(t.ng),t.ng.calendar=null,i().style.cursor="",t.Oe=null,t.mg=null,t.ng=null,s.M(n,a,r,o)}if(d.Mh){var l=d.Mh;d.Mh=null;var c=s.elements.range2;c&&c.overlapping?s.clearSelection():s.uf(l)}}else if(DayPilot.Global.touch.start){if(s.coords.x<s.getScrollX())return;var l=s.Nh();s.yf(l);var c=s.elements.range2;c&&c.overlapping?s.clearSelection():s.uf(l)}setTimeout(function(){DayPilot.Global.touch.start=!1,DayPilot.Global.touch.active=!1},500)},d.Lh=function(){for(var e=0;e<d.Gf.length;e++)clearTimeout(d.Gf[e]);d.Gf=[]},d.Jh=function(e){function t(e,t,n){var a=DayPilot.abs(n);return{x:e-a.x,y:t-a.y,toString:function(){return"x: "+this.x+", y:"+this.y}}}var n=s.ge,a=e.touches?e.touches[0]:e;return t(a.pageX,a.pageY,n)},d.Gh=function(e,n){t.Oe=e,t.mg=e.event,t.Fh=n;var a=DayPilot.abs(e);t.Ih=n.x-a.x,t.eg=s.getDate(s.coords.x,!0),t.ng=s.ca(e),s.lg()},d.Kh=function(e,n){t.fg=e,t.jg=e.event,t.fg.dpBorder=n,t.ig||(t.ig=s.ca(e)),s.kg()},d.Oh=function(){if(!t.ig){var e=t.fg;t.ig=s.ca(e)}s.kg()},d.Ph=function(){if(!t.ng){var e=t.Oe;t.ng=s.ca(e)}t.ng.calendar.lg()},this.Eh=function(e,n){var a=this.eventResizeMargin,i=e;if("undefined"!=typeof t){var r=DayPilot.mo3(e,n);if(r&&(s.eventOffset=r,!t.fg&&!t.Oe)){var o=i.event.part.start.toString()===i.event.start().toString(),l=i.event.part.end.toString()===i.event.rawend().toString();r.x<=a&&i.event.client.resizeEnabled()?o?(e.style.cursor="w-resize",e.dpBorder="left"):e.style.cursor="not-allowed":e.offsetWidth-r.x<=a&&i.event.client.resizeEnabled()?l?(e.style.cursor="e-resize",e.dpBorder="right"):e.style.cursor="not-allowed":t.fg||t.Oe||(i.event.client.clickEnabled()?e.style.cursor="pointer":e.style.cursor="default")}}},this.zf=function(){var e=s.Le();return s.days*(1440/e)},this.vf=function(e){if(e=e||t.Mh||s.xf,!e)return null;var n=s.rowlist[e.start.y];if(!n)return null;var a,i,r=e,o=r.end.time>r.start.time,l=n.id,d=o?r.start.x:r.end.x,c=o?r.end.x:r.start.x,u=s.snapToGrid;u?(a=s.Ie(d).start,i=s.Ie(c).end):o?(a=r.start.time,i=r.end.time):(a=r.end.time,i=r.start.time);var h=new DayPilot.Selection(a,i,l,s);return h.allowed=!e.div||!e.div.overlapping,h},this.Ye=function(){this.xb.timeHeader={},s.elements.timeHeader.length>0&&(s.elements.timeHeader=[]);var e=r();e.style.position="relative",this.nav.timeHeader=e;for(var t=0;t<this.timeHeader.length;t++)for(var n=this.timeHeader[t],a=0;a<n.length;a++)this.Qh(a,t);var i=this.divNorth;1===i.childNodes.length?i.replaceChild(e,i.childNodes[0]):(i.innerHTML="",i.appendChild(e));var o=this.ze();i.style.width=o+5e3+"px",o>0&&(this.divStretch.style.width=o+"px")},this.Ge=function(e,t){var n=null,a=this.R.Fe();t=t||this.cellGroupBy;var i=e.start;switch(t){case"Minute":n=i.toString("m");break;case"Hour":n="Clock12Hours"===s.R.Rh()?i.toString("h tt",a):i.toString("H",a);break;case"Day":n=i.toString(a.datePattern);break;case"Week":n=1===l.ea()?i.weekNumberISO():i.weekNumber();break;case"Month":n=i.toString("MMMM yyyy",a);break;case"Quarter":n="Q"+Math.floor(i.getMonth()/3+1);break;case"Year":n=i.toString("yyyy");break;case"None":n="";break;case"Cell":var r=(e.end.ticks-e.start.ticks)/6e4;n=this.Sh(i,r);break;default:throw new DayPilot.Exception("Invalid groupBy value: "+t)}return n},this.Sh=function(e,t){var n=this.R.Fe();return t=t||this.cellDuration,t<1?e.toString("ss"):t<60?e.toString("mm"):t<1440?"Clock12Hours"===s.R.Rh()?e.toString("h tt",n):e.toString("H",n):t<10080?e.toString("d"):10080===t?1===l.ea()?e.weekNumberISO():e.weekNumber():e.toString("MMMM yyyy",n)},this.Ee=function(e,t,n){var a,i=s.startDate.addDays(s.days);t=t||this.cellGroupBy;var r=60;switch(t){case"Minute":e.getMinutes()+e.getSeconds()+e.getMilliseconds()>0&&(e=e.getDatePart().addHours(e.getHours()).addMinutes(e.getMinutes())),a=e.addMinutes(1);break;case"Hour":e.getHours()+e.getMinutes()+e.getSeconds()+e.getMilliseconds()>0&&(e=e.getDatePart().addHours(e.getHours())),a=e.addHours(1);break;case"Day":a=e.getDatePart().addDays(1);break;case"Week":for(a=e.getDatePart().addDays(1);a.dayOfWeek()!==l.ea();)a=a.addDays(1);break;case"Month":e=e.getDatePart(),a=e.addMonths(1),a=a.firstDayOfMonth();for(var o=DayPilot.DateUtil.diff(a,e)/6e4%r===0;!o;)a=a.addHours(1),o=DayPilot.DateUtil.diff(a,e)/6e4%r===0;break;case"Quarter":for(e=e.getDatePart(),a=e.addMonths(1),a=a.firstDayOfMonth();a.getMonth()%3;)a=a.addMonths(1);for(var o=DayPilot.DateUtil.diff(a,e)/6e4%r===0;!o;)a=a.addHours(1),o=DayPilot.DateUtil.diff(a,e)/6e4%r===0;break;case"Year":e=e.getDatePart(),a=e.addYears(1),a=a.firstDayOfYear();for(var o=DayPilot.DateUtil.diff(a,e)/6e4%r===0;!o;)a=a.addHours(1),o=DayPilot.DateUtil.diff(a,e)/6e4%r===0;break;case"None":a=i;break;case"Cell":var d=this.Ke(e);d.current&&(a=d.current.end);break;default:throw n?new DayPilot.Exception("Invalid scale value: "+t):new DayPilot.Exception("Invalid groupBy value: "+t)}return a.getTime()>i.getTime()&&(a=i),a},this.Qh=function(e,t){var n=this.nav.timeHeader,a=this.timeHeader[t][e],i=t<this.timeHeader.length-1,o=a.left,l=a.width,d=t*s.headerHeight,c=s.headerHeight,u=r();u.style.position="absolute",u.style.top=d+"px",u.style.left=o+"px",u.style.width=l+"px",u.style.height=c+"px",a.toolTip&&(u.title=a.toolTip),u.setAttribute("aria-hidden","true"),a.cssClass&&DayPilot.Util.addClass(u,a.cssClass),u.style.userSelect="none",u.style.webkitUserSelect="none",u.oncontextmenu=function(){return!1},u.cell={},u.cell.start=a.start,u.cell.end=a.end,u.cell.level=t,u.cell.th=a,u.onclick=this.Ag,u.oncontextmenu=this.Bg,DayPilot.rePassive(u,DayPilot.touch.start,function(e){e.stopPropagation()}),u.style.overflow="hidden",s.timeHeaderTextWrappingEnabled||(u.style.whiteSpace="nowrap");var h=r();h.innerHTML=s.$a(a.text,a.html),a.backColor&&(h.style.background=a.backColor),a.fontColor&&(h.style.color=a.fontColor);var f=this.L("_timeheadercol"),v=this.L("_timeheadercol_inner");i&&(f=this.L("_timeheadergroup"),v=this.L("_timeheadergroup_inner")),DayPilot.Util.addClass(u,f),DayPilot.Util.addClass(h,v),DayPilot.Util.addClass(u,s.L("_timeheader_cell")),DayPilot.Util.addClass(h,s.L("_timeheader_cell_inner")),u.appendChild(h),DayPilot.Areas.attach(u,a,{areas:a.areas}),this.xb.timeHeader[e+"_"+t]=u,this.elements.timeHeader.push(u),n.appendChild(u)},this._f=function(){s.rowlist.forEach(function(e){var t=e.getHeight()+s.rowMarginTop+s.rowMarginBottom;e.height!==t&&(s.kf=!0),e.height=t}),s.kf&&(s.xb.drawArea=null)},this.Ze=function(){s.rowlist.forEach(function(e){var t=s.divHeader;if(t){var n=e.index;if(t.rows[n]){var a=t.rows[n];s.rg&&(a.style.top=e.top+"px");var i=e.height;a&&a.firstChild&&parseInt(a.firstChild.style.height,10)!==i&&(a.firstChild.style.height=i+"px")}}}),s.rg&&s.nav.resScrollSpace&&(s.nav.resScrollSpace.style.top=s._d+"px")},this.ah=function(e){if(DayPilot.Global.touch.start||DayPilot.Global.touch.active)return!1;if(s.Qe(e),"Disabled"===s.timeRangeSelectedHandling)return!1;var n=DayPilot.Util.mouseButton(e);if(s.Th())return!1;if(n.middle||n.right)return!1;if(s.Uh(s.coords))return!1;var a=n.left?"left":n.right?"right":n.middle?"middle":"unknown";return s.Vh=a,t.Mh=s.Nh(),t.Mh&&(t.Wh=s),!1},this.Nh=function(){var e={},t=s.He(s.coords.x).x,n=s.getDate(s.coords.x,!0);return e.start={y:s.Ff(s.coords.y).i,x:t,"time":n},e.end={x:t,"time":n},e.calendar=s,s.yf(e),e},this.ch=function(e){if(s.Oe={},s.xf){if(DayPilot.Util.mouseButton(e).left){var n=s.xf;if(s.Uh(s.coords)){var a=function(e){return function(){t.Xh=null;var n=s.vf(e);if(n){var a={};a.start=n.start,a.end=n.end,a.resource=n.resource,a.preventDefault=function(){a.preventDefault.value=!0},"function"==typeof s.onTimeRangeClick&&s.onTimeRangeClick(a),a.preventDefault.value||"function"==typeof s.onTimeRangeClicked&&s.onTimeRangeClicked(a)}}};"Disabled"!==s.timeRangeClickHandling&&a(n)()}}}},this.Th=function(){return!!(t.fg||t.Oe||t.Mh)||!!s.Oe.Hh},this.dragInProgress=function(){return s.Th()},this.Qe=function(e){var t=DayPilot.mo3(s.ge,e);t=t||{},t.stamp=t.x+"_"+t.y,s.coords&&s.coords.stamp===t.stamp||(s.coords=t)},this.bh=function(e){if(!DayPilot.Global.touch.active){var n=DayPilot.mc(e);if(s.Qe(e),s.Oe.Hh){DayPilot.distance(s.Oe.Fh,n)>2&&(DayPilot.Util.copyProps(s.Oe,t),i().style.cursor="move",s.Oe={})}t.fg&&t.jg.calendar===s?(t.fg.event||(t.fg.event=t.jg),s.Yh()):t.mg?s.Zh():t.Mh&&t.Mh.calendar===s&&(t.Mh.moved=!0,s.$h())}},this.$h=function(){var e=t.Mh,n=s.He(s.coords.x).x,a=s.getDate(s.coords.x,!0);e.end={x:n,"time":a},s.yf(e)},this.Yh=function(){t.ig||(t.ig=s.ca(t.fg)),s.kg()},this.Zh=function(){if(!t.ng){DayPilot.Util.addClass(t.Oe,s.L("_event_moving_source"));var e=t.mg;t.ng=s.ca(e)}s.lg()},this.dh=function(e){return e.cancelBubble=!0,!1},this.Uh=function(e){var t=s.xf;if(!t||!t.start||!t.end)return!1;var n=this.If(t.start.y),a=t.start.x<t.end.x,i=(a?t.start.x:t.end.x)*this.cellWidth,r=(a?t.end.x:t.start.x)*this.cellWidth+this.cellWidth,o=n.top,l=n.bottom;return e.x>=i&&e.x<=r&&e.y>=o&&e.y<=l},this.yf=function(e){function n(e){var t,n,l,d,c=e.end.time>e.start.time,u=e.start.y,h=e.start.time&&e.end.time;if(i||!h){var f=c?e.start.x:e.end.x,v=c?e.end.x:e.start.x,p=s.Ie(f),m=s.Ie(v);t=p.left,n=m.left+m.width}else c?(l=e.start.time,d=e.end.time):(l=e.end.time,d=e.start.time),t=s.getPixels(l).left,n=s.getPixels(d).left;var g=n-t,y=s.elements.range2;if(!y){y=r(),y.style.position="absolute";var b=r();b.className=s.L("_shadow_inner"),a&&(y.style.borderRadius=a,b.style.borderRadius=a),y.appendChild(b),s.divShadow.appendChild(y)}return y.className=s.L("_shadow"),y.firstChild.innerHTML="",y.style.left=t+"px",y.style.top=o[u].top+"px",y.style.width=g+"px",y.style.height=o[u].height-1+"px",y.calendar=s,s.elements.range2=y,y}if(e=e||t.Mh){var a=s.eventBorderRadius;"number"==typeof a&&(a+="px");var i=s.snapToGrid,o=s.rowlist;n(e)}},this._h=function(e){return{"start":{"x":e.start.x,"y":e.start.y,"time":e.start.time},"end":{"x":e.end.x,"time":e.end.time},"calendar":e.calendar,"args":e.args}},this.getCoords=function(){if(!s.coords)return null;var e={};e.x=s.coords.x,e.y=s.coords.y;var t=s.Ff(e.y,e.grid).element;return e.row=s.zg(t),e.time=s.getDate(e.x,!0),e},this.Gf={},this.Gf.na=null,this.Gf.drawCells=null,this.Gf.drawRows=null,this.Gf.click=null,this.Gf.resClick=[],this.Gf.updateFloats=null,this.df=function(){if(!s.Q){s.bf();var e=s.nav.scroll;if(s.ih=e.scrollLeft,s.jh=e.scrollTop,s.kh=e.clientWidth,s.divTimeScroll&&(s.divTimeScroll.scrollLeft=s.ih),DayPilot.browser.ios&&t.Vg?n():s.divResScroll.scrollTop=s.jh,s.progressiveRowRendering&&(s.Gf.drawRows&&(clearTimeout(s.Gf.drawRows),s.Gf.drawRows=null),s.scrollDelayRows>0?s.Gf.drawRows=setTimeout(function(){s.ug()},s.scrollDelayRows):s.ug()),s.Gf.drawCells&&(clearTimeout(s.Gf.drawCells),s.Gf.drawCells=null),s.scrollDelayCells>0)s.Gf.drawCells=setTimeout(s.ai(),s.scrollDelayCells);else{s.ai()()}s.Gf.na&&(clearTimeout(s.Gf.na),s.Gf.na=null),s.scrollDelayEvents>0?s.Gf.na=setTimeout(s.bi(),s.scrollDelayEvents):s.na(),s.Gf.updateFloats&&(clearTimeout(s.Gf.updateFloats),s.Gf.updateFloats=null),s.scrollDelayFloats>0?s.Gf.updateFloats=setTimeout(function(){s.ne()},s.scrollDelayFloats):s.ne(),s.onScrollCalled=!0}},this.ai=function(){return function(){s&&s.cf()}},this.bi=function(){return function(){s&&(s.rh()?setTimeout(function(){s.oh(),setTimeout(function(){s.na(!0)},50)},50):s.oe())}},this.bf=function(){s.xb.drawArea=null},this.show=function(){s.visible=!0,s.ae=!0,s.nav.top.style.display="",s.u(),s.$g(),s.df()},this.hide=function(){s.visible=!1,s.ae=!1,s.nav.top.style.display="none"},this.Vf=function(e){if(!s.events.list)return null;for(var t=0;t<this.events.list.length;t++){var n=this.events.list[t];if(s.Of(n,e)){var a={};return a.ex=n,a.index=t,a}}return null},this.ci=function(){var e=this.ke(),t=e.xStart,n=e.xEnd-e.xStart,a=e.yStart,i=e.yEnd-e.yStart;this.cellProperties||(this.cellProperties={});for(var r=0;r<=n;r++){for(var o=t+r,s=0;s<i;s++){var l=a+s;this.gd(o,l)}this.di(o)}for(var d=this.pg(),l=d.start;l<d.end;l++)this.ei(l)},this.cf=function(){if(!s.Q){var e=s.rowlist;if(e&&e.length>0){if(this.cellSweeping){var t=this.cellSweepingCacheSize;this.qh(t)}this.ci()}this.kf=!1}},this.ke=function(){if(s.xb.drawArea)return s.xb.drawArea;if(!this.nav.scroll)return null;var e=s.jh,t={},n=l.vh(),a=l.mh(),i=s.ih-n,r=i+s.kh+2*n,o=0,d=0;o=s.He(i).x,d=s.He(r,!0).x;var c=this.zf();d=Math.min(d,c-1),o=DayPilot.Util.atLeast(o,0);var u=e-a,h=e+this.nav.scroll.offsetHeight+2*a,f=this.Ff(u).i,v=this.Ff(h).i;v<this.rowlist.length&&v++,t.xStart=o,t.xEnd=d,t.yStart=f,t.yEnd=v;var p=s.nav.scroll;return 0===p.clientWidth&&(p=s.divTimeScroll),t.pixels={},t.pixels.left=p.scrollLeft,t.pixels.right=p.scrollLeft+p.clientWidth,t.pixels.top=p.scrollTop,t.pixels.bottom=p.scrollTop+p.clientHeight,t.pixels.width=p.scrollWidth,t.sw=DayPilot.sw(s.nav.scroll),s.xb.drawArea=t,t},this.ze=function(){return s.zf()*s.cellWidth},this.ei=function(e){var t=s.rowlist,n=s.divLines,a="y_"+e;if(!this.xb.linesHorizontal[a]){var i=t[e],o=i.height,l=i.top+o-1,d=this.ze(),c=r();c.style.left="0px",c.style.top=l+"px",c.style.width=d+"px",c.style.height="1px",c.style.fontSize="1px",c.style.lineHeight="1px",c.style.overflow="hidden",c.style.position="absolute",c.className=this.L("_matrix_horizontal_line"),n.appendChild(c),this.xb.linesHorizontal[a]=c}},this.di=function(e){var t=s.Ie(e);if(t){var n=s.divLines,a=s._d,i="x_"+e;if(!this.xb.linesVertical[i]){var o=t.left+t.width-1,l=r();l.style.left=o+"px",l.style.top="0px",l.style.width="1px",l.style.height=a+"px",l.style.fontSize="1px",l.style.lineHeight="1px",l.style.overflow="hidden",l.style.position="absolute",l.className=this.L("_matrix_vertical_line"),n.appendChild(l),this.elements.linesVertical.push(l),this.xb.linesVertical[i]=l}}},this.We=function(){s._d=s.fi(s.rowlist)},this.fi=function(e){for(var t=0,n=0;n<e.length;n++){var a=e[n];a.top=t,t+=a.height}return t},this._e=function(){s.elements.cells=[],s.xb.cells=[],s.divCells.innerHTML="",s.gi()},this.gi=function(){s.divLines.innerHTML="",s.xb.linesVertical={},s.xb.linesHorizontal={},s.elements.linesVertical=[]},this.of=function(e){var t=[];for(var n in s.xb.cells)t.push(s.xb.cells[n]);t.filter(function(t){return t&&t.coords&&t.coords.y===e}).forEach(function(e){s.fb(e)})},this.gd=function(e,t){if(this.La){var n=s.Ie(e);if(n){var a=s.rowlist,i=s.divCells,o=e+"_"+t;if(!this.xb.cells[o]){var l=this.hi(e,t),d=s.ii(e,t),c=r();if(c.style.left=n.left+"px",c.style.top=a[t].top+"px",c.style.width=n.width+"px",c.style.height=a[t].height+"px",c.style.position="absolute",l&&l.backColor&&(c.style.backgroundColor=l.backColor),c.className=this.L("_cell"),c.coords={},c.coords.x=e,c.coords.y=t,l){if(l.cssClass&&DayPilot.Util.addClass(c,l.cssClass),c.innerHTML=s.$a(l.text,l.html),l.backImage&&(c.style.backgroundImage='url("'+l.backImage+'")'),l.backRepeat&&(c.style.backgroundRepeat=l.backRepeat),l.business&&s.cellsMarkBusiness&&DayPilot.Util.addClass(c,s.L("_cell_business")),l.disabled&&DayPilot.Util.addClass(c,s.L("_cell_disabled")),l.backColor&&(c.style.backgroundColor=l.backColor),l.fontColor&&(c.style.color=l.fontColor),l.horizontalAlignment||l.verticalAlignment){switch(c.style.display="flex",l.horizontalAlignment){case"right":c.style.justifyContent="flex-end";break;case"left":c.style.justifyContent="flex-start";break;case"center":c.style.justifyContent="center"}switch(l.verticalAlignment){case"center":c.style.alignItems="center";break;case"top":c.style.alignItems="flex-start";break;case"bottom":c.style.alignItems="flex-end"}}DayPilot.Areas.attach(c,d.cell,{"areas":l.areas})}var u={start:n.start,end:n.end,resource:a[t].id,div:c,properties:l,x:e,y:t};!function(){if("function"==typeof s.onBeforeCellDomAdd||"function"==typeof s.onBeforeCellDomRemove){var e={};if(e.control=s,e.cell=u,e.element=null,c.domArgs=e,"function"==typeof s.onBeforeCellDomAdd&&s.onBeforeCellDomAdd(e),e.element){var t=c;if(t){e.Pa=t;var n=DayPilot.Util.isReactComponent(e.element),a=DayPilot.Util.isVueVNode(e.element);if(n){if(!s.bg.reactDOM)throw new DayPilot.Exception("Can't reach ReactDOM");s.bg.Uc(e.element,t)}else if(a){if(!s.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");s.Ra.Sa=!0,s.Ra.Va(e.element,t),s.Ra.Sa=!1}else t.appendChild(e.element)}}}}(),i.appendChild(c),this.elements.cells.push(c),this.xb.cells[o]=c}}}},this.ii=function(e,t){var n=s.Ie(e);if(!n)return null;var a=s.rowlist[t],i=a.id,r=n.start,o=n.end,l={};if(l.cell={x:e,y:t,start:r,end:o,resource:i,row:s.zg(a),properties:s.hi(e,t)},l.control=s,"function"==typeof this.onBeforeCellRender){var d=e+"_"+t;if(s.beforeCellRenderCaching&&s.af[d])return l;s.af[d]=!0,this.onBeforeCellRender(l)}return l},this.clearSelection=function(){this.ji()},this.ki=function(e,t,n){e=new DayPilot.Date(e),t=new DayPilot.Date(t);var a=s.ie(n),i=s.Ke(e);if(!i.current)throw new DayPilot.Exception("Time range selection 'start' out of timeline");var r=s.Ke(new DayPilot.Date(t).addMilliseconds(-1));if(!r.current)throw new DayPilot.Exception("Time range selection 'end' out of timeline");var o={};return o.start={y:a.index,x:i.i,"time":e},o.end={x:r.i,"time":t},o.calendar=this,o},this.selectTimeRange=function(e,t,n,a){var i=s.ki(e,t,n);s.yf(i),a||setTimeout(function(){s.uf(i)},0)},this.sf=function(){var e=t.ng&&t.ng.source;e&&DayPilot.Util.removeClass(e,s.L("_event_moving_source")),DayPilot.de(t.ng),t.ng=null,DayPilot.Global.movingLink&&(DayPilot.Global.movingLink.clear(),DayPilot.Global.movingLink=null)},this.ji=function(){s.divShadow&&(s.divShadow.innerHTML=""),s.elements.range=[],s.elements.range2=null,s.xf=null,s.li=null},l.Kd=function(){delete s.xb.headerHeight},l.da=function(){return"Disabled"!==s.xssProtection},l.Fe=function(){return DayPilot.Locale.find(s.locale)},l.Rh=function(){return"Auto"!==s.timeFormat?s.timeFormat:l.Fe().timeFormat},l.ea=function(){if("Auto"===s.weekStarts){var e=l.Fe();return e?e.weekStarts:0}return s.weekStarts||0},l.wg=function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("mobile")!==-1||e.indexOf("android")!=-1},l.dg=function(e){return"Always"===s.useEventBoxes||"Never"!==s.useEventBoxes&&e<60*s.Le()*1e3},l.vh=function(){var e=s.dynamicEventRenderingMarginX;if("number"==typeof e)return e;var t=s.dynamicEventRenderingMargin;return"number"==typeof t?t:0},l.mh=function(){var e=s.dynamicEventRenderingMarginY;if("number"==typeof e)return e;var t=s.dynamicEventRenderingMargin;return"number"==typeof t?t:0},this.hi=function(e,t){var n=e+"_"+t,a=s.rowlist;if(this.cellProperties||(this.cellProperties={}),this.cellProperties[n])return this.cellProperties[n];if(!this.cellProperties[n]){var i=a[t],r=i.id,o=s.Ie(e),l=o.start,d=o.end,c={};c.start=l,c.end=d,c.resource=r;var u={};u.business=s.isBusiness(c),this.cellProperties[n]=u}return this.cellProperties[n]},this.isBusiness=function(e,t){var n=e.start,a=e.end,i=(a.getTime()-n.getTime())/6e4;if(i<=1440&&!(s.businessWeekends||t||0!==e.start.dayOfWeek()&&6!==e.start.dayOfWeek()))return!1;if(i<720){var r=n.getHours();r+=n.getMinutes()/60,r+=n.getSeconds()/3600,r+=n.getMilliseconds()/36e5;var o=this.businessBeginsHour,l=this.businessEndsHour;if(0===l&&(l=24),o===l)return!1;if(!(o<l))return r<l||r>=o;if(r<o)return!1;if(l>=24)return!0;if(r>=l)return!1}return!0},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.mi=function(e){this.heightSpec="Fixed",this.height=e-(this.Be()+2),this.ma()},this.setHeight=this.mi,this.ie=function(e){return s.Dg(e)[0]},this.wb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw new DayPilot.Exception("DayPilot.Scheduler() constructor requires the target element or its ID as a parameter");if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw new DayPilot.Exception("DayPilot.Scheduler: The placeholder element not found: '"+a+"'.")}},this.init=function(){if(this.La)throw new DayPilot.Exception("This instance is already initialized. Use update() to change properties.");
|
|
20
|
-
if(this.wb(),this.nav.top.dp){if(this.nav.top.dp===s)return s;throw new DayPilot.Exception("The target placeholder was already initialized by another DayPilot component instance.")}return this.ni(),this.Zg(),this},this.ni=function(){this.Lg(),this.pb(),this.ba(),this.hh(),this.qb();var angular=s.ye.enabled;s.scrollToDate?s.scrollTo(s.scrollToDate):s.scrollX||s.scrollY?s.setScroll(s.scrollX,s.scrollY):angular||s.df(),s.scrollToResourceId&&(s.scrollToResource(s.scrollToResourceId),s.scrollToResourceId=null);var e=function(){s.scrollY&&s.setScroll(s.scrollX,s.scrollY)};setTimeout(e,200),this.bf(),this.vb(),this.La=!0;var t=s.fe;t?s.scrollTo(t):s.df()},this.ub=null,this.sb=function(e){if(e){var t={"resources":{"preInit":function(){var e=this.data;e&&(s.resources=e)}},"events":{"preInit":function(){var e=this.data;e&&(DayPilot.isArray(e.list)?s.events.list=e.list:s.events.list=e)},"postInit":function(){}},"scrollTo":{"preInit":function(){},"postInit":function(){this.data&&s.ee(this.data)}},"scrollX":{"postInit":function(){this.data&&s.he(this.data)}},"scrollY":{"postInit":function(){this.data&&s.Ae(this.data)}}};s.ub=t,s.ye.scrollToRequested&&(t.scrollTo.data=s.ye.scrollToRequested,s.ye.scrollToRequested=null),s.ye.scrollXRequested&&(t.scrollX.data=s.ye.scrollXRequested,s.ye.scrollXRequested=null),s.ye.scrollYRequested&&(t.scrollY.data=s.ye.scrollYRequested,s.ye.scrollYRequested=null);for(var n in e)t[n]||(s[n]=e[n]);for(var a in e)if(t[a]){var i=t[a];i.data=e[a],i.preInit&&i.preInit()}}},this.vb=function(){var e=s.ub;for(var t in e){var n=e[t];n.postInit&&n.postInit()}s.ub={}},this.bg={},this.bg.reactDOM=null,this.bg.react=null,this.bg.Uc=function(e,t){var n=s.bg.reactDOM;if("function"==typeof n.createRoot){var a=t.oi;a||(a=n.createRoot(t),t.oi=a),a.render(e)}else n.render(e,t)},this.bg.nh=function(e){var t=s.bg.reactDOM;if("function"==typeof t.createRoot){var n=e.oi;setTimeout(function(){n.unmount(),e.oi=null},0)}else t.unmountComponentAtNode(e)},this.Ra={},this.Ra.Qa=null,this.Ra.Lb=function(e,t,n){var a=s.Ra.Qa;if("function"==typeof a.createVNode&&"function"==typeof a.render){var i=a.createVNode(e,n);a.render(i,t)}},this.Ra.Va=function(e,t){var n=s.Ra.Qa;if("function"==typeof n.render){var a=e;DayPilot.isArray(e)&&(a=n.h("div",null,e)),n.render(a,t)}},this.Ra.Ta=function(e){var t=s.Ra.Qa;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.adjustEndIn=s.pf,this.internal.adjustEndNormalize=s.qf,this.internal.xssTextHtml=s.$a,this.internal.touch=s.be,this.internal.skipUpdate=s.ye.skipUpdate,this.internal.skipped=s.ye.skipped,this.internal.loadOptions=s.sb,this.internal.postInit=s.vb,this.internal.enableAngular2=function(){s.ye.enabled=!0},this.internal.eventsFromAttr=function(){s.ye.Tf=!0},this.internal.resourcesFromAttr=function(){s.ye.ag=!0},this.internal.evImmediateRefresh=function(){s.events.tf()},this.internal.enableReact=function(e,t){s.bg.react=e,s.bg.reactDOM=t},this.internal.reactRefs=function(){return DayPilot.Util.copyProps(s.bg,{},["react","reactDOM"])},this.internal.enableVue=function(e){s.Ra.Qa=e},this.internal.vueRef=function(){return s.Ra.Qa},this.internal.vueRendering=function(){return s.Ra.Sa},this.sb(o)},a="${v}"===(new DayPilot.Scheduler).v,DayPilot.Row=function(e,t){if(!e)throw new DayPilot.Exception("Now row object supplied when creating DayPilot.Row");if(!t)throw new DayPilot.Exception("No parent control supplied when creating DayPilot.Row");this.pi={};var n=this.pi;n.id=e.id,n.name=e.name,n.data=e.resource,n.tags=e.tags;var a=this;a.isRow=!0,a.menuType="resource",a.name=e.name,a.id=e.id,a.tags=e.tags,a.index=e.index,a.calendar=t,a.data=e.resource,a.qi=e,a.$={},a.$.row=e,a.toJSON=function(){var e={};return e.start=this.start,e.name=this.name,e.id=this.id,e.index=this.index,e},a.events={},a.events.all=function(){for(var e=[],t=0;t<a.qi.events.length;t++)e.push(a.qi.events[t]);return e},a.events.isEmpty=function(){return 0===a.qi.events.length},a.events.forRange=function(e,t){return a.qi.events.forRange(e,t)},a.events.totalDuration=function(){var e=0;return a.events.all().forEach(function(t){e+=t.part.end.getTime()-t.part.start.getTime()}),new DayPilot.Duration(e)},a.remove=function(){t.rows.remove(a)},a.addClass=function(e){var n=t.divHeader,i=n.rows[a.index];DayPilot.Util.addClass(i,e),a.$.row.cssClass=DayPilot.Util.addClassToString(a.$.row.cssClass,e),a.data.cssClass=e},a.removeClass=function(e){var n=t.divHeader,i=n.rows[a.index];DayPilot.Util.removeClass(i,e),a.$.row.cssClass=DayPilot.Util.removeClassFromString(a.$.row.cssClass,e),a.data.cssClass=DayPilot.Util.removeClassFromString(a.data.cssClass,e)}},t.Oe=null,t.mg=null,t.Fh=null,t.fg=null,t.jg=null,t.Ne=!1,t.eh=!1,t.Xh=null,t.ri=null,t.pc=function(){DayPilot.ue(document,"mouseup",t.$d),DayPilot.ue(document,"touchmove",t.fh),DayPilot.ue(document,"touchend",t.gh),t.eh=!1},t.fh=function(e){if(t.fg){var n=t.fg.event.calendar;n.coords=n.be.Jh(e),n.be.Oh(),e.preventDefault()}if(t.Oe){e.preventDefault();var n=t.mg.calendar;n.coords=n.be.Jh(e),n.be.Ph()}},t.gh=function(e){t.Vg=!1,t.$d(e)},t.$d=function(e){if(t.fg){var a=function(){var e=t.jg,n=e.calendar;i().style.cursor="",t.fg=null,t.jg=null,DayPilot.de(t.ig),t.ig=null,n&&(n.si=null)};if(setTimeout(function(){t.Ne=!1}),!t.ig)return void a();var r=t.jg,o=r.calendar,s=t.ig.start,l=t.ig.end,d="left"===t.fg.dpBorder?"start":"end";a(),o.K(r,s,l,d)}else if(t.mg){var a=function(){DayPilot.Global.movingAreaData=null;var e=t.ng&&t.ng.calendar;t.ng&&(DayPilot.de(t.ng),t.ng.calendar=null),i().style.cursor="",t.Oe=null,t.mg=null,e&&(e.rf=null)};if(!t.ng)return void a();var r=t.mg,o=t.ng.calendar;if(!o)return void a();if(t.ng.source=t.Oe,!t.ng.row)return void a();var s=t.ng.start,l=t.ng.end,c=t.ng.row.id;t.ng.calendar=null,i().style.cursor="",t.Oe=null,t.mg=null,o.M(r,s,l,c,e),DayPilot.Global.movingAreaData=null}else if(t.Mh){var u=DayPilot.Util.mouseButton(e),h=t.Mh,f=h.calendar,a=function(){};if(f.li=null,t.Xh)return clearTimeout(t.Xh),t.Xh=null,void a();f.xf=h,t.Mh=null;var v=function(e){return function(){t.Xh=null,f.uf(e),"Hold"!==f.timeRangeSelectedHandling&&"HoldForever"!==f.timeRangeSelectedHandling?n():f.xf=e}},p=f._h(h);return a(),u.left?(v(p)(),e.cancelBubble=!0,!1):void(t.Xh=null)}t.Ih=null,t.eg=null}}}(DayPilot);!function(){function t(t){t.DayPilotScheduler={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){if(this.control&&!this.control.internal.vueRendering()){var e=Object.keys(this.$attrs),i=Object.assign({},t);e.forEach(function(t){delete i[t]}),this.control.update(i)}},deep:!0},"events":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update({events:t}))},deep:!0},"$attrs":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update(t))},deep:!0}},render:function(){return e.h("div",{id:this.cid})},mounted:function(){var t=Object.assign({},this.config,this.$attrs),n=new DayPilot.Scheduler(this.cid,t),i=this.$slots;i.event&&(n.onBeforeEventDomAdd=function(t){t.element=i.event({event:t.e})}),i.cell&&(n.onBeforeCellDomAdd=function(t){t.element=i.cell({cell:t.cell})}),n.internal.enableVue(e),n.init(),this.control=n},beforeUnmount:function(){this.control&&this.control.dispose()}},t.DayPilotCalendar={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){if(this.control&&!this.control.internal.vueRendering()){var e=Object.keys(this.$attrs),i=Object.assign({},t);e.forEach(function(t){delete i[t]}),this.control.update(i)}},deep:!0},"events":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update({events:t}))},deep:!0},"$attrs":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update(t))},deep:!0}},render:function(){return e.h("div",{id:this.cid})},mounted:function(){var t=Object.assign({},this.config,this.$attrs),n=new DayPilot.Calendar(this.cid,t),i=this.$slots;i.event&&(n.onBeforeEventDomAdd=function(t){t.element=i.event({event:t.e})}),i.cell&&(n.onBeforeCellDomAdd=function(t){t.element=i.cell({cell:t.cell})}),n.internal.enableVue(e),n.init(),this.control=n},beforeUnmount:function(){this.control&&this.control.dispose()}},t.DayPilotMonth={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){if(this.control&&!this.control.internal.vueRendering()){var e=Object.keys(this.$attrs),i=Object.assign({},t);e.forEach(function(t){delete i[t]}),this.control.update(i)}},deep:!0},"events":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update({events:t}))},deep:!0},"$attrs":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update(t))},deep:!0}},render:function(){return e.h("div",{id:this.cid})},mounted:function(){var t=Object.assign({},this.config,this.$attrs),n=new DayPilot.Month(this.cid,t),i=this.$slots;i.event&&(n.onBeforeEventDomAdd=function(t){t.element=i.event({event:t.e})}),i.cell&&(n.onBeforeCellDomAdd=function(t){t.element=i.cell({cell:t.cell})}),n.internal.enableVue(e),n.init(),this.control=n},beforeUnmount:function(){this.control&&this.control.dispose()}},t.DayPilotNavigator={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){if(this.control&&!this.control.internal.vueRendering()){var e=Object.keys(this.$attrs),i=Object.assign({},t);e.forEach(function(t){delete i[t]}),this.control.update(i)}},deep:!0},"events":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update({events:t}))},deep:!0},"$attrs":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update(t))},deep:!0}},render:function(){return e.h("div",{id:this.cid})},mounted:function(){var t=Object.assign({},this.config,this.$attrs),n=new DayPilot.Navigator(this.cid,t),i=this.$slots;i.cell&&(n.onBeforeCellDomAdd=function(t){t.element=i.cell({cell:t.cell})}),n.internal.enableVue(e),n.init(),this.control=n},beforeUnmount:function(){this.control&&this.control.dispose()}}}function n(t){t.DayPilotScheduler={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.cid}})},mounted:function(){this.control=new DayPilot.Scheduler(this.cid,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},t.DayPilotCalendar={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.cid}})},mounted:function(){this.control=new DayPilot.Calendar(this.cid,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},t.DayPilotMonth={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.cid}})},mounted:function(){this.control=new DayPilot.Month(this.cid,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},t.DayPilotNavigator={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.cid}})},mounted:function(){this.control=new DayPilot.Navigator(this.cid,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}}}var e="undefined"!=typeof e?e:require("vue"),i="function"==typeof e.h,o=i&&e.version&&!e.version.startsWith("2"),r={},c=function(){var t=function(){return 65536*(1+Math.random())|0};return"dp_"+(new Date).getTime()+"_"+t()};o?t(r):n(r),module.exports={DayPilot:DayPilot,DayPilotCalendar:r.DayPilotCalendar,DayPilotScheduler:r.DayPilotScheduler,DayPilotMonth:r.DayPilotMonth,DayPilotNavigator:r.DayPilotNavigator}}();
|
|
8
|
+
"use strict";var DayPilot={Global:{}};!function(DayPilot){function e(e,t){return DayPilot.isArray(t)||(t=e.areas,t||(e.cache?t=e.cache.areas:e.data&&(t=e.data.areas))),t}function t(e){var t=DayPilot.Date.Cache.Ticks;if(t[e])return DayPilot.Stats.cacheHitsTicks+=1,t[e];var n,i=new Date(e),a=i.getUTCMilliseconds();n=0===a?"":a<10?".00"+a:a<100?".0"+a:"."+a;var r=i.getUTCSeconds();r<10&&(r="0"+r);var o=i.getUTCMinutes();o<10&&(o="0"+o);var s=i.getUTCHours();s<10&&(s="0"+s);var l=i.getUTCDate();l<10&&(l="0"+l);var d=i.getUTCMonth()+1;d<10&&(d="0"+d);var c=i.getUTCFullYear();if(c<=0)throw"The minimum year supported is 1.";c<10?c="000"+c:c<100?c="00"+c:c<1e3&&(c="0"+c);var u=c+"-"+d+"-"+l+"T"+s+":"+o+":"+r+n;return t[e]=u,u}function n(e,t){"string"==typeof t&&(t=DayPilot.Locale.find(t)),t=t||DayPilot.Locale.US;var n=[{"seq":"yyyy","expr":"[0-9]{4,4}","str":function(e){return e.getYear()}},{"seq":"yy","expr":"[0-9]{2,2}","str":function(e){return e.getYear()%100},"transform":function(e){return parseInt(e)+2e3}},{"seq":"mm","expr":"[0-9]{2,2}","str":function(e){var t=e.getMinutes();return t<10?"0"+t:t}},{"seq":"m","expr":"[0-9]{1,2}","str":function(e){return e.getMinutes()}},{"seq":"HH","expr":"[0-9]{2,2}","str":function(e){var t=e.getHours();return t<10?"0"+t:t}},{"seq":"H","expr":"[0-9]{1,2}","str":function(e){return e.getHours()}},{"seq":"hh","expr":"[0-9]{2,2}","str":function(e){var t=e.getHours();t%=12,0===t&&(t=12);var n=t;return n<10?"0"+n:n}},{"seq":"h","expr":"[0-9]{1,2}","str":function(e){var t=e.getHours();return t%=12,0===t&&(t=12),t}},{"seq":"ss","expr":"[0-9]{2,2}","str":function(e){var t=e.getSeconds();return t<10?"0"+t:t}},{"seq":"s","expr":"[0-9]{1,2}","str":function(e){return e.getSeconds()}},{"seq":"MMMM","expr":"[^\\s0-9]*","str":function(e){return t.monthNames[e.getMonth()]},"transform":function(e){var n=DayPilot.indexOf(t.monthNames,e,i);return n<0?null:n+1}},{"seq":"MMM","expr":"[^\\s0-9]*","str":function(e){return t.monthNamesShort[e.getMonth()]},"transform":function(e){var n=DayPilot.indexOf(t.monthNamesShort,e,i);return n<0?null:n+1}},{"seq":"MM","expr":"[0-9]{2,2}","str":function(e){var t=e.getMonth()+1;return t<10?"0"+t:t}},{"seq":"M","expr":"[0-9]{1,2}","str":function(e){return e.getMonth()+1}},{"seq":"dddd","expr":"[^\\s0-9]*","str":function(e){return t.dayNames[e.getDayOfWeek()]}},{"seq":"ddd","expr":"[^\\s0-9]*","str":function(e){return t.dayNamesShort[e.getDayOfWeek()]}},{"seq":"dd","expr":"[0-9]{2,2}","str":function(e){var t=e.getDay();return t<10?"0"+t:t}},{"seq":"%d","expr":"[0-9]{1,2}","str":function(e){return e.getDay()}},{"seq":"d","expr":"[0-9]{1,2}","str":function(e){return e.getDay()}},{"seq":"tt","expr":"(AM|PM|am|pm)","str":function(e){return e.getHours()<12?"AM":"PM"},"transform":function(e){return e.toUpperCase()}}],a=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};this.init=function(){this.year=this.findSequence("yyyy")||this.findSequence("yy"),this.month=this.findSequence("MMMM")||this.findSequence("MMM")||this.findSequence("MM")||this.findSequence("M"),this.day=this.findSequence("dd")||this.findSequence("d"),this.hours=this.findSequence("HH")||this.findSequence("H"),this.minutes=this.findSequence("mm")||this.findSequence("m"),this.seconds=this.findSequence("ss")||this.findSequence("s"),this.ampm=this.findSequence("tt"),this.hours12=this.findSequence("hh")||this.findSequence("h")},this.findSequence=function(t){function i(e){return parseInt(e)}return e.indexOf(t)===-1?null:{"findValue":function(r){for(var o=a(e),s=null,l=0;l<n.length;l++){var d=t===n[l].seq,c=n[l].expr;d&&(c="("+c+")",s=n[l].transform),o=o.replace(n[l].seq,c)}o="^"+o+"$";try{var u=new RegExp(o),h=u.exec(r);return h?(s=s||i)(h[1]):null}catch(e){throw"unable to create regex from: "+o}}}},this.print=function(t){for(var i=function(e){for(var t=0;t<n.length;t++)if(n[t]&&n[t].seq===e)return n[t];return null},a=e.length<=0,r=0,o=[];!a;){var s=e.substring(r),l=/%?(.)\1*/.exec(s);if(l&&l.length>0){var d=l[0],c=i(d);c?o.push(c):o.push(d),r+=d.length,a=e.length<=r}else a=!0}for(var u=0;u<o.length;u++){var h=o[u];"string"!=typeof h&&(o[u]=h.str(t))}return o.join("")},this.parse=function(e){var t=this.year.findValue(e);if(!t)return null;var n=this.month.findValue(e);if(DayPilot.Util.isNullOrUndefined(n))return null;if(n>12||n<1)return null;var i=this.day.findValue(e),a=DayPilot.Date.fromYearMonthDay(t,n).daysInMonth();if(i<1||i>a)return null;var r=this.hours?this.hours.findValue(e):0,o=this.minutes?this.minutes.findValue(e):0,s=this.seconds?this.seconds.findValue(e):0,l=this.ampm?this.ampm.findValue(e):null;if(this.ampm&&this.hours12){var d=this.hours12.findValue(e);if(d<1||d>12)return null;r="PM"===l?12===d?12:d+12:12===d?0:d}if(r<0||r>23)return null;if(o<0||o>59)return null;if(s<0||s>59)return null;var c=new Date;return c.setUTCFullYear(t,n-1,i),c.setUTCHours(r),c.setUTCMinutes(o),c.setUTCSeconds(s),c.setUTCMilliseconds(0),new DayPilot.Date(c)},this.init()}function i(e,t){return!DayPilot.Util.isNullOrUndefined(e)&&(!DayPilot.Util.isNullOrUndefined(t)&&e.toLocaleLowerCase()===t.toLocaleLowerCase())}function a(e){e=Math.min(e,255),e=Math.max(e,0);var t=e.toString(16);return e<16?"0"+t:t}if("undefined"==typeof DayPilot.$){"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),DayPilot.$=function(e){return document.getElementById(e)},DayPilot.touch={},DayPilot.touch.start="touchstart",DayPilot.touch.move="touchmove",DayPilot.touch.end="touchend",DayPilot.mo3=function(e,t){var n=t.touches&&t.touches[0]?t.touches[0]:t;if(!e){return{x:void 0!==n.pageX?n.pageX:n.clientX+window.pageXOffset,y:void 0!==n.pageY?n.pageY:n.clientY+window.pageYOffset,shift:!!t.shiftKey,meta:!!t.metaKey,ctrl:!!t.ctrlKey,alt:!!t.altKey}}var i=e.getBoundingClientRect(),a=n.clientX-i.left,r=n.clientY-i.top;return a=Math.round(a),r=Math.round(r),{x:a,y:r,shift:!!t.shiftKey,meta:!!t.metaKey,ctrl:!!t.ctrlKey,alt:!!t.altKey}},DayPilot.browser={get ios(){var e,t;return"undefined"!=typeof navigator&&((null===(e=navigator.userAgent)||void 0===e?void 0:e.includes("iPad"))||(null===(t=navigator.userAgent)||void 0===t?void 0:t.includes("iPhone")))},get hover(){return!window.matchMedia("(any-hover: none)").matches}},DayPilot.debounce=function(e,t){var n;return function(){var i=this,a=arguments,r=function(){n=null,e.apply(i,a)};clearTimeout(n),n=setTimeout(r,t)}},DayPilot.page=function(e){var t=e.changedTouches&&e.changedTouches[0]?e.changedTouches[0]:e;return"undefined"!=typeof t.pageX?{x:t.pageX,y:t.pageY}:"undefined"!=typeof e.clientX&&document.body&&document.documentElement?{x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop}:null},DayPilot.abs=function(e,t){if(!e)return null;if(e.getBoundingClientRect){var n=DayPilot.absBoundingClientBased(e);if(t){var i=DayPilot.absOffsetBased(e,!1),a=DayPilot.absOffsetBased(e,!0);n.x+=a.x-i.x,n.y+=a.y-i.y,n.w=a.w,n.h=a.h}return n}return DayPilot.absOffsetBased(e,t)},DayPilot.absBoundingClientBased=function(e){var t=e.getBoundingClientRect();return{x:t.left+window.pageXOffset,y:t.top+window.pageYOffset,w:e.clientWidth,h:e.clientHeight,toString:function(){return"x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h}}},DayPilot.absOffsetBased=function(e,t){for(var n={x:e.offsetLeft,y:e.offsetTop,w:e.clientWidth,h:e.clientHeight,toString:function(){return"x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h}};e.offsetParent;)e=e.offsetParent,n.x-=e.scrollLeft,n.y-=e.scrollTop,t&&(n.x<0&&(n.w+=n.x,n.x=0),n.y<0&&(n.h+=n.y,n.y=0),e.scrollLeft>0&&n.x+n.w>e.clientWidth&&(n.w-=n.x+n.w-e.clientWidth),e.scrollTop&&n.y+n.h>e.clientHeight&&(n.h-=n.y+n.h-e.clientHeight)),n.x+=e.offsetLeft,n.y+=e.offsetTop;var i=DayPilot.pageOffset();return n.x+=i.x,n.y+=i.y,n},DayPilot.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},DayPilot.distance=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},DayPilot.sheet=function(){function e(){for(var e=document.querySelectorAll("style[nonce]"),t=0;t<e.length;t++){var n=e[t];if(n.nonce)return n.nonce}if(document.currentScript&&document.currentScript.nonce)return document.currentScript.nonce;for(var i=document.querySelectorAll("script[nonce]"),a=0;a<i.length;a++){var r=i[a];if(r.nonce)return r.nonce}return""}if("undefined"==typeof window){var t={};return t.add=function(){},t.commit=function(){},t}var n=document.createElement("style");n.nonce=e(),n.styleSheet||n.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(n);var i=!!n.styleSheet,a={};return a.rules=[],a.commit=function(){i&&(n.styleSheet.cssText=this.rules.join("\n"))},a.add=function(e,t,a){return i?void this.rules.push(e+"{"+t+"}"):void(n.sheet.insertRule?("undefined"==typeof a&&(a=n.sheet.cssRules.length),n.sheet.insertRule(e+"{"+t+"}",a)):n.sheet.addRule&&n.sheet.addRule(e,t,a))},a},DayPilot.gs=function(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)||""},DayPilot.StyleReader=function(e){this.get=function(t){return e?DayPilot.gs(e,t):null},this.getPx=function(e){var t=this.get(e);return t.indexOf("px")===-1?void 0:parseInt(t,10)}},function(){if(!DayPilot.Global.defaultCss){var e=DayPilot.sheet();e.add(".menu_default_main","user-select:none; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size: 13px;border: 1px solid #dddddd;background-color: white;padding: 0px;cursor: default;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAABCAIAAABG0om7AAAAKXRFWHRDcmVhdGlvbiBUaW1lAHBvIDEwIDUgMjAxMCAyMjozMzo1OSArMDEwMGzy7+IAAAAHdElNRQfaBQoUJAesj4VUAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAABGdBTUEAALGPC/xhBQAAABVJREFUeNpj/P//PwO1weMnT2RlZAAYuwX/4oA3BgAAAABJRU5ErkJggg==);background-repeat: repeat-y;xborder-radius: 5px;-moz-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);-webkit-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);"),e.add(".menu_default_main, .menu_default_main *, .menu_default_main *:before, .menu_default_main *:after","box-sizing: content-box;"),e.add(".menu_default_title","background-color: #f2f2f2;border-bottom: 1px solid gray;padding: 4px 4px 4px 37px;"),e.add(".menu_default_main a","padding: 2px 2px 2px 35px;color: black;text-decoration: none;cursor: default;"),e.add(".menu_default_main.menu_default_withchildren a","padding: 2px 35px 2px 35px;"),e.add(".menu_default_main a img","margin-left: 6px;margin-top: 2px;"),e.add(".menu_default_item_text","display: block;height: 20px;line-height: 20px; overflow:hidden;padding-left: 2px;padding-right: 20px; white-space: nowrap;"),e.add(".menu_default_main a:hover","background-color: #f3f3f3;"),e.add(".menu_default_main div div","border-top: 1px solid #dddddd;margin-top: 2px;margin-bottom: 2px;margin-left: 28px;"),e.add(".menu_default_main a.menu_default_item_disabled","color: #ccc"),e.add(".menu_default_item_haschildren.menu_default_item_haschildren_active","background-color: #f3f3f3;"),e.add(".menu_default_item_haschildren a:before","content: ''; border-width: 5px; border-color: transparent transparent transparent #666; border-style: solid; width: 0px; height:0px; position: absolute; right: 5px; margin-top: 5px;"),e.add(".menu_default_item_icon","position: absolute; top:0px; left: 0px; padding: 2px 2px 2px 8px;"),e.add(".menu_default_item a i","height: 20px;line-height: 20px;"),e.add(".menu_default_item .menu_default_item_symbol","width: 18px; height: 18px; color: #999; margin-left: 6px;margin-top: 2px;"),e.add(".menubar_default_main","border-bottom: 1px solid #ccc; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px; user-select:none;"),e.add(".menubar_default_item","display: inline-block; padding: 6px 10px; cursor: default;"),e.add(".menubar_default_item:hover","background-color: #f2f2f2;"),e.add(".menubar_default_item_active","background-color: #f2f2f2;"),e.add(".calendar_default_main","--dp-calendar-border-color: #c0c0c0;--dp-calendar-font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;--dp-calendar-font-size: 13px;--dp-calendar-header-bg-color: #f3f3f3;--dp-calendar-header-color: #333;--dp-calendar-colheader-padding: 0px;--dp-calendar-rowheader-font-size: 16pt;--dp-calendar-rowheader-padding: 3px;--dp-calendar-cell-bg-color: #f9f9f9;--dp-calendar-cell-business-bg-color: #ffffff;--dp-calendar-cell-border-color: #ddd;--dp-calendar-colheader-horizontal-align: center;--dp-calendar-colheader-vertical-align: center;--dp-calendar-allday-event-color: #333;--dp-calendar-allday-event-border-color: #999;--dp-calendar-allday-event-border: 1px solid var(--dp-calendar-allday-event-border-color);--dp-calendar-allday-event-border-radius: 0px;--dp-calendar-allday-event-bg-top-color: #ffffff;--dp-calendar-allday-event-bg-bottom-color: #eeeeee;--dp-calendar-allday-event-background: linear-gradient(to bottom, var(--dp-calendar-allday-event-bg-top-color) 0%, var(--dp-calendar-allday-event-bg-bottom-color) 100%);--dp-calendar-allday-event-box-shadow: none;--dp-calendar-allday-event-padding: 4px;--dp-calendar-allday-event-horizontal-align: flex-start;--dp-calendar-event-color: #333;--dp-calendar-event-border-color: #999;--dp-calendar-event-border: 1px solid var(--dp-calendar-event-border-color);--dp-calendar-event-border-radius: 0px;--dp-calendar-event-box-shadow: none;--dp-calendar-event-bg-top-color: #ffffff;--dp-calendar-event-bg-bottom-color: #eeeeee;--dp-calendar-event-background: linear-gradient(to bottom, var(--dp-calendar-event-bg-top-color) 0%, var(--dp-calendar-event-bg-bottom-color) 100%);--dp-calendar-event-bar-bg-color: #9dc8e8;--dp-calendar-event-bar-color: #1066a8;--dp-calendar-event-bar-width: 6px;--dp-calendar-event-bar-left: 0px;--dp-calendar-event-bar-bottom: 0px;--dp-calendar-event-bar-top: 0px;--dp-calendar-event-bar-display: block;--dp-calendar-event-padding: 2px;--dp-calendar-event-padding-left: 8px;--dp-calendar-message-bg-color: #ffa216;--dp-calendar-message-color: #ffffff;--dp-calendar-message-padding: 10px;--dp-calendar-message-opacity: 0.9;--dp-calendar-selected-event-bg-color: #ddd;--dp-calendar-shadow-color: #bbbbbb;--dp-calendar-shadow-border-color: #888888;--dp-calendar-forbidden-shadow-border-color: #cc0000;--dp-calendar-forbidden-shadow-bg-color: #cc4125;--dp-calendar-now-indicator-color: red;--dp-calendar-scroll-bg-color: #f3f3f3;"),e.add(".calendar_default_main *, .calendar_default_main *:before, .calendar_default_main *:after","box-sizing: content-box;"),e.add(".calendar_default_main","border:1px solid var(--dp-calendar-border-color); font-family:var(--dp-calendar-font-family); font-size:var(--dp-calendar-font-size);"),e.add(".calendar_default_rowheader_inner, .calendar_default_cornerright_inner, .calendar_default_corner_inner, .calendar_default_colheader_inner, .calendar_default_alldayheader_inner","color: var(--dp-calendar-header-color); background: var(--dp-calendar-header-bg-color);"),e.add(".calendar_default_colheader_back","background: var(--dp-calendar-header-bg-color); border-bottom: 1px solid red;"),e.add(".calendar_default_colheader_back_inner","position: absolute; inset: 0; border-bottom: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_cornerright_inner","position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-bottom: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_direction_rtl .calendar_default_cornerright_inner","border-right: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_rowheader_inner","font-size: var(--dp-calendar-rowheader-font-size); text-align: right; position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-right: 1px solid var(--dp-calendar-border-color); border-bottom: 1px solid var(--dp-calendar-border-color); padding: var(--dp-calendar-rowheader-padding);"),e.add(".calendar_default_rowheader_simple .calendar_default_rowheader_inner","font-size: inherit; display: flex; align-items: center; justify-content: center; white-space: nowrap;"),e.add(".calendar_default_direction_rtl .calendar_default_rowheader_inner","border-right: none;"),e.add(".calendar_default_corner_inner","position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-right: 1px solid var(--dp-calendar-border-color); border-bottom: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_direction_rtl .calendar_default_corner_inner","border-right: none;"),e.add(".calendar_default_rowheader_minutes","font-size: 10px; vertical-align: super; padding-left: 2px; padding-right: 2px;"),e.add(".calendar_default_colheader_inner","position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; padding: var(--dp-calendar-colheader-padding);border-right: 1px solid var(--dp-calendar-border-color); border-bottom: 1px solid var(--dp-calendar-border-color); display: flex; align-items: var(--dp-calendar-colheader-vertical-align); justify-content: var(--dp-calendar-colheader-horizontal-align);"),e.add(".calendar_default_cell_inner","position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-right: 1px solid var(--dp-calendar-cell-border-color); border-bottom: 1px solid var(--dp-calendar-cell-border-color); background: var(--dp-calendar-cell-bg-color);"),e.add(".calendar_default_cell_business .calendar_default_cell_inner","background: var(--dp-calendar-cell-business-bg-color);"),e.add(".calendar_default_alldayheader_inner","text-align: center; position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; border-right: 1px solid var(--dp-calendar-border-color); border-bottom: 1px solid var(--dp-calendar-border-color);"),e.add(".calendar_default_message","opacity: var(--dp-calendar-message-opacity); padding: var(--dp-calendar-message-padding); color: var(--dp-calendar-message-color); background: var(--dp-calendar-message-bg-color);"),e.add(".calendar_default_event_inner","color: var(--dp-calendar-event-color); border: var(--dp-calendar-event-border); border-radius: var(--dp-calendar-event-border-radius); background: var(--dp-calendar-event-background);"),e.add(".calendar_default_alldayevent","box-shadow: var(--dp-calendar-allday-event-box-shadow); border-radius: var(--dp-calendar-allday-event-border-radius);"),e.add(".calendar_default_alldayevent_inner","color: var(--dp-calendar-allday-event-color); border: var(--dp-calendar-allday-event-border); border-radius: var(--dp-calendar-allday-event-border-radius); background: var(--dp-calendar-allday-event-background);"),e.add(".calendar_default_event_bar","display: var(--dp-calendar-event-bar-display); top: var(--dp-calendar-event-bar-top); bottom: var(--dp-calendar-event-bar-bottom); left: var(--dp-calendar-event-bar-left); width: var(--dp-calendar-event-bar-width); background-color: var(--dp-calendar-event-bar-bg-color);"),e.add(".calendar_default_direction_rtl .calendar_default_event_bar","top: 0px; bottom: 0px; right: 0px; width: var(--dp-calendar-event-bar-width); background-color: var(--dp-calendar-event-bar-bg-color);"),e.add(".calendar_default_event_bar_inner","position: absolute; width: var(--dp-calendar-event-bar-width); background-color: var(--dp-calendar-event-bar-color);"),e.add(".calendar_default_selected .calendar_default_event_inner","background: var(--dp-calendar-selected-event-bg-color);"),e.add(".calendar_default_alldayevent_inner","position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; overflow: hidden; padding: var(--dp-calendar-allday-event-padding); margin-right: 0px; display: flex; align-items: center; justify-content: var(--dp-calendar-allday-event-horizontal-align);"),e.add(".calendar_default_event_withheader .calendar_default_event_inner","padding-top: 15px;"),e.add(".calendar_default_event","box-shadow: var(--dp-calendar-event-box-shadow); border-radius: var(--dp-calendar-event-border-radius); cursor: default;"),e.add(".calendar_default_event_inner","position: absolute; overflow: hidden; top: 0px; bottom: 0px; left: 0px; right: 0px; padding: var(--dp-calendar-event-padding) var(--dp-calendar-event-padding) var(--dp-calendar-event-padding) var(--dp-calendar-event-padding-left);"),e.add(".calendar_default_direction_rtl .calendar_default_event_inner","padding: 2px 8px 2px 2px;"),e.add(".calendar_default_shadow_inner","box-sizing: border-box; background-color: var(--dp-calendar-shadow-color); border: 1px solid var(--dp-calendar-shadow-border-color); opacity: 0.5; height: 100%;"),e.add(".calendar_default_shadow","box-shadow: 0 2px 5px rgba(0,0,0,0.2);"),e.add(".calendar_default_shadow_forbidden:after","content: ''; position: absolute; top: 5px; left: calc(50% - 10px); border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background-image: url('data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2720%27 height=%2720%27 viewBox=%270 0 20 20%27%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%279%27 fill=%27%23cc0000aa%27 /%3E%3Cline x1=%275%27 y1=%275%27 x2=%2715%27 y2=%2715%27 stroke=%27white%27 stroke-width=%271.5%27/%3E%3Cline x1=%2715%27 y1=%275%27 x2=%275%27 y2=%2715%27 stroke=%27white%27 stroke-width=%271.5%27/%3E%3C/svg%3E'); background-repeat: no-repeat; background-position: center; background-size: contain;"),e.add(".calendar_default_shadow_forbidden .calendar_default_shadow_inner","border: 1px solid var(--dp-calendar-forbidden-shadow-border-color); background: var(--dp-calendar-forbidden-shadow-bg-color);"),e.add(".calendar_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer;"),e.add(".calendar_default_event_delete:hover","opacity: 1; -ms-filter: none;"),e.add(".calendar_default_scroll_up","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAB3RJTUUH2wESDiYcrhwCiQAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAARnQU1BAACxjwv8YQUAAACcSURBVHjaY2AgF9wWsTW6yGMlhi7OhC7AyMDQzMnBXIpFHAFuCtuaMTP+P8nA8P/b1x//FfW/HHuF1UQmxv+NUP1c3OxMVVhNvCVi683E8H8LXOY/w9+fTH81tF8fv4NiIpBRj+YoZtZ/LDUoJmKYhsVUpv0MDiyMDP96sIYV0FS2/8z9ICaLlOhvS4b/jC//MzC8xBG0vJeF7GQBlK0xdiUzCtsAAAAASUVORK5CYII=);"),e.add(".calendar_default_scroll_down","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAACqSURBVChTY7wpam3L9J+xmQEP+PGPKZZxP4MDi4zI78uMDIwa2NT+Z2DYovrmiC+TI8OBP/8ZmEqwGvif4e8vxr+FIDkmEKH25vBWBgbG0+iK/zEwLtF+ffwOXCGI8Y+BoRFFIdC030x/WmBiYBNhpgLdswNJ8RSYaSgmgk39z1gPUfj/29ef/9rwhQTDHRHbrbdEbLvRFcGthkkAra/9/uMvhkK8piNLAgCRpTnNn4AEmAAAAABJRU5ErkJggg==);"),e.add(".calendar_default_now","background-color: var(--dp-calendar-now-indicator-color);"),e.add(".calendar_default_now:before","content: ''; top: -5px; border-width: 5px; border-color: transparent transparent transparent var(--dp-calendar-now-indicator-color); border-style: solid; width: 0px; height: 0px; position: absolute; -moz-transform: scale(.9999);"),e.add(".calendar_default_shadow_top","box-sizing: border-box; padding: 2px; border: 1px solid var(--dp-calendar-border-color); background: linear-gradient(to bottom, #ffffff 0%, #eeeeee); pointer-events: none;"),e.add(".calendar_default_shadow_bottom","box-sizing: border-box; padding: 2px; border: 1px solid var(--dp-calendar-border-color); background: linear-gradient(to bottom, #ffffff 0%, #eeeeee); pointer-events: none;"),e.add(".calendar_default_crosshair_vertical, .calendar_default_crosshair_horizontal, .calendar_default_crosshair_left, .calendar_default_crosshair_top","background-color: gray; opacity: 0.2;"),e.add(".calendar_default_loading","background-color: orange; color: white; padding: 2px;"),e.add(".calendar_default_scroll","background-color: var(--dp-calendar-header-bg-color);"),e.add(".calendar_default_event_moving_source","opacity: 0.5;"),e.add(".calendar_default_colmove_handle","background-repeat: no-repeat; background-position: center center; background-color: #ccc; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAKCAYAAACT+/8OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAClJREFUGFdj+P//P4O9vX2Bg4NDP4gNFgBytgPxebgAMsYuQGMz/jMAAFsTZDPYJlDHAAAAAElFTkSuQmCC); cursor: move;"),e.add(".calendar_default_colheader:hover .calendar_default_colheader_splitter","background-color: #c0c0c0;"),e.add(".calendar_default_colmove_source","background-color: black; opacity: 0.5;"),e.add(".calendar_default_colmove_position_before","box-sizing: border-box; border-left: 2px solid #999999;"),e.add(".calendar_default_colmove_position_before:before","content: ''; border-width: 6px; border-color: transparent #999999 transparent transparent; border-style: solid; width: 0px; height: 0px; position: absolute;"),e.add(".calendar_default_colmove_position_after","box-sizing: border-box; border-right: 2px solid #999999;"),e.add(".calendar_default_colmove_position_after:before","content: ''; border-width: 6px; border-color: transparent transparent transparent #999999; border-style: solid; width: 0px; height: 0px; position: absolute;"),e.add(".calendar_default_colmove_position_child","box-sizing: border-box; border-bottom: 2px solid #999999;"),e.add(".calendar_default_colmove_position_child:before","content: ''; border-width: 6px; border-color: #999999 transparent transparent transparent; border-style: solid; width: 0px; height: 0px; position: absolute;"),e.add(".calendar_default_colmove_position_forbidden","border-top: 2px solid red;"),e.add(".calendar_default_colheader .calendar_default_colheader_splitter:hover","background-color: #999999;"),e.add(".calendar_default_block","background-color: #808080; opacity: 0.5;"),e.add(".month_default_main","--dp-month-border-color: #c0c0c0;--dp-month-font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--dp-month-font-size: 13px;--dp-month-cell-border-color: #ddd;--dp-month-cell-bg-color: #f9f9f9;--dp-month-cell-business-bg-color: #ffffff;--dp-month-event-color: #333;--dp-month-event-border-color: #999;--dp-month-event-border: 1px solid var(--dp-month-event-border-color);--dp-month-event-bg-top-color: #ffffff;--dp-month-event-bg-bottom-color: #eeeeee;--dp-month-event-background: linear-gradient(to bottom, var(--dp-month-event-bg-top-color) 0%, var(--dp-month-event-bg-bottom-color) 100%);--dp-month-event-horizontal-align: flex-start;--dp-month-event-vertical-align: center;--dp-month-event-padding: 2px;--dp-month-event-padding-left: 10px;--dp-month-event-padding-rtl: 2px 10px 2px 1px;--dp-month-event-border-radius: 0px;--dp-month-event-box-shadow: none;--dp-month-event-bar-top: 1px;--dp-month-event-bar-left: 2px;--dp-month-event-bar-bottom: 1px;--dp-month-event-bar-width: 6px;--dp-month-event-bar-color: #1066a8;--dp-month-event-bar-display: block;--dp-month-header-bg-color: #f3f3f3;--dp-month-header-color: #333;--dp-month-header-horizontal-align: center;--dp-month-header-vertical-align: center;--dp-month-header-padding: 0px;--dp-month-message-bg-color: #ffa216;--dp-month-message-color: #ffffff;--dp-month-message-padding: 10px;--dp-month-selected-event-bg-color: #ddd;--dp-month-shadow-color: #bbbbbb;--dp-month-shadow-border-color: #888888;"),e.add(".month_default_main *, .month_default_main *:before, .month_default_main *:after","box-sizing: content-box; "),e.add(".month_default_main","border: 1px solid var(--dp-month-border-color); font-family: var(--dp-month-font-family); font-size: var(--dp-month-font-size); color: #333; "),e.add(".month_default_cell_inner","border-right: 1px solid var(--dp-month-cell-border-color); border-bottom: 1px solid var(--dp-month-cell-border-color); position: absolute; top: 0; left: 0; bottom: 0; right: 0; background-color: var(--dp-month-cell-bg-color); "),e.add(".month_default_cell_business .month_default_cell_inner","background-color: var(--dp-month-cell-business-bg-color); "),e.add(".month_default_cell_header","text-align: right; padding: 4px; box-sizing: border-box; "),e.add(".month_default_header_inner","position: absolute; inset: 0; border-right: 1px solid var(--dp-month-border-color); border-bottom: 1px solid var(--dp-month-border-color); cursor: default; color: var(--dp-month-header-color); background: var(--dp-month-header-bg-color); overflow: hidden; display: flex; align-items: var(--dp-month-header-vertical-align); justify-content: var(--dp-month-header-horizontal-align); padding: var(--dp-month-header-padding);"),e.add(".month_default_message","opacity: 0.9; color: var(--dp-month-message-color); background: var(--dp-month-message-bg-color); padding: var(--dp-month-message-padding); "),e.add(".month_default_event","border-radius: var(--dp-month-event-border-radius); box-shadow: var(--dp-month-event-box-shadow); "),e.add(".month_default_event_inner","position: absolute; top: 0; bottom: 0; left: 1px; right: 1px; overflow: hidden; padding: var(--dp-month-event-padding) var(--dp-month-event-padding) var(--dp-month-event-padding) var(--dp-month-event-padding-left); color: var(--dp-month-event-color); background: var(--dp-month-event-background); border: var(--dp-month-event-border); border-radius: var(--dp-month-event-border-radius); display: flex; align-items: var(--dp-month-event-vertical-align); justify-content: var(--dp-month-event-horizontal-align); "),e.add(".month_default_direction_rtl .month_default_event_inner","right: 2px; padding: var(--dp-month-event-padding-rtl); "),e.add(".month_default_event_continueright .month_default_event_inner","border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dotted; "),e.add(".month_default_event_continueleft .month_default_event_inner","border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dotted; "),e.add(".month_default_event_bar","display: var(--dp-month-event-bar-display); top: var(--dp-month-event-bar-top); bottom: var(--dp-month-event-bar-bottom); left: var(--dp-month-event-bar-left); width: var(--dp-month-event-bar-width); "),e.add(".month_default_direction_rtl .month_default_event_bar","top: 1px; bottom: 1px; right: 3px; width: var(--dp-month-event-bar-width); "),e.add(".month_default_event_bar_inner","position: absolute; width: var(--dp-month-event-bar-width); background-color: var(--dp-month-event-bar-color); "),e.add(".month_default_event_continueleft .month_default_event_bar","display: none; "),e.add(".month_default_selected .month_default_event_inner","background: var(--dp-month-selected-event-bg-color); "),e.add(".month_default_shadow_inner","box-sizing: border-box; background-color: var(--dp-month-shadow-color); border: 1px solid var(--dp-month-shadow-border-color); opacity: 0.5; height: 100%; "),e.add(".month_default_shadow","box-shadow: 0 2px 5px rgba(0, 0, 0, .2); "),e.add(".month_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer; "),e.add(".month_default_event_delete:hover","opacity: 1; "),e.add(".month_default_event_timeleft","color: #ccc; font-size: 11px; display: flex; align-items: center; "),
|
|
9
|
+
e.add(".month_default_event_timeright","color: #ccc; font-size: 11px; display: flex; align-items: center; justify-content: end; "),e.add(".month_default_loading","background-color: orange; color: white; padding: 2px; "),e.add(".month_default_shadow_forbidden:after","content: ''; position: absolute; top: calc(50% - 10px); left: 10px; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background-image: url('data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2720%27 height=%2720%27 viewBox=%270 0 20 20%27%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%279%27 fill=%27%23cc0000aa%27 /%3E%3Cline x1=%275%27 y1=%275%27 x2=%2715%27 y2=%2715%27 stroke=%27white%27 stroke-width=%271.5%27/%3E%3Cline x1=%2715%27 y1=%275%27 x2=%275%27 y2=%2715%27 stroke=%27white%27 stroke-width=%271.5%27/%3E%3C/svg%3E'); background-repeat: no-repeat; background-position: center; background-size: contain; "),e.add(".month_default_shadow_forbidden .month_default_shadow_inner","border: 1px solid #cc0000; background: #cc4125; "),e.add(".navigator_default_main","--dp-nav-border-color: #c0c0c0;--dp-nav-font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;--dp-nav-font-size: 12px;--dp-nav-title-color: #333;--dp-nav-title-bg-color: #f3f3f3;--dp-nav-dayheader-color: #333;--dp-nav-dayheader-bg-color: #ffffff;--dp-nav-weeknumber-color: #999;--dp-nav-weeknumber-bg-color: #ffffff;--dp-nav-day-color: #000;--dp-nav-day-bg-color: #ffffff;--dp-nav-dayother-color: gray;--dp-nav-dayother-bg-color: #ffffff;--dp-nav-weekend-bg-color: #f0f0f0;--dp-nav-select-bg-color: #FFE794;--dp-nav-text-align: center;"),e.add(".navigator_default_main *, .navigator_default_main *:before, .navigator_default_main *:after","box-sizing: content-box;"),e.add(".navigator_default_main","border-left: 1px solid var(--dp-nav-border-color);border-right: 1px solid var(--dp-nav-border-color);border-bottom: 1px solid var(--dp-nav-border-color);background-color: white;color: var(--dp-nav-day-color);box-sizing: content-box;"),e.add(".navigator_default_month","font-family: var(--dp-nav-font-family);font-size: var(--dp-nav-font-size);"),e.add(".navigator_default_day","color: var(--dp-nav-day-color); background-color: var(--dp-nav-day-bg-color);"),e.add(".navigator_default_weekend","background-color: var(--dp-nav-weekend-bg-color);"),e.add(".navigator_default_dayheader","color: var(--dp-nav-dayheader-color);background-color: var(--dp-nav-dayheader-bg-color);text-align: var(--dp-nav-text-align);padding: 0px;"),e.add(".navigator_default_line","border-bottom: 1px solid var(--dp-nav-border-color);"),e.add(".navigator_default_dayother","color: var(--dp-nav-dayother-color); background-color: var(--dp-nav-dayother-bg-color);"),e.add(".navigator_default_todaybox","border: 1px solid red;"),e.add(".navigator_default_title, .navigator_default_titleleft, .navigator_default_titleright","box-sizing: border-box; border-top: 1px solid var(--dp-nav-border-color);border-bottom: 1px solid var(--dp-nav-border-color);color: var(--dp-nav-title-color);background: var(--dp-nav-title-bg-color);text-align: var(--dp-nav-text-align);"),e.add(".navigator_default_busy","font-weight: bold;"),e.add(".navigator_default_cell","text-align: var(--dp-nav-text-align);"),e.add(".navigator_default_select .navigator_default_cell_box","background-color: var(--dp-nav-select-bg-color);opacity: 0.5;"),e.add(".navigator_default_weeknumber","text-align: var(--dp-nav-text-align);color: var(--dp-nav-weeknumber-color);background: var(--dp-nav-weeknumber-bg-color);"),e.add(".navigator_default_cell_text","cursor: pointer;"),e.add(".navigator_default_todaysection","box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--dp-nav-border-color);"),e.add(".navigator_default_todaysection_button","cursor: pointer; color: #333; background-color: #f0f0f0; border: 1px solid var(--dp-nav-border-color); padding: 5px 10px; border-radius: 0px; "),e.add(".scheduler_default_main",'--dp-scheduler-border-color: #c0c0c0;--dp-scheduler-border-inner-color: #e0e0e0;--dp-scheduler-cell-bg-color: #f9f9f9;--dp-scheduler-cell-business-bg-color: #ffffff;--dp-scheduler-event-background: linear-gradient(to bottom, var(--dp-scheduler-event-bg-top-color) 0%, var(--dp-scheduler-event-bg-bottom-color) 100%);--dp-scheduler-event-bg-bottom-color: #eeeeee;--dp-scheduler-event-bg-top-color: #ffffff;--dp-scheduler-event-bar-bg-color: #9dc8e8;--dp-scheduler-event-bar-color: #1066a8;--dp-scheduler-event-bar-display: block;--dp-scheduler-event-bar-height: 4px;--dp-scheduler-event-bar-left: 0px;--dp-scheduler-event-bar-right: 0px;--dp-scheduler-event-bar-top: 0px;--dp-scheduler-event-border: 1px solid var(--dp-scheduler-event-border-color);--dp-scheduler-event-border-color: #ccc;--dp-scheduler-event-border-radius: 0px;--dp-scheduler-event-box-shadow: none;--dp-scheduler-event-color: #333;--dp-scheduler-event-horizontal-align: flex-start;--dp-scheduler-event-milestone-color: #38761d;--dp-scheduler-event-padding: 2px;--dp-scheduler-event-selected-bg-color: #ddd;--dp-scheduler-event-vertical-align: center;--dp-scheduler-focus-outline-color: red;--dp-scheduler-font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--dp-scheduler-font-size: 13px;--dp-scheduler-grid-line-break-color: #999;--dp-scheduler-grid-line-color: #eee;--dp-scheduler-header-bg-color: #f3f3f3;--dp-scheduler-header-color: #333;--dp-scheduler-link-color: #cc0000;--dp-scheduler-message-bg-color: #ffa216;--dp-scheduler-message-color: #ffffff;--dp-scheduler-message-padding: 10px;--dp-scheduler-rowheader-padding: 7px;--dp-scheduler-rowheader-vertical-align: center;--dp-scheduler-selectionrectangle-color: #1066a8;--dp-scheduler-shadow-border-color: #888888;--dp-scheduler-shadow-color: #bbbbbb;--dp-scheduler-timeheader-horizontal-align: center;--dp-scheduler-timeheader-padding: 0px;--dp-scheduler-timeheader-vertical-align: center;'),e.add(".scheduler_default_main *, .scheduler_default_main *:before, .scheduler_default_main *:after","box-sizing: content-box;"),e.add(".scheduler_default_main, .scheduler_default_main svg text","box-sizing: content-box; border: 1px solid var(--dp-scheduler-border-color); font-family: var(--dp-scheduler-font-family); font-size: var(--dp-scheduler-font-size);"),e.add(".scheduler_default_selected .scheduler_default_event_inner","background: var(--dp-scheduler-event-selected-bg-color);"),e.add(".scheduler_default_timeheader_scroll","background: var(--dp-scheduler-header-bg-color);"),e.add(".scheduler_default_message","opacity: 0.9; padding: var(--dp-scheduler-message-padding); color: var(--dp-scheduler-message-color); background: var(--dp-scheduler-message-bg-color);"),e.add(".scheduler_default_timeheadergroup,.scheduler_default_timeheadercol","color: var(--dp-scheduler-header-color); background: var(--dp-scheduler-header-bg-color);"),e.add(".scheduler_default_rowheader,.scheduler_default_corner","color: var(--dp-scheduler-header-color); background: var(--dp-scheduler-header-bg-color);"),e.add(".scheduler_default_rowheader.scheduler_default_rowheader_selected","background-color: #aaa; background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent); background-size: 20px 20px;"),e.add(".scheduler_default_rowheader_inner","position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; border-right: 1px solid var(--dp-scheduler-border-inner-color); padding: var(--dp-scheduler-rowheader-padding); display: flex; align-items: var(--dp-scheduler-rowheader-vertical-align);"),e.add(".scheduler_default_timeheadergroup_inner, .scheduler_default_timeheadercol_inner","position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-right: 1px solid var(--dp-scheduler-border-color);"),e.add(".scheduler_default_timeheadergroup_inner","border-bottom: 1px solid var(--dp-scheduler-border-color);"),e.add(".scheduler_default_timeheadergroup_inner, .scheduler_default_timeheadercol_inner, .scheduler_default_timeheader_float","display: flex; align-items: var(--dp-scheduler-timeheader-vertical-align); justify-content: var(--dp-scheduler-timeheader-horizontal-align); padding: var(--dp-scheduler-timeheader-padding);"),e.add(".scheduler_default_divider, .scheduler_default_splitter","background-color: var(--dp-scheduler-border-color);"),e.add(".scheduler_default_divider_horizontal","background-color: var(--dp-scheduler-border-color);"),e.add(".scheduler_default_matrix_vertical_line","background-color: var(--dp-scheduler-grid-line-color);"),e.add(".scheduler_default_matrix_vertical_break","background-color: var(--dp-scheduler-grid-line-break-color);"),e.add(".scheduler_default_matrix_horizontal_line","background-color: var(--dp-scheduler-grid-line-color);"),e.add(".scheduler_default_resourcedivider","background-color: var(--dp-scheduler-border-color);"),e.add(".scheduler_default_shadow_inner","box-sizing: border-box; background-color: var(--dp-scheduler-shadow-color); border: 1px solid var(--dp-scheduler-shadow-border-color); border-radius: var(--dp-scheduler-event-border-radius); opacity: 0.5; height: 100%;"),e.add(".scheduler_default_shadow","box-shadow: 0 2px 5px rgba(0,0,0,.2); border-radius: var(--dp-scheduler-event-border-radius);"),e.add(".scheduler_default_event","font-size: var(--dp-scheduler-font-size); color: var(--dp-scheduler-event-color); border-radius: var(--dp-scheduler-event-border-radius); box-shadow: var(--dp-scheduler-event-box-shadow);"),e.add(".scheduler_default_event_inner","position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; border-radius: var(--dp-scheduler-event-border-radius); padding: var(--dp-scheduler-event-padding); overflow: hidden; border: var(--dp-scheduler-event-border); display: flex; align-items: var(--dp-scheduler-event-vertical-align); justify-content: var(--dp-scheduler-event-horizontal-align); background: var(--dp-scheduler-event-background);"),e.add(".scheduler_default_event_bar","display: var(--dp-scheduler-event-bar-display);top: var(--dp-scheduler-event-bar-top); left: var(--dp-scheduler-event-bar-left); right: var(--dp-scheduler-event-bar-right); height: var(--dp-scheduler-event-bar-height); background-color: var(--dp-scheduler-event-bar-bg-color);"),e.add(".scheduler_default_event_bar_inner","position:absolute; height: var(--dp-scheduler-event-bar-height); background-color: var(--dp-scheduler-event-bar-color);"),e.add(".scheduler_default_event_float","display: flex; align-items: center;"),e.add(".scheduler_default_event_float_inner","padding: var(--dp-scheduler-event-padding) var(--dp-scheduler-event-padding) var(--dp-scheduler-event-padding) 8px; position: relative;"),e.add(".scheduler_default_event_float_inner:after",'content:""; border-color: transparent #666 transparent transparent; border-style:solid; border-width:5px; width:0; height:0; position:absolute; top: calc(50% - 5px); left:-4px;'),e.add(".scheduler_default_event_focus","outline: var(--dp-scheduler-focus-outline-color) 2px solid; z-index: 100; opacity: 0.5;"),e.add(".scheduler_default_columnheader_inner","font-weight: bold;"),e.add(".scheduler_default_columnheader_splitter","box-sizing: border-box; border-right: 1px solid var(--dp-scheduler-border-color);"),e.add(".scheduler_default_columnheader_splitter:hover","background-color: var(--dp-scheduler-border-color);"),e.add(".scheduler_default_columnheader_cell_inner","position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; padding: 2px; display: flex; align-items: center;"),e.add(".scheduler_default_cell","background-color: var(--dp-scheduler-cell-bg-color);"),e.add(".scheduler_default_cell.scheduler_default_cell_business","background-color: var(--dp-scheduler-cell-business-bg-color);"),e.add(".scheduler_default_cell.scheduler_default_cell_business.scheduler_default_cell_selected, .scheduler_default_cell.scheduler_default_cell_selected","background-color: #ccc; background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent); background-size: 20px 20px;"),e.add(".scheduler_default_tree_image_no_children",""),e.add(".scheduler_default_tree_image_expand","background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00gMS41IDAuNSBMIDYuNSA1IEwgMS41IDkuNScgc3R5bGU9J2ZpbGw6bm9uZTtzdHJva2U6Izk5OTk5OTtzdHJva2Utd2lkdGg6MjtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWxpbmVjYXA6YnV0dCcgLz48L3N2Zz4=);"),e.add(".scheduler_default_tree_image_collapse","background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMS41IEwgNSA2LjUgTCA5LjUgMS41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==);"),e.add(".scheduler_default_event_delete","background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTInIGhlaWdodD0nMTInIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgMTEuNSAxMS41IE0gMC41IDExLjUgTCAxMS41IDAuNScgc3R5bGU9J2ZpbGw6bm9uZTtzdHJva2U6IzQ2NDY0NjtzdHJva2Utd2lkdGg6MztzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWxpbmVjYXA6YnV0dCcgLz48L3N2Zz4=) no-repeat center center; opacity: 0.6; cursor: pointer;"),e.add(".scheduler_default_event_delete:hover","opacity: 1;"),e.add(".scheduler_default_rowmove_handle","background-repeat: no-repeat; background-position: center center; background-color: #ccc; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAKCAYAAACT+/8OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAClJREFUGFdj+P//P4O9vX2Bg4NDP4gNFgBytgPxebgAMsYuQGMz/jMAAFsTZDPYJlDHAAAAAElFTkSuQmCC); cursor: move;"),e.add(".scheduler_default_rowmove_source","background-color: black; opacity: 0.2;"),e.add(".scheduler_default_rowmove_position_before, .scheduler_default_rowmove_position_after","background-color: #999; height: 2px;"),e.add(".scheduler_default_rowmove_position_child","margin-left: 20px; background-color: #999; height: 2px;"),e.add(".scheduler_default_rowmove_position_forbidden","background-color: #cc0000; height: 2px; margin-left: 20px;"),e.add(".scheduler_default_link_horizontal","border-bottom-style: solid; border-bottom-color: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_vertical","border-right-style: solid; border-right-color: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_arrow_right:before","content: ''; border-width: 6px; border-color: transparent transparent transparent var(--dp-scheduler-link-color); border-style: solid; width: 0; height:0; position: absolute;"),e.add(".scheduler_default_link_arrow_left:before","content: ''; border-width: 6px; border-color: transparent var(--dp-scheduler-link-color) transparent transparent; border-style: solid; width: 0; height:0; position: absolute;"),e.add(".scheduler_default_link_arrow_down:before","content: ''; border-width: 6px; border-color: var(--dp-scheduler-link-color) transparent transparent transparent; border-style: solid; width: 0; height:0; position: absolute;"),e.add(".scheduler_default_link_arrow_up:before","content: ''; border-width: 6px; border-color: transparent transparent var(--dp-scheduler-link-color) transparent; border-style: solid; width: 0; height:0; position: absolute;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_horizontal","border-bottom-color: #aaaaaa;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_vertical","border-right-color: #aaaaaa;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_arrow_right:before","border-color: transparent transparent transparent #aaaaaa;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_arrow_left:before","border-color: transparent #aaaaaa transparent transparent;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_arrow_down:before","border-color: #aaaaaa transparent transparent transparent;"),e.add(".scheduler_default_link_mshadow.scheduler_default_link_arrow_up:before","border-color: transparent transparent #aaaaaa transparent;"),e.add(".scheduler_default_block","background-color: #808080; opacity: 0.5;"),e.add(".scheduler_default_main .scheduler_default_event_group","box-sizing: border-box; font-size: 13px; color: #666; padding: 2px; overflow:hidden; border:1px solid var(--dp-scheduler-event-border-color); background-color: #fff; display: flex; align-items: center; white-space: nowrap;"),e.add(".scheduler_default_main .scheduler_default_header_icon","box-sizing: border-box; border: 1px solid var(--dp-scheduler-border-color); background-color: var(--dp-scheduler-header-bg-color); color: var(--dp-scheduler-header-color);"),e.add(".scheduler_default_header_icon:hover","background-color: #ccc;"),e.add(".scheduler_default_header_icon_hide:before","content: '\\00AB';"),e.add(".scheduler_default_header_icon_show:before","content: '\\00BB';"),e.add(".scheduler_default_row_new .scheduler_default_rowheader_inner","padding-left: 10px; color: #666; cursor: text; background-position: 0px 50%; background-repeat: no-repeat; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABUSURBVChTY0ACslAaK2CC0iCQDMSlECYmQFYIAl1AjFUxukIQwKoYm0IQwFCMSyEIaEJpMMClcD4Qp0CYEIBNIUzRPzAPCtAVYlWEDgyAGIdTGBgAbqEJYyjqa3oAAAAASUVORK5CYII=);"),e.add(".scheduler_default_row_new .scheduler_default_rowheader_inner:hover","background: white; color: white;"),e.add(".scheduler_default_rowheader textarea","padding: 3px;"),e.add(".scheduler_default_rowheader_scroll","cursor: default; background: var(--dp-scheduler-header-bg-color);"),e.add(".scheduler_default_shadow_forbidden .scheduler_default_shadow_inner, .scheduler_default_shadow_overlap .scheduler_default_shadow_inner","border: 1px solid #cc0000; background: #cc4125;"),e.add(".scheduler_default_event_moving_source","opacity: 0.5;"),e.add(".scheduler_default_linkpoint","background-color: white; border: 1px solid gray; border-radius: 5px;"),e.add(".scheduler_default_linkpoint.scheduler_default_linkpoint_hover","background-color: black;"),e.add(".scheduler_default_event.scheduler_default_event_version .scheduler_default_event_inner","overflow:hidden; background-color: #cfdde8; background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); background-size: 20px 20px;"),e.add(".scheduler_default_crosshair_vertical, .scheduler_default_crosshair_horizontal, .scheduler_default_crosshair_left, .scheduler_default_crosshair_top","background-color: gray; opacity: 0.2;"),e.add(".scheduler_default_link_dot","border-radius: 10px; background-color: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_task_milestone .scheduler_default_event_inner","position:absolute; top:16%; left:16%; right:16%; bottom:16%; background: var(--dp-scheduler-event-milestone-color); border: 0px none; transform: rotate(45deg); filter: none;"),e.add(".scheduler_default_event_left, .scheduler_default_event_right","white-space: nowrap; color: #666; cursor: default; display: flex; align-items: center;");e.add(".scheduler_default_main:focus","outline: none;");e.add(".scheduler_default_cell_focus","outline: var(--dp-scheduler-focus-outline-color) 2px solid; outline-offset: -2px; z-index: 100; opacity: 0.5;"),e.add(".scheduler_default_cell_focus.scheduler_default_cell_focus_top","border-top: 4px solid var(--dp-scheduler-focus-outline-color);"),e.add(".scheduler_default_cell_focus.scheduler_default_cell_focus_bottom","border-bottom: 4px solid var(--dp-scheduler-focus-outline-color);"),e.add(".scheduler_default_selectionrectangle","background-color: var(--dp-scheduler-selectionrectangle-color); border: 1px solid #000033; opacity: 0.4;"),e.add(".scheduler_default_link_shadow","border:1px solid black;"),e.add(".scheduler_default_link_shadow_circle","background-color:black;"),e.add(".scheduler_default_event_move_left","box-sizing: border-box; padding: 2px; border: 1px solid #ccc; background: #fff; background: linear-gradient(to bottom, #ffffff 0%, #eeeeee); display: flex; align-items: center;"),e.add(".scheduler_default_event_move_right","box-sizing: border-box; padding: 2px; border: 1px solid #ccc; background: #fff; background: linear-gradient(to bottom, #ffffff 0%, #eeeeee); display: flex; align-items: center;"),e.add(".scheduler_default_link_hover","box-shadow: 0px 0px 2px 2px rgba(255, 0, 0, 0.3)"),e.add(".scheduler_default_sorticon","opacity: 0.2;background-position: center center; background-repeat: no-repeat; cursor: pointer;"),e.add(".scheduler_default_sorticon.scheduler_default_sorticon_asc","background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBvbHlnb24gcG9pbnRzPSI1IDEuNSwgMTAgMTAsIDAgMTAiLz48L3N2Zz4=');"),e.add(".scheduler_default_sorticon.scheduler_default_sorticon_desc","background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBvbHlnb24gcG9pbnRzPSI1IDguNSwgMCAwLCAxMCAwIi8+PC9zdmc+');"),e.add(".scheduler_default_sorticon.scheduler_default_sorticon_active","opacity: 1;"),e.add(".scheduler_default_loading","background-color: orange; color: white; padding: 2px;"),e.add(".scheduler_default_link_curve","stroke: var(--dp-scheduler-link-color); fill: none; stroke-width: 2;"),e.add(".scheduler_default_link_curve:hover","stroke-opacity: 0.5;"),e.add(".scheduler_default_link_curve_dot","fill: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_curve_marker","fill: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_curve_text","fill: var(--dp-scheduler-link-color);"),e.add(".scheduler_default_link_curve_mshadow.scheduler_default_link_curve","stroke: #aaaaaa;"),e.add(".scheduler_default_link_curve_mshadow.scheduler_default_link_curve_dot","fill: #aaaaaa;"),e.add(".scheduler_default_link_curve_mshadow.scheduler_default_link_curve_marker","fill: #aaaaaa;"),e.add(".scheduler_default_link_curve_mshadow.scheduler_default_link_curve_text","fill: #aaaaaa;"),e.commit(),DayPilot.Global.defaultCss=!0}}(),DayPilot.doc=function(){var e=document.documentElement;return e&&e.clientHeight?e:document.body},DayPilot.sh=function(e){return e?e.offsetHeight-e.clientHeight:0},DayPilot.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return""+e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},DayPilot.ua=function(e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.ua() - array required");var t=[];return e.forEach(function(e){DayPilot.contains(t,e)||t.push(e)}),t},DayPilot.pageOffset=function(){if("undefined"!=typeof pageXOffset)return{x:pageXOffset,y:pageYOffset};var e=DayPilot.doc();return{x:e.scrollLeft,y:e.scrollTop}},DayPilot.indexOf=function(e,t){if(!e||!e.length)return-1;for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},DayPilot.contains=function(e,t){if(2!==arguments.length)throw new DayPilot.Exception("DayPilot.contains() requires two arguments.");return!!e&&(e===t&&!DayPilot.isArray(e)||DayPilot.indexOf(e,t)!==-1)},DayPilot.ac=function(e,t){t||(t=[]);for(var n=0;e.children&&n<e.children.length;n++)t.push(e.children[n]),DayPilot.ac(e.children[n],t);return t},DayPilot.rfa=function(e,t){var n=DayPilot.indexOf(e,t);n!==-1&&e.splice(n,1)},DayPilot.mc=function(e){return e.pageX||e.pageY?{x:e.pageX,y:e.pageY}:{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}},DayPilot.Stats={},DayPilot.Stats.eventObjects=0,DayPilot.Stats.dateObjects=0,DayPilot.Stats.cacheHitsCtor=0,DayPilot.Stats.cacheHitsParsing=0,DayPilot.Stats.cacheHitsTicks=0,DayPilot.re=function(e,t,n){n&&t&&e&&e.addEventListener(t,n,!1)},DayPilot.rePassive=function(e,t,n){n&&t&&e&&e.addEventListener(t,n,{"passive":!0})},DayPilot.reNonPassive=function(e,t,n){n&&t&&e&&e.addEventListener(t,n,{"passive":!1})},DayPilot.ue=function(e,t,n){e.removeEventListener(t,n,!1)},DayPilot.pu=function(e){var t,n,i,a=e.attributes;if(a)for(n=a.length,t=0;t<n;t+=1)a[t]&&(i=a[t].name,"function"==typeof e[i]&&(e[i]=null));if(a=e.childNodes)for(n=a.length,t=0;t<n;t+=1)DayPilot.pu(e.childNodes[t])},DayPilot.de=function(e){if(e)if(DayPilot.isArray(e))for(var t=0;t<e.length;t++)DayPilot.de(e[t]);else e.remove()},DayPilot.sw=function(e){return e?e.offsetWidth-e.clientWidth:0},DayPilot.am=function(){return"undefined"==typeof angular?null:(DayPilot.am.cached||(DayPilot.am.cached=angular.module("daypilot",[])),DayPilot.am.cached)},DayPilot.Selection=function(e,t,n,i){this.type="selection",this.start=e.isDayPilotDate?e:new DayPilot.Date(e),this.end=t.isDayPilotDate?t:new DayPilot.Date(t),this.resource=n,this.root=i,this.toJSON=function(){var e={};return e.start=this.start,e.end=this.end,e.resource=this.resource,e}},DayPilot.request=function(e,t,n,i){var a=DayPilot.createXmlHttp();a&&(a.open("POST",e,!0),a.setRequestHeader("Content-type","text/plain"),a.onreadystatechange=function(){if(4===a.readyState)return 200!==a.status&&304!==a.status?void(i?i(a):window.console&&console.log("HTTP error "+a.status)):void t(a)},4!==a.readyState&&("object"==typeof n&&(n=JSON.stringify(n)),a.send(n)))},DayPilot.ajax=function(e){if(!e)throw new DayPilot.Exception("Parameter object required.");if("string"!=typeof e.url)throw new DayPilot.Exception("The parameter object must have 'url' property.");var t=DayPilot.createXmlHttp();if(!t)throw new DayPilot.Exception("Unable to create XMLHttpRequest object");var n="object"==typeof e.data,i=e.data,a=e.method||(e.data?"POST":"GET"),r=e.success||function(){},o=e.error||function(){},s=e.url,l=e.contentType||(n?"application/json":"text/plain"),d=e.headers||{};t.open(a,s,!0),t.setRequestHeader("Content-type",l),DayPilot.Util.ownPropsAsArray(d).forEach(function(e){t.setRequestHeader(e.key,e.val)}),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status||201===t.status||204===t.status||304===t.status){var e={};e.request=t,t.responseText&&(e.data=JSON.parse(t.responseText)),r(e)}else if(o){var n={};n.request=t,o(n)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&(n&&(i=JSON.stringify(i)),t.send(i))},DayPilot.createXmlHttp=function(){return new XMLHttpRequest},DayPilot.Http={},DayPilot.Http.ajax=function(e){DayPilot.ajax(e)},DayPilot.Http.get=function(e,t){return t=t||{},new Promise(function(n,i){var a={};a.url=e,a.method="GET",a.success=function(e){n(e)},a.error=function(e){i(e)},a.contentType=t.contentType,a.headers=t.headers,DayPilot.ajax(a)})},DayPilot.Http.post=function(e,t,n){return n=n||{},new Promise(function(i,a){var r={};r.url=e,r.method="POST",r.data=t,r.success=function(e){i(e)},r.error=function(e){a(e)},r.contentType=n.contentType,r.headers=n.headers,DayPilot.ajax(r)})},DayPilot.Http.put=function(e,t,n){return n=n||{},new Promise(function(i,a){var r={};r.url=e,r.method="PUT",r.data=t,r.success=function(e){i(e)},r.error=function(e){a(e)},r.contentType=n.contentType,r.headers=n.headers,DayPilot.ajax(r)})},DayPilot.Http.delete=function(e,t){return t=t||{},new Promise(function(n,i){var a={};a.url=e,a.method="DELETE",a.success=function(e){n(e)},a.error=function(e){i(e)},a.contentType=t.contentType,a.headers=t.headers,DayPilot.ajax(a)})},DayPilot.Util={},DayPilot.Util.addClass=function(e,t){if(e){if(!e.className)return void(e.className=t);new RegExp("(^|\\s)"+t+"($|\\s)").test(e.className)||(e.className=e.className+" "+t)}},DayPilot.Util.removeClass=function(e,t){if(e){var n=new RegExp("(^|\\s)"+t+"($|\\s)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}},DayPilot.Util.copyProps=function(e,t,n){if(void 0===t&&(t={}),!e)return t;if("undefined"==typeof n)for(var i=0,a=Object.entries(e);i<a.length;i++){var r=a[i],o=r[0],s=r[1];"undefined"!=typeof s&&(t[o]=s)}else for(var l=0,d=n;l<d.length;l++){var c=d[l],s=e[c];"undefined"!=typeof s&&(t[c]=s)}return t},DayPilot.Util.ownPropsAsArray=function(e){return e?Object.entries(e).map(function(e){return{key:e[0],val:e[1]}}):[]},DayPilot.Util.atLeast=function(e,t){return Math.max(e,t)},DayPilot.Util.mouseButton=function(e){var t={};switch(e.button){case 0:t.left=!0;break;case 1:t.middle=!0;break;case 2:t.right=!0}return t},DayPilot.Util.replaceCharAt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},DayPilot.Util.isNullOrUndefined=function(e){return null===e||"undefined"==typeof e},DayPilot.Util.escapeHtml=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML},DayPilot.Util.escapeTextHtml=function(e,t){return DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":DayPilot.Util.escapeHtml(e):t},DayPilot.Util.isSameEvent=function(e,t){return!(!e||!t)&&(e=e instanceof DayPilot.Event?e.data:e,t=t instanceof DayPilot.Event?t.data:t,e===t||!DayPilot.Util.isNullOrUndefined(e.id)&&e.id===t.id)},DayPilot.Util.overlaps=function(e,t,n,i){return!(t<=n||e>=i)},DayPilot.Util.isVueVNode=function(e){return!!e&&(DayPilot.isArray(e)?DayPilot.Util.isVueVNode(e[0]):e["__v_isVNode"])},DayPilot.Util.isVueComponent=function(){return!1},DayPilot.Util.isReactComponent=function(e){if(!e)return!1;var t="function"==typeof Symbol&&Symbol.for,n=t&&Symbol.for("react.element")||60103,i=t&&Symbol.for("react.transitional.element")||null,a=e.$$typeof;return a===n||a===i||60103===a},DayPilot.Util.isMouseEvent=function(e){return!!e&&("mouse"===e.pointerType||e instanceof MouseEvent)},DayPilot.Areas={},DayPilot.Areas.attach=function(t,n,i){i=i||{};var a=i.areas,r=i.allowed||function(){return!0},o=i.offsetX||0;a=e(n,a),a&&DayPilot.isArray(a)&&0!==a.length&&(DayPilot.re(t,"mousemove",function(e){t.active||t.areasDisabled||!r()||DayPilot.Areas.showAreas(t,n,e,a,{"offsetX":o,"eventDiv":i.eventDiv})}),DayPilot.re(t,"mouseleave",function(e){DayPilot.Areas.hideAreas(t,e)}),a.forEach(function(e){if(DayPilot.Areas.isVisible(e)){var a=DayPilot.Areas.createArea(t,n,e,{"offsetX":o,"eventDiv":i.eventDiv});t.appendChild(a)}}))},DayPilot.Areas.disable=function(e){e.areasDisabled=!0,Array.from(e.childNodes).filter(function(e){return e.isActiveArea&&!e.area.start}).forEach(function(e){e.c=e.style.display,e.style.display="none"})},DayPilot.Areas.enable=function(e){e.areasDisabled=!1,Array.from(e.childNodes).filter(function(e){return e.isActiveArea&&!e.area.start}).forEach(function(e){e.c?e.style.display=e.c:e.style.display=""})},DayPilot.Areas.remove=function(e){var t=Array.from(e.childNodes).filter(function(e){return e.isActiveArea});DayPilot.de(t)},DayPilot.Areas.isVisible=function(e){var t=e.visibility||e.v||"Visible";return"Visible"===t||"TouchVisible"===t&&!DayPilot.browser.hover},DayPilot.Areas.copy=function(e){return DayPilot.isArray(e)?e.map(function(e){return DayPilot.Util.copyProps(e,{})}):[]},DayPilot.Areas.showAreas=function(e,t,n,i,a){if(!DayPilot.Global.resizing&&!DayPilot.Global.moving&&!DayPilot.Global.selecting&&!e.active&&DayPilot.browser.hover){if(DayPilot.Areas.all&&DayPilot.Areas.all.length>0)for(var r=0;r<DayPilot.Areas.all.length;r++){var o=DayPilot.Areas.all[r];o!==e&&DayPilot.Areas.hideAreas(o,n)}if(e.active={},DayPilot.isArray(i)||(i=t.areas,i||(t.cache?i=t.cache.areas:t.data&&(i=t.data.areas))),i&&0!==i.length&&!(e.areas&&e.areas.length>0)){e.areas=[];for(var r=0;r<i.length;r++){var s=i[r];if(!DayPilot.Areas.isVisible(s)){var l=DayPilot.Areas.createArea(e,t,s,a);e.areas.push(l),e.appendChild(l),DayPilot.Areas.all.push(e)}}e.active.children=DayPilot.ac(e)}}},DayPilot.Areas.createArea=function(e,t,n,i){function a(e,t,n){var i={};return i.area=e,i.source=t,i.originalEvent=n,
|
|
10
|
+
i.preventDefault=function(){i.preventDefault.value=!0},"function"==typeof e.onClick&&e.onClick(i),i}function r(e,t,n){DayPilot.Bubble&&DayPilot.Bubble.touchPosition(n),e.calendar.bubble&&e.calendar.bubble.showEvent(e,!0)}function o(e,t,n,i){DayPilot.Menu&&DayPilot.Menu.touchPosition(i);var a=n.contextMenu||n.menu;if(a instanceof DayPilot.Menu||(t.isEvent&&t.client.contextMenu()?a=t.client.contextMenu():t.isEvent&&t.calendar.contextMenu&&(a=t.calendar.contextMenu)),a&&a.show){var r={"type":"area","div":e,"e":t,"area":n,"a":d};a.show(t,{"initiator":r})}}function s(e){return"string"==typeof e&&isNaN(e)?e:"undefined"!=typeof e?e+"px":void 0}i=i||{};var l=i.eventDiv||e,d=document.createElement("div");d.isActiveArea=!0,d.area=n,d.setAttribute("unselectable","on");var c=n.w||n.width,u=n.h||n.height,h=n.cssClass||n.css||n.className;if("undefined"!=typeof n.style&&d.setAttribute("style",n.style),d.style.position="absolute",d.style.width=s(c),d.style.height=s(u),d.style.right=s(n.right),d.style.top=s(n.top),d.style.left=s(n.left),d.style.bottom=s(n.bottom),d.style.borderRadius=s(n.borderRadius),"undefined"!=typeof n.html||"undefined"!=typeof n.text)d.innerHTML=DayPilot.Util.escapeTextHtml(n.text,n.html);else if(n.icon){var f=document.createElement("i");f.className=n.icon,d.appendChild(f)}else if(n.image){var v=document.createElement("img");v.src=n.image,d.appendChild(v)}else if(n.symbol){var p="http://www.w3.org/2000/svg",m=document.createElementNS(p,"svg");m.setAttribute("width","100%"),m.setAttribute("height","100%");var g=document.createElementNS(p,"use");g.setAttribute("href",n.symbol),m.appendChild(g),d.appendChild(m)}if(h&&(d.className=h),n.toolTip&&d.setAttribute("title",n.toolTip),n.backColor&&(d.style.background=n.backColor),n.background&&(d.style.background=n.background),n.fontColor&&(d.style.color=n.fontColor),n.padding&&(d.style.padding=n.padding+"px",d.style.boxSizing="border-box"),n.borderColor){var y=n.borders;y?(y.top&&(d.style.borderTop="1px solid "+n.borderColor),y.right&&(d.style.borderRight="1px solid "+n.borderColor),y.bottom&&(d.style.borderBottom="1px solid "+n.borderColor),y.left&&(d.style.borderLeft="1px solid "+n.borderColor)):d.style.border="1px solid "+n.borderColor,d.style.boxSizing="border-box"}if(n.verticalAlignment)switch(d.style.display="flex",n.verticalAlignment){case"center":d.style.alignItems="center";break;case"top":d.style.alignItems="flex-start";break;case"bottom":d.style.alignItems="flex-end"}if(n.horizontalAlignment)switch(d.style.display="flex",n.horizontalAlignment){case"right":d.style.justifyContent="flex-end";break;case"left":d.style.justifyContent="flex-start";break;case"center":d.style.justifyContent="center"}if("ResizeEnd"===n.action||"ResizeStart"===n.action||"Move"===n.action){if(t.calendar.isCalendar)switch(n.action){case"ResizeEnd":n.cursor="s-resize",n.dpBorder="bottom";break;case"ResizeStart":n.cursor="n-resize",n.dpBorder="top";break;case"Move":n.cursor="move"}if(t.calendar.isScheduler||t.calendar.isMonth)switch(n.action){case"ResizeEnd":n.cursor="e-resize",n.dpBorder="right";break;case"ResizeStart":n.cursor="w-resize",n.dpBorder="left";break;case"Move":n.cursor="move"}d.onmousemove=function(e,t,n){return function(i){t.calendar.internal&&t.calendar.internal.dragInProgress&&t.calendar.internal.dragInProgress()||(i.cancelBubble=!0,e.style.cursor=n.cursor,n.dpBorder&&(e.dpBorder=n.dpBorder))}}(l,t,n),d.onmouseout=function(e,t,n){return function(){e.style.cursor=""}}(l,t,n)}if(("ResizeEnd"===n.action||"ResizeStart"===n.action)&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,n){return function(i){i.cancelBubble=!0;var a=t.calendar.internal.touch,r=i.touches?i.touches[0]:i,o={x:r.pageX,y:r.pageY};t.calendar.coords=a.relativeCoords(i),a.preventEventTap=!0,t.calendar.isScheduler?a.startResizing(e,"ResizeEnd"===n.action?"right":"left"):t.calendar.isCalendar&&a.startResizing(e,"ResizeEnd"===n.action?"bottom":"top",o)}}(l,t,n);DayPilot.rePassive(d,DayPilot.touch.start,b)}if("ContextMenu"===n.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,n){return function(i){i.cancelBubble=!0,i.preventDefault(),o(e,t,n,i),t.calendar.internal.touch.preventEventTap=!0}}(l,t,n),w=function(e,t,n){return function(e){e.cancelBubble=!0,e.preventDefault()}}(l,t,n);DayPilot.reNonPassive(d,DayPilot.touch.start,b),DayPilot.reNonPassive(d,DayPilot.touch.end,w)}if("Bubble"===n.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,n){return function(e){e.cancelBubble=!0,e.preventDefault();var i=a(n,t,e);if(!i.preventDefault.value){r(t,n,e);t.calendar.internal.touch.preventEventTap=!0,"function"==typeof n.onClicked&&n.onClicked(i)}}}(l,t,n),w=function(e,t,n){return function(e){e.cancelBubble=!0,e.preventDefault()}}(l,t,n);DayPilot.reNonPassive(d,DayPilot.touch.start,b),DayPilot.reNonPassive(d,DayPilot.touch.end,w)}if("Move"===n.action&&t.isEvent&&t.calendar.internal.touch){var b=function(e,t,n){return function(n){n.cancelBubble=!0;var i=t.calendar.internal.touch,a=n.touches?n.touches[0]:n,r={x:a.pageX,y:a.pageY};t.calendar.coords=i.relativeCoords(n),DayPilot.Global&&DayPilot.Global.touch&&(DayPilot.Global.touch.active=!0),i.preventEventTap=!0,i.startMoving(e,r)}}(l,t,n);DayPilot.rePassive(d,DayPilot.touch.start,b)}if("Bubble"===n.action&&t.isEvent?(d.onmousemove=function(e,t,n){return function(){n.bubble?n.bubble.showEvent(t,!0):t.calendar.bubble&&t.calendar.bubble.showEvent(t,!0)}}(e,t,n),d.onmouseout=function(e,t,n){return function(){"undefined"!=typeof DayPilot.Bubble&&(n.bubble?n.bubble.hideOnMouseOut():t.calendar.bubble&&t.calendar.bubble.hideOnMouseOut())}}(e,t,n)):"Bubble"===n.action&&t.isRow?(d.onmousemove=function(e,t,n){return function(){n.bubble?n.bubble.showResource(t,!0):t.calendar.resourceBubble&&t.calendar.resourceBubble.showResource(t,!0)}}(e,t,n),d.onmouseout=function(e,t,n){return function(){"undefined"!=typeof DayPilot.Bubble&&(n.bubble?n.bubble.hideOnMouseOut():t.calendar.resourceBubble&&t.calendar.resourceBubble.hideOnMouseOut())}}(e,t,n)):"Bubble"===n.action&&"undefined"!=typeof DayPilot.Bubble&&n.bubble instanceof DayPilot.Bubble&&(d.onmousemove=function(e,t,n){return function(){n.bubble.showHtml(null,null)}}(e,t,n),d.onmouseout=function(e,t,n){return function(){"undefined"!=typeof DayPilot.Bubble&&n.bubble&&n.bubble.hideOnMouseOut()}}(e,t,n)),"HoverMenu"===n.action&&(d.onmousemove=function(e,t,n){return function(){var e=n.menu;e&&e.show&&(e.visible?e.source&&"undefined"!=typeof e.source.id&&e.source.id!==t.id&&e.show(t):e.show(t),e.cancelHideTimeout())}}(e,t,n),d.onmouseout=function(e,t,n){return function(){var e=n.menu;e&&e.hideOnMouseOver&&e.delayedHide()}}(e,t,n)),"None"===n.action){var b=function(e,t,n){return function(e){var i=a(n,t,e);"function"==typeof n.onClicked&&n.onClicked(i),e.preventDefault(),e.stopPropagation()}}(l,t,n);DayPilot.reNonPassive(d,DayPilot.touch.start,b)}return d.onmousedown=function(e,t,n){return function(i){if("function"==typeof n.onmousedown&&n.onmousedown(i),"function"==typeof n.mousedown){var a={};a.area=n,a.div=e,a.originalEvent=i,a.source=t,n.mousedown(a)}if("Move"===n.action&&t.isRow){var r=t.$.row;(0,t.calendar.internal.rowStartMoving)(r)}"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),"Move"===n.action&&(DayPilot.Global.movingAreaData=n.data),"Move"===n.action&&t.isEvent&&t.calendar.internal&&t.calendar.internal.startMoving&&t.calendar.internal.startMoving(e,i);"Move"!==n.action&&"ResizeEnd"!==n.action&&"ResizeStart"!==n.action&&n.action&&"Default"!==n.action&&(i.preventDefault(),i.cancelBubble=!0)}}(e,t,n),d.onclick=function(e,t,n){return function(i){var r=a(n,t,i);if(!r.preventDefault.value){switch(n.action){case"ContextMenu":o(e,t,n,i),i.cancelBubble=!0;break;case"None":i.cancelBubble=!0}"function"==typeof n.onClicked&&n.onClicked(r)}}}(e,t,n),"function"==typeof n.onMouseEnter&&d.addEventListener("mouseenter",function(e,t,n){return function(e){var i={};i.area=n,i.source=t,i.originalEvent=e,n.onMouseEnter(i)}}(e,t,n)),"function"==typeof n.onMouseLeave&&d.addEventListener("mouseleave",function(e,t,n){return function(e){var i={};i.area=n,i.source=t,i.originalEvent=e,n.onMouseLeave(i)}}(e,t,n)),d},DayPilot.Areas.all=[],DayPilot.Areas.hideAreas=function(e,t){if(e&&e&&e.active){var n=e.active,i=e.areas;if(n&&n.children&&t){var a=t.toElement||t.relatedTarget;if(~DayPilot.indexOf(n.children,a))return}if(!i||0===i.length)return void(e.active=null);DayPilot.de(i),e.active=null,e.areas=[],DayPilot.rfa(DayPilot.Areas.all,e),n.children=null}},DayPilot.Areas.hideAll=function(e){if(DayPilot.Areas.all&&0!==DayPilot.Areas.all.length)for(var t=0;t<DayPilot.Areas.all.length;t++)DayPilot.Areas.hideAreas(DayPilot.Areas.all[t],e)},DayPilot.Exception=function(e){return new Error(e)},DayPilot.Locale=function(e,t){if(this.id=e,this.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.dayNamesShort=["Su","Mo","Tu","We","Th","Fr","Sa"],this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this.datePattern="M/d/yyyy",this.timePattern="H:mm",this.dateTimePattern="M/d/yyyy H:mm",this.timeFormat="Clock12Hours",this.weekStarts=0,t)for(var n in t)this[n]=t[n]},DayPilot.Locale.all={},DayPilot.Locale.find=function(e){if(!e)return null;var t=e.toLowerCase();return t.length>2&&(t=DayPilot.Util.replaceCharAt(t,2,"-")),DayPilot.Locale.all[t]},DayPilot.Locale.register=function(e){DayPilot.Locale.all[e.id]=e},DayPilot.Locale.register(new DayPilot.Locale("ca-es",{"dayNames":["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],"dayNamesShort":["dg","dl","dt","dc","dj","dv","ds"],"monthNames":["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],"monthNamesShort":["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("cs-cz",{"dayNames":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"dayNamesShort":["ne","po","út","st","čt","pá","so"],"monthNames":["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],"monthNamesShort":["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""],"timePattern":"H:mm","datePattern":"d. M. yyyy","dateTimePattern":"d. M. yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("da-dk",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"dd-MM-yyyy","dateTimePattern":"dd-MM-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-at",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-ch",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-de",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-lu",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-au",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-ca",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("en-gb",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-us",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"M/d/yyyy","dateTimePattern":"M/d/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("es-es",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["D","L","M","X","J","V","S"],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("es-mx",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["do.","lu.","ma.","mi.","ju.","vi.","sá."],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"hh:mm tt","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy hh:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("eu-es",{"dayNames":["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],"dayNamesShort":["ig","al","as","az","og","or","lr"],"monthNames":["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],"monthNamesShort":["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fi-fi",{"dayNames":["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],"dayNamesShort":["su","ma","ti","ke","to","pe","la"],"monthNames":["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],"monthNamesShort":["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-be",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd-MM-yy","dateTimePattern":"dd-MM-yy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-ca",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("fr-ch",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-fr",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-lu",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("gl-es",{"dayNames":["domingo","luns","martes","mércores","xoves","venres","sábado"],"dayNamesShort":["do","lu","ma","mé","xo","ve","sá"],"monthNames":["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],"monthNamesShort":["xan","feb","mar","abr","maio","xuño","xul","ago","set","out","nov","dec",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-it",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-ch",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ja-jp",{"dayNames":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"dayNamesShort":["日","月","火","水","木","金","土"],"monthNames":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("ko-kr",{"dayNames":["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],"dayNamesShort":["일","월","화","수","목","금","토"],"monthNames":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"tt h:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd tt h:mm","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("nb-no",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-nl",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"d-M-yyyy","dateTimePattern":"d-M-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-be",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"H:mm","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nn-no",{"dayNames":["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],"dayNamesShort":["sø","må","ty","on","to","fr","la"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-br",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("pl-pl",{"dayNames":["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],"dayNamesShort":["N","Pn","Wt","Śr","Cz","Pt","So"],"monthNames":["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],"monthNamesShort":["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-pt",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("ro-ro",{"dayNames":["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"],"dayNamesShort":["D","L","Ma","Mi","J","V","S"],"monthNames":["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],"monthNamesShort":["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ru-ru",{"dayNames":["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],"dayNamesShort":["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],"monthNamesShort":["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sk-sk",{"dayNames":["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],"dayNamesShort":["ne","po","ut","st","št","pi","so"],"monthNames":["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sv-se",{"dayNames":["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],"dayNamesShort":["sö","må","ti","on","to","fr","lö"],"monthNames":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("tr-tr",{"dayNames":["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],"dayNamesShort":["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],"monthNames":["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],"monthNamesShort":["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""],"timePattern":"HH:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("uk-ua",{"dayNames":["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],"dayNamesShort":["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень",""],"monthNamesShort":["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("zh-cn",{"dayNames":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dayNamesShort":["日","一","二","三","四","五","六"],"monthNames":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"monthNamesShort":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"timePattern":"H:mm","datePattern":"yyyy/M/d","dateTimePattern":"yyyy/M/d H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("zh-tw",{"dayNames":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dayNamesShort":["日","一","二","三","四","五","六"],"monthNames":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"monthNamesShort":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"timePattern":"tt hh:mm","datePattern":"yyyy/M/d","dateTimePattern":"yyyy/M/d tt hh:mm","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.US=DayPilot.Locale.find("en-us"),DayPilot.Switcher=function(e){function t(e,t,i){var a={};a.start=e,a.end=t,a.day=i,a.target=n.l.control,a.preventDefault=function(){this.preventDefault.value=!0};var r=n.I;r&&r.start===a.start&&r.end===a.end&&r.day===a.day&&r.target===a.target||(n.I=a,"function"==typeof n.onChange&&(n.onChange(a),a.preventDefault.value)||"function"==typeof n.onTimeRangeSelect&&(n.onTimeRangeSelect(a),a.preventDefault.value)||(n.l.t(n.m),"function"==typeof n.onChanged&&n.onChanged(a),"function"==typeof n.onTimeRangeSelected&&n.onTimeRangeSelected(a)))}var n=this;this.f=[],this.j=[],this.k={},this.selectedClass=null,this.syncScrollbar=!0,this.l=null,this.m=DayPilot.Date.today(),this.n=null,this.onChange=null,this.onChanged=null,this.onSelect=null,this.k.updateMode=function(e){var t=n.k.control;t&&(t.selectMode=e,t.select(n.m))},this.addView=function(e,t){var i;if("string"==typeof e){if(i=document.getElementById(e),!i)throw"Element not found: "+e;
|
|
11
|
+
}else i=e;var a=i,r={};return r.o=!0,r.p=a.id,r.control=a,r.q=t||{},r.s=function(){a.hide?a.hide():a.nav&&a.nav.top?a.nav.top.style.display="none":a.style.display="none"},r.t=function(e){(function(){return!!a.backendUrl||!("function"!=typeof WebForm_DoCallback||!a.uniqueID)})()?a.commandCallBack&&a.commandCallBack("navigate",{"day":e}):(a.startDate=e,a.update())},r.u=function(){n.z(),a.show?a.show():a.nav&&a.nav.top?a.nav.top.style.display="":a.style.display=""},r.A=function(){if(r.q.navigatorSelectMode)return r.q.navigatorSelectMode;if(a.isCalendar)switch(a.viewType){case"Day":return"day";case"Week":return"week";case"WorkWeek":return"week";default:return"day"}else if(a.isMonth)switch(a.viewType){case"Month":return"month";case"Weeks":return"week";default:return"day"}return"day"},this.f.push(r),r},this.addTrigger=function(e,t){var i;if("string"==typeof e){if(i=document.getElementById(e),!i)throw"Element not found: "+e}else i=e;var a=this.B(t);a||(a=this.addView(t));var r={};return r.C=!0,r.D=i,r.p=i.id,r.E=a,r.F=function(e){n.show(r),n.G(r),null===e||void 0===e?void 0:e.preventDefault()},DayPilot.re(i,"click",r.F),this.j.push(r),r},this.addButton=this.addTrigger,this.select=function(e){var t=this.H(e);t?t.F():this.j.length>0&&this.j[0].F()},this.H=function(e){for(var t=0;t<this.j.length;t++){var n=this.j[t];if(n.p===e)return n}return null},this.G=function(e){if(this.selectedClass){for(var t=0;t<this.j.length;t++){var n=this.j[t];DayPilot.Util.removeClass(n.D,this.selectedClass)}DayPilot.Util.addClass(e.D,this.selectedClass)}},this.addNavigator=function(e){n.k.control=e,e.timeRangeSelectedHandling="JavaScript",e.onTimeRangeSelected=function(){var i,a,r;if(1===e.api)i=arguments[0],a=arguments[1],r=arguments[2];else{var o=arguments[0];i=o.start,a=o.end,r=o.day}n.m=r,t(i,a,r)}},this.show=function(e){var i,a;if(e.C)a=e,i=a.E;else if(i=e.o?e:this.B(e),this.l===i)return;if(n.onSelect){var r={};r.source=a?a.D:null,r.target=i.control,n.onSelect(r)}if(n.syncScrollbar){var o=this.l&&this.l.control;o&&o.isCalendar&&(n.n=o.getScrollY())}this.l=i,i.u(),null!==n.n&&i.control.isCalendar&&i.control.setScrollY(n.n);var s=i.A();n.k.updateMode(s),t(n.k.control.selectionStart,n.k.control.selectionEnd.addDays(1),n.k.control.selectionDay)},this.B=function(e){for(var t=0;t<this.f.length;t++)if(this.f[t].control===e)return this.f[t];return null},this.z=function(){for(var e=0;e<this.f.length;e++)this.f[e].s()},Object.defineProperty(this,"active",{get:function(){return n.l}}),this.events={},this.events.load=function(e,t,i){if(!n.l||!n.l.control)throw"DayPilot.Switcher.events.load(): Active view not found";n.l.control.events.load(e,t,i)},this.I=null,this.J=function(){if(e)for(var t in e)if("triggers"===t){var i=e.triggers||[];i.forEach(function(e){n.addTrigger(e.id,e.view)})}else"navigator"===t?n.addNavigator(e.navigator):n[t]=e[t]},this.J()},DayPilot.Duration=function(e){var t=this,n=864e5,i=36e5,a=6e4,r=1e3;if(2===arguments.length){var o=arguments[0],s=arguments[1];if(!(o instanceof DayPilot.Date)&&"string"!=typeof o)throw"DayPilot.Duration(): Invalid start argument, DayPilot.Date expected";if(!(s instanceof DayPilot.Date)&&"string"!=typeof s)throw"DayPilot.Duration(): Invalid end argument, DayPilot.Date expected";"string"==typeof o&&(o=new DayPilot.Date(o)),"string"==typeof s&&(s=new DayPilot.Date(s)),e=s.getTime()-o.getTime()}return this.ticks=e,DayPilot.Date.Cache.DurationCtor[""+e]?DayPilot.Date.Cache.DurationCtor[""+e]:(DayPilot.Date.Cache.DurationCtor[""+e]=this,this.toString=function(e){if(!e)return t.days()+"."+t.hours()+":"+t.minutes()+":"+t.seconds()+"."+t.milliseconds();var n=t.minutes();n=(n<10?"0":"")+n;var i=e;return i=i.replace("mm",n),i=i.replace("m",t.minutes()),i=i.replace("H",t.hours()),i=i.replace("h",t.hours()),i=i.replace("d",t.days()),i=i.replace("s",t.seconds())},this.totalHours=function(){return t.ticks/i},this.totalDays=function(){return t.ticks/n},this.totalMinutes=function(){return t.ticks/a},this.totalSeconds=function(){return t.ticks/r},this.days=function(){return Math.floor(t.totalDays())},this.hours=function(){var e=t.ticks-t.days()*n;return Math.floor(e/i)},this.minutes=function(){var e=t.ticks-Math.floor(t.totalHours())*i;return Math.floor(e/a)},this.seconds=function(){var e=t.ticks-Math.floor(t.totalMinutes())*a;return Math.floor(e/r)},void(this.milliseconds=function(){return t.ticks%r}))},DayPilot.Duration.weeks=function(e){return new DayPilot.Duration(1e3*e*60*60*24*7)},DayPilot.Duration.days=function(e){return new DayPilot.Duration(1e3*e*60*60*24)},DayPilot.Duration.hours=function(e){return new DayPilot.Duration(1e3*e*60*60)},DayPilot.Duration.minutes=function(e){return new DayPilot.Duration(1e3*e*60)},DayPilot.Duration.seconds=function(e){return new DayPilot.Duration(1e3*e)},DayPilot.TimeSpan=function(){throw"Please use DayPilot.Duration class instead of DayPilot.TimeSpan."};try{DayPilot.TimeSpan.prototype=Object.create(DayPilot.Duration.prototype)}catch(e){}DayPilot.Date=function(e,n){if(e instanceof DayPilot.Date)return e;var i;DayPilot.Util.isNullOrUndefined(e)&&(i=DayPilot.DateUtil.fromLocal().getTime(),e=i);var a=DayPilot.Date.Cache.Ctor;if(a[e])return DayPilot.Stats.cacheHitsCtor+=1,a[e];var r=!1;if("string"==typeof e||e instanceof String){try{i=DayPilot.DateUtil.fromStringSortable(e,n).getTime()}catch(t){throw new DayPilot.Exception("DayPilot.Date - Unable to parse ISO8601 date/time string: "+e)}r=!0}else if("number"==typeof e||e instanceof Number){if(isNaN(e))throw"Cannot create DayPilot.Date from NaN";i=e}else{if(!(e instanceof Date))throw"Unrecognized parameter: use Date, number or string in ISO 8601 format";i=n?DayPilot.DateUtil.fromLocal(e).getTime():e.getTime()}var o=t(i);return a[o]?a[o]:(a[o]=this,a[i]=this,r&&o!==e&&DayPilot.DateUtil.hasTzSpec(e)&&(a[e]=this),Object.defineProperty?(Object.defineProperty(this,"ticks",{get:function(){return i}}),Object.defineProperty(this,"value",{"value":o,"writable":!1,"enumerable":!0})):(this.ticks=i,this.value=o),DayPilot.Date.Config.legacyShowD&&(this.d=new Date(i)),void(DayPilot.Stats.dateObjects+=1))},DayPilot.Date.Config={},DayPilot.Date.Config.legacyShowD=!1,DayPilot.Date.Cache={},DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={},DayPilot.Date.Cache.clear=function(){DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={}},DayPilot.Date.prototype.addDays=function(e){return e?new DayPilot.Date(this.ticks+24*e*60*60*1e3):this},DayPilot.Date.prototype.addHours=function(e){return e?this.addTime(60*e*60*1e3):this},DayPilot.Date.prototype.addMilliseconds=function(e){return e?this.addTime(e):this},DayPilot.Date.prototype.addMinutes=function(e){return e?this.addTime(60*e*1e3):this},DayPilot.Date.prototype.addMonths=function(e){if(!e)return this;var t=new Date(this.ticks),n=t.getUTCFullYear(),i=t.getUTCMonth()+1;if(e>0){for(;e>=12;)e-=12,n++;e>12-i?(n++,i=e-(12-i)):i+=e}else{for(;e<=-12;)e+=12,n--;i+e<=0?(n--,i=12+i+e):i+=e}var a=new Date(t.getTime());a.setUTCDate(1),a.setUTCFullYear(n),a.setUTCMonth(i-1);var r=new DayPilot.Date(a).daysInMonth();return a.setUTCDate(Math.min(r,t.getUTCDate())),new DayPilot.Date(a)},DayPilot.Date.prototype.addSeconds=function(e){return e?this.addTime(1e3*e):this},DayPilot.Date.prototype.addTime=function(e){return e?(e instanceof DayPilot.Duration&&(e=e.ticks),new DayPilot.Date(this.ticks+e)):this},DayPilot.Date.prototype.addYears=function(e){var t=new Date(this.ticks),n=new Date(this.ticks),i=this.getYear()+e,a=this.getMonth();n.setUTCDate(1),n.setUTCFullYear(i),n.setUTCMonth(a);var r=new DayPilot.Date(n).daysInMonth();return n.setUTCDate(Math.min(r,t.getUTCDate())),new DayPilot.Date(n)},DayPilot.Date.prototype.dayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.dayOfWeekISO=function(){return new Date(this.ticks).getUTCDay()||7},DayPilot.Date.prototype.getDayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfYear=function(){var e=this.firstDayOfYear();return DayPilot.DateUtil.daysDiff(e,this)+1},DayPilot.Date.prototype.daysInMonth=function(){var e=new Date(this.ticks),t=e.getUTCMonth()+1,n=e.getUTCFullYear(),i=[31,28,31,30,31,30,31,31,30,31,30,31];return 2!==t?i[t-1]:n%4!==0?i[1]:n%100===0&&n%400!==0?i[1]:i[1]+1},DayPilot.Date.prototype.daysInYear=function(){var e=this.getYear();return e%4!==0?365:e%100===0&&e%400!==0?365:366},DayPilot.Date.prototype.dayOfYear=function(){return Math.ceil((this.getDatePart().getTime()-this.firstDayOfYear().getTime())/864e5)+1},DayPilot.Date.prototype.equals=function(e){if(null===e)return!1;if(e instanceof DayPilot.Date)return this===e;throw"The parameter must be a DayPilot.Date object (DayPilot.Date.equals())"},DayPilot.Date.prototype.firstDayOfMonth=function(){var e=new Date;return e.setUTCFullYear(this.getYear(),this.getMonth(),1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.firstDayOfYear=function(){var e=this.getYear(),t=new Date;return t.setUTCFullYear(e,0,1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),new DayPilot.Date(t)},DayPilot.Date.prototype.firstDayOfWeek=function(e){var t=this;if(e instanceof DayPilot.Locale)e=e.weekStarts;else if("string"==typeof e&&DayPilot.Locale.find(e)){var n=DayPilot.Locale.find(e);e=n.weekStarts}else e=e||0;for(var i=t.dayOfWeek();i!==e;)t=t.addDays(-1),i=t.dayOfWeek();return new DayPilot.Date(t)},DayPilot.Date.prototype.getDay=function(){return new Date(this.ticks).getUTCDate()},DayPilot.Date.prototype.getDatePart=function(){var e=new Date(this.ticks);return e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.getYear=function(){return new Date(this.ticks).getUTCFullYear()},DayPilot.Date.prototype.getHours=function(){return new Date(this.ticks).getUTCHours()},DayPilot.Date.prototype.getMilliseconds=function(){return new Date(this.ticks).getUTCMilliseconds()},DayPilot.Date.prototype.getMinutes=function(){return new Date(this.ticks).getUTCMinutes()},DayPilot.Date.prototype.getMonth=function(){return new Date(this.ticks).getUTCMonth()},DayPilot.Date.prototype.getSeconds=function(){return new Date(this.ticks).getUTCSeconds()},DayPilot.Date.prototype.getTotalTicks=function(){return this.getTime()},DayPilot.Date.prototype.getTime=function(){return this.ticks},DayPilot.Date.prototype.getTimePart=function(){var e=this.getDatePart();return DayPilot.DateUtil.diff(this,e)},DayPilot.Date.prototype.lastDayOfMonth=function(){var e=new Date(this.firstDayOfMonth().getTime()),t=this.daysInMonth();return e.setUTCDate(t),new DayPilot.Date(e)},DayPilot.Date.prototype.weekNumber=function(){var e=this.firstDayOfYear(),t=(this.getTime()-e.getTime())/864e5;return Math.ceil((t+e.dayOfWeek()+1)/7)},DayPilot.Date.prototype.weekNumberISO=function(){var e=!1,t=this.dayOfYear(),n=this.firstDayOfYear().dayOfWeek(),i=this.firstDayOfYear().addYears(1).addDays(-1).dayOfWeek();0===n&&(n=7),0===i&&(i=7);var a=8-n;4!==n&&4!==i||(e=!0);var r=Math.ceil((t-a)/7),o=r;return a>=4&&(o+=1),o>52&&!e&&(o=1),0===o&&(o=this.firstDayOfYear().addDays(-1).weekNumberISO()),o},DayPilot.Date.prototype.toDateLocal=function(){var e=new Date(this.ticks),t=new Date;return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours()),t.setMinutes(e.getUTCMinutes()),t.setSeconds(e.getUTCSeconds()),t.setMilliseconds(e.getUTCMilliseconds()),t},DayPilot.Date.prototype.toDate=function(){return new Date(this.ticks)},DayPilot.Date.prototype.toJSON=function(){return this.value},DayPilot.Date.prototype.toString=function(e,t){return e?new n(e,t).print(this):this.toStringSortable()},DayPilot.Date.prototype.toStringSortable=function(){return t(this.ticks)},DayPilot.Date.parse=function(e,t,i){return new n(t,i).parse(e)},DayPilot.Date.today=function(){return new DayPilot.Date(DayPilot.DateUtil.localToday(),!0)},DayPilot.Date.now=function(){return new DayPilot.Date},DayPilot.Date.fromYearMonthDay=function(e,t,n){t=t||1,n=n||1;var i=new Date(0);return i.setUTCFullYear(e),i.setUTCMonth(t-1),i.setUTCDate(n),new DayPilot.Date(i)},DayPilot.DateUtil={},DayPilot.DateUtil.fromStringSortable=function(e,t){if(!e)throw"Can't create DayPilot.Date from an empty string";var n=e.length,i=10===n,a=19===n,r=n>19;if(!i&&!a&&!r)throw"Invalid string format (use '2010-01-01' or '2010-01-01T00:00:00'): "+e;if(DayPilot.Date.Cache.Parsing[e]&&!t)return DayPilot.Stats.cacheHitsParsing+=1,DayPilot.Date.Cache.Parsing[e];var o=e.substring(0,4),s=e.substring(5,7),l=e.substring(8,10),d=new Date(0);if(d.setUTCFullYear(o,s-1,l),i)return DayPilot.Date.Cache.Parsing[e]=d,d;var c=e.substring(11,13),u=e.substring(14,16),h=e.substring(17,19);if(d.setUTCHours(c),d.setUTCMinutes(u),d.setUTCSeconds(h),a)return DayPilot.Date.Cache.Parsing[e]=d,d;var f=e[19],v=0;if("."===f){var p=parseInt(e.substring(20,23));d.setUTCMilliseconds(p),v=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(23))}else v=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(19));var m=new DayPilot.Date(d);return t||(m=m.addMinutes(-v)),d=m.toDate(),DayPilot.Date.Cache.Parsing[e]=d,d},DayPilot.DateUtil.getTzOffsetMinutes=function(e){if(DayPilot.Util.isNullOrUndefined(e)||""===e)return 0;if("Z"===e)return 0;var t=e[0],n=parseInt(e.substring(1,3)),i=parseInt(e.substring(4)),a=60*n+i;if("-"===t)return-a;if("+"===t)return a;throw"Invalid timezone spec: "+e},DayPilot.DateUtil.hasTzSpec=function(e){return!!e.indexOf("+")||!!e.indexOf("-")},DayPilot.DateUtil.daysDiff=function(e,t){if(!e||!t)throw new Error("two parameters required");if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()>t.getTime())return null;for(var n=0,i=e.getDatePart(),a=t.getDatePart();i.getTime()<a.getTime();)i=i.addDays(1),n++;return n},DayPilot.DateUtil.daysSpan=function(e,t){if(!e||!t)throw new Error("two parameters required");if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()===t.getTime())return 0;var n=DayPilot.DateUtil.daysDiff(e,t);return t.getTime()===t.getDatePart().getTime()&&n--,n},DayPilot.DateUtil.diff=function(e,t){if(!(e&&t&&e.getTime&&t.getTime))throw"Both compared objects must be Date objects (DayPilot.Date.diff).";return e.getTime()-t.getTime()},DayPilot.DateUtil.fromLocal=function(e){e||(e=new Date);var t=new Date;return t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours()),t.setUTCMinutes(e.getMinutes()),t.setUTCSeconds(e.getSeconds()),t.setUTCMilliseconds(e.getMilliseconds()),t},DayPilot.DateUtil.localToday=function(){var e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e},DayPilot.DateUtil.hours=function(e,t){var n=e.getUTCMinutes();n<10&&(n="0"+n);var i=e.getUTCHours();if(t){var a=i<12;i%=12,0===i&&(i=12);return i+":"+n+" "+(a?"AM":"PM")}return i+":"+n},DayPilot.DateUtil.max=function(e,t){return e.getTime()>t.getTime()?e:t},DayPilot.DateUtil.min=function(e,t){return e.getTime()<t.getTime()?e:t},DayPilot.ColorUtil={},DayPilot.ColorUtil.hexToRgb=function(e){if(!/^#[0-9a-f]{6}$/i.test(e))throw new DayPilot.Exception("Invalid color, only full hex color string accepted, eg. '#ffaaff'.");return e=e.replace("#",""),{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16)}},DayPilot.ColorUtil.rgbToHex=function(e){return"#"+a(e.r)+a(e.g)+a(e.b)},DayPilot.ColorUtil.adjustLuminance=function(e,t){return{r:e.r+t,g:e.g+t,b:e.b+t}},DayPilot.ColorUtil.darker=function(e,t){var n="";9===e.length&&(n=e.slice(7,9),e=e.slice(0,7));var i=DayPilot.ColorUtil.hexToRgb(e);"number"!=typeof t&&(t=1);var a=17,r=Math.round(t*a),o=DayPilot.ColorUtil.adjustLuminance(i,-r);return DayPilot.ColorUtil.rgbToHex(o)+n},DayPilot.ColorUtil.lighter=function(e,t){return"number"!=typeof t&&(t=1),DayPilot.ColorUtil.darker(e,-t)},DayPilot.ColorUtil.pl=function(e){var t=DayPilot.ColorUtil.hexToRgb(e),n=t.r/255,i=t.g/255,a=t.b/255;return Math.sqrt(.299*n*n+.587*i*i+.114*a*a)},DayPilot.ColorUtil.contrasting=function(e,t,n){var i=DayPilot.ColorUtil.pl(e);return t=t||"#ffffff",n=n||"#000000",i>.5?n:t},DayPilot.Event=function(e,t,n){var i=this;this.calendar=t,this.data=e?e:{},this.part=n?n:{},"undefined"==typeof this.data.id&&(this.data.id=this.data.value);var a={},r=["id","text","start","end","resource"];this.isEvent=!0,this.temp=function(){if(a.dirty)return a;for(var e=0;e<r.length;e++)a[r[e]]=i.data[r[e]];return a.dirty=!0,a},this.copy=function(){for(var e={},t=0;t<r.length;t++)e[r[t]]=i.data[r[t]];return e},this.commit=function(){if(a.dirty){for(var e=0;e<r.length;e++)i.data[r[e]]=a[r[e]];a.dirty=!1}},this.dirty=function(){return a.dirty},this.id=function(e){return"undefined"==typeof e?i.data.id:void(this.temp().id=e)},this.value=function(e){return"undefined"==typeof e?i.id():void i.id(e)},this.text=function(e){return"undefined"==typeof e?i.data.text:(this.temp().text=e,void this.client.innerHTML(e))},this.start=function(e){return"undefined"==typeof e?new DayPilot.Date(i.data.start):void(this.temp().start=new DayPilot.Date(e))},this.end=function(e){return"undefined"==typeof e?new DayPilot.Date(i.data.end):void(this.temp().end=new DayPilot.Date(e))},this.resource=function(e){return"undefined"==typeof e?i.data.resource:void(this.temp().resource=e)},this.duration=function(){return new DayPilot.Duration(this.start(),this.end())},this.rawend=function(e){if("undefined"==typeof e)return t&&t.internal.adjustEndIn?t.internal.adjustEndIn(new DayPilot.Date(i.data.end)):new DayPilot.Date(i.data.end);throw new DayPilot.Exception("DayPilot.Event.rawend() is readonly")},this.partStart=function(){return new DayPilot.Date(this.part.start)},this.partEnd=function(){return new DayPilot.Date(this.part.end)},this.tag=function(e){var t=i.data.tag;if(!t)return null;if("undefined"==typeof e)return i.data.tag;for(var n=i.calendar.tagFields,a=-1,r=0;r<n.length;r++)e===n[r]&&(a=r);if(a===-1)throw"Field name not found.";return t[a]},this.client={},this.client.innerHTML=function(e){if("undefined"==typeof e){var t=i.cache||i.data,n=i.calendar&&i.calendar.internal&&i.calendar.internal.xssTextHtml;return n?n(t.text,t.html):DayPilot.Util.escapeTextHtml(t.text,t.html)}i.data.html=e},this.client.html=this.client.innerHTML,this.client.header=function(e){return"undefined"==typeof e?i.data.header:void(i.data.header=e)},this.client.cssClass=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.cssClass?i.cache.cssClass:i.data.cssClass:void(i.data.cssClass=e)},this.client.toolTip=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.toolTip?i.cache.toolTip:"undefined"!=typeof i.data.toolTip?i.data.toolTip:i.data.text:void(i.data.toolTip=e)},this.client.barVisible=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.barHidden?!i.cache.barHidden:i.calendar.durationBarVisible&&!i.data.barHidden:void(i.data.barHidden=!e)},this.client.backColor=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.backColor?i.cache.backColor:"undefined"!=typeof i.data.backColor?i.data.backColor:i.calendar.eventBackColor:void(i.data.backColor=e)},this.client.borderColor=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.borderColor?i.cache.borderColor:"undefined"!=typeof i.data.borderColor?i.data.borderColor:i.calendar.eventBorderColor:void(i.data.borderColor=e)},this.client.contextMenu=function(e){if("undefined"==typeof e){if(i.oContextMenu)return i.oContextMenu;return i.cache?i.cache.contextMenu:i.data.contextMenu}i.oContextMenu=e},this.client.moveEnabled=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.moveDisabled?!i.cache.moveDisabled:"Disabled"!==i.calendar.eventMoveHandling&&!i.data.moveDisabled:void(i.data.moveDisabled=!e)},this.client.resizeEnabled=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.resizeDisabled?!i.cache.resizeDisabled:"Disabled"!==i.calendar.eventResizeHandling&&!i.data.resizeDisabled:void(i.data.resizeDisabled=!e)},this.client.clickEnabled=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.clickDisabled?!i.cache.clickDisabled:"Disabled"!==i.calendar.eventClickHandling&&!i.data.clickDisabled:void(i.data.clickDisabled=!e)},this.client.rightClickEnabled=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.rightClickDisabled?!i.cache.rightClickDisabled:"Disabled"!==i.calendar.eventRightClickHandling&&!i.data.rightClickDisabled:void(i.data.rightClickDisabled=!e)},this.client.deleteEnabled=function(e){return"undefined"==typeof e?i.cache&&"undefined"!=typeof i.cache.deleteDisabled?!i.cache.deleteDisabled:"Disabled"!==i.calendar.eventDeleteHandling&&!i.data.deleteDisabled:void(i.data.deleteDisabled=!e)},this.toJSON=function(){var e={};if(e.value=this.id(),e.id=this.id(),e.text=this.text(),e.start=this.start(),e.end=this.end(),e.tag={},i.calendar&&i.calendar.tagFields)for(var t=i.calendar.tagFields,n=0;n<t.length;n++)e.tag[t[n]]=this.tag(t[n]);return e}}}}(DayPilot),function(DayPilot){var e=function(){};if("undefined"==typeof DayPilot.Calendar||!DayPilot.Calendar.events){var t={};t.selectedCells=[],t.topSelectedCell=null,t.bottomSelectedCell=null,t.column=null,t.firstSelected=null,t.firstMousePos=null,t.originalMouse=null,t.originalHeight=null,t.originalTop=null,t.resizing=null,t.globalHandlers=!1,t.moving=null,t.register=function(e){t.registered||(t.registered=[]);for(var n=t.registered,i=0;i<n.length;i++)if(n[i]===e)return;n.push(e)},t.unregister=function(e){var n=t.registered;if(n){var i=DayPilot.indexOf(n,e);i!==-1&&n.splice(i,1)}},t.getCellsAbove=function(e){for(var n=[],i=t.getColumn(e),a=e.parentNode,r=null;a&&r!==t.firstSelected;)for(r=a.getElementsByTagName("td")[i],n.push(r),a=a.previousSibling;a&&"TR"!==a.tagName;)a=a.previousSibling;return n},t.getCellsBelow=function(e){for(var n=[],i=t.getColumn(e),a=e.parentNode,r=null;a&&r!==t.firstSelected;)for(r=a.getElementsByTagName("td")[i],n.push(r),a=a.nextSibling;a&&"TR"!==a.tagName;)a=a.nextSibling;return n},t.getColumn=function(e){for(var t=0;e.previousSibling;)e=e.previousSibling,"TD"===e.tagName&&t++;return t},t.gUnload=function(){if(t.registered)for(var e=t.registered,n=0;n<e.length;n++){var i=e[n];i.dispose(),t.unregister(i)}},t.gMouseUp=function(n){if(t.resizing){if(!t.resizingShadow)return t.resizing.style.cursor="default",document.body.style.cursor="default",t.resizing=null,void(DayPilot.Global.resizing=null);var i=t.resizing.event,a=t.resizingShadow.clientHeight,r=t.resizingShadow.offsetTop,o=t.resizing.dpBorder;t.deleteShadow(t.resizingShadow),t.resizingShadow=null,t.resizing.style.cursor="default",i.calendar.nav.top.style.cursor="auto",t.resizing.onclick=null,t.resizing=null,DayPilot.Global.resizing=null,i.calendar.K(i,a,r,o)}else if(t.moving){if(!t.movingShadow)return t.moving=null,DayPilot.Global.moving=null,void(document.body.style.cursor="default");var s=t.movingShadow.offsetTop,i=t.moving.event;t.deleteShadow(t.movingShadow),DayPilot.Util.removeClass(t.moving,i.calendar.L("_event_moving_source"));var l=t.movingShadow.column;t.moving=null,DayPilot.Global.moving=null,t.movingShadow=null,i.calendar.nav.top.style.cursor="auto",i.calendar.M(i,l,s,n)}else if(DayPilot.Global.selecting){var d=DayPilot.Global.selecting.calendar;d.N=DayPilot.Global.selecting,DayPilot.Global.selecting=null;var c=d.getSelection();d.O(c.start,c.end,c.resource),"Hold"!==d.timeRangeSelectedHandling&&"HoldForever"!==d.timeRangeSelectedHandling&&e()}else t.selecting=!1},t.deleteShadow=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},t.moveShadow=function(e){var n=t.movingShadow,i=n.parentNode;i.style.display="none",n.parentNode.removeChild(n),e.firstChild.appendChild(n),n.style.left="0px",i.style.display="",n.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"};var n=DayPilot.Util.isVueVNode,i=DayPilot.Util.overlaps;t.Calendar=function(e,a){var r=!1;if(this instanceof t.Calendar&&!this.P&&(r=!0,this.P=!0),!r)throw"DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";var o=this;this.uniqueID=null,this.isCalendar=!0,this.v="${v}",this.id=e,this.clientName=e,this.cache={},this.cache.pixels={},this.elements={},this.elements.events=[],this.elements.selection=[],this.nav={},this.afterRender=function(){},this.fasterDispose=!0,this.angularAutoApply=!1,this.api=2,this.businessBeginsHour=9,this.businessEndsHour=18,this.cellDuration=30,this.cellHeight=30,this.columnMarginLeft=0,this.columnMarginRight=5,this.columnsLoadMethod="GET",this.contextMenu=null,this.days=1,this.durationBarVisible=!0,this.eventBorderRadius=null,this.eventsLoadMethod="GET",this.headerDateFormat=null,this.headerHeight=30,this.headerTextWrappingEnabled=!1,this.height=300,this.heightSpec="BusinessHours",this.hideUntilInit=!0,this.hourWidth=60,this.initScrollPos="Auto",this.loadingLabelHtml=null,this.loadingLabelText="Loading...",this.loadingLabelVisible=!0,this.locale="en-us",this.rtl=!1,this.snapToGrid=!0,this.showToolTip=!0,this.startDate=(new DayPilot.Date).getDatePart(),this.cssClassPrefix="calendar_default",this.theme=null,this.timeFormat="Auto",this.useEventBoxes="Always",this.viewType="Days",this.visible=!0,this.xssProtection="Enabled",this.headerClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.eventMoveHandling="Update",this.eventDeleteHandling="Disabled",this.timeRangeSelectedHandling="Enabled",this.onBeforeCellRender=null,this.onBeforeEventRender=null,this.onBeforeHeaderRender=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onHeaderClick=null,this.onHeaderClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.Q=!1,this.R={};var s=this.R;this.clearSelection=function(){t.topSelectedCell=null,t.bottomSelectedCell=null,this.S()},this.S=function(){DayPilot.de(o.elements.selection),o.elements.selection=[],o.nav.activeSelection=null},this.T=function(e,t,n){var i={};i.action=e,i.parameters=n,i.data=t,i.header=this.U();var a="JSON"+JSON.stringify(i);__doPostBack(o.uniqueID,a)},this.V=function(e,t,n){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.callbackTimeout=window.setTimeout(function(){o.loadingStart()},100);var i={};i.action=e,i.parameters=n,i.data=t,i.header=this.U();var a="JSON"+JSON.stringify(i);this.backendUrl?DayPilot.request(this.backendUrl,this.W,a,this.ajaxError):"function"==typeof WebForm_DoCallback&&WebForm_DoCallback(this.uniqueID,a,this.X,this.clientName,this.onCallbackError,!0)},this.onCallbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.dispose=function(){var e=o;e.Q||(e.Q=!0,clearInterval(e.Y),e.Z(),e.nav.scroll.root=null,DayPilot.pu(e.nav.loading),e._(),e.aa(),e.nav.select=null,e.nav.cornerRight=null,e.nav.scrollable=null,e.nav.zoom=null,e.nav.loading=null,e.nav.header=null,e.nav.hourTable=null,e.nav.scrolltop=null,e.nav.scroll.onscroll=null,e.nav.scroll=null,e.nav.main=null,e.nav.message=null,e.nav.messageClose=null,e.nav.top=null,t.unregister(e))},this.disposed=function(){return this.Q},this.ba=function(){this.nav.top.dispose=this.dispose},this.W=function(e){o.X(e.responseText)},this.U=function(){var e={};return e.control="dpc",e.id=this.id,e.v=this.v,e.days=o.days,e.startDate=o.startDate,e.heightSpec=o.heightSpec,e.businessBeginsHour=o.businessBeginsHour,e.businessEndsHour=o.businessEndsHour,e.hashes=o.hashes,e.timeFormat=o.timeFormat,e.viewType=o.viewType,e.locale=o.locale,e},this.ca=function(e){for(var t=e.parentNode;t&&"TD"!==t.tagName;)t=t.parentNode;var n=o.eventBorderRadius;"number"==typeof n&&(n+="px");var i=document.createElement("div");i.setAttribute("unselectable","on"),i.style.position="absolute",i.style.width=e.offsetWidth+"px",i.style.height=e.offsetHeight+"px",i.style.left=e.offsetLeft+"px",i.style.top=e.offsetTop+"px",i.style.boxSizing="border-box",i.style.zIndex=101,i.className=o.L("_shadow");var a=document.createElement("div");return a.className=o.L("_shadow_inner"),n&&(a.style.borderRadius=n,i.style.borderRadius=n),i.appendChild(a),t.firstChild.appendChild(i),i},this.R.locale=function(){var e=DayPilot.Locale.find(o.locale);return e?e:DayPilot.Locale.US},this.R.timeFormat=function(){return"Auto"!==o.timeFormat?o.timeFormat:this.locale().timeFormat},this.R.da=function(){return"Disabled"!==o.xssProtection},this.R.ea=function(){if("Auto"===o.weekStarts){var e=s.locale();return e?e.weekStarts:0}return o.weekStarts||0},this.R.fa=function(){var e=o.cellDuration;if(e<=1)return 1;if(e>=60)return 60;var t=[1,2,3,4,5,6,10,12,15,20,30,60],n=Math.floor(e);return Math.max.apply(null,t.filter(function(e){return e<=n}))},this.X=function(e){if(e&&0===e.indexOf("$$$")){if(!window.console)throw"Error received from the server side: "+e;return void console.log("Error received from the server side: "+e)}var t=JSON.parse(e);if(t.CallBackRedirect)return void(document.location.href=t.CallBackRedirect);if("None"===t.UpdateType)return o.loadingStop(),void o.u();if(o.Z(),"Full"===t.UpdateType&&(o.columns=t.Columns,o.days=t.Days,o.startDate=new DayPilot.Date(t.StartDate),o.heightSpec=t.HeightSpec?t.HeightSpec:o.heightSpec,o.businessBeginsHour=t.BusinessBeginsHour?t.BusinessBeginsHour:o.businessBeginsHour,o.businessEndsHour=t.BusinessEndsHour?t.BusinessEndsHour:o.businessEndsHour,o.headerDateFormat=t.HeaderDateFormat?t.HeaderDateFormat:o.headerDateFormat,o.viewType=t.ViewType,o.backColor=t.BackColor?t.BackColor:o.backColor,o.eventHeaderVisible=t.EventHeaderVisible?t.EventHeaderVisible:o.eventHeaderVisible,o.timeFormat=t.TimeFormat?t.TimeFormat:o.timeFormat,o.locale=t.Locale?t.Locale:o.locale,o.ga()),t.Hashes)for(var n in t.Hashes)o.hashes[n]=t.Hashes[n];o.events.list=t.Events,o.ha(),o.ia(),"Full"===t.UpdateType&&(o.ja(),o.ka(),o.la(),o.ma()),o.u(),o.na(),o.clearSelection(),o.afterRender(t.CallBackData,!0),o.loadingStop()},this.oa=function(){return this.pa()/36e5},this.qa=function(){return this.businessBeginsHour>this.businessEndsHour?24-this.businessBeginsHour+this.businessEndsHour:this.businessEndsHour-this.businessBeginsHour},this.ra=function(){return this.pa()/(60*s.fa()*1e3)},this.pa=function(){var e=0;return e="BusinessHoursNoScroll"===this.heightSpec?this.qa():24,60*e*60*1e3},this.sa=function(){return"BusinessHoursNoScroll"===this.heightSpec?this.businessBeginsHour:0},this.ta=function(){return 2===o.api},this.eventClickCallBack=function(e,t){this.V("EventClick",t,e)},this.eventClickPostBack=function(e,t){this.T("EventClick",t,e)},this.va=function(e){var t=e.currentTarget,n=t.event;if(n.client.clickEnabled())if(o.ta()){var i={};if(i.e=n,i.originalEvent=e,i.meta=e.metaKey,i.ctrl=e.ctrlKey,i.control=o,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventClick&&(o.wa.apply(function(){o.onEventClick(i)}),i.preventDefault.value))return;switch(o.eventClickHandling){case"CallBack":o.eventClickCallBack(n);break;case"PostBack":o.eventClickPostBack(n);break;case"ContextMenu":var a=n.client.contextMenu();a?a.show(n):o.contextMenu&&o.contextMenu.show(n)}"function"==typeof o.onEventClicked&&o.wa.apply(function(){o.onEventClicked(i)})}else switch(o.eventClickHandling){case"PostBack":o.eventClickPostBack(n);break;case"CallBack":o.eventClickCallBack(n);break;case"JavaScript":o.onEventClick(n)}},this.xa=function(e){var t=e.currentTarget.event;if(e.stopPropagation(),!t.client.rightClickEnabled())return!1;var n={};if(n.e=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventRightClick&&(o.onEventRightClick(n),n.preventDefault.value))return!1;switch(o.eventRightClickHandling){case"ContextMenu":var i=t.client.contextMenu();
|
|
12
|
+
i?i.show(t):o.contextMenu&&o.contextMenu.show(t)}return"function"==typeof o.onEventRightClicked&&o.onEventRightClicked(n),e.preventDefault&&e.preventDefault(),!1},this.eventDeleteCallBack=function(e,t){this.V("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.T("EventDelete",t,e)},this.ya=function(e){if(o.ta()){var t={};if(t.e=e,t.control=o,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventDelete&&(o.wa.apply(function(){o.onEventDelete(t)}),t.preventDefault.value))return;switch(o.eventDeleteHandling){case"CallBack":o.eventDeleteCallBack(e);break;case"PostBack":o.eventDeletePostBack(e);break;case"Update":o.events.remove(e)}"function"==typeof o.onEventDeleted&&o.wa.apply(function(){o.onEventDeleted(t)})}else switch(o.eventDeleteHandling){case"PostBack":o.eventDeletePostBack(e);break;case"CallBack":o.eventDeleteCallBack(e);break;case"JavaScript":o.onEventDelete(e)}},this.eventResizeCallBack=function(e,t,n,i){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var a={};a.e=e,a.newStart=t,a.newEnd=n,this.V("EventResize",i,a)},this.eventResizePostBack=function(e,t,n,i){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var a={};a.e=e,a.newStart=t,a.newEnd=n,this.T("EventResize",i,a)},this.K=function(e,t,n,i){var a=0,r=new Date,s=new Date;if("top"===i?(r=o.za(e,n-a),s=e.end()):"bottom"===i&&(r=e.start(),s=o.Aa(e,n+t-a)),o.ta()){var l={};if(l.e=e,l.control=o,l.newStart=r,l.newEnd=s,l.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventResize&&(o.wa.apply(function(){o.onEventResize(l)}),l.preventDefault.value))return;switch(o.eventResizeHandling){case"PostBack":o.eventResizePostBack(e,r,s);break;case"CallBack":o.eventResizeCallBack(e,r,s);break;case"Update":e.start(r),e.end(s),o.events.update(e)}"function"==typeof o.onEventResized&&o.wa.apply(function(){o.onEventResized(l)})}else switch(o.eventResizeHandling){case"PostBack":o.eventResizePostBack(e,r,s);break;case"CallBack":o.eventResizeCallBack(e,r,s);break;case"JavaScript":o.onEventResize(e,r,s)}},this.za=function(e,t){var n=o.Ba[e.part.dayIndex].start,i=Math.floor(t/o.cellHeight);o.snapToGrid||(i=t/o.cellHeight);var a=Math.floor(i*s.fa()),r=60*a*1e3,l=60*o.sa()*60*1e3;return n.addTime(r+l)},this.Aa=function(e,t){var n=Math.floor(t/o.cellHeight);o.snapToGrid||(n=t/o.cellHeight);var i=Math.floor(n*s.fa()),a=60*i*1e3,r=60*o.sa()*60*1e3;return o.Ba[e.part.dayIndex].start.addTime(a+r)},this.eventMovePostBack=function(e,t,n,i,a){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var r={};r.e=e,r.newStart=t,r.newEnd=n,this.T("EventMove",a,r)},this.eventMoveCallBack=function(e,t,n,i,a){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var r={};r.e=e,r.newStart=t,r.newEnd=n,this.V("EventMove",a,r)},this.M=function(e,t,n,i){var a=0,r=Math.floor((n-a)/o.cellHeight);o.snapToGrid||(r=(n-a)/o.cellHeight);var l=s.fa(),d=r*l*60*1e3,c=e.start(),u=e.end(),h=new Date;c instanceof DayPilot.Date&&(c=c.toDate()),h.setTime(Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()));var f=c.getTime()-(h.getTime()+3600*c.getUTCHours()*1e3+Math.floor(c.getUTCMinutes()/l)*l*60*1e3);"Never"===o.useEventBoxes&&(f=0);var v=u.getTime()-c.getTime(),p=this.Ba[t],m=p.id;o.snapToGrid||(f=0);var g=p.start.getTime(),y=new Date;y.setTime(g+d+f);var b=new DayPilot.Date(y),w=b.addTime(v);if(o.ta()){var x={};if(x.e=e,x.newStart=b,x.newEnd=w,x.newResource=m,x.ctrl=i.ctrlKey,x.shift=i.shiftKey,x.control=o,x.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onEventMove&&(o.wa.apply(function(){o.onEventMove(x)}),x.preventDefault.value))return;switch(o.eventMoveHandling){case"PostBack":o.eventMovePostBack(e,b,w,p.id);break;case"CallBack":o.eventMoveCallBack(e,b,w,p.id);break;case"Update":e.start(b),e.end(w),e.resource(m),o.events.update(e)}"function"==typeof o.onEventMoved&&o.wa.apply(function(){o.onEventMoved(x)})}else switch(o.eventMoveHandling){case"PostBack":o.eventMovePostBack(e,b,w,p.id);break;case"CallBack":o.eventMoveCallBack(e,b,w,p.id);break;case"JavaScript":o.onEventMove(e,b,w,p.id,!1)}},this.timeRangeSelectedPostBack=function(e,t,n,i){var a={};a.start=e,a.end=t,this.T("TimeRangeSelected",i,a)},this.timeRangeSelectedCallBack=function(e,t,n,i){var a={};a.start=e,a.end=t,this.V("TimeRangeSelected",i,a)},this.O=function(e,t,n){if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),this.ta()){var i={};if(i.start=e,i.end=t,i.resource=n,i.control=o,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onTimeRangeSelect&&(o.wa.apply(function(){o.onTimeRangeSelect(i)}),i.preventDefault.value))return;switch(o.timeRangeSelectedHandling){case"PostBack":o.timeRangeSelectedPostBack(e,t);break;case"CallBack":o.timeRangeSelectedCallBack(e,t)}"function"==typeof o.onTimeRangeSelected&&o.wa.apply(function(){o.onTimeRangeSelected(i)})}else switch(o.timeRangeSelectedHandling){case"PostBack":o.timeRangeSelectedPostBack(e,t);break;case"CallBack":o.timeRangeSelectedCallBack(e,t);break;case"JavaScript":o.onTimeRangeSelected(e,t)}},this.Ca=function(e){if(!DayPilot.Global.selecting&&"Disabled"!==o.timeRangeSelectedHandling){var t=e.which;if(1===t||0===t){var n=o.nav.scrollable;o.coords=DayPilot.mo3(n,e),DayPilot.Global.selecting={calendar:o,start:o.coords};var i=DayPilot.Global.selecting;return i.start.time=o.Da(o.coords.x,o.coords.y),i.start.columnIndex=o.Ea(o.coords.x),i.start.column=o.Ba[i.start.columnIndex],o.Fa(),o.Ga(),!1}}},this.Ga=function(){var e=DayPilot.Global.selecting;!function(){var t=e.start.column,n=e.start.columnIndex,i=t.start,a=o.getPixels(e.startTime,i),r=o.getPixels(e.endTime,i),s=a.boxTop,l=r.boxBottom;o.snapToGrid||(s=a.top,l=r.top);var d=l-s,c=o.eventBorderRadius;"number"==typeof c&&(c+="px");var u=function(){if(o.nav.activeSelection)return o.nav.activeSelection;var e=document.createElement("div");e.setAttribute("unselectable","on"),e.style.position="absolute",e.style.left="0px",e.style.width="100%";var t=document.createElement("div");return t.setAttribute("unselectable","on"),t.className=o.L("_shadow_inner"),c&&(t.style.borderRadius=c,e.style.borderRadius=c),e.appendChild(t),o.nav.events.rows[0].cells[n].selection.appendChild(e),o.elements.selection.push(e),o.nav.activeSelection=e,e}();u.className=o.L("_shadow"),u.firstChild.innerHTML="",u.style.top=s+"px",u.style.height=d+"px",o.nav.events.rows[0].cells[n].selection.appendChild(u)}()},this.Fa=function(){var e=DayPilot.Global.selecting;e.end=o.coords,e.end.time=o.Da(e.start.x,e.end.y),e.end.column=o.Ba[o.Ea(e.end.x)],o.Ha(e)},this.Ha=function(e){var t,n,i;o.snapToGrid?e.end.time<e.start.time?(t=o.Ia(e.end.time,e.start.column.start),n=o.Ja(e.start.time,e.start.column.start),i=e.endTime):(t=o.Ia(e.start.time,e.start.column.start),n=o.Ja(e.end.time,e.start.column.start),i=e.startTime):e.end.time<e.start.time?(t=e.end.time,n=e.start.time,i=e.endTime):(t=e.start.time,n=e.end.time,i=e.startTime),e.startTime=t,e.endTime=n,e.anchor=i},this.getSelection=function(){if(!o.N)return null;var e=o.N;return new DayPilot.Selection(e.startTime,e.endTime,e.start.column.id,o)},this.Ea=function(e){if(e<0)return 0;o.rtl?e=o.nav.main.offsetWidth-e:e-=o.hourWidth;for(var t=0,n=o.nav.events.rows[0].cells,i=0;i<n.length;i++){if(t+=n[i].offsetWidth,e<t)return i}return null},this.Da=function(e,t){e=DayPilot.Util.atLeast(e,0);var n=this.Ea(e),i=t/(60/s.fa())/o.cellHeight,a=60*i*60*1e3,r=6e4*Math.floor(a/6e4),l=this.Ba[n];return l?l.start.addTime(r):null},this.Ia=function(e,t){var n=e.getTime();t&&(n-=t.getTime());var i=60*s.fa()*1e3,a=n%i;return e.addTime(-a)},this.Ja=function(e,t){var n=this.Ia(e,t);return n.getTime()===e.getTime()?n:n.addTime(60*s.fa()*1e3)},this.Ka={},this.Ka.getCellCoords=function(){var e={};if(e.x=0,e.y=0,!o.coords)return null;e.x=o.Ea(o.coords.x);var t=0,n=Math.floor((o.coords.y-t)/o.cellHeight);return e.y=n,e.x<0?null:e},this.columns={},this.columns.list=[],this.columns.load=function(e,t,n){if(!e)throw new DayPilot.Exception("columns.load(): 'url' parameter required");var i=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},a=function(e){var n,a=e.request;try{n=JSON.parse(a.responseText)}catch(e){var r={};return r.exception=e,void i(r)}if(DayPilot.isArray(n)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=n,"function"==typeof t&&t(s),s.preventDefault.value)return;o.columns.list=n,o.La&&o.update()}};o.columnsLoadMethod&&"POST"===o.columnsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":a,"error":i}):DayPilot.ajax({"method":"GET","url":e,"success":a,"error":i})},this.ga=function(){var e;e="Resources"!==o.viewType?this.Ma():o.columns.list,this.Ba=[];for(var t=0;t<e.length;t++){var n=this.Na(e[t]);this.Ba.push(n)}},this.Na=function(e){var t={};if(t.name=e.name,t.html=e.html,t.id=e.id,t.toolTip=e.toolTip,t.data=e,e.start?t.start=new DayPilot.Date(e.start):t.start=new DayPilot.Date(o.startDate),"BusinessHoursNoScroll"===this.heightSpec){var n=t.start.getDatePart();t.start=n.addHours(this.businessBeginsHour)}return t.putIntoBlock=function(e){for(var t=0;t<this.blocks.length;t++){var n=this.blocks[t];if(n.overlapsWith(e.part.top,e.part.height))return n.events.push(e),n.min=Math.min(n.min,e.part.top),n.max=Math.max(n.max,e.part.top+e.part.height),t}var i=[];return i.lines=[],i.events=[],i.overlapsWith=function(e,t){return!(e+t-1<this.min||e>this.max-1)},i.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.isFree(e.part.top,e.part.height))return n.push(e),t}var i=[];return i.isFree=function(e,t){for(var n=e+t-1,i=this.length,a=0;a<i;a++){var r=this[a];if(!(n<r.part.top||e>r.part.top+r.part.height-1))return!1}return!0},i.push(e),this.lines.push(i),this.lines.length-1},i.events.push(e),i.min=e.part.top,i.max=e.part.top+e.part.height,this.blocks.push(i),this.blocks.length-1},t.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.isFree(e.part.top,e.part.height))return n.push(e),t}var i=[];return i.isFree=function(e,t){for(var n=e+t-1,i=this.length,a=0;a<i;a++){var r=this[a];if(!(n<r.part.top||e>r.part.top+r.part.height-1))return!1}return!0},i.push(e),this.lines.push(i),this.lines.length-1},t},this.Ma=function(){var e=[],t=this.startDate.getDatePart(),n=this.days;switch(this.viewType){case"Day":n=1;break;case"Week":n=7;var i=s.ea();t=t.firstDayOfWeek(i);break;case"WorkWeek":n=5,t=t.firstDayOfWeek(1)}for(var a=0;a<n;a++){var r=o.headerDateFormat?o.headerDateFormat:s.locale().datePattern,l={};l.start=t.addDays(a),l.name=l.start.toString(r,s.locale()),e.push(l)}return e},this.visibleStart=function(){if("Resources"===o.viewType){if(0===o.Ba.length)return DayPilot.Date.today();var e=o.Ba.map(function(e){return e.start.getTime()}),t=Math.min.apply(null,e);return new DayPilot.Date(t)}return this.Ba[0].start},this.visibleEnd=function(){if("Resources"===o.viewType){if(0===o.Ba.length)return DayPilot.Date.today().addDays(1);var e=o.Ba.map(function(e){return e.start.getTime()}),t=Math.max.apply(null,e);return new DayPilot.Date(t).addDays(1)}var n=this.Ba.length-1;return this.Ba[n].start.addDays(1)},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Z=function(){if(this.elements.events)for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];o.Oa(t)}this.elements.events=[]},this.Oa=function(e){!function(){var t=e.domArgs;if(e.domArgs=null,t&&"function"==typeof o.onBeforeEventDomRemove&&o.onBeforeEventDomRemove(t),t&&"function"==typeof o.onBeforeEventDomAdd){var i=t&&t.Pa;if(i){o.Ra.Qa&&n(t.element)&&(o.Ra.Sa=!0,o.Ra.Ta(i),o.Ra.Sa=!1)}}}();var t=e.event;if(t&&(t.calendar=null),e.onclick=null,e.onclickSave=null,e.onmouseover=null,e.onmouseout=null,e.onmousemove=null,e.onmousedown=null,e.firstChild&&e.firstChild.firstChild&&e.firstChild.firstChild.tagName&&"IMG"===e.firstChild.firstChild.tagName.toUpperCase()){var i=e.firstChild.firstChild;i.onmousedown=null,i.onmousemove=null,i.onclick=null}e.helper=null,e.data=null,e.event=null,DayPilot.de(e)},this.Ua=function(e){var i=e.cache||e.data,a=this.nav.events,r=i.borderRadius||o.eventBorderRadius;"number"==typeof r&&(r+="px");var s=document.createElement("div");s.style.position="absolute",s.style.left=e.part.left+"%",s.style.top=e.part.top+"px",s.style.width=e.part.width+"%",s.style.height=Math.max(e.part.height,2)+"px",s.style.overflow="hidden",s.data=e,s.event=e,s.unselectable="on",s.style.MozUserSelect="none",s.style.KhtmlUserSelect="none",s.className=this.L("_event"),i.cssClass&&DayPilot.Util.addClass(s,i.cssClass),o.showToolTip&&e.client.toolTip()&&(s.title=e.client.toolTip()),s.isFirst=e.part.start.getTime()===e.start().getTime(),s.isLast=e.part.end.getTime()===e.end().getTime(),s.onclick=this.va,DayPilot.re(s,"contextmenu",this.xa),s.onmouseout=function(){s.deleteIcon&&(s.deleteIcon.style.display="none")},s.onmousemove=function(n){var i=5;if("undefined"!=typeof t){var a=DayPilot.mo3(s,n);if(a&&!t.resizing&&!t.moving){s.deleteIcon&&(s.deleteIcon.style.display="");var r=this.isLast;a.y<=i&&e.client.resizeEnabled()?(this.style.cursor="n-resize",this.dpBorder="top"):this.offsetHeight-a.y<=i&&e.client.resizeEnabled()?r?(this.style.cursor="s-resize",this.dpBorder="bottom"):this.style.cursor="not-allowed":t.resizing||t.moving||("Disabled"!==o.eventClickHandling?this.style.cursor="pointer":this.style.cursor="default")}}},s.onmousedown=function(n){var i=n.which||n.button;if("n-resize"!==this.style.cursor&&"s-resize"!==this.style.cursor||1!==i){if(1===i&&e.client.moveEnabled()){t.moving=this,DayPilot.Global.moving=this,t.moving.event=this.event;var a=t.moving.helper={};a.oldColumn=o.Ba[this.data.part.dayIndex].id,t.originalMouse=DayPilot.mc(n),t.originalTop=this.offsetTop;var r=DayPilot.mo3(this,n);r?t.moveOffsetY=r.y:t.moveOffsetY=0,o.nav.top.style.cursor="move"}}else t.resizing=this,DayPilot.Global.resizing=this,t.originalMouse=DayPilot.mc(n),t.originalHeight=this.offsetHeight,t.originalTop=this.offsetTop,o.nav.top.style.cursor=this.style.cursor;return!1};var l=document.createElement("div");if(l.setAttribute("unselectable","on"),l.className=o.L("_event_inner"),"darker"===i.borderColor&&i.backColor?l.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):l.style.borderColor=i.borderColor,i.backColor&&(l.style.background=i.backColor),i.fontColor&&(l.style.color=i.fontColor),r&&(s.style.borderRadius=r,l.style.borderRadius=r),s.appendChild(l),e.client.barVisible()){var d=e.part.height-2,c=100*e.part.barTop/d,u=Math.ceil(100*e.part.barHeight/d),h=document.createElement("div");h.setAttribute("unselectable","on"),h.className=this.L("_event_bar"),h.style.position="absolute",i.barBackColor&&(h.style.backgroundColor=i.barBackColor);var f=document.createElement("div");f.setAttribute("unselectable","on"),f.className=this.L("_event_bar_inner"),f.style.top=c+"%",0<u&&u<=1?f.style.height="1px":f.style.height=u+"%",i.barColor&&(f.style.backgroundColor=i.barColor),h.appendChild(f),s.appendChild(h)}if(e.client.deleteEnabled()){var v=document.createElement("div");v.style.position="absolute",v.style.right="2px",v.style.top="2px",v.style.width="17px",v.style.height="17px",v.className=o.L("_event_delete"),v.onmousedown=function(e){e.stopPropagation()},v.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&o.ya(t)},v.style.display="none",s.deleteIcon=v,s.appendChild(v)}var p=i.areas?DayPilot.Areas.copy(i.areas):[];if(DayPilot.Areas.attach(s,e,{"areas":p}),"function"==typeof o.onAfterEventRender){var m={};m.e=s.event,m.div=s,o.onAfterEventRender(m)}if(function(){var t={};if(t.control=o,t.e=e,t.element=null,s.domArgs=t,"function"==typeof o.onBeforeEventDomAdd&&o.onBeforeEventDomAdd(t),t.element){var i=l;if(i){t.Pa=i;if(n(t.element)){if(!o.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");o.Ra.Sa=!0,o.Ra.Va(t.element,i),o.Ra.Sa=!1}else i.appendChild(t.element)}}else l.innerHTML=e.client.innerHTML()}(),a.rows[0].cells[e.part.dayIndex]){a.rows[0].cells[e.part.dayIndex].firstChild.appendChild(s)}o.elements.events.push(s)},this.na=function(){for(var e=0;e<this.Ba.length;e++){var t=this.Ba[e];if(t.blocks)for(var n=0;n<t.blocks.length;n++)for(var i=t.blocks[n],a=0;a<i.lines.length;a++)for(var r=i.lines[a],o=0;o<r.length;o++){var s=r[o];s.part.width=100/i.lines.length,s.part.left=s.part.width*a;var l=a===i.lines.length-1;l||(s.part.width=1.5*s.part.width),this.Ua(s)}}},this.Wa=function(){var e=this.nav.top;e.innerHTML="",DayPilot.Util.addClass(e,this.L("_main")),e.style.MozUserSelect="none",e.style.KhtmlUserSelect="none",e.style.position="relative",e.style.width=this.width?this.width:"100%",this.hideUntilInit&&(e.style.visibility="hidden"),this.visible||(e.style.display="none"),this.rtl&&(e.style.direction="rtl"),this.nav.scroll=document.createElement("div"),this.nav.scroll.style.height=this.Xa()+"px","BusinessHours"===this.heightSpec?this.nav.scroll.style.overflow="auto":this.nav.scroll.style.overflow="hidden",this.nav.scroll.style.position="relative";var t=this.Ya();this.nav.top.appendChild(t),this.nav.scroll.style.zoom=1;var n=this.Za();this.nav.scrollable=n.firstChild,this.nav.scroll.appendChild(n),e.appendChild(this.nav.scroll),this.nav.scrollLayer=document.createElement("div"),this.nav.scrollLayer.style.position="absolute",this.nav.scrollLayer.style.top="0px",this.nav.scrollLayer.style.left="0px",e.appendChild(this.nav.scrollLayer),this.nav.loading=document.createElement("div"),this.nav.loading.style.position="absolute",this.nav.loading.style.top="0px",this.nav.loading.style.left=this.hourWidth+5+"px",this.nav.loading.innerHTML=o.$a(o.loadingLabelText,o.loadingLabelHtml),this.nav.loading.style.display="none",e.appendChild(this.nav.loading)},this.la=function(){this.fasterDispose||DayPilot.pu(this.nav.hourTable),this.nav.scrollable.rows[0].cells[0].innerHTML="",this.nav.hourTable=this._a(),this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable)},this.Za=function(){var e=document.createElement("div");e.style.zoom=1,e.style.position="relative";var t=document.createElement("table");t.cellSpacing="0",t.cellPadding="0",t.border="0",t.style.border="0px none",t.style.width="100%",t.style.position="absolute";var n,i=t.insertRow(-1);n=i.insertCell(-1),n.valign="top",n.style.padding="0px",n.style.border="0px none",this.nav.hourTable=this._a(),n.appendChild(this.nav.hourTable),n=i.insertCell(-1),n.valign="top",n.width="100%",n.style.padding="0px",n.style.border="0px none";var a=document.createElement("div");return a.style.position="relative",n.appendChild(a),a.appendChild(this.ab()),a.appendChild(this.bb()),e.appendChild(t),this.nav.zoom=e,e},this.ab=function(){var e=document.createElement("table");return e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.main=e,this.nav.events=e,e},this.bb=function(){var e=document.createElement("table");e.style.top="0px",e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.position="absolute",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.events=e;for(var t=this.Ba,n=t.length,i=e.insertRow(-1),a=0;a<n;a++){var r=i.insertCell(-1);r.style.padding="0px",r.style.border="0px none",r.style.height="0px",r.style.overflow="visible",o.rtl||(r.style.textAlign="left");var s=document.createElement("div");s.style.marginRight=o.columnMarginRight+"px",s.style.marginLeft=o.columnMarginLeft+"px",s.style.position="relative",s.style.height="1px",s.style.marginTop="-1px";var l=document.createElement("div");r.selection=l,r.appendChild(s),r.appendChild(l)}return e},this._a=function(){var e=document.createElement("table");e.cellSpacing="0",e.cellPadding="0",e.border="0",e.style.border="0px none",e.style.width=this.hourWidth+"px",e.oncontextmenu=function(){return!1};for(var t=o.oa(),n=0;n<t;n++)this.cb(e,n);return e},this.cb=function(e,t){var n=60*o.cellHeight/s.fa(),i=e.insertRow(-1);i.style.height=n+"px";var a=i.insertCell(-1);a.valign="bottom",a.unselectable="on",a.style.cursor="default",a.style.padding="0px",a.style.border="0px none";var r=document.createElement("div");r.style.position="relative",r.className=this.L("_rowheader"),r.style.width=this.hourWidth+"px",r.style.height=n+"px",r.style.overflow="hidden",r.unselectable="on";var l=document.createElement("div");l.className=this.L("_rowheader_inner"),l.unselectable="on";var d=document.createElement("div");d.unselectable="on";var c=this.startDate.addHours(t).addHours(o.sa()),u=c.getHours(),h=u<12,f=s.timeFormat();"Clock12Hours"===f&&(u%=12,0===u&&(u=12)),d.innerHTML=u;var v=document.createElement("span");v.unselectable="on",v.className=this.L("_rowheader_minutes");var p;p="Clock12Hours"===f?h?"AM":"PM":"00",v.innerHTML=p,d.appendChild(v),l.appendChild(d),r.appendChild(l),a.appendChild(r)},this.Xa=function(){var e=s.fa(),t=60/e;switch(this.heightSpec){case"Full":return 24*t*this.cellHeight;case"BusinessHours":var n=this.qa();return n*this.cellHeight*t;case"BusinessHoursNoScroll":var n=this.qa();return n*this.cellHeight*t;default:throw"DayPilot.Calendar: Unexpected 'heightSpec' value."}},this.db=function(){var e=o.nav.corner?o.nav.corner.parentNode:null;if(e){e.innerHTML="";var t=this.eb();e.appendChild(t),o.nav.corner=t}},this.Ya=function(){var e=document.createElement("div");e.style.overflow="auto";var t=document.createElement("table");t.cellPadding="0",t.cellSpacing="0",t.border="0",t.style.width="100%",t.style.borderCollapse="separate",t.style.border="0px none";var n=t.insertRow(-1),i=n.insertCell(-1);i.style.padding="0px",i.style.border="0px none";var a=this.eb();i.appendChild(a),this.nav.corner=a,i=n.insertCell(-1),i.style.width="100%",i.valign="top",i.style.position="relative",i.style.padding="0px",i.style.border="0px none",this.nav.header=document.createElement("table"),this.nav.header.cellPadding="0",this.nav.header.cellSpacing="0",this.nav.header.border="0",this.nav.header.width="100%",this.nav.header.style.tableLayout="fixed",this.nav.header.oncontextmenu=function(){return!1};var r="hidden"!==this.nav.scroll.style.overflow;if(i.appendChild(this.nav.header),r){i=n.insertCell(-1),i.unselectable="on";var o=document.createElement("div");o.unselectable="on",o.style.position="relative",o.style.width="16px",o.style.height=this.headerHeight+"px",o.className=this.L("_cornerright");var s=document.createElement("div");s.className=this.L("_cornerright_inner"),o.appendChild(s),i.appendChild(o),this.nav.cornerRight=o}return e.appendChild(t),e},this.eb=function(){var e=document.createElement("div");e.style.position="relative",e.className=this.L("_corner"),e.style.width=this.hourWidth+"px",e.style.height=this.headerHeight+"px",e.oncontextmenu=function(){return!1};var t=document.createElement("div");return t.unselectable="on",t.className=this.L("_corner_inner"),e.appendChild(t),e},this._=function(){var e=this.nav.main;e.root=null,e.onmouseup=null;for(var t=0;t<e.rows.length;t++)for(var n=e.rows[t],i=0;i<n.cells.length;i++){var a=n.cells[i];o.fb(a)}this.fasterDispose||DayPilot.pu(e)},this.fb=function(e){e&&(!function(){var t=e,i=t.domArgs;if(t.domArgs=null,i&&"function"==typeof o.onBeforeCellDomRemove&&o.onBeforeCellDomRemove(i),i&&"function"==typeof o.onBeforeCellDomAdd){var a=i&&i.Pa;if(a){o.Ra.Qa&&n(i.element)&&(o.Ra.Sa=!0,o.Ra.Ta(a),o.Ra.Sa=!1)}}}(),e.root=null,e.onmousedown=null,e.onmousemove=null,e.onmouseout=null,e.onmouseup=null)},this.ka=function(){var e=s.fa(),i=this.nav.main,a=60*e*1e3,r=this.ra(),l=o.Ba;for(i&&this._();i&&i.rows&&i.rows.length>0;)this.fasterDispose||DayPilot.pu(i.rows[0]),i.deleteRow(0);this.tableCreated=!0;for(var d=this.nav.events;d&&d.rows&&d.rows.length>0;)this.fasterDispose||DayPilot.pu(d.rows[0]),d.deleteRow(0);for(var c=l.length,u=d.insertRow(-1),h=0;h<c;h++){var f=u.insertCell(-1);f.style.padding="0px",f.style.border="0px none",f.style.height="0px",f.style.overflow="visible",o.rtl||(f.style.textAlign="left");var v=document.createElement("div");v.style.marginRight=o.columnMarginRight+"px",v.style.marginLeft=o.columnMarginLeft+"px",v.style.position="relative",v.style.height="1px",v.style.marginTop="-1px";var p=document.createElement("div");p.style.position="relative",f.selection=p,f.appendChild(v),f.appendChild(p)}for(var m=0;m<r;m++){var g=i.insertRow(-1);g.style.MozUserSelect="none",g.style.KhtmlUserSelect="none";for(var y=function(e){var t=b.Ba[e],i=g.insertCell(-1);i.start=t.start.addTime(m*a),i.end=i.start.addTime(a),i.resource=t.id,i.onmousedown=b.Ca,i.onmouseup=function(){return!1},i.onclick=function(){return!1},i.root=b,i.style.padding="0px",i.style.border="0px none",i.style.verticalAlign="top",i.style.height=o.cellHeight+"px",i.style.overflow="hidden",i.unselectable="on";var r=document.createElement("div");r.unselectable="on",r.style.height=o.cellHeight+"px",r.style.position="relative",r.className=b.L("_cell");var s=b.gb(i.start,i.end),l={"business":s,"text":null,"html":null,"cssClass":null,"backColor":null,"backImage":null,"backRepeat":null,"fontColor":null},d={"start":i.start,"end":i.end,"resource":i.resource,"properties":l,"x":e,"y":m};!function(){if("function"==typeof o.onBeforeCellRender){var e={};e.cell=d,o.onBeforeCellRender(e)}}(),l.business&&DayPilot.Util.addClass(r,o.L("_cell_business")),l.cssClass&&DayPilot.Util.addClass(r,l.cssClass);var c=document.createElement("div");c.setAttribute("unselectable","on"),c.className=b.L("_cell_inner");var u=DayPilot.Util.escapeTextHtml(l.text,l.html);u&&(c.innerHTML=u),l.backColor&&(c.style.backgroundColor=l.backColor),l.backImage&&(c.style.backgroundImage="url("+l.backImage+")"),l.backRepeat&&(c.style.backgroundRepeat=l.backRepeat),l.fontColor&&(c.style.color=l.fontColor),r.appendChild(c),function(){if("function"==typeof o.onBeforeCellDomAdd||"function"==typeof o.onBeforeCellDomRemove){var e={};if(e.control=o,e.cell=d,e.element=null,i.domArgs=e,"function"==typeof o.onBeforeCellDomAdd&&o.onBeforeCellDomAdd(e),e.element){var t=c;if(t){e.Pa=t;if(n(e.element)){if(!o.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");o.Ra.Sa=!0,o.Ra.Va(e.element,t),o.Ra.Sa=!1}else t.appendChild(e.element)}}}}(),i.appendChild(r)},b=this,h=0;h<c;h++)y(h)}i.root=this,o.nav.scrollable.onmousemove=function(e){var n=o.nav.scrollable;o.coords=DayPilot.mo3(n,e);var i=DayPilot.mc(e);if(t.resizing){t.resizingShadow||(t.resizingShadow=o.ca(t.resizing,!1,o.shadow));var a=o.cellHeight,r=0,s=i.y-t.originalMouse.y;if("bottom"===t.resizing.dpBorder){var l=t.originalHeight+s;o.snapToGrid&&(l=Math.floor((t.originalHeight+t.originalTop+s+a/2)/a)*a-t.originalTop+r),l<a&&(l=a);var d=o.nav.main.clientHeight;t.originalTop+l>d&&(l=d-t.originalTop),t.resizingShadow.style.height=l+"px"}else if("top"===t.resizing.dpBorder){var c=t.originalTop+s;o.snapToGrid&&(c=Math.floor((t.originalTop+s-r+a/2)/a)*a+r),c<r&&(c=r),c>t.originalTop+t.originalHeight-a&&(c=t.originalTop+t.originalHeight-a);var l=t.originalHeight-(c-t.originalTop);l<a?l=a:t.resizingShadow.style.top=c+"px",t.resizingShadow.style.height=l+"px"}}else if(t.moving){if(!o.coords)return;if(!t.movingShadow){var u=3,h=DayPilot.mc(e),f=Math.abs(h.x-t.originalMouse.x)+Math.abs(h.y-t.originalMouse.y);if(f<=u)return;t.movingShadow=o.ca(t.moving,!0,o.shadow),t.movingShadow.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"}var a=o.cellHeight,r=0,v=t.moveOffsetY;v||(v=a/2);var c=o.coords.y-v;o.snapToGrid&&(c=Math.floor((o.coords.y-v-r+a/2)/a)*a+r),c<r&&(c=r);var p=o.nav.events,d=o.nav.main.clientHeight+r,m=parseInt(t.movingShadow.style.height);c+m>d&&(c=d-m),DayPilot.Util.addClass(t.moving,o.L("_event_moving_source")),t.movingShadow.parentNode.style.display="none",t.movingShadow.style.top=c+"px",t.movingShadow.parentNode.style.display="";var g=p.clientWidth/p.rows[0].cells.length,y=Math.floor((o.coords.x-o.hourWidth)/g);o.rtl&&(y=o.Ba.length-y-1),y<0&&(y=0),y<p.rows[0].cells.length&&y>=0&&t.movingShadow.column!==y&&(t.movingShadow.column=y,t.moveShadow(p.rows[0].cells[y]))}else DayPilot.Global.selecting&&(o.Fa(),o.Ga())},o.nav.scrollable.style.display=""},this.gb=function(e){return this.businessBeginsHour<this.businessEndsHour?!(e.getHours()<this.businessBeginsHour||e.getHours()>=this.businessEndsHour||6===e.getDayOfWeek()||0===e.getDayOfWeek()):e.getHours()>=this.businessBeginsHour||e.getHours()<this.businessEndsHour},this.aa=function(){var e=this.nav.header;if(e&&e.rows)for(var t=0;t<e.rows.length;t++)for(var n=e.rows[t],i=0;i<n.cells.length;i++){var a=n.cells[i];a.onclick=null,a.onmousemove=null,a.onmouseout=null}this.fasterDispose||DayPilot.pu(e)},this.hb=function(e){function t(t){var a=i[t],r=e?n.insertCell(-1):n.cells[t];r.data=a,r.style.overflow="hidden",r.style.padding="0px",r.style.border="0px none",r.style.height=o.headerHeight+"px",r.onclick=o.ib;var s,l=e?document.createElement("div"):r.firstChild;e?(l.unselectable="on",l.style.MozUserSelect="none",l.style.cursor="default",l.style.position="relative",l.className=o.L("_colheader"),l.style.height=o.headerHeight+"px",o.headerTextWrappingEnabled||(l.style.whiteSpace="nowrap"),s=document.createElement("div"),s.className=o.L("_colheader_inner"),s.unselectable="on",l.appendChild(s),r.appendChild(l)):s=l.firstChild;var d={};d.header={},d.header.cssClass=null,d.header.verticalAlignment="center",d.header.horizontalAlignment="center",d.column=o.jb(a,o),"function"==typeof o.onBeforeHeaderRender&&(DayPilot.Util.copyProps(a,d.header,["id","start","name","html","backColor","toolTip","areas"]),o.onBeforeHeaderRender(d),DayPilot.Util.copyProps(d.header,a,["html","backColor","toolTip","areas","cssClass","verticalAlignment","horizontalAlignment"])),a.toolTip&&(s.title=a.toolTip),a.cssClass&&DayPilot.Util.addClass(l,a.cssClass),a.backColor&&(s.style.background=a.backColor),a.areas&&DayPilot.Areas.attach(l,a);var c=a.verticalAlignment;if(c)switch(s.style.display="flex",c){case"center":s.style.alignItems="center";break;case"top":s.style.alignItems="flex-start";break;case"bottom":s.style.alignItems="flex-end"}var u=a.horizontalAlignment;if(u)switch(u){case"center":s.style.justifyContent="center";break;case"left":s.style.justifyContent="flex-start";break;case"right":s.style.justifyContent="flex-end"}l.firstChild.innerHTML=o.$a(a.name,a.html)}for(var n=e?this.nav.header.insertRow(-1):this.nav.header.rows[0],i=this.Ba,a=i.length,r=0;r<a;r++)t(r)},this.ib=function(e){if("Disabled"!==o.headerClickHandling){var t=this.data,n=o.jb(t),i={};i.header={},i.header.id=t.id,i.header.name=t.name,i.header.start=t.start,i.column=n,i.originalEvent=e,i.shift=e.shiftKey,i.ctrl=e.ctrlKey,i.meta=e.metaKey,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onHeaderClick&&(o.onHeaderClick(i),i.preventDefault.value)||"function"==typeof o.onHeaderClicked&&o.onHeaderClicked(i)}},this.jb=function(e){return new DayPilot.CalendarColumn(e,o)},this.kb=function(){return this.width&&this.width.indexOf("px")!==-1?"Pixel":"Percentage"},this.ja=function(){for(var e=this.nav.header,t=!0;this.headerCreated&&e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.headerCreated=!0;this.hb(t)},this.loadingStart=function(){this.loadingLabelVisible&&(this.nav.loading.innerHTML=this.loadingLabelText,this.nav.loading.style.top=this.headerHeight+5+"px",this.nav.loading.style.display="")},this.commandCallBack=function(e,t){var n={};n.command=e,this.V("Command",t,n)},this.loadingStop=function(){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.nav.loading.style.display="none"},this.lb=function(){var e=this.nav.scroll;e.root=this,o.mb(),e.onscroll||(e.onscroll=function(){o.nb()})},this.callbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.ob=function(){var e=DayPilot.sw(this.nav.scroll),t=this.nav.cornerRight;t&&(t.style.width=e+"px")},this.pb=function(){t.globalHandlers||(t.globalHandlers=!0,DayPilot.re(document,"mouseup",t.gMouseUp))},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";
|
|
13
|
+
t=e}o.events.list||(o.events.list=[]),o.events.list.push(t),o.qb({"eventsOnly":!0}),o.wa.notify()},this.events.find=function(e){if(!o.events.list)return null;if("function"==typeof e){for(var t=e,n=0;n<o.events.list.length;n++){var i=new DayPilot.Event(o.events.list[n],o);if(t(i))return i}return null}for(var n=0;n<o.events.list.length;n++){var a=o.events.list[n];if(a.id===e)return new DayPilot.Event(a,o)}return null},this.events.forRange=function(e,t){return e=new DayPilot.Date(e),t=new DayPilot.Date(t),(o.events.list||[]).filter(function(n){return i(e,t,new DayPilot.Date(n.start),new DayPilot.Date(n.end))}).map(function(e){return new DayPilot.Event(e,o)})},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=o.events.find(e.id);if(t){var n=DayPilot.indexOf(o.events.list,t.data);o.events.list.splice(n,1,e)}}o.qb({"eventsOnly":!0}),o.wa.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var n=o.events.find(e.id);n&&(t=n.data)}else if("string"==typeof e||"number"==typeof e){var n=o.events.find(e);n&&(t=n.data)}var i=DayPilot.indexOf(o.events.list,t);o.events.list.splice(i,1),o.qb({"eventsOnly":!0}),o.wa.notify()},this.events.load=function(e,t,n){var i=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},a=function(e){var n,a=e.request;try{n=JSON.parse(a.responseText)}catch(e){var r={};return r.exception=e,void i(r)}if(DayPilot.isArray(n)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=n,"function"==typeof t&&t(s),s.preventDefault.value)return;o.events.list=n,o.La&&o.qb({"eventsOnly":!0})}};if(o.eventsLoadMethod&&"POST"===o.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":o.visibleStart().toString(),"end":o.visibleEnd().toString()},"url":e,"success":a,"error":i});else{var r=e,s="start="+o.visibleStart().toString()+"&end="+o.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":r,"success":a,"error":i})}},this.rb=function(){var e=o.L("_main");if(o.cssClass&&(e+=" "+o.cssClass),o.rtl&&(e+=" "+o.L("_direction_rtl")),o.nav.top.className!==e){o.nav.top.className=e;var t=o.nav.corner;t.className=o.L("_corner"),t.firstChild.className=o.L("_corner_inner");var n=o.nav.cornerRight;n&&(n.className=o.L("_cornerright"),n.firstChild.className=o.L("_cornerright_inner"))}},this.update=function(e){if(o.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Calendar instance that has been disposed.");o.sb(e),o.qb()},this.qb=function(e){if(this.La){e=e||{};var t=!e.eventsOnly;o.tb(),o.Z(),o.nav.top.style.cursor="auto",t&&(o.ga(),o.ja(),o.ka(),o.la(),o.ma(),o.db(),o.ob(),o.rb(),o.mb()),o.ha(),o.ia(),o.na(),o.clearSelection(),this.visible?this.show():this.hide()}},this.ub=null,this.sb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?o.events.list=e.list:o.events.list=e}},"columns":{"preInit":function(){o.columns.list=this.data}}};this.ub=t;for(var n in e)if(t[n]){var i=t[n];i.data=e[n],i.preInit&&i.preInit()}else o[n]=e[n]}},this.vb=function(){var e=this.ub;for(var t in e){var n=e[t];n.postInit&&n.postInit()}},this.wb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Calendar() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Calendar: The placeholder element not found: '"+e+"'."}},this.xb={},this.xb.events=[],this.yb=function(e){var t=this.xb.events,n=this.events.list[e],i={};for(var a in n)i[a]=n[a];if(i.start=new DayPilot.Date(n.start),i.end=new DayPilot.Date(n.end),"function"==typeof this.onBeforeEventRender){var r={};r.control=o,r.data=i,this.onBeforeEventRender(r)}t[e]=i},this.ha=function(){var e=this.events.list;if(o.xb.events=[],e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: "+typeof e);var t=e.length,n=864e5;this.cache.pixels={};var i=[];this.scrollLabels=[],this.minStart=1e4,this.maxEnd=0;for(var a=0;a<t;a++){var r=e[a],s=r;if("object"!=typeof s)throw new DayPilot.Exception("Event data item must be an object");if(!s.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!s.end)throw new DayPilot.Exception("Event data item must specify 'end' property");if(s instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.")}if("function"==typeof this.onBeforeEventRender)for(var a=0;a<t;a++)this.yb(a);for(var a=0;a<this.Ba.length;a++){var l={};l.minEnd=1e6,l.maxStart=-1,this.scrollLabels.push(l);var d=this.Ba[a];d.events=[],d.lines=[],d.blocks=[];for(var c=new DayPilot.Date(d.start),u=c.getTime(),h=c.addTime(n),f=h.getTime(),v=0;v<t;v++)if(!i[v]){var r=e[v],p=new DayPilot.Date(r.start),m=new DayPilot.Date(r.end),g=p.getTime(),y=m.getTime();if(!(y<g)){var b=!(y<=u||g>=f);if("Resources"===o.viewType&&(b=b&&d.id===r.resource),b){var w=new DayPilot.Event(r,o);w.part.dayIndex=a,w.part.start=u<g?p:c,w.part.end=f>y?m:h;var x=this.getPixels(w.part.start,d.start),_=this.getPixels(w.part.end,d.start),C=x.top,k=_.top;if(C===k&&(x.cut||_.cut))continue;var D=_.boxBottom,S="Always"===o.useEventBoxes;S?(w.part.top=Math.floor(C/this.cellHeight)*this.cellHeight+1,w.part.height=Math.max(Math.ceil(D/this.cellHeight)*this.cellHeight-w.part.top,this.cellHeight-1)+1):(w.part.top=C+1,w.part.height=k-C),w.part.barTop=Math.max(C-w.part.top-1,0),w.part.barHeight=Math.max(k-C-2,1);var M=w.part.top,T=w.part.top+w.part.height;M>l.maxStart&&(l.maxStart=M),T<l.minEnd&&(l.minEnd=T),M<this.minStart&&(this.minStart=M),T>this.maxEnd&&(this.maxEnd=T),d.events.push(w),"function"==typeof this.onBeforeEventRender&&(w.cache=this.xb.events[v]),w.part.start.getTime()===g&&w.part.end.getTime()===y&&(i[v]=!0)}}}}for(var a=0;a<this.Ba.length;a++){var d=this.Ba[a];d.events.sort(this.zb);for(var v=0;v<d.events.length;v++){var r=d.events[v];d.putIntoBlock(r)}for(var v=0;v<d.blocks.length;v++){var A=d.blocks[v];A.events.sort(this.zb);for(var E=0;E<A.events.length;E++){var r=A.events[E];A.putIntoLine(r)}}}}},this.zb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var n=e.start().getTime()-t.start().getTime();return 0!==n?n:t.end().getTime()-e.end().getTime()},this.debug=function(e){this.debuggingEnabled&&(o.debugMessages||(o.debugMessages=[]),o.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.getPixels=function(e,t){t||(t=this.startDate);var n=t.getTime(),i=e.getTime(),a=s.fa(),r=this.cache.pixels[i+"_"+n];if(r)return r;n=t.getTime();var o=60*a*1e3,l=i-n,d=l%o,c=l-d,u=c+o;0===d&&(u=c);var h={};return h.cut=!1,h.top=this.Ab(l),h.boxTop=this.Ab(c),h.boxBottom=this.Ab(u),this.cache.pixels[i+"_"+n]=h,h},this.Ab=function(e){return Math.floor(this.cellHeight*e/(6e4*s.fa()))},this.tb=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart()},this.ia=function(){this.nav.corner&&(this.nav.corner.style.height=this.headerHeight+"px")},this.ma=function(){var e=this.Xa();this.nav.scroll&&e>0&&(this.nav.scroll.style.height=e+"px")},this.wa={},this.wa.scope=null,this.wa.notify=function(){o.wa.scope&&o.wa.scope["$apply"]()},this.wa.apply=function(e){e()},this.nb=function(){if(o.nav.scroll&&o.Bb()){var e=o.nav.scroll.scrollTop,t=s.fa(),n=60/t,i=e/(n*o.cellHeight);o.Cb.scrollHour=i}},this.mb=function(){var e=0,t=60/s.fa();e="number"==typeof o.Cb.scrollHour?t*o.cellHeight*o.Cb.scrollHour:"Auto"===o.initScrollPos?"BusinessHours"===this.heightSpec?t*this.cellHeight*this.businessBeginsHour:0:this.initScrollPos;var n=o.nav.top;"none"===n.style.display?(n.style.display="",o.nav.scroll.scrollTop=e,n.style.display="none"):o.nav.scroll.scrollTop=e},this.getScrollY=function(){return o.nav.scroll.scrollTop},this.setScrollY=function(e){o.nav.scroll.scrollTop=e,o.nb()},this.Db=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof o.events.list||!o.events.list)},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){o.visible=!0,o.nav.top.style.display="",this.ob()},this.hide=function(){o.visible=!1,o.nav.top.style.display="none"},this.Eb=function(){this.tb(),this.ga(),this.Wa(),this.ja(),this.ka(),this.ob(),this.lb(),this.pb(),t.register(this),this.Fb(),this.V("Init")},this.Cb={},this.Gb=function(){this.Cb.themes=[],this.Cb.themes.push(this.theme||this.cssClassPrefix)},this.Hb=function(){for(var e=this.Cb.themes,t=0;t<e.length;t++){var n=e[t];DayPilot.Util.removeClass(this.nav.top,n+"_main")}this.Cb.themes=[]},this.Ib=function(){if(this.afterRender(null,!1),"function"==typeof this.onAfterRender){var e={};e.isCallBack=!1,this.onAfterRender(e)}},this.Jb=function(){if("function"==typeof this.onInit&&!this.Kb){this.Kb=!0;var e={};this.onInit(e)}},this.Bb=function(){var e=o.nav.top;return!!e&&(e.offsetWidth>0&&e.offsetHeight>0)},this.Fb=function(){var e=o.Bb;e()||(o.Y=setInterval(function(){e()&&(o.lb(),o.ob(),clearInterval(o.Y))},100))},this.$a=function(e,t){return o.R.da()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ra={},this.Ra.Qa=null,this.Ra.Lb=function(e,t,n){var i=o.Ra.Qa;if("function"==typeof i.createVNode&&"function"==typeof i.render){var a=i.createVNode(e,n);i.render(a,t)}},this.Ra.Va=function(e,t){var n=o.Ra.Qa;if("function"==typeof n.render){var i=e;DayPilot.isArray(e)&&(i=n.h("div",null,e)),n.render(i,t)}},this.Ra.Ta=function(e){var t=o.Ra.Qa;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=o.sb,this.internal.xssTextHtml=o.$a,this.internal.upd=function(e){o.update(e)},this.internal.enableVue=function(e){o.Ra.Qa=e},this.internal.vueRef=function(){return o.Ra.Qa},this.internal.vueRendering=function(){return o.Ra.Sa},this.init=function(){this.wb();var e=this.Db();return this.Gb(),e?void this.Eb():(this.tb(),this.ga(),this.ha(),this.Wa(),this.ja(),this.ka(),this.u(),this.ob(),this.lb(),this.pb(),t.register(this),this.events&&(this.ia(),this.na()),this.Ib(),this.Jb(),this.Fb(),this.La=!0,this)},this.Init=this.init,this.sb(a)},DayPilot.CalendarColumn=function(e,t){var n=this;n.id=e.id,n.name=e.name,n.data=e.data,n.start=new DayPilot.Date(e.start),n.calendar=t,n.toJSON=function(){var e={};return e.id=this.id,this.start&&(e.start=this.start.toString()),e.name=this.name,e}},DayPilot.Calendar=t.Calendar,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotCalendar=function(e){var t=null,n=this.each(function(){if(!this.daypilot){var n=new DayPilot.Calendar(this.id);this.daypilot=n;for(var i in e)n[i]=e[i];n.init(),t||(t=n)}});return 1===this.length?t:n}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotCalendar",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,n,i){var a=new DayPilot.Calendar(n[0]);a.wa.scope=t,a.init();var r=i["id"];r&&(t[r]=a);var o=i["publishAs"];if(o){(0,e(o).assign)(t,a)}for(var s in i)0===s.indexOf("on")&&!function(n){a[n]=function(a){var r=e(i[n]);t["$apply"](function(){r(t,{"args":a})})}}(s);var l=t["$watch"],d=i["config"]||i["daypilotConfig"],c=i["events"]||i["daypilotEvents"];l.call(t,d,function(e){for(var t in e)a[t]=e[t];a.update(),a.Jb()},!0),l.call(t,c,function(e){a.events.list=e,a.update()},!0)}}}])}()}}(DayPilot),function(DayPilot){"undefined"==typeof DayPilot.DatePicker&&(DayPilot.DatePicker=function(e){this.v="${v}";var t="navigator_"+(new Date).getTime(),n=this;this.onShow=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.prepare=function(){if(this.locale="en-us",this.target=null,this.targetAlignment="left",this.resetTarget=!0,this.pattern=this.R.locale().datePattern,this.theme="navigator_default",this.patterns=[],this.zIndex=null,this.showToday=!0,this.todayText="Today",this.weekStarts="Auto",e)for(var t in e)this[t]=e[t]},this.init=function(){this.date=new DayPilot.Date(this.date);var e=this.Mb();this.resetTarget&&!e?this.Nb(this.date):!this.resetTarget&&e&&(n.date=e);var t=this.D();return t&&t.addEventListener("input",function(){n.date=n.Mb(),n.date&&n.navigator.select(n.date,{dontNotify:!0})}),this},this.close=function(){document.removeEventListener("mousedown",n.close),document.removeEventListener("wheel",n.close),window.removeEventListener("resize",n.close),n.Bb&&(n.Bb=!1,n.navigator&&n.navigator.dispose(),n.div.innerHTML="",n.div&&n.div.parentNode===document.body&&document.body.removeChild(n.div))},this.Ob=function(e){this.date=new DayPilot.Date(e),this.Nb(this.date)},this.select=function(e){var t={};t.date=new DayPilot.Date(e),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.onTimeRangeSelect(t),t.preventDefault.value)||(this.Ob(e),"function"==typeof n.onTimeRangeSelected&&n.onTimeRangeSelected(t))},this.Mb=function(){var e=this.D();if(!e)return this.date;var t=null;if(t="INPUT"===e.tagName?e.value:e.innerText,!t)return null;for(var i=DayPilot.Date.parse(t,n.pattern),a=0;a<n.patterns.length;a++){if(i)return i;i=DayPilot.Date.parse(t,n.patterns[a])}return i},this.Nb=function(e){var t=this.D();if(t){var i=e.toString(n.pattern,n.locale);"INPUT"===t.tagName?t.value=i:t.innerHTML=i}},this.R={},this.R.locale=function(){return DayPilot.Locale.find(n.locale)},this.D=function(){var e=this.target;return e&&e.nodeType&&1===e.nodeType?e:document.getElementById(e)},Object.defineProperty(this,"visible",{get:function(){return n.Bb}}),this.show=function(){if(!this.Bb){document.addEventListener("mousedown",n.close),document.addEventListener("wheel",n.close),window.addEventListener("resize",n.close);var e=this.D(),i=new DayPilot.Navigator(t);i.api=2,i.cssOnly=!0,i.theme=n.theme,i.weekStarts="Auto",i.locale=n.locale,i.showToday=n.showToday,i.todayText=n.todayText,i.weekStarts=n.weekStarts,i.onTodayClick=function(e){i.onTimeRangeSelected({start:DayPilot.Date.today()}),e.preventDefault()},i.onTimeRangeSelected=function(e){n.date=e.start;var t=e.start.addTime(i.Pb),a=t.toString(n.pattern,n.locale),r={};r.start=t,r.date=t,r.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.onTimeRangeSelect(r),r.preventDefault.value)||(n.Nb(a),n.close(),"function"==typeof n.onTimeRangeSelected&&n.onTimeRangeSelected(r))},this.navigator=i;var a={x:0,y:0,w:0,h:0};e&&(a=DayPilot.abs(e));var r=a.h,o=n.targetAlignment,s=document.createElement("div");s.style.position="absolute","left"===o&&(s.style.left=a.x+"px"),s.style.top=a.y+r+"px",n.zIndex&&(s.style.zIndex=n.zIndex);var l=document.createElement("div");l.id=t,s.appendChild(l),s.addEventListener("mousedown",function(e){e.stopPropagation()}),document.body.appendChild(s),this.div=s;var d=n.Mb()||n.date;if(i.startDate=d,i.Pb=d.getTimePart(),i.selectionDay=d.getDatePart(),i.init(),"right"===o){var c=a.x+a.w-i.nav.top.offsetWidth;s.style.left=c+"px"}if(this.Bb=!0,this.onShow){var u={};this.onShow(u)}}},this.prepare(),this.init()})}(DayPilot),function(DayPilot){if("undefined"==typeof DayPilot.Menu||!DayPilot.Menu.def){var e=function(){},t={};t.mouse=null,t.menu=null,t.handlersRegistered=!1,t.hideTimeout=null,t.waitingSubmenu=null,DayPilot.Menu=function(n){var i=this,a=null;this.v="${v}",this.zIndex=120,this.cssClassPrefix="menu_default",this.cssOnly=!0,this.menuTitle=null,this.showMenuTitle=!1,this.hideOnMouseOut=!1,this.hideAfter=200,this.theme=null,this.onShow=null;var r=DayPilot.isArray(n)?null:n;if(this.Qb=function(){},n&&DayPilot.isArray(n)&&(this.items=n),this.toJSON=function(){return null},this.show=function(n,r){r=r||{};var o=null;if(n?"string"==typeof n.id||"number"==typeof n.id?o=n.id:"function"==typeof n.id?o=n.id():"function"==typeof n.value&&(o=n.value()):o=null,"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),r.submenu||t.menuClean(),this.Qb.submenu=null,null!==t.mouse){i.cssOnly||(i.cssOnly=!0);var s=null;n&&n.isRow&&n.$.row.task?(s=new DayPilot.Task(n.$.row.task,n.calendar),s.menuType="resource"):s=n&&n.isEvent&&n.data.task?new DayPilot.Task(n,n.calendar):n;var l=document.createElement("div");if("function"==typeof i.onShow){var d={};if(d.source=s,d.menu=i,d.div=l,d.preventDefault=function(){d.preventDefault.value=!0},i.onShow(d),d.preventDefault.value)return}if(l.style.position="absolute",l.style.top="0px",l.style.left="0px",l.style.display="none",l.style.overflow="hidden",l.style.zIndex=this.zIndex+1,l.className=this.Rb("main"),l.onclick=function(e){e.cancelBubble=!0,this.parentNode.removeChild(this)},this.hideOnMouseOut&&(l.onmousemove=function(){clearTimeout(t.hideTimeout)},l.onmouseleave=function(){i.delayedHide({"hideParent":!0})}),!this.items||0===this.items.length)throw"No menu items defined.";if(this.showMenuTitle){var c=document.createElement("div");c.innerHTML=this.menuTitle,c.className=this.Rb("title"),l.appendChild(c)}for(var u=0;u<this.items.length;u++){var h=this.items[u],f=document.createElement("div");if(DayPilot.Util.addClass(f,this.Rb("item")),h.items&&(DayPilot.Util.addClass(f,this.Rb("item_haschildren")),DayPilot.Util.addClass(l,this.Rb("withchildren"))),"undefined"!=typeof h&&!h.hidden){if("-"===h.text){var v=document.createElement("div");v.addEventListener("click",function(e){e.stopPropagation()}),f.appendChild(v)}else{var p=document.createElement("a");if(p.style.position="relative",p.style.display="block",h.cssClass&&DayPilot.Util.addClass(p,h.cssClass),h.disabled)DayPilot.Util.addClass(p,i.Rb("item_disabled"));else{if(h.onclick||h.onClick){p.item=h,p.onclick=function(e,t){return function(n){if("function"==typeof e.onClick){var i={};if(i.item=e,i.source=t.source,i.originalEvent=n,i.preventDefault=function(){i.preventDefault.value=!0},e.onClick(i),i.preventDefault.value)return void n.stopPropagation()}e.onclick&&e.onclick.call(t,n)}}(h,p);var m=function(e,t){return function(e){e.stopPropagation(),e.preventDefault(),t.source.calendar&&t.source.calendar.internal.touch&&(t.source.calendar.internal.touch.active=!0)}},g=function(e,n){return function(i){i.stopPropagation(),i.preventDefault();var a=function(){window.setTimeout(function(){n.source.calendar&&n.source.calendar.internal.touch&&(n.source.calendar.internal.touch.active=!1)},500)};if("function"==typeof e.onClick){var r={};if(r.item=e,r.source=n.source,r.originalEvent=i,r.preventDefault=function(){r.preventDefault.value=!0},e.onClick(r),r.preventDefault.value)return void a()}e.onclick&&e.onclick.call(n,i),t.menuClean(),a()}};DayPilot.reNonPassive(p,"touchstart",m(h,p)),DayPilot.reNonPassive(p,"touchend",g(h,p))}if(h.items&&!h.disabled){var y=function(e,t){return function(n){n.preventDefault(),n.stopPropagation(),i.Sb(e,t)}};p.ontouchend=y(h,p)}if(h.onclick)e();else if(h.href)p.href=h.href.replace(/\x7B0\x7D/gim,o),h.target&&p.setAttribute("target",h.target);else if(h.command){var y=function(e,t){return function(n){var i=t.source,a=e;a.action=a.action?a.action:"CallBack";var r=i.calendar||i.root;if(n.preventDefault(),i instanceof DayPilot.Link)r.internal.linkMenuClick(a.command,i,a.action);else if(i instanceof DayPilot.Selection)r.internal.timeRangeMenuClick(a.command,i,a.action);else if(i instanceof DayPilot.Event)r.internal.eventMenuClick(a.command,i,a.action);else if(i instanceof DayPilot.Task)"resource"===i.menuType?r.internal.resourceHeaderMenuClick(a.command,t.menuSource,a.action):r.internal.eventMenuClick(a.command,t.menuSource,a.action);else switch(i.menuType){case"resource":r.internal.resourceHeaderMenuClick(a.command,i,a.action);break;case"selection":r.internal.timeRangeMenuClick(a.command,i,a.action);break;default:r.internal.eventMenuClick(a.command,i,a.action)}}};p.onclick=y(h,p),p.ontouchend=y(h,p)}}h.items&&p.addEventListener("click",function(e){e.stopPropagation()}),p.source=s,p.menuSource=n;var b=document.createElement("span");if(b.className=i.Rb("item_text"),b.innerHTML=DayPilot.Util.escapeTextHtml(h.text,h.html),p.appendChild(b),h.image){var w=document.createElement("img");w.src=h.image,w.style.position="absolute",w.style.top="0px",w.style.left="0px",p.appendChild(w)}if(h.icon){var x=document.createElement("span");x.className=i.Rb("item_icon");var _=document.createElement("i");_.className=h.icon,x.appendChild(_),p.appendChild(x)}if(h.symbol){var C="http://www.w3.org/2000/svg",k=document.createElementNS(C,"svg");k.setAttribute("width","100%"),k.setAttribute("height","100%");var D=document.createElementNS(C,"use");D.setAttribute("href",h.symbol),k.appendChild(D);var S=document.createElement("span");S.className=i.Rb("item_symbol"),S.style.position="absolute",S.style.top="0px",S.style.left="0px",S.appendChild(k),p.appendChild(S)}var M=function(e,n){return function(){var a=e,r=t.waitingSubmenu;if(r){if(r.parent===a)return;clearTimeout(r.timeout),t.waitingSubmenu=null}e.disabled||(t.waitingSubmenu={},t.waitingSubmenu.parent=a,t.waitingSubmenu.timeout=setTimeout(function(){t.waitingSubmenu=null,i.Sb(a,n)},300))}};p.onmouseover=M(h,p),f.appendChild(p)}l.appendChild(f)}}var T=function(){window.setTimeout(function(){t.menuClean(),DayPilot.MenuBar.deactivate()},100)};l.onclick=T,l.ontouchend=T,l.onmousedown=function(e){e.stopPropagation()},l.oncontextmenu=function(){return!1},document.body.appendChild(l),i.Qb.visible=!0,i.Qb.source=n,l.style.display="";var A=l.offsetHeight,E=l.offsetWidth;l.style.display="none";var H=document.documentElement.clientHeight,R=window.innerWidth,N="number"==typeof r.windowMargin?r.windowMargin:5;if(function(){var e=r.initiator;if(e){var t=e.div,n=e.e,i=e.area,o=i.visibility||i.v||"Visible",s=e.a;if("Visible"!==o&&(s=DayPilot.Areas.createArea(t,n,i),t.appendChild(s),a=s),s){var l=DayPilot.abs(s);r.x=l.x,r.y=l.y+l.h+2}}}(),function(){var e="number"==typeof r.x?r.x:t.mouse.x+1,n="number"==typeof r.y?r.y:t.mouse.y+1,a=document.body.scrollTop||document.documentElement.scrollTop,o=document.body.scrollLeft||document.documentElement.scrollLeft,s=0,d=0;if(n-a>H-A&&0!==H){s=n-(n-a-(H-A)+N)}else s=n;if(i.Qb.y=s,l.style.top=s+"px","right"===r.align&&(e-=E),e-o>R-E&&0!==R){d=e-(e-o-(R-E)+N)}else d=e;i.Qb.x=d,l.style.left=d+"px"}(),r.parentLink){var I=r.parentLink,L=parseInt(new DayPilot.StyleReader(l).get("border-top-width")),P=DayPilot.abs(r.parentLink.parentNode),z=P.x+I.offsetWidth,U=P.y-L;z+E>R&&(z=Math.max(0,P.x-E));var B=document.body.scrollTop+document.documentElement.scrollTop;U+A-B>H&&(U=Math.max(0,H-A+B)),l.style.left=z+"px",l.style.top=U+"px"}l.style.display="",this.addShadow(l),this.Qb.div=l,r.submenu||(DayPilot.Menu.active=this)}},this.update=function(){if(i.Qb.visible){var e=i.Qb.source;i.hide(),i.show(e,{"x":i.Qb.x,"y":i.Qb.y})}},this.Sb=function(e,t){var n=e,a=t.source;if((!i.Qb.submenu||i.Qb.submenu.item!==e)&&(i.Qb.submenu&&i.Qb.submenu.item!==e&&(DayPilot.Util.removeClass(i.Qb.submenu.link.parentNode,i.Rb("item_haschildren_active")),i.Qb.submenu.menu.hide(),i.Qb.submenu=null),e.items)){var r=i.cloneOptions();r.items=e.items,i.Qb.submenu={},i.Qb.submenu.menu=new DayPilot.Menu(r),i.Qb.submenu.menu.Tb=i,i.Qb.submenu.menu.show(a,{"submenu":!0,"parentLink":t,"parentItem":n}),i.Qb.submenu.item=e,i.Qb.submenu.link=t,DayPilot.Util.addClass(t.parentNode,i.Rb("item_haschildren_active"))}},this.Rb=function(e){var t=this.theme||this.cssClassPrefix,n=this.cssOnly?"_":"";return t?t+n+e:""},this.cloneOptions=function(){return DayPilot.Util.copyProps(r,{},["cssClassPrefix","theme","hideAfter","hideOnMouseOut","zIndex"])},this.hide=function(e){e=e||{},this.Qb.submenu&&this.Qb.submenu.menu.hide();var n=t.waitingSubmenu;if(n&&(t.waitingSubmenu=null,clearTimeout(n.timeout)),this.removeShadow(),this.Qb.div&&this.Qb.div.parentNode===document.body&&document.body.removeChild(this.Qb.div),a&&(DayPilot.de(a),a=null),i.Qb.visible=!1,i.Qb.source=null,i.Tb&&e.hideParent&&i.Tb.hide(e),DayPilot.Menu.active===i&&(DayPilot.Menu.active=null),"function"==typeof this.onHide){var r={};this.onHide(r)}},this.delayedHide=function(e){t.hideTimeout=setTimeout(function(){i.hide(e)},i.hideAfter)},this.cancelHideTimeout=function(){clearTimeout(t.hideTimeout)},this.init=function(e){return t.mouseMove(e),this},this.addShadow=function(){},this.removeShadow=function(){},r)for(var o in r)this[o]=r[o]},DayPilot.MenuBar=function(e,t){var n=this;t=t||{},this.items=[],this.theme="menubar_default",this.windowMargin=0,this.nav={},this.elements={},this.elements.items=[],this.l=null,this.La=!1;for(var i in t)this[i]=t[i];this.Ub=function(e){return this.theme+"_"+e},this.u=function(){this.nav.top=document.getElementById(e);var t=this.nav.top;t.className=this.Ub("main"),(n.items||[]).forEach(function(e){var i=document.createElement("span");i.innerHTML=DayPilot.Util.escapeTextHtml(e.text,e.html),i.className=n.Ub("item"),e.cssClass&&i.classList.add(e.cssClass),i.data=e,i.onclick=function(t){if(n.active&&n.active.item===e)n.Vb();else if(e.children)return void n.Wb(i);if("function"==typeof e.onClick){var a={};a.item=e,a.originalEvent=t,e.onClick(a)}},i.onmousedown=function(e){e.stopPropagation()},i.onmouseover=function(){n.active&&n.active.item!==e&&n.Wb(i)},t.appendChild(i),n.elements.items.push(i)})},this.Vb=function(){var e=n.Ub("item_active");n.elements.items.forEach(function(t){DayPilot.Util.removeClass(t,e)}),n.active&&n.active.menu&&n.active.menu.hide(),n.active=null},this.Xb=function(e){return!!n.active&&n.active.item===e.data},this.Wb=function(e){if(!n.Xb(e)){n.Vb();var t=e.data,i=n.active={};i.item=t,i.div=e;var a=n.Ub("item_active");DayPilot.Util.addClass(e,a);var r=DayPilot.abs(e);if(t.children){i.menu=new DayPilot.Menu({"items":t.children});var o=r.x;"right"===t.align&&(o+=r.w),i.menu.show(null,{"x":o,"y":r.y+r.h,"align":t.align,"windowMargin":n.windowMargin})}DayPilot.MenuBar.active=n}},this.init=function(){return this.u(),this.La=!0,this},this.dispose=function(){this.La&&(this.nav.top.innerHTML="",this.elements.items=[])}},DayPilot.MenuBar.deactivate=function(){DayPilot.MenuBar.active&&(DayPilot.MenuBar.active.Vb(),DayPilot.MenuBar.active=null)},t.menuClean=function(){"undefined"!=typeof DayPilot.Menu.active&&DayPilot.Menu.active&&(DayPilot.Menu.active.hide(),DayPilot.Menu.active=null)},t.mouseDown=function(){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.wheel=function(){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.resize=function(){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.mouseMove=function(e){"undefined"!=typeof t&&(t.mouse=t.mousePosition(e))},t.touchMove=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchStart=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchEnd=function(){},t.touchPosition=function(e){if(!e||!e.touches)return null;var t=e.touches[0],n={};return n.x=t.pageX,n.y=t.pageY,n},t.mousePosition=function(e){return DayPilot.mo3(null,e)},DayPilot.Menu.touchPosition=function(e){e.touches&&(t.mouse=t.touchPosition(e))},DayPilot.Menu.mousePosition=function(e){t.mouse=t.mousePosition(e)},DayPilot.Menu.hide=function(e){if(e=e||{},e.calendar){var n=DayPilot.Menu.active;if(n){var i=n.Qb.source;i&&i.calendar===e.calendar&&t.menuClean()}}else t.menuClean()},t.handlersRegistered||"undefined"==typeof document||(DayPilot.re(document,"mousemove",t.mouseMove),DayPilot.re(document,"mousedown",t.mouseDown),DayPilot.re(document,"wheel",t.wheel),DayPilot.re(document,"touchmove",t.touchMove),DayPilot.re(document,"touchstart",t.touchStart),DayPilot.re(document,"touchend",t.touchEnd),DayPilot.re(window,"resize",t.resize),t.handlersRegistered=!0),DayPilot.Menu.def={}}}(DayPilot),function(DayPilot){function e(t,n,i){var a=n.indexOf(".");if(a===-1)return void("__proto__"!==n&&"constructor"!==n&&(t[n]=i));var r=n.substring(0,a);if("__proto__"!==r&&"constructor"!==r){var o=n.substring(a+1),s=t[r];"object"==typeof s&&null!==s||(t[r]={},s=t[r]),e(s,o,i)}}function t(e){this.form=[],this.data={},this.theme="form_default",this.zIndex=99999,this.locale="en-us",this.plugins={},this.onKey=null,this.yc=[],this.zc=null,this.canceling=!1,this.Ac=[],this.f=[],this.Bc=null,e=e||{};for(var t in e)this[t]=e[t]}function n(){this.id=this.guid(),this.field=null,this.data=null,this.type=null,this.level=0,this.enabled=!0,this.value=null,this.text=null,this.interactive=!0,this.isValue=!1,this.checked=!1,this.resolved=null}function i(){this.element=null,this.canFocus=function(){return!1},this.apply=function(){},this.focus=function(){},this.save=function(){return{}}}function a(e,t,n){t=t||{},n=n||"";for(var i in e){var r=e[i];"object"==typeof r?"[object Array]"===Object.prototype.toString.call(r)?t[n+i]=r:r&&r.toJSON?t[n+i]=r.toJSON():a(r,t,n+i+"."):t[n+i]=r}return t}function r(e){this.data=[],this.name=null,this.theme="searchable_default",this.Hc=!1,this.listZIndex=1e5,this.onSelect=null,this.Ic=null,this.Jc=null,this.Kc=!1,this.Lc=null,this.Mc=null,this.q=[],this.Nc=null,e=e||{};var t=this,n={"selected":{post:function(e){"object"==typeof e&&e.id?t.Ic=e:"string"!=typeof e&&"number"!=typeof e||t.select(e)}}};Object.defineProperty(this,"selected",{get:function(){return this.Ic}}),Object.defineProperty(this,"disabled",{get:function(){return this.Hc},set:function(e){this.Hc=e,this.Lc&&(this.Lc.disabled=e,e&&this.Oc())}});for(var i in e)n[i]||(this[i]=e[i]);for(var a in e)n[a]&&n[a].post(e[a])}function o(e){this.form=null,this.item=null,this.data=null,this.name=null,this.theme="edit_table_default",this.onInput=null,this.nav={},this.Qc=null,this.yc=[],e=e||{};for(var t in e)this[t]=e[t]}if(!DayPilot.ModalStatic){DayPilot.ModalStatic={},DayPilot.ModalStatic.list=[],DayPilot.ModalStatic.hide=function(){if(this.list.length>0){var e=this.list.pop();e&&e.hide()}},DayPilot.ModalStatic.remove=function(e){for(var t=DayPilot.ModalStatic.list,n=0;n<t.length;n++)if(t[n]===e)return void t.splice(n,1)},DayPilot.ModalStatic.close=function(e){DayPilot.ModalStatic.result(e),DayPilot.ModalStatic.hide()},DayPilot.ModalStatic.result=function(e){var t=DayPilot.ModalStatic.list;t.length>0&&(t[t.length-1].result=e)},DayPilot.ModalStatic.displayed=function(e){for(var t=DayPilot.ModalStatic.list,n=0;n<t.length;n++)if(t[n]===e)return!0;return!1},DayPilot.ModalStatic.stretch=function(){if(this.list.length>0){var e=this.list[this.list.length-1];e&&e.stretch()}},DayPilot.ModalStatic.last=function(){var e=DayPilot.ModalStatic.list;return e.length>0?e[e.length-1]:null};var s=function(){function e(){for(var e=document.querySelectorAll("style[nonce]"),t=0;t<e.length;t++){var n=e[t];if(n.nonce)return n.nonce}if(document.currentScript&&document.currentScript.nonce)return document.currentScript.nonce;for(var i=document.querySelectorAll("script[nonce]"),a=0;a<i.length;a++){var r=i[a];if(r.nonce)return r.nonce}return""}if("undefined"==typeof window){var t={};return t.add=function(){},t.commit=function(){},t}var n=document.createElement("style");n.nonce=e(),n.styleSheet||n.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(n);var i=!!n.styleSheet,a={};return a.rules=[],a.commit=function(){try{i&&(n.styleSheet.cssText=this.rules.join("\n"))}catch(e){}},a.add=function(e,t,a){if(i)return void this.rules.push(e+"{"+t+"}");if(n.sheet.insertRule)"undefined"==typeof a&&(a=n.sheet.cssRules.length),n.sheet.insertRule(e+"{"+t+"}",a);else{if(!n.sheet.addRule)throw"No CSS registration method found";n.sheet.addRule(e,t,a)}},a.print=function(){for(var e=n.sheet.cssRules,t=[],i=0;i<e.length;i++)t.push(e[i].cssText);return t.join("\n")},a},l="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",d=new s;
|
|
14
|
+
d.add(".modal_default_main","border: 10px solid #ccc; max-width: 90%;"),d.add(".modal_default_main:focus","outline: none;"),d.add(".modal_default_content","padding: 10px 0px;"),d.add(".modal_default_inner","padding: 20px;"),d.add(".modal_default_input","padding: 10px 0px;"),d.add(".modal_default_buttons","margin-top: 10px;"),d.add(".modal_default_buttons","padding: 10px 0px;"),d.add(".modal_default_form_item","padding: 10px 0px; position: relative;"),d.add(".modal_default_form_item_level1","border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"),d.add(".modal_default_form_item.modal_default_form_title","font-size: 1.5rem; font-weight: bold;"),d.add(".modal_default_form_item input[type=text]","width: 100%; box-sizing: border-box;"),d.add(".modal_default_form_item textarea","width: 100%; height: 200px; box-sizing: border-box;"),d.add(".modal_default_form_item input[type=select]","width: 100%; box-sizing: border-box;"),d.add(".modal_default_form_item label","display: block;"),d.add(".modal_default_form_item select","width: 100%; box-sizing: border-box;"),d.add(".modal_default_form_item_label","margin: 2px 0px;"),d.add(".modal_default_form_item_image img","max-width: 100%; height: auto;"),d.add(".modal_default_form_item_invalid",""),d.add(".modal_default_form_item_invalid_message","position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"),d.add(".modal_default_background","opacity: 0.5; background-color: #000;"),d.add(".modal_default_ok","padding: 3px; width: 80px;"),d.add(".modal_default_cancel","padding: 3px; width: 80px;"),d.add(".modal_default_form_item_date","position: relative;"),d.add(".modal_default_form_item_date:after","content: ''; position: absolute; right: 7px; top: 50%; margin-top: 3px; width: 10px; height: 15px; background-image:url("+"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojY2NjY2NjO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjM4MDM3MzM2O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDE5MjgiCiAgICAgICB3aWR0aD0iOS45MTUzMDYxIgogICAgICAgaGVpZ2h0PSIxMS4zNjkzNyIKICAgICAgIHg9IjAuMTE3MTg3NSIKICAgICAgIHk9Ii0zLjAwOTk5NTciCiAgICAgICByeT0iMS4zMTE4NTA1IiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNjY2NjY2M7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNTk4MTQwMTI7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MTkzMCIKICAgICAgIHdpZHRoPSIxLjUzNDQxMzYiCiAgICAgICBoZWlnaHQ9IjIuMjE5ODI1IgogICAgICAgeD0iMi4xNTU4NDgzIgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHJ5PSIwLjY3MTc4OTE3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iMS41MjM5NTA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QxOTQ4IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjY3MTc4OTE3IgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHg9IjYuNDUyNzIzNSIKICAgICAgIGhlaWdodD0iMi4yMTk4MjUiCiAgICAgICB3aWR0aD0iMS41MzQ0MTM2IgogICAgICAgaWQ9InJlY3QyMDAzIgogICAgICAgc3R5bGU9ImZpbGw6I2NjY2NjYztmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS41OTgxNDAxMjtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAwNSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIHk9Ii0xLjE2NTg0NjYiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iNi45OTI3MDA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDA3IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAxMyIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjEuNTIzOTUwNiIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHJ5PSIwLjI5NjAxNDciIC8+CiAgICA8cmVjdAogICAgICAgcnk9IjAuMjk2MDE0NyIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGlkPSJyZWN0MjAxNSIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIgLz4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDIwMTciCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB4PSI2Ljk5MjcwMDYiCiAgICAgICB5PSIxLjgwMjkwMzQiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSI0LjczMjU5MDciCiAgICAgICB4PSIxLjU2MzAxMzEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBpZD0icmVjdDIwMTkiCiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiIC8+CiAgICA8cmVjdAogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgICAgaWQ9InJlY3QyMDIxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgeD0iNC4yNTgzMjU2IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgcnk9IjAuMjk2MDE0NyIgLz4KICAgIDxyZWN0CiAgICAgICByeT0iMC4yOTYwMTQ3IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgeD0iNy4wMzE3NjMxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDIzIgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogIDwvZz4KPC9zdmc+Cg=="+")"),"undefined"!=typeof navigator&&navigator.userAgent.indexOf("Edge")!==-1&&d.add(".modal_default_form_item_date input::-ms-clear","display: none;"),d.add(".modal_default_form_item_scrollable_scroll","width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"),d.add(".modal_default_form_item_scrollable_scroll_content","padding: 5px;"),d.add(".modal_default_form_item_searchable","position: relative;"),d.add(".modal_default_form_item_searchable_icon",""),d.add(".modal_default_form_item_searchable_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+l+");"),d.add(".modal_default_form_item_searchable_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),d.add(".modal_default_form_item_searchable_list_item","background: white; padding: 2px; cursor: default;"),d.add(".modal_default_form_item_searchable_list_item_highlight","background: #ccc;"),d.add(".modal_default_form_item_time","position: relative;"),d.add(".modal_default_form_item_time_icon",""),d.add(".modal_default_form_item_time_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+l+");"),d.add(".modal_default_form_item_time_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),d.add(".modal_default_form_item_time_list_item","background: white; padding: 2px; cursor: default;"),d.add(".modal_default_form_item_time_list_item_highlight","background: #ccc;"),d.add(".modal_default_form_item_datetime_parent","display: flex;"),d.add(".modal_default_form_item_datetime .modal_default_form_item_time_main","margin-left: 5px;"),d.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ",""),d.add(".modal_default_form_item_tabular_main","margin-top: 10px;"),d.add(".modal_default_form_item_tabular_table","display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"),d.add(".modal_default_form_item_tabular_tbody","display: table-row-group;"),d.add(".modal_default_form_item_tabular_row","display: table-row;"),d.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header",""),d.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction","padding: 0px; width: 23px;"),d.add(".modal_default_form_item_tabular_cell","display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"),d.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell","padding-left: 0px; padding-bottom: 0px;"),d.add(".modal_default_form_item_tabular_table input[type=text], .modal_default_form_item_tabular_table input[type=number]","width:100%; box-sizing: border-box;"),d.add(".modal_default_form_item_tabular_table select","width:100%; height:100%; box-sizing: border-box;"),d.add(".modal_default_form_item_tabular_plus","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),d.add(".modal_default_form_item_tabular_plus:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSA1LjAgMC41IEwgNS4wIDkuNSBNIDAuNSA1LjAgTCA5LjUgNS4wJyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),d.add(".modal_default_form_item_tabular_delete","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),d.add(".modal_default_form_item_tabular_delete:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgOS41IDkuNSBNIDAuNSA5LjUgTCA5LjUgMC41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),d.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus","display: none;"),d.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus","display: none;"),d.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete","visibility: hidden;"),d.add(".modal_default_form_item_tabular_empty","height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"),d.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell","padding: 0px;"),d.add(".modal_min_main","border: 1px solid #ccc; max-width: 90%;"),d.add(".modal_min_background","opacity: 0.5; background-color: #000;"),d.add(".modal_min_ok","padding: 3px 10px;"),d.add(".modal_min_cancel","padding: 3px 10px;"),d.add(".navigator_modal_main","border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"),d.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after","box-sizing: content-box;"),d.add(".navigator_modal_month","font-size: 11px;"),d.add(".navigator_modal_day","color: black;"),d.add(".navigator_modal_weekend","background-color: #f0f0f0;"),d.add(".navigator_modal_dayheader","color: black;"),d.add(".navigator_modal_line","border-bottom: 1px solid #c0c0c0;"),d.add(".navigator_modal_dayother","color: gray;"),d.add(".navigator_modal_todaybox","border: 1px solid red;"),d.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),d.add(".navigator_modal_busy","font-weight: bold;"),d.add(".navigator_modal_cell","text-align: center;"),d.add(".navigator_modal_select .navigator_modal_cell_box","background-color: #FFE794; opacity: 0.5;"),d.add(".navigator_modal_title","text-align: center;"),d.add(".navigator_modal_titleleft, .navigator_modal_titleright","text-align: center;"),d.add(".navigator_modal_dayheader","text-align: center;"),d.add(".navigator_modal_weeknumber","text-align: center;"),d.add(".navigator_modal_cell_text","cursor: pointer;"),d.add(".navigator_modal_todaysection","box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--dp-nav-border-color);"),d.add(".navigator_modal_todaysection_button","cursor: pointer; color: #333; background-color: #f0f0f0; border: 1px solid var(--dp-nav-border-color); padding: 5px 10px; border-radius: 0px; "),d.commit(),DayPilot.Modal=function(e){this.autoFocus=!0,this.focus=null,this.autoStretch=!0,this.autoStretchFirstLoadOnly=!1,this.className=null,this.theme="modal_default",this.disposeOnClose=!0,this.dragDrop=!0,this.loadingHtml=null,this.maxHeight=null,this.scrollWithPage=!0,this.useIframe=!0,this.zIndex=99999,this.left=null,this.width=600,this.top=20,this.height=200,this.locale=null,this.closed=null,this.onClose=null,this.onClosed=null,this.onShow=null;var t=this;this.id="_"+(new Date).getTime()+"n"+10*Math.random(),this.Yb=!1,this.Zb=null,this.$b=null,this.showHtml=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.div||this._b(),this.qb(),this.useIframe){var t=function(e,t){return function(){e.setInnerHTML(e.id+"iframe",t)}};window.setTimeout(t(this,e),0)}else e.nodeType?this.div.appendChild(e):this.div.innerHTML=e;this.qb(),this.bc(),this.cc()},this.showUrl=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.useIframe){this.div||this._b();var n=this.loadingHtml;n&&(this.iframe.src="about:blank",this.setInnerHTML(this.id+"iframe",n)),this.re(this.iframe,"load",this.dc),this.iframe.src=e,this.qb(),this.bc(),this.cc()}else t.ec({"url":e,"success":function(e){var n=e.request.responseText;t.showHtml(n)},"error":function(){t.showHtml("Error loading the modal dialog")}})},this.cc=function(){if("function"==typeof t.onShow){var e={};e.root=t.fc(),e.modal=t,t.onShow(e)}},this.fc=function(){return t.iframe?t.iframe.contentWindow.document:t.div},this.ec=function(e){var t=new XMLHttpRequest;if(t){var n=e.method||"GET",i=e.success||function(){},a=e.error||function(){},r=e.data,o=e.url;t.open(n,o,!0),t.setRequestHeader("Content-type","text/plain"),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status||304===t.status){var e={};e.request=t,i(e)}else if(a){var n={};n.request=t,a(n)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&("object"==typeof r&&(r=JSON.stringify(r)),t.send(r))}},this.qb=function(){delete this.result;var e=window,n=document,i=e.pageYOffset?e.pageYOffset:n.documentElement&&n.documentElement.scrollTop?n.documentElement.scrollTop:n.body.scrollTop;this.theme&&(this.hideDiv.className=this.theme+"_background"),this.zIndex&&(this.hideDiv.style.zIndex=this.zIndex),this.hideDiv.style.display="",window.setTimeout(function(){t.hideDiv&&(t.hideDiv.onclick=function(){t.hide({"backgroundClick":!0})})},500),this.theme?this.div.className=this.theme+"_main":this.div.className="",this.className&&(this.div.className+=" "+this.className),this.left?this.div.style.left=this.left+"px":this.div.style.marginLeft="-"+Math.floor(this.width/2)+"px",this.div.style.position="absolute",this.div.style.boxSizing="content-box",this.div.style.top=i+this.top+"px",this.div.style.width=this.width+"px",this.zIndex&&(this.div.style.zIndex=this.zIndex),this.height&&(this.useIframe||!this.autoStretch?this.div.style.height=this.height+"px":this.div.style.height=""),this.useIframe&&this.height&&(this.iframe.style.height=this.height+"px"),this.div.style.display="",this.gc(),DayPilot.ModalStatic.remove(this),DayPilot.ModalStatic.list.push(this)},this.dc=function(){t.iframe.contentWindow.modal=t,t.autoStretch&&t.stretch()},this.stretch=function(){var e=function(){return t.hc().y},n=function(){return t.hc().x};if(this.useIframe){for(var i=n()-40,a=this.width;a<i&&this.ic();a+=10)this.div.style.width=a+"px",this.div.style.marginLeft="-"+Math.floor(a/2)+"px";for(var r=this.maxHeight||e()-2*this.top,o=this.height;o<r&&this.jc();o+=10)this.iframe.style.height=o+"px",this.div.style.height=o+"px";this.autoStretchFirstLoadOnly&&this.ue(this.iframe,"load",this.dc)}else this.div.style.height=""},this.ic=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,n=t.scrollWidth,i=e.body.children,a=0;a<i.length;a++){var r=i[a].offsetLeft+i[a].offsetWidth;n=Math.max(n,r)}return n>t.clientWidth},this.jc=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,n=t.scrollHeight,i=e.body.children,a=0;a<i.length;a++){var r=i[a].offsetTop+i[a].offsetHeight;n=Math.max(n,r)}return n>t.clientHeight},this.hc=function(){var e=document;if("CSS1Compat"===e.compatMode&&e.documentElement&&e.documentElement.clientWidth){var t=e.documentElement.clientWidth,n=e.documentElement.clientHeight;return{x:t,y:n}}var t=e.body.clientWidth,n=e.body.clientHeight;return{x:t,y:n}},this.bc=function(){this.Yb||(this.re(window,"resize",this.kc),this.re(window,"scroll",this.lc),this.dragDrop&&(this.re(document,"mousemove",this.nc),this.re(document,"mouseup",this.oc)),this.Yb=!0)},this.pc=function(){this.ue(window,"resize",this.kc),this.ue(window,"scroll",this.lc),this.dragDrop&&(this.ue(document,"mousemove",this.nc),this.ue(document,"mouseup",this.oc)),this.Yb=!1},this.qc=function(e){e.target===t.div&&(e.preventDefault(),t.div.style.cursor="move",t.rc(),t.$b=t.mc(e||window.event),t.Zb={x:t.div.offsetLeft,y:t.div.offsetTop})},this.nc=function(e){if(t.$b){var n=t.mc(e),i=n.x-t.$b.x,a=n.y-t.$b.y;t.div.style.marginLeft="0px",t.div.style.top=t.Zb.y+a+"px",t.div.style.left=t.Zb.x+i+"px"}},this.oc=function(){t.$b&&(t.sc(),t.div.style.cursor=null,t.$b=null)},this.rc=function(){if(this.useIframe){var e=document.createElement("div");e.style.backgroundColor="#ffffff",e.style.filter="alpha(opacity=80)",e.style.opacity="0.80",e.style.width="100%",e.style.height=this.height+"px",e.style.position="absolute",e.style.left="0px",e.style.top="0px",this.div.appendChild(e),this.mask=e}},this.sc=function(){this.useIframe&&(this.div.removeChild(this.mask),this.mask=null)},this.kc=function(){t.tc(),t.gc()},this.lc=function(){t.tc()},this.gc=function(){if(!t.left&&t.div){var e=t.div.offsetWidth;t.div.style.marginLeft="-"+Math.floor(e/2)+"px"}},this.tc=function(){if(t.hideDiv&&t.div&&"none"!==t.hideDiv.style.display&&"none"!==t.div.style.display){var e=t.uc.scrollY();t.scrollWithPage||(t.div.style.top=e+t.top+"px")}},this.uc={},this.uc.container=function(){return t.container||document.body},this.uc.scrollY=function(){var e=t.uc.container();return e===document.body?window.pageYOffset?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop:e.scrollTop},this.re=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},this.ue=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},this.mc=function(e){return e.pageX||e.pageY?{x:e.pageX,y:e.pageY}:{x:e.clientX+document.documentElement.scrollLeft,y:e.clientY+document.documentElement.scrollTop}},this.abs=function(e){for(var t={x:e.offsetLeft,y:e.offsetTop};e.offsetParent;)e=e.offsetParent,t.x+=e.offsetLeft,t.y+=e.offsetTop;return t},this._b=function(){var e=t.uc.container(),n=e===document.body,i=n?"fixed":"absolute",a=document.createElement("div");a.id=this.id+"hide",a.style.position=i,a.style.left="0px",a.style.top="0px",a.style.right="0px",a.style.bottom="0px",a.oncontextmenu=function(){return!1},a.onmousedown=function(){return!1},e.appendChild(a);var r=document.createElement("div");r.id=this.id+"popup",r.style.position=i,r.style.left="50%",r.style.top="0px",r.style.backgroundColor="white",r.style.width="50px",r.style.height="50px",this.dragDrop&&(r.onmousedown=this.qc),r.addEventListener("keydown",function(e){e.stopPropagation()});var o=null;this.useIframe&&(o=document.createElement("iframe"),o.id=this.id+"iframe",o.name=this.id+"iframe",o.frameBorder="0",o.style.width="100%",o.style.height="50px",r.appendChild(o)),e.appendChild(r),this.div=r,this.iframe=o,this.hideDiv=a},this.setInnerHTML=function(e,n){var i=window.frames[e],a=i.contentWindow||i.document||i.contentDocument;a.document&&(a=a.document),null==a.body&&a.write("<body></body>"),n.nodeType?a.body.appendChild(n):a.body.innerHTML=n,t.autoStretch&&(t.autoStretchFirstLoadOnly&&t.vc||(t.stretch(),t.vc=!0))},this.close=function(e){this.result=e,this.hide()},this.closeSerialized=function(){for(var e=t.fc(),n=e.querySelectorAll("input, textarea, select"),i={},a=0;a<n.length;a++){var r=n[a],o=r.name;if(o){var s=r.value;i[o]=s}}t.close(i)},this.hide=function(e){e=e||{};var n={};n.backgroundClick=!!e.backgroundClick,n.result=this.result,n.canceled="undefined"==typeof this.result,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof this.onClose&&(this.onClose(n),n.preventDefault.value)||(this.div&&(this.div.style.display="none",this.hideDiv.style.display="none",this.useIframe||(this.div.innerHTML=null)),window.focus(),DayPilot.ModalStatic.remove(this),"function"==typeof this.onClosed?this.onClosed(n):this.closed&&this.closed(),delete this.result,this.disposeOnClose&&(t.pc(),t.wc(t.div),t.wc(t.hideDiv),t.div=null,t.hideDiv=null,t.iframe=null))},this.wc=function(e){var t;e&&(null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e))},this.xc=function(){if(e)for(var t in e)this[t]=e[t]},this.xc()},DayPilot.Modal.alert=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var n=t.okText||"OK";return DayPilot.getPromise(function(i){t.onClosed=function(e){i(e)};var a=new DayPilot.Modal(t),r=document.createElement("div");r.className=a.theme+"_inner";var o=document.createElement("div");o.className=a.theme+"_content",o.innerHTML=e;var s=document.createElement("div");s.className=a.theme+"_buttons";var l=document.createElement("button");l.innerText=n,l.className=a.theme+"_ok",l.onclick=function(){DayPilot.ModalStatic.close("OK")},s.appendChild(l),r.appendChild(o),r.appendChild(s),a.showHtml(r),a.autoFocus&&l.focus()})},DayPilot.Modal.confirm=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var n=t.okText||"OK",i=t.cancelText||"Cancel";return DayPilot.getPromise(function(a){t.onClosed=function(e){a(e)};var r=new DayPilot.Modal(t),o=document.createElement("div");o.className=r.theme+"_inner";var s=document.createElement("div");s.className=r.theme+"_content",s.innerHTML=e;var l=document.createElement("div");l.className=r.theme+"_buttons";var d=document.createElement("button");d.innerText=n,d.className=r.theme+"_ok",d.onclick=function(){DayPilot.ModalStatic.close("OK")};var c=document.createTextNode(" "),u=document.createElement("button");u.innerText=i,u.className=r.theme+"_cancel",u.onclick=function(){DayPilot.ModalStatic.close()},l.appendChild(d),l.appendChild(c),l.appendChild(u),o.appendChild(s),o.appendChild(l),r.showHtml(o),r.autoFocus&&d.focus()})},DayPilot.Modal.prompt=function(e,t,n){"object"==typeof t&&(n=t,t=""),n=n||{},n.height=n.height||40,n.useIframe=!1;var i=n.okText||"OK",a=n.cancelText||"Cancel",r=t||"";return DayPilot.getPromise(function(t){n.onClosed=function(e){t(e)};var o=new DayPilot.Modal(n),s=document.createElement("div");s.className=o.theme+"_inner";var l=document.createElement("div");l.className=o.theme+"_content",l.innerHTML=e;var d=document.createElement("div");d.className=o.theme+"_input";var c=document.createElement("input");c.value=r,c.style.width="100%",c.onkeydown=function(e){var t=!1;switch(e.keyCode){case 13:o.close(this.value);break;case 27:o.close();break;default:t=!0}t||(e.preventDefault(),e.stopPropagation())},d.appendChild(c);var u=document.createElement("div");u.className=o.theme+"_buttons";var h=document.createElement("button");h.innerText=i,h.className=o.theme+"_ok",h.onclick=function(){o.close(c.value)};var f=document.createTextNode(" "),v=document.createElement("button");v.innerText=a,v.className=o.theme+"_cancel",v.onclick=function(){o.close()},u.appendChild(h),u.appendChild(f),u.appendChild(v),s.appendChild(l),s.appendChild(d),s.appendChild(u),o.showHtml(s),o.autoFocus&&c.focus()})};var c=function(e){return"[object Array]"===Object.prototype.toString.call(e)};DayPilot.Modal.form=function(n,i,a){if(1===arguments.length){var r=n;if(c(r))i={};else{if("object"!=typeof r)throw"Invalid DayPilot.Modal.form() parameter";i=n,n=[];for(var o in i){var s={};s.name=o,s.id=o,n.push(s)}}}var l={};for(var d in a)l[d]=a[d];l.height=l.height||40,l.useIframe=!1;var u=l.okText||"OK",h=l.cancelText||"Cancel";return DayPilot.getPromise(function(a){l.onClosed=function(t){if(t.result){var n=JSON.parse(JSON.stringify(i));for(var r in t.result)e(n,r,t.result[r]);t.result=n}a(t)};var r=new DayPilot.Modal(l),o=document.createElement("div");o.className=r.theme+"_inner";var s=document.createElement("div");s.className=r.theme+"_input";var d=new t({theme:r.theme,form:n,data:i,zIndex:r.zIndex,locale:r.locale,plugins:r.plugins,onKey:function(e){switch(e.key){case"Enter":d.validate()&&r.close(d.serialize());break;case"Escape":r.close()}},onChange:function(e){"function"==typeof r.onChange&&r.onChange(e)}}),c=d.create();s.append(c);var f=document.createElement("div");f.className=r.theme+"_buttons";var v=document.createElement("button");v.innerText=u,v.className=r.theme+"_ok",l.okDisabled&&(v.disabled=!0),v.onclick=function(){d.validate()&&r.close(d.serialize())};var p=document.createTextNode(" "),m=document.createElement("button");if(m.innerText=h,m.className=r.theme+"_cancel",m.onclick=function(){r.close()},m.onmousedown=function(){d.canceling=!0},f.appendChild(v),f.appendChild(p),f.appendChild(m),o.appendChild(s),o.appendChild(f),r.showHtml(o),r.div.setAttribute("tabindex","-1"),r.div.addEventListener("keydown",function(e){switch(e.keyCode){case 27:r.close();break;case 13:d.validate()&&r.close(d.serialize())}}),r.focus){var g=null;if("object"==typeof r.focus){var y=r.focus.id,b=r.focus.value;g=d.findViewById(y,b)}else"string"==typeof r.focus&&(g=d.findViewById(r.focus));g&&g.focus()}else{var w=d.firstFocusable();r.autoFocus&&w?w.focus():r.div.focus()}})},DayPilot.Modal.close=function(e){var t=DayPilot.Modal.opener();t&&t.close(e)},DayPilot.Modal.stretch=function(){var e=DayPilot.Modal.opener();if(!e)throw"Unable to find the opener DayPilot.Modal instance.";e.stretch()},DayPilot.Modal.closeSerialized=function(){var e=DayPilot.Modal.opener()||DayPilot.ModalStatic.last();e&&e.closeSerialized()},DayPilot.Modal.opener=function(){return"undefined"!=typeof DayPilot&&"undefined"!=typeof DayPilot.ModalStatic&&DayPilot.ModalStatic.list.length>0?DayPilot.ModalStatic.list[DayPilot.ModalStatic.list.length-1]:parent&&parent.DayPilot&&parent.DayPilot.ModalStatic&&parent.DayPilot.ModalStatic.list[parent.DayPilot.ModalStatic.list.length-1]},"undefined"==typeof DayPilot.getPromise&&(DayPilot.getPromise=function(e){return"undefined"!=typeof Promise?new Promise(e):(DayPilot.Promise=function(e){var t=this;this.then=function(t,n){return t=t||function(){},n=n||function(){},e(t,n),DayPilot.getPromise(e)},this["catch"]=function(n){return t.then(null,n),DayPilot.getPromise(e)}},new DayPilot.Promise(e))}),t.prototype.create=function(){return this.load(),this.render(),this.Bc},t.prototype.render=function(){var e=this;this.Bc=document.createElement("div"),this.yc.forEach(function(t){e.createView(t)}),this.applyState()},t.prototype.createView=function(e){var t=this.theme,n=this,i=document.createElement("div");if(i.className=t+"_form_item "+t+"_form_item_level"+e.level,e.interactive||"title"!==e.type?i.className+=" "+t+"_form_item_"+e.type:i.className+=" "+t+"_form_title",e.data.cssClass&&(i.className+=" "+e.data.cssClass),!e.isValue){var a=document.createElement("div");a.className=t+"_form_item_label",a.innerText=e.text,i.appendChild(a)}var r=this.createInteractive(e);r.onInput=function(e){if(e=e||{},n.Cc(r,{"debounce":!e.immediate}),"function"==typeof n.onChange){var t={};t.result=n.serialize(),n.onChange(t)}},r.onBlur=function(){n.canceling||n.Cc(r)},r.apply(e),r.Bc=i,r.row=e,r.element&&i.appendChild(r.element),this.f.push(r),this.Bc.appendChild(i)},t.prototype.validate=function(){var e=this,t=!0;return this.f.forEach(function(n){var i=e.Cc(n);t=t&&i}),t},t.prototype.Cc=function(e,t){function n(){e.Dc&&(e.Dc.remove(),e.Dc=null),e.Bc.classList.add(u);var t=document.createElement("div");t.classList.add(h),t.innerText=c.message,e.Dc=t,e.Bc.appendChild(t)}t=t||{};var i=t.debounce,a=t.silent,r=e.row,o=!0,s="function"==typeof r.data.onValidate?r.data.onValidate:null,l="function"==typeof r.data.validate?r.data.validate:null,d=s||l;if(d){var c={};c.valid=!0,c.value=e.save()[r.field],c.message="Error",c.values=this.serialize(),c.result=this.serialize(),d(c);var u=this.theme+"_form_item_invalid",h=this.theme+"_form_item_invalid_message";if(c.valid)clearTimeout(this.Ac[r.field]),e.Dc&&(e.Dc.remove(),e.Dc=null),e.Bc.classList.remove(u);else if(!a)if(i){var f=1e3;clearTimeout(this.Ac[r.field]),this.Ac[r.field]=setTimeout(function(){n()},f)}else n();o=c.valid}return o},t.prototype.load=function(){var e=this;this.form.forEach(function(t){e.processFormItem(t,0)});var t;try{var n=JSON.stringify(this.data);t=a(JSON.parse(n))}catch(e){throw new Error("The 'data' object is not serializable (it may contain circular dependencies): "+e)}for(var i in t)this.setValue(i,t[i])},t.prototype.setValue=function(e,t){this.yc.forEach(function(n){n.applyValue(e,t)})},t.prototype.updateDependentState=function(){var e=this,t=[!0];(this.zc?this.zc:this.yc).forEach(function(n){var i=e.updateState(n,{enabled:t[n.level]&&!n.data.disabled});i.isValue&&(t[i.level+1]=i.enabled&&i.checked)})},t.prototype.processFormItem=function(e,t){var i=this,a=this.getFieldType(e),r=[];if("radio"===a){if(e.name){var o=new n;o.field=e.id,o.data=e,o.level=t,o.type="label",o.interactive=!1,o.text=e.name,i.yc.push(o),r.push(o)}e.options.forEach(function(o){var s=new n;s.field=e.id,s.data=o,s.level=t,s.type=a,s.isValue=!0,s.text=o.name,s.resolved=o.id,
|
|
15
|
+
i.yc.push(s),r.push(s),o.children&&o.children.forEach(function(e){var n=i.processFormItem(e,t+1);r=r.concat(n)})})}else if("title"===a){var o=new n;o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=e.name,i.yc.push(o),r.push(o)}else if("image"===a){var o=new n;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.yc.push(o),r.push(o)}else if("html"===a){var o=new n;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.yc.push(o),r.push(o)}else if("scrollable"===a){var o=new n;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.yc.push(o),r.push(o)}else{var o=new n;o.field=e.id,o.data=e,o.level=t,o.type=a,o.text=e.name,o.children=[],i.yc.push(o),r.push(o),"checkbox"===a&&(o.isValue=!0,o.resolved=!0,e.children&&e.children.forEach(function(e){var n=i.processFormItem(e,t+1);r=r.concat(n)}))}return r},t.prototype.doOnKey=function(e){if("function"==typeof this.onKey){var t={key:e};this.onKey(t)}},t.prototype.createInteractive=function(e){var t=this,n={"label":function(){return new i},"title":function(){return new i},"image":function(){var t=new i,n=document.createElement("img");return n.src=e.data.image,t.element=n,t},"html":function(){var t=new i,n=document.createElement("div");return"string"==typeof e.data.text?n.innerText=e.data.text:"string"==typeof e.data.html&&(n.innerHTML=e.data.html),t.element=n,t},"scrollable":function(){var n=new i,a=document.createElement("div");a.className=t.theme+"_form_item_scrollable_scroll",e.data.height&&(a.style.height=e.data.height+"px");var r=document.createElement("div");return r.className=t.theme+"_form_item_scrollable_scroll_content","string"==typeof e.data.text?r.innerText=e.data.text:"string"==typeof e.data.html&&(r.innerHTML=e.data.html),a.appendChild(r),n.element=a,n},"text":function(){var n=new i;n.apply=function(e){n.row=e;var t=n.element;t.value=e.value,t.disabled=!e.enabled};var a=document.createElement("input");return a.name=e.field,a.type="text",a.autocomplete="off",a.onkeydown=function(e){var n=!1;switch(e.keyCode){case 13:t.doOnKey("Enter");break;case 27:t.doOnKey("Escape");break;default:n=!0}n||(e.preventDefault(),e.stopPropagation())},a.oninput=function(){n.onInput()},a.onblur=function(){n.onBlur()},n.element=a,n.canFocus=function(){return!n.element.disabled},n.focus=function(){n.element.focus(),n.element.setSelectionRange(0,n.element.value.length)},n.save=function(){var t={};return t[e.field]=a.value,t},n},"textarea":function(){var n=new i;n.apply=function(e){n.row=e;var t=n.element;t.value=e.value,t.disabled=!e.enabled};var a=document.createElement("textarea");return a.name=e.field,e.data.height&&(a.style.height=e.data.height+"px"),a.onkeydown=function(e){var n=!1;switch(e.keyCode){case 13:(e.ctrlKey||e.metaKey)&&t.doOnKey("Enter"),n=!1;break;case 27:t.doOnKey("Escape");break;default:n=!0}n||e.stopPropagation()},a.oninput=function(){n.onInput()},a.onblur=function(){n.onBlur()},n.element=a,n.canFocus=function(){return!n.element.disabled},n.focus=function(){n.element.focus(),n.element.setSelectionRange(0,0)},n.save=function(){var t={};return t[e.field]=a.value,t},n},"date":function(){var n=new i;n.apply=function(e){n.row=e;var i=n.element,a=n.picker;e.data.dateFormat&&(a.pattern=e.data.dateFormat);var r=e.data.locale||t.locale;r&&(a.locale=r),i.disabled=!e.enabled,a.date=new DayPilot.Date(e.value);var o=new DayPilot.Date(e.value).toString(e.data.dateFormat||a.pattern,a.locale);i.value=o};var a=document.createElement("input");a.name=e.field;var r=new DayPilot.DatePicker({target:a,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(){n.onInput({"immediate":!0})}});return a.picker=r,a.className=t.theme+"_input_date",a.type="text",a.onkeydown=function(e){var n=!1;switch(e.keyCode){case 13:r.visible?r.close():t.doOnKey("Enter");break;case 27:r.visible?r.close():t.doOnKey("Escape");break;case 9:r.close(),n=!0;break;default:n=!0}n||(e.preventDefault(),e.stopPropagation())},a.onfocus=function(){r.show()},a.onclick=function(){r.show()},a.oninput=function(){n.onInput()},a.onblur=function(){n.onBlur()},n.element=a,n.picker=r,n.canFocus=function(){return!n.element.disabled},n.focus=function(){n.element.focus()},n.save=function(){var t=r.date?r.date.toString():null,n={};return n[e.field]=t,n},n},"time":function(){return t.Ec(e)},"datetime":function(){return t.Fc(e)},"select":function(){var t=new i;t.apply=function(e){t.row=e;var n=t.element;n.value=e.value,n.disabled=!e.enabled};var n=document.createElement("select");return n.name=e.field,e.data.options&&e.data.options.forEach&&e.data.options.forEach(function(e){var t=document.createElement("option");t.innerText=e.name||e.id,t.value=e.id,t.Gc=e.id,n.appendChild(t)}),n.onchange=function(){t.onInput({"immediate":!0})},n.onblur=function(){t.onBlur()},t.element=n,t.canFocus=function(){return!t.element.disabled},t.focus=function(){t.element.focus()},t.save=function(){var t=null,i=n.options[n.selectedIndex];i&&"undefined"!=typeof i.Gc&&(t=i.Gc);var a={};return a[e.field]=t,a},t},"searchable":function(){var n=new i;n.apply=function(e){n.row=e;var t=n.searchable;t.disabled=!e.enabled,t.select(e.value)};var a=new r({data:e.data.options||[],name:e.field,theme:t.theme+"_form_item_searchable",listZIndex:t.zIndex+1,onSelect:function(e){e.ui&&n.onInput({"immediate":!0})}}),o=a.create();return n.element=o,n.searchable=a,n.canFocus=function(){return!n.searchable.disabled},n.focus=function(){n.searchable.focus()},n.save=function(){var t=a.selected&&a.selected.id,n={};return n[e.field]=t,n},n},"radio":function(){var n=new i;n.apply=function(e){n.row=e;var t=n.radio;t.checked=e.checked,t.disabled=!e.enabled};var a=document.createElement("label"),r=document.createElement("input");r.type="radio",r.name=e.field,r.Gc=e.resolved,r.onchange=function(){var e=n.row;t.findRowsByField(e.field).forEach(function(e){t.updateState(e,{checked:!1})}),t.updateState(e,{checked:!0}),t.applyState(),n.onInput({"immediate":!0})},r.onblur=function(){n.onBlur()},a.appendChild(r);var o=document.createTextNode(e.text);return a.append(o),n.element=a,n.radio=r,n.canFocus=function(){return!1},n.focus=function(){n.radio.focus()},n.save=function(){if(!r.checked)return{};var t=r.Gc,n={};return n[e.field]=t,n},n},"checkbox":function(){var n=new i;n.apply=function(e){n.row=e;var t=n.checkbox;t.checked=e.checked,t.disabled=!e.enabled};var a=document.createElement("label"),r=document.createElement("input");r.type="checkbox",r.name=e.field,r.Gc=e.resolved,r.onchange=function(){var e=n.row;t.updateState(e,{checked:this.checked}),t.applyState(),n.onInput({"immediate":!0})},r.onblur=function(){n.onBlur()},a.appendChild(r);var o=document.createTextNode(e.text);return a.append(o),n.element=a,n.checkbox=r,n.canFocus=function(){return!1},n.focus=function(){n.checkbox.focus()},n.save=function(){var t=r.checked,n={};return n[e.field]=t,n},n},"table":function(){var n=new i;n.apply=function(e){n.row=e;var t=n.table;t.disabled=!e.enabled,t.load(e.value||[])};var a=new o({name:e.field,form:t,theme:t.theme+"_form_item_tabular",item:e.data,onInput:function(){n.onInput()}}),r=a.create();return n.element=r,n.table=a,n.canFocus=function(){return!1},n.focus=function(){n.table.focus()},n.save=function(){var t=a.save(),n={};return n[e.field]=t,n},n}};return t.plugins&&t.plugins[e.type]?t.plugins[e.type](e):n[e.type]()},t.prototype.Ec=function(e){var t=this,n=new i;n.apply=function(e){n.row=e;var t=n.searchable;t.disabled=!e.enabled,t.select(e.value)};var a=[],o=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(o)||(o=15);for(var s=60/o,l=e.data.locale||t.locale,d=DayPilot.Locale.find(l)||DayPilot.Locale.US,c=DayPilot.Date.today(),u=0;u<24*s;u++){var h=c.addMinutes(o*u),f={};f.name=h.toString(e.data.timeFormat||d.timePattern,d),f.id=h.toString("HH:mm"),a.push(f)}var v=new r({data:a,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&n.onInput({"immediate":!0})}}),p=v.create();return n.element=p,n.searchable=v,n.canFocus=function(){return!n.searchable.disabled},n.focus=function(){n.searchable.focus()},n.save=function(){var t=v.selected&&v.selected.id,n={};return n[e.field]=t,n},n},t.prototype.Fc=function(e){var t=this,n=new i;n.apply=function(e){n.row=e;var i=n.searchable;i.disabled=!e.enabled;var a=new DayPilot.Date(e.value).toString("HH:mm");i.select(a);var r=n.dateInput,o=n.picker;e.data.dateFormat&&(o.pattern=e.data.dateFormat);var s=e.data.locale||t.locale;if(s){var l=DayPilot.Locale.find(s)||DayPilot.Locale.US;o.locale=s,o.pattern=l.datePattern}r.disabled=!e.enabled,o.date=new DayPilot.Date(e.value);var d=new DayPilot.Date(e.value).toString(e.data.dateFormat||o.pattern,o.locale);r.value=d};var a=function(){var i=document.createElement("input");i.name=e.field;var a=new DayPilot.DatePicker({target:i,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(){n.onInput({"immediate":!0})}});return i.picker=a,i.className=t.theme+"_input_date",i.type="text",i.onkeydown=function(e){var n=!1;switch(e.keyCode){case 13:a.visible?a.close():t.doOnKey("Enter");break;case 27:a.visible?a.close():t.doOnKey("Escape");break;case 9:a.close(),n=!0;break;default:n=!0}n||(e.preventDefault(),e.stopPropagation())},i.onfocus=function(){a.show()},i.onclick=function(){a.show()},i.oninput=function(){n.onInput()},i.onblur=function(){n.onBlur()},n.dateInput=i,n.picker=a,i}(),o=function(){var i=[],a=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(a)||(a=15);for(var o=60/a,s=e.data.locale||t.locale,l=DayPilot.Locale.find(s)||DayPilot.Locale.US,d=DayPilot.Date.today(),c=0;c<24*o;c++){var u=d.addMinutes(a*c),h={};h.name=u.toString(e.data.timeFormat||l.timePattern,l),h.id=u.toString("HH:mm"),i.push(h)}var f=new r({data:i,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&n.onInput({"immediate":!0})}});return n.searchable=f,f.create()}(),s=document.createElement("div");return s.className=t.theme+"_form_item_datetime_parent",s.appendChild(a),s.appendChild(o),n.element=s,n.canFocus=function(){return!n.searchable.disabled},n.focus=function(){n.dateInput.focus()},n.save=function(){var t=n.searchable.selected&&n.searchable.selected.id,i=n.picker.date?n.picker.date.toString():null,a=new DayPilot.Date(i).getDatePart(),r=DayPilot.Date.parse(a.toString("yyyy-dd-MM ")+t,"yyyy-dd-MM HH:mm"),o={};return o[e.field]=r,o},n},t.prototype.findRowsByField=function(e){return this.yc.filter(function(t){return t.field===e})},t.prototype.findViewById=function(e,t){return this.f.find(function(n){return n.row.field===e&&("radio"!==n.row.type||n.row.resolved===t)})},t.prototype.firstFocusable=function(){return this.f.find(function(e){return e.canFocus&&e.canFocus()})},t.prototype.updateState=function(e,t){var n=this.zc?this.zc:this.yc,i=n.indexOf(e);return this.zc=n.map(function(n){if(n!==e)return n;if(e.propsEqual(t))return e;var i=e.clone();for(var a in t)i[a]=t[a];return i}),this.zc[i]},t.prototype.updateInteractive=function(e){var t=this.zc.indexOf(e);this.f[t].apply(e)},t.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.zc){this.zc.filter(function(t,n){return e.yc[n]!==t}).forEach(function(t){e.updateInteractive(t)}),this.yc=this.zc,this.zc=null}},t.prototype.getFieldType=function(e){return["text","date","select","searchable","radio","checkbox","table","title","image","html","textarea","scrollable","time","datetime"].indexOf(e.type)!==-1?e.type:e.type&&this.plugins&&this.plugins[e.type]?e.type:e.image?"image":e.html||e.text?"html":e.id?e.options?"searchable":e.dateFormat?"date":e.columns?"table":"text":"title"},t.prototype.serialize=function(){var e={};return this.f.forEach(function(t){var n=t.save();for(var i in n)e[i]=n[i]}),e},n.prototype.clone=function(){var e=new n;for(var t in this)"id"!==t&&(e[t]=this[t]);return e},n.prototype.propsEqual=function(e){for(var t in e)if(this[t]!==e[t])return!1;return!0},n.prototype.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return""+e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},n.prototype.applyValue=function(e,t){this.field===e&&(this.value=t,this.isValue&&t===this.resolved&&(this.checked=!0))},DayPilot.Modal.Experimental={},DayPilot.Modal.Experimental.Form=t,r.prototype.select=function(e){return this.Ic=this.data.find(function(t){return t.id===e}),this.Pc(!1),this},r.prototype.create=function(){function e(e){var n=l.strategy;"includes"!==l.strategy&&"startsWith"!==l.strategy&&(n="includes"),e=e||n||"includes",h.style.display="",h.style.top=v.offsetHeight+"px",h.style.left="0px",h.style.width=v.offsetWidth+"px",h.innerHTML="",h.addEventListener("mousedown",function(e){e.preventDefault()}),l.Jc=null,l.q=[];var a=null;l.data.forEach(function(n){var r=n.name||n.id;if("includes"===e){if(r.toLowerCase().indexOf(v.value.toLowerCase())===-1)return}else if("startsWith"===e&&0!==r.toLowerCase().indexOf(v.value.toLowerCase()))return;var o=document.createElement("div");o.className=l.theme+"_list_item",o.innerText=r,o.item=n,n===l.Ic&&(l.Jc=o),a||(a=o),o.addEventListener("mousedown",function(e){i(o),e.preventDefault()}),o.addEventListener("mousemove",function(){l.Jc!==o&&(l.Jc=o,t({dontScroll:!0}))}),h.appendChild(o),l.q.push(o)}),l.Jc||(l.Jc=a),t()}function t(e){e=e||{};var t=!e.dontScroll;document.querySelectorAll("."+l.theme+"_list_item_highlight").forEach(function(e){e.className=e.className.replace(l.theme+"_list_item_highlight","")}),l.Jc&&(l.Jc.className+=" "+l.theme+"_list_item_highlight",t&&!n(l.Jc,h)&&l.Jc.scrollIntoView())}function n(e,t){var n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return n.top>=i.top&&n.bottom<=i.bottom}function i(e){var t=e.item;l.Ic=t,l.Pc(!0),r(),o()}function a(){l.Oc()}function r(){l.s()}function o(){l.Kc=!0,v.setAttribute("readonly","readonly"),v.focus()}function s(){l.Kc=!1,v.removeAttribute("readonly"),v.select(),e("all")}var l=this,d=this,c=document.createElement("div");c.className=this.theme+"_main",c.style.position="relative";var u=document.createElement("div");u.className=this.theme+"_icon",u.style.position="absolute",u.style.right="0",u.style.top="0",u.style.bottom="0",u.style.width="20px",u.addEventListener("mousedown",function(e){e.preventDefault(),l.Kc?(l.focus(),s()):(a(),o())});var h=document.createElement("div");h.className=this.theme+"_list",h.style.display="none",h.style.position="absolute",h.style.zIndex=this.listZIndex;var f=document.createElement("input");f.type="hidden",f.name=this.name,f.searchable=d,this.Nc=f;var v=document.createElement("input");return v.type="text",v.className=this.theme+"_input",v.disabled=this.Hc,v.addEventListener("click",function(){s()}),v.addEventListener("focus",function(){e("all")}),v.addEventListener("input",function(){e()}),v.addEventListener("blur",function(){v.removeAttribute("readonly"),a()}),v.addEventListener("keydown",function(e){if(l.Kc){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;s()}if("ArrowDown"===e.key){var n=d.q.indexOf(d.Jc);n+1<d.q.length&&(d.Jc=d.q[n+1]),t()}else if("ArrowUp"===e.key){var n=d.q.indexOf(d.Jc);n-1>=0&&(d.Jc=d.q[n-1]),t()}else"Enter"===e.key?l.Jc?(e.stopPropagation(),i(l.Jc)):(e.stopPropagation(),a(),o()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),a(),o())}),this.Lc=v,this.Mc=h,this.Ic||(this.Ic=this.data[0],this.Ic&&(v.value=this.Ic.name)),c.appendChild(v),c.appendChild(u),c.appendChild(f),c.appendChild(h),c},r.prototype.Oc=function(){this.s(),this.Ic?this.Lc.value=this.Ic.name:(this.Lc.value="",this.Pc(!0))},r.prototype.focus=function(){this.Kc=!0,this.Lc.setAttribute("readonly","readonly"),this.Lc.focus(),this.Oc()},r.prototype.s=function(){this.Mc.style.display="none"},r.prototype.Pc=function(e){if(this.Nc.value=this.selected?this.selected.id:null,this.Ic?this.Lc.value=this.Ic.name:this.Lc.value="","function"==typeof this.onSelect){var t={control:this,ui:e};this.onSelect(t)}},o.prototype.create=function(){var e=this,t=document.createElement("div");t.className=this.theme+"_main",t.style.position="relative";var n=document.createElement("input");n.type="hidden",n.name=e.name,n.table=this,t.appendChild(n);var i=document.createElement("div");i.className=this.theme+"_table";var a=this.Rc();i.appendChild(a);var r=e.Sc({});r.spacer=!0;var o=this.Tc(r);o.classList.add(e.theme+"_spacer"),i.appendChild(o);var s=document.createElement("div");s.className=e.theme+"_tbody",i.appendChild(s),t.appendChild(i);var l=document.createElement("div");t.appendChild(l),this.nav.body=s,this.nav.table=i,this.nav.main=t,this.nav.after=l;var d=document.createElement("div"),c=document.createElement("span");return c.className=this.theme+"_plus",c.addEventListener("click",function(){if(!e.disabled){var t=e.item.onNewRow,n={};if("function"==typeof t){var i={};i.result=e.form.serialize(),i.value={},t(i),n=i.value}var a=e.Sc(n);e.yc.push(a),e.Uc(),e.Vc()}}),this.nav.plus=c,d.appendChild(c),t.appendChild(d),t},o.prototype.Rc=function(){var e=this,t=document.createElement("div");return t.classList.add(this.theme+"_row"),t.classList.add(this.theme+"_header"),this.item.columns.forEach(function(n){var i=document.createElement("div");i.classList.add(e.theme+"_cell"),i.innerText=n.name,t.appendChild(i)}),t},o.prototype.Wc=function(){var e=this.item.max||0;return!!(e&&this.yc.length>=e)},o.prototype.save=function(){var e=this,t=[];return e.yc.forEach(function(e){var n={};e.cells.forEach(function(e){n[e.id]=e.value}),t.push(n)}),t},o.prototype.load=function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Array expected");this.data=e,this.Xc(),this.Uc()},o.prototype.Yc=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.Wc()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},o.prototype.Xc=function(){var e=this;this.yc=[],this.data.forEach(function(t){var n=e.Sc(t);e.yc.push(n)})},o.prototype.Zc=function(e){var t=this,n=t.yc.indexOf(e);t.yc.splice(n,1)},o.prototype.Sc=function(e){var t=this,n={};return n.data=e,n.cells=[],t.item.columns.forEach(function(i){var a=i.id,r=e[a],o=t.$c(i);if("undefined"==typeof r)if("text"===o)r="";else if("number"===o)r=0;else if("select"===o){var s=i.options;r=s&&s[0].id}var l={};l.id=a,l.value=r,l.type=o,l.data=i,n.cells.push(l)}),n},o.prototype.$c=function(e){var t=e.type;return t||(t=e.options?"select":"text"),t},o.prototype.Uc=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.yc.forEach(function(t){var n=e.Tc(t);e.nav.body.appendChild(n)}),0===this.yc.length){var t=e._c();e.nav.after.appendChild(t)}this.Yc()},o.prototype._c=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},o.prototype.Tc=function(e){var t=this,n=document.createElement("div");n.className=t.theme+"_row",e.cells.forEach(function(i){var a=document.createElement("div");a.className=t.theme+"_cell";var r=t.ad(i);if(e.spacer){var o=document.createElement("div");o.style.height="0px",o.style.overflow="hidden",o.appendChild(r),a.appendChild(o)}else a.appendChild(r);n.appendChild(a)});var i=document.createElement("div");i.classList.add(t.theme+"_cell"),i.classList.add(t.theme+"_rowaction");var a=document.createElement("span");return a.className=this.theme+"_delete",a.addEventListener("click",function(){t.disabled||(t.Zc(e),t.Uc(),t.Vc())}),e.spacer||i.appendChild(a),n.appendChild(i),n},o.prototype.Vc=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},o.prototype.ad=function(e){var t=this,n=e.type;if("text"===n||"number"===n){var i=document.createElement("input");return i.type=n,t.disabled&&(i.disabled=!0),e.value&&(i.value=e.value),i.addEventListener("keyup",function(){"number"===n?e.value=Number(this.value):e.value=this.value,t.Vc()}),i}if("select"===n){var a=document.createElement("select");return t.disabled&&(a.disabled=!0),e.data.options.forEach(function(t){var n=document.createElement("option");n.innerText=t.name,n.value=t.id,n.Gc=t.id,a.appendChild(n),e.value===t.id&&n.setAttribute("selected",!0)}),a.addEventListener("change",function(){var n=a.options[a.selectedIndex];n&&"undefined"!=typeof n.Gc&&(e.value=n.Gc),t.Vc()}),a}throw new Error("Unsupported item type: "+n)},o.prototype.focus=function(){}}}(DayPilot),function(DayPilot){if("undefined"==typeof DayPilot.Month||!DayPilot.Month.events){var e={},t=DayPilot.Util.isVueVNode;e.Month=function(n,i){this.v="${v}",this.nav={};var a=this;this.id=n,this.isMonth=!0,this.api=2,this.backendUrl=null,this.cellHeaderHeight=24,this.cellHeight=100,this.cellMarginBottom=0,this.contextMenu=null,this.cssClassPrefix="month_default",this.eventBarVisible=!0,this.eventBorderRadius=null,this.eventHeight=25,this.eventsLoadMethod="GET",this.headerHeight=30,this.hideUntilInit=!0,this.lineSpace=1,this.locale="en-us",this.showToolTip=!0,this.startDate=new DayPilot.Date,this.theme=null,this.visible=!0,this.weekStarts="Auto",this.width="100%",this.xssProtection="Enabled",this.afterRender=function(){},this.cellHeaderClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventDeleteHandling="Disabled",this.eventMoveHandling="Update",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.headerClickHandling="Enabled",this.timeRangeSelectedHandling="Enabled",this.onCellHeaderClick=null,this.onCellHeaderClicked=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.onBeforeEventRender=null,this.onBeforeCellRender=null,this.cellEvents=[],this.elements={},this.elements.events=[],this.cache={},this.Q=!1,this.R={};var r=this.R;this.X=function(e){var t=JSON.parse(e);return t.CallBackRedirect?void(document.location.href=t.CallBackRedirect):"None"===t.UpdateType?void a.fireAfterRenderDetached(t.CallBackData,!0):(a.events.list=t.Events,"Full"===t.UpdateType&&(a.startDate=t.StartDate,a.timeFormat=t.TimeFormat?t.TimeFormat:a.timeFormat,"undefined"!=typeof t.WeekStarts&&(a.weekStarts=t.WeekStarts),a.hashes=t.Hashes),a.Z(),a.bd(),a.ha(),"Full"===t.UpdateType&&(a.cd(),a.dd()),a.ma(),a.show(),a.na(),void a.fireAfterRenderDetached(t.CallBackData,!0))},this.fireAfterRenderDetached=function(e,t){var n=function(e,t){return function(){a.afterRender&&a.afterRender(e,t)}};window.setTimeout(n(e,t),0)},this.lineHeight=function(){return this.eventHeight+this.lineSpace},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Month.events.add() expects an object or DayPilot.Event instance.";t=e}a.events.list||(a.events.list=[]),a.events.list.push(t),a.update(),a.wa.notify()},this.events.find=function(e){if(!a.events.list)return null;if("function"==typeof e){for(var t=e,n=0;n<a.events.list.length;n++){var i=new DayPilot.Event(a.events.list[n],a);if(t(i))return i}return null}for(var n=0;n<a.events.list.length;n++){var r=a.events.list[n];if(r.id===e)return new DayPilot.Event(r,a)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=a.events.find(e.id);if(t){var n=DayPilot.indexOf(a.events.list,t.data);a.events.list.splice(n,1,e)}}a.update(),a.wa.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var n=a.events.find(e.id);n&&(t=n.data)}else if("string"==typeof e||"number"==typeof e){var n=a.events.find(e);n&&(t=n.data)}var i=DayPilot.indexOf(a.events.list,t);a.events.list.splice(i,1),a.update(),a.wa.notify()},this.events.load=function(e,t,n){var i=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},r=function(e){var n,r=e.request;try{n=JSON.parse(r.responseText)}catch(e){var o={};return o.exception=e,void i(o)}if(DayPilot.isArray(n)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=n,"function"==typeof t&&t(s),s.preventDefault.value)return;a.events.list=n,a.La&&a.update()}};if(a.eventsLoadMethod&&"POST"===a.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":a.visibleStart().toString(),"end":a.visibleEnd().toString()},"url":e,"success":r,"error":i});else{var o=e,s="start="+a.visibleStart().toString()+"&end="+a.visibleEnd().toString();o+=o.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":o,"success":r,"error":i})}},this.events.forRange=function(e,t){e=new DayPilot.Date(e),t=new DayPilot.Date(t);var n=(a.events.list||[]).map(function(e){return new DayPilot.Event(e)});return n.sort(a.zb),n.filter(function(n){var i=n.start(),a=n.end();return i===a&&i===e||DayPilot.Util.overlaps(e,t,i,a)})},this.update=function(e){if(a.sb(e),this.La){if(a.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Month instance that has been disposed.");if(this.cells){a.Z(),a.bd(),a.ha(),a.cd(),a.dd(),a.ma(),a.u(),a.na(),this.visible?this.show():this.hide()}}},this.ub=null,this.sb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?a.events.list=e.list:a.events.list=e}}};this.ub=t;for(var n in e)if(t[n]){var i=t[n];i.data=e[n],i.preInit&&i.preInit()}else a[n]=e[n]}},this.vb=function(){var e=this.ub;for(var t in e){var n=e[t];n.postInit&&n.postInit()}},this.xb={},this.xb.events=[],this.yb=function(e){var t=this.xb.events,n=this.events.list[e],i={};for(var r in n)i[r]=n[r];if("function"==typeof this.onBeforeEventRender){var o={};o.control=a,o.data=i,this.onBeforeEventRender(o)}t[e]=i},this.ha=function(){var e=this.events.list;if(e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Month.events.list expects an array object. You supplied: "+typeof e);if("function"==typeof this.onBeforeEventRender)for(var t=0;t<e.length;t++)this.yb(t);for(var n=0;n<e.length;n++){var i=e[n];if("object"!=typeof i)throw new DayPilot.Exception("Event data item must be an object");if(!i.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!i.end)throw new DayPilot.Exception("Event data item must specify 'end' property");var a=new DayPilot.Date(i.start),r=new DayPilot.Date(i.end);if(!(a.getTime()>r.getTime()))for(var t=0;t<this.rows.length;t++){var o=this.rows[t],s=new DayPilot.Event(i,this);o.belongsHere(s)&&(o.events.push(s),"function"==typeof this.onBeforeEventRender&&(s.cache=this.xb.events[n]))}}for(var l=0;l<this.rows.length;l++){var o=this.rows[l];o.events.sort(this.zb);for(var d=0;d<this.rows[l].events.length;d++){var c=o.events[d],u=o.getStartColumn(c),h=o.getWidth(c);o.putIntoLine(c,u,h,l)}}}},this.Z=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];a.Oa(t)}this.elements.events=[]},this.Oa=function(e){!function(){var n=e.domArgs;if(e.domArgs=null,n&&"function"==typeof a.onBeforeEventDomRemove&&a.onBeforeEventDomRemove(n),n&&"function"==typeof a.onBeforeEventDomAdd){var i=n&&n.Pa;if(i){a.Ra.Qa&&t(n.element)&&(a.Ra.Sa=!0,a.Ra.Ta(i),a.Ra.Sa=!1)}}}(),e.event=null,e.click=null,e.parentNode.removeChild(e)},this.na=function(){this.ed()},this.ed=function(){this.elements.events=[];for(var e=0;e<this.rows.length;e++)for(var t=this.rows[e],n=0;n<t.lines.length;n++)for(var i=t.lines[n],a=0;a<i.length;a++)this.Ua(i[a])},this.zb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var n=e.start().getTime()-t.start().getTime();return 0!==n?n:t.end().getTime()-e.end().getTime()},this.drawShadow=function(t,n,i,r,o){o||(o=0);var s=r;this.shadow={},this.shadow.list=[],this.shadow.start={x:t,y:n},this.shadow.width=r;var l=7*n+t-o;l<0&&(s+=l,t=0,n=0);for(var d=o;d>=7;)n--,d-=7;if(d>t){d>t+(7-this.getColCount())?(n--,t=t+7-d):(s=s-d+t,t=0)}else t-=d;n<0&&(n=0,t=0);var c=null;e.resizingEvent?c="w-resize":e.movingEvent&&(c="move"),this.nav.top.style.cursor=c;var u=a.eventBorderRadius;for("number"==typeof u&&(u+="px");s>0&&n<this.rows.length;){var h=Math.min(this.getColCount()-t,s),f=this.rows[n],v=this.getRowTop(n),p=f.getHeight(),m=document.createElement("div");m.setAttribute("unselectable","on"),m.style.position="absolute",m.style.left=this.getCellWidth()*t+"%",m.style.width=this.getCellWidth()*h+"%",m.style.top=v+"px",m.style.height=p+"px",m.style.cursor=c,m.classList.add(a.L("_shadow"));var g=document.createElement("div");g.setAttribute("unselectable","on"),m.appendChild(g),g.style.position="absolute",g.style.top="0px",g.style.right="0px",g.style.left="0px",g.style.bottom="0px",g.classList.add(a.L("_shadow_inner")),u&&(s===r&&(m.style.borderTopLeftRadius=u,m.style.borderBottomLeftRadius=u,g.style.borderTopLeftRadius=u,g.style.borderBottomLeftRadius=u),s<=h&&(m.style.borderTopRightRadius=u,m.style.borderBottomRightRadius=u,g.style.borderTopRightRadius=u,g.style.borderBottomRightRadius=u)),this.nav.top.appendChild(m),this.shadow.list.push(m),s-=h+7-this.getColCount(),t=0,n++}},this.clearShadow=function(){if(this.shadow){for(var e=0;e<this.shadow.list.length;e++)this.nav.top.removeChild(this.shadow.list[e]);this.shadow=null,this.nav.top.style.cursor=""}},this.getEventTop=function(e,t){for(var n=this.headerHeight,i=0;i<e;i++)n+=this.rows[i].getHeight();return n+=this.cellHeaderHeight,n+=t*this.lineHeight()},this.getDateFromCell=function(e,t){return this.firstDate.addDays(7*t+e)},this.Ua=function(n){var i=n.cache||n.data,r=i.borderRadius||a.eventBorderRadius;"number"==typeof r&&(r+="px");var o=n.part.row,s=n.part.line,l=n.part.colStart,d=n.part.colWidth,c=this.getCellWidth()*l,u=this.getCellWidth()*d,h=this.getEventTop(o,s),f=document.createElement("div");f.setAttribute("unselectable","on"),f.style.height=this.eventHeight+"px",f.style.overflow="hidden",f.className=this.L("_event"),i.cssClass&&DayPilot.Util.addClass(f,i.cssClass),n.part.startsHere||DayPilot.Util.addClass(f,this.L("_event_continueleft")),n.part.endsHere||DayPilot.Util.addClass(f,this.L("_event_continueright")),f.event=n,f.style.width=u+"%",f.style.position="absolute",f.style.left=c+"%",f.style.top=h+"px",this.showToolTip&&n.client.toolTip()&&(f.title=n.client.toolTip()),f.onclick=a.va,f.oncontextmenu=a.fd,f.onmousedown=function(t){t=t||window.event;var i=t.which||t.button;if(t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),1===i)if(e.movingEvent=null,"w-resize"===this.style.cursor||"e-resize"===this.style.cursor){var r={};r.start={},r.start.x=l,r.start.y=o,r.event=f.event,r.width=DayPilot.DateUtil.daysSpan(r.event.start(),r.event.end())+1,r.direction=this.style.cursor,e.resizingEvent=r}else if("move"===this.style.cursor||n.client.moveEnabled()){a.clearShadow();var c=DayPilot.mo3(a.nav.top,t);if(!c)return;var u=a.getCellBelowPoint(c.x,c.y),h=DayPilot.DateUtil.daysDiff(n.start(),a.rows[o].start),v=7*u.y+u.x-(7*o+l);h&&(v+=h);var p={};p.start={},p.start.x=l,p.start.y=o,p.start.line=s,p.offset=a.eventMoveToPosition?0:v,p.colWidth=d,p.event=f.event,p.coords=c,e.movingEvent=p}},f.onmousemove=function(t){if("undefined"!=typeof e&&!e.movingEvent&&!e.resizingEvent){var i=DayPilot.mo3(f,t);if(i){f.deleteIcon&&(f.deleteIcon.style.display="");var a=6;i.x<=a&&n.client.resizeEnabled()?n.part.startsHere?(f.style.cursor="w-resize",f.dpBorder="left"):f.style.cursor="not-allowed":f.clientWidth-i.x<=a&&n.client.resizeEnabled()?n.part.endsHere?(f.style.cursor="e-resize",f.dpBorder="right"):f.style.cursor="not-allowed":n.client.clickEnabled()?f.style.cursor="pointer":f.style.cursor="default"}}},f.onmouseleave=function(){f.deleteIcon&&(f.deleteIcon.style.display="none"),f.style.cursor=""},f.onmouseenter=function(){f.deleteIcon&&(f.deleteIcon.style.display="")};var v=document.createElement("div");if(v.setAttribute("unselectable","on"),v.className=this.L("_event_inner"),
|
|
16
|
+
"darker"===i.borderColor&&i.backColor?v.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):v.style.borderColor=i.borderColor,i.backColor&&(v.style.background=i.backColor),i.fontColor&&(v.style.color=i.fontColor),r&&(f.style.borderRadius=r,v.style.borderRadius=r),f.appendChild(v),n.client.barVisible()){var p=document.createElement("div");p.setAttribute("unselectable","on"),p.className=this.L("_event_bar"),p.style.position="absolute";var m=document.createElement("div");m.setAttribute("unselectable","on"),m.className=this.L("_event_bar_inner"),m.style.top="0%",m.style.height="100%",i.barColor&&(m.style.backgroundColor=i.barColor),p.appendChild(m),f.appendChild(p)}if(n.client.deleteEnabled()){var g=Math.floor(a.eventHeight/2-9),y=document.createElement("div");y.style.position="absolute",y.style.right="2px",y.style.top=g+"px",y.style.width="18px",y.style.height="18px",y.className=a.L("_event_delete"),y.onmousedown=function(e){e.stopPropagation()},y.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&a.ya(t)},y.style.display="none",f.deleteIcon=y,f.appendChild(y)}var b=i.areas?DayPilot.Areas.copy(i.areas):[];if(DayPilot.Areas.attach(f,n,{"areas":b}),"function"==typeof a.onAfterEventRender){var w={};w.e=f.event,w.div=f,a.onAfterEventRender(w)}!function(){var e={};if(e.control=a,e.e=n,e.element=null,f.domArgs=e,"function"==typeof a.onBeforeEventDomAdd&&a.onBeforeEventDomAdd(e),e.element){var i=v;if(i){e.Pa=i;if(t(e.element)){if(!a.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");a.Ra.Sa=!0,a.Ra.Va(e.element,i,{"style":{"flexGrow":1}}),a.Ra.Sa=!1}else i.appendChild(e.element)}}else v.innerHTML=n.client.innerHTML()}(),this.elements.events.push(f),this.nav.events.appendChild(f)},this.lastVisibleDayOfMonth=function(){return this.startDate.lastDayOfMonth()},this.bd=function(){"string"==typeof this.startDate&&(this.startDate=new DayPilot.Date(this.startDate)),this.startDate=this.startDate.firstDayOfMonth(),this.firstDate=this.startDate.firstDayOfWeek(this.getWeekStart());var e=this.lastVisibleDayOfMonth(),t=DayPilot.DateUtil.daysDiff(this.firstDate,e)+1,n=Math.ceil(t/7);this.days=7*n,this.rows=[];for(var i=function(e){var t={};t.start=r.firstDate.addDays(7*e),t.end=t.start.addDays(r.getColCount()),t.events=[],t.lines=[],t.index=e,t.minHeight=r.cellHeight,t.calendar=r,t.belongsHere=function(e){return e.end().getTime()===e.start().getTime()&&e.start().getTime()===this.start.getTime()||!(e.end().getTime()<=this.start.getTime()||e.start().getTime()>=this.end.getTime())},t.getPartStart=function(e){return DayPilot.DateUtil.max(this.start,e.start())},t.getPartEnd=function(e){return DayPilot.DateUtil.min(this.end,e.end())},t.getStartColumn=function(e){var t=this.getPartStart(e);return DayPilot.DateUtil.daysDiff(this.start,t)},t.getWidth=function(e){return DayPilot.DateUtil.daysSpan(this.getPartStart(e),this.getPartEnd(e))+1},t.putIntoLine=function(e,n,i,a){for(var r=t,o=0;o<this.lines.length;o++){var s=this.lines[o];if(s.isFree(n,i))return s.addEvent(e,n,i,a,o),o}var l=[];return l.isFree=function(e,t){for(var n=!0,i=0;i<this.length;i++)e+t-1<this[i].part.colStart||e>this[i].part.colStart+this[i].part.colWidth-1||(n=!1);return n},l.addEvent=function(e,t,n,i,a){e.part.colStart=t,e.part.colWidth=n,e.part.row=i,e.part.line=a,e.part.startsHere=r.start.getTime()<=e.start().getTime(),e.part.endsHere=r.end.getTime()>=e.end().getTime(),this.push(e)},l.addEvent(e,n,i,a,this.lines.length),this.lines.push(l),this.lines.length-1},t.getHeight=function(){return Math.max(this.lines.length*a.lineHeight()+a.cellHeaderHeight+a.cellMarginBottom,this.calendar.cellHeight)},r.rows.push(t)},r=this,o=0;o<n;o++)i(o);this.endDate=this.firstDate.addDays(7*n)},this.visibleStart=function(){return a.firstDate},this.visibleEnd=function(){return a.endDate},this.getHeight=function(){for(var e=this.headerHeight,t=0;t<this.rows.length;t++)e+=this.rows[t].getHeight();return e},this.getWidth=function(e,t){return 7*t.y+t.x-(7*e.y+e.x)+1},this.getMinCoords=function(e,t){return 7*e.y+e.x<7*t.y+t.x?e:t},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Wa=function(){var t=this.nav.top;t.setAttribute("unselectable","on"),t.style.MozUserSelect="none",t.style.KhtmlUserSelect="none",t.style.WebkitUserSelect="none",t.style.position="relative",this.width&&(t.style.width=this.width),t.style.height=this.getHeight()+"px",t.onselectstart=function(){return!1},this.hideUntilInit&&(t.style.visibility="hidden"),this.visible||(t.style.display="none"),t.className=this.L("_main");var n=document.createElement("div");this.nav.cells=n,n.style.position="absolute",n.style.left="0px",n.style.right="0px",n.setAttribute("unselectable","on"),t.appendChild(n);var i=document.createElement("div");this.nav.events=i,i.style.position="absolute",i.style.left="0px",i.style.right="0px",i.setAttribute("unselectable","on"),t.appendChild(i),t.onmousemove=function(t){if(e.resizingEvent){var n=DayPilot.mo3(a.nav.top,t);if(!n)return;var i=a.getCellBelowPoint(n.x,n.y);a.clearShadow();var r=e.resizingEvent,o=void 0,s=void 0;if("w-resize"===r.direction){s=i;var l=r.event.end();l.getDatePart()===l&&(l=l.addDays(-1));var d=a.getCellFromDate(l);o=a.getWidth(i,d)}else s=a.getCellFromDate(r.event.start()),o=a.getWidth(s,i);o<1&&(o=1),a.drawShadow(s.x,s.y,0,o)}else if(e.movingEvent){var n=DayPilot.mo3(a.nav.top,t);if(!n)return;if(n.x===e.movingEvent.coords.x&&n.y===e.movingEvent.coords.y)return;var c=3,u=Math.abs(n.x-e.movingEvent.coords.x)+Math.abs(n.y-e.movingEvent.coords.y);if(u<=c)return;var i=a.getCellBelowPoint(n.x,n.y);a.clearShadow();var h=e.movingEvent.event,f=e.movingEvent.offset,o=a.cellMode?1:DayPilot.DateUtil.daysSpan(h.start(),h.end())+1;o<1&&(o=1),a.drawShadow(i.x,i.y,0,o,f,h)}else if(e.timeRangeSelecting){var n=DayPilot.mo3(a.nav.top,t);if(!n)return;var i=a.getCellBelowPoint(n.x,n.y);a.clearShadow();var s=e.timeRangeSelecting,v=7*s.y+s.x,p=7*i.y+i.x,o=Math.abs(p-v)+1;o<1&&(o=1);var m=v<p?s:i;e.timeRangeSelecting.from={x:m.x,y:m.y},e.timeRangeSelecting.width=o,e.timeRangeSelecting.moved=!0,a.drawShadow(m.x,m.y,0,o,0,null)}}},this.ma=function(){this.nav.top.style.height=this.getHeight()+"px";for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++)this.cells[e][t].style.top=this.getRowTop(t)+"px",this.cells[e][t].style.height=this.rows[t].getHeight()+"px"},this.getCellBelowPoint=function(e,t){for(var n=Math.floor(this.nav.top.clientWidth/this.getColCount()),i=Math.min(Math.floor(e/n),this.getColCount()-1),a=null,r=this.headerHeight,o=0,s=0;s<this.rows.length;s++){var l=r;if(r+=this.rows[s].getHeight(),t<r){o=t-l,a=s;break}}null===a&&(a=this.rows.length-1);var d={};return d.x=i,d.y=a,d.relativeY=o,d},this.getCellFromDate=function(e){for(var t=DayPilot.DateUtil.daysDiff(this.firstDate,e),n={x:0,y:0};t>=7;)n.y++,t-=7;return n.x=t,n},this.dd=function(){var e=document.createElement("div");e.oncontextmenu=function(){return!1},this.nav.cells.appendChild(e),this.cells=[];for(var t=0;t<this.getColCount();t++){this.cells[t]=[];var n=document.createElement("div");n.setAttribute("unselectable","on"),n.style.position="absolute",n.style.left=this.getCellWidth()*t+"%",n.style.width=this.getCellWidth()+"%",n.style.top="0px",n.style.height=this.headerHeight+"px";var i=t+this.getWeekStart();i>6&&(i-=7),n.className=this.L("_header");var a=document.createElement("div");a.setAttribute("unselectable","on"),a.innerHTML=r.locale().dayNames[i],n.appendChild(a),a.style.position="absolute",a.style.top="0px",a.style.bottom="0px",a.style.left="0px",a.style.right="0px",a.className=this.L("_header_inner"),a.innerHTML=r.locale().dayNames[i],e.appendChild(n);for(var o=0;o<this.rows.length;o++)this.gd(t,o,e)}},this.cd=function(){for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++){var n=a.cells[e][t];a.fb(n)}this.nav.cells.innerHTML=""},this.fb=function(e){!function(){var n=e.domArgs;if(e.domArgs=null,n&&"function"==typeof a.onBeforeCellDomRemove&&a.onBeforeCellDomRemove(n),n&&"function"==typeof a.onBeforeCellDomAdd){var i=n&&n.Pa;if(i){a.Ra.Qa&&t(n.element)&&(a.Ra.Sa=!0,a.Ra.Ta(i),a.Ra.Sa=!1)}}}(),e.onclick=null},this.ta=function(){return 2===a.api},this.gd=function(n,i,o){var s=this.rows[i],l=this.firstDate.addDays(7*i+n),d=l.getDay(),c=null;c=1===d?r.locale().monthNames[l.getMonth()]+" "+d:""+d;var u=!a.isWeekend(l),h={"start":l,"end":l.addDays(1),"properties":{"headerHtml":c,"backColor":null,"business":u,"html":null}},f={};f.control=a,f.cell=h,"function"==typeof a.onBeforeCellRender&&a.onBeforeCellRender(f);var v=f.cell.properties,p=document.createElement("div");if(p.setAttribute("unselectable","on"),p.style.position="absolute",p.style.cursor="default",p.style.left=this.getCellWidth()*n+"%",p.style.width=this.getCellWidth()+"%",p.style.top=this.getRowTop(i)+"px",p.style.height=s.getHeight()+"px",p.className=this.L("_cell"),v.business){var m=this.L("_cell_business");DayPilot.Util.addClass(p,m)}var g=document.createElement("div");g.setAttribute("unselectable","on"),p.appendChild(g),g.style.position="absolute",g.style.left="0px",g.style.right="0px",g.style.top="0px",g.style.bottom="0px",g.className=this.L("_cell_inner"),v.backColor&&(g.style.backgroundColor=f.cell.properties.backColor),p.onmousedown=function(){"Disabled"!==a.timeRangeSelectedHandling&&(a.clearShadow(),e.timeRangeSelecting={"root":a,"x":n,"y":i,"from":{x:n,y:i},"width":1})},p.onclick=function(){var e=function(e){var t=new DayPilot.Date(e),n=t.addDays(1);a.O(t,n)};if("Disabled"!==a.timeRangeSelectedHandling)return void e(l)};var y=document.createElement("div");if(y.setAttribute("unselectable","on"),y.style.height=this.cellHeaderHeight+"px",y.className=this.L("_cell_header"),y.onclick=function(e){if("Enabled"===a.cellHeaderClickHandling){e.stopPropagation();var t={};t.control=a,t.start=l,t.end=l.addDays(1),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onCellHeaderClick&&(a.onCellHeaderClick(t),t.preventDefault.value)||"function"==typeof a.onCellHeaderClicked&&a.onCellHeaderClicked(t)}},y.innerHTML=v.headerHtml,g.appendChild(y),v.html){var b=document.createElement("div");b.style.height=s.getHeight()-this.cellHeaderHeight+"px",b.style.overflow="hidden",b.innerHTML=v.html,g.appendChild(b)}!function(){if("function"==typeof a.onBeforeCellDomAdd||"function"==typeof a.onBeforeCellDomRemove){var e={};if(e.control=a,e.cell=h,e.element=null,p.domArgs=e,"function"==typeof a.onBeforeCellDomAdd&&a.onBeforeCellDomAdd(e),e.element){var n=g;if(n){e.Pa=n;if(t(e.element)){if(!a.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");a.Ra.Sa=!0,a.Ra.Va(e.element,n),a.Ra.Sa=!1}else n.appendChild(e.element)}}}}(),this.cells[n][i]=p,o.appendChild(p)},this.getWeekStart=function(){if("Auto"===a.weekStarts){var e=r.locale();return e?e.weekStarts:0}return a.weekStarts||0},this.getColCount=function(){return 7},this.getCellWidth=function(){return 14.285},this.getRowTop=function(e){for(var t=this.headerHeight,n=0;n<e;n++)t+=this.rows[n].getHeight();return t},this.V=function(e,t,n){var i={};i.action=e,i.parameters=n,i.data=t,i.header=this.U();var a="JSON"+JSON.stringify(i);this.backendUrl&&DayPilot.request(this.backendUrl,this.W,a,this.ajaxError)},this.W=function(e){a.X(e.responseText)},this.U=function(){var e={};return e.control="dpm",e.id=this.id,e.v=this.v,e.visibleStart=new DayPilot.Date(this.firstDate),e.visibleEnd=e.visibleStart.addDays(this.days),e.startDate=a.startDate,e.timeFormat=this.timeFormat,e.weekStarts=this.weekStarts,e},this.eventClickCallBack=function(e,t){this.V("EventClick",t,e)},this.va=function(t){e.movingEvent=null,e.resizingEvent=null;var n=t.currentTarget;t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),a.eventClickSingle(n,t)},this.eventClickSingle=function(e,t){var n=e.event;if(n&&n.client.clickEnabled())if(a.ta()){var i={};if(i.e=n,i.control=a,i.div=e,i.originalEvent=t,i.meta=t.metaKey,i.ctrl=t.ctrlKey,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventClick&&(a.wa.apply(function(){a.onEventClick(i)}),i.preventDefault.value))return;switch(a.eventClickHandling){case"CallBack":a.eventClickCallBack(n);break;case"ContextMenu":var r=n.client.contextMenu();r?r.show(n):a.contextMenu&&a.contextMenu.show(n)}"function"==typeof a.onEventClicked&&a.wa.apply(function(){a.onEventClicked(i)})}else switch(a.eventClickHandling){case"CallBack":a.eventClickCallBack(n);break;case"JavaScript":a.onEventClick(n)}},this.fd=function(e){var t=e.currentTarget;return a.xa(t.event),!1},this.xa=function(e){if(this.event=e,!e.client.rightClickEnabled())return!1;var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},"function"!=typeof a.onEventRightClick||(a.onEventRightClick(t),!t.preventDefault.value)){switch(a.eventRightClickHandling){case"ContextMenu":var n=e.client.contextMenu();n?n.show(e):a.contextMenu&&a.contextMenu.show(this.event)}return"function"==typeof a.onEventRightClicked&&a.onEventRightClicked(t),!1}},this.ya=function(e){if(a.ta()){var t={};if(t.e=e,t.control=a,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventDelete&&(a.wa.apply(function(){a.onEventDelete(t)}),t.preventDefault.value))return;switch(a.eventDeleteHandling){case"CallBack":a.eventDeleteCallBack(e);break;case"PostBack":a.eventDeletePostBack(e);break;case"Update":a.events.remove(e)}"function"==typeof a.onEventDeleted&&a.wa.apply(function(){a.onEventDeleted(t)})}else switch(a.eventDeleteHandling){case"PostBack":a.eventDeletePostBack(e);break;case"CallBack":a.eventDeleteCallBack(e);break;case"JavaScript":a.onEventDelete(e)}},this.eventDeleteCallBack=function(e,t){this.V("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.T("EventDelete",t,e)},this.eventMoveCallBack=function(e,t,n,i,a){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var r={};r.e=e,r.newStart=t,r.newEnd=n,r.position=a,this.V("EventMove",i,r)},this.M=function(e,t,n,i,r){var o=e.start().getTimePart(),s=e.end().getDatePart();s.getTime()!==e.end().getTime()&&(s=s.addDays(1));var l=DayPilot.DateUtil.diff(e.end(),s),d=this.getDateFromCell(t,n);d=d.addDays(-i);var c=DayPilot.DateUtil.daysSpan(e.start(),e.end())+1,u=d.addDays(c),h=d.addTime(o),f=u.addTime(l);if(a.ta()){var v={};if(v.e=e,v.control=a,v.newStart=h,v.newEnd=f,v.ctrl=r.ctrlKey,v.shift=r.shiftKey,v.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventMove&&(a.wa.apply(function(){a.onEventMove(v)}),v.preventDefault.value))return;switch(a.eventMoveHandling){case"CallBack":a.eventMoveCallBack(e,h,f);break;case"Update":e.start(h),e.end(f),a.events.update(e)}"function"==typeof a.onEventMoved&&a.wa.apply(function(){a.onEventMoved(v)})}else switch(a.eventMoveHandling){case"CallBack":a.eventMoveCallBack(e,h,f);break;case"JavaScript":a.onEventMove(e,h,f)}},this.eventResizeCallBack=function(e,t,n,i){if(!t)throw"newStart is null";if(!n)throw"newEnd is null";var a={};a.e=e,a.newStart=t,a.newEnd=n,this.V("EventResize",i,a)},this.K=function(e,t,n){var i=e.start().getTimePart(),r=e.end().getDatePart();r.getTime()!==e.end().getTime()&&(r=r.addDays(1));var o=DayPilot.DateUtil.diff(e.end(),r),s=this.getDateFromCell(t.x,t.y),l=s.addDays(n),d=s.addTime(i),c=l.addTime(o);if(a.ta()){var u={};if(u.e=e,u.control=a,u.newStart=d,u.newEnd=c,u.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventResize&&(a.wa.apply(function(){a.onEventResize(u)}),u.preventDefault.value))return;switch(a.eventResizeHandling){case"CallBack":a.eventResizeCallBack(e,d,c);break;case"Update":e.start(d),e.end(c),a.events.update(e)}"function"==typeof a.onEventResized&&a.wa.apply(function(){a.onEventResized(u)})}else switch(a.eventResizeHandling){case"CallBack":a.eventResizeCallBack(e,d,c);break;case"JavaScript":a.onEventResize(e,d,c)}},this.timeRangeSelectedCallBack=function(e,t,n){var i={};i.start=e,i.end=t,this.V("TimeRangeSelected",n,i)},this.O=function(e,t){if(this.ta()){var n={};if(n.control=a,n.start=e,n.end=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onTimeRangeSelect&&(a.wa.apply(function(){a.onTimeRangeSelect(n)}),n.preventDefault.value))return;switch(a.timeRangeSelectedHandling){case"CallBack":a.timeRangeSelectedCallBack(e,t)}"function"==typeof a.onTimeRangeSelected&&a.wa.apply(function(){a.onTimeRangeSelected(n)})}else switch(a.timeRangeSelectedHandling){case"CallBack":a.timeRangeSelectedCallBack(e,t);break;case"JavaScript":a.onTimeRangeSelected(e,t)}},this.wa={},this.wa.scope=null,this.wa.notify=function(){a.wa.scope&&a.wa.scope["$apply"]()},this.wa.apply=function(e){e()},this.clearSelection=function(){a.clearShadow()},this.commandCallBack=function(e,t){var n={};n.command=e,this.V("Command",t,n)},this.isWeekend=function(e){return e=new DayPilot.Date(e),0===e.dayOfWeek()||6===e.dayOfWeek()},this.R.locale=function(){var e=DayPilot.Locale.find(a.locale);return e?e:DayPilot.Locale.US},this.R.da=function(){return"Disabled"!==a.xssProtection},this.debug=function(e){this.debuggingEnabled&&(a.debugMessages||(a.debugMessages=[]),a.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.dispose=function(){var e=a;e.Q||(e.Q=!0,e.cd(),e.Z(),e.nav.top.removeAttribute("style"),e.nav.top.removeAttribute("class"),e.nav.top.innerHTML="",e.nav.top.dp=null,e.nav.top.onmousemove=null,e.nav.top=null)},this.disposed=function(){return this.Q},this.pb=function(){e.globalHandlers||(e.globalHandlers=!0,DayPilot.re(document,"mouseup",e.gMouseUp))},this.loadFromServer=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof a.events.list||!a.events.list)},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){a.visible=!0,a.nav.top.style.display=""},this.hide=function(){a.visible=!1,a.nav.top.style.display="none"},this.wb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Month() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Month: The placeholder element not found: '"+this.id+"'."}},this.Eb=function(){this.bd(),this.Wa(),this.dd(),this.pb(),this.V("Init")},this.$a=function(e,t){return a.R.da()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ra={},this.Ra.Qa=null,this.Ra.Lb=function(e,t,n){var i=a.Ra.Qa;if("function"==typeof i.createVNode&&"function"==typeof i.render){var r=i.createVNode(e,n);i.render(r,t)}},this.Ra.Va=function(e,t,n){var i=a.Ra.Qa;if("function"==typeof i.render){var r=e;DayPilot.isArray(e)&&(r=i.h("div",n,e)),i.render(r,t)}},this.Ra.Ta=function(e){var t=a.Ra.Qa;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=this.sb,this.internal.xssTextHtml=a.$a,this.internal.upd=function(e){a.update(e)},this.internal.enableVue=function(e){a.Ra.Qa=e},this.internal.vueRef=function(){return a.Ra.Qa},this.internal.vueRendering=function(){return a.Ra.Sa},this.init=function(){return this.wb(),this.loadFromServer()?void this.Eb():(this.bd(),this.ha(),this.Wa(),this.dd(),this.u(),this.na(),this.pb(),this.fireAfterRenderDetached(null,!1),this.La=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return a.eventBarVisible}}),this.sb(i)},e.gMouseUp=function(t){if(e.movingEvent){var n=e.movingEvent;if(!n.event)return;if(!n.event.calendar)return;if(!n.event.calendar.shadow)return;if(!n.event.calendar.shadow.start)return;var i=e.movingEvent.event.calendar,a=e.movingEvent.event,r=i.shadow.start,o=i.shadow.position,s=e.movingEvent.offset;return i.clearShadow(),e.movingEvent=null,i.M(a,r.x,r.y,s,t,o),t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),e.movingEvent=null,!1}if(e.resizingEvent){var n=e.resizingEvent;if(!n.event)return;if(!n.event.calendar)return;if(!n.event.calendar.shadow)return;if(!n.event.calendar.shadow.start)return;var i=e.resizingEvent.event.calendar,a=e.resizingEvent.event,r=i.shadow.start,l=i.shadow.width;return i.clearShadow(),e.resizingEvent=null,i.K(a,r,l),t.cancelBubble=!0,e.resizingEvent=null,!1}if(e.timeRangeSelecting){if(e.timeRangeSelecting.moved){var d=e.timeRangeSelecting,i=d.root,r=new DayPilot.Date(i.getDateFromCell(d.from.x,d.from.y)),c=r.addDays(d.width);i.O(r,c)}e.timeRangeSelecting=null}},DayPilot.Month=e.Month,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotMonth=function(e){var t=null,n=this.each(function(){if(!this.daypilot){var n=new DayPilot.Month(this.id);this.daypilot=n;for(var i in e)n[i]=e[i];n.Init(),t||(t=n)}});return 1===this.length?t:n}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotMonth",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,n,i){var a=new DayPilot.Month(n[0]);a.wa.scope=t,a.init();var r=i["id"];r&&(t[r]=a);var o=i["publishAs"];if(o){(0,e(o).assign)(t,a)}for(var s in i)0===s.indexOf("on")&&!function(n){a[n]=function(a){var r=e(i[n]);t["$apply"](function(){r(t,{"args":a})})}}(s);var l=t["$watch"],d=i["config"]||i["daypilotConfig"],c=i["events"]||i["daypilotEvents"];l.call(t,d,function(e){for(var t in e)a[t]=e[t];a.update()},!0),l.call(t,c,function(e){a.events.list=e,a.update()},!0)}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(DayPilot),function(DayPilot){if("undefined"==typeof DayPilot.Navigator||!DayPilot.Navigator.def){var e=DayPilot.Util.isReactComponent,t=DayPilot.Util.isVueComponent,n=DayPilot.Util.isVueVNode;DayPilot.Navigator=function(i,a){function r(e,t,n){var i=this;if(e instanceof r)return e;if("object"==typeof e){var a=e;this.month=a.month,this.x=a.x,this.y=a.y}else this.month=e,this.x=t,this.y=n;this.is=function(e){return this.month===e.month&&this.x===e.x&&this.y===e.y},this.next=function(){var e=i;if(e.x<6)return{"month":e.month,"x":e.x+1,"y":e.y};var t=o.months[e.month];return e.y<t.rowCount-1?{"month":e.month,"x":0,"y":e.y+1}:e.month<o.months.length-1?{"month":e.month+1,"x":0,"y":0}:null},this.visible=function(){var e=this.cell();return!!e.isCurrentMonth||(!(!e.isPrevMonth||!e.showBefore)||!(!e.isNextMonth||!e.showAfter))},this.nextVisible=function(){for(var e=i;!e.visible();){var t=e.next();if(!t)return null;e=new r(t)}return e},this.previous=function(){var e=i;if(e.x>0)return{"month":e.month,"x":e.x-1,"y":e.y};if(e.y>0)return{"month":e.month,"x":6,"y":e.y-1};if(e.month>0){var t=o.months[e.month-1];return{"month":e.month-1,"x":6,"y":t.rowCount-1}}return null},this.previousVisible=function(){for(var e=i;!e.visible();){var t=e.previous();if(!t)return null;e=new r(t)}return e},this.cell=function(){return o.months[this.month].cells[this.x][this.y]},this.date=function(){return this.cell().day},this.before=function(e){return this.date()<new r(e).date()}}this.v="${v}";var o=this;this.id=i,this.api=2,this.isNavigator=!0,this.autoFocusOnClick=!0,this.weekStarts="Auto",this.selectMode="Day",this.titleHeight=30,this.dayHeaderHeight=30,this.bound=null,this.cellWidth=30,this.cellHeight=30,this.cssClassPrefix="navigator_default",this.eventEndSpec="DateTime",this.freeHandSelectionEnabled=!1,this.selectionStart=(new DayPilot.Date).getDatePart(),this.selectionEnd=null,this.selectionDay=null,this.showMonths=1,this.skipMonths=1,this.command="navigate",this.year=(new DayPilot.Date).getYear(),this.month=(new DayPilot.Date).getMonth()+1,this.showToday=!1,this.showWeekNumbers=!1,this.todayHtml=null,this.todayHeight=40,this.todayPosition="Bottom",this.todayText="Today",this.weekNumberAlgorithm="Auto",this.rowsPerMonth="Six",this.orientation="Vertical",this.locale="en-us",this.rtl=!1,this.visible=!0,this.timeRangeSelectedHandling="Bind",this.visibleRangeChangedHandling="Enabled",this.onVisibleRangeChange=null,this.onVisibleRangeChanged=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.onTodayClick=null,this.R={};var s=this.R;this.hd={};var l=this.hd;this.nav={},this.xb={},this.jd=function(){this.root.dp=this,this.root.className=this.L("_main"),"Horizontal"===this.orientation?(s.kd()||(this.root.style.width=this.showMonths*(7*s.cellWidth()+this.ld())+"px"),this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):s.kd()||(this.root.style.width=7*s.cellWidth()+this.ld()+"px"),this.rtl&&(this.root.style.direction="rtl"),this.root.style.position="relative",this.visible||(this.root.style.display="none");var e=document.createElement("input");e.type="hidden",e.name=o.id+"_state",e.id=e.name,this.root.appendChild(e),this.state=e,this.startDate?this.startDate=new DayPilot.Date(this.startDate).firstDayOfMonth():this.selectionDay?this.startDate=new DayPilot.Date(this.selectionDay).firstDayOfMonth():this.startDate=DayPilot.Date.fromYearMonthDay(this.year,this.month),this.calendars=[],this.selected=[],this.months=[]},this.ta=function(){return 2===o.api},this.cd=function(){this.root.innerHTML=""},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.md=function(e,t){var n=this.L("_"+t);DayPilot.Util.addClass(e,n)},this.nd=function(e,t){var n=this.L("_"+t);DayPilot.Util.removeClass(e,n)},this.od=function(){if(!s.kd())return null;var e=7;return this.showWeekNumbers&&e++,100/e},this.pd=function(){return s.kd()?null:s.cellWidth()},this.qd=function(e){return"number"!=typeof e&&(e=1),s.kd()?this.od()*e:this.pd()*e},this.rd=function(e){var t=s.kd()?"%":"px";return this.qd(e)+t},this.dd=function(i,a){var r={};r.cells=[],r.days=[],r.weeks=[];var l=this.startDate.addMonths(i),d=a.before,c=a.after,u=l.firstDayOfMonth(),h=u.firstDayOfWeek(s.weekStarts()),f=u.addMonths(1),v=DayPilot.DateUtil.daysDiff(h,f),p="Auto"===this.rowsPerMonth?Math.ceil(v/7):6;r.rowCount=p;var m=(new DayPilot.Date).getDatePart(),g=7*s.cellWidth()+this.ld();r.width=g;var y=this.cellHeight*p+this.titleHeight+this.dayHeaderHeight;r.height=y;var b=document.createElement("div");if(s.kd()?"Horizontal"===this.orientation&&(b.style.width=100/o.showMonths+"%"):b.style.width=g+"px",b.style.height=y+"px","Horizontal"===this.orientation)b.style.position="absolute",s.kd()?(b.style.left=100/o.showMonths*i+"%",r.leftPct=100/o.showMonths*i):b.style.left=g*i+"px",b.style.top="0px",r.top=0,r.left=g*i;else{b.style.position="relative";var w=i>0?o.months[i-1].top+o.months[i-1].height:0;r.top=w,r.left=0,r.leftPct=0}b.className=this.L("_month"),b.style.cursor="default",b.style.userSelect="none",b.style.webkitUserSelect="none",b.month=r,r.div=b,this.root.appendChild(b);var x=this.titleHeight+this.dayHeaderHeight,_=document.createElement("div");_.style.position="absolute",_.style.left="0px",_.style.right="0px",_.style.top="0px",_.style.width=o.rd(),_.style.height=this.titleHeight+"px",_.style.lineHeight=this.titleHeight+"px",_.className=this.L("_titleleft"),a.left&&(_.style.cursor="pointer",_.innerHTML="<span><</span>",_.onclick=this.sd),b.appendChild(_);var C=document.createElement("div");C.style.position="absolute",C.style.left=o.rd(),C.style.top="0px",C.style.width=o.rd(o.showWeekNumbers?6:5),C.style.height=this.titleHeight+"px",C.style.lineHeight=this.titleHeight+"px",C.className=this.L("_title"),C.innerHTML=s.locale().monthNames[l.getMonth()]+" "+l.getYear(),b.appendChild(C),this.ti=C;var k=document.createElement("div");k.style.position="absolute",k.style.left=o.rd(o.showWeekNumbers?7:6),k.style.right=o.rd(o.showWeekNumbers?7:6),k.style.top="0px",k.style.width=o.rd(),k.style.height=this.titleHeight+"px",k.style.lineHeight=this.titleHeight+"px",k.className=this.L("_titleright"),a.right&&(k.style.cursor="pointer",k.innerHTML="<span>></span>",k.onclick=this.td),b.appendChild(k),this.tr=k;var D=o.showWeekNumbers?1:0;if(this.showWeekNumbers)for(var S=0;S<p;S++){var M=h.addDays(7*S),T=null;switch(this.weekNumberAlgorithm){case"Auto":T=1===s.weekStarts()?M.weekNumberISO():M.weekNumber();break;case"US":T=M.weekNumber();break;case"ISO8601":T=M.weekNumberISO();break;default:throw"Unknown weekNumberAlgorithm value."}var A=document.createElement("div");A.style.position="absolute",A.style.left="0px",A.style.right="0px",A.style.top=S*this.cellHeight+x+"px",A.style.width=o.rd(),A.style.height=this.cellHeight+"px",A.style.lineHeight=this.cellHeight+"px",A.className=this.L("_weeknumber"),A.innerHTML="<span>"+T+"</span>",b.appendChild(A),r.weeks.push(A)}if(o.showWeekNumbers){var A=document.createElement("div");A.style.position="absolute",A.style.left="0px",A.style.right="0px",A.style.top=this.titleHeight+"px",A.style.width=o.rd(),A.style.height=this.dayHeaderHeight+"px",A.className=this.L("_dayheader"),b.appendChild(A)}for(var E=0;E<7;E++){r.cells[E]=[];var A=document.createElement("div");A.style.position="absolute",A.style.left=o.rd(E+D),A.style.right=o.rd(E+D),A.style.top=this.titleHeight+"px",A.style.width=o.rd(),A.style.height=this.dayHeaderHeight+"px",A.style.lineHeight=this.dayHeaderHeight+"px",A.className=this.L("_dayheader"),A.innerHTML="<span>"+this.ud(E)+"</span>",b.appendChild(A),r.days.push(A);for(var H=function(i){var a=h.addDays(7*i+E),u=R.vd(a)&&"none"!==R.wd(),f=a.firstDayOfMonth()===l,v=a<l,p=a>=l.addMonths(1);if("month"===R.wd())u=u&&f;else if("day"===R.wd())u=u&&(f||d&&v||c&&p);else if("week"===R.wd()){var g=a.firstDayOfMonth()===l;u=u&&(g||d&&v||c&&p)}var y=document.createElement("div");r.cells[E][i]=y;var w=o.xd(E,i),x=w.x,_=w.y,C=s.kd()?"%":"px";y.day=a,y.x=E,y.y=i,y.left=x,y.top=_,y.isCurrentMonth=f,y.isNextMonth=p,y.isPrevMonth=v,y.showBefore=d,y.showAfter=c,y.className=R.L(f?"_day":"_dayother"),o.md(y,"cell"),a.getTime()===m.getTime()&&f&&R.md(y,"today"),0!==a.dayOfWeek()&&6!==a.dayOfWeek()||R.md(y,"weekend"),y.style.position="absolute",y.style.left=x+C,y.style.right=x+C,y.style.top=_+"px",y.style.width=o.rd(),y.style.height=R.cellHeight+"px",y.style.lineHeight=R.cellHeight+"px";var k=document.createElement("div");k.style.position="absolute",k.className=a.getTime()===m.getTime()&&f?R.L("_todaybox"):R.L("_daybox"),o.md(k,"cell_box"),k.style.left="0px",k.style.top="0px",k.style.right="0px",k.style.bottom="0px",y.appendChild(k);var D=null;R.cells&&R.cells[a.toStringSortable()]&&(D=R.cells[a.toStringSortable()]);var S=D||{};if(S.day=a,S.isCurrentMonth=f,S.isToday=a.getTime()===m.getTime()&&f,S.isWeekend=0===a.dayOfWeek()||6===a.dayOfWeek(),D?(S.html=D.html||a.getDay(),S.cssClass=D.css):(S.html=a.getDay(),S.cssClass=null),S.events={all:function(){var e;return(null===(e=o.items)||void 0===e?void 0:e[a.toStringSortable()])||[]}},"function"==typeof o.onBeforeCellRender){var M={};M.cell=S,o.onBeforeCellRender(M),D=M.cell}if(D&&DayPilot.Util.addClass(y,D.cssClass||D.css),f||d&&v||c&&p){var T=document.createElement("div");T.innerHTML=a.getDay(),T.style.position="absolute",T.style.left="0px",T.style.top="0px",T.style.right="0px",T.style.bottom="0px",o.md(T,"cell_text"),y.isClickable=!0,D&&D.html&&(T.innerHTML=D.html),y.appendChild(T)}y.onclick=R.yd,function(){if("function"==typeof o.onBeforeCellDomAdd||"function"==typeof o.onBeforeCellDomRemove){var i={};if(i.control=o,i.cell=S,i.element=null,y.domArgs=i,"function"==typeof o.onBeforeCellDomAdd&&o.onBeforeCellDomAdd(i),i.element){var a=k;if(a){i.Pa=a;var r=e(i.element),s=t(i.element),l=n(i.element);if(r){if(!o.zd.reactDOM)throw new DayPilot.Exception("Can't reach ReactDOM");o.zd.Uc(i.element,a)}else if(s){if(!o.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");o.Ra.Sa=!0,o.Ra.Lb(i.element,a,i.props),o.Ra.Sa=!1}else if(l){if(!o.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");o.Ra.Sa=!0,o.Ra.Va(i.element,a),o.Ra.Sa=!1}else a.appendChild(i.element)}}}}(),b.appendChild(y),u&&(o.Ad(b,E,i),R.selected.push(y))},R=this,S=0;S<p;S++)H(S)}var N=document.createElement("div");N.style.position="absolute",N.style.left="0px",N.style.top=x-2+"px",N.style.width=o.rd(7+D),N.style.height="1px",N.style.fontSize="1px",N.style.lineHeight="1px",N.className=this.L("_line"),b.appendChild(N),this.months.push(r)},this.xd=function(e,t){var n=this.titleHeight+this.dayHeaderHeight,i=this.showWeekNumbers?1:0;
|
|
17
|
+
return{"x":o.qd(e+i),"y":t*this.cellHeight+n}},this.Ad=function(e,t,n){var i=e.month.cells[t][n];o.md(i,"select")},this.Bd=function(e,t,n){var i=e.month.cells[t][n];o.nd(i,"select")},this.ld=function(){return this.showWeekNumbers?s.cellWidth():0},this.Cd=function(){var e;if(this.items)for(var t=0;t<this.showMonths;t++)for(var n=0;n<7;n++)for(var i=0;i<6;i++){var a=this.months[t].cells[n][i];a&&((null===(e=this.items[a.day.toStringSortable()])||void 0===e?void 0:e.length)>0?(this.md(a,"busy"),this.nd(a,"free")):(this.nd(a,"busy"),this.md(a,"free")))}},this.Dd=function(){var e={};e.startDate=o.startDate,e.selectionStart=o.selectionStart,e.selectionEnd=o.selectionEnd.addDays(1),o.state.value=JSON.stringify(e)},this.wd=function(){return(this.selectMode||"").toLowerCase()},this.Ed=function(){var e=this.selectionDay||this.selectionStart;switch(e||(e=DayPilot.Date.today()),e=new DayPilot.Date(e),this.wd()){case"day":this.selectionStart=e,this.selectionDay=e,this.selectionEnd=e;break;case"week":this.selectionDay=e,this.selectionStart=e.firstDayOfWeek(s.weekStarts()),this.selectionEnd=this.selectionStart.addDays(6);break;case"month":this.selectionDay=e,this.selectionStart=e.firstDayOfMonth(),this.selectionEnd=this.selectionStart.lastDayOfMonth();break;case"none":this.selectionEnd=e;break;default:throw"Unknown selectMode value."}},this.Fd=null,this.select=function(e,t,n){if(!this.Q){var i=t&&(t instanceof DayPilot.Date||"string"==typeof t),a=t&&"object"==typeof t||"boolean"==typeof t,r=e,s=i?t:null,l=a?t:n;if(!this.La)return void(this.Fd={"date1":r,"date2":s,"options":l});var d=!0,c=!0;l&&"object"==typeof l?(l.dontFocus&&(d=!1),l.dontNotify&&(c=!1)):"boolean"==typeof l&&(d=!l);var u=this.selectionStart,h=this.selectionEnd;this.selectionStart=new DayPilot.Date(r).getDatePart(),this.selectionDay=this.selectionStart;var f=!1;if(d){var v=this.startDate;(this.selectionStart<this.Gd()||this.selectionStart>=this.Hd())&&(v=this.selectionStart.firstDayOfMonth()),v.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=v}s&&o.freeHandSelectionEnabled?o.selectionEnd=new DayPilot.Date(s):this.Ed(),this.cd(),this.jd(),this.Id(),this.Cd(),this.Dd(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.O(),f&&this.Jd()}},this.update=function(e){o.Kd(e)},this.Kd=function(e){if(o.sb(e),this.La){if(o.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");o.Ld();var t={"day":o.selectionDay,"start":o.selectionStart,"end":o.selectionEnd};o.qb(),t.start===o.selectionStart&&t.end===o.selectionEnd&&t.day===o.selectionDay||o.O()}},this.qb=function(){this.cd(),this.jd(),this.ha(),this.Ed(),this.Id(),this.Cd(),this.Dd(),this.visible?this.show():this.hide()},this.Ld=function(){o.xb={}},this.ub=null,this.sb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data;e&&(DayPilot.isArray(e.list)?o.events.list=e.list:o.events.list=e)}}};this.ub=t;for(var n in e)if(t[n]){var i=t[n];i.data=e[n],i.preInit&&i.preInit()}else o[n]=e[n]}},this.vb=function(){var e=this.ub;for(var t in e){var n=e[t];n.postInit&&n.postInit()}},this.V=function(e,t,n){var i={};i.action=e,i.parameters=n,i.data=t,i.header=this.U();var a="JSON"+JSON.stringify(i);this.backendUrl?DayPilot.request(this.backendUrl,this.W,a,this.Md):WebForm_DoCallback(this.uniqueID,a,this.X,null,this.callbackError,!0)},this.Md=function(e){if("function"==typeof o.onAjaxError){var t={};t.request=e,o.onAjaxError(t)}else"function"==typeof o.ajaxError&&o.ajaxError(e)},this.W=function(e){o.X(e.responseText)},this.T=function(e,t,n){var i={};i.action=e,i.parameters=n,i.data=t,i.header=this.U();var a="JSON"+JSON.stringify(i);__doPostBack(o.uniqueID,a)},this.U=function(){var e={};return e.v=this.v,e.startDate=this.startDate,e.selectionStart=this.selectionStart,e.showMonths=this.showMonths,e},this.ud=function(e){var t=e+s.weekStarts();return t>6&&(t-=7),s.locale().dayNamesShort[t]},this.vd=function(e){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=e.getTime()&&e.getTime()<=this.selectionEnd.getTime())},this.Nd=function(e){for(var t=0;t<o.months.length;t++){var n=o.months[t];if(!n)return null;if(e.x<n.left)return null;if(!(n.left+n.width<e.x)&&n.top<=e.y&&e.y<n.top+n.height)return t}return null},this.Od=function(){if(!s.kd())return void(o.Pd=o.cellWidth);var e=o.months[0].cells[0][0],t=e.clientWidth;o.Pd=t,o.months.forEach(function(e){e.width=e.div.clientWidth,"Horizontal"===o.orientation&&(e.left=e.div.offsetLeft),e.cells.forEach(function(e,n){e.forEach(function(e){e.width=t,e.left=n*t})})})},this.Qd=function(e){o.Od();var t=DayPilot.mo3(o.nav.top,e),n=o.Nd(t);if(null===n)return null;var i=o.months[n],a=this.titleHeight+this.dayHeaderHeight;if(i.top<=t.y&&t.y<i.top+a)return{"month":n,"x":0,"y":0,"coords":t,"header":!0};for(var r=0;r<i.cells.length;r++)for(var s=0;s<i.cells[r].length;s++){var l=i.cells[r][s],d=l.top+i.top,c=l.left+i.left;if(c<=t.x&&t.x<c+o.Pd&&d<=t.y&&t.y<d+o.cellHeight)return{"month":n,"x":r,"y":s,"coords":t}}return null},this.Rd=function(e){if(o.freeHandSelectionEnabled){var t=o.Qd(e);t&&!t.header&&(l.start=t),e.preventDefault()}},this.Sd=function(e){if(l.start){var t=o.Qd(e);if(l.end)l.end=t;else if(t){var n=3,i=DayPilot.distance(l.start.coords,t.coords);i>n&&(l.end=t)}l.end&&(l.clear(),l.draw())}},l.start=null,l.drawCell=function(e){var t=o.months[e.month],n=o.xd(e.x,e.y),i=t.top+n.y,a=t.left+n.x,r="px",d=o.rd();if(s.kd()){var c="Horizontal"===o.orientation?o.showMonths:1;a=t.leftPct+n.x/c,r="%",d=o.rd(1/c)}var u=document.createElement("div");u.style.position="absolute",u.style.left=a+r,u.style.top=i+"px",u.style.height=o.cellHeight+"px",u.style.width=d,u.style.backgroundColor="#ccc",u.style.opacity=.5,u.style.cursor="default",o.nav.preselection.appendChild(u),l.cells.push(u)},l.clear=function(){if(l.cells){for(var e=0;e<l.cells.length;e++)o.nav.preselection.removeChild(l.cells[e]);l.cells=[]}},l.draw=function(){var e=l.ordered(),t=new r(e.start),n=e.end;if(n){if(n===l.end&&n.header&&n.month>0){n.month-=1;var i=o.months[n.month];n.x=6,n.y=i.rowCount-1}for(l.cells=[];!t.is(n);){t.visible()&&l.drawCell(t);var a=new r(t).next();if(!a)return;t.month=a.month,t.x=a.x,t.y=a.y}t.visible()&&l.drawCell(t)}},l.ordered=function(){var e=l.start,t=l.end,n={};return!t||new r(e).before(t)?(n.start=e,n.end=t):(n.start=t,n.end=e),n},this.yd=function(e){var t=e.currentTarget,n=t.parentNode,i=t.parentNode.month,a=t.x,r=t.y,s=i.cells[a][r].day;if(i.cells[a][r].isClickable){switch(o.clearSelection(),o.selectionDay=s,o.wd()){case"none":o.selectionStart=s,o.selectionEnd=s;break;case"day":if(o.autoFocusOnClick&&(s<o.Gd()||s>=o.Hd()))return void o.select(s);var l=i.cells[a][r];o.Ad(n,a,r),o.selected.push(l),o.selectionStart=l.day,o.selectionEnd=l.day;break;case"week":if(o.autoFocusOnClick){var d=i.cells[0][r].day,c=i.cells[6][r].day;if(d.firstDayOfMonth()===c.firstDayOfMonth()&&(d<o.Gd()||c>=o.Hd()))return void o.select(s)}for(var u=0;u<7;u++)o.Ad(n,u,r),o.selected.push(i.cells[u][r]);o.selectionStart=i.cells[0][r].day,o.selectionEnd=i.cells[6][r].day;break;case"month":if(o.autoFocusOnClick&&(s<o.Gd()||s>=o.Hd()))return void o.select(s);for(var d=null,c=null,h=0;h<6;h++)for(var f=0;f<7;f++){var l=i.cells[f][h];l&&l.day.getYear()===s.getYear()&&l.day.getMonth()===s.getMonth()&&(o.Ad(n,f,h),o.selected.push(l),null===d&&(d=l.day),c=l.day)}o.selectionStart=d,o.selectionEnd=c;break;default:throw"unknown selectMode"}o.Dd(),o.O()}},this.O=function(e){var t=o.selectionStart,n=o.selectionEnd.addDays(1),i=DayPilot.DateUtil.daysDiff(t,n),a=o.selectionDay;if(e=e||{},o.ta()){var r={};if(r.start=t,r.end=n,r.day=a,r.days=i,r.mode=e.mode||o.selectMode,r.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onTimeRangeSelect&&(o.onTimeRangeSelect(r),r.preventDefault.value))return;switch(o.timeRangeSelectedHandling){case"Bind":var s=o.bound;if(s&&"object"==typeof s){var l={};l.start=t,l.end=n,l.days=i,l.day=a,s.commandCallBack(o.command,l)}break;case"None":break;case"PostBack":o.timeRangeSelectedPostBack(t,n,a)}"function"==typeof o.onTimeRangeSelected&&o.onTimeRangeSelected(r)}else switch(o.timeRangeSelectedHandling){case"Bind":var s=o.bound;if(s&&"object"==typeof s){var l={};l.start=t,l.end=n,l.days=i,l.day=a,s.commandCallBack(o.command,l)}break;case"JavaScript":o.onTimeRangeSelected(t,n,a);break;case"None":break;case"PostBack":o.timeRangeSelectedPostBack(t,n,a)}},this.timeRangeSelectedPostBack=function(e,t,n,i){var a={};a.start=e,a.end=t,a.day=i,this.T("TimeRangeSelected",n,a)},this.td=function(){o.Td(o.skipMonths)},this.sd=function(){o.Td(-o.skipMonths)},this.Td=function(e){this.startDate=this.startDate.addMonths(e),this.cd(),this.jd(),this.Id(),this.Dd(),this.Jd(),this.Cd()},this.Gd=function(){return o.startDate.firstDayOfMonth()},this.Hd=function(){return o.startDate.firstDayOfMonth().addMonths(this.showMonths)},this.visibleStart=function(){return o.startDate.firstDayOfMonth().firstDayOfWeek(s.weekStarts())},this.visibleEnd=function(){return o.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(s.weekStarts()).addDays(42)},this.Jd=function(){var e=this.visibleStart(),t=this.visibleEnd();if(o.ta()){var n={};if(n.start=e,n.end=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof o.onVisibleRangeChange&&(o.onVisibleRangeChange(n),n.preventDefault.value))return;switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"Disabled":}"function"==typeof o.onVisibleRangeChanged&&o.onVisibleRangeChanged(n)}else switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"JavaScript":this.onVisibleRangeChanged(e,t);break;case"Disabled":}},this.visibleRangeChangedCallBack=function(e){var t={};this.V("Visible",e,t)},this.visibleRangeChangedPostBack=function(e){var t={};this.T("Visible",e,t)},this.X=function(e){var t=JSON.parse(e);o.items=t.Items,o.cells=t.Cells,o.cells?o.update():o.Cd()},this.Id=function(){this.showToday&&"Top"===this.todayPosition&&this.Ud();for(var e=0;e<this.showMonths;e++){var t=this.Vd(e);this.dd(e,t)}this.showToday&&"Bottom"===this.todayPosition&&this.Ud(),this.root.style.height=this.Wd()+"px",this.nav.preselection=document.createElement("div"),this.nav.preselection.style.position="absolute",this.nav.preselection.style.left="0px",this.nav.preselection.style.right="0px",this.nav.preselection.style.top="0px",this.root.appendChild(this.nav.preselection)},this.Ud=function(){if(this.showToday){var e=document.createElement("span");e.className=this.L("_todaysection_button"),this.todayHtml?e.innerHTML=this.todayHtml:e.innerText=this.todayText,e.onclick=function(){if("function"==typeof o.onTodayClick){var e={};if(e.preventDefault=function(){this.preventDefault.value=!0},o.onTodayClick(e),e.preventDefault.value)return}o.select(DayPilot.Date.today())};var t=document.createElement("div");t.style.height=this.todayHeight+"px",t.className=this.L("_todaysection"),t.appendChild(e),this.root.appendChild(t)}},this.Wd=function(){var e=0;if(this.showToday&&(e+=this.todayHeight),"Horizontal"===this.orientation){for(var t=0;t<this.months.length;t++){var n=this.months[t];n.height>e&&(e=n.height)}return e}for(var t=0;t<this.months.length;t++){var n=this.months[t];e+=n.height}return e},this.Vd=function(e){if(this.internal.showLinks)return this.internal.showLinks;var t={};return t.left=0===e,t.right=0===e,t.before=0===e,t.after=e===this.showMonths-1,"Horizontal"===this.orientation&&(t.right=e===this.showMonths-1),t},this.wa={},this.wa.scope=null,this.wa.notify=function(){o.wa.scope&&o.wa.scope["$apply"]()},this.zd={},this.zd.reactDOM=null,this.zd.react=null,this.zd.Uc=function(e,t){var n=o.zd.reactDOM;if("function"==typeof n.createRoot){var i=t.Xd;i||(i=n.createRoot(t),t.Xd=i),i.render(e)}else n.render(e,t)},this.zd.Yd=function(e){var t=o.zd.reactDOM;if("function"==typeof t.createRoot){var n=e.Xd;setTimeout(function(){n.unmount()},0)}else t.unmountComponentAtNode(e)},this.Ra={},this.Ra.Qa=null,this.Ra.Lb=function(e,t,n){var i=o.Ra.Qa;if("function"==typeof i.createVNode&&"function"==typeof i.render){var a=i.createVNode(e,n);i.render(a,t)}},this.Ra.Va=function(e,t){var n=o.Ra.Qa;if("function"==typeof n.render){var i=e;DayPilot.isArray(e)&&(i=n.h("div",null,e)),n.render(i,t)}},this.Ra.Ta=function(e){var t=o.Ra.Qa;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=o.sb,this.internal.initialized=function(){return o.La},this.internal.upd=function(e){o.update(e)},this.internal.enableVue=function(e){o.Ra.Qa=e},this.internal.vueRef=function(){return o.Ra.Qa},this.internal.vueRendering=function(){return o.Ra.Sa},this.internal.upd=function(e){o.Kd(e)},s.locale=function(){return DayPilot.Locale.find(o.locale)},s.weekStarts=function(){if("Auto"===o.weekStarts){var e=s.locale();return e?e.weekStarts:0}return o.weekStarts},s.cellWidth=function(){if(o.xb.cellWidth)return o.xb.cellWidth;var e=o.Zd("_cell_dimensions").width;return e||(e=o.cellWidth),o.xb.cellWidth=e,e},s.kd=function(){return"Auto"===o.R.cellWidth()},this.clearSelection=function(){for(var e=0;e<this.selected.length;e++){var t=this.selected[e];o.Bd(t.parentNode,t.x,t.y)}this.selected=[]},this.$d=function(){return!!this.backendUrl&&("undefined"==typeof o.items||!o.items)},this.events={},this.ha=function(){if(DayPilot.isArray(this.events.list)){this.items={};for(var e=0;e<this.events.list.length;e++){var t=this.events.list[e];if(!t.hidden){var n=new DayPilot.Event(t),i=this._d(t);for(var a in i)this.items[a]||(this.items[a]=[]),this.items[a].push(n)}}}},this.Zd=function(e){var t=document.createElement("div");t.style.position="absolute",t.style.top="-2000px",t.style.left="-2000px",t.className=this.L(e);var n=o.root||document.body;n.appendChild(t);var i=t.offsetHeight,a=t.offsetWidth;n.removeChild(t);var r={};return r.height=i,r.width=a,r},this._d=function(e){for(var t=new DayPilot.Date(e.start),n=new DayPilot.Date(e.end),i={},a=t.getDatePart(),r=function(){return"Date"===o.eventEndSpec?a.getTime()<=n.getTime():a.getTime()<n.getTime()};r();)i[a.toStringSortable()]=1,a=a.addDays(1);return i},this.show=function(){o.visible=!0,o.root.style.display=""},this.hide=function(){o.visible=!1,o.root.style.display="none"},this.wb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Navigator() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Navigator: The placeholder element not found: '"+i+"'."}this.root=this.nav.top},this.init=function(){if(this.wb(),!this.root.dp){this.Ed(),this.jd(),this.Id(),this.ha(),this.Cd(),this.ba(),this.ae(),this.pb();if(this.$d()&&this.Jd(),this.La=!0,this.vb(),this.Fd){var e=this.Fd;this.select(e.date1,e.date2,e.options),this.Fd=null}return this}},this.ae=function(){o.nav.top.onmousedown=this.Rd,o.nav.top.onmousemove=this.Sd},this.pb=function(){DayPilot.re(document,"mouseup",o.be)},this.be=function(e){if(l.start&&l.end){var t=DayPilot.mo3(o.nav.top,e);if(t.x===l.start.coords.x&&t.y===l.start.coords.y)return l.start=null,void l.clear();l.clear();var n=l.ordered();n.start=new r(n.start).nextVisible(),n.end=new r(n.end).previousVisible(),o.selectionDay=new r(n.start).date(),o.selectionStart=o.selectionDay,o.selectionEnd=new r(n.end).date(),l.start=null,l.end=null,o.cd(),o.jd(),o.Id(),o.Cd(),o.Dd();o.O({"mode":"FreeHand"})}l.start=null,l.end=null},this.dispose=function(){var e=o;e.root&&(e.root.removeAttribute("style"),e.root.removeAttribute("class"),e.root.dp=null,e.root.innerHTML=null,e.root=null,e.Q=!0)},this.disposed=function(){return this.Q},this.ba=function(){this.root.dispose=this.dispose},this.Init=this.init,this.sb(a)},"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotNavigator=function(e){var t=null,n=this.each(function(){if(!this.daypilot){var n=new DayPilot.Navigator(this.id);this.daypilot=n;for(var i in e)n[i]=e[i];n.Init(),t||(t=n)}});return 1===this.length?t:n}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotNavigator",["$parse",function(e){return{"restrict":"E","template":"<div id='{{id}}'></div>","compile":function(t,n){return t.replaceWith(this["template"].replace("{{id}}",n["id"])),function(t,n,i){var a=new DayPilot.Navigator(n[0]);a.wa.scope=t,a.init();var r=i["id"];r&&(t[r]=a);var o=i["publishAs"];if(o){(0,e(o).assign)(t,a)}for(var s in i)if(0===s.indexOf("on")){var l=DayPilot.Util.shouldApply(s);l?!function(n){a[n]=function(a){var r=e(i[n]);t["$apply"](function(){r(t,{"args":a})})}}(s):!function(n){a[n]=function(a){e(i[n])(t,{"args":a})}}(s)}var d=t["$watch"],c=i["config"]||i["daypilotConfig"],u=i["events"]||i["daypilotEvents"];d.call(t,c,function(e){for(var t in e)a[t]=e[t];a.update()},!0),d.call(t,u,function(e){a.events.list=e,a.ha(),a.Cd()},!0)}}}}])}(),DayPilot.Navigator.def={},"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(DayPilot),function(DayPilot){function e(e){var t=e.touches[0].pageX,n=e.touches[0].pageY,i={};return i.x=t,i.y=n,i}if("undefined"==typeof DayPilot.Scheduler){var t={},n=function(){},i=!1,a=function(){return document.body},r=function(){return document.createElement("div")};DayPilot.Scheduler=function(i,o){this.v="${v}";var s=this;this.isScheduler=!0,this.id=i,this.beforeCellRenderCaching=!0,this.businessBeginsHour=9,this.businessEndsHour=18,this.businessWeekends=!1,this.cellDuration=60,this.cellGroupBy="Day",this.cellSweeping=!0,this.cellSweepingCacheSize=1e3,this.cellWidth=40,this.cellsMarkBusiness=!0,this.cssClassPrefix="scheduler_default",this.days=1,this.durationBarHeight=3,this.durationBarVisible=!0,this.dynamicEventRendering="Progressive",this.dynamicEventRenderingMargin=50,this.dynamicEventRenderingMarginX=null,this.dynamicEventRenderingMarginY=null,this.dynamicEventRenderingCacheSweeping=!1,this.dynamicEventRenderingCacheSize=200,this.eventBorderRadius=null,this.eventEndSpec="DateTime",this.eventHeight=35,this.eventMinWidth=1,this.eventPadding=null,this.eventResizeMargin=5,this.eventTapAndHoldHandling="Move",this.eventTextWrappingEnabled=!1,this.eventsLoadMethod="GET",this.floatingEvents=!DayPilot.browser.ios,this.floatingTimeHeaders=!0,this.headerHeight=30,this.heightSpec="Max",this.height=600,this.locale="en-us",this.progressiveRowRendering=!0,this.progressiveRowRenderingPreload=25,this.rowHeaderWidth=80,this.rowMarginTop=0,this.rowMarginBottom=0,this.rowsLoadMethod="GET",this.scale="CellDuration",this.scrollDelayEvents=200,this.scrollDelayCells=DayPilot.browser.ios?100:0,this.scrollDelayFloats=0,this.scrollDelayRows=0,this.showToolTip=!0,this.snapToGrid=!0,this.startDate=DayPilot.Date.today(),this.tapAndHoldTimeout=300,this.timeHeaders=[{"groupBy":"Default"},{"groupBy":"Cell"}],this.timeHeaderTextWrappingEnabled=!1,this.timeFormat="Auto",this.useEventBoxes="Always",this.visible=!0,this.weekStarts="Auto",this.width=null,this.xssProtection="Enabled",this.zoomLevels=[],this.zoomPosition="left",this.eventClickHandling="Enabled",this.eventDeleteHandling="Disabled",this.eventMoveHandling="Update",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.timeHeaderClickHandling="Enabled",this.timeHeaderRightClickHandling="Enabled",this.timeRangeClickHandling="Enabled",this.timeRangeSelectedHandling="Enabled",this.onEventClick=null,this.onEventClicked=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onRowClick=null,this.onRowClicked=null,this.onTimeHeaderClick=null,this.onTimeHeaderClicked=null,this.onTimeHeaderRightClick=null,this.onTimeHeaderRightClicked=null,this.onTimeRangeClick=null,this.onTimeRangeClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.onBeforeCellRender=null,this.onBeforeEventRender=null,this.onBeforeRowHeaderRender=null,this.onBeforeTimeHeaderRender=null,this.onAfterUpdate=null,this.Q=!1,this.ce=-1,this.ee=!0,this.rowlist=[],this.events={},this.cells={},this.elements={},this.elements.events=[],this.elements.bars=[],this.elements.text=[],this.elements.cells=[],this.elements.linesVertical=[],this.elements.range=[],this.elements.timeHeader=[],this.xb={},this.xb.cells=[],this.xb.linesVertical={},this.xb.linesHorizontal={},this.xb.timeHeaderGroups=[],this.xb.timeHeader={},this.xb.events=[],this.nav={},this.R={};var l=this.R;this.fe={};var d=s.fe;this.ge={};var c=this.ge,u={};this.scrollTo=function(e){s.he(e)},this.he=function(e){if(e){if(!s.La)return void(s.ie=e);var t;if(e instanceof DayPilot.Date)t=this.getPixels(e).left;else if("string"==typeof e)t=this.getPixels(new DayPilot.Date(e)).left;else{if("number"!=typeof e)throw new DayPilot.Exception("Invalid scrollTo() parameter. Accepted parameters: string (ISO date), number (pixels), DayPilot.Date object");t=e}var n=s.je.clientWidth,i=s.nav.scroll.clientWidth;t<0&&(t=0),t>n-i&&(t=n-i),s.ke(t)}},this.scrollToResource=function(e){DayPilot.complete(function(){var t;if("string"==typeof e||"number"==typeof e)t=s.le(e);else{if(!(e instanceof DayPilot.Row))throw new DayPilot.Exception("Invalid scrollToResource() argument: id or DayPilot.Row expected");t=s.le(e.id)}t&&setTimeout(function(){var e=t.top;s.nav.scroll.scrollTop=e},100)})},this.me=function(){if(this.floatingTimeHeaders&&this.timeHeader){var e=s.ne();if(e){s.oe();for(var t=e.pixels.left,n=e.pixels.right+e.sw,i=[],a=0;a<this.timeHeader.length;a++)for(var r=0;r<this.timeHeader[a].length;r++){var o=this.timeHeader[a][r],l=o.left,d=o.left+o.width,c=null;if(l<t&&t<d&&(c={},c.x=r,c.y=a,c.marginLeft=t-l,c.marginRight=0,c.div=s.xb.timeHeader[r+"_"+a],i.push(c)),l<n&&n<d){c||(c={},c.x=r,c.y=a,c.marginLeft=0,c.div=s.xb.timeHeader[r+"_"+a],i.push(c)),c.marginRight=d-n;break}}for(var u=0;u<i.length;u++){var c=i[u];s.pe(c.div,c.marginLeft,c.marginRight)}s.qe()}}},this.se=function(){s.me(),s.te()},this.ve={};var h=s.ve;h.we=function(e,t,n,i){var a=e,r=e+n,o=t,l=t+i;return s.elements.events.filter(function(e){var t=e.event,n=t.part.left,i=t.part.left+t.part.width,d=s.rowlist[t.part.dayIndex],c=d.top+t.part.top,u=c+s.eventHeight;if(DayPilot.Util.overlaps(n,i,a,r)&&DayPilot.Util.overlaps(c,u,o,l))return!0})},h.xe=function(){var e=[],t=s.ne();if(!t)return e;for(var n=t.pixels.left,i=0;i<s.elements.events.length;i++){var a=s.elements.events[i],r=a.event,o=r.part.left,l=r.part.left+r.part.width;o<n&&n<l&&e.push(a)}return e.area=t,e},this.te=function(){if(this.floatingEvents){var e=h.xe();s.ye=performance.now(),e.forEach(function(t){var n=t.event,i=e.area.pixels.left,a=n.part.left,r=i-a;s.ze(t,r,0)}),s.Ae()}},this.elements.sections=[],this.elements.hsections=[],this.pe=function(e,t,n){var i;if(e.section){var a=e.section;return a.style.left=t+"px",a.style.right=n+"px",void(e.Be=!1)}var o=r();o.className=s.L("_timeheader_float"),o.style.position="absolute",o.style.left=t+"px",o.style.right=n+"px",o.style.top="0px",o.style.bottom="0px",o.style.overflow="hidden";var l=r();l.className=s.L("_timeheader_float_inner"),e.Ce=l;var d=e.cell.th,c=!0,u=null===(i=e.domArgs)||void 0===i?void 0:i.element;if(u){var h=l;if(DayPilot.Util.isReactComponent(u)){if(!s.zd.reactDOM)throw new DayPilot.Exception("Can't reach ReactDOM");s.zd.Uc(u,h),c=!1}}if(c&&(l.innerHTML=s.$a(d.text,d.innerHTML)),d.fontColor&&(l.style.color=d.fontColor),o.appendChild(l),o.De={marginLeft:t,marginRight:n},e.section=o,e.insertBefore(o,e.firstChild.nextSibling),u){var f=e.firstChild&&e.firstChild.firstChild;f&&setTimeout(function(){f.style.display="none"},0)}else e.firstChild.innerHTML="";this.elements.hsections.push(e)},this.oe=function(){for(var e=0;e<this.elements.hsections.length;e++){this.elements.hsections[e].Be=!0}},this.qe=function(){for(var e=[],t=0;t<this.elements.hsections.length;t++){var n=this.elements.hsections[t];if(n.Be){var i=n.cell;if(i&&n.firstChild)if(n.domArgs&&n.domArgs.element){var a=n.firstChild&&n.firstChild.firstChild;a&&(a.style.display="");var r=s.zd.reactDOM&&DayPilot.Util.isReactComponent(n.domArgs.element);if(r){var o=n.Ce;s.zd.Yd(o)}}else n.firstChild.innerHTML=s.$a(i.th.text,i.th.innerHTML);DayPilot.de(n.section),n.section=null,n.Be=!1}else e.push(n)}this.elements.hsections=e},this.ze=function(e,t,n){var i=e.section;if(i)return i.De&&i.De.marginLeft===t&&i.De.marginRight===n?void(i.De.stamp=s.ye):(e.section.style.left=t+"px",e.section.style.right=n+"px",void(i.De={marginLeft:t,marginRight:n,stamp:s.ye}));i=r(),i.className=s.L("_event_float"),i.style.position="absolute",i.style.left=t+"px",i.style.right=n+"px",i.style.top="0px",i.style.bottom="0px",i.style.overflow="hidden";var a=r();a.className=s.L("_event_float_inner"),a.innerHTML=e.event.client.html(),i.appendChild(a),i.De={marginLeft:t,marginRight:n,stamp:s.ye},e.section=i,e.insertBefore(i,e.firstChild.nextSibling),e.firstChild.innerHTML="";var o=e.event,l=o.cache||o.data;l.fontColor&&(a.style.color=l.fontColor),this.elements.sections.push(e)},this.Ae=function(){for(var e=[],t=0;t<this.elements.sections.length;t++){var n=this.elements.sections[t];if(n.section&&n.section.De&&n.section.De.stamp===s.ye)e.push(n);else{var i=n.event;i&&(n.firstChild.innerHTML=i.client.html()),DayPilot.de(n.section),n.section=null}}this.elements.sections=e},this.setScrollX=function(e){s.Ee.enabled?(s.Ee.scrollXRequested=e,setTimeout(function(){var e=s.Ee.scrollXRequested;"number"==typeof e&&s.ke(e)},0)):s.ke(e)},this.ke=function(e){var t=s.nav.scroll,n=s.Fe();t.clientWidth+e>n&&(e=n-t.clientWidth),s.divTimeScroll.scrollLeft=e,t.scrollLeft=e},this.setScrollY=function(e){s.Ee.enabled?(s.Ee.scrollYRequested=e,setTimeout(function(){var e=s.Ee.scrollYRequested;"number"==typeof e&&s.Ge(e)},0)):s.Ge(e)},this.Ge=function(e){var t=s.nav.scroll,n=s.ce;t.clientHeight+e>n&&(e=n-t.clientHeight),s.divResScroll.scrollTop=e,t.scrollTop=e},this.setScroll=function(e,t){s.setScrollX(e),s.setScrollY(t)},this.ma=function(){if(this.nav.scroll){!function(){var e=s.Fe();s.je.style.height=s.ce+"px",s.je.style.width=e+"px",e>s.nav.scroll.clientWidth?s.nav.scroll.style.overflowX="auto":s.nav.scroll.style.overflowX="hidden"}();var e=1;this.nav.scroll.style.height="30px";var t=this.Xa(),n=t+this.He()+e;if(t>=0&&(this.nav.scroll.style.height=t+"px",this.Ie.style.height=t+"px"),this.nav.divider&&((!n||isNaN(n)||n<0)&&(n=0),this.nav.divider.style.height=n+"px"),this.nav.top.style.height=n+"px",s.nav.resScrollSpace){var i=30;"Auto"===s.heightSpec&&(i=DayPilot.sh(s.nav.scroll)),s.nav.resScrollSpace.style.height=i+"px"}for(var a=0;a<this.elements.linesVertical.length;a++)this.elements.linesVertical[a].style.height=this.ce+"px"}},this.Je=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart(),this.timeHeader=[];var e=this.timeHeaders;e||(e=[{"groupBy":this.cellGroupBy},{"groupBy":"Cell"}]);for(var t=s.startDate.addDays(s.days),n=0;n<e.length;n++){var i=e[n].groupBy,a=e[n].format;"Default"===i&&(i=this.cellGroupBy);for(var r=[],o=s.startDate;o.ticks<t.ticks;){var d={};if(d.start=o,d.end=this.Ke(d.start,i),d.start.ticks===d.end.ticks)break;d.left=this.getPixels(d.start).left;var c=this.getPixels(d.end).left,u=c-d.left;if(d.width=u,"string"==typeof a?d.text=d.start.toString(a,l.Le()):d.text=this.Me(d,i),u>0){if("function"==typeof this.onBeforeTimeHeaderRender){var h={};h.start=d.start,h.end=d.end,h.text=d.text,h.html=null,h.toolTip=s.$a(d.text),h.backColor=null,h.fontColor=null,h.level=this.timeHeader.length,h.cssClass=null;var f={};f.header=h,f.control=s,this.onBeforeTimeHeaderRender(f),d.text=h.text,d.html=h.html,d.backColor=h.backColor,d.fontColor=h.fontColor,d.toolTip=h.toolTip,d.areas=h.areas,d.cssClass=h.cssClass}r.push(d)}o=d.end}this.timeHeader.push(r)}},this.getPixels=function(e){var t=e.ticks-this.startDate.ticks,n=s.Ab(t),i=s.cellWidth,a=Math.floor(n/i),r=a*i;r=r<0?0:r;var o=r+i;n%i===0&&(o=r);var l=s.Fe();return o=o>l?l:o,{left:n,boxLeft:r,boxRight:o,i:a}},this.getDate=function(e,t,n){var i=this.Ne(e,n);if(!i)return null;var a=i.x,r=s.Oe(a);if(!r)return null;var o=n&&!t?r.end:r.start;return t?o.addTime(this.Pe(i.offset)):o},this.Ne=function(e,t){t&&(e-=1);var n=Math.floor(e/s.cellWidth),i=s.Oe(n);if(!i)return null;var a={};return a.x=n,a.offset=e%s.cellWidth,a.cell=i,a},this.Qe=function(e){var t=e.ticks-this.startDate.ticks,n=60*s.Re()*1e3;if(t<0)return{past:!0};var i=Math.floor(t/n);return{i:i,current:s.Oe(i)}},this.Ab=function(e){var t=60*s.Re()*1e3,n=s.cellWidth;return Math.floor(n*e/t)},this.Pe=function(e){var t=60*s.Re()*1e3,n=s.cellWidth;return Math.floor(e/n*t)},this.Se=function(e){DayPilot.Global.touch.start||t.Te||(s.Ue={},s.va(this,e))},this.va=function(e,t){e.event&&s.Ve(e,t)},this.xa=function(e){if(!DayPilot.Global.touch.active&&!DayPilot.Global.touch.start){var t=this.event;if(e.cancelBubble=!0,e.preventDefault(),!this.event.client.rightClickEnabled())return!1;s.We(e);var n={};if(n.e=t,n.div=this,n.originalEvent=e,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onEventRightClick&&(s.onEventRightClick(n),n.preventDefault.value))return!1;switch(s.eventRightClickHandling){case"ContextMenu":var i=t.client.contextMenu();i?i.show(t):s.contextMenu&&s.contextMenu.show(this.event)}return"function"==typeof s.onEventRightClicked&&s.onEventRightClicked(n),!1}},this.Oe=function(e){var t=s.Re(),n=60*t*1e3;return{start:s.startDate.addTime(e*n),end:s.startDate.addTime((e+1)*n),left:e*s.cellWidth,width:s.cellWidth}},this.Ve=function(e,t){if("boolean"==typeof t)throw new DayPilot.Exception("Invalid _eventClickSingle parameters");var n=e.event;if(n){var i=t.ctrlKey,a=t.metaKey;if(n.client.clickEnabled()){s.We(t);var r={};r.e=n,r.control=s,r.div=e,r.originalEvent=t,r.ctrl=i,r.meta=a,r.shift=t.shiftKey,r.preventDefault=function(){this.preventDefault.value=!0},r.toJSON=function(){return DayPilot.Util.copyProps(r,{},["e","ctrl","meta","shift"])},"function"==typeof s.onEventClick&&(s.onEventClick(r),r.preventDefault.value)||"function"==typeof s.onEventClicked&&s.onEventClicked(r)}}},this.ya=function(e){var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},t.control=s,t.toJSON=function(){return DayPilot.Util.copyProps(t,{},["e"])},"function"!=typeof s.onEventDelete||(s.onEventDelete(t),!t.preventDefault.value)){switch(s.eventDeleteHandling){case"Update":s.events.remove(e)}"function"==typeof s.onEventDeleted&&s.onEventDeleted(t)}},this.getScrollX=function(){return this.nav.scroll.scrollLeft},this.getScrollY=function(){return this.nav.scroll.scrollTop},this.K=function(e,t,n,i){function a(){if(!r.preventDefault.value){switch(r.loaded={},t=r.newStart,n=r.newEnd,s.eventResizeHandling){case"Update":s.Ye(r)}"function"==typeof s.onEventResized&&s.onEventResized(r)}}if("Disabled"!==this.eventResizeHandling){n=s.Xe(n);var r={};r.e=e,r.async=!1,r.loaded=function(){a()},r.newStart=t,r.newEnd=n,r.what=i,r.preventDefault=function(){this.preventDefault.value=!0},r.control=s,r.toJSON=function(){return DayPilot.Util.copyProps(r,{},["e","async","newStart","newEnd"])},"function"==typeof s.onEventResize&&s.onEventResize(r),r.async||a()}},this.qb=function(e){e=e||{},clearTimeout(s.Ze),s.timeHeader=null,s.cellProperties={},s.Je(),s.$e(),s.events._e(),s.R.Ld(),s.clearSelection(),s.ha(),s.af(),s.bf(),s.rb(),s.cf(),s.df(),s.ef(),s.ia(),s.Z(),s.ff(),s.gf={},s.hf(),s.ma(),s.if(),e.immediateEvents?s.na():setTimeout(function(){s.na()},100),this.visible?s.ee!==s.visible&&this.show():this.hide(),this.ee=this.visible,this.se(),s.jf(),this.kf()},this.kf=function(){if("function"==typeof s.onAfterUpdate){var e={};s.onAfterUpdate(e)}},this.update=function(e){if(!s.La)throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that hasn't been initialized.");if(s.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that has been disposed already. Calling .dispose() destroys the object and makes it unusable.");
|
|
18
|
+
u.request(e)},u.timeout=null,u.options=null,u.enabled=!1,u.request=function(e){u.enabled?(clearTimeout(u.timeout),u.lf(e),u.timeout=setTimeout(u.doit)):(u.lf(e),u.doit())},u.lf=function(e){if(e){u.options||(u.options={});for(var t in e)u.options[t]=e[t]}},u.doit=function(){var e=u.options;return u.options=null,s.La?(s.sb(e),s.qb({"immediateEvents":!0}),void s.vb()):void s.sb(e)},this.mf=function(e){e.forEach(function(e){s.nf(e.index)})},this.of=function(e){return e&&0!==e.length?e[0].isRow?e:e.map(function(e){return s.rowlist[e]}):[]},this.pf=function(e,t,n){e=DayPilot.ua(e),e=s.of(e),s.mf(e),this.qf?(this.af(),this.df(),this.ff(),e.forEach(function(e){s.rf(e.index)}),e.forEach(function(e){s.sf(e.index)}),this.if(),this.tf()):(e.forEach(function(e){t||s.rf(e.index),s.sf(e.index)}),e.forEach(function(e){s.uf(e.index)}),s.if()),s.te(),n&&n(),this.hf()},this.Xe=function(e){return"DateTime"===s.eventEndSpec?e:e.getDatePart().ticks===e.ticks?e.addDays(-1):e.getDatePart()},this.vf=function(e){return"DateTime"===s.eventEndSpec?e:e.getDatePart().addDays(1)},this.wf=function(e){return"DateTime"===s.eventEndSpec?e:e.getDatePart()},this.M=function(e,t,n,i,a){if(s.xf=null,"Disabled"!==s.eventMoveHandling){n=s.Xe(n);var r={};r.e=e,r.newStart=t,r.newEnd=n,r.newResource=i,r.ctrl=!1,r.meta=!1,r.shift=!1,a&&(r.shift=a.shiftKey,r.ctrl=a.ctrlKey,r.meta=a.metaKey),r.control=s,r.areaData=DayPilot.Global.movingAreaData,r.toJSON=function(){return DayPilot.Util.copyProps(r,{},["e","newStart","newEnd","newResource","ctrl","meta","shift"])},r.preventDefault=function(){this.preventDefault.value=!0};var o=function(){if(r.loaded=function(){},r.preventDefault.value)return void s.yf();switch(t=r.newStart,n=r.newEnd,s.eventMoveHandling){case"Update":s.Ye(r)}s.yf(),"function"==typeof s.onEventMoved&&s.onEventMoved(r)};r.async=!1,r.loaded=function(){o()},"function"==typeof s.onEventMove&&s.onEventMove(r),r.async||o()}},this.Ye=function(e){var t=e.e,n=e.newStart,i=e.newEnd,a=e.newResource;t.start(n),t.end(i),t.resource(a),s.events.update(t),s.events.zf()},this.Af=function(e){if(e)if(e.args)s.O(e.args.start,e.args.end,e.args.resource);else{var t=s.Bf(e);if(!t)return;s.O(t.start,t.end,t.resource)}},this.O=function(e,t,n){if("Disabled"!==s.timeRangeSelectedHandling){var i=t;t=s.Xe(i);var a={};if(a.control=s,a.start=e,a.end=t,a.resource=n,a.preventDefault=function(){this.preventDefault.value=!0},a.toJSON=function(){return DayPilot.Util.copyProps(a,{},["start","end","resource"])},"function"==typeof s.onTimeRangeSelect){if(s.onTimeRangeSelect(a),a.preventDefault.value)return;e=a.start,t=a.end}t=s.vf(t),s.Cf(s.Df,e,t),s.Ef(s.Df),"function"==typeof s.onTimeRangeSelected&&s.onTimeRangeSelected(a)}},this.Cf=function(e,t,n){if(e){var i,a=n;t.getTime()<s.startDate.getTime()?(e.start.x=0,e.start.time=s.startDate.getTime()):(i=s.Qe(t),e.start.x=i.i,e.start.time=t);var r=s.startDate.addDays(s.days);a.getTime()>r.getTime()?(e.end.x=s.Ff(),e.end.time=r.getTime()):(i=s.Qe(a.addMilliseconds(-1)),e.end.x=i.i,e.end.time=n)}},this.Gf=function(e,t){s.Hf(e,t)},this.Hf=function(e,t){var n={};n.resource=e,n.row=e,n.ctrl=t.ctrlKey,n.shift=t.shiftKey,n.meta=t.metaKey,n.originalEvent=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onRowClick&&(s.onRowClick(n),n.preventDefault.value)||"function"==typeof s.onRowClicked&&s.onRowClicked(n)},this.If=function(e){var t={};t.header=e,t.control=s,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onTimeHeaderClick&&(s.onTimeHeaderClick(t),t.preventDefault.value)||"function"==typeof s.onTimeHeaderClicked&&s.onTimeHeaderClicked(t)},this.getViewport=function(){var e=this.nav.scroll.scrollLeft,t=this.nav.scroll.scrollTop,n={},i=s.Jf(e,t),a=s.Kf(i),r=s.Oe(i.start.x),o=s.Oe(i.end.x);return n.start=s.getDate(e,!0),n.end=s.getDate(e+s.nav.scroll.clientWidth,!0,!0),n.resources=a,r&&(n.topLeft={"start":r.start,"end":r.end,x:i.start.x,y:i.start.y,"resource":a[0]}),o&&(n.bottomRight={"start":o.start,"end":o.end,x:i.end.x,y:i.end.y,"resource":a[a.length-1]}),n.rows=function(){return n.resources.map(function(e){return s.rows.find(e)})},n.events=function(){var e=[];return n.rows().forEach(function(t){e=e.concat(t.events.forRange(n.start,n.end))}),e},n},this.Jf=function(e,t){var n={};n.start={},n.end={};var i=s.Ne(e),a=s.Ne(e+s.nav.scroll.clientWidth);i&&(n.start.x=i.x),a&&(n.end.x=a.x);var r=t,o=t+s.nav.scroll.clientHeight;n.start.y=s.Lf(r).i,n.end.y=s.Lf(o).i,n.start.x=DayPilot.Util.atLeast(n.start.x,0);var l=s.Ff();return n.end.x>=l&&(n.end.x=l-1),n},this.Kf=function(e){e||(e=this.Jf(this.nav.scroll.scrollLeft,this.nav.scroll.scrollTop));var t=[];t.ignoreToJSON=!0;for(var n=e.start.y;n<=e.end.y;n++){var i=s.rowlist[n];i&&t.push(i.id)}return t},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.rb=function(){s.nav.top.className!==s.L("_main")&&(s.nav.top.className=s.L("_main"),s.nav.dh1.className=s.L("_divider_horizontal"),s.nav.dh2.className=s.L("_divider_horizontal"),s.divResScroll.className=s.L("_rowheader_scroll"),s.nav.divider.className=s.L("_divider")+" "+s.L("_splitter"),s.nav.scroll.className=s.L("_scrollable"),s.je.className=s.L("_matrix")+" "+s.L("_grid_main"))},this.ba=function(){this.nav.top.dispose=this.dispose},this.dispose=function(){var e=s;if(e.La&&!e.Q){e.Q=!0;for(var n in e.Mf){var i=e.Mf[n];DayPilot.isArray(i)?i.forEach(function(e){clearTimeout(e)}):clearTimeout(i)}e.Z(),e.divCells=null,e.divCorner=null,e.divEvents=null,e.divHeader&&(e.divHeader.rows=null),e.divHeader=null,e.divLines=null,e.divNorth=null,e.divRange=null,e.divResScroll=null,e.divStretch=null,e.divTimeScroll=null,e.Ie=null,e.je.calendar=null,e.je=null,e.nav.top.onmousemove=null,e.nav.top.onmouseout=null,e.nav.top.dispose=null,e.nav.top.ontouchstart=null,e.nav.top.ontouchmove=null,e.nav.top.ontouchend=null,e.nav.top.removeAttribute("style"),e.nav.top.removeAttribute("class"),e.nav.top.innerHTML="",e.nav.top.dp=null,e.nav.top=null,e.nav.scroll.onscroll=null,e.nav.scroll.root=null,e.nav.scroll=null,t.pc(e),c=null}},this.disposed=function(){return s.Q},this.ca=function(e){var t=null;t=e.nodeType?e.event:e;var n=s.eventBorderRadius;"number"==typeof n&&(n+="px");var i=s.Nf(t),a=s.rowlist,o=s.eventHeight,l=t.part&&t.part.top&&a[t.part.dayIndex]?t.part.top+a[t.part.dayIndex].top:i.top,d=i.left,c=i.width,u=document.createElement("div");u.style.position="absolute",u.style.width=c+"px",u.style.height=o+"px",u.style.left=d+"px",u.style.top=l+"px",u.style.overflow="hidden";var h=r();return u.appendChild(h),u.className=this.L("_shadow"),h.className=this.L("_shadow_inner"),n&&(u.style.borderRadius=n,h.style.borderRadius=n),s.divShadow.appendChild(u),u.calendar=s,u},this.Lf=function(e){for(var t,n=s.rowlist,i={},a=0,r=0,o=n.length,l=0;l<o;l++){var d=n[l];if(r+=d.height,a=r-d.height,t=d,i.top=a,i.bottom=r,i.i=l,i.element=t,e<r)break}return i},this.Of=function(e){if(e>this.rowlist.length-1)throw new DayPilot.Exception("Row index too high");for(var t=0,n=0;n<=e;n++)t+=this.rowlist[n].height;var i=this.rowlist[e];return{top:t-i.height,height:i.height,bottom:t,i:e,data:i}},this.events.find=function(e){if(!s.events.list||"undefined"==typeof s.events.list.length)return null;if("function"==typeof e)return s.Pf(e);for(var t=s.events.list.length,n=0;n<t;n++)if(s.events.list[n].id===e)return new DayPilot.Event(s.events.list[n],s);return null},this.events.findAll=function(e){if("function"==typeof e){for(var t=s.events.list.length,n=[],i=0;i<t;i++){var a=new DayPilot.Event(s.events.list[i],s);e(a)&&n.push(a)}return n}if("object"==typeof e)return s.events.findAll(function(t){for(var n in e)if(e[n]!==t.data[n])return!1;return!0});throw new DayPilot.Exception("function or object argument expected")},this.Pf=function(e){for(var t=s.events.list.length,n=0;n<t;n++){var i=new DayPilot.Event(s.events.list[n],s);if(e(i))return i}return null},this.events.focus=function(e){var t=s.Qf(e);null===t||void 0===t?void 0:t.focus()},this.events.scrollIntoView=function(e){if(s.Qf(e)){var t=e.start(),n=s.getViewport();!DayPilot.Util.overlaps(n.start,n.end,e.start(),e.end())&&DayPilot.Util.overlaps(s.sa(),s.Rf(),e.start(),e.end())&&s.scrollTo(t,"fast","middle");var i=e.resource();s.getViewport().resources.indexOf(i)===-1&&s.scrollToResource(i)}},this.events.all=function(){for(var e=[],t=0;t<s.events.list.length;t++){var n=new DayPilot.Event(s.events.list[t],s);e.push(n)}return e},this.events.forRange=function(e,t){e=e?new DayPilot.Date(e):s.visibleStart(),t=t?new DayPilot.Date(t):s.visibleEnd();for(var n=[],i=0;i<s.events.list.length;i++){var a=new DayPilot.Event(s.events.list[i],s);DayPilot.Util.overlaps(a.start(),a.end(),e,t)&&n.push(a)}return n},this.events.load=function(e,t,n){if(!e)throw new DayPilot.Exception("events.load(): 'url' parameter required");var i=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},a=function(e){var n,a=e.request;try{n=JSON.parse(a.responseText)}catch(e){var r={};return r.exception=e,void i(r)}if(DayPilot.isArray(n)){var o={};if(o.preventDefault=function(){this.preventDefault.value=!0},o.data=n,"function"==typeof t&&t(o),o.preventDefault.value)return;s.events.list=o.data,s.La&&s.update()}};if(s.eventsLoadMethod&&"POST"===s.eventsLoadMethod.toUpperCase())DayPilot.ajax({"method":"POST","contentType":"application/json","data":{"start":s.visibleStart().toString(),"end":s.visibleEnd().toString()},"url":e,"success":a,"error":i});else{var r=e,o="start="+s.visibleStart().toString()+"&end="+s.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+o:"?"+o,DayPilot.ajax({"method":"GET","url":r,"success":a,"error":i})}},this.events.Sf=function(e){var t=[];return s.rowlist.forEach(function(n){s.Tf(n.index);for(var i=0;i<n.events.length;i++){var a=n.events[i].data;if(s.Uf(a,e)){t.push(n),n.events.splice(i,1);break}}}),t},this.events.Vf=function(e){if(!e)return null;for(var t=s.rowlist,n=0;n<t.length;n++){var i=t[n];s.Tf(i.index);for(var a=0;a<i.events.length;a++){var r=i.events[a];if(s.Uf(r.data,e))return i.events[a]}}return null},this.events.Wf=function(e){var t=[],n=s.Xf(),i=DayPilot.indexOf(s.events.list,e);s.yb(i);var a=s.rowlist,r=!1;return a.forEach(function(a){if(!r){s.Tf(a.index);var o=s.Yf(e,a);o&&("function"==typeof s.onBeforeEventRender&&(o.cache=s.xb.events[i]),t.push(a),n||(r=!0))}}),t},this.Uf=function(e,t){return DayPilot.Util.isSameEvent(e,t)},this.events.update=function(e){if("object"==typeof e&&!(e instanceof DayPilot.Event)){var t=s.events.find(e.id);return s.events.remove(t),void s.events.add(e)}if(s.events.list.find(function(t){return s.Uf(t,e.data)})){s.Ee.Zf&&(s.Ee.skip=!0);var n=s.events.Sf(e.data);e.commit(),n=n.concat(s.events.Wf(e.data)),s.events.$f(n)}},this.events.remove=function(e){if(e){if("string"==typeof e||"number"==typeof e){var t=s.events.find(e);return void s.events.remove(t)}var n=s._f(e.data);n&&s.events.list.splice(n.index,1),s.Ee.Zf&&(s.Ee.skip=!0);var i=s.events.Sf(e.data);s.events.$f(i)}},this.events.add=function(e,t,n){n=n||{};var i=n.renderOnly;e instanceof DayPilot.Event||(e=new DayPilot.Event(e)),e.calendar=s,s.events.list||(s.events.list=[]);var a=s._f(e);if(i){if(!a)throw new DayPilot.Exception("Unexpected: event not found in list")}else{if(a)throw new DayPilot.Exception("The event you are trying to add using DayPilot.Scheduler.events.add() is already loaded. A unique ID is required.");a||s.events.list.push(e.data)}if(s.La){s.Ee.Zf&&(s.Ee.skip=!0);var r=s.events.Wf(e.data);s.events.$f(r)}},this.events.ag=function(e){var t=e instanceof DayPilot.Event?e.data:e,n=new DayPilot.Date(t.start),i=new DayPilot.Date(t.end);return!!s.events.list.find(function(e){if(s.Uf(t,e))return!1;if(t.resource!==e.resource)return!1;var a=new DayPilot.Date(e.start),r=new DayPilot.Date(e.end);return DayPilot.Util.overlaps(n,i,a,r)})},this.events.bg={"rows":[]},this.events.cg=null,this.events._e=function(){clearTimeout(s.events.cg),s.events.cg=null,s.events.bg.rows=[]},this.events.dg=0,this.events.$f=function(e){var t=s.events.bg.rows;e.forEach(function(e){t.push(e)}),s.events.bg.rows=DayPilot.ua(t);var n=s.events.zf;s.events.cg||(s.events.cg=setTimeout(n,s.events.dg))},this.events.zf=function(){clearTimeout(s.events.cg),s.events.cg=null;var e=s.events.bg.rows;s.events.bg.rows=[],s.eg(e),s.fg(),s.La&&(s.qf&&s.af(),s.ma(),s.pf(e))},this.Ee={},this.Ee.enabled=!1,this.Ee.skip=!1,this.Ee.skipUpdate=function(){return s.Ee.skip},this.Ee.skipped=function(){s.Ee.skip=!1},this.Ee.gg=!1,this.Ee.Zf=!1,this.zd={},this.zd.reactDOM=null,this.zd.react=null,this.hg=function(e){var t=s.startDate;if(e.ticks===t.ticks)return e;var n=t;if(e.ticks<t.ticks){for(;n.ticks>e.ticks;)n=n.addTime(60*-s.Re()*1e3);return n}var i=this.Qe(e);if(i.current)return i.current.start;throw new DayPilot.Exception("getBoxStart(): time not found")},this.Nf=function(e){var n=this.Lf(s.coords.y);if("function"!=typeof e.end)throw new DayPilot.Exception("e.end function is not defined");if(!e.end())throw new DayPilot.Exception("e.end() returns null");var i=DayPilot.DateUtil.diff(e.rawend(),e.start());i=DayPilot.Util.atLeast(i,1);var a=l.ig(i),r=0,o=s.coords.x;a&&(r=e.start().getTime()-this.hg(e.start()).getTime());var d=0;if(t.jg)if(a){var c=e.start(),u=this.hg(c);d=t.jg.getTime()-u.getTime();var h=60*s.Re()*1e3;d=Math.floor(d/h)*h}else d=t.jg.getTime()-e.start().getTime();var f=this.getDate(o,!0).addTime(-d);t.kg&&(f=e.start());var v=s.snapToGrid;v&&(f=this.hg(f)),f=f.addTime(r);var p=f.addTime(i),m=f,g=p,y=this.getPixels(m),b=this.getPixels(g),w=v?y.boxLeft:y.left,x=v&&a?b.boxRight-w:b.left-w,_={};return _.top=n.top,_.left=w,_.row=n.element,_.rowIndex=n.i,_.width=x,_.start=f,_.end=p,_.relativeY=s.coords.y-n.top,_},this.Re=function(){switch(this.scale){case"CellDuration":return this.cellDuration;case"Minute":return 1;case"Hour":return 60;case"Day":return 1440;case"Week":return 10080}throw new DayPilot.Exception("can't guess cellDuration value")},this.lg=function(e){return e.end.ticks-e.start.ticks},this.mg=function(){var e=t.ng.width,n=t.ng.left,i=t.og,a=t.kg.dpBorder,r=null,o=null,l=s.snapToGrid,d=!l;"left"===a?(r=s.getDate(n,d),o=i.rawend()):"right"===a&&(r=i.start(),o=s.getDate(n+e,d,!0)),t.ng.start=r,t.ng.end=o},this.pg=function(){var e=s.coords,n=t.kg.dpBorder,i=t.kg.event,a=i.part.left;"right"===n&&(a+=i.part.width);var r,o,l=t.kg.event.calendar.cellWidth,d=i.part.width,c=i.part.left,u=0,h=e.x-a,f=s.snapToGrid;if("right"===n){if(r=c,f){var v=s.Ne(d+c+h).cell,p=s.Ne(c).cell,m=p.left+p.width-c;o=v.left+v.width-c,o<m&&(o=m)}else o=d+h;var g=s.Fe();c+o>g&&(o=g-c),t.ng.left=c,t.ng.width=o,t.ng.style.left=c+"px",t.ng.style.width=o+"px"}else{if("left"!==n)throw new DayPilot.Exception("Invalid dpBorder.");f?(h>=d&&(h=d),r=Math.floor((c+h+0)/l)*l,r<u&&(r=u)):r=c+h,o=d-(r-c);var y=c+d,b=l;f?"Never"===s.useEventBoxes&&(b=d<l?d:1):b=1,o<b&&(o=b,r=y-o),t.ng.left=r,t.ng.width=o,t.ng.style.left=r+"px",t.ng.style.width=o+"px"}s.mg()},this.qg=function(){if(s.coords&&t.rg){var e=t.sg,n=this.Nf(t.rg);e.row=n.row,e.style.height=DayPilot.Util.atLeast(n.row.height,0)+"px",e.style.top=n.top+"px",e.style.left=n.left+"px",e.style.width=n.width+"px",e.start=n.start,e.end=n.end}},this.tg=function(){return this.rowHeaderWidth},this.ug=function(){return this.vg(s.progressiveRowRenderingPreload)},this.vg=function(e){e=e||0;var t=0,n=s.rowlist.length;if(s.progressiveRowRendering){var i=s.ne();t=i.yStart,n=i.yEnd+1,t=DayPilot.Util.atLeast(0,t-e),n=Math.min(s.rowlist.length,n+e)}return{"start":t,"end":n}},this.bf=function(){function e(){var e=s.divHeader;e&&(e.rows=[]);var t=e;t&&(t.innerHTML="")}this.wg=!0;var t=this.tg();e();var i=this.divHeader;if(i.style.width=t+"px",i.style.height=s.ce+"px",s.divHeader=i,s.progressiveRowRendering)n();else for(var a=this.rowlist.length,r=0;r<a;r++)s.xg(r);s.yg(),this.divResScroll.appendChild(i)},this.zg=function(){if(s.progressiveRowRendering)for(var e=this.ug(),t=0;t<s.rowlist.length;t++)e.start<=t&&t<e.end?s.xg(t):s.Ag(t)},this.yg=function(){if(!s.R.Bg()){var e=s.divHeader,t=r();t.style.position="absolute",e.appendChild(t),s.nav.resScrollSpace=t;var n=r();n.style.position="relative",n.style.height="100%",n.className=this.L("_rowheader"),t.appendChild(n);var i=this.tg();t.style.width=i+"px",t.style.top=this.ce+"px"}},this.Ag=function(e){var t=s.divHeader.rows[e];t&&(DayPilot.de(t),s.divHeader.rows[e]=null)},this.nf=function(e){this.Ag(e),this.xg(e)},this.xg=function(e){var t=s.rowlist,n=s.divHeader;if(n&&!n.rows[e]){var i=this.tg(),a=t[e];if(a){var o=this.Cg(a),l=r();l.style.position="absolute",l.style.top=a.top+"px",n.rows[e]=l,l.row=a,l.index=e;var d=o.row,c=this.rowHeaderWidth;l.style.width=c+"px",l.style.border="0px none";var u=d.toolTip||d.toolTip;u&&(l.title=u),"undefined"!=typeof d.ariaLabel?l.setAttribute("aria-label",d.ariaLabel):l.setAttribute("aria-label",d.text||""),l.onclick=s.Dg;var h=r();h.style.width=c+"px",h.className=this.L("_rowheader"),d.cssClass&&DayPilot.Util.addClass(h,d.cssClass),d.cssClass&&DayPilot.Util.addClass(h,d.cssClass);var f=d.backColor||d.backColor;f&&(h.style.background=f);var v=d.fontColor||d.fontColor;v&&(h.style.color=v);var p=d.horizontalAlignment||d.horizontalAlignment;p&&(h.style.textAlign=p),h.style.height=a.height+"px",h.style.overflow="hidden",h.style.position="relative";var m=r();switch(m.className=this.L("_rowheader_inner"),p){case"right":m.style.justifyContent="flex-end";break;case"left":m.style.justifyContent="flex-start";break;case"center":m.style.justifyContent="center"}h.appendChild(m);var g=d.areas||[],y=s.Eg(a);DayPilot.Areas.attach(h,y,{areas:g});var b=r();b.style.position="absolute",b.style.bottom="0px",b.style.width="100%",b.style.height="0px",b.style.boxSizing="content-box",b.style.borderBottom="1px solid transparent",b.className=this.L("_resourcedivider"),h.appendChild(b);var w=r(),x=r();x.innerHTML=s.$a(d.text,d.html),x.className=s.L("_rowheader_inner_text"),l.textDiv=x,l.cellDiv=h,w.appendChild(x),m.appendChild(w);var _=d.verticalAlignment||d.verticalAlignment;if(_)switch(m.style.display="flex",_){case"center":m.style.alignItems="center";break;case"top":m.style.alignItems="flex-start";break;case"bottom":m.style.alignItems="flex-end"}l.appendChild(h),n.appendChild(l),h.style.width=i+"px"}}},this.Dg=function(e){var t=this.row,n=s.Eg(t,this.index);s.Gf(n,e)},this.Fg=function(){if("Disabled"!==s.timeHeaderClickHandling){var e={};e.start=this.cell.start,e.level=this.cell.level,e.end=this.cell.end,e.end||(e.end=new DayPilot.Date(e.start).addMinutes(s.Re())),s.If(e)}},this.Gg=function(e){if("Disabled"!==s.timeHeaderRightClickHandling){e.cancelBubble=!0,e.preventDefault();var t={};t.start=this.cell.start,t.level=this.cell.level,t.end=this.cell.end,t.end||(t.end=new DayPilot.Date(t.start).addMinutes(s.Re()));var n={};n.header=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof s.onTimeHeaderRightClick&&(s.onTimeHeaderRightClick(n),n.preventDefault.value)||"function"==typeof s.onTimeHeaderRightClicked&&s.onTimeHeaderRightClicked(n)}},this.Eg=function(e){return new DayPilot.Row(e,s)},this.Tf=function(e){var t=s.rowlist,n=t[e];n.events||n.resetEvents()},this.Hg={},this.ha=function(e){if(e?this.events.list=e:this.events.list||(this.events.list=[]),null!=this.events.list&&!DayPilot.isArray(this.events.list))throw new DayPilot.Exception("DayPilot.Scheduler.events.list expects an array object");c.prepareRows(!0);var t,n=this.events.list,i="function"==typeof this.onBeforeEventRender;s.Hg={};for(var a=0;a<n.length;a++){var r=n[a];if(r){if("object"!=typeof r)throw new DayPilot.Exception("Event data item must be an object");if(!r.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(r instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Scheduler: DayPilot.Event object detected in events.list array. Use raw event data instead.");if(!("string"==typeof r.id||"number"==typeof r.id))throw new DayPilot.Exception("All events must have an id property (string or number)");var o="_"+r.id;if(s.Hg[o])throw new DayPilot.Exception("Duplicate event IDs are not allowed: "+o);s.Hg[o]=!0,i&&this.yb(a),t=s.Ig(r.resource);for(var l=0;t&&l<t.length;l++){var d=t[l],u=this.Yf(r,d);u&&i&&(u.cache=this.xb.events[a])}}}s.rowlist.forEach(function(e){s.Jg(e)}),s.fg()},c.rowcache={},c.prepareRows=function(e){c.rowcache={};for(var t=s.rowlist,n=0;n<t.length;n++){var i=t[n];if(e&&i.resetEvents(),s.Tf(i.index),i.id){var a=typeof i.id+"_"+i.id;c.rowcache[a]||(c.rowcache[a]=[]),c.rowcache[a].push(i)}}},this.Ig=function(e){var t=typeof e+"_"+e;return c.rowcache[t]||[]},this.Xf=function(){for(var e={},t=0;t<s.rowlist.length;t++){var n=s.rowlist[t],i=n.id;if(e[i])return!0;e[i]=!0}return!1},this.yb=function(e){var t=this.xb.events,n=this.events.list[e],i={};n instanceof DayPilot.Event&&(n=n.data);for(var a in n)i[a]=n[a];if("string"==typeof i.start&&(i.start=new DayPilot.Date(i.start)),"string"==typeof i.end&&(i.end=new DayPilot.Date(i.end)),"function"==typeof this.onBeforeEventRender){var r={};r.e=i,r.data=i,this.onBeforeEventRender(r)}t[e]=i},this.Jg=function(e){e.lines=[],e.sections=null,e.events.sort(this.zb);for(var t=0;t<e.events.length;t++){var n=e.events[t];e.putIntoLine(n)}},this.eg=function(e){e=DayPilot.ua(e),e=s.of(e),e.forEach(function(e){s.Jg(e)}),e.forEach(function(e){s.Kg(e)})},this.Yf=function(e,t){var n=new DayPilot.Date(e.start),i=new DayPilot.Date(e.end);i=s.vf(i);var a=n.ticks,r=i.ticks,o=s.startDate.ticks,d=s.startDate.addDays(s.days).ticks;if(r<a)return null;var c=null;if("function"==typeof s.onBeforeEventRender){var u=DayPilot.indexOf(s.events.list,e);c=s.xb.events[u]}if(t.id!==e.resource||(r<=o||a>=d)&&(a!==r||a!==o))return null;var h=new DayPilot.Event(e,s);h.part.dayIndex=s.rowlist.indexOf(t),h.part.start=o<a?n:s.startDate,h.part.end=d>r?i:s.startDate.addDays(s.days);var f=this.getPixels(h.part.start),v=this.getPixels(h.part.end);h.part.start===h.part.end&&(v=this.getPixels(h.part.end.addMilliseconds(1)));var p=f.left,m=v.left;if(l.ig(r-a)){var g=f.boxLeft,y=v.boxRight;h.part.left=g,h.part.width=y-g,h.part.barLeft=Math.max(p-h.part.left,0),h.part.barWidth=Math.max(m-p,1)}else h.part.left=p,h.part.width=Math.max(m-p,1),h.part.barLeft=0,h.part.barWidth=Math.max(m-p,1);var b=s.eventMinWidth;return h.part.width=Math.max(h.part.width,b),h.part.right=h.part.left+h.part.width,h.cache=c,t.events.push(h),h},this.zb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var n=e.start().ticks-t.start().ticks;return 0!==n?n:t.end().ticks-e.end().ticks},this.rows={},this.rows.all=function(){for(var e=[],t=0;t<s.rowlist.length;t++){var n=s.Eg(s.rowlist[t]);e.push(n)}return e},this.rows.each=function(e){s.rows.all().forEach(e)},this.rows.forEach=function(e){s.rows.all().forEach(e)},this.rows.find=function(e,t){if("string"==typeof e||"number"==typeof e||!e&&t){var n=s.Ig(e);e||(n=s.rowlist);var i=null;return"string"==typeof t||t instanceof DayPilot.Date?(t=new DayPilot.Date(t),i=n.find(function(e){return t===e.start})):i=n[0],i?new DayPilot.Row(i,s):null}if("function"!=typeof e)throw new DayPilot.Exception("Invalid rows.find() argument: id or function expected");var a=t||0,r=s.rowlist.find(function(t,n){return!(n<a)&&e(s.Eg(t))});if(r)return s.Eg(r)},this.rows.load=function(e,t,n){if(!e)throw new DayPilot.Exception("rows.load(): 'url' parameter required");var i=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof n&&n(t)},a=function(e){var n,a=e.request;try{n=JSON.parse(a.responseText)}catch(e){var r={};return r.exception=e,void i(r)}if(DayPilot.isArray(n)){var o={};if(o.preventDefault=function(){this.preventDefault.value=!0},o.data=n,"function"==typeof t&&t(o),o.preventDefault.value)return;s.resources=o.data,s.La&&s.update()}};s.rowsLoadMethod&&"POST"===s.rowsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":a,"error":i}):DayPilot.ajax({"method":"GET","url":e,"success":a,"error":i})},this.rows.remove=function(e){if("number"==typeof e||"string"==typeof e){var t=s.rows.find(e);if(!t)throw new DayPilot.Exception("The row to be removed was not found");return void s.rows.remove(t)}var n=e.$.row.resource,i=DayPilot.indexOf(s.resources,n);s.resources.splice(i,1),s.update()},this.rows.add=function(e){s.resources.push(e),s.qb()},this.rows.update=function(e){if(!(e instanceof DayPilot.Row||"object"==typeof e))throw new DayPilot.Exception("DayPilot.Scheduler.rows.update() expects a DayPilot.Row object or a data object.");if(!(e instanceof DayPilot.Row)){var t=e;if(e=s.rows.find(t.id),!e)return;e.data=t}var n=e.index,i=s.rowlist,a=i[n],r=e.data,o=s.Lg(r),l=s.Mg(o);l.level=a.level,l.index=n,l.top=a.top,l.height=a.height,i[n]=l,l.resetEvents(),s.Tf(l.index),s.Ng(l),s.Jg(l),s.nf(l.index),s.ff(),s.if()},this.Ng=function(e){for(var t=s.events.list,n=t.length,i="function"==typeof s.onBeforeEventRender,a=0;a<n;a++){var r=t[a];if(r){if(r instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Scheduler: DayPilot.Event object detected in events.list array. Use raw event data instead.");if(r.resource===e.id){i&&this.yb(a);var o=this.Yf(r,e);o&&i&&(o.cache=this.xb.events[a])}}}},this.$e=function(){var e=this.resources;if({}.i=0,null!=e&&!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Scheduler.resources expects an array object");e=e||[],s.rowlist=[],this.Og(e)},this.sa=function(){return new DayPilot.Date(this.startDate)},this.Rf=function(){return new DayPilot.Date(s.startDate).addDays(s.days)},this.visibleStart=function(){return this.sa()},this.visibleEnd=function(){return this.Rf()},this.Mg=function(e){var t={};return t.backColor=e.backColor,t.fontColor=e.fontColor,t.cssClass=e.cssClass,t.name=e.name,t.html=s.$a(e.name,e.html),t.id=e.id,t.toolTip=e.toolTip,t.areas=e.areas,t.tags=e.tags,t.height=s.eventHeight,t.level=0,t.resource=e.De,t.lines=[],t.isRow=!0,t.getHeight=function(){return Math.max(s.eventHeight,this.lines.length*s.eventHeight)},t.resetEvents=function(){var e=t;e.events=[],e.events.forRange=function(t,n){t=new DayPilot.Date(t),n=n?new DayPilot.Date(n):s.startDate.addDays(s.days);for(var i=[],a=0;a<e.events.length;a++){var r=e.events[a],o=s.vf(r.end());DayPilot.Util.overlaps(r.start(),o,t,n)&&i.push(r)}return i}},t.Pg=function(){var e=[];return e.add=function(e){this.push(e)},e.isFree=function(e,t,n){for(var i=e+t-1,a=this.length,r=0;r<a;r++){var o=this[r];if(!(i<o.part.left||e>o.part.left+o.part.width-1)){if(DayPilot.contains(n,o.data))continue;return!1}}return!0},e},t.findFreeLine=function(e,n){for(var i=0;i<this.lines.length;i++){if(this.lines[i].isFree(e,n))return i}var a=t.Pg();return this.lines.push(a),this.lines.length-1},t.putIntoLine=function(e){var n=t.findFreeLine(e.part.left,e.part.width);return this.lines[n].add(e),n},t},this.Og=function(e){if(e)for(var t=s.rowlist,n=0;n<e.length;n++)if(e[n]){var i={};i.index=n;var a=this.Lg(e[n],i),r=s.Mg(a,parent);r.index=n,t.push(r)}},this.Cg=function(e){var t={};return t.row=this.Eg(e),DayPilot.Util.copyProps(e,t.row,["html","backColor","fontColor","cssClass","toolTip","areas"]),"function"==typeof this.onBeforeRowHeaderRender&&this.onBeforeRowHeaderRender(t),t},this.Lg=function(e,t){var n={get $data(){return this.De}};for(var i in t)n[i]=t[i];for(var a in e)n[a]=e[a];return n.html=s.$a(e.name,e.html),n.De=e,n},this.Qg=function(){this.nav.top.dp=this,this.nav.top.innerHTML="",DayPilot.Util.addClass(this.nav.top,this.L("_main")),this.nav.top.setAttribute("role","region"),this.nav.top.setAttribute("aria-label","scheduler"),this.nav.top.style.userSelect="none",this.nav.top.style.webkitUserSelect="none",this.nav.top.style.WebkitTapHighlightColor="rgba(0,0,0,0)",this.nav.top.style.WebkitTouchCallout="none",this.width&&(this.nav.top.style.width=this.width),this.nav.top.style.lineHeight="1.2",this.nav.top.style.position="relative",this.visible||(this.nav.top.style.display="none"),this.nav.top.ontouchstart=d.Rg,this.nav.top.ontouchmove=d.Sg,this.nav.top.ontouchend=d.Tg;var e=this.rowHeaderWidth,t=r();t.style.position="absolute",t.style.left="0px",t.style.width=e+"px";var n=r();n.style.height="0px",n.style.boxSizing="content-box",n.style.borderTop="1px solid transparent",n.className=this.L("_divider_horizontal"),this.nav.dh1=n,this.nav.left=t,t.appendChild(this.eb()),t.appendChild(n),t.appendChild(this.Ug());var i=r();i.style.position="absolute",i.style.left=e+"px",i.style.width="1px",i.style.height=this.He()+this.Xa()+"px",i.className=this.L("_splitter"),this.nav.divider=i;var a=r();a.style.marginLeft=e+1+"px",a.style.position="relative",this.nav.right=a;var o=r();o.style.position="absolute",o.style.top=this.He()+"px",o.style.width="100%",o.style.height="1px",o.style.boxSizing="border-box",o.style.borderBottom="1px solid transparent",o.setAttribute("data-dh2","true"),o.className=this.L("_divider_horizontal"),this.nav.dh2=o,a.appendChild(s.Vg()),a.appendChild(s.Wg()),a.appendChild(o);var l=r();l.style.clear="left";var c=r();c.style.height="1px",c.style.position="absolute",c.style.left="0px",c.style.right="0px",c.style.display="none",c.className=this.L("_divider_horizontal"),this.nav.dividerTop=c;var u=r();u.style.height="1px",u.style.position="absolute",u.style.left="0px",u.style.right="0px",u.style.display="none",u.className=this.L("_divider_horizontal")+" "+this.L("_divider_horizontal_frozen_bottom"),this.nav.dividerBottom=u,this.nav.top.appendChild(t),this.nav.top.appendChild(i),this.nav.top.appendChild(a),this.nav.top.appendChild(l),this.nav.top.appendChild(c),this.nav.top.appendChild(u)},this.ia=function(){var e=this.He();this.nav.corner&&(this.nav.corner.style.height=e+"px"),this.divTimeScroll&&(this.divTimeScroll.style.height=e+"px"),this.divNorth&&(this.divNorth.style.height=e+"px"),this.nav.dh1&&this.nav.dh2&&(this.nav.dh1.style.top=e+"px",this.nav.dh2.style.top=e+"px"),this.nav.scroll.style.top=e+1+"px"},this.Xg=function(){var e=this.rowHeaderWidth;this.nav.corner&&(this.nav.corner.style.width=e+"px"),this.divResScroll.style.width=e+"px",this.nav.left.style.width=e+"px",this.nav.divider.style.left=e-1+"px",this.nav.right.style.marginLeft=e+"px"},this.Yg=function(){var e=this.rowHeaderWidth,t=this.divHeader;t.style.width=e+"px";for(var n=s.ug(),i=n.start;i<n.end;i++){var a=t.rows[i];if(a){var r=s.rowHeaderWidth;a.style.width=r+"px";a.firstChild.style.width=r+"px"}}s.nav.resScrollSpace&&(s.nav.resScrollSpace.style.width=e+"px")},this.ef=function(){this.Xg(),this.Yg()},this.eb=function(){var e=this.rowHeaderWidth,t=r();s.nav.corner=t,t.style.width=e+"px",t.style.height=this.He()+"px",t.style.overflow="hidden",t.style.position="relative",t.oncontextmenu=function(){return!1},t.className=this.L("_corner");var n=r();return n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.style.right="0px",n.style.bottom="0px",n.className=this.L("_corner_inner"),n.innerHTML=" ",this.divCorner=n,t.appendChild(n),t},this.He=function(){return s.timeHeaders?s.timeHeaders.length*s.headerHeight:0},this.Zg=null,this.Ug=function(){var e=r();e.style.width=this.rowHeaderWidth+"px",e.style.height=this.Xa()+"px",e.style.overflow="hidden",e.style.position="relative",e.className=s.L("_rowheader_scroll");var n=s.R.Bg();n&&(e.style.overflowY="auto"),e.ontouchstart=function(){t.$g=!0},e.oncontextmenu=function(){return!1},e.onscroll=function(){if(s.Zg&&clearTimeout(s.Zg),n){var i=function(){var t=s._g()-s.nav.scroll.offsetHeight;e.scrollTop=Math.min(e.scrollTop,t),s.nav.scroll.scrollTop=e.scrollTop};DayPilot.browser.ios?t.$g&&(s.Zg=setTimeout(i,10)):s.Zg=setTimeout(i,10)}else s.Zg=setTimeout(function(){s.nav.scroll.scrollTop=e.scrollTop},500)},e.setAttribute("role","region"),e.setAttribute("aria-label","scheduler rows");var i=r();return this.divHeader=i,e.appendChild(i),this.divResScroll=e,this.Ie=e,e},this.ah=null,this.bh=null,this.ch=function(){var e=function(){s.dh(),s.jf()},t=function(){var t=s.nav.top;if(t){if(!s.ah)return s.ah={},void(s.ah.width=t.offsetWidth);s.ah.width!==t.offsetWidth&&(s.ah.width=t.offsetWidth,e())}};if(!s.bh){var n=new ResizeObserver(DayPilot.debounce(t,100));
|
|
19
|
+
n.observe(s.nav.top),s.bh=n}},this.dh=function(){s.Q||(s.ma(),s.eh(),s.xb.drawArea=null)},this.eh=function(){var e=s.Df;s.clearSelection(),s.Df=e,s.Ef(e,{"justDraw":!0})},this.Vg=function(){var e=r();e.style.overflow="hidden",e.style.display="block",e.style.position="absolute",e.style.top="0px",e.style.width="100%",e.style.height=this.He()+"px",e.style.overflow="hidden",e.className=s.L("_timeheader_scroll"),this.divTimeScroll=e;var t=r();return t.style.width=this.Fe()+5e3+"px",this.divNorth=t,e.appendChild(t),e},this.Xa=function(){var e=0,t=s.heightSpec;return"Fixed"===t?this.height?this.height:0:(e=s._g(),"Max"===t&&e>s.height?s.height:e)},this._g=function(){var e;return this.ce!==-1?(e=this.ce,this.ce>0&&"auto"===s.nav.scroll.style.overflowX&&(e+=DayPilot.sh(s.nav.scroll)+1)):e=this.rowlist.length*s.eventHeight,e},this.Wg=function(){var e=r();e.style.overflow="auto",e.style.overflowX="auto",e.style.overflowY="auto",e.style.height=this.Xa()+"px",e.style.top=this.He()+1+"px",e.style.position="absolute",e.style.width="100%",e.className=this.L("_scrollable"),e.oncontextmenu=function(){return!1},this.nav.scroll=e,this.je=r();var t=this.je;t.style.userSelect="none",t.style.webkitUserSelect="none",t.calendar=this,t.style.position="absolute";var n=this.Fe();return n>0&&(t.style.width=n+"px"),t.onmousedown=this.fh,t.onmousemove=this.gh,t.onmouseup=this.hh,t.oncontextmenu=this.ih,t.className=this.L("_matrix"),this.divStretch=r(),this.divStretch.style.position="absolute",this.divStretch.style.height="1px",t.appendChild(this.divStretch),this.divCells=r(),this.divCells.style.position="absolute",this.divCells.oncontextmenu=this.ih,t.appendChild(this.divCells),this.divLines=r(),this.divLines.style.position="absolute",this.divLines.oncontextmenu=this.ih,t.appendChild(this.divLines),this.divSeparators=r(),this.divSeparators.style.position="absolute",this.divSeparators.oncontextmenu=this.ih,t.appendChild(this.divSeparators),this.divRange=r(),this.divRange.style.position="absolute",this.divRange.oncontextmenu=this.ih,t.appendChild(this.divRange),this.divEvents=r(),this.divEvents.style.position="absolute",t.appendChild(this.divEvents),this.divShadow=r(),this.divShadow.style.position="absolute",t.appendChild(this.divShadow),e.appendChild(t),e},this.pb=function(){t.jh||(t.jh=!0,DayPilot.re(document,"mouseup",t.be),DayPilot.reNonPassive(document,"touchmove",t.kh),DayPilot.re(document,"touchend",t.lh))},this.mh=function(){this.nav.scroll.root=this,this.nav.scroll.onscroll=this.jf,s.nh=this.nav.scroll.scrollLeft,s.oh=this.nav.scroll.scrollTop,this.divNorth&&(s.ph=this.divNorth.clientWidth)},this.qh={},this.qh.step=300,this.qh.delay=10,this.qh.mode="display",this.qh.layers=!1,this.Kg=function(e){for(var t=0,n=0;n<e.lines.length;n++){for(var i=e.lines[n],a=0;a<i.length;a++){var r=i[a];r.part.line=n,r.part.top=t+s.rowMarginTop,r.part.right=r.part.left+r.part.width}t+=s.eventHeight}},this.Ze=null,this.na=function(e){if(!s.Q){var t=this.qh.step;"display"===this.qh.mode?this.divEvents.style.display="none":"visibility"===this.qh.mode&&(this.divEvents.style.visibility="hidden"),this.divEvents.setAttribute("role","region"),this.divEvents.setAttribute("aria-label","scheduler events");var n="Progressive"===this.dynamicEventRendering,i=this.ne(),a=i.pixels.top,r=i.pixels.bottom;s.rowlist.filter(function(e){var t=e.top-l.rh(),i=t+e.height+2*l.rh();return!n||!(i<=a||t>=r)}).forEach(function(n){s.Kg(n);for(var i=0;i<n.lines.length;i++)for(var a=n.lines[i],r=0;r<a.length;r++){var o=a[r],l=s.Ua(o);if(e&&l&&(t--,t<=0))return s.divEvents.style.visibility="",s.divEvents.style.display="",void(s.Ze=setTimeout(function(){s.na(e)},s.qh.delay))}}),this.divEvents.style.display="",this.te()}},this.sf=function(e){var t=s.rowlist[e];this.Kg(t);for(var n=0;n<t.lines.length;n++)for(var i=t.lines[n],a=0;a<i.length;a++){var r=i[a];this.Ua(r)}},this.Z=function(){if(this.elements.events)for(var e=this.elements.events.length,t=0;t<e;t++){var n=this.elements.events[t];this.Oa(n)}this.elements.events=[]},this.rf=function(e){if(this.elements.events){for(var t=this.elements.events.length,n=[],i=0;i<t;i++){var a=this.elements.events[i];a.event.part.dayIndex===e&&(this.Oa(a),n.push(i))}for(var i=n.length-1;i>=0;i--)this.elements.events.splice(n[i],1)}},this.Oa=function(e){var t=e.domArgs;if(e.domArgs=null,t&&"function"==typeof s.onBeforeEventDomRemove&&s.onBeforeEventDomRemove(t),t&&"function"==typeof s.onBeforeEventDomAdd){var n=t&&t.Pa;if(n){var i=s.zd.reactDOM&&DayPilot.Util.isReactComponent(t.element),a=s.Ra.Qa&&DayPilot.Util.isVueVNode(t.element);i?s.zd.Yd(n):a&&(s.Ra.Sa=!0,s.Ra.Ta(n),s.Ra.Sa=!1)}}e.remove(),e.onclick=null,e.oncontextmenu=null,e.onmouseover=null,e.onmouseout=null,e.onmousemove=null,e.onmousedown=null,e.ondblclick=null,e.event&&(e.event.rendered=null,e.event=null)},this.uh=function(){if("Progressive"===this.dynamicEventRendering){if(s.dynamicEventRenderingCacheSweeping){var e=s.dynamicEventRenderingCacheSize||0;this.divEvents.style.display="none";for(var t=[],n=this.elements.events.length,i=n-1;i>=0;i--){var a=this.elements.events[i];this.vh(a.event)?e>0?(e--,t.unshift(a)):this.Oa(a):t.unshift(a)}this.elements.events=t,this.divEvents.style.display=""}}},this.wh=function(e){for(var t=this.ne(),n=this.elements.cells.length,i=n-1;i>=0;i--){var a=this.elements.cells[i];t.xStart<a.coords.x&&a.coords.x<=t.xEnd&&t.yStart<a.coords.y&&a.coords.y<=t.yEnd||(e>0?e--:this.fb(a))}},this.fb=function(e){if(e&&e.coords){var t=e.coords.x,n=e.coords.y;!function(){var t=e.domArgs;if(e.domArgs=null,t&&"function"==typeof s.onBeforeCellDomRemove&&s.onBeforeCellDomRemove(t),t&&"function"==typeof s.onBeforeCellDomAdd){var n=t&&t.Pa;if(n){var i=s.zd.reactDOM&&DayPilot.Util.isReactComponent(t.element),a=s.Ra.Qa&&DayPilot.Util.isVueVNode(t.element);i?s.zd.Yd(n):a&&(s.Ra.Sa=!0,s.Ra.Ta(n),s.Ra.Sa=!1)}}}(),DayPilot.rfa(s.elements.cells,e),DayPilot.de(e),s.xb.cells[t+"_"+n]=null}},this.xh=function(){var e="Progressive"===this.dynamicEventRendering;if(!this.nav.scroll)return!1;for(var t=this.nav.scroll.scrollTop-l.rh(),n=t+this.nav.scroll.clientHeight+2*l.rh(),i=0;i<this.rowlist.length;i++){var a=this.rowlist[i],r=a.top,o=a.top+a.height;if(!e||!(r>=n||o<=t))for(var s=0;s<a.lines.length;s++)for(var d=a.lines[s],c=0;c<d.length;c++){var u=d[c];if(this.yh(u))return!0}}return!1},this.yh=function(e){if(e.rendered)return!1;var t="Progressive"===this.dynamicEventRendering,n=this.nav.scroll.scrollLeft-l.zh(),i=n+this.nav.scroll.clientWidth+2*l.zh(),a=e.part.left,r=e.part.left+e.part.width;return!t||!(i<=a||n>=r)},this.vh=function(e){if(!e.rendered)return!0;var t=this.ne(),n=t.pixels.top,i=t.pixels.bottom,a=t.pixels.left-this.dynamicEventRenderingMargin,r=t.pixels.right+this.dynamicEventRenderingMargin,o=e.part.left,l=e.part.right,d=e.part.top,c=e.part.top+s.eventHeight;return r<=o||a>=l||(i<=d||n>=c)},this.Ua=function(e,t){t=t||{};var n=t.forced;if(e.rendered)return!1;var i="Progressive"===this.dynamicEventRendering,a=e.part.dayIndex,o=s.divEvents,c=s.rowlist,u=c[a],h=u.top,f=this.ne(),v=f.pixels.left-l.zh(),p=f.pixels.right+l.zh(),m=f.pixels.top,g=f.pixels.bottom,y=e.part.left,b=e.part.left+e.part.width,w=e.part.top+h,x=w+s.eventHeight,_=p<=y||v>=b,C=g<=w||m>=x;if(!n&&i&&(_||C))return!1;var k=e.part.width,D=s.eventHeight,S=e.cache||e.data,M=S.borderRadius||s.eventBorderRadius;"number"==typeof M&&(M+="px");var T=S.padding||s.eventPadding;"number"==typeof T&&(T+="px"),k=DayPilot.Util.atLeast(0,k),D=DayPilot.Util.atLeast(0,D);var A=r();A.style.position="absolute",A.style.left=e.part.left+"px",A.style.top=h+e.part.top+"px",A.style.width=k+"px",A.style.height=D+"px",s.eventTextWrappingEnabled||(A.style.whiteSpace="nowrap"),A.style.overflow="hidden",A.className=this.L("_event"),S.cssClass&&DayPilot.Util.addClass(A,S.cssClass);"number"==typeof e.part.line&&DayPilot.Util.addClass(A,this.L("_event_line"+e.part.line)),M&&(A.style.borderRadius=M),this.showToolTip&&(A.title=e.client.toolTip()||""),A.onmousemove=this.Ah,A.onmousedown=this.Bh,A.onmouseup=this.Ch,A.ontouchstart=d.Dh,A.ontouchmove=d.Eh,A.ontouchend=d.Fh,e.client.clickEnabled()&&(A.onclick=this.Se),"undefined"!=typeof S.ariaLabel?A.setAttribute("aria-label",S.ariaLabel):A.setAttribute("aria-label",S.text),A.setAttribute("tabindex","-1");var E=r();E.className=s.L("_event_inner"),M&&(E.style.borderRadius=M),T&&(E.style.padding=T),S.backColor&&(E.style.background=S.backColor),S.fontColor&&(E.style.color=S.fontColor),"darker"===S.borderColor&&S.backColor?E.style.borderColor=DayPilot.ColorUtil.darker(S.backColor,2):E.style.borderColor=S.borderColor,S.backImage&&(E.style.backgroundImage="url("+S.backImage+")",S.backRepeat&&(E.style.backgroundRepeat=S.backRepeat)),A.appendChild(E);var H=e.start().getTime()===e.part.start.getTime(),R=e.rawend().getTime()===e.part.end.getTime();if(H||DayPilot.Util.addClass(A,this.L("_event_continueleft")),R||DayPilot.Util.addClass(A,this.L("_event_continueright")),e.client.barVisible()&&k>0){var N=100*e.part.barLeft/k,I=Math.ceil(100*e.part.barWidth/k),L=r();L.className=this.L("_event_bar"),L.style.position="absolute",S.barBackColor&&(L.style.backgroundColor=S.barBackColor);var P=r();P.className=this.L("_event_bar_inner"),P.style.left=N+"%",0<I&&I<=1?P.style.width="1px":P.style.width=I+"%",S.barColor&&(P.style.backgroundColor=S.barColor),S.barImageUrl&&(P.style.backgroundImage="url("+S.barImageUrl+")"),L.appendChild(P),A.appendChild(L)}A.row=a,A.event=e,function(){if("function"!=typeof s.onBeforeEventDomAdd&&"function"!=typeof s.onBeforeEventDomRemove)return void s.Gh(E,S.text,S.html);var t={};if(t.control=s,t.e=e,t.element=null,A.domArgs=t,"function"==typeof s.onBeforeEventDomAdd&&s.onBeforeEventDomAdd(t),t.element){var n=E;if(n){t.Pa=n;var i=DayPilot.Util.isReactComponent(t.element),a=DayPilot.Util.isVueVNode(t.element);if(i){if(!s.zd.reactDOM)throw new DayPilot.Exception("Can't reach ReactDOM");s.zd.Uc(t.element,n)}else if(a){if(!s.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");s.Ra.Sa=!0,s.Ra.Va(t.element,n),s.Ra.Sa=!1}else n.appendChild(t.element)}}else E.innerHTML=e.client.innerHTML()}();var z=[];return function(){if("Disabled"!==s.eventDeleteHandling&&!S.deleteDisabled){var e=s.durationBarVisible?s.durationBarHeight:0;z.push({v:"Hover",w:17,h:17,top:e+2,right:2,css:s.L("_event_delete"),onClick:function(e){s.ya(e.source)}})}}(),S.areas&&(z=z.concat(S.areas)),DayPilot.Areas.attach(A,e,{areas:z}),this.elements.events.push(A),o.appendChild(A),e.rendered=!0,!0},this.$a=function(e,t){return s.R.da()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Gh=function(e,t,n){DayPilot.Util.isNullOrUndefined(n)?null!==t&&void 0!==t&&(s.R.da()?e.innerText=t:e.innerHTML=t):e.innerHTML=n},this.tf=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e],n=t.event,i=n.part.dayIndex,a=s.rowlist[i],r=a.top,o=r+n.part.top,l=a.height,d=s.eventHeight;n.part.top+d>l&&(d=Math.max(0,l-n.part.top)),t.style.top=o+"px",t.style.height=d+"px"}},this.Hh=function(e){if(!e)return null;for(var t=0;t<s.elements.events.length;t++){var n=s.elements.events[t];if(n.event===e||n.event.data===e.data)return n}return null},this.Qf=function(e){var t=s.events.Vf(e.data);if(!t)return null;var n=s.rowlist[t.part.dayIndex];return s.Kg(n),s.Ua(t,{"forced":!0}),s.Hh(t)},this.Ah=function(e){for(var t=e.currentTarget;t&&!t.event;)t=t.parentNode;s.Ih(t,e),s.We(e)},this.Ue={},this.Bh=function(e){s.We(e);var n=DayPilot.Util.mouseButton(e);e.preventDefault(),e.stopPropagation(),n.left&&("w-resize"===this.style.cursor||"e-resize"===this.style.cursor?(t.Te=!0,t.kg=this,t.og=this.event,t.Jh=DayPilot.mc(e),a().style.cursor=this.style.cursor):("move"===this.style.cursor||this.event.client.moveEnabled())&&s.Kh(this,e))},this.Ch=function(e){DayPilot.Util.mouseButton(e).right&&s.xa.call(this,e)},this.Kh=function(e,t){var n=s.Ue;s.We(t),n.Lh=!0,n.Ue=e,n.rg=e.event,n.Jh=DayPilot.mc(t),n.Mh=DayPilot.mo3(e,t).x,n.jg=s.getDate(s.coords.x,!0)},"undefined"==typeof DayPilot.Global.touch&&(DayPilot.Global.touch={}),DayPilot.Global.touch.active=!1;DayPilot.Global.touch.start=!1;d.Mf=[],d.relativeCoords=function(e){return d.Nh(e)},d.startResizing=function(e,t){d.Oh(e,t)},d.startMoving=function(e,t){d.Kh(e,t)},d.Dh=function(t){if(!DayPilot.Global.touch.active&&!DayPilot.Global.touch.start){t.stopPropagation(),d.Ph(),DayPilot.Global.touch.start=!0,DayPilot.Global.touch.active=!1;var n=t.currentTarget;s.coords=d.Nh(t);var i=s.tapAndHoldTimeout;d.Mf.push(setTimeout(function(){DayPilot.Global.touch.active=!0,DayPilot.Global.touch.start=!1,t.preventDefault();var i=n.event;switch(s.eventTapAndHoldHandling){case"Move":if(i.client.moveEnabled()){var a=e(t);d.Kh(n,a)}}},i))}},d.Eh=function(){d.Ph(),DayPilot.Global.touch.start=!1},d.Fh=function(e){if(!DayPilot.Util.isMouseEvent(e)){if(d.Ph(),DayPilot.Global.touch.start){DayPilot.Global.touch.start=!1,e.preventDefault(),e.stopPropagation();var t=e.currentTarget;setTimeout(function(){s.Ve(t,e)})}setTimeout(function(){DayPilot.Global.touch.start=!1,DayPilot.Global.touch.active=!1},500)}},d.Rg=function(e){if(!(DayPilot.Global.touch.active||DayPilot.Global.touch.start||e.touches.length>1||"Disabled"===s.timeRangeSelectedHandling)){d.Ph(),DayPilot.Global.touch.start=!0,DayPilot.Global.touch.active=!1;var t=s.tapAndHoldTimeout;d.Mf.push(setTimeout(function(){DayPilot.Global.touch.active=!0,DayPilot.Global.touch.start=!1,e.preventDefault(),s.coords=d.Nh(e),d.Qh=s.Rh()},t));s.coords=d.Nh(e)}},d.Sg=function(e){if(d.Ph(),DayPilot.Global.touch.start=!1,t.kg)return e.preventDefault(),void d.Sh();if(DayPilot.Global.touch.active){if(e.preventDefault(),s.coords=d.Nh(e),t.Ue)return void d.Th();if(d.Qh){var n=d.Qh;n.end={x:Math.floor(s.coords.x/s.cellWidth),"time":s.getDate(s.coords.x,!0)},s.Ef(n)}}},d.debug=function(){},d.Tg=function(e){d.Ph();if(DayPilot.Global.touch.active){if(t.Ue){e.preventDefault();var n=t.rg;if(s!==t.sg.calendar)return;var i=t.sg.start,r=t.sg.end,o=t.sg.row.id;DayPilot.Util.removeClass(t.Ue,s.L("_event_moving_source")),DayPilot.de(t.sg),t.sg.calendar=null,a().style.cursor="",t.Ue=null,t.rg=null,t.sg=null,s.M(n,i,r,o)}if(d.Qh){var l=d.Qh;d.Qh=null;var c=s.elements.range2;c&&c.overlapping?s.clearSelection():s.Af(l)}}else if(DayPilot.Global.touch.start){if(s.coords.x<s.getScrollX())return;var l=s.Rh();s.Ef(l);var c=s.elements.range2;c&&c.overlapping?s.clearSelection():s.Af(l)}setTimeout(function(){DayPilot.Global.touch.start=!1,DayPilot.Global.touch.active=!1},500)},d.Ph=function(){for(var e=0;e<d.Mf.length;e++)clearTimeout(d.Mf[e]);d.Mf=[]},d.Nh=function(e){function t(e,t,n){var i=DayPilot.abs(n);return{x:e-i.x,y:t-i.y,toString:function(){return"x: "+this.x+", y:"+this.y}}}var n=s.je,i=e.touches?e.touches[0]:e;return t(i.pageX,i.pageY,n)},d.Kh=function(e,n){t.Ue=e,t.rg=e.event,t.Jh=n;var i=DayPilot.abs(e);t.Mh=n.x-i.x,t.jg=s.getDate(s.coords.x,!0),t.sg=s.ca(e),s.qg()},d.Oh=function(e,n){t.kg=e,t.og=e.event,t.kg.dpBorder=n,t.ng||(t.ng=s.ca(e)),s.pg()},d.Sh=function(){if(!t.ng){var e=t.kg;t.ng=s.ca(e)}s.pg()},d.Th=function(){if(!t.sg){var e=t.Ue;t.sg=s.ca(e)}t.sg.calendar.qg()},this.Ih=function(e,n){var i=this.eventResizeMargin,a=e;if("undefined"!=typeof t){var r=DayPilot.mo3(e,n);if(r&&(s.eventOffset=r,!t.kg&&!t.Ue)){var o=a.event.part.start.toString()===a.event.start().toString(),l=a.event.part.end.toString()===a.event.rawend().toString();r.x<=i&&a.event.client.resizeEnabled()?o?(e.style.cursor="w-resize",e.dpBorder="left"):e.style.cursor="not-allowed":e.offsetWidth-r.x<=i&&a.event.client.resizeEnabled()?l?(e.style.cursor="e-resize",e.dpBorder="right"):e.style.cursor="not-allowed":t.kg||t.Ue||(a.event.client.clickEnabled()?e.style.cursor="pointer":e.style.cursor="default")}}},this.Ff=function(){var e=s.Re();return s.days*(1440/e)},this.Bf=function(e){if(e=e||t.Qh||s.Df,!e)return null;var n=s.rowlist[e.start.y];if(!n)return null;var i,a,r=e,o=r.end.time>r.start.time,l=n.id,d=o?r.start.x:r.end.x,c=o?r.end.x:r.start.x,u=s.snapToGrid;u?(i=s.Oe(d).start,a=s.Oe(c).end):o?(i=r.start.time,a=r.end.time):(i=r.end.time,a=r.start.time);var h=new DayPilot.Selection(i,a,l,s);return h.allowed=!e.div||!e.div.overlapping,h},this.cf=function(){this.xb.timeHeader={},s.elements.timeHeader.length>0&&(s.elements.timeHeader=[]);var e=r();e.style.position="relative",this.nav.timeHeader=e;for(var t=0;t<this.timeHeader.length;t++)for(var n=this.timeHeader[t],i=0;i<n.length;i++)this.Uh(i,t);var a=this.divNorth;1===a.childNodes.length?a.replaceChild(e,a.childNodes[0]):(a.innerHTML="",a.appendChild(e));var o=this.Fe();a.style.width=o+5e3+"px",o>0&&(this.divStretch.style.width=o+"px")},this.Me=function(e,t){var n=null,i=this.R.Le();t=t||this.cellGroupBy;var a=e.start;switch(t){case"Minute":n=a.toString("m");break;case"Hour":n="Clock12Hours"===s.R.Vh()?a.toString("h tt",i):a.toString("H",i);break;case"Day":n=a.toString(i.datePattern);break;case"Week":n=1===l.ea()?a.weekNumberISO():a.weekNumber();break;case"Month":n=a.toString("MMMM yyyy",i);break;case"Quarter":n="Q"+Math.floor(a.getMonth()/3+1);break;case"Year":n=a.toString("yyyy");break;case"None":n="";break;case"Cell":var r=(e.end.ticks-e.start.ticks)/6e4;n=this.Wh(a,r);break;default:throw new DayPilot.Exception("Invalid groupBy value: "+t)}return n},this.Wh=function(e,t){var n=this.R.Le();return t=t||this.cellDuration,t<1?e.toString("ss"):t<60?e.toString("mm"):t<1440?"Clock12Hours"===s.R.Vh()?e.toString("h tt",n):e.toString("H",n):t<10080?e.toString("d"):10080===t?1===l.ea()?e.weekNumberISO():e.weekNumber():e.toString("MMMM yyyy",n)},this.Ke=function(e,t,n){var i,a=s.startDate.addDays(s.days);t=t||this.cellGroupBy;var r=60;switch(t){case"Minute":e.getMinutes()+e.getSeconds()+e.getMilliseconds()>0&&(e=e.getDatePart().addHours(e.getHours()).addMinutes(e.getMinutes())),i=e.addMinutes(1);break;case"Hour":e.getHours()+e.getMinutes()+e.getSeconds()+e.getMilliseconds()>0&&(e=e.getDatePart().addHours(e.getHours())),i=e.addHours(1);break;case"Day":i=e.getDatePart().addDays(1);break;case"Week":for(i=e.getDatePart().addDays(1);i.dayOfWeek()!==l.ea();)i=i.addDays(1);break;case"Month":e=e.getDatePart(),i=e.addMonths(1),i=i.firstDayOfMonth();for(var o=DayPilot.DateUtil.diff(i,e)/6e4%r===0;!o;)i=i.addHours(1),o=DayPilot.DateUtil.diff(i,e)/6e4%r===0;break;case"Quarter":for(e=e.getDatePart(),i=e.addMonths(1),i=i.firstDayOfMonth();i.getMonth()%3;)i=i.addMonths(1);for(var o=DayPilot.DateUtil.diff(i,e)/6e4%r===0;!o;)i=i.addHours(1),o=DayPilot.DateUtil.diff(i,e)/6e4%r===0;break;case"Year":e=e.getDatePart(),i=e.addYears(1),i=i.firstDayOfYear();for(var o=DayPilot.DateUtil.diff(i,e)/6e4%r===0;!o;)i=i.addHours(1),o=DayPilot.DateUtil.diff(i,e)/6e4%r===0;break;case"None":i=a;break;case"Cell":var d=this.Qe(e);d.current&&(i=d.current.end);break;default:throw n?new DayPilot.Exception("Invalid scale value: "+t):new DayPilot.Exception("Invalid groupBy value: "+t)}return i.getTime()>a.getTime()&&(i=a),i},this.Uh=function(e,t){var n=this.nav.timeHeader,i=this.timeHeader[t][e],a=t<this.timeHeader.length-1,o=i.left,l=i.width,d=t*s.headerHeight,c=s.headerHeight,u=r();u.style.position="absolute",u.style.top=d+"px",u.style.left=o+"px",u.style.width=l+"px",u.style.height=c+"px",i.toolTip&&(u.title=i.toolTip),u.setAttribute("aria-hidden","true"),i.cssClass&&DayPilot.Util.addClass(u,i.cssClass),u.style.userSelect="none",u.style.webkitUserSelect="none",u.oncontextmenu=function(){return!1},u.cell={},u.cell.start=i.start,u.cell.end=i.end,u.cell.level=t,u.cell.th=i,u.onclick=this.Fg,u.oncontextmenu=this.Gg,DayPilot.rePassive(u,DayPilot.touch.start,function(e){e.stopPropagation()}),u.style.overflow="hidden",s.timeHeaderTextWrappingEnabled||(u.style.whiteSpace="nowrap");var h=r();h.innerHTML=s.$a(i.text,i.html),i.backColor&&(h.style.background=i.backColor),i.fontColor&&(h.style.color=i.fontColor);var f=this.L("_timeheadercol"),v=this.L("_timeheadercol_inner");a&&(f=this.L("_timeheadergroup"),v=this.L("_timeheadergroup_inner")),DayPilot.Util.addClass(u,f),DayPilot.Util.addClass(h,v),DayPilot.Util.addClass(u,s.L("_timeheader_cell")),DayPilot.Util.addClass(h,s.L("_timeheader_cell_inner")),u.appendChild(h),DayPilot.Areas.attach(u,i,{areas:i.areas}),this.xb.timeHeader[e+"_"+t]=u,this.elements.timeHeader.push(u),n.appendChild(u)},this.fg=function(){s.rowlist.forEach(function(e){var t=e.getHeight()+s.rowMarginTop+s.rowMarginBottom;e.height!==t&&(s.qf=!0),e.height=t}),s.qf&&(s.xb.drawArea=null)},this.df=function(){s.rowlist.forEach(function(e){var t=s.divHeader;if(t){var n=e.index;if(t.rows[n]){var i=t.rows[n];s.wg&&(i.style.top=e.top+"px");var a=e.height;i&&i.firstChild&&parseInt(i.firstChild.style.height,10)!==a&&(i.firstChild.style.height=a+"px")}}}),s.wg&&s.nav.resScrollSpace&&(s.nav.resScrollSpace.style.top=s.ce+"px")},this.fh=function(e){if(DayPilot.Global.touch.start||DayPilot.Global.touch.active)return!1;if(s.We(e),"Disabled"===s.timeRangeSelectedHandling)return!1;var n=DayPilot.Util.mouseButton(e);if(s.Xh())return!1;if(n.middle||n.right)return!1;if(s.Yh(s.coords))return!1;var i=n.left?"left":n.right?"right":n.middle?"middle":"unknown";return s.Zh=i,t.Qh=s.Rh(),t.Qh&&(t.$h=s),!1},this.Rh=function(){var e={},t=s.Ne(s.coords.x).x,n=s.getDate(s.coords.x,!0);return e.start={y:s.Lf(s.coords.y).i,x:t,"time":n},e.end={x:t,"time":n},e.calendar=s,s.Ef(e),e},this.hh=function(e){if(s.Ue={},s.Df){if(DayPilot.Util.mouseButton(e).left){var n=s.Df;if(s.Yh(s.coords)){var i=function(e){return function(){t._h=null;var n=s.Bf(e);if(n){var i={};i.start=n.start,i.end=n.end,i.resource=n.resource,i.preventDefault=function(){i.preventDefault.value=!0},"function"==typeof s.onTimeRangeClick&&s.onTimeRangeClick(i),i.preventDefault.value||"function"==typeof s.onTimeRangeClicked&&s.onTimeRangeClicked(i)}}};"Disabled"!==s.timeRangeClickHandling&&i(n)()}}}},this.Xh=function(){return!!(t.kg||t.Ue||t.Qh)||!!s.Ue.Lh},this.dragInProgress=function(){return s.Xh()},this.We=function(e){var t=DayPilot.mo3(s.je,e);t=t||{},t.stamp=t.x+"_"+t.y,s.coords&&s.coords.stamp===t.stamp||(s.coords=t)},this.gh=function(e){if(!DayPilot.Global.touch.active){var n=DayPilot.mc(e);if(s.We(e),s.Ue.Lh){DayPilot.distance(s.Ue.Jh,n)>2&&(DayPilot.Util.copyProps(s.Ue,t),a().style.cursor="move",s.Ue={})}t.kg&&t.og.calendar===s?(t.kg.event||(t.kg.event=t.og),s.ai()):t.rg?s.bi():t.Qh&&t.Qh.calendar===s&&(t.Qh.moved=!0,s.ci())}},this.ci=function(){var e=t.Qh,n=s.Ne(s.coords.x).x,i=s.getDate(s.coords.x,!0);e.end={x:n,"time":i},s.Ef(e)},this.ai=function(){t.ng||(t.ng=s.ca(t.kg)),s.pg()},this.bi=function(){if(!t.sg){DayPilot.Util.addClass(t.Ue,s.L("_event_moving_source"));var e=t.rg;t.sg=s.ca(e)}s.qg()},this.ih=function(e){return e.cancelBubble=!0,!1},this.Yh=function(e){var t=s.Df;if(!t||!t.start||!t.end)return!1;var n=this.Of(t.start.y),i=t.start.x<t.end.x,a=(i?t.start.x:t.end.x)*this.cellWidth,r=(i?t.end.x:t.start.x)*this.cellWidth+this.cellWidth,o=n.top,l=n.bottom;return e.x>=a&&e.x<=r&&e.y>=o&&e.y<=l},this.Ef=function(e){function n(e){var t,n,l,d,c=e.end.time>e.start.time,u=e.start.y,h=e.start.time&&e.end.time;if(a||!h){var f=c?e.start.x:e.end.x,v=c?e.end.x:e.start.x,p=s.Oe(f),m=s.Oe(v);t=p.left,n=m.left+m.width}else c?(l=e.start.time,d=e.end.time):(l=e.end.time,d=e.start.time),t=s.getPixels(l).left,n=s.getPixels(d).left;var g=n-t,y=s.elements.range2;if(!y){y=r(),y.style.position="absolute";var b=r();b.className=s.L("_shadow_inner"),i&&(y.style.borderRadius=i,b.style.borderRadius=i),y.appendChild(b),s.divShadow.appendChild(y)}return y.className=s.L("_shadow"),y.firstChild.innerHTML="",y.style.left=t+"px",y.style.top=o[u].top+"px",y.style.width=g+"px",y.style.height=o[u].height-1+"px",y.calendar=s,s.elements.range2=y,y}if(e=e||t.Qh){var i=s.eventBorderRadius;"number"==typeof i&&(i+="px");var a=s.snapToGrid,o=s.rowlist;n(e)}},this.di=function(e){return{"start":{"x":e.start.x,"y":e.start.y,"time":e.start.time},"end":{"x":e.end.x,"time":e.end.time},"calendar":e.calendar,"args":e.args}},this.getCoords=function(){if(!s.coords)return null;var e={};e.x=s.coords.x,e.y=s.coords.y;var t=s.Lf(e.y,e.grid).element;return e.row=s.Eg(t),e.time=s.getDate(e.x,!0),e},this.zoom={},this.zoom.active=-1,this.zoom.setActive=function(e,t,n){var i;if("number"==typeof e)i=s.zoomLevels[e];else{if("string"!=typeof e)throw new DayPilot.Exception("Unexpected parameter type (string or number required): "+typeof e);var a=s.zoom.ei(e);i=s.zoomLevels[a]}if(!i)throw new DayPilot.Exception("Zoom level not found: "+e+" ("+typeof e+")");(e!==s.zoom.active||n)&&(n||(n=s.zoom.Qd(t)),n&&(s.startDate=n),s.zoom.fi(e,n),s.La&&s.update(),n&&s.scrollTo(n,null,t||s.zoomPosition))},this.zoom.ei=function(e){return(s.zoomLevels||[]).findIndex(function(t){return t.id===e})},this.zoom.Qd=function(e){e=e||s.zoomPosition||"left";var t=null;if(!s.nav.scroll)return null;var n=s.getViewport();switch(e){case"left":t=n.start;break;case"middle":t=n.start&&n.start.addTime((s.getViewport().end.getTime()-s.getViewport().start.getTime())/2);break;case"right":t=n.end}return t},this.zoom.fi=function(e,t){var n=s.zoomLevels.length-1;e>n&&(e=n),e<0&&(e=0),s.zoom.active=e;var i=s.zoomLevels[e],a={};return a.date=t||new DayPilot.Date(s.startDate),a.level=i,DayPilot.Util.ownPropsAsArray(i.properties).forEach(function(e){if(0!==e.key.indexOf("on"))return"function"==typeof e.val?void(s[e.key]=e.val(a)):void(s[e.key]=e.val)}),a},this.Mf={},this.Mf.na=null,this.Mf.drawCells=null,this.Mf.drawRows=null,this.Mf.click=null,this.Mf.resClick=[],this.Mf.updateFloats=null,this.jf=function(){if(!s.Q){s.hf();var e=s.nav.scroll;if(s.nh=e.scrollLeft,s.oh=e.scrollTop,s.ph=e.clientWidth,s.divTimeScroll&&(s.divTimeScroll.scrollLeft=s.nh),DayPilot.browser.ios&&t.$g?n():s.divResScroll.scrollTop=s.oh,s.progressiveRowRendering&&(s.Mf.drawRows&&(clearTimeout(s.Mf.drawRows),s.Mf.drawRows=null),s.scrollDelayRows>0?s.Mf.drawRows=setTimeout(function(){s.zg()},s.scrollDelayRows):s.zg()),s.Mf.drawCells&&(clearTimeout(s.Mf.drawCells),s.Mf.drawCells=null),s.scrollDelayCells>0)s.Mf.drawCells=setTimeout(s.gi(),s.scrollDelayCells);else{s.gi()()}s.Mf.na&&(clearTimeout(s.Mf.na),s.Mf.na=null),s.scrollDelayEvents>0?s.Mf.na=setTimeout(s.hi(),s.scrollDelayEvents):s.na(),s.Mf.updateFloats&&(clearTimeout(s.Mf.updateFloats),s.Mf.updateFloats=null),s.scrollDelayFloats>0?s.Mf.updateFloats=setTimeout(function(){s.se()},s.scrollDelayFloats):s.se(),s.onScrollCalled=!0}},this.gi=function(){return function(){s&&s.if()}},this.hi=function(){return function(){s&&(s.xh()?setTimeout(function(){s.uh(),setTimeout(function(){s.na(!0)},50)},50):s.te())}},this.hf=function(){s.xb.drawArea=null},this.show=function(){s.visible=!0,s.ee=!0,s.nav.top.style.display="",s.u(),s.dh(),s.jf()},this.hide=function(){s.visible=!1,s.ee=!1,s.nav.top.style.display="none"},this._f=function(e){if(!s.events.list)return null;for(var t=0;t<this.events.list.length;t++){var n=this.events.list[t];if(s.Uf(n,e)){var i={};return i.ex=n,i.index=t,i}}return null},this.ii=function(){var e=this.ne(),t=e.xStart,n=e.xEnd-e.xStart,i=e.yStart,a=e.yEnd-e.yStart;this.cellProperties||(this.cellProperties={});for(var r=0;r<=n;r++){for(var o=t+r,s=0;s<a;s++){var l=i+s;this.gd(o,l)}this.ji(o)}for(var d=this.ug(),l=d.start;l<d.end;l++)this.ki(l)},this.if=function(){if(!s.Q){var e=s.rowlist;if(e&&e.length>0){if(this.cellSweeping){var t=this.cellSweepingCacheSize;this.wh(t)}this.ii()}this.qf=!1}},this.ne=function(){if(s.xb.drawArea)return s.xb.drawArea;if(!this.nav.scroll)return null;var e=s.oh,t={},n=l.zh(),i=l.rh(),a=s.nh-n,r=a+s.ph+2*n,o=0,d=0;o=s.Ne(a).x,d=s.Ne(r,!0).x;var c=this.Ff();d=Math.min(d,c-1),o=DayPilot.Util.atLeast(o,0);var u=e-i,h=e+this.nav.scroll.offsetHeight+2*i,f=this.Lf(u).i,v=this.Lf(h).i;v<this.rowlist.length&&v++,t.xStart=o,t.xEnd=d,t.yStart=f,t.yEnd=v;var p=s.nav.scroll;return 0===p.clientWidth&&(p=s.divTimeScroll),t.pixels={},t.pixels.left=p.scrollLeft,t.pixels.right=p.scrollLeft+p.clientWidth,t.pixels.top=p.scrollTop,t.pixels.bottom=p.scrollTop+p.clientHeight,t.pixels.width=p.scrollWidth,t.sw=DayPilot.sw(s.nav.scroll),s.xb.drawArea=t,t},this.Fe=function(){return s.Ff()*s.cellWidth},this.ki=function(e){var t=s.rowlist,n=s.divLines,i="y_"+e;if(!this.xb.linesHorizontal[i]){var a=t[e],o=a.height,l=a.top+o-1,d=this.Fe(),c=r();c.style.left="0px",c.style.top=l+"px",c.style.width=d+"px",c.style.height="1px",c.style.fontSize="1px",c.style.lineHeight="1px",c.style.overflow="hidden",c.style.position="absolute",c.className=this.L("_matrix_horizontal_line"),n.appendChild(c),this.xb.linesHorizontal[i]=c}},this.ji=function(e){var t=s.Oe(e);if(t){var n=s.divLines,i=s.ce,a="x_"+e;if(!this.xb.linesVertical[a]){var o=t.left+t.width-1,l=r();l.style.left=o+"px",l.style.top="0px",l.style.width="1px",l.style.height=i+"px",l.style.fontSize="1px",l.style.lineHeight="1px",l.style.overflow="hidden",l.style.position="absolute",l.className=this.L("_matrix_vertical_line"),n.appendChild(l),this.elements.linesVertical.push(l),this.xb.linesVertical[a]=l}}},this.af=function(){s.ce=s.li(s.rowlist)},this.li=function(e){for(var t=0,n=0;n<e.length;n++){var i=e[n];i.top=t,t+=i.height}return t},this.ff=function(){s.elements.cells=[],s.xb.cells=[],s.divCells.innerHTML="",s.mi()},this.mi=function(){s.divLines.innerHTML="",s.xb.linesVertical={},s.xb.linesHorizontal={},s.elements.linesVertical=[]},this.uf=function(e){var t=[];for(var n in s.xb.cells)t.push(s.xb.cells[n]);t.filter(function(t){return t&&t.coords&&t.coords.y===e}).forEach(function(e){s.fb(e)})},this.gd=function(e,t){if(this.La){var n=s.Oe(e);if(n){var i=s.rowlist,a=s.divCells,o=e+"_"+t;if(!this.xb.cells[o]){var l=this.ni(e,t),d=s.oi(e,t),c=r();if(c.style.left=n.left+"px",c.style.top=i[t].top+"px",c.style.width=n.width+"px",c.style.height=i[t].height+"px",c.style.position="absolute",l&&l.backColor&&(c.style.backgroundColor=l.backColor),c.className=this.L("_cell"),c.coords={},c.coords.x=e,c.coords.y=t,l){if(l.cssClass&&DayPilot.Util.addClass(c,l.cssClass),c.innerHTML=s.$a(l.text,l.html),l.backImage&&(c.style.backgroundImage='url("'+l.backImage+'")'),l.backRepeat&&(c.style.backgroundRepeat=l.backRepeat),l.business&&s.cellsMarkBusiness&&DayPilot.Util.addClass(c,s.L("_cell_business")),l.disabled&&DayPilot.Util.addClass(c,s.L("_cell_disabled")),l.backColor&&(c.style.backgroundColor=l.backColor),l.fontColor&&(c.style.color=l.fontColor),l.horizontalAlignment||l.verticalAlignment){switch(c.style.display="flex",l.horizontalAlignment){case"right":c.style.justifyContent="flex-end";break;case"left":c.style.justifyContent="flex-start";break;case"center":c.style.justifyContent="center"}switch(l.verticalAlignment){case"center":c.style.alignItems="center";break;case"top":c.style.alignItems="flex-start";break;case"bottom":c.style.alignItems="flex-end"}}DayPilot.Areas.attach(c,d.cell,{"areas":l.areas})}var u={start:n.start,end:n.end,resource:i[t].id,div:c,properties:l,x:e,y:t};!function(){if("function"==typeof s.onBeforeCellDomAdd||"function"==typeof s.onBeforeCellDomRemove){var e={};if(e.control=s,e.cell=u,e.element=null,c.domArgs=e,"function"==typeof s.onBeforeCellDomAdd&&s.onBeforeCellDomAdd(e),e.element){var t=c;if(t){e.Pa=t;var n=DayPilot.Util.isReactComponent(e.element),i=DayPilot.Util.isVueVNode(e.element);if(n){if(!s.zd.reactDOM)throw new DayPilot.Exception("Can't reach ReactDOM");s.zd.Uc(e.element,t)}else if(i){if(!s.Ra.Qa)throw new DayPilot.Exception("Can't reach Vue");s.Ra.Sa=!0,s.Ra.Va(e.element,t),s.Ra.Sa=!1}else t.appendChild(e.element)}}}}(),a.appendChild(c),this.elements.cells.push(c),this.xb.cells[o]=c}}}},this.oi=function(e,t){var n=s.Oe(e);if(!n)return null;var i=s.rowlist[t],a=i.id,r=n.start,o=n.end,l={};if(l.cell={x:e,y:t,start:r,end:o,resource:a,row:s.Eg(i),properties:s.ni(e,t)},l.control=s,"function"==typeof this.onBeforeCellRender){var d=e+"_"+t;if(s.beforeCellRenderCaching&&s.gf[d])return l;s.gf[d]=!0,this.onBeforeCellRender(l)}return l},this.clearSelection=function(){this.pi()},this.qi=function(e,t,n){e=new DayPilot.Date(e),t=new DayPilot.Date(t);var i=s.le(n),a=s.Qe(e);if(!a.current)throw new DayPilot.Exception("Time range selection 'start' out of timeline");
|
|
20
|
+
var r=s.Qe(new DayPilot.Date(t).addMilliseconds(-1));if(!r.current)throw new DayPilot.Exception("Time range selection 'end' out of timeline");var o={};return o.start={y:i.index,x:a.i,"time":e},o.end={x:r.i,"time":t},o.calendar=this,o},this.selectTimeRange=function(e,t,n,i){var a=s.qi(e,t,n);s.Ef(a),i||setTimeout(function(){s.Af(a)},0)},this.yf=function(){var e=t.sg&&t.sg.source;e&&DayPilot.Util.removeClass(e,s.L("_event_moving_source")),DayPilot.de(t.sg),t.sg=null,DayPilot.Global.movingLink&&(DayPilot.Global.movingLink.clear(),DayPilot.Global.movingLink=null)},this.pi=function(){s.divShadow&&(s.divShadow.innerHTML=""),s.elements.range=[],s.elements.range2=null,s.Df=null,s.ri=null},l.Ld=function(){delete s.xb.headerHeight},l.da=function(){return"Disabled"!==s.xssProtection},l.Le=function(){return DayPilot.Locale.find(s.locale)},l.Vh=function(){return"Auto"!==s.timeFormat?s.timeFormat:l.Le().timeFormat},l.ea=function(){if("Auto"===s.weekStarts){var e=l.Le();return e?e.weekStarts:0}return s.weekStarts||0},l.Bg=function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("mobile")!==-1||e.indexOf("android")!=-1},l.ig=function(e){return"Always"===s.useEventBoxes||"Never"!==s.useEventBoxes&&e<60*s.Re()*1e3},l.zh=function(){var e=s.dynamicEventRenderingMarginX;if("number"==typeof e)return e;var t=s.dynamicEventRenderingMargin;return"number"==typeof t?t:0},l.rh=function(){var e=s.dynamicEventRenderingMarginY;if("number"==typeof e)return e;var t=s.dynamicEventRenderingMargin;return"number"==typeof t?t:0},this.ni=function(e,t){var n=e+"_"+t,i=s.rowlist;if(this.cellProperties||(this.cellProperties={}),this.cellProperties[n])return this.cellProperties[n];if(!this.cellProperties[n]){var a=i[t],r=a.id,o=s.Oe(e),l=o.start,d=o.end,c={};c.start=l,c.end=d,c.resource=r;var u={};u.business=s.isBusiness(c),this.cellProperties[n]=u}return this.cellProperties[n]},this.isBusiness=function(e,t){var n=e.start,i=e.end,a=(i.getTime()-n.getTime())/6e4;if(a<=1440&&!(s.businessWeekends||t||0!==e.start.dayOfWeek()&&6!==e.start.dayOfWeek()))return!1;if(a<720){var r=n.getHours();r+=n.getMinutes()/60,r+=n.getSeconds()/3600,r+=n.getMilliseconds()/36e5;var o=this.businessBeginsHour,l=this.businessEndsHour;if(0===l&&(l=24),o===l)return!1;if(!(o<l))return r<l||r>=o;if(r<o)return!1;if(l>=24)return!0;if(r>=l)return!1}return!0},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.si=function(e){this.heightSpec="Fixed",this.height=e-(this.He()+2),this.ma()},this.setHeight=this.si,this.le=function(e){return s.Ig(e)[0]},this.wb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw new DayPilot.Exception("DayPilot.Scheduler() constructor requires the target element or its ID as a parameter");if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw new DayPilot.Exception("DayPilot.Scheduler: The placeholder element not found: '"+i+"'.")}},this.init=function(){if(this.La)throw new DayPilot.Exception("This instance is already initialized. Use update() to change properties.");if(this.wb(),this.nav.top.dp){if(this.nav.top.dp===s)return s;throw new DayPilot.Exception("The target placeholder was already initialized by another DayPilot component instance.")}return this.vi(),this.ch(),this},this.vi=function(){this.Qg(),this.pb(),this.ba(),this.mh(),s.zoomLevels&&s.zoomLevels[s.zoom.active]&&s.zoom.setActive(s.zoom.active),this.qb();var angular=s.Ee.enabled;s.scrollToDate?s.scrollTo(s.scrollToDate):s.scrollX||s.scrollY?s.setScroll(s.scrollX,s.scrollY):angular||s.jf(),s.scrollToResourceId&&(s.scrollToResource(s.scrollToResourceId),s.scrollToResourceId=null);var e=function(){s.scrollY&&s.setScroll(s.scrollX,s.scrollY)};setTimeout(e,200),this.hf(),this.vb(),this.La=!0;var t=s.ie;t?s.scrollTo(t):s.jf()},this.ub=null,this.sb=function(e){if(e){var t={"resources":{"preInit":function(){var e=this.data;e&&(s.resources=e)}},"events":{"preInit":function(){var e=this.data;e&&(DayPilot.isArray(e.list)?s.events.list=e.list:s.events.list=e)},"postInit":function(){}},"scrollTo":{"preInit":function(){},"postInit":function(){this.data&&s.he(this.data)}},"scrollX":{"postInit":function(){this.data&&s.ke(this.data)}},"scrollY":{"postInit":function(){this.data&&s.Ge(this.data)}},"zoom":{"preInit":function(){var e=this.data;if("string"==typeof e){var t=e;e=s.zoom.ei(t)}var n=e!==s.zoom.active,i=s.zoom.Qd();s.zoom.fi(e,i),n?this.date=i:this.date=null},"postInit":function(){this.date&&s.he(this.date,!1,s.zoomPosition)}}};s.ub=t,s.Ee.scrollToRequested&&(t.scrollTo.data=s.Ee.scrollToRequested,s.Ee.scrollToRequested=null),s.Ee.scrollXRequested&&(t.scrollX.data=s.Ee.scrollXRequested,s.Ee.scrollXRequested=null),s.Ee.scrollYRequested&&(t.scrollY.data=s.Ee.scrollYRequested,s.Ee.scrollYRequested=null);for(var n in e)t[n]||(s[n]=e[n]);for(var i in e)if(t[i]){var a=t[i];a.data=e[i],a.preInit&&a.preInit()}}},this.vb=function(){var e=s.ub;for(var t in e){var n=e[t];n.postInit&&n.postInit()}s.ub={}},this.zd={},this.zd.reactDOM=null,this.zd.react=null,this.zd.Uc=function(e,t){var n=s.zd.reactDOM;if("function"==typeof n.createRoot){var i=t.Xd;i||(i=n.createRoot(t),t.Xd=i),i.render(e)}else n.render(e,t)},this.zd.Yd=function(e){var t=s.zd.reactDOM;if("function"==typeof t.createRoot){var n=e.Xd;setTimeout(function(){n.unmount(),e.Xd=null},0)}else t.unmountComponentAtNode(e)},this.Ra={},this.Ra.Qa=null,this.Ra.Lb=function(e,t,n){var i=s.Ra.Qa;if("function"==typeof i.createVNode&&"function"==typeof i.render){var a=i.createVNode(e,n);i.render(a,t)}},this.Ra.Va=function(e,t){var n=s.Ra.Qa;if("function"==typeof n.render){var i=e;DayPilot.isArray(e)&&(i=n.h("div",null,e)),n.render(i,t)}},this.Ra.Ta=function(e){var t=s.Ra.Qa;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.adjustEndIn=s.vf,this.internal.adjustEndNormalize=s.wf,this.internal.xssTextHtml=s.$a,this.internal.touch=s.fe,this.internal.skipUpdate=s.Ee.skipUpdate,this.internal.skipped=s.Ee.skipped,this.internal.loadOptions=s.sb,this.internal.postInit=s.vb,this.internal.enableAngular2=function(){s.Ee.enabled=!0},this.internal.eventsFromAttr=function(){s.Ee.Zf=!0},this.internal.resourcesFromAttr=function(){s.Ee.gg=!0},this.internal.evImmediateRefresh=function(){s.events.zf()},this.internal.upd=function(e){s.update(e)},this.internal.enableReact=function(e,t){s.zd.react=e,s.zd.reactDOM=t},this.internal.reactRefs=function(){return DayPilot.Util.copyProps(s.zd,{},["react","reactDOM"])},this.internal.enableVue=function(e){s.Ra.Qa=e},this.internal.vueRef=function(){return s.Ra.Qa},this.internal.vueRendering=function(){return s.Ra.Sa},this.sb(o)},i="${v}"===(new DayPilot.Scheduler).v,DayPilot.Row=function(e,t){if(!e)throw new DayPilot.Exception("Now row object supplied when creating DayPilot.Row");if(!t)throw new DayPilot.Exception("No parent control supplied when creating DayPilot.Row");this.wi={};var n=this.wi;n.id=e.id,n.name=e.name,n.data=e.resource,n.tags=e.tags;var i=this;i.isRow=!0,i.menuType="resource",i.name=e.name,i.id=e.id,i.tags=e.tags,i.index=e.index,i.calendar=t,i.data=e.resource,i.xi=e,i.$={},i.$.row=e,i.toJSON=function(){var e={};return e.start=this.start,e.name=this.name,e.id=this.id,e.index=this.index,e},i.events={},i.events.all=function(){for(var e=[],t=0;t<i.xi.events.length;t++)e.push(i.xi.events[t]);return e},i.events.isEmpty=function(){return 0===i.xi.events.length},i.events.forRange=function(e,t){return i.xi.events.forRange(e,t)},i.events.totalDuration=function(){var e=0;return i.events.all().forEach(function(t){e+=t.part.end.getTime()-t.part.start.getTime()}),new DayPilot.Duration(e)},i.remove=function(){t.rows.remove(i)},i.addClass=function(e){var n=t.divHeader,a=n.rows[i.index];DayPilot.Util.addClass(a,e),i.$.row.cssClass=DayPilot.Util.addClassToString(i.$.row.cssClass,e),i.data.cssClass=e},i.removeClass=function(e){var n=t.divHeader,a=n.rows[i.index];DayPilot.Util.removeClass(a,e),i.$.row.cssClass=DayPilot.Util.removeClassFromString(i.$.row.cssClass,e),i.data.cssClass=DayPilot.Util.removeClassFromString(i.data.cssClass,e)}},t.Ue=null,t.rg=null,t.Jh=null,t.kg=null,t.og=null,t.Te=!1,t.jh=!1,t._h=null,t.yi=null,t.pc=function(){DayPilot.ue(document,"mouseup",t.be),DayPilot.ue(document,"touchmove",t.kh),DayPilot.ue(document,"touchend",t.lh),t.jh=!1},t.kh=function(e){if(t.kg){var n=t.kg.event.calendar;n.coords=n.fe.Nh(e),n.fe.Sh(),e.preventDefault()}if(t.Ue){e.preventDefault();var n=t.rg.calendar;n.coords=n.fe.Nh(e),n.fe.Th()}},t.lh=function(e){t.$g=!1,t.be(e)},t.be=function(e){if(t.kg){var i=function(){var e=t.og,n=e.calendar;a().style.cursor="",t.kg=null,t.og=null,DayPilot.de(t.ng),t.ng=null,n&&(n.zi=null)};if(setTimeout(function(){t.Te=!1}),!t.ng)return void i();var r=t.og,o=r.calendar,s=t.ng.start,l=t.ng.end,d="left"===t.kg.dpBorder?"start":"end";i(),o.K(r,s,l,d)}else if(t.rg){var i=function(){DayPilot.Global.movingAreaData=null;var e=t.sg&&t.sg.calendar;t.sg&&(DayPilot.de(t.sg),t.sg.calendar=null),a().style.cursor="",t.Ue=null,t.rg=null,e&&(e.xf=null)};if(!t.sg)return void i();var r=t.rg,o=t.sg.calendar;if(!o)return void i();if(t.sg.source=t.Ue,!t.sg.row)return void i();var s=t.sg.start,l=t.sg.end,c=t.sg.row.id;t.sg.calendar=null,a().style.cursor="",t.Ue=null,t.rg=null,o.M(r,s,l,c,e),DayPilot.Global.movingAreaData=null}else if(t.Qh){var u=DayPilot.Util.mouseButton(e),h=t.Qh,f=h.calendar,i=function(){};if(f.ri=null,t._h)return clearTimeout(t._h),t._h=null,void i();f.Df=h,t.Qh=null;var v=function(e){return function(){t._h=null,f.Af(e),"Hold"!==f.timeRangeSelectedHandling&&"HoldForever"!==f.timeRangeSelectedHandling?n():f.Df=e}},p=f.di(h);return i(),u.left?(v(p)(),e.cancelBubble=!0,!1):void(t._h=null)}t.Mh=null,t.jg=null}}}(DayPilot);!function(){function t(t){t.DayPilotScheduler={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){if(this.control&&!this.control.internal.vueRendering()){var e=Object.keys(this.$attrs),i=Object.assign({},t);e.forEach(function(t){delete i[t]}),this.control.update(i)}},deep:!0},"events":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update({events:t}))},deep:!0},"$attrs":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update(t))},deep:!0}},render:function(){return e.h("div",{id:this.cid})},mounted:function(){var t=Object.assign({},this.config,this.$attrs),n=new DayPilot.Scheduler(this.cid,t),i=this.$slots;i.event&&(n.onBeforeEventDomAdd=function(t){t.element=i.event({event:t.e})}),i.cell&&(n.onBeforeCellDomAdd=function(t){t.element=i.cell({cell:t.cell})}),n.internal.enableVue(e),n.init(),this.control=n},beforeUnmount:function(){this.control&&this.control.dispose()}},t.DayPilotCalendar={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){if(this.control&&!this.control.internal.vueRendering()){var e=Object.keys(this.$attrs),i=Object.assign({},t);e.forEach(function(t){delete i[t]}),this.control.update(i)}},deep:!0},"events":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update({events:t}))},deep:!0},"$attrs":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update(t))},deep:!0}},render:function(){return e.h("div",{id:this.cid})},mounted:function(){var t=Object.assign({},this.config,this.$attrs),n=new DayPilot.Calendar(this.cid,t),i=this.$slots;i.event&&(n.onBeforeEventDomAdd=function(t){t.element=i.event({event:t.e})}),i.cell&&(n.onBeforeCellDomAdd=function(t){t.element=i.cell({cell:t.cell})}),n.internal.enableVue(e),n.init(),this.control=n},beforeUnmount:function(){this.control&&this.control.dispose()}},t.DayPilotMonth={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){if(this.control&&!this.control.internal.vueRendering()){var e=Object.keys(this.$attrs),i=Object.assign({},t);e.forEach(function(t){delete i[t]}),this.control.update(i)}},deep:!0},"events":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update({events:t}))},deep:!0},"$attrs":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update(t))},deep:!0}},render:function(){return e.h("div",{id:this.cid})},mounted:function(){var t=Object.assign({},this.config,this.$attrs),n=new DayPilot.Month(this.cid,t),i=this.$slots;i.event&&(n.onBeforeEventDomAdd=function(t){t.element=i.event({event:t.e})}),i.cell&&(n.onBeforeCellDomAdd=function(t){t.element=i.cell({cell:t.cell})}),n.internal.enableVue(e),n.init(),this.control=n},beforeUnmount:function(){this.control&&this.control.dispose()}},t.DayPilotNavigator={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){if(this.control&&!this.control.internal.vueRendering()){var e=Object.keys(this.$attrs),i=Object.assign({},t);e.forEach(function(t){delete i[t]}),this.control.update(i)}},deep:!0},"events":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update({events:t}))},deep:!0},"$attrs":{handler:function(t,n){this.control&&(this.control.internal.vueRendering()||this.control.update(t))},deep:!0}},render:function(){return e.h("div",{id:this.cid})},mounted:function(){var t=Object.assign({},this.config,this.$attrs),n=new DayPilot.Navigator(this.cid,t),i=this.$slots;i.cell&&(n.onBeforeCellDomAdd=function(t){t.element=i.cell({cell:t.cell})}),n.internal.enableVue(e),n.init(),this.control=n},beforeUnmount:function(){this.control&&this.control.dispose()}}}function n(t){t.DayPilotScheduler={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.cid}})},mounted:function(){this.control=new DayPilot.Scheduler(this.cid,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},t.DayPilotCalendar={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.cid}})},mounted:function(){this.control=new DayPilot.Calendar(this.cid,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},t.DayPilotMonth={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.cid}})},mounted:function(){this.control=new DayPilot.Month(this.cid,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}},t.DayPilotNavigator={props:["id","config","events"],data:function(){return{cid:this.id||c()}},watch:{"config":{handler:function(t,n){this.control&&this.control.update(t)},deep:!0},"events":{handler:function(t,n){this.control&&this.control.update({events:t})},deep:!0}},render:function(t){return t("div",{attrs:{id:this.cid}})},mounted:function(){this.control=new DayPilot.Navigator(this.cid,this.config).init()},beforeDestroy:function(){this.control&&this.control.dispose()}}}var e="undefined"!=typeof e?e:require("vue"),i="function"==typeof e.h,o=i&&e.version&&!e.version.startsWith("2"),r={},c=function(){var t=function(){return 65536*(1+Math.random())|0};return"dp_"+(new Date).getTime()+"_"+t()};o?t(r):n(r),module.exports={DayPilot:DayPilot,DayPilotCalendar:r.DayPilotCalendar,DayPilotScheduler:r.DayPilotScheduler,DayPilotMonth:r.DayPilotMonth,DayPilotNavigator:r.DayPilotNavigator}}();
|