@daypilot/daypilot-lite-javascript 4.6.0 → 4.6.1-sandbox.732

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.
@@ -3,7 +3,7 @@ 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.3.731-lite
6
+ Version: 2025.3.732-lite
7
7
  */
8
8
  type GlobalDate = Date;
9
9
 
@@ -3,7 +3,7 @@ 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.3.731-lite
6
+ Version: 2025.3.732-lite
7
7
  */
8
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)},Object.defineProperty(DayPilot,"isKhtml",{get:function(){return"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("KHTML")!==-1}}),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={},Object.defineProperty(DayPilot.browser,"hover",{get:function(){return!window.matchMedia("(any-hover: none)").matches}}),DayPilot.touch={},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; "),
9
9
  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; "),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.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,
@@ -14,10 +14,10 @@ t=e}o.events.list||(o.events.list=[]),o.events.list.push(t),o.rb({"eventsOnly":!
14
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.Zb=!1,this.$b=null,this._b=null,this.showHtml=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.div||this.bc(),this.rb(),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.rb(),this.cc(),this.dc()},this.showUrl=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.useIframe){this.div||this.bc();var n=this.loadingHtml;n&&(this.iframe.src="about:blank",this.setInnerHTML(this.id+"iframe",n)),this.re(this.iframe,"load",this.ec),this.iframe.src=e,this.rb(),this.cc(),this.dc()}else t.fc({"url":e,"success":function(e){var n=e.request.responseText;t.showHtml(n)},"error":function(){t.showHtml("Error loading the modal dialog")}})},this.dc=function(){if("function"==typeof t.onShow){var e={};e.root=t.gc(),e.modal=t,t.onShow(e)}},this.gc=function(){return t.iframe?t.iframe.contentWindow.document:t.div},this.fc=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.rb=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.hc(),DayPilot.ModalStatic.remove(this),DayPilot.ModalStatic.list.push(this)},this.ec=function(){t.iframe.contentWindow.modal=t,t.autoStretch&&t.stretch()},this.stretch=function(){var e=function(){return t.ic().y},n=function(){return t.ic().x};if(this.useIframe){for(var a=n()-40,i=this.width;i<a&&this.jc();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.kc();o+=10)this.iframe.style.height=o+"px",this.div.style.height=o+"px";this.autoStretchFirstLoadOnly&&this.ue(this.iframe,"load",this.ec)}else this.div.style.height=""},this.jc=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.kc=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.ic=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.cc=function(){this.Zb||(this.re(window,"resize",this.lc),this.re(window,"scroll",this.nc),this.dragDrop&&(this.re(document,"mousemove",this.oc),this.re(document,"mouseup",this.pc)),this.Zb=!0)},this.qc=function(){this.ue(window,"resize",this.lc),this.ue(window,"scroll",this.nc),this.dragDrop&&(this.ue(document,"mousemove",this.oc),this.ue(document,"mouseup",this.pc)),this.Zb=!1},this.rc=function(e){e.target===t.div&&(e.preventDefault(),t.div.style.cursor="move",t.sc(),t._b=t.mc(e||window.event),t.$b={x:t.div.offsetLeft,y:t.div.offsetTop})},this.oc=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.$b.y+i+"px",t.div.style.left=t.$b.x+a+"px"}},this.pc=function(){t._b&&(t.tc(),t.div.style.cursor=null,t._b=null)},this.sc=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.tc=function(){this.useIframe&&(this.div.removeChild(this.mask),this.mask=null)},this.lc=function(){t.uc(),t.hc()},this.nc=function(){t.uc()},this.hc=function(){if(!t.left&&t.div){var e=t.div.offsetWidth;t.div.style.marginLeft="-"+Math.floor(e/2)+"px"}},this.uc=function(){if(t.hideDiv&&t.div&&"none"!==t.hideDiv.style.display&&"none"!==t.div.style.display){var e=t.vc.scrollY();t.scrollWithPage||(t.div.style.top=e+t.top+"px")}},this.vc={},this.vc.container=function(){return t.container||document.body},this.vc.scrollY=function(){var e=t.vc.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.bc=function(){var e=t.vc.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.rc),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.wc||(t.stretch(),t.wc=!0))},this.close=function(e){this.result=e,this.hide()},this.closeSerialized=function(){for(var e=t.gc(),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.qc(),t.xc(t.div),t.xc(t.hideDiv),t.div=null,t.hideDiv=null,t.iframe=null))},this.xc=function(e){var t;e&&(null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e))},this.yc=function(){if(e)for(var t in e)this[t]=e[t]},this.yc()},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.Cc},t.prototype.render=function(){var e=this;this.Cc=document.createElement("div"),this.zc.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.Dc(r,{"debounce":!e.immediate}),"function"==typeof n.onChange){var t={};t.result=n.serialize(),n.onChange(t)}},r.onBlur=function(){n.canceling||n.Dc(r)},r.apply(e),r.Cc=a,r.row=e,r.element&&a.appendChild(r.element),this.f.push(r),this.Cc.appendChild(a)},t.prototype.validate=function(){var e=this,t=!0;return this.f.forEach(function(n){var a=e.Dc(n);t=t&&a}),t},t.prototype.Dc=function(e,t){function n(){e.Ec&&(e.Ec.remove(),e.Ec=null),e.Cc.classList.add(u);var t=document.createElement("div");t.classList.add(h),t.innerText=c.message,e.Ec=t,e.Cc.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.Bc[r.field]),e.Ec&&(e.Ec.remove(),e.Ec=null),e.Cc.classList.remove(u);else if(!i)if(a){var f=1e3;clearTimeout(this.Bc[r.field]),this.Bc[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.zc.forEach(function(n){n.applyValue(e,t)})},t.prototype.updateDependentState=function(){var e=this,t=[!0];(this.Ac?this.Ac:this.zc).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.zc.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
15
  a.zc.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.zc.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.zc.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.zc.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.zc.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.zc.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.Fc(e)},"datetime":function(){return t.Gc(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.Hc=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.Hc&&(t=a.Hc);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.Hc=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.Hc,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.Hc=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.Fc=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.Gc=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.zc.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.Ac?this.Ac:this.zc,a=n.indexOf(e);return this.Ac=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.Ac[a]},t.prototype.updateInteractive=function(e){var t=this.Ac.indexOf(e);this.f[t].apply(e)},t.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.Ac){this.Ac.filter(function(t,n){return e.zc[n]!==t}).forEach(function(t){e.updateInteractive(t)}),this.zc=this.Ac,this.Ac=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.Jc=this.data.find(function(t){return t.id===e}),this.Qc(!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.Kc=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.Jc&&(l.Kc=o),i||(i=o),o.addEventListener("mousedown",function(e){a(o),e.preventDefault()}),o.addEventListener("mousemove",function(){l.Kc!==o&&(l.Kc=o,t({dontScroll:!0}))}),h.appendChild(o),l.q.push(o)}),l.Kc||(l.Kc=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.Kc&&(l.Kc.className+=" "+l.theme+"_list_item_highlight",t&&!n(l.Kc,h)&&l.Kc.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.Jc=t,l.Qc(!0),r(),o()}function i(){l.Pc()}function r(){l.s()}function o(){l.Lc=!0,v.setAttribute("readonly","readonly"),v.focus()}function s(){l.Lc=!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.Lc?(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.Oc=f;var v=document.createElement("input");return v.type="text",v.className=this.theme+"_input",v.disabled=this.Ic,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.Lc){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;s()}if("ArrowDown"===e.key){var n=d.q.indexOf(d.Kc);n+1<d.q.length&&(d.Kc=d.q[n+1]),t()}else if("ArrowUp"===e.key){var n=d.q.indexOf(d.Kc);n-1>=0&&(d.Kc=d.q[n-1]),t()}else"Enter"===e.key?l.Kc?(e.stopPropagation(),a(l.Kc)):(e.stopPropagation(),i(),o()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),i(),o())}),this.Mc=v,this.Nc=h,this.Jc||(this.Jc=this.data[0],this.Jc&&(v.value=this.Jc.name)),c.appendChild(v),c.appendChild(u),c.appendChild(f),c.appendChild(h),c},r.prototype.Pc=function(){this.s(),this.Jc?this.Mc.value=this.Jc.name:(this.Mc.value="",this.Qc(!0))},r.prototype.focus=function(){this.Lc=!0,this.Mc.setAttribute("readonly","readonly"),this.Mc.focus(),this.Pc()},r.prototype.s=function(){this.Nc.style.display="none"},r.prototype.Qc=function(e){if(this.Oc.value=this.selected?this.selected.id:null,this.Jc?this.Mc.value=this.Jc.name:this.Mc.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.Sc();a.appendChild(i);var r=e.Tc({});r.spacer=!0;var o=this.Uc(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.Tc(n);e.zc.push(i),e.Vc(),e.Wc()}}),this.nav.plus=c,d.appendChild(c),t.appendChild(d),t},o.prototype.Sc=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.Xc=function(){var e=this.item.max||0;return!!(e&&this.zc.length>=e)},o.prototype.save=function(){var e=this,t=[];return e.zc.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.Yc(),this.Vc()},o.prototype.Zc=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.Xc()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},o.prototype.Yc=function(){var e=this;this.zc=[],this.data.forEach(function(t){var n=e.Tc(t);e.zc.push(n)})},o.prototype.$c=function(e){var t=this,n=t.zc.indexOf(e);t.zc.splice(n,1)},o.prototype.Tc=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.Vc=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.zc.forEach(function(t){var n=e.Uc(t);e.nav.body.appendChild(n)}),0===this.zc.length){var t=e.ad();e.nav.after.appendChild(t)}this.Zc()},o.prototype.ad=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},o.prototype.Uc=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.bd(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.$c(e),t.Vc(),t.Wc())}),e.spacer||a.appendChild(i),n.appendChild(a),n},o.prototype.Wc=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},o.prototype.bd=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.Wc()}),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.Hc=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.Hc&&(e.value=n.Hc),t.Wc()}),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.cd(),i.ha(),"Full"===t.UpdateType&&(i.dd(),i.ed()),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.Ma&&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.Ab),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.tb(e),this.Ma){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.cd(),i.ha(),i.dd(),i.ed(),i.ma(),i.u(),i.na(),this.visible?this.show():this.hide()}}},this.vb=null,this.tb=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.vb=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.wb=function(){var e=this.vb;for(var t in e){var n=e[t];n.postInit&&n.postInit()}},this.yb={},this.yb.events=[],this.zb=function(e){var t=this.yb.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.zb(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.yb.events[n]))}}for(var l=0;l<this.rows.length;l++){var o=this.rows[l];o.events.sort(this.Ab);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.Pa(t)}this.elements.events=[]},this.Pa=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.Qa;if(a){i.Sa.Ra&&t(n.element)&&(i.Sa.Ta=!0,i.Sa.Ua(a),i.Sa.Ta=!1)}}}(),e.event=null,e.click=null,e.parentNode.removeChild(e)},this.na=function(){this.fd()},this.fd=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.Va(a[i])},this.Ab=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.Va=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.gd,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
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.Qa=a;if(t(e.element)){if(!i.Sa.Ra)throw new DayPilot.Exception("Can't reach Vue");i.Sa.Ta=!0,i.Sa.Wa(e.element,a,{"style":{"flexGrow":1}}),i.Sa.Ta=!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.cd=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.Xa=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.ed=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.hd(t,o,e)}},this.dd=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.gb(n)}this.nav.cells.innerHTML=""},this.gb=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.Qa;if(a){i.Sa.Ra&&t(n.element)&&(i.Sa.Ta=!0,i.Sa.Ua(a),i.Sa.Ta=!1)}}}(),e.onclick=null},this.ta=function(){return 2===i.api},this.hd=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.Qa=n;if(t(e.element)){if(!i.Sa.Ra)throw new DayPilot.Exception("Can't reach Vue");i.Sa.Ta=!0,i.Sa.Wa(e.element,n),i.Sa.Ta=!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.gd=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.dd(),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.qb=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.xb=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.Fb=function(){this.cd(),this.Xa(),this.ed(),this.qb(),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.Sa={},this.Sa.Ra=null,this.Sa.Mb=function(e,t,n){var a=i.Sa.Ra;if("function"==typeof a.createVNode&&"function"==typeof a.render){var r=a.createVNode(e,n);a.render(r,t)}},this.Sa.Wa=function(e,t,n){var a=i.Sa.Ra;if("function"==typeof a.render){var r=e;DayPilot.isArray(e)&&(r=a.h("div",n,e)),a.render(r,t)}},this.Sa.Ua=function(e){var t=i.Sa.Ra;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=this.tb,this.internal.xssTextHtml=i._a,this.internal.enableVue=function(e){i.Sa.Ra=e},this.internal.vueRef=function(){return i.Sa.Ra},this.internal.vueRendering=function(){return i.Sa.Ta},this.init=function(){return this.xb(),this.loadFromServer()?void this.Fb():(this.cd(),this.ha(),this.Xa(),this.ed(),this.u(),this.na(),this.qb(),this.fireAfterRenderDetached(null,!1),this.Ma=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return i.eventBarVisible}}),this.tb(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.jd={};var o=this.jd;this.nav={},this.yb={},this.kd=function(){this.root.dp=this,this.root.className=this.L("_main"),"Horizontal"===this.orientation?(r.ld()||(this.root.style.width=this.showMonths*(7*r.cellWidth()+this.md())+"px"),this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):r.ld()||(this.root.style.width=7*r.cellWidth()+this.md()+"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.dd=function(){this.root.innerHTML=""},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.nd=function(e,t){var n=this.L("_"+t);DayPilot.Util.addClass(e,n)},this.od=function(e,t){var n=this.L("_"+t);DayPilot.Util.removeClass(e,n)},this.pd=function(){if(!r.ld())return null;var e=7;return this.showWeekNumbers&&e++,100/e},this.qd=function(){return r.ld()?null:r.cellWidth()},this.rd=function(e){return"number"!=typeof e&&(e=1),r.ld()?this.pd()*e:this.qd()*e},this.sd=function(e){var t=r.ld()?"%":"px";return this.rd(e)+t},this.ed=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.md();a.width=p;var m=this.cellHeight*f+this.titleHeight+this.dayHeaderHeight;a.height=m;var g=document.createElement("div");if(r.ld()?"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.ld()?(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.sd(),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>&lt;</span>",w.onclick=this.td),g.appendChild(w);var x=document.createElement("div");x.style.position="absolute",x.style.left=i.sd(),x.style.top="0px",x.style.width=i.sd(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.sd(i.showWeekNumbers?7:6),_.style.right=i.sd(i.showWeekNumbers?7:6),_.style.top="0px",_.style.width=i.sd(),_.style.height=this.titleHeight+"px",_.style.lineHeight=this.titleHeight+"px",_.className=this.L("_titleright"),n.right&&(_.style.cursor="pointer",_.innerHTML="<span>&gt;</span>",_.onclick=this.ud),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.sd(),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.sd(),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.sd(T+C),M.style.right=i.sd(T+C),M.style.top=this.titleHeight+"px",M.style.width=i.sd(),M.style.height=this.dayHeaderHeight+"px",M.style.lineHeight=this.dayHeaderHeight+"px",M.className=this.L("_dayheader"),M.innerHTML="<span>"+this.vd(T)+"</span>",g.appendChild(M),a.days.push(M);for(var A=function(t){var n=c.addDays(7*t+T),d=E.wd(n)&&"none"!==E.xd(),u=n.firstDayOfMonth()===o,h=n<o,f=n>=o.addMonths(1);if("month"===E.xd())d=d&&u;else if("day"===E.xd())d=d&&(u||s&&h||l&&f);else if("week"===E.xd()){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.yd(T,t),b=y.x,w=y.y,x=r.ld()?"%":"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.nd(m,"cell"),n.getTime()===v.getTime()&&u&&E.nd(m,"today"),0!==n.dayOfWeek()&&6!==n.dayOfWeek()||E.nd(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.sd(),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.nd(_,"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.nd(S,"cell_text"),m.isClickable=!0,C&&C.html&&(S.innerHTML=C.html),m.appendChild(S)}m.onclick=E.zd,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.Qa=n;if(e(t.element)){if(!i.Sa.Ra)throw new DayPilot.Exception("Can't reach Vue");i.Sa.Ta=!0,i.Sa.Wa(t.element,n),i.Sa.Ta=!1}else n.appendChild(t.element)}}}}(),g.appendChild(m),d&&(i.Ad(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.sd(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.yd=function(e,t){var n=this.titleHeight+this.dayHeaderHeight,a=this.showWeekNumbers?1:0;return{"x":i.rd(e+a),"y":t*this.cellHeight+n}},this.Ad=function(e,t,n){var a=e.month.cells[t][n];i.nd(a,"select")},this.Bd=function(e,t,n){var a=e.month.cells[t][n];i.od(a,"select")},this.md=function(){return this.showWeekNumbers?r.cellWidth():0},this.Cd=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.nd(a,"busy"),this.od(a,"free")):(this.od(a,"busy"),
17
- this.nd(a,"free")))}},this.Dd=function(){var e={};e.startDate=i.startDate,e.selectionStart=i.selectionStart,e.selectionEnd=i.selectionEnd.addDays(1),i.state.value=JSON.stringify(e)},this.xd=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.xd()){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.Fd=null,this.select=function(e,t,n){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.Ma)return void(this.Fd={"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.Gd()||this.selectionStart>=this.Hd())&&(v=this.selectionStart.firstDayOfMonth()),v.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=v}s&&i.freeHandSelectionEnabled?i.selectionEnd=new DayPilot.Date(s):this.Ed(),this.dd(),this.kd(),this.Id(),this.Cd(),this.Dd(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.O(),f&&this.Jd()},this.update=function(e){i.Kd(e)},this.Kd=function(e){if(i.tb(e),this.Ma){if(i.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");i.Ld();var t={"day":i.selectionDay,"start":i.selectionStart,"end":i.selectionEnd};i.rb(),t.start===i.selectionStart&&t.end===i.selectionEnd&&t.day===i.selectionDay||i.O()}},this.rb=function(){this.dd(),this.kd(),this.Ed(),this.Id(),this.ha(),this.Cd(),this.Dd(),this.visible?this.show():this.hide()},this.Ld=function(){i.yb={}},this.vb=null,this.tb=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.vb=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.wb=function(){var e=this.vb;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.Md):WebForm_DoCallback(this.uniqueID,i,this.X,null,this.callbackError,!0)},this.Md=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.vd=function(e){var t=e+r.weekStarts();return t>6&&(t-=7),r.locale().dayNamesShort[t]},this.wd=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<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.Od=function(){if(!r.ld())return void(i.Pd=i.cellWidth);var e=i.months[0].cells[0][0],t=e.clientWidth;i.Pd=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.Qd=function(e){i.Od();var t=DayPilot.mo3(i.nav.top,e),n=i.Nd(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.Pd&&d<=t.y&&t.y<d+i.cellHeight)return{"month":n,"x":o,"y":s,"coords":t}}return null},this.Rd=function(e){if(i.freeHandSelectionEnabled){var t=i.Qd(e);t&&!t.header&&(o.start=t),e.preventDefault()}},this.Sd=function(e){if(o.start){var t=i.Qd(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.yd(e.x,e.y),a=t.top+n.y,s=t.left+n.x,l="px",d=i.sd();if(r.ld()){var c="Horizontal"===i.orientation?i.showMonths:1;s=t.leftPct+n.x/c,l="%",d=i.sd(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.zd=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.xd()){case"none":i.selectionStart=s,i.selectionEnd=s;break;case"day":if(i.autoFocusOnClick&&(s<i.Gd()||s>=i.Hd()))return void i.select(s);var l=a.cells[r][o];i.Ad(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.Gd()||c>=i.Hd()))return void i.select(s)}for(var u=0;u<7;u++)i.Ad(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.Gd()||s>=i.Hd()))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.Ad(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.Dd(),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("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("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.ud=function(){i.Td(i.skipMonths)},this.td=function(){i.Td(-i.skipMonths)},this.Td=function(e){this.startDate=this.startDate.addMonths(e),this.dd(),this.kd(),this.Id(),this.Dd(),this.Jd(),this.Cd()},this.Gd=function(){return i.startDate.firstDayOfMonth()},this.Hd=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.Jd=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.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.ed(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 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.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(){i.wa.scope&&i.wa.scope["$apply"]()},this.Sa={},this.Sa.Ra=null,this.Sa.Mb=function(e,t,n){var a=i.Sa.Ra;if("function"==typeof a.createVNode&&"function"==typeof a.render){var r=a.createVNode(e,n);a.render(r,t)}},this.Sa.Wa=function(e,t){var n=i.Sa.Ra;if("function"==typeof n.render){var a=e;DayPilot.isArray(e)&&(a=n.h("div",null,e)),n.render(a,t)}},this.Sa.Ua=function(e){var t=i.Sa.Ra;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=i.tb,this.internal.initialized=function(){return i.Ma},this.internal.enableVue=function(e){i.Sa.Ra=e},this.internal.vueRef=function(){return i.Sa.Ra},this.internal.vueRendering=function(){return i.Sa.Ta},this.internal.upd=function(e){i.Kd(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.yb.cellWidth)return i.yb.cellWidth;var e=i.Xd("_cell_dimensions").width;return e||(e=i.cellWidth),i.yb.cellWidth=e,e},r.ld=function(){return"Auto"===i.R.cellWidth()},this.clearSelection=function(){for(var e=0;e<this.selected.length;e++){var t=this.selected[e];i.Bd(t.parentNode,t.x,t.y)}this.selected=[]},this.Yd=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.Zd(t);for(var a in n)this.items[a]=1}}}},this.Xd=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.Zd=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.xb=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.xb(),!this.root.dp){this.Ed(),this.kd(),this.Id(),this.ha(),this.Cd(),this.ba(),this.$d(),this.qb();if(this.Yd()&&this.Jd(),this.Ma=!0,this.wb(),this.Fd){var e=this.Fd;this.select(e.date1,e.date2,e.options),this.Fd=null}return this}},this.$d=function(){i.nav.top.onmousedown=this.Rd,i.nav.top.onmousemove=this.Sd},this.qb=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.dd(),i.kd(),i.Id(),i.Cd(),i.Dd();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.tb(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.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,a={};return a.x=t,a.y=n,a}if("undefined"==typeof DayPilot.Scheduler){var t=navigator.userAgent.indexOf("iPad")>-1||navigator.userAgent.indexOf("iPhone")>-1,n={},a=function(){},i=!1,r=function(){return document.body},o=function(){return document.createElement("div")};DayPilot.Scheduler=function(i,s){this.v="${v}";var l=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=!t,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=t?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.ae=-1,this.be=!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.yb={},this.yb.cells=[],this.yb.linesVertical={},this.yb.linesHorizontal={},this.yb.timeHeaderGroups=[],this.yb.timeHeader={},this.yb.events=[],this.nav={},this.R={};var d=this.R;this.ce={};var c=l.ce;this.ee={};var u=this.ee,h={};this.scrollTo=function(e){l.fe(e)},this.fe=function(e){if(e){if(!l.Ma)return void(l.ge=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=l.he.clientWidth,a=l.nav.scroll.clientWidth;t<0&&(t=0),t>n-a&&(t=n-a),l.ie(t)}},this.scrollToResource=function(e){DayPilot.complete(function(){var t;if("string"==typeof e||"number"==typeof e)t=l.je(e);else{if(!(e instanceof DayPilot.Row))throw new DayPilot.Exception("Invalid scrollToResource() argument: id or DayPilot.Row expected");t=l.je(e.id)}t&&setTimeout(function(){var e=t.top;l.nav.scroll.scrollTop=e},100)})},this.ke=function(){if(this.floatingTimeHeaders&&this.timeHeader){var e=l.le();if(e){l.me();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],s=o.left,d=o.left+o.width,c=null;if(s<t&&t<d&&(c={},c.x=r,c.y=i,c.marginLeft=t-s,c.marginRight=0,c.div=l.yb.timeHeader[r+"_"+i],a.push(c)),s<n&&n<d){c||(c={},c.x=r,c.y=i,c.marginLeft=0,c.div=l.yb.timeHeader[r+"_"+i],a.push(c)),c.marginRight=d-n;break}}for(var u=0;u<a.length;u++){var c=a[u];l.ne(c.div,c.marginLeft,c.marginRight)}}}},this.oe=function(){l.ke(),l.pe()},this.qe={};var f=l.qe;f.se=function(e,t,n,a){var i=e,r=e+n,o=t,s=t+a;return l.elements.events.filter(function(e){var t=e.event,n=t.part.left,a=t.part.left+t.part.width,d=l.rowlist[t.part.dayIndex],c=d.top+t.part.top,u=c+l.eventHeight;if(DayPilot.Util.overlaps(n,a,i,r)&&DayPilot.Util.overlaps(c,u,o,s))return!0})},f.te=function(){var e=[],t=l.le();if(!t)return e;for(var n=t.pixels.left,a=0;a<l.elements.events.length;a++){var i=l.elements.events[a],r=i.event,o=r.part.left,s=r.part.left+r.part.width;o<n&&n<s&&e.push(i)}return e.area=t,e},this.pe=function(){if(this.floatingEvents){var e=f.te();l.ve=performance.now(),e.forEach(function(t){var n=t.event,a=e.area.pixels.left,i=n.part.left,r=a-i;l.we(t,r,0)}),l.xe()}},this.elements.sections=[],this.elements.hsections=[],this.ne=function(e,t,n){var a=o();a.className=l.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=o();i.className=l.L("_timeheader_float_inner");var r=e.cell.th;i.innerHTML=l._a(r.text,r.html),r.fontColor&&(i.style.color=r.fontColor),a.appendChild(i),a.ye={marginLeft:t,marginRight:n},e.section=a,e.insertBefore(a,e.firstChild.nextSibling),e.firstChild.innerHTML="",this.elements.hsections.push(e)},this.me=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=l._a(n.th.text,n.th.html)),DayPilot.de(t.section),t.section=null}this.elements.hsections=[]},this.we=function(e,t,n){var a=e.section;if(a)return a.ye&&a.ye.marginLeft===t&&a.ye.marginRight===n?void(a.ye.stamp=l.ve):(e.section.style.left=t+"px",e.section.style.right=n+"px",void(a.ye={marginLeft:t,marginRight:n,stamp:l.ve}));a=o(),a.className=l.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=o();i.className=l.L("_event_float_inner"),i.innerHTML=e.event.client.html(),a.appendChild(i),a.ye={marginLeft:t,marginRight:n,stamp:l.ve},e.section=a,e.insertBefore(a,e.firstChild.nextSibling),e.firstChild.innerHTML="";var r=e.event,s=r.cache||r.data;s.fontColor&&(i.style.color=s.fontColor),this.elements.sections.push(e)},this.xe=function(){for(var e=[],t=0;t<this.elements.sections.length;t++){var n=this.elements.sections[t];if(n.section&&n.section.ye&&n.section.ye.stamp===l.ve)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){l.ze.enabled?(l.ze.scrollXRequested=e,setTimeout(function(){var e=l.ze.scrollXRequested;"number"==typeof e&&l.ie(e)},0)):l.ie(e)},this.ie=function(e){var t=l.nav.scroll,n=l.Ae();t.clientWidth+e>n&&(e=n-t.clientWidth),l.divTimeScroll.scrollLeft=e,t.scrollLeft=e},this.setScrollY=function(e){l.ze.enabled?(l.ze.scrollYRequested=e,setTimeout(function(){var e=l.ze.scrollYRequested;"number"==typeof e&&l.Be(e)},0)):l.Be(e)},this.Be=function(e){var t=l.nav.scroll,n=l.ae;t.clientHeight+e>n&&(e=n-t.clientHeight),l.divResScroll.scrollTop=e,t.scrollTop=e},this.setScroll=function(e,t){l.setScrollX(e),l.setScrollY(t)},this.ma=function(){if(this.nav.scroll){!function(){var e=l.Ae();l.he.style.height=l.ae+"px",l.he.style.width=e+"px",e>l.nav.scroll.clientWidth?l.nav.scroll.style.overflowX="auto":l.nav.scroll.style.overflowX="hidden"}();var e=1;this.nav.scroll.style.height="30px";var t=this.Ya(),n=t+this.Ce()+e;if(t>=0&&(this.nav.scroll.style.height=t+"px",this.De.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",l.nav.resScrollSpace){var a=30;"Auto"===l.heightSpec&&(a=DayPilot.sh(l.nav.scroll)),l.nav.resScrollSpace.style.height=a+"px"}for(var i=0;i<this.elements.linesVertical.length;i++)this.elements.linesVertical[i].style.height=this.ae+"px"}},this.Ee=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=l.startDate.addDays(l.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=l.startDate;o.ticks<t.ticks;){var s={};if(s.start=o,s.end=this.Fe(s.start,a),s.start.ticks===s.end.ticks)break;s.left=this.getPixels(s.start).left;var c=this.getPixels(s.end).left,u=c-s.left;if(s.width=u,"string"==typeof i?s.text=s.start.toString(i,d.Ge()):s.text=this.He(s,a),u>0){if("function"==typeof this.onBeforeTimeHeaderRender){var h={};h.start=s.start,h.end=s.end,h.text=s.text,h.html=null,h.toolTip=l._a(s.text),h.backColor=null,h.fontColor=null,h.level=this.timeHeader.length,h.cssClass=null;var f={};f.header=h,f.control=l,this.onBeforeTimeHeaderRender(f),s.text=h.text,s.html=h.html,s.backColor=h.backColor,s.fontColor=h.fontColor,s.toolTip=h.toolTip,s.areas=h.areas,s.cssClass=h.cssClass}r.push(s)}o=s.end}this.timeHeader.push(r)}},this.getPixels=function(e){var t=l.startDate.addDays(l.days);e=e.ticks>t.ticks?t.addTime(-1):e;var n=e.ticks-this.startDate.ticks,a=l.Bb(n),i=l.cellWidth,r=Math.floor(a/i),o=r*i;return{left:a,boxLeft:o,boxRight:o+i,i:r}},this.getDate=function(e,t,n){var a=this.Ie(e,n);if(!a)return null;var i=a.x,r=l.Je(i);if(!r)return null;var o=n&&!t?r.end:r.start;return t?o.addTime(this.Ke(a.offset)):o},this.Ie=function(e,t){t&&(e-=1);var n=Math.floor(e/l.cellWidth),a=l.Je(n);if(!a)return null;var i={};return i.x=n,i.offset=e%l.cellWidth,i.cell=a,i},this.Le=function(e){var t=e.ticks-this.startDate.ticks,n=60*l.Me()*1e3;if(t<0)return{past:!0};var a=Math.floor(t/n);return{i:a,current:l.Je(a)}},this.Bb=function(e){var t=60*l.Me()*1e3,n=l.cellWidth;return Math.floor(n*e/t)},this.Ke=function(e){var t=60*l.Me()*1e3,n=l.cellWidth;return Math.floor(e/n*t)},this.Ne=function(e){DayPilot.Global.touch.start||n.Oe||(l.Pe={},l.va(this,e))},this.va=function(e,t){e.event&&l.Qe(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;l.Re(e);var n={};if(n.e=t,n.div=this,n.originalEvent=e,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof l.onEventRightClick&&(l.onEventRightClick(n),n.preventDefault.value))return!1;switch(l.eventRightClickHandling){case"ContextMenu":var a=t.client.contextMenu();a?a.show(t):l.contextMenu&&l.contextMenu.show(this.event)}return"function"==typeof l.onEventRightClicked&&l.onEventRightClicked(n),!1}},this.Je=function(e){var t=l.Me(),n=60*t*1e3;return{start:l.startDate.addTime(e*n),end:l.startDate.addTime((e+1)*n),left:e*l.cellWidth,width:l.cellWidth}},this.Qe=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()){l.Re(t);var r={};r.e=n,r.control=l,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 l.onEventClick&&(l.onEventClick(r),r.preventDefault.value)||"function"==typeof l.onEventClicked&&l.onEventClicked(r)}}},this.ya=function(e){var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},t.control=l,t.toJSON=function(){return DayPilot.Util.copyProps(t,{},["e"])},"function"!=typeof l.onEventDelete||(l.onEventDelete(t),!t.preventDefault.value)){switch(l.eventDeleteHandling){case"Update":l.events.remove(e)}"function"==typeof l.onEventDeleted&&l.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,l.eventResizeHandling){case"Update":l.Te(r)}"function"==typeof l.onEventResized&&l.onEventResized(r)}}if("Disabled"!==this.eventResizeHandling){n=l.Se(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=l,r.toJSON=function(){return DayPilot.Util.copyProps(r,{},["e","async","newStart","newEnd"])},"function"==typeof l.onEventResize&&l.onEventResize(r),r.async||i()}},this.rb=function(e){e=e||{},clearTimeout(l.Ue),l.timeHeader=null,l.cellProperties={},l.Ee(),l.Ve(),l.events.We(),l.R.Ld(),l.clearSelection(),l.ha(),l.Xe(),l.Ye(),l.sb(),l.Ze(),l.$e(),l._e(),l.ia(),l.Z(),l.af(),l.bf={},l.cf(),l.ma(),l.df(),e.immediateEvents?l.na():setTimeout(function(){l.na()},100),this.visible?l.be!==l.visible&&this.show():this.hide(),this.be=this.visible,this.oe(),l.ef(),this.ff()},this.ff=function(){if("function"==typeof l.onAfterUpdate){var e={};l.onAfterUpdate(e)}},this.update=function(e){if(!l.Ma)throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that hasn't been initialized.");if(l.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.");h.request(e)},h.timeout=null,h.options=null,h.enabled=!1,h.request=function(e){h.enabled?(clearTimeout(h.timeout),h.gf(e),h.timeout=setTimeout(h.doit)):(h.gf(e),h.doit())},h.gf=function(e){if(e){h.options||(h.options={});for(var t in e)h.options[t]=e[t]}},h.doit=function(){var e=h.options;return h.options=null,l.Ma?(l.tb(e),l.rb({"immediateEvents":!0}),void l.wb()):void l.tb(e)},this.hf=function(e){e.forEach(function(e){l.if(e.index)})},this.jf=function(e){return e&&0!==e.length?e[0].isRow?e:e.map(function(e){return l.rowlist[e]}):[]},this.kf=function(e,t,n){e=DayPilot.ua(e),e=l.jf(e),l.hf(e),this.lf?(this.Xe(),this.$e(),this.af(),e.forEach(function(e){l.mf(e.index)}),e.forEach(function(e){l.nf(e.index)}),this.df(),this.of()):(e.forEach(function(e){t||l.mf(e.index),l.nf(e.index)}),e.forEach(function(e){l.pf(e.index)}),l.df()),l.pe(),n&&n(),this.cf()},this.Se=function(e){return"DateTime"===l.eventEndSpec?e:e.getDatePart().ticks===e.ticks?e.addDays(-1):e.getDatePart()},this.qf=function(e){return"DateTime"===l.eventEndSpec?e:e.getDatePart().addDays(1)},this.rf=function(e){return"DateTime"===l.eventEndSpec?e:e.getDatePart()},this.M=function(e,t,n,a,i){if(l.sf=null,"Disabled"!==l.eventMoveHandling){n=l.Se(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=l,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 l.tf();switch(t=r.newStart,n=r.newEnd,l.eventMoveHandling){case"Update":l.Te(r)}l.tf(),"function"==typeof l.onEventMoved&&l.onEventMoved(r);
18
- };r.async=!1,r.loaded=function(){o()},"function"==typeof l.onEventMove&&l.onEventMove(r),r.async||o()}},this.Te=function(e){var t=e.e,n=e.newStart,a=e.newEnd,i=e.newResource;t.start(n),t.end(a),t.resource(i),l.events.update(t),l.events.uf()},this.vf=function(e){if(e)if(e.args)l.O(e.args.start,e.args.end,e.args.resource);else{var t=l.wf(e);if(!t)return;l.O(t.start,t.end,t.resource)}},this.O=function(e,t,n){if("Disabled"!==l.timeRangeSelectedHandling){var a=t;t=l.Se(a);var i={};if(i.control=l,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 l.onTimeRangeSelect){if(l.onTimeRangeSelect(i),i.preventDefault.value)return;e=i.start,t=i.end}t=l.qf(t),l.xf(l.yf,e,t),l.zf(l.yf),"function"==typeof l.onTimeRangeSelected&&l.onTimeRangeSelected(i)}},this.xf=function(e,t,n){if(e){var a,i=n;t.getTime()<l.startDate.getTime()?(e.start.x=0,e.start.time=l.startDate.getTime()):(a=l.Le(t),e.start.x=a.i,e.start.time=t);var r=l.startDate.addDays(l.days);i.getTime()>r.getTime()?(e.end.x=l.Af(),e.end.time=r.getTime()):(a=l.Le(i.addMilliseconds(-1)),e.end.x=a.i,e.end.time=n)}},this.Bf=function(e,t){l.Cf(e,t)},this.Cf=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 l.onRowClick&&(l.onRowClick(n),n.preventDefault.value)||"function"==typeof l.onRowClicked&&l.onRowClicked(n)},this.Df=function(e){var t={};t.header=e,t.control=l,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof l.onTimeHeaderClick&&(l.onTimeHeaderClick(t),t.preventDefault.value)||"function"==typeof l.onTimeHeaderClicked&&l.onTimeHeaderClicked(t)},this.getViewport=function(){var e=this.nav.scroll.scrollLeft,t=this.nav.scroll.scrollTop,n={},a=l.Ef(e,t),i=l.Ff(a),r=l.Je(a.start.x),o=l.Je(a.end.x);return n.start=l.getDate(e,!0),n.end=l.getDate(e+l.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 l.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.Ef=function(e,t){var n={};n.start={},n.end={};var a=l.Ie(e),i=l.Ie(e+l.nav.scroll.clientWidth);a&&(n.start.x=a.x),i&&(n.end.x=i.x);var r=t,o=t+l.nav.scroll.clientHeight;n.start.y=l.Gf(r).i,n.end.y=l.Gf(o).i,n.start.x=DayPilot.Util.atLeast(n.start.x,0);var s=l.Af();return n.end.x>=s&&(n.end.x=s-1),n},this.Ff=function(e){e||(e=this.Ef(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=l.rowlist[n];a&&t.push(a.id)}return t},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.sb=function(){l.nav.top.className!==l.L("_main")&&(l.nav.top.className=l.L("_main"),l.nav.dh1.className=l.L("_divider_horizontal"),l.nav.dh2.className=l.L("_divider_horizontal"),l.divResScroll.className=l.L("_rowheader_scroll"),l.nav.divider.className=l.L("_divider")+" "+l.L("_splitter"),l.nav.scroll.className=l.L("_scrollable"),l.he.className=l.L("_matrix")+" "+l.L("_grid_main"))},this.ba=function(){this.nav.top.dispose=this.dispose},this.dispose=function(){var e=l;if(e.Ma&&!e.Q){e.Q=!0;for(var t in e.Hf){var a=e.Hf[t];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.De=null,e.he.calendar=null,e.he=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,n.qc(e),u=null}},this.disposed=function(){return l.Q},this.ca=function(e){var t=null;t=e.nodeType?e.event:e;var n=l.eventBorderRadius;"number"==typeof n&&(n+="px");var a=l.If(t),i=l.rowlist,r=l.eventHeight,s=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=r+"px",u.style.left=d+"px",u.style.top=s+"px",u.style.overflow="hidden";var h=o();return u.appendChild(h),u.className=this.L("_shadow"),h.className=this.L("_shadow_inner"),n&&(u.style.borderRadius=n,h.style.borderRadius=n),l.divShadow.appendChild(u),u.calendar=l,u},this.Gf=function(e){for(var t,n=l.rowlist,a={},i=0,r=0,o=n.length,s=0;s<o;s++){var d=n[s];if(r+=d.height,i=r-d.height,t=d,a.top=i,a.bottom=r,a.i=s,a.element=t,e<r)break}return a},this.Jf=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(!l.events.list||"undefined"==typeof l.events.list.length)return null;if("function"==typeof e)return l.Kf(e);for(var t=l.events.list.length,n=0;n<t;n++)if(l.events.list[n].id===e)return new DayPilot.Event(l.events.list[n],l);return null},this.events.findAll=function(e){if("function"==typeof e){for(var t=l.events.list.length,n=[],a=0;a<t;a++){var i=new DayPilot.Event(l.events.list[a],l);e(i)&&n.push(i)}return n}if("object"==typeof e)return l.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.Kf=function(e){for(var t=l.events.list.length,n=0;n<t;n++){var a=new DayPilot.Event(l.events.list[n],l);if(e(a))return a}return null},this.events.focus=function(e){var t=l.Lf(e);null===t||void 0===t?void 0:t.focus()},this.events.scrollIntoView=function(e){if(l.Lf(e)){var t=e.start(),n=l.getViewport();!DayPilot.Util.overlaps(n.start,n.end,e.start(),e.end())&&DayPilot.Util.overlaps(l.sa(),l.Mf(),e.start(),e.end())&&l.scrollTo(t,"fast","middle");var a=e.resource();l.getViewport().resources.indexOf(a)===-1&&l.scrollToResource(a)}},this.events.all=function(){for(var e=[],t=0;t<l.events.list.length;t++){var n=new DayPilot.Event(l.events.list[t],l);e.push(n)}return e},this.events.forRange=function(e,t){e=e?new DayPilot.Date(e):l.visibleStart(),t=t?new DayPilot.Date(t):l.visibleEnd();for(var n=[],a=0;a<l.events.list.length;a++){var i=new DayPilot.Event(l.events.list[a],l);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;l.events.list=o.data,l.Ma&&l.update()}};if(l.eventsLoadMethod&&"POST"===l.eventsLoadMethod.toUpperCase())DayPilot.ajax({"method":"POST","contentType":"application/json","data":{"start":l.visibleStart().toString(),"end":l.visibleEnd().toString()},"url":e,"success":i,"error":a});else{var r=e,o="start="+l.visibleStart().toString()+"&end="+l.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+o:"?"+o,DayPilot.ajax({"method":"GET","url":r,"success":i,"error":a})}},this.events.Nf=function(e){var t=[];return l.rowlist.forEach(function(n){l.Of(n.index);for(var a=0;a<n.events.length;a++){var i=n.events[a].data;if(l.Pf(i,e)){t.push(n),n.events.splice(a,1);break}}}),t},this.events.Qf=function(e){if(!e)return null;for(var t=l.rowlist,n=0;n<t.length;n++){var a=t[n];l.Of(a.index);for(var i=0;i<a.events.length;i++){var r=a.events[i];if(l.Pf(r.data,e))return a.events[i]}}return null},this.events.Rf=function(e){var t=[],n=l.Sf(),a=DayPilot.indexOf(l.events.list,e);l.zb(a);var i=l.rowlist,r=!1;return i.forEach(function(i){if(!r){l.Of(i.index);var o=l.Tf(e,i);o&&("function"==typeof l.onBeforeEventRender&&(o.cache=l.yb.events[a]),t.push(i),n||(r=!0))}}),t},this.Pf=function(e,t){return DayPilot.Util.isSameEvent(e,t)},this.events.update=function(e){if("object"==typeof e&&!(e instanceof DayPilot.Event)){var t=l.events.find(e.id);return l.events.remove(t),void l.events.add(e)}if(l.events.list.find(function(t){return l.Pf(t,e.data)})){l.ze.Uf&&(l.ze.skip=!0);var n=l.events.Nf(e.data);e.commit(),n=n.concat(l.events.Rf(e.data)),l.events.Vf(n)}},this.events.remove=function(e){if(e){if("string"==typeof e||"number"==typeof e){var t=l.events.find(e);return void l.events.remove(t)}var n=l.Wf(e.data);n&&l.events.list.splice(n.index,1),l.ze.Uf&&(l.ze.skip=!0);var a=l.events.Nf(e.data);l.events.Vf(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=l,l.events.list||(l.events.list=[]);var i=l.Wf(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||l.events.list.push(e.data)}if(l.Ma){l.ze.Uf&&(l.ze.skip=!0);var r=l.events.Rf(e.data);l.events.Vf(r)}},this.events.Xf=function(e){var t=e instanceof DayPilot.Event?e.data:e,n=new DayPilot.Date(t.start),a=new DayPilot.Date(t.end);return!!l.events.list.find(function(e){if(l.Pf(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.Yf={"rows":[]},this.events.Zf=null,this.events.We=function(){clearTimeout(l.events.Zf),l.events.Zf=null,l.events.Yf.rows=[]},this.events.$f=0,this.events.Vf=function(e){var t=l.events.Yf.rows;e.forEach(function(e){t.push(e)}),l.events.Yf.rows=DayPilot.ua(t);var n=l.events.uf;l.events.Zf||(l.events.Zf=setTimeout(n,l.events.$f))},this.events.uf=function(){clearTimeout(l.events.Zf),l.events.Zf=null;var e=l.events.Yf.rows;l.events.Yf.rows=[],l._f(e),l.ag(),l.Ma&&(l.lf&&l.Xe(),l.ma(),l.kf(e))},this.ze={},this.ze.enabled=!1,this.ze.skip=!1,this.ze.skipUpdate=function(){return l.ze.skip},this.ze.skipped=function(){l.ze.skip=!1},this.ze.bg=!1,this.ze.Uf=!1,this.cg={},this.cg.reactDOM=null,this.cg.react=null,this.dg=function(e){var t=l.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*-l.Me()*1e3);return n}var a=this.Le(e);if(a.current)return a.current.start;throw new DayPilot.Exception("getBoxStart(): time not found")},this.If=function(e){var t=this.Gf(l.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=d.eg(a),r=0,o=l.coords.x;i&&(r=e.start().getTime()-this.dg(e.start()).getTime());var s=0;if(n.fg)if(i){var c=e.start(),u=this.dg(c);s=n.fg.getTime()-u.getTime();var h=60*l.Me()*1e3;s=Math.floor(s/h)*h}else s=n.fg.getTime()-e.start().getTime();var f=this.getDate(o,!0).addTime(-s);n.gg&&(f=e.start());var v=l.snapToGrid;v&&(f=this.dg(f)),f=f.addTime(r);var p=f.addTime(a),m=f,g=p,y=this.getPixels(m),b=this.getPixels(g.addTime(-1)),w=v?y.boxLeft:y.left,x=v&&i?b.boxRight-w:b.left-w,_={};return _.top=t.top,_.left=w,_.row=t.element,_.rowIndex=t.i,_.width=x,_.start=f,_.end=p,_.relativeY=l.coords.y-t.top,_},this.Me=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.hg=function(e){return e.end.ticks-e.start.ticks},this.ig=function(){var e=n.jg.width,t=n.jg.left,a=n.kg,i=n.gg.dpBorder,r=null,o=null,s=l.snapToGrid,d=!s;"left"===i?(r=l.getDate(t,d),o=a.rawend()):"right"===i&&(r=a.start(),o=l.getDate(t+e,d,!0)),n.jg.start=r,n.jg.end=o},this.lg=function(){var e=l.coords,t=n.gg.dpBorder,a=n.gg.event,i=a.part.left;"right"===t&&(i+=a.part.width);var r,o,s=n.gg.event.calendar.cellWidth,d=a.part.width,c=a.part.left,u=0,h=e.x-i,f=l.snapToGrid;if("right"===t){if(r=c,f){var v=l.Ie(d+c+h).cell,p=l.Ie(c).cell,m=p.left+p.width-c;o=v.left+v.width-c,o<m&&(o=m)}else o=d+h;var g=l.Ae();c+o>g&&(o=g-c),n.jg.left=c,n.jg.width=o,n.jg.style.left=c+"px",n.jg.style.width=o+"px"}else{if("left"!==t)throw new DayPilot.Exception("Invalid dpBorder.");f?(h>=d&&(h=d),r=Math.floor((c+h+0)/s)*s,r<u&&(r=u)):r=c+h,o=d-(r-c);var y=c+d,b=s;f?"Never"===l.useEventBoxes&&(b=d<s?d:1):b=1,o<b&&(o=b,r=y-o),n.jg.left=r,n.jg.width=o,n.jg.style.left=r+"px",n.jg.style.width=o+"px"}l.ig()},this.mg=function(){if(l.coords&&n.ng){var e=n.og,t=this.If(n.ng);e.row=t.row,e.style.height=DayPilot.Util.atLeast(t.row.height,0)+"px",e.style.top=t.top+"px",e.style.left=t.left+"px",e.style.width=t.width+"px",e.start=t.start,e.end=t.end}},this.pg=function(){return this.rowHeaderWidth},this.qg=function(){return this.rg(l.progressiveRowRenderingPreload)},this.rg=function(e){e=e||0;var t=0,n=l.rowlist.length;if(l.progressiveRowRendering){var a=l.le();t=a.yStart,n=a.yEnd+1,t=DayPilot.Util.atLeast(0,t-e),n=Math.min(l.rowlist.length,n+e)}return{"start":t,"end":n}},this.Ye=function(){function e(){var e=l.divHeader;e&&(e.rows=[]);var t=e;t&&(t.innerHTML="")}this.sg=!0;var t=this.pg();e();var n=this.divHeader;if(n.style.width=t+"px",n.style.height=l.ae+"px",l.divHeader=n,l.progressiveRowRendering)a();else for(var i=this.rowlist.length,r=0;r<i;r++)l.tg(r);l.ug(),this.divResScroll.appendChild(n)},this.vg=function(){if(l.progressiveRowRendering)for(var e=this.qg(),t=0;t<l.rowlist.length;t++)e.start<=t&&t<e.end?l.tg(t):l.wg(t)},this.ug=function(){if(!l.R.xg()){var e=l.divHeader,t=o();t.style.position="absolute",e.appendChild(t),l.nav.resScrollSpace=t;var n=o();n.style.position="relative",n.style.height="100%",n.className=this.L("_rowheader"),t.appendChild(n);var a=this.pg();t.style.width=a+"px",t.style.top=this.ae+"px"}},this.wg=function(e){var t=l.divHeader.rows[e];t&&(DayPilot.de(t),l.divHeader.rows[e]=null)},this.if=function(e){this.wg(e),this.tg(e)},this.tg=function(e){var t=l.rowlist,n=l.divHeader;if(n&&!n.rows[e]){var a=this.pg(),i=t[e];if(i){var r=this.yg(i),s=o();s.style.position="absolute",s.style.top=i.top+"px",n.rows[e]=s,s.row=i,s.index=e;var d=r.row,c=this.rowHeaderWidth;s.style.width=c+"px",s.style.border="0px none";var u=d.toolTip||d.toolTip;u&&(s.title=u),"undefined"!=typeof d.ariaLabel?s.setAttribute("aria-label",d.ariaLabel):s.setAttribute("aria-label",d.text||""),s.onclick=l.zg;var h=o();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=o();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=l.Ag(i);DayPilot.Areas.attach(h,y,{areas:g});var b=o();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=o(),x=o();x.innerHTML=l._a(d.text,d.html),x.className=l.L("_rowheader_inner_text"),s.textDiv=x,s.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"}s.appendChild(h),n.appendChild(s),h.style.width=a+"px"}}},this.zg=function(e){var t=this.row,n=l.Ag(t,this.index);l.Bf(n,e)},this.Bg=function(){if("Disabled"!==l.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(l.Me())),l.Df(e)}},this.Cg=function(e){if("Disabled"!==l.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(l.Me()));var n={};n.header=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof l.onTimeHeaderRightClick&&(l.onTimeHeaderRightClick(n),n.preventDefault.value)||"function"==typeof l.onTimeHeaderRightClicked&&l.onTimeHeaderRightClicked(n)}},this.Ag=function(e){return new DayPilot.Row(e,l)},this.Of=function(e){var t=l.rowlist,n=t[e];n.events||n.resetEvents()},this.Dg={},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");u.prepareRows(!0);var t,n=this.events.list,a="function"==typeof this.onBeforeEventRender;l.Dg={};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(l.Dg[o])throw new DayPilot.Exception("Duplicate event IDs are not allowed: "+o);l.Dg[o]=!0,a&&this.zb(i),t=l.Eg(r.resource);for(var s=0;t&&s<t.length;s++){var d=t[s],c=this.Tf(r,d);c&&a&&(c.cache=this.yb.events[i])}}}l.rowlist.forEach(function(e){l.Fg(e)}),l.ag()},u.rowcache={},u.prepareRows=function(e){u.rowcache={};for(var t=l.rowlist,n=0;n<t.length;n++){var a=t[n];if(e&&a.resetEvents(),l.Of(a.index),a.id){var i=typeof a.id+"_"+a.id;u.rowcache[i]||(u.rowcache[i]=[]),u.rowcache[i].push(a)}}},this.Eg=function(e){var t=typeof e+"_"+e;return u.rowcache[t]||[]},this.Sf=function(){for(var e={},t=0;t<l.rowlist.length;t++){var n=l.rowlist[t],a=n.id;if(e[a])return!0;e[a]=!0}return!1},this.zb=function(e){var t=this.yb.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.Fg=function(e){e.lines=[],e.sections=null,e.events.sort(this.Ab);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=l.jf(e),e.forEach(function(e){l.Fg(e)}),e.forEach(function(e){l.Gg(e)})},this.Tf=function(e,t){var n=new DayPilot.Date(e.start),a=new DayPilot.Date(e.end);a=l.qf(a);var i=n.ticks,r=a.ticks,o=l.startDate.ticks,s=l.startDate.addDays(l.days).ticks;if(r<i)return null;var c=null;if("function"==typeof l.onBeforeEventRender){var u=DayPilot.indexOf(l.events.list,e);c=l.yb.events[u]}if(t.id!==e.resource||(r<=o||i>=s)&&(i!==r||i!==o))return null;var h=new DayPilot.Event(e,l);h.part.dayIndex=l.rowlist.indexOf(t),h.part.start=o<i?n:l.startDate,h.part.end=s>r?a:l.startDate.addDays(l.days);var f=this.getPixels(h.part.start),v=this.getPixels(h.part.end.addTime(-1));h.part.start===h.part.end&&(v=this.getPixels(h.part.end.addMilliseconds(1)));var p=f.left,m=v.left;if(d.eg(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,1);var b=l.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.Ab=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<l.rowlist.length;t++){var n=l.Ag(l.rowlist[t]);e.push(n)}return e},this.rows.each=function(e){l.rows.all().forEach(e)},this.rows.forEach=function(e){l.rows.all().forEach(e)},this.rows.find=function(e,t){if("string"==typeof e||"number"==typeof e||!e&&t){var n=l.Eg(e);e||(n=l.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,l):null}if("function"!=typeof e)throw new DayPilot.Exception("Invalid rows.find() argument: id or function expected");var i=t||0,r=l.rowlist.find(function(t,n){return!(n<i)&&e(l.Ag(t))});if(r)return l.Ag(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;l.resources=o.data,l.Ma&&l.update()}};l.rowsLoadMethod&&"POST"===l.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=l.rows.find(e);if(!t)throw new DayPilot.Exception("The row to be removed was not found");return void l.rows.remove(t)}var n=e.$.row.resource,a=DayPilot.indexOf(l.resources,n);l.resources.splice(a,1),l.update()},this.rows.add=function(e){l.resources.push(e),l.rb()},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=l.rows.find(t.id),!e)return;e.data=t}var n=e.index,a=l.rowlist,i=a[n],r=e.data,o=l.Hg(r),s=l.Ig(o);s.level=i.level,s.index=n,s.top=i.top,s.height=i.height,a[n]=s,s.resetEvents(),l.Of(s.index),l.Jg(s),l.Fg(s),l.if(s.index),l.af(),l.df()},this.Jg=function(e){for(var t=l.events.list,n=t.length,a="function"==typeof l.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.zb(i);var o=this.Tf(r,e);o&&a&&(o.cache=this.yb.events[i])}}}},this.Ve=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||[],l.rowlist=[],this.Kg(e)},this.sa=function(){return new DayPilot.Date(this.startDate)},this.Mf=function(){return new DayPilot.Date(l.startDate).addDays(l.days)},this.visibleStart=function(){return this.sa()},this.visibleEnd=function(){return this.Mf()},this.Ig=function(e){var t={};return t.backColor=e.backColor,t.fontColor=e.fontColor,t.cssClass=e.cssClass,t.name=e.name,t.html=l._a(e.name,e.html),t.id=e.id,t.toolTip=e.toolTip,t.areas=e.areas,t.tags=e.tags,t.height=l.eventHeight,t.level=0,t.resource=e.ye,t.lines=[],t.isRow=!0,t.getHeight=function(){return Math.max(l.eventHeight,this.lines.length*l.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):l.startDate.addDays(l.days);for(var a=[],i=0;i<e.events.length;i++){var r=e.events[i],o=l.qf(r.end());DayPilot.Util.overlaps(r.start(),o,t,n)&&a.push(r)}return a}},t.Lg=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.Lg();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.Kg=function(e){if(e)for(var t=l.rowlist,n=0;n<e.length;n++)if(e[n]){var a={};a.index=n;var i=this.Hg(e[n],a),r=l.Ig(i,parent);r.index=n,t.push(r)}},this.yg=function(e){var t={};return t.row=this.Ag(e),DayPilot.Util.copyProps(e,t.row,["html","backColor","fontColor","cssClass","toolTip","areas"]),"function"==typeof this.onBeforeRowHeaderRender&&this.onBeforeRowHeaderRender(t),t},this.Hg=function(e,t){var n={get $data(){return this.ye}};for(var a in t)n[a]=t[a];for(var i in e)n[i]=e[i];return n.html=l._a(e.name,e.html),n.ye=e,n},this.Mg=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=c.Ng,this.nav.top.ontouchmove=c.Og,this.nav.top.ontouchend=c.Pg;var e=this.rowHeaderWidth,t=o();t.style.position="absolute",t.style.left="0px",t.style.width=e+"px";var n=o();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.fb()),t.appendChild(n),t.appendChild(this.Qg());var a=o();a.style.position="absolute",a.style.left=e+"px",a.style.width="1px",a.style.height=this.Ce()+this.Ya()+"px",a.className=this.L("_splitter"),this.nav.divider=a;var i=o();i.style.marginLeft=e+1+"px",i.style.position="relative",this.nav.right=i;var r=o();r.style.position="absolute",r.style.top=this.Ce()+"px",r.style.width="100%",r.style.height="1px",r.style.boxSizing="border-box",r.style.borderBottom="1px solid transparent",r.setAttribute("data-dh2","true"),r.className=this.L("_divider_horizontal"),this.nav.dh2=r,i.appendChild(l.Rg()),i.appendChild(l.Sg()),i.appendChild(r);var s=o();s.style.clear="left";var d=o();d.style.height="1px",d.style.position="absolute",d.style.left="0px",d.style.right="0px",d.style.display="none",d.className=this.L("_divider_horizontal"),this.nav.dividerTop=d;var u=o();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(s),this.nav.top.appendChild(d),this.nav.top.appendChild(u)},this.ia=function(){var e=this.Ce();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.Tg=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.Ug=function(){var e=this.rowHeaderWidth,t=this.divHeader;t.style.width=e+"px";for(var n=l.qg(),a=n.start;a<n.end;a++){var i=t.rows[a];if(i){var r=l.rowHeaderWidth;i.style.width=r+"px";i.firstChild.style.width=r+"px"}}l.nav.resScrollSpace&&(l.nav.resScrollSpace.style.width=e+"px")},this._e=function(){this.Tg(),this.Ug()},this.fb=function(){var e=this.rowHeaderWidth,t=o();l.nav.corner=t,t.style.width=e+"px",t.style.height=this.Ce()+"px",t.style.overflow="hidden",t.style.position="relative",t.oncontextmenu=function(){return!1},t.className=this.L("_corner");var n=o();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="&nbsp;",this.divCorner=n,t.appendChild(n),t},this.Ce=function(){return l.timeHeaders?l.timeHeaders.length*l.headerHeight:0},this.Vg=null,this.Qg=function(){var e=o();e.style.width=this.rowHeaderWidth+"px",e.style.height=this.Ya()+"px",e.style.overflow="hidden",e.style.position="relative",e.className=l.L("_rowheader_scroll");var a=l.R.xg();a&&(e.style.overflowY="auto"),e.ontouchstart=function(){n.Wg=!0},e.oncontextmenu=function(){return!1},e.onscroll=function(){if(l.Vg&&clearTimeout(l.Vg),a){var i=function(){var t=l.Xg()-l.nav.scroll.offsetHeight;e.scrollTop=Math.min(e.scrollTop,t),l.nav.scroll.scrollTop=e.scrollTop};t?n.Wg&&(l.Vg=setTimeout(i,10)):l.Vg=setTimeout(i,10)}else l.Vg=setTimeout(function(){l.nav.scroll.scrollTop=e.scrollTop},500)},e.setAttribute("role","region"),e.setAttribute("aria-label","scheduler rows");var i=o();return this.divHeader=i,e.appendChild(i),this.divResScroll=e,this.De=e,e},this.Yg=null,this.Zg=null,this.$g=function(){var e=function(){l._g(),l.ef()},t=function(){var t=l.nav.top;if(t){if(!l.Yg)return l.Yg={},void(l.Yg.width=t.offsetWidth);l.Yg.width!==t.offsetWidth&&(l.Yg.width=t.offsetWidth,e())}};if(!l.Zg){var n=new ResizeObserver(DayPilot.debounce(t,100));n.observe(l.nav.top),l.Zg=n}},this._g=function(){l.Q||(l.ma(),l.ah(),l.yb.drawArea=null)},this.ah=function(){var e=l.yf;l.clearSelection(),l.yf=e,l.zf(e,{"justDraw":!0})},this.Rg=function(){var e=o();e.style.overflow="hidden",e.style.display="block",e.style.position="absolute",e.style.top="0px",e.style.width="100%",e.style.height=this.Ce()+"px",e.style.overflow="hidden",e.className=l.L("_timeheader_scroll"),this.divTimeScroll=e;var t=o();return t.style.width=this.Ae()+5e3+"px",this.divNorth=t,e.appendChild(t),e},this.Ya=function(){var e=0,t=l.heightSpec;return"Fixed"===t?this.height?this.height:0:(e=l.Xg(),"Max"===t&&e>l.height?l.height:e)},this.Xg=function(){var e;return this.ae!==-1?(e=this.ae,this.ae>0&&"auto"===l.nav.scroll.style.overflowX&&(e+=DayPilot.sh(l.nav.scroll)+1)):e=this.rowlist.length*l.eventHeight,e},this.Sg=function(){var e=o();e.style.overflow="auto",e.style.overflowX="auto",e.style.overflowY="auto",e.style.height=this.Ya()+"px",e.style.top=this.Ce()+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.he=o();var t=this.he;t.style.userSelect="none",t.style.webkitUserSelect="none",t.calendar=this,t.style.position="absolute";var n=this.Ae();return n>0&&(t.style.width=n+"px"),t.onmousedown=this.bh,t.onmousemove=this.ch,t.onmouseup=this.dh,t.oncontextmenu=this.eh,t.className=this.L("_matrix"),this.divStretch=o(),this.divStretch.style.position="absolute",this.divStretch.style.height="1px",t.appendChild(this.divStretch),this.divCells=o(),this.divCells.style.position="absolute",this.divCells.oncontextmenu=this.eh,t.appendChild(this.divCells),this.divLines=o(),this.divLines.style.position="absolute",this.divLines.oncontextmenu=this.eh,t.appendChild(this.divLines),
19
- this.divSeparators=o(),this.divSeparators.style.position="absolute",this.divSeparators.oncontextmenu=this.eh,t.appendChild(this.divSeparators),this.divRange=o(),this.divRange.style.position="absolute",this.divRange.oncontextmenu=this.eh,t.appendChild(this.divRange),this.divEvents=o(),this.divEvents.style.position="absolute",t.appendChild(this.divEvents),this.divShadow=o(),this.divShadow.style.position="absolute",t.appendChild(this.divShadow),e.appendChild(t),e},this.qb=function(){n.fh||(n.fh=!0,DayPilot.re(document,"mouseup",n._d),DayPilot.re(document,"touchmove",n.gh),DayPilot.re(document,"touchend",n.hh))},this.ih=function(){this.nav.scroll.root=this,this.nav.scroll.onscroll=this.ef,l.jh=this.nav.scroll.scrollLeft,l.kh=this.nav.scroll.scrollTop,this.divNorth&&(l.lh=this.divNorth.clientWidth)},this.mh={},this.mh.step=300,this.mh.delay=10,this.mh.mode="display",this.mh.layers=!1,this.Gg=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+l.rowMarginTop,r.part.right=r.part.left+r.part.width}t+=l.eventHeight}},this.Ue=null,this.na=function(e){if(!l.Q){var t=this.mh.step;"display"===this.mh.mode?this.divEvents.style.display="none":"visibility"===this.mh.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.le(),i=a.pixels.top,r=a.pixels.bottom;l.rowlist.filter(function(e){var t=e.top-l.dynamicEventRenderingMargin,a=t+e.height+2*l.dynamicEventRenderingMargin;return!n||!(r<=t||i>=a)}).forEach(function(n){l.Gg(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],s=l.Va(o);if(e&&s&&(t--,t<=0))return l.divEvents.style.visibility="",l.divEvents.style.display="",void(l.Ue=setTimeout(function(){l.na(e)},l.mh.delay))}}),this.divEvents.style.display="",this.pe()}},this.nf=function(e){var t=l.rowlist[e];this.Gg(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.Va(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.Pa(n)}this.elements.events=[]},this.mf=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.Pa(i),n.push(a))}for(var a=n.length-1;a>=0;a--)this.elements.events.splice(n[a],1)}},this.Pa=function(e){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.nh=function(){if("Progressive"===this.dynamicEventRendering){if(l.dynamicEventRenderingCacheSweeping){var e=l.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.oh(i.event)?e>0?(e--,t.unshift(i)):this.Pa(i):t.unshift(i)}this.elements.events=t,this.divEvents.style.display=""}}},this.ph=function(e){for(var t=this.le(),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.gb(i))}},this.gb=function(e){if(e&&e.coords){var t=e.coords.x,n=e.coords.y;DayPilot.rfa(l.elements.cells,e),DayPilot.de(e),l.yb.cells[t+"_"+n]=null}},this.qh=function(){var e="Progressive"===this.dynamicEventRendering;if(!this.nav.scroll)return!1;for(var t=this.nav.scroll.scrollTop,n=t+this.nav.scroll.clientHeight,a=0;a<this.rowlist.length;a++){var i=this.rowlist[a],r=i.top,o=i.top+i.height;if(!e||!(n<=r||t>=o))for(var s=0;s<i.lines.length;s++)for(var l=i.lines[s],d=0;d<l.length;d++){var c=l[d];if(this.rh(c))return!0}}return!1},this.rh=function(e){if(e.rendered)return!1;var t="Progressive"===this.dynamicEventRendering,n=this.nav.scroll.scrollLeft,a=n+this.nav.scroll.clientWidth,i=e.part.left,r=e.part.left+e.part.width;return!t||!(a<=i||n>=r)},this.oh=function(e){if(!e.rendered)return!0;var t=this.le(),n=t.pixels.top,a=t.pixels.bottom,i=t.pixels.left-this.dynamicEventRenderingMargin,r=t.pixels.right+this.dynamicEventRenderingMargin,o=e.part.left,s=e.part.right,d=e.part.top,c=e.part.top+l.eventHeight;return r<=o||i>=s||(a<=d||n>=c)},this.Va=function(e,t){t=t||{};var n=t.forced;if(e.rendered)return!1;var a="Progressive"===this.dynamicEventRendering,i=e.part.dayIndex,r=l.divEvents,s=l.rowlist,d=s[i],u=d.top,h=this.le(),f=h.pixels.left-this.dynamicEventRenderingMargin,v=h.pixels.right+this.dynamicEventRenderingMargin,p=h.pixels.top,m=h.pixels.bottom,g=e.part.left,y=e.part.left+e.part.width,b=e.part.top+u,w=b+l.eventHeight,x=v<=g||f>=y,_=m<=b||p>=w;if(!n&&a&&(x||_))return!1;var C=e.part.width,k=l.eventHeight,D=e.cache||e.data,S=D.borderRadius||l.eventBorderRadius;"number"==typeof S&&(S+="px");var M=D.padding||l.eventPadding;"number"==typeof M&&(M+="px"),C=DayPilot.Util.atLeast(0,C),k=DayPilot.Util.atLeast(0,k);var T=o();T.style.position="absolute",T.style.left=e.part.left+"px",T.style.top=u+e.part.top+"px",T.style.width=C+"px",T.style.height=k+"px",l.eventTextWrappingEnabled||(T.style.whiteSpace="nowrap"),T.style.overflow="hidden",T.className=this.L("_event"),D.cssClass&&DayPilot.Util.addClass(T,D.cssClass);"number"==typeof e.part.line&&DayPilot.Util.addClass(T,this.L("_event_line"+e.part.line)),S&&(T.style.borderRadius=S),this.showToolTip&&(T.title=e.client.toolTip()||""),T.onmousemove=this.uh,T.onmousedown=this.vh,T.onmouseup=this.wh,T.ontouchstart=c.xh,T.ontouchmove=c.yh,T.ontouchend=c.zh,e.client.clickEnabled()&&(T.onclick=this.Ne),"undefined"!=typeof D.ariaLabel?T.setAttribute("aria-label",D.ariaLabel):T.setAttribute("aria-label",D.text),T.setAttribute("tabindex","-1");var A=o();A.className=l.L("_event_inner"),S&&(A.style.borderRadius=S),M&&(A.style.padding=M),D.backColor&&(A.style.background=D.backColor),D.fontColor&&(A.style.color=D.fontColor),"darker"===D.borderColor&&D.backColor?A.style.borderColor=DayPilot.ColorUtil.darker(D.backColor,2):A.style.borderColor=D.borderColor,D.backImage&&(A.style.backgroundImage="url("+D.backImage+")",D.backRepeat&&(A.style.backgroundRepeat=D.backRepeat)),T.appendChild(A);var E=e.start().getTime()===e.part.start.getTime(),H=e.rawend().getTime()===e.part.end.getTime();if(E||DayPilot.Util.addClass(T,this.L("_event_continueleft")),H||DayPilot.Util.addClass(T,this.L("_event_continueright")),e.client.barVisible()&&C>0){var N=100*e.part.barLeft/C,I=Math.ceil(100*e.part.barWidth/C),R=o();R.className=this.L("_event_bar"),R.style.position="absolute",D.barBackColor&&(R.style.backgroundColor=D.barBackColor);var P=o();P.className=this.L("_event_bar_inner"),P.style.left=N+"%",0<I&&I<=1?P.style.width="1px":P.style.width=I+"%",D.barColor&&(P.style.backgroundColor=D.barColor),D.barImageUrl&&(P.style.backgroundImage="url("+D.barImageUrl+")"),R.appendChild(P),T.appendChild(R)}T.row=i,T.event=e,A.innerHTML=e.client.innerHTML();var L=[];return function(){if("Disabled"!==l.eventDeleteHandling&&!D.deleteDisabled){var e=l.durationBarVisible?l.durationBarHeight:0;L.push({v:"Hover",w:17,h:17,top:e+2,right:2,css:l.L("_event_delete"),onClick:function(e){l.ya(e.source)}})}}(),D.areas&&(L=L.concat(D.areas)),DayPilot.Areas.attach(T,e,{areas:L}),this.elements.events.push(T),r.appendChild(T),e.rendered=!0,!0},this._a=function(e,t){return l.R.da()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.of=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=l.rowlist[a],r=i.top,o=r+n.part.top,s=i.height,d=l.eventHeight;n.part.top+d>s&&(d=Math.max(0,s-n.part.top)),t.style.top=o+"px",t.style.height=d+"px"}},this.Ah=function(e){if(!e)return null;for(var t=0;t<l.elements.events.length;t++){var n=l.elements.events[t];if(n.event===e||n.event.data===e.data)return n}return null},this.Lf=function(e){var t=l.events.Qf(e.data);if(!t)return null;var n=l.rowlist[t.part.dayIndex];return l.Gg(n),l.Va(t,{"forced":!0}),l.Ah(t)},this.uh=function(e){for(var t=e.currentTarget;t&&!t.event;)t=t.parentNode;l.Bh(t,e),l.Re(e)},this.Pe={},this.vh=function(e){l.Re(e);var t=DayPilot.Util.mouseButton(e);e.preventDefault(),e.stopPropagation(),t.left&&("w-resize"===this.style.cursor||"e-resize"===this.style.cursor?(n.Oe=!0,n.gg=this,n.kg=this.event,n.Ch=DayPilot.mc(e),r().style.cursor=this.style.cursor):("move"===this.style.cursor||this.event.client.moveEnabled())&&l.Dh(this,e))},this.wh=function(e){DayPilot.Util.mouseButton(e).right&&l.xa.call(this,e)},this.Dh=function(e,t){var n=l.Pe;l.Re(t),n.Eh=!0,n.Pe=e,n.ng=e.event,n.Ch=DayPilot.mc(t),n.Fh=DayPilot.mo3(e,t).x,n.fg=l.getDate(l.coords.x,!0)},"undefined"==typeof DayPilot.Global.touch&&(DayPilot.Global.touch={}),DayPilot.Global.touch.active=!1,DayPilot.Global.touch.start=!1,c.Hf=[];c.xh=function(t){if(!DayPilot.Global.touch.active&&!DayPilot.Global.touch.start){t.stopPropagation(),c.Gh(),DayPilot.Global.touch.start=!0,DayPilot.Global.touch.active=!1;var n=t.currentTarget;l.coords=c.Hh(t);var a=l.tapAndHoldTimeout;c.Hf.push(setTimeout(function(){DayPilot.Global.touch.active=!0,DayPilot.Global.touch.start=!1,t.preventDefault();var a=n.event;switch(l.eventTapAndHoldHandling){case"Move":if(a.client.moveEnabled()){var i=e(t);c.Dh(n,i)}}},a))}};c.yh=function(){c.Gh(),DayPilot.Global.touch.start=!1},c.zh=function(e){if(!DayPilot.Util.isMouseEvent(e)){if(c.Gh(),DayPilot.Global.touch.start){DayPilot.Global.touch.start=!1,e.preventDefault(),e.stopPropagation();var t=e.currentTarget;setTimeout(function(){l.Qe(t,e)})}setTimeout(function(){DayPilot.Global.touch.start=!1,DayPilot.Global.touch.active=!1},500)}},c.Ng=function(e){if(!(DayPilot.Global.touch.active||DayPilot.Global.touch.start||e.touches.length>1||"Disabled"===l.timeRangeSelectedHandling)){c.Gh(),DayPilot.Global.touch.start=!0,DayPilot.Global.touch.active=!1;var t=l.tapAndHoldTimeout;c.Hf.push(setTimeout(function(){DayPilot.Global.touch.active=!0,DayPilot.Global.touch.start=!1,e.preventDefault(),l.coords=c.Hh(e),c.Ih=l.Jh()},t));l.coords=c.Hh(e)}},c.Og=function(e){if(c.Gh(),DayPilot.Global.touch.start=!1,n.gg)return e.preventDefault(),void c.Kh();if(DayPilot.Global.touch.active){if(e.preventDefault(),l.coords=c.Hh(e),n.Pe)return void c.Lh();if(c.Ih){var t=c.Ih;t.end={x:Math.floor(l.coords.x/l.cellWidth),"time":l.getDate(l.coords.x,!0)},l.zf(t)}}},c.debug=function(){},c.Pg=function(e){c.Gh();if(DayPilot.Global.touch.active){if(n.Pe){e.preventDefault();var t=n.ng;if(l!==n.og.calendar)return;var a=n.og.start,i=n.og.end,o=n.og.row.id;DayPilot.Util.removeClass(n.Pe,l.L("_event_moving_source")),DayPilot.de(n.og),n.og.calendar=null,r().style.cursor="",n.Pe=null,n.ng=null,n.og=null,l.M(t,a,i,o)}if(c.Ih){var s=c.Ih;c.Ih=null;var d=l.elements.range2;d&&d.overlapping?l.clearSelection():l.vf(s)}}else if(DayPilot.Global.touch.start){if(l.coords.x<l.getScrollX())return;var s=l.Jh();l.zf(s);var d=l.elements.range2;d&&d.overlapping?l.clearSelection():l.vf(s)}setTimeout(function(){DayPilot.Global.touch.start=!1,DayPilot.Global.touch.active=!1},500)},c.Gh=function(){for(var e=0;e<c.Hf.length;e++)clearTimeout(c.Hf[e]);c.Hf=[]},c.Hh=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=l.he,a=e.touches?e.touches[0]:e;return t(a.pageX,a.pageY,n)},c.Dh=function(e,t){n.Pe=e,n.ng=e.event,n.Ch=t;var a=DayPilot.abs(e);n.Fh=t.x-a.x,n.fg=l.getDate(l.coords.x,!0),n.og=l.ca(e),l.mg()},c.Kh=function(){if(!n.jg){var e=n.gg;n.jg=l.ca(e)}l.lg()},c.Lh=function(){if(!n.og){var e=n.Pe;n.og=l.ca(e)}n.og.calendar.mg()},this.Bh=function(e,t){var a=this.eventResizeMargin,i=e;if("undefined"!=typeof n){var r=DayPilot.mo3(e,t);if(r&&(l.eventOffset=r,!n.gg&&!n.Pe)){var o=i.event.part.start.toString()===i.event.start().toString(),s=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()?s?(e.style.cursor="e-resize",e.dpBorder="right"):e.style.cursor="not-allowed":n.gg||n.Pe||(i.event.client.clickEnabled()?e.style.cursor="pointer":e.style.cursor="default")}}},this.Af=function(){var e=l.Me();return l.days*(1440/e)},this.wf=function(e){if(e=e||n.Ih||l.yf,!e)return null;var t=l.rowlist[e.start.y];if(!t)return null;var a,i,r=e,o=r.end.time>r.start.time,s=t.id,d=o?r.start.x:r.end.x,c=o?r.end.x:r.start.x,u=l.snapToGrid;u?(a=l.Je(d).start,i=l.Je(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,s,l);return h.allowed=!e.div||!e.div.overlapping,h},this.Ze=function(){this.yb.timeHeader={},l.elements.timeHeader.length>0&&(l.elements.timeHeader=[]);var e=o();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.Mh(a,t);var i=this.divNorth;1===i.childNodes.length?i.replaceChild(e,i.childNodes[0]):(i.innerHTML="",i.appendChild(e));var r=this.Ae();i.style.width=r+5e3+"px",r>0&&(this.divStretch.style.width=r+"px")},this.He=function(e,t){var n=null,a=this.R.Ge();t=t||this.cellGroupBy;var i=e.start;switch(t){case"Minute":n=i.toString("m");break;case"Hour":n="Clock12Hours"===l.R.Nh()?i.toString("h tt",a):i.toString("H",a);break;case"Day":n=i.toString(a.datePattern);break;case"Week":n=1===d.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.Oh(i,r);break;default:throw new DayPilot.Exception("Invalid groupBy value: "+t)}return n},this.Oh=function(e,t){var n=this.R.Ge();return t=t||this.cellDuration,t<1?e.toString("ss"):t<60?e.toString("mm"):t<1440?"Clock12Hours"===l.R.Nh()?e.toString("h tt",n):e.toString("H",n):t<10080?e.toString("d"):10080===t?1===d.ea()?e.weekNumberISO():e.weekNumber():e.toString("MMMM yyyy",n)},this.Fe=function(e,t,n){var a,i=l.startDate.addDays(l.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()!==d.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 s=this.Le(e);s.current&&(a=s.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.Mh=function(e,t){var n=this.nav.timeHeader,a=this.timeHeader[t][e],i=t<this.timeHeader.length-1,r=a.left,s=a.width,d=t*l.headerHeight,c=l.headerHeight,u=o();u.style.position="absolute",u.style.top=d+"px",u.style.left=r+"px",u.style.width=s+"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.Bg,u.oncontextmenu=this.Cg,DayPilot.re(u,DayPilot.touch.start,function(e){e.stopPropagation()}),u.style.overflow="hidden",l.timeHeaderTextWrappingEnabled||(u.style.whiteSpace="nowrap");var h=o();h.innerHTML=l._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,l.L("_timeheader_cell")),DayPilot.Util.addClass(h,l.L("_timeheader_cell_inner")),u.appendChild(h),DayPilot.Areas.attach(u,a,{areas:a.areas}),this.yb.timeHeader[e+"_"+t]=u,this.elements.timeHeader.push(u),n.appendChild(u)},this.ag=function(){l.rowlist.forEach(function(e){var t=e.getHeight()+l.rowMarginTop+l.rowMarginBottom;e.height!==t&&(l.lf=!0),e.height=t}),l.lf&&(l.yb.drawArea=null)},this.$e=function(){l.rowlist.forEach(function(e){var t=l.divHeader;if(t){var n=e.index;if(t.rows[n]){var a=t.rows[n];l.sg&&(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")}}}),l.sg&&l.nav.resScrollSpace&&(l.nav.resScrollSpace.style.top=l.ae+"px")},this.bh=function(e){if(DayPilot.Global.touch.start||DayPilot.Global.touch.active)return!1;if(l.Re(e),"Disabled"===l.timeRangeSelectedHandling)return!1;var t=DayPilot.Util.mouseButton(e);if(l.Ph())return!1;if(t.middle||t.right)return!1;if(l.Qh(l.coords))return!1;var a=t.left?"left":t.right?"right":t.middle?"middle":"unknown";return l.Rh=a,n.Ih=l.Jh(),n.Ih&&(n.Sh=l),!1},this.Jh=function(){var e={},t=l.Ie(l.coords.x).x,n=l.getDate(l.coords.x,!0);return e.start={y:l.Gf(l.coords.y).i,x:t,"time":n},e.end={x:t,"time":n},e.calendar=l,l.zf(e),e},this.dh=function(e){if(l.Pe={},l.yf){if(DayPilot.Util.mouseButton(e).left){var t=l.yf;if(l.Qh(l.coords)){var a=function(e){return function(){n.Th=null;var t=l.wf(e);if(t){var a={};a.start=t.start,a.end=t.end,a.resource=t.resource,a.preventDefault=function(){a.preventDefault.value=!0},"function"==typeof l.onTimeRangeClick&&l.onTimeRangeClick(a),a.preventDefault.value||"function"==typeof l.onTimeRangeClicked&&l.onTimeRangeClicked(a)}}};"Disabled"!==l.timeRangeClickHandling&&a(t)()}}}},this.Ph=function(){return!!(n.gg||n.Pe||n.Ih)||!!l.Pe.Eh},this.dragInProgress=function(){return l.Ph()},this.Re=function(e){var t=DayPilot.mo3(l.he,e);t=t||{},t.stamp=t.x+"_"+t.y,l.coords&&l.coords.stamp===t.stamp||(l.coords=t)},this.ch=function(e){if(!DayPilot.Global.touch.active){var t=DayPilot.mc(e);if(l.Re(e),l.Pe.Eh){DayPilot.distance(l.Pe.Ch,t)>2&&(DayPilot.Util.copyProps(l.Pe,n),r().style.cursor="move",l.Pe={})}n.gg&&n.kg.calendar===l?(n.gg.event||(n.gg.event=n.kg),l.Uh()):n.ng?l.Vh():n.Ih&&n.Ih.calendar===l&&(n.Ih.moved=!0,l.Wh())}},this.Wh=function(){var e=n.Ih,t=l.Ie(l.coords.x).x,a=l.getDate(l.coords.x,!0);e.end={x:t,"time":a},l.zf(e)},this.Uh=function(){n.jg||(n.jg=l.ca(n.gg)),l.lg()},this.Vh=function(){if(!n.og){DayPilot.Util.addClass(n.Pe,l.L("_event_moving_source"));var e=n.ng;n.og=l.ca(e)}l.mg()},this.eh=function(e){return e.cancelBubble=!0,!1},this.Qh=function(e){var t=l.yf;if(!t||!t.start||!t.end)return!1;var n=this.Jf(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,s=n.bottom;return e.x>=i&&e.x<=r&&e.y>=o&&e.y<=s},this.zf=function(e){function t(e){var t,n,s,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=l.Je(f),m=l.Je(v);t=p.left,n=m.left+m.width}else c?(s=e.start.time,d=e.end.time):(s=e.end.time,d=e.start.time),t=l.getPixels(s).left,n=l.getPixels(d).left;var g=n-t,y=l.elements.range2;if(!y){y=o(),y.style.position="absolute";var b=o();b.className=l.L("_shadow_inner"),a&&(y.style.borderRadius=a,b.style.borderRadius=a),y.appendChild(b),l.divShadow.appendChild(y)}return y.className=l.L("_shadow"),y.firstChild.innerHTML="",y.style.left=t+"px",y.style.top=r[u].top+"px",y.style.width=g+"px",y.style.height=r[u].height-1+"px",y.calendar=l,l.elements.range2=y,y}if(e=e||n.Ih){var a=l.eventBorderRadius;"number"==typeof a&&(a+="px");var i=l.snapToGrid,r=l.rowlist;t(e)}},this.Xh=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(!l.coords)return null;var e={};e.x=l.coords.x,e.y=l.coords.y;var t=l.Gf(e.y,e.grid).element;return e.row=l.Ag(t),e.time=l.getDate(e.x,!0),e},this.Hf={},this.Hf.na=null,this.Hf.drawCells=null,this.Hf.drawRows=null,this.Hf.click=null,this.Hf.resClick=[],this.Hf.updateFloats=null,this.ef=function(){if(!l.Q){l.cf();var e=l.nav.scroll;if(l.jh=e.scrollLeft,l.kh=e.scrollTop,l.lh=e.clientWidth,l.divTimeScroll&&(l.divTimeScroll.scrollLeft=l.jh),t&&n.Wg?a():l.divResScroll.scrollTop=l.kh,l.progressiveRowRendering&&(l.Hf.drawRows&&(clearTimeout(l.Hf.drawRows),l.Hf.drawRows=null),l.scrollDelayRows>0?l.Hf.drawRows=setTimeout(function(){l.vg()},l.scrollDelayRows):l.vg()),l.Hf.drawCells&&(clearTimeout(l.Hf.drawCells),l.Hf.drawCells=null),l.scrollDelayCells>0)l.Hf.drawCells=setTimeout(l.Yh(),l.scrollDelayCells);else{l.Yh()()}l.Hf.na&&(clearTimeout(l.Hf.na),l.Hf.na=null),l.scrollDelayEvents>0?l.Hf.na=setTimeout(l.Zh(),l.scrollDelayEvents):l.na(),l.Hf.updateFloats&&(clearTimeout(l.Hf.updateFloats),l.Hf.updateFloats=null),l.scrollDelayFloats>0?l.Hf.updateFloats=setTimeout(function(){l.oe()},l.scrollDelayFloats):l.oe(),l.onScrollCalled=!0}},this.Yh=function(){return function(){l&&l.df()}},this.Zh=function(){return function(){l&&(l.qh()?setTimeout(function(){l.nh(),setTimeout(function(){l.na(!0)},50)},50):l.pe())}},this.cf=function(){l.yb.drawArea=null},this.show=function(){l.visible=!0,l.be=!0,l.nav.top.style.display="",l.u(),l._g(),l.ef()},this.hide=function(){l.visible=!1,l.be=!1,l.nav.top.style.display="none"},this.Wf=function(e){if(!l.events.list)return null;for(var t=0;t<this.events.list.length;t++){var n=this.events.list[t];if(l.Pf(n,e)){var a={};return a.ex=n,a.index=t,a}}return null},this.$h=function(){var e=this.le(),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.hd(o,l)}this._h(o)}for(var d=this.qg(),l=d.start;l<d.end;l++)this.ai(l)},this.df=function(){if(!l.Q){var e=l.rowlist;if(e&&e.length>0){if(this.cellSweeping){var t=this.cellSweepingCacheSize;this.ph(t)}this.$h()}this.lf=!1}},this.le=function(){if(l.yb.drawArea)return l.yb.drawArea;if(!this.nav.scroll)return null;var e=l.kh,t={},n=null!=this.dynamicEventRenderingMarginX?this.dynamicEventRenderingMarginX:this.dynamicEventRenderingMargin,a=null!=this.dynamicEventRenderingMarginY?this.dynamicEventRenderingMarginY:this.dynamicEventRenderingMargin,i=l.jh-n,r=i+l.lh+2*n,o=0,s=0;o=l.Ie(i).x,s=l.Ie(r,!0).x;var d=this.Af();s=Math.min(s,d-1),o=DayPilot.Util.atLeast(o,0);var c=e-a,u=e+this.nav.scroll.offsetHeight+2*a,h=this.Gf(c).i,f=this.Gf(u).i;f<this.rowlist.length&&f++,t.xStart=o,t.xEnd=s,t.yStart=h,t.yEnd=f;var v=l.nav.scroll;return 0===v.clientWidth&&(v=l.divTimeScroll),t.pixels={},t.pixels.left=v.scrollLeft,t.pixels.right=v.scrollLeft+v.clientWidth,t.pixels.top=v.scrollTop,t.pixels.bottom=v.scrollTop+v.clientHeight,t.pixels.width=v.scrollWidth,t.sw=DayPilot.sw(l.nav.scroll),l.yb.drawArea=t,t},this.Ae=function(){return l.Af()*l.cellWidth},this.ai=function(e){var t=l.rowlist,n=l.divLines,a="y_"+e;if(!this.yb.linesHorizontal[a]){var i=t[e],r=i.height,s=i.top+r-1,d=this.Ae(),c=o();c.style.left="0px",c.style.top=s+"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.yb.linesHorizontal[a]=c}},this._h=function(e){var t=l.Je(e);if(t){var n=l.divLines,a=l.ae,i="x_"+e;if(!this.yb.linesVertical[i]){var r=t.left+t.width-1,s=o();s.style.left=r+"px",s.style.top="0px",s.style.width="1px",s.style.height=a+"px",s.style.fontSize="1px",s.style.lineHeight="1px",s.style.overflow="hidden",s.style.position="absolute",s.className=this.L("_matrix_vertical_line"),n.appendChild(s),this.elements.linesVertical.push(s),this.yb.linesVertical[i]=s}}},this.Xe=function(){l.ae=l.bi(l.rowlist)},this.bi=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.af=function(){l.elements.cells=[],l.yb.cells=[],l.divCells.innerHTML="",l.ci()},this.ci=function(){l.divLines.innerHTML="",l.yb.linesVertical={},l.yb.linesHorizontal={},l.elements.linesVertical=[]},this.pf=function(e){var t=[];for(var n in l.yb.cells)t.push(l.yb.cells[n]);t.filter(function(t){return t&&t.coords&&t.coords.y===e}).forEach(function(e){l.gb(e)})},this.hd=function(e,t){if(this.Ma){var n=l.Je(e);if(n){var a=l.rowlist,i=l.divCells,r=e+"_"+t;if(!this.yb.cells[r]){var s=this.di(e,t),d=l.ei(e,t),c=o();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",s&&s.backColor&&(c.style.backgroundColor=s.backColor),c.className=this.L("_cell"),c.coords={},c.coords.x=e,c.coords.y=t,s){if(s.cssClass&&DayPilot.Util.addClass(c,s.cssClass),c.innerHTML=l._a(s.text,s.html),s.backImage&&(c.style.backgroundImage='url("'+s.backImage+'")'),s.backRepeat&&(c.style.backgroundRepeat=s.backRepeat),s.business&&l.cellsMarkBusiness&&DayPilot.Util.addClass(c,l.L("_cell_business")),s.disabled&&DayPilot.Util.addClass(c,l.L("_cell_disabled")),s.backColor&&(c.style.backgroundColor=s.backColor),s.fontColor&&(c.style.color=s.fontColor),s.horizontalAlignment||s.verticalAlignment){switch(c.style.display="flex",s.horizontalAlignment){case"right":c.style.justifyContent="flex-end";break;case"left":c.style.justifyContent="flex-start";break;case"center":c.style.justifyContent="center"}switch(s.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":s.areas||d.cell.areas})}i.appendChild(c),this.elements.cells.push(c),this.yb.cells[r]=c}}}},this.ei=function(e,t){var n=l.Je(e);if(!n)return null;var a=l.rowlist[t],i=a.id,r=n.start,o=n.end,s={};if(s.cell={x:e,y:t,start:r,end:o,resource:i,row:l.Ag(a),properties:l.di(e,t)},s.control=l,"function"==typeof this.onBeforeCellRender){var d=e+"_"+t;if(l.beforeCellRenderCaching&&l.bf[d])return s;l.bf[d]=!0,this.onBeforeCellRender(s)}return s},this.clearSelection=function(){this.fi()},this.gi=function(e,t,n){e=new DayPilot.Date(e),t=new DayPilot.Date(t);var a=l.je(n),i=l.Le(e);if(!i.current)throw new DayPilot.Exception("Time range selection 'start' out of timeline");var r=l.Le(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=l.gi(e,t,n);l.zf(i),a||setTimeout(function(){l.vf(i)},0)},this.tf=function(){var e=n.og&&n.og.source;e&&DayPilot.Util.removeClass(e,l.L("_event_moving_source")),DayPilot.de(n.og),n.og=null,DayPilot.Global.movingLink&&(DayPilot.Global.movingLink.clear(),DayPilot.Global.movingLink=null)},this.fi=function(){l.divShadow&&(l.divShadow.innerHTML=""),l.elements.range=[],l.elements.range2=null,l.yf=null,l.hi=null},d.Ld=function(){delete l.yb.headerHeight},d.da=function(){return"Disabled"!==l.xssProtection},d.Ge=function(){return DayPilot.Locale.find(l.locale)},d.Nh=function(){return"Auto"!==l.timeFormat?l.timeFormat:d.Ge().timeFormat},d.ea=function(){if("Auto"===l.weekStarts){var e=d.Ge();return e?e.weekStarts:0}return l.weekStarts||0},d.xg=function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("mobile")!==-1||e.indexOf("android")!=-1},d.eg=function(e){return"Always"===l.useEventBoxes||"Never"!==l.useEventBoxes&&e<60*l.Me()*1e3},this.di=function(e,t){var n=e+"_"+t,a=l.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=l.Je(e),s=o.start,d=o.end,c={};c.start=s,c.end=d,c.resource=r;var u={};u.business=l.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&&!(l.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,s=this.businessEndsHour;if(0===s&&(s=24),o===s)return!1;if(!(o<s))return r<s||r>=o;if(r<o)return!1;if(s>=24)return!0;if(r>=s)return!1}return!0},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.ii=function(e){this.heightSpec="Fixed",this.height=e-(this.Ce()+2),this.ma()},this.setHeight=this.ii,this.je=function(e){return l.Eg(e)[0]},this.xb=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.Ma)throw new DayPilot.Exception("This instance is already initialized. Use update() to change properties.");if(this.xb(),this.nav.top.dp){if(this.nav.top.dp===l)return l;throw new DayPilot.Exception("The target placeholder was already initialized by another DayPilot component instance.")}return this.ji(),this.$g(),this},this.ji=function(){this.Mg(),this.qb(),this.ba(),this.ih(),this.rb();var angular=l.ze.enabled;l.scrollToDate?l.scrollTo(l.scrollToDate):l.scrollX||l.scrollY?l.setScroll(l.scrollX,l.scrollY):angular||l.ef(),l.scrollToResourceId&&(l.scrollToResource(l.scrollToResourceId),l.scrollToResourceId=null);var e=function(){l.scrollY&&l.setScroll(l.scrollX,l.scrollY)};setTimeout(e,200),this.cf(),this.wb(),this.Ma=!0;var t=l.ge;t?l.scrollTo(t):l.ef()},this.vb=null,this.tb=function(e){if(e){var t={"resources":{"preInit":function(){var e=this.data;e&&(l.resources=e)}},"events":{"preInit":function(){var e=this.data;e&&(DayPilot.isArray(e.list)?l.events.list=e.list:l.events.list=e)},"postInit":function(){}},"scrollTo":{"preInit":function(){},"postInit":function(){this.data&&l.fe(this.data)}},"scrollX":{"postInit":function(){this.data&&l.ie(this.data)}},"scrollY":{"postInit":function(){this.data&&l.Be(this.data)}}};l.vb=t,l.ze.scrollToRequested&&(t.scrollTo.data=l.ze.scrollToRequested,l.ze.scrollToRequested=null),l.ze.scrollXRequested&&(t.scrollX.data=l.ze.scrollXRequested,l.ze.scrollXRequested=null),l.ze.scrollYRequested&&(t.scrollY.data=l.ze.scrollYRequested,l.ze.scrollYRequested=null);for(var n in e)t[n]||(l[n]=e[n]);for(var a in e)if(t[a]){var i=t[a];i.data=e[a],i.preInit&&i.preInit()}}},this.wb=function(){var e=l.vb;for(var t in e){var n=e[t];n.postInit&&n.postInit()}l.vb={}},this.Sa={},this.Sa.Ra=null,this.Sa.Mb=function(e,t,n){var a=l.Sa.Ra;if("function"==typeof a.createVNode&&"function"==typeof a.render){var i=a.createVNode(e,n);a.render(i,t)}},this.Sa.Wa=function(e,t){var n=l.Sa.Ra;if("function"==typeof n.render){var a=e;DayPilot.isArray(e)&&(a=n.h("div",null,e)),n.render(a,t)}},this.Sa.Ua=function(e){var t=l.Sa.Ra;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.adjustEndIn=l.qf,this.internal.adjustEndNormalize=l.rf,this.internal.xssTextHtml=l._a,this.internal.touch=l.ce,this.internal.skipUpdate=l.ze.skipUpdate,this.internal.skipped=l.ze.skipped,this.internal.loadOptions=l.tb,this.internal.postInit=l.wb,
20
- this.internal.enableAngular2=function(){l.ze.enabled=!0},this.internal.eventsFromAttr=function(){l.ze.Uf=!0},this.internal.resourcesFromAttr=function(){l.ze.bg=!0},this.internal.evImmediateRefresh=function(){l.events.uf()},this.internal.enableReact=function(e,t){l.cg.react=e,l.cg.reactDOM=t},this.internal.reactRefs=function(){return DayPilot.Util.copyProps(l.cg,{},["react","reactDOM"])},this.internal.enableVue=function(e){l.Sa.Ra=e},this.internal.vueRef=function(){return l.Sa.Ra},this.internal.vueRendering=function(){return l.Sa.Ta},this.tb(s)},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.ki={};var n=this.ki;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.li=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.li.events.length;t++)e.push(a.li.events[t]);return e},a.events.isEmpty=function(){return 0===a.li.events.length},a.events.forRange=function(e,t){return a.li.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)}},n.Pe=null,n.ng=null,n.Ch=null,n.gg=null,n.kg=null,n.Oe=!1,n.fh=!1,n.Th=null,n.mi=null,n.qc=function(){DayPilot.ue(document,"mouseup",n._d),DayPilot.ue(document,"touchmove",n.gh),DayPilot.ue(document,"touchend",n.hh),n.fh=!1},n.gh=function(e){if(n.gg){var t=n.gg.event.calendar;t.coords=t.ce.Hh(e),t.ce.Kh(),e.preventDefault()}if(n.Pe){e.preventDefault();var t=n.ng.calendar;t.coords=t.ce.Hh(e),t.ce.Lh()}},n.hh=function(e){n.Wg=!1,n._d(e)},n._d=function(e){if(n.gg){var t=function(){var e=n.kg,t=e.calendar;r().style.cursor="",n.gg=null,n.kg=null,DayPilot.de(n.jg),n.jg=null,t&&(t.ni=null)};if(setTimeout(function(){n.Oe=!1}),!n.jg)return void t();var i=n.kg,o=i.calendar,s=n.jg.start,l=n.jg.end,d="left"===n.gg.dpBorder?"start":"end";t(),o.K(i,s,l,d)}else if(n.ng){var t=function(){DayPilot.Global.movingAreaData=null;var e=n.og&&n.og.calendar;n.og&&(DayPilot.de(n.og),n.og.calendar=null),r().style.cursor="",n.Pe=null,n.ng=null,e&&(e.sf=null)};if(!n.og)return void t();var i=n.ng,o=n.og.calendar;if(!o)return void t();if(n.og.source=n.Pe,!n.og.row)return void t();var s=n.og.start,l=n.og.end,c=n.og.row.id;n.og.calendar=null,r().style.cursor="",n.Pe=null,n.ng=null,o.M(i,s,l,c,e),DayPilot.Global.movingAreaData=null}else if(n.Ih){var u=DayPilot.Util.mouseButton(e),h=n.Ih,f=h.calendar,t=function(){};if(f.hi=null,n.Th)return clearTimeout(n.Th),n.Th=null,void t();f.yf=h,n.Ih=null;var v=function(e){return function(){n.Th=null,f.vf(e),"Hold"!==f.timeRangeSelectedHandling&&"HoldForever"!==f.timeRangeSelectedHandling?a():f.yf=e}},p=f.Xh(h);return t(),u.left?(v(p)(),e.cancelBubble=!0,!1):void(n.Th=null)}n.Fh=null,n.fg=null}}}(DayPilot);if (typeof module !== "undefined") {
17
+ this.nd(a,"free")))}},this.Dd=function(){var e={};e.startDate=i.startDate,e.selectionStart=i.selectionStart,e.selectionEnd=i.selectionEnd.addDays(1),i.state.value=JSON.stringify(e)},this.xd=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.xd()){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.Fd=null,this.select=function(e,t,n){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.Ma)return void(this.Fd={"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.Gd()||this.selectionStart>=this.Hd())&&(v=this.selectionStart.firstDayOfMonth()),v.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=v}s&&i.freeHandSelectionEnabled?i.selectionEnd=new DayPilot.Date(s):this.Ed(),this.dd(),this.kd(),this.Id(),this.Cd(),this.Dd(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.O(),f&&this.Jd()},this.update=function(e){i.Kd(e)},this.Kd=function(e){if(i.tb(e),this.Ma){if(i.Q)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");i.Ld();var t={"day":i.selectionDay,"start":i.selectionStart,"end":i.selectionEnd};i.rb(),t.start===i.selectionStart&&t.end===i.selectionEnd&&t.day===i.selectionDay||i.O()}},this.rb=function(){this.dd(),this.kd(),this.Ed(),this.Id(),this.ha(),this.Cd(),this.Dd(),this.visible?this.show():this.hide()},this.Ld=function(){i.yb={}},this.vb=null,this.tb=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.vb=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.wb=function(){var e=this.vb;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.Md):WebForm_DoCallback(this.uniqueID,i,this.X,null,this.callbackError,!0)},this.Md=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.vd=function(e){var t=e+r.weekStarts();return t>6&&(t-=7),r.locale().dayNamesShort[t]},this.wd=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<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.Od=function(){if(!r.ld())return void(i.Pd=i.cellWidth);var e=i.months[0].cells[0][0],t=e.clientWidth;i.Pd=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.Qd=function(e){i.Od();var t=DayPilot.mo3(i.nav.top,e),n=i.Nd(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.Pd&&d<=t.y&&t.y<d+i.cellHeight)return{"month":n,"x":o,"y":s,"coords":t}}return null},this.Rd=function(e){if(i.freeHandSelectionEnabled){var t=i.Qd(e);t&&!t.header&&(o.start=t),e.preventDefault()}},this.Sd=function(e){if(o.start){var t=i.Qd(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.yd(e.x,e.y),a=t.top+n.y,s=t.left+n.x,l="px",d=i.sd();if(r.ld()){var c="Horizontal"===i.orientation?i.showMonths:1;s=t.leftPct+n.x/c,l="%",d=i.sd(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.zd=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.xd()){case"none":i.selectionStart=s,i.selectionEnd=s;break;case"day":if(i.autoFocusOnClick&&(s<i.Gd()||s>=i.Hd()))return void i.select(s);var l=a.cells[r][o];i.Ad(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.Gd()||c>=i.Hd()))return void i.select(s)}for(var u=0;u<7;u++)i.Ad(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.Gd()||s>=i.Hd()))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.Ad(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.Dd(),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("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("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.ud=function(){i.Td(i.skipMonths)},this.td=function(){i.Td(-i.skipMonths)},this.Td=function(e){this.startDate=this.startDate.addMonths(e),this.dd(),this.kd(),this.Id(),this.Dd(),this.Jd(),this.Cd()},this.Gd=function(){return i.startDate.firstDayOfMonth()},this.Hd=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.Jd=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.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.ed(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 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.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(){i.wa.scope&&i.wa.scope["$apply"]()},this.Sa={},this.Sa.Ra=null,this.Sa.Mb=function(e,t,n){var a=i.Sa.Ra;if("function"==typeof a.createVNode&&"function"==typeof a.render){var r=a.createVNode(e,n);a.render(r,t)}},this.Sa.Wa=function(e,t){var n=i.Sa.Ra;if("function"==typeof n.render){var a=e;DayPilot.isArray(e)&&(a=n.h("div",null,e)),n.render(a,t)}},this.Sa.Ua=function(e){var t=i.Sa.Ra;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=i.tb,this.internal.initialized=function(){return i.Ma},this.internal.enableVue=function(e){i.Sa.Ra=e},this.internal.vueRef=function(){return i.Sa.Ra},this.internal.vueRendering=function(){return i.Sa.Ta},this.internal.upd=function(e){i.Kd(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.yb.cellWidth)return i.yb.cellWidth;var e=i.Xd("_cell_dimensions").width;return e||(e=i.cellWidth),i.yb.cellWidth=e,e},r.ld=function(){return"Auto"===i.R.cellWidth()},this.clearSelection=function(){for(var e=0;e<this.selected.length;e++){var t=this.selected[e];i.Bd(t.parentNode,t.x,t.y)}this.selected=[]},this.Yd=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.Zd(t);for(var a in n)this.items[a]=1}}}},this.Xd=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.Zd=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.xb=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.xb(),!this.root.dp){this.Ed(),this.kd(),this.Id(),this.ha(),this.Cd(),this.ba(),this.$d(),this.qb();if(this.Yd()&&this.Jd(),this.Ma=!0,this.wb(),this.Fd){var e=this.Fd;this.select(e.date1,e.date2,e.options),this.Fd=null}return this}},this.$d=function(){i.nav.top.onmousedown=this.Rd,i.nav.top.onmousemove=this.Sd},this.qb=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.dd(),i.kd(),i.Id(),i.Cd(),i.Dd();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.tb(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.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,a={};return a.x=t,a.y=n,a}if("undefined"==typeof DayPilot.Scheduler){var t=navigator.userAgent.indexOf("iPad")>-1||navigator.userAgent.indexOf("iPhone")>-1,n={},a=function(){},i=!1,r=function(){var e;i&&(null===(e=window.console)||void 0===e?void 0:e.log.apply(window.console,arguments))},console={"log":r},o=function(){return document.body},s=function(){return document.createElement("div")};DayPilot.Scheduler=function(i,r){this.v="${v}";var l=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=!t,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=t?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.ae=-1,this.be=!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.yb={},this.yb.cells=[],this.yb.linesVertical={},this.yb.linesHorizontal={},this.yb.timeHeaderGroups=[],this.yb.timeHeader={},this.yb.events=[],this.nav={},this.R={};var d=this.R;this.ce={};var c=l.ce;this.ee={};var u=this.ee,h={};this.scrollTo=function(e){l.fe(e)},this.fe=function(e){if(e){if(!l.Ma)return void(l.ge=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=l.he.clientWidth,a=l.nav.scroll.clientWidth;t<0&&(t=0),t>n-a&&(t=n-a),l.ie(t)}},this.scrollToResource=function(e){DayPilot.complete(function(){var t;if("string"==typeof e||"number"==typeof e)t=l.je(e);else{if(!(e instanceof DayPilot.Row))throw new DayPilot.Exception("Invalid scrollToResource() argument: id or DayPilot.Row expected");t=l.je(e.id)}t&&setTimeout(function(){var e=t.top;l.nav.scroll.scrollTop=e},100)})},this.ke=function(){if(this.floatingTimeHeaders&&this.timeHeader){var e=l.le();if(e){l.me();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],s=o.left,d=o.left+o.width,c=null;if(s<t&&t<d&&(c={},c.x=r,c.y=i,c.marginLeft=t-s,c.marginRight=0,c.div=l.yb.timeHeader[r+"_"+i],a.push(c)),s<n&&n<d){c||(c={},c.x=r,c.y=i,c.marginLeft=0,c.div=l.yb.timeHeader[r+"_"+i],a.push(c)),c.marginRight=d-n;break}}for(var u=0;u<a.length;u++){var c=a[u];l.ne(c.div,c.marginLeft,c.marginRight)}}}},this.oe=function(){l.ke(),l.pe()},this.qe={};var f=l.qe;f.se=function(e,t,n,a){var i=e,r=e+n,o=t,s=t+a;return l.elements.events.filter(function(e){var t=e.event,n=t.part.left,a=t.part.left+t.part.width,d=l.rowlist[t.part.dayIndex],c=d.top+t.part.top,u=c+l.eventHeight;if(DayPilot.Util.overlaps(n,a,i,r)&&DayPilot.Util.overlaps(c,u,o,s))return!0})},f.te=function(){var e=[],t=l.le();if(!t)return e;for(var n=t.pixels.left,a=0;a<l.elements.events.length;a++){var i=l.elements.events[a],r=i.event,o=r.part.left,s=r.part.left+r.part.width;o<n&&n<s&&e.push(i)}return e.area=t,e},this.pe=function(){if(this.floatingEvents){var e=f.te();l.ve=performance.now(),e.forEach(function(t){var n=t.event,a=e.area.pixels.left,i=n.part.left,r=a-i;l.we(t,r,0)}),l.xe()}},this.elements.sections=[],this.elements.hsections=[],this.ne=function(e,t,n){var a=s();a.className=l.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=s();i.className=l.L("_timeheader_float_inner");var r=e.cell.th;i.innerHTML=l._a(r.text,r.html),r.fontColor&&(i.style.color=r.fontColor),a.appendChild(i),a.ye={marginLeft:t,marginRight:n},e.section=a,e.insertBefore(a,e.firstChild.nextSibling),e.firstChild.innerHTML="",this.elements.hsections.push(e)},this.me=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=l._a(n.th.text,n.th.html)),DayPilot.de(t.section),t.section=null}this.elements.hsections=[]},this.we=function(e,t,n){var a=e.section;if(a)return a.ye&&a.ye.marginLeft===t&&a.ye.marginRight===n?void(a.ye.stamp=l.ve):(e.section.style.left=t+"px",e.section.style.right=n+"px",void(a.ye={marginLeft:t,marginRight:n,stamp:l.ve}));a=s(),a.className=l.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=s();i.className=l.L("_event_float_inner"),i.innerHTML=e.event.client.html(),a.appendChild(i),a.ye={marginLeft:t,marginRight:n,stamp:l.ve},e.section=a,e.insertBefore(a,e.firstChild.nextSibling),e.firstChild.innerHTML="";var r=e.event,o=r.cache||r.data;o.fontColor&&(i.style.color=o.fontColor),this.elements.sections.push(e)},this.xe=function(){for(var e=[],t=0;t<this.elements.sections.length;t++){var n=this.elements.sections[t];if(n.section&&n.section.ye&&n.section.ye.stamp===l.ve)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){l.ze.enabled?(l.ze.scrollXRequested=e,setTimeout(function(){var e=l.ze.scrollXRequested;"number"==typeof e&&l.ie(e)},0)):l.ie(e)},this.ie=function(e){var t=l.nav.scroll,n=l.Ae();t.clientWidth+e>n&&(e=n-t.clientWidth),l.divTimeScroll.scrollLeft=e,t.scrollLeft=e},this.setScrollY=function(e){l.ze.enabled?(l.ze.scrollYRequested=e,setTimeout(function(){var e=l.ze.scrollYRequested;"number"==typeof e&&l.Be(e)},0)):l.Be(e)},this.Be=function(e){var t=l.nav.scroll,n=l.ae;t.clientHeight+e>n&&(e=n-t.clientHeight),l.divResScroll.scrollTop=e,t.scrollTop=e},this.setScroll=function(e,t){l.setScrollX(e),l.setScrollY(t)},this.ma=function(){if(this.nav.scroll){!function(){var e=l.Ae();l.he.style.height=l.ae+"px",l.he.style.width=e+"px",e>l.nav.scroll.clientWidth?l.nav.scroll.style.overflowX="auto":l.nav.scroll.style.overflowX="hidden"}();var e=1;this.nav.scroll.style.height="30px";var t=this.Ya(),n=t+this.Ce()+e;if(t>=0&&(this.nav.scroll.style.height=t+"px",this.De.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",l.nav.resScrollSpace){var a=30;"Auto"===l.heightSpec&&(a=DayPilot.sh(l.nav.scroll)),l.nav.resScrollSpace.style.height=a+"px"}for(var i=0;i<this.elements.linesVertical.length;i++)this.elements.linesVertical[i].style.height=this.ae+"px"}},this.Ee=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=l.startDate.addDays(l.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=l.startDate;o.ticks<t.ticks;){var s={};if(s.start=o,s.end=this.Fe(s.start,a),s.start.ticks===s.end.ticks)break;s.left=this.getPixels(s.start).left;var c=this.getPixels(s.end).left,u=c-s.left;if(s.width=u,"string"==typeof i?s.text=s.start.toString(i,d.Ge()):s.text=this.He(s,a),u>0){if("function"==typeof this.onBeforeTimeHeaderRender){var h={};h.start=s.start,h.end=s.end,h.text=s.text,h.html=null,h.toolTip=l._a(s.text),h.backColor=null,h.fontColor=null,h.level=this.timeHeader.length,h.cssClass=null;var f={};f.header=h,f.control=l,this.onBeforeTimeHeaderRender(f),s.text=h.text,s.html=h.html,s.backColor=h.backColor,s.fontColor=h.fontColor,s.toolTip=h.toolTip,s.areas=h.areas,s.cssClass=h.cssClass}r.push(s)}o=s.end}this.timeHeader.push(r)}},this.getPixels=function(e){var t=l.startDate.addDays(l.days);e=e.ticks>t.ticks?t.addTime(-1):e;var n=e.ticks-this.startDate.ticks,a=l.Bb(n),i=l.cellWidth,r=Math.floor(a/i),o=r*i;return{left:a,boxLeft:o,boxRight:o+i,i:r}},this.getDate=function(e,t,n){var a=this.Ie(e,n);if(!a)return null;var i=a.x,r=l.Je(i);if(!r)return null;var o=n&&!t?r.end:r.start;return t?o.addTime(this.Ke(a.offset)):o},this.Ie=function(e,t){t&&(e-=1);var n=Math.floor(e/l.cellWidth),a=l.Je(n);if(!a)return null;var i={};return i.x=n,i.offset=e%l.cellWidth,i.cell=a,i},this.Le=function(e){var t=e.ticks-this.startDate.ticks,n=60*l.Me()*1e3;if(t<0)return{past:!0};var a=Math.floor(t/n);return{i:a,current:l.Je(a)}},this.Bb=function(e){var t=60*l.Me()*1e3,n=l.cellWidth;return Math.floor(n*e/t)},this.Ke=function(e){var t=60*l.Me()*1e3,n=l.cellWidth;return Math.floor(e/n*t)},this.Ne=function(e){DayPilot.Global.touch.start||n.Oe||(l.Pe={},l.va(this,e))},this.va=function(e,t){e.event&&l.Qe(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;l.Re(e);var n={};if(n.e=t,n.div=this,n.originalEvent=e,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof l.onEventRightClick&&(l.onEventRightClick(n),n.preventDefault.value))return!1;switch(l.eventRightClickHandling){case"ContextMenu":var a=t.client.contextMenu();a?a.show(t):l.contextMenu&&l.contextMenu.show(this.event)}return"function"==typeof l.onEventRightClicked&&l.onEventRightClicked(n),!1}},this.Je=function(e){var t=l.Me(),n=60*t*1e3;return{start:l.startDate.addTime(e*n),end:l.startDate.addTime((e+1)*n),left:e*l.cellWidth,width:l.cellWidth}},this.Qe=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()){l.Re(t);var r={};r.e=n,r.control=l,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 l.onEventClick&&(l.onEventClick(r),r.preventDefault.value)||"function"==typeof l.onEventClicked&&l.onEventClicked(r)}}},this.ya=function(e){var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},t.control=l,t.toJSON=function(){return DayPilot.Util.copyProps(t,{},["e"])},"function"!=typeof l.onEventDelete||(l.onEventDelete(t),!t.preventDefault.value)){switch(l.eventDeleteHandling){case"Update":l.events.remove(e)}"function"==typeof l.onEventDeleted&&l.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,l.eventResizeHandling){case"Update":l.Te(r)}"function"==typeof l.onEventResized&&l.onEventResized(r)}}if("Disabled"!==this.eventResizeHandling){n=l.Se(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=l,r.toJSON=function(){return DayPilot.Util.copyProps(r,{},["e","async","newStart","newEnd"])},"function"==typeof l.onEventResize&&l.onEventResize(r),r.async||i()}},this.rb=function(e){e=e||{},clearTimeout(l.Ue),l.timeHeader=null,l.cellProperties={},l.Ee(),l.Ve(),l.events.We(),l.R.Ld(),l.clearSelection(),l.ha(),l.Xe(),l.Ye(),l.sb(),l.Ze(),l.$e(),l._e(),l.ia(),l.Z(),l.af(),l.bf={},l.cf(),l.ma(),l.df(),e.immediateEvents?l.na():setTimeout(function(){l.na()},100),this.visible?l.be!==l.visible&&this.show():this.hide(),this.be=this.visible,this.oe(),l.ef(),this.ff()},this.ff=function(){if("function"==typeof l.onAfterUpdate){var e={};l.onAfterUpdate(e)}},this.update=function(e){if(!l.Ma)throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that hasn't been initialized.");if(l.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.");h.request(e)},h.timeout=null,h.options=null,h.enabled=!1,h.request=function(e){h.enabled?(clearTimeout(h.timeout),h.gf(e),h.timeout=setTimeout(h.doit)):(h.gf(e),h.doit())},h.gf=function(e){if(e){h.options||(h.options={});for(var t in e)h.options[t]=e[t]}},h.doit=function(){var e=h.options;return h.options=null,l.Ma?(l.tb(e),l.rb({"immediateEvents":!0}),void l.wb()):void l.tb(e)},this.hf=function(e){e.forEach(function(e){l.if(e.index)})},this.jf=function(e){return e&&0!==e.length?e[0].isRow?e:e.map(function(e){return l.rowlist[e]}):[]},this.kf=function(e,t,n){e=DayPilot.ua(e),e=l.jf(e),l.hf(e),this.lf?(this.Xe(),this.$e(),this.af(),e.forEach(function(e){l.mf(e.index)}),e.forEach(function(e){l.nf(e.index)}),this.df(),this.of()):(e.forEach(function(e){t||l.mf(e.index),l.nf(e.index)}),e.forEach(function(e){l.pf(e.index)}),l.df()),l.pe(),n&&n(),this.cf()},this.Se=function(e){return"DateTime"===l.eventEndSpec?e:e.getDatePart().ticks===e.ticks?e.addDays(-1):e.getDatePart()},this.qf=function(e){return"DateTime"===l.eventEndSpec?e:e.getDatePart().addDays(1)},this.rf=function(e){return"DateTime"===l.eventEndSpec?e:e.getDatePart()},this.M=function(e,t,n,a,i){if(l.sf=null,"Disabled"!==l.eventMoveHandling){n=l.Se(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=l,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 l.tf();
18
+ switch(t=r.newStart,n=r.newEnd,l.eventMoveHandling){case"Update":l.Te(r)}l.tf(),"function"==typeof l.onEventMoved&&l.onEventMoved(r)};r.async=!1,r.loaded=function(){o()},"function"==typeof l.onEventMove&&l.onEventMove(r),r.async||o()}},this.Te=function(e){var t=e.e,n=e.newStart,a=e.newEnd,i=e.newResource;t.start(n),t.end(a),t.resource(i),l.events.update(t),l.events.uf()},this.vf=function(e){if(e)if(e.args)l.O(e.args.start,e.args.end,e.args.resource);else{var t=l.wf(e);if(!t)return;l.O(t.start,t.end,t.resource)}},this.O=function(e,t,n){if("Disabled"!==l.timeRangeSelectedHandling){var a=t;t=l.Se(a);var i={};if(i.control=l,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 l.onTimeRangeSelect){if(l.onTimeRangeSelect(i),i.preventDefault.value)return;e=i.start,t=i.end}t=l.qf(t),l.xf(l.yf,e,t),l.zf(l.yf),"function"==typeof l.onTimeRangeSelected&&l.onTimeRangeSelected(i)}},this.xf=function(e,t,n){if(e){var a,i=n;t.getTime()<l.startDate.getTime()?(e.start.x=0,e.start.time=l.startDate.getTime()):(a=l.Le(t),e.start.x=a.i,e.start.time=t);var r=l.startDate.addDays(l.days);i.getTime()>r.getTime()?(e.end.x=l.Af(),e.end.time=r.getTime()):(a=l.Le(i.addMilliseconds(-1)),e.end.x=a.i,e.end.time=n)}},this.Bf=function(e,t){l.Cf(e,t)},this.Cf=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 l.onRowClick&&(l.onRowClick(n),n.preventDefault.value)||"function"==typeof l.onRowClicked&&l.onRowClicked(n)},this.Df=function(e){var t={};t.header=e,t.control=l,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof l.onTimeHeaderClick&&(l.onTimeHeaderClick(t),t.preventDefault.value)||"function"==typeof l.onTimeHeaderClicked&&l.onTimeHeaderClicked(t)},this.getViewport=function(){var e=this.nav.scroll.scrollLeft,t=this.nav.scroll.scrollTop,n={},a=l.Ef(e,t),i=l.Ff(a),r=l.Je(a.start.x),o=l.Je(a.end.x);return n.start=l.getDate(e,!0),n.end=l.getDate(e+l.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 l.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.Ef=function(e,t){var n={};n.start={},n.end={};var a=l.Ie(e),i=l.Ie(e+l.nav.scroll.clientWidth);a&&(n.start.x=a.x),i&&(n.end.x=i.x);var r=t,o=t+l.nav.scroll.clientHeight;n.start.y=l.Gf(r).i,n.end.y=l.Gf(o).i,n.start.x=DayPilot.Util.atLeast(n.start.x,0);var s=l.Af();return n.end.x>=s&&(n.end.x=s-1),n},this.Ff=function(e){e||(e=this.Ef(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=l.rowlist[n];a&&t.push(a.id)}return t},this.L=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.sb=function(){l.nav.top.className!==l.L("_main")&&(l.nav.top.className=l.L("_main"),l.nav.dh1.className=l.L("_divider_horizontal"),l.nav.dh2.className=l.L("_divider_horizontal"),l.divResScroll.className=l.L("_rowheader_scroll"),l.nav.divider.className=l.L("_divider")+" "+l.L("_splitter"),l.nav.scroll.className=l.L("_scrollable"),l.he.className=l.L("_matrix")+" "+l.L("_grid_main"))},this.ba=function(){this.nav.top.dispose=this.dispose},this.dispose=function(){var e=l;if(e.Ma&&!e.Q){e.Q=!0;for(var t in e.Hf){var a=e.Hf[t];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.De=null,e.he.calendar=null,e.he=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,n.qc(e),u=null}},this.disposed=function(){return l.Q},this.ca=function(e){var t=null;t=e.nodeType?e.event:e;var n=l.eventBorderRadius;"number"==typeof n&&(n+="px");var a=l.If(t),i=l.rowlist,r=l.eventHeight,o=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=r+"px",u.style.left=d+"px",u.style.top=o+"px",u.style.overflow="hidden";var h=s();return u.appendChild(h),u.className=this.L("_shadow"),h.className=this.L("_shadow_inner"),n&&(u.style.borderRadius=n,h.style.borderRadius=n),l.divShadow.appendChild(u),u.calendar=l,u},this.Gf=function(e){for(var t,n=l.rowlist,a={},i=0,r=0,o=n.length,s=0;s<o;s++){var d=n[s];if(r+=d.height,i=r-d.height,t=d,a.top=i,a.bottom=r,a.i=s,a.element=t,e<r)break}return a},this.Jf=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(!l.events.list||"undefined"==typeof l.events.list.length)return null;if("function"==typeof e)return l.Kf(e);for(var t=l.events.list.length,n=0;n<t;n++)if(l.events.list[n].id===e)return new DayPilot.Event(l.events.list[n],l);return null},this.events.findAll=function(e){if("function"==typeof e){for(var t=l.events.list.length,n=[],a=0;a<t;a++){var i=new DayPilot.Event(l.events.list[a],l);e(i)&&n.push(i)}return n}if("object"==typeof e)return l.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.Kf=function(e){for(var t=l.events.list.length,n=0;n<t;n++){var a=new DayPilot.Event(l.events.list[n],l);if(e(a))return a}return null},this.events.focus=function(e){var t=l.Lf(e);null===t||void 0===t?void 0:t.focus()},this.events.scrollIntoView=function(e){if(l.Lf(e)){var t=e.start(),n=l.getViewport();!DayPilot.Util.overlaps(n.start,n.end,e.start(),e.end())&&DayPilot.Util.overlaps(l.sa(),l.Mf(),e.start(),e.end())&&l.scrollTo(t,"fast","middle");var a=e.resource();l.getViewport().resources.indexOf(a)===-1&&l.scrollToResource(a)}},this.events.all=function(){for(var e=[],t=0;t<l.events.list.length;t++){var n=new DayPilot.Event(l.events.list[t],l);e.push(n)}return e},this.events.forRange=function(e,t){e=e?new DayPilot.Date(e):l.visibleStart(),t=t?new DayPilot.Date(t):l.visibleEnd();for(var n=[],a=0;a<l.events.list.length;a++){var i=new DayPilot.Event(l.events.list[a],l);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;l.events.list=o.data,l.Ma&&l.update()}};if(l.eventsLoadMethod&&"POST"===l.eventsLoadMethod.toUpperCase())DayPilot.ajax({"method":"POST","contentType":"application/json","data":{"start":l.visibleStart().toString(),"end":l.visibleEnd().toString()},"url":e,"success":i,"error":a});else{var r=e,o="start="+l.visibleStart().toString()+"&end="+l.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+o:"?"+o,DayPilot.ajax({"method":"GET","url":r,"success":i,"error":a})}},this.events.Nf=function(e){var t=[];return l.rowlist.forEach(function(n){l.Of(n.index);for(var a=0;a<n.events.length;a++){var i=n.events[a].data;if(l.Pf(i,e)){t.push(n),n.events.splice(a,1);break}}}),t},this.events.Qf=function(e){if(!e)return null;for(var t=l.rowlist,n=0;n<t.length;n++){var a=t[n];l.Of(a.index);for(var i=0;i<a.events.length;i++){var r=a.events[i];if(l.Pf(r.data,e))return a.events[i]}}return null},this.events.Rf=function(e){var t=[],n=l.Sf(),a=DayPilot.indexOf(l.events.list,e);l.zb(a);var i=l.rowlist,r=!1;return i.forEach(function(i){if(!r){l.Of(i.index);var o=l.Tf(e,i);o&&("function"==typeof l.onBeforeEventRender&&(o.cache=l.yb.events[a]),t.push(i),n||(r=!0))}}),t},this.Pf=function(e,t){return DayPilot.Util.isSameEvent(e,t)},this.events.update=function(e){if("object"==typeof e&&!(e instanceof DayPilot.Event)){var t=l.events.find(e.id);return l.events.remove(t),void l.events.add(e)}if(l.events.list.find(function(t){return l.Pf(t,e.data)})){l.ze.Uf&&(l.ze.skip=!0);var n=l.events.Nf(e.data);e.commit(),n=n.concat(l.events.Rf(e.data)),l.events.Vf(n)}},this.events.remove=function(e){if(e){if("string"==typeof e||"number"==typeof e){var t=l.events.find(e);return void l.events.remove(t)}var n=l.Wf(e.data);n&&l.events.list.splice(n.index,1),l.ze.Uf&&(l.ze.skip=!0);var a=l.events.Nf(e.data);l.events.Vf(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=l,l.events.list||(l.events.list=[]);var i=l.Wf(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||l.events.list.push(e.data)}if(l.Ma){l.ze.Uf&&(l.ze.skip=!0);var r=l.events.Rf(e.data);l.events.Vf(r)}},this.events.Xf=function(e){var t=e instanceof DayPilot.Event?e.data:e,n=new DayPilot.Date(t.start),a=new DayPilot.Date(t.end);return!!l.events.list.find(function(e){if(l.Pf(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.Yf={"rows":[]},this.events.Zf=null,this.events.We=function(){clearTimeout(l.events.Zf),l.events.Zf=null,l.events.Yf.rows=[]},this.events.$f=0,this.events.Vf=function(e){var t=l.events.Yf.rows;e.forEach(function(e){t.push(e)}),l.events.Yf.rows=DayPilot.ua(t);var n=l.events.uf;l.events.Zf||(l.events.Zf=setTimeout(n,l.events.$f))},this.events.uf=function(){clearTimeout(l.events.Zf),l.events.Zf=null;var e=l.events.Yf.rows;l.events.Yf.rows=[],l._f(e),l.ag(),l.Ma&&(l.lf&&l.Xe(),l.ma(),l.kf(e))},this.ze={},this.ze.enabled=!1,this.ze.skip=!1,this.ze.skipUpdate=function(){return l.ze.skip},this.ze.skipped=function(){l.ze.skip=!1},this.ze.bg=!1,this.ze.Uf=!1,this.cg={},this.cg.reactDOM=null,this.cg.react=null,this.dg=function(e){var t=l.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*-l.Me()*1e3);return n}var a=this.Le(e);if(a.current)return a.current.start;throw new DayPilot.Exception("getBoxStart(): time not found")},this.If=function(e){var t=this.Gf(l.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=d.eg(a),r=0,o=l.coords.x;i&&(r=e.start().getTime()-this.dg(e.start()).getTime());var s=0;if(n.fg)if(i){var c=e.start(),u=this.dg(c);s=n.fg.getTime()-u.getTime();var h=60*l.Me()*1e3;s=Math.floor(s/h)*h}else s=n.fg.getTime()-e.start().getTime();var f=this.getDate(o,!0).addTime(-s);n.gg&&(f=e.start());var v=l.snapToGrid;v&&(f=this.dg(f)),f=f.addTime(r);var p=f.addTime(a),m=f,g=p,y=this.getPixels(m),b=this.getPixels(g.addTime(-1)),w=v?y.boxLeft:y.left,x=v&&i?b.boxRight-w:b.left-w,_={};return _.top=t.top,_.left=w,_.row=t.element,_.rowIndex=t.i,_.width=x,_.start=f,_.end=p,_.relativeY=l.coords.y-t.top,_},this.Me=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.hg=function(e){return e.end.ticks-e.start.ticks},this.ig=function(){var e=n.jg.width,t=n.jg.left,a=n.kg,i=n.gg.dpBorder,r=null,o=null,s=l.snapToGrid,d=!s;"left"===i?(r=l.getDate(t,d),o=a.rawend()):"right"===i&&(r=a.start(),o=l.getDate(t+e,d,!0)),n.jg.start=r,n.jg.end=o},this.lg=function(){var e=l.coords,t=n.gg.dpBorder,a=n.gg.event,i=a.part.left;"right"===t&&(i+=a.part.width);var r,o,s=n.gg.event.calendar.cellWidth,d=a.part.width,c=a.part.left,u=0,h=e.x-i,f=l.snapToGrid;if("right"===t){if(r=c,f){var v=l.Ie(d+c+h).cell,p=l.Ie(c).cell,m=p.left+p.width-c;o=v.left+v.width-c,o<m&&(o=m)}else o=d+h;var g=l.Ae();c+o>g&&(o=g-c),n.jg.left=c,n.jg.width=o,n.jg.style.left=c+"px",n.jg.style.width=o+"px"}else{if("left"!==t)throw new DayPilot.Exception("Invalid dpBorder.");f?(h>=d&&(h=d),r=Math.floor((c+h+0)/s)*s,r<u&&(r=u)):r=c+h,o=d-(r-c);var y=c+d,b=s;f?"Never"===l.useEventBoxes&&(b=d<s?d:1):b=1,o<b&&(o=b,r=y-o),n.jg.left=r,n.jg.width=o,n.jg.style.left=r+"px",n.jg.style.width=o+"px"}l.ig()},this.mg=function(){if(l.coords&&n.ng){var e=n.og,t=this.If(n.ng);e.row=t.row,e.style.height=DayPilot.Util.atLeast(t.row.height,0)+"px",e.style.top=t.top+"px",e.style.left=t.left+"px",e.style.width=t.width+"px",e.start=t.start,e.end=t.end}},this.pg=function(){return this.rowHeaderWidth},this.qg=function(){return this.rg(l.progressiveRowRenderingPreload)},this.rg=function(e){e=e||0;var t=0,n=l.rowlist.length;if(l.progressiveRowRendering){var a=l.le();t=a.yStart,n=a.yEnd+1,t=DayPilot.Util.atLeast(0,t-e),n=Math.min(l.rowlist.length,n+e)}return{"start":t,"end":n}},this.Ye=function(){function e(){var e=l.divHeader;e&&(e.rows=[]);var t=e;t&&(t.innerHTML="")}this.sg=!0;var t=this.pg();e();var n=this.divHeader;if(n.style.width=t+"px",n.style.height=l.ae+"px",l.divHeader=n,l.progressiveRowRendering)a();else for(var i=this.rowlist.length,r=0;r<i;r++)l.tg(r);l.ug(),this.divResScroll.appendChild(n)},this.vg=function(){if(l.progressiveRowRendering)for(var e=this.qg(),t=0;t<l.rowlist.length;t++)e.start<=t&&t<e.end?l.tg(t):l.wg(t)},this.ug=function(){if(!l.R.xg()){var e=l.divHeader,t=s();t.style.position="absolute",e.appendChild(t),l.nav.resScrollSpace=t;var n=s();n.style.position="relative",n.style.height="100%",n.className=this.L("_rowheader"),t.appendChild(n);var a=this.pg();t.style.width=a+"px",t.style.top=this.ae+"px"}},this.wg=function(e){var t=l.divHeader.rows[e];t&&(DayPilot.de(t),l.divHeader.rows[e]=null)},this.if=function(e){this.wg(e),this.tg(e)},this.tg=function(e){var t=l.rowlist,n=l.divHeader;if(n&&!n.rows[e]){var a=this.pg(),i=t[e];if(i){var r=this.yg(i),o=s();o.style.position="absolute",o.style.top=i.top+"px",n.rows[e]=o,o.row=i,o.index=e;var d=r.row,c=this.rowHeaderWidth;o.style.width=c+"px",o.style.border="0px none";var u=d.toolTip||d.toolTip;u&&(o.title=u),"undefined"!=typeof d.ariaLabel?o.setAttribute("aria-label",d.ariaLabel):o.setAttribute("aria-label",d.text||""),o.onclick=l.zg;var h=s();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=s();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=l.Ag(i);DayPilot.Areas.attach(h,y,{areas:g});var b=s();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=s(),x=s();x.innerHTML=l._a(d.text,d.html),x.className=l.L("_rowheader_inner_text"),o.textDiv=x,o.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"}o.appendChild(h),n.appendChild(o),h.style.width=a+"px"}}},this.zg=function(e){var t=this.row,n=l.Ag(t,this.index);l.Bf(n,e)},this.Bg=function(){if("Disabled"!==l.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(l.Me())),l.Df(e)}},this.Cg=function(e){if("Disabled"!==l.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(l.Me()));var n={};n.header=t,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof l.onTimeHeaderRightClick&&(l.onTimeHeaderRightClick(n),n.preventDefault.value)||"function"==typeof l.onTimeHeaderRightClicked&&l.onTimeHeaderRightClicked(n)}},this.Ag=function(e){return new DayPilot.Row(e,l)},this.Of=function(e){var t=l.rowlist,n=t[e];n.events||n.resetEvents()},this.Dg={},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");u.prepareRows(!0);var t,n=this.events.list,a="function"==typeof this.onBeforeEventRender;l.Dg={};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(l.Dg[o])throw new DayPilot.Exception("Duplicate event IDs are not allowed: "+o);l.Dg[o]=!0,a&&this.zb(i),t=l.Eg(r.resource);for(var s=0;t&&s<t.length;s++){var d=t[s],c=this.Tf(r,d);c&&a&&(c.cache=this.yb.events[i])}}}l.rowlist.forEach(function(e){l.Fg(e)}),l.ag()},u.rowcache={},u.prepareRows=function(e){u.rowcache={};for(var t=l.rowlist,n=0;n<t.length;n++){var a=t[n];if(e&&a.resetEvents(),l.Of(a.index),a.id){var i=typeof a.id+"_"+a.id;u.rowcache[i]||(u.rowcache[i]=[]),u.rowcache[i].push(a)}}},this.Eg=function(e){var t=typeof e+"_"+e;return u.rowcache[t]||[]},this.Sf=function(){for(var e={},t=0;t<l.rowlist.length;t++){var n=l.rowlist[t],a=n.id;if(e[a])return!0;e[a]=!0}return!1},this.zb=function(e){var t=this.yb.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.Fg=function(e){e.lines=[],e.sections=null,e.events.sort(this.Ab);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=l.jf(e),e.forEach(function(e){l.Fg(e)}),e.forEach(function(e){l.Gg(e)})},this.Tf=function(e,t){var n=new DayPilot.Date(e.start),a=new DayPilot.Date(e.end);a=l.qf(a);var i=n.ticks,r=a.ticks,o=l.startDate.ticks,s=l.startDate.addDays(l.days).ticks;if(r<i)return null;var c=null;if("function"==typeof l.onBeforeEventRender){var u=DayPilot.indexOf(l.events.list,e);c=l.yb.events[u]}if(t.id!==e.resource||(r<=o||i>=s)&&(i!==r||i!==o))return null;var h=new DayPilot.Event(e,l);h.part.dayIndex=l.rowlist.indexOf(t),h.part.start=o<i?n:l.startDate,h.part.end=s>r?a:l.startDate.addDays(l.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(d.eg(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=l.eventMinWidth;return h.part.width=Math.max(h.part.width,b),h.part.right=h.part.left+h.part.width,h.cache=c,console.log("loaded event part",h.part.left,h.part.right),t.events.push(h),h},this.Ab=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<l.rowlist.length;t++){var n=l.Ag(l.rowlist[t]);e.push(n)}return e},this.rows.each=function(e){l.rows.all().forEach(e)},this.rows.forEach=function(e){l.rows.all().forEach(e)},this.rows.find=function(e,t){if("string"==typeof e||"number"==typeof e||!e&&t){var n=l.Eg(e);e||(n=l.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,l):null}if("function"!=typeof e)throw new DayPilot.Exception("Invalid rows.find() argument: id or function expected");var i=t||0,r=l.rowlist.find(function(t,n){return!(n<i)&&e(l.Ag(t))});if(r)return l.Ag(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;l.resources=o.data,l.Ma&&l.update()}};l.rowsLoadMethod&&"POST"===l.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=l.rows.find(e);if(!t)throw new DayPilot.Exception("The row to be removed was not found");return void l.rows.remove(t)}var n=e.$.row.resource,a=DayPilot.indexOf(l.resources,n);l.resources.splice(a,1),l.update()},this.rows.add=function(e){l.resources.push(e),l.rb()},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=l.rows.find(t.id),!e)return;e.data=t}var n=e.index,a=l.rowlist,i=a[n],r=e.data,o=l.Hg(r),s=l.Ig(o);s.level=i.level,s.index=n,s.top=i.top,s.height=i.height,a[n]=s,s.resetEvents(),l.Of(s.index),l.Jg(s),l.Fg(s),l.if(s.index),l.af(),l.df()},this.Jg=function(e){for(var t=l.events.list,n=t.length,a="function"==typeof l.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.zb(i);var o=this.Tf(r,e);o&&a&&(o.cache=this.yb.events[i])}}}},this.Ve=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||[],l.rowlist=[],this.Kg(e)},this.sa=function(){return new DayPilot.Date(this.startDate)},this.Mf=function(){return new DayPilot.Date(l.startDate).addDays(l.days)},this.visibleStart=function(){return this.sa()},this.visibleEnd=function(){return this.Mf()},this.Ig=function(e){var t={};return t.backColor=e.backColor,t.fontColor=e.fontColor,t.cssClass=e.cssClass,t.name=e.name,t.html=l._a(e.name,e.html),t.id=e.id,t.toolTip=e.toolTip,t.areas=e.areas,t.tags=e.tags,t.height=l.eventHeight,t.level=0,t.resource=e.ye,t.lines=[],t.isRow=!0,t.getHeight=function(){return Math.max(l.eventHeight,this.lines.length*l.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):l.startDate.addDays(l.days);for(var a=[],i=0;i<e.events.length;i++){var r=e.events[i],o=l.qf(r.end());DayPilot.Util.overlaps(r.start(),o,t,n)&&a.push(r)}return a}},t.Lg=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.Lg();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.Kg=function(e){if(e)for(var t=l.rowlist,n=0;n<e.length;n++)if(e[n]){var a={};a.index=n;var i=this.Hg(e[n],a),r=l.Ig(i,parent);r.index=n,t.push(r)}},this.yg=function(e){var t={};return t.row=this.Ag(e),DayPilot.Util.copyProps(e,t.row,["html","backColor","fontColor","cssClass","toolTip","areas"]),"function"==typeof this.onBeforeRowHeaderRender&&this.onBeforeRowHeaderRender(t),t},this.Hg=function(e,t){var n={get $data(){return this.ye}};for(var a in t)n[a]=t[a];for(var i in e)n[i]=e[i];return n.html=l._a(e.name,e.html),n.ye=e,n},this.Mg=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=c.Ng,this.nav.top.ontouchmove=c.Og,this.nav.top.ontouchend=c.Pg;var e=this.rowHeaderWidth,t=s();t.style.position="absolute",t.style.left="0px",t.style.width=e+"px";var n=s();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.fb()),t.appendChild(n),t.appendChild(this.Qg());var a=s();a.style.position="absolute",a.style.left=e+"px",a.style.width="1px",a.style.height=this.Ce()+this.Ya()+"px",a.className=this.L("_splitter"),this.nav.divider=a;var i=s();i.style.marginLeft=e+1+"px",i.style.position="relative",this.nav.right=i;var r=s();r.style.position="absolute",r.style.top=this.Ce()+"px",r.style.width="100%",r.style.height="1px",r.style.boxSizing="border-box",r.style.borderBottom="1px solid transparent",r.setAttribute("data-dh2","true"),r.className=this.L("_divider_horizontal"),this.nav.dh2=r,i.appendChild(l.Rg()),i.appendChild(l.Sg()),i.appendChild(r);var o=s();o.style.clear="left";var d=s();d.style.height="1px",d.style.position="absolute",d.style.left="0px",d.style.right="0px",d.style.display="none",d.className=this.L("_divider_horizontal"),this.nav.dividerTop=d;var u=s();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(o),this.nav.top.appendChild(d),this.nav.top.appendChild(u)},this.ia=function(){var e=this.Ce();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.Tg=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.Ug=function(){var e=this.rowHeaderWidth,t=this.divHeader;t.style.width=e+"px";for(var n=l.qg(),a=n.start;a<n.end;a++){var i=t.rows[a];if(i){var r=l.rowHeaderWidth;i.style.width=r+"px";i.firstChild.style.width=r+"px"}}l.nav.resScrollSpace&&(l.nav.resScrollSpace.style.width=e+"px")},this._e=function(){this.Tg(),this.Ug()},this.fb=function(){var e=this.rowHeaderWidth,t=s();l.nav.corner=t,t.style.width=e+"px",t.style.height=this.Ce()+"px",t.style.overflow="hidden",t.style.position="relative",t.oncontextmenu=function(){return!1},t.className=this.L("_corner");var n=s();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="&nbsp;",this.divCorner=n,t.appendChild(n),t},this.Ce=function(){return l.timeHeaders?l.timeHeaders.length*l.headerHeight:0},this.Vg=null,this.Qg=function(){var e=s();e.style.width=this.rowHeaderWidth+"px",e.style.height=this.Ya()+"px",e.style.overflow="hidden",e.style.position="relative",e.className=l.L("_rowheader_scroll");var a=l.R.xg();a&&(e.style.overflowY="auto"),e.ontouchstart=function(){n.Wg=!0},e.oncontextmenu=function(){return!1},e.onscroll=function(){if(l.Vg&&clearTimeout(l.Vg),a){var i=function(){var t=l.Xg()-l.nav.scroll.offsetHeight;e.scrollTop=Math.min(e.scrollTop,t),l.nav.scroll.scrollTop=e.scrollTop};t?n.Wg&&(l.Vg=setTimeout(i,10)):l.Vg=setTimeout(i,10)}else l.Vg=setTimeout(function(){l.nav.scroll.scrollTop=e.scrollTop},500)},e.setAttribute("role","region"),e.setAttribute("aria-label","scheduler rows");var i=s();return this.divHeader=i,e.appendChild(i),this.divResScroll=e,this.De=e,e},this.Yg=null,this.Zg=null,this.$g=function(){var e=function(){l._g(),l.ef()},t=function(){var t=l.nav.top;if(t){if(!l.Yg)return l.Yg={},void(l.Yg.width=t.offsetWidth);l.Yg.width!==t.offsetWidth&&(l.Yg.width=t.offsetWidth,e())}};if(!l.Zg){var n=new ResizeObserver(DayPilot.debounce(t,100));n.observe(l.nav.top),l.Zg=n}},this._g=function(){l.Q||(l.ma(),l.ah(),l.yb.drawArea=null)},this.ah=function(){var e=l.yf;l.clearSelection(),l.yf=e,l.zf(e,{"justDraw":!0})},this.Rg=function(){var e=s();e.style.overflow="hidden",e.style.display="block",e.style.position="absolute",e.style.top="0px",e.style.width="100%",e.style.height=this.Ce()+"px",e.style.overflow="hidden",e.className=l.L("_timeheader_scroll"),this.divTimeScroll=e;var t=s();return t.style.width=this.Ae()+5e3+"px",this.divNorth=t,e.appendChild(t),e},this.Ya=function(){var e=0,t=l.heightSpec;return"Fixed"===t?this.height?this.height:0:(e=l.Xg(),"Max"===t&&e>l.height?l.height:e)},this.Xg=function(){var e;return this.ae!==-1?(e=this.ae,this.ae>0&&"auto"===l.nav.scroll.style.overflowX&&(e+=DayPilot.sh(l.nav.scroll)+1)):e=this.rowlist.length*l.eventHeight,e},this.Sg=function(){var e=s();e.style.overflow="auto",e.style.overflowX="auto",e.style.overflowY="auto",e.style.height=this.Ya()+"px",e.style.top=this.Ce()+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.he=s();var t=this.he;t.style.userSelect="none",t.style.webkitUserSelect="none",t.calendar=this,t.style.position="absolute";var n=this.Ae();return n>0&&(t.style.width=n+"px"),t.onmousedown=this.bh,t.onmousemove=this.ch,t.onmouseup=this.dh,t.oncontextmenu=this.eh,t.className=this.L("_matrix"),this.divStretch=s(),this.divStretch.style.position="absolute",this.divStretch.style.height="1px",t.appendChild(this.divStretch),this.divCells=s(),this.divCells.style.position="absolute",this.divCells.oncontextmenu=this.eh,
19
+ t.appendChild(this.divCells),this.divLines=s(),this.divLines.style.position="absolute",this.divLines.oncontextmenu=this.eh,t.appendChild(this.divLines),this.divSeparators=s(),this.divSeparators.style.position="absolute",this.divSeparators.oncontextmenu=this.eh,t.appendChild(this.divSeparators),this.divRange=s(),this.divRange.style.position="absolute",this.divRange.oncontextmenu=this.eh,t.appendChild(this.divRange),this.divEvents=s(),this.divEvents.style.position="absolute",t.appendChild(this.divEvents),this.divShadow=s(),this.divShadow.style.position="absolute",t.appendChild(this.divShadow),e.appendChild(t),e},this.qb=function(){n.fh||(n.fh=!0,DayPilot.re(document,"mouseup",n._d),DayPilot.re(document,"touchmove",n.gh),DayPilot.re(document,"touchend",n.hh))},this.ih=function(){this.nav.scroll.root=this,this.nav.scroll.onscroll=this.ef,l.jh=this.nav.scroll.scrollLeft,l.kh=this.nav.scroll.scrollTop,this.divNorth&&(l.lh=this.divNorth.clientWidth)},this.mh={},this.mh.step=300,this.mh.delay=10,this.mh.mode="display",this.mh.layers=!1,this.Gg=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+l.rowMarginTop,r.part.right=r.part.left+r.part.width}t+=l.eventHeight}},this.Ue=null,this.na=function(e){if(!l.Q){var t=this.mh.step;"display"===this.mh.mode?this.divEvents.style.display="none":"visibility"===this.mh.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.le(),i=a.pixels.top,r=a.pixels.bottom;l.rowlist.filter(function(e){var t=e.top-l.dynamicEventRenderingMargin,a=t+e.height+2*l.dynamicEventRenderingMargin;return!n||!(r<=t||i>=a)}).forEach(function(n){l.Gg(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],s=l.Va(o);if(e&&s&&(t--,t<=0))return l.divEvents.style.visibility="",l.divEvents.style.display="",void(l.Ue=setTimeout(function(){l.na(e)},l.mh.delay))}}),this.divEvents.style.display="",this.pe()}},this.nf=function(e){var t=l.rowlist[e];this.Gg(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.Va(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.Pa(n)}this.elements.events=[]},this.mf=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.Pa(i),n.push(a))}for(var a=n.length-1;a>=0;a--)this.elements.events.splice(n[a],1)}},this.Pa=function(e){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.nh=function(){if("Progressive"===this.dynamicEventRendering){if(l.dynamicEventRenderingCacheSweeping){var e=l.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.oh(i.event)?e>0?(e--,t.unshift(i)):this.Pa(i):t.unshift(i)}this.elements.events=t,this.divEvents.style.display=""}}},this.ph=function(e){for(var t=this.le(),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.gb(i))}},this.gb=function(e){if(e&&e.coords){var t=e.coords.x,n=e.coords.y;DayPilot.rfa(l.elements.cells,e),DayPilot.de(e),l.yb.cells[t+"_"+n]=null}},this.qh=function(){var e="Progressive"===this.dynamicEventRendering;if(!this.nav.scroll)return!1;for(var t=this.nav.scroll.scrollTop,n=t+this.nav.scroll.clientHeight,a=0;a<this.rowlist.length;a++){var i=this.rowlist[a],r=i.top,o=i.top+i.height;if(!e||!(n<=r||t>=o))for(var s=0;s<i.lines.length;s++)for(var l=i.lines[s],d=0;d<l.length;d++){var c=l[d];if(this.rh(c))return!0}}return!1},this.rh=function(e){if(e.rendered)return!1;var t="Progressive"===this.dynamicEventRendering,n=this.nav.scroll.scrollLeft,a=n+this.nav.scroll.clientWidth,i=e.part.left,r=e.part.left+e.part.width;return!t||!(a<=i||n>=r)},this.oh=function(e){if(!e.rendered)return!0;var t=this.le(),n=t.pixels.top,a=t.pixels.bottom,i=t.pixels.left-this.dynamicEventRenderingMargin,r=t.pixels.right+this.dynamicEventRenderingMargin,o=e.part.left,s=e.part.right,d=e.part.top,c=e.part.top+l.eventHeight;return r<=o||i>=s||(a<=d||n>=c)},this.Va=function(e,t){t=t||{};var n=t.forced;if(e.rendered)return!1;var a="Progressive"===this.dynamicEventRendering,i=e.part.dayIndex,r=l.divEvents,o=l.rowlist,d=o[i],u=d.top,h=this.le(),f=h.pixels.left-this.dynamicEventRenderingMargin,v=h.pixels.right+this.dynamicEventRenderingMargin,p=h.pixels.top,m=h.pixels.bottom,g=e.part.left,y=e.part.left+e.part.width,b=e.part.top+u,w=b+l.eventHeight,x=v<=g||f>=y,_=m<=b||p>=w;if(!n&&a&&(x||_))return!1;var C=e.part.width,k=l.eventHeight,D=e.cache||e.data,S=D.borderRadius||l.eventBorderRadius;"number"==typeof S&&(S+="px");var M=D.padding||l.eventPadding;"number"==typeof M&&(M+="px"),C=DayPilot.Util.atLeast(0,C),k=DayPilot.Util.atLeast(0,k);var T=s();T.style.position="absolute",T.style.left=e.part.left+"px",T.style.top=u+e.part.top+"px",T.style.width=C+"px",T.style.height=k+"px",l.eventTextWrappingEnabled||(T.style.whiteSpace="nowrap"),T.style.overflow="hidden",T.className=this.L("_event"),D.cssClass&&DayPilot.Util.addClass(T,D.cssClass);"number"==typeof e.part.line&&DayPilot.Util.addClass(T,this.L("_event_line"+e.part.line)),S&&(T.style.borderRadius=S),this.showToolTip&&(T.title=e.client.toolTip()||""),T.onmousemove=this.uh,T.onmousedown=this.vh,T.onmouseup=this.wh,T.ontouchstart=c.xh,T.ontouchmove=c.yh,T.ontouchend=c.zh,e.client.clickEnabled()&&(T.onclick=this.Ne),"undefined"!=typeof D.ariaLabel?T.setAttribute("aria-label",D.ariaLabel):T.setAttribute("aria-label",D.text),T.setAttribute("tabindex","-1");var A=s();A.className=l.L("_event_inner"),S&&(A.style.borderRadius=S),M&&(A.style.padding=M),D.backColor&&(A.style.background=D.backColor),D.fontColor&&(A.style.color=D.fontColor),"darker"===D.borderColor&&D.backColor?A.style.borderColor=DayPilot.ColorUtil.darker(D.backColor,2):A.style.borderColor=D.borderColor,D.backImage&&(A.style.backgroundImage="url("+D.backImage+")",D.backRepeat&&(A.style.backgroundRepeat=D.backRepeat)),T.appendChild(A);var E=e.start().getTime()===e.part.start.getTime(),H=e.rawend().getTime()===e.part.end.getTime();if(E||DayPilot.Util.addClass(T,this.L("_event_continueleft")),H||DayPilot.Util.addClass(T,this.L("_event_continueright")),e.client.barVisible()&&C>0){var N=100*e.part.barLeft/C,I=Math.ceil(100*e.part.barWidth/C),R=s();R.className=this.L("_event_bar"),R.style.position="absolute",D.barBackColor&&(R.style.backgroundColor=D.barBackColor);var P=s();P.className=this.L("_event_bar_inner"),P.style.left=N+"%",0<I&&I<=1?P.style.width="1px":P.style.width=I+"%",D.barColor&&(P.style.backgroundColor=D.barColor),D.barImageUrl&&(P.style.backgroundImage="url("+D.barImageUrl+")"),R.appendChild(P),T.appendChild(R)}T.row=i,T.event=e,A.innerHTML=e.client.innerHTML();var L=[];return function(){if("Disabled"!==l.eventDeleteHandling&&!D.deleteDisabled){var e=l.durationBarVisible?l.durationBarHeight:0;L.push({v:"Hover",w:17,h:17,top:e+2,right:2,css:l.L("_event_delete"),onClick:function(e){l.ya(e.source)}})}}(),D.areas&&(L=L.concat(D.areas)),DayPilot.Areas.attach(T,e,{areas:L}),this.elements.events.push(T),r.appendChild(T),e.rendered=!0,!0},this._a=function(e,t){return l.R.da()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.of=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=l.rowlist[a],r=i.top,o=r+n.part.top,s=i.height,d=l.eventHeight;n.part.top+d>s&&(d=Math.max(0,s-n.part.top)),t.style.top=o+"px",t.style.height=d+"px"}},this.Ah=function(e){if(!e)return null;for(var t=0;t<l.elements.events.length;t++){var n=l.elements.events[t];if(n.event===e||n.event.data===e.data)return n}return null},this.Lf=function(e){var t=l.events.Qf(e.data);if(!t)return null;var n=l.rowlist[t.part.dayIndex];return l.Gg(n),l.Va(t,{"forced":!0}),l.Ah(t)},this.uh=function(e){for(var t=e.currentTarget;t&&!t.event;)t=t.parentNode;l.Bh(t,e),l.Re(e)},this.Pe={},this.vh=function(e){l.Re(e);var t=DayPilot.Util.mouseButton(e);e.preventDefault(),e.stopPropagation(),t.left&&("w-resize"===this.style.cursor||"e-resize"===this.style.cursor?(n.Oe=!0,n.gg=this,n.kg=this.event,n.Ch=DayPilot.mc(e),o().style.cursor=this.style.cursor):("move"===this.style.cursor||this.event.client.moveEnabled())&&l.Dh(this,e))},this.wh=function(e){DayPilot.Util.mouseButton(e).right&&l.xa.call(this,e)},this.Dh=function(e,t){var n=l.Pe;l.Re(t),n.Eh=!0,n.Pe=e,n.ng=e.event,n.Ch=DayPilot.mc(t),n.Fh=DayPilot.mo3(e,t).x,n.fg=l.getDate(l.coords.x,!0)},"undefined"==typeof DayPilot.Global.touch&&(DayPilot.Global.touch={}),DayPilot.Global.touch.active=!1,DayPilot.Global.touch.start=!1,c.Hf=[];c.xh=function(t){if(!DayPilot.Global.touch.active&&!DayPilot.Global.touch.start){t.stopPropagation(),c.Gh(),DayPilot.Global.touch.start=!0,DayPilot.Global.touch.active=!1;var n=t.currentTarget;l.coords=c.Hh(t);var a=l.tapAndHoldTimeout;c.Hf.push(setTimeout(function(){DayPilot.Global.touch.active=!0,DayPilot.Global.touch.start=!1,t.preventDefault();var a=n.event;switch(l.eventTapAndHoldHandling){case"Move":if(a.client.moveEnabled()){var i=e(t);c.Dh(n,i)}}},a))}};c.yh=function(){c.Gh(),DayPilot.Global.touch.start=!1},c.zh=function(e){if(!DayPilot.Util.isMouseEvent(e)){if(c.Gh(),DayPilot.Global.touch.start){DayPilot.Global.touch.start=!1,e.preventDefault(),e.stopPropagation();var t=e.currentTarget;setTimeout(function(){l.Qe(t,e)})}setTimeout(function(){DayPilot.Global.touch.start=!1,DayPilot.Global.touch.active=!1},500)}},c.Ng=function(e){if(!(DayPilot.Global.touch.active||DayPilot.Global.touch.start||e.touches.length>1||"Disabled"===l.timeRangeSelectedHandling)){c.Gh(),DayPilot.Global.touch.start=!0,DayPilot.Global.touch.active=!1;var t=l.tapAndHoldTimeout;c.Hf.push(setTimeout(function(){DayPilot.Global.touch.active=!0,DayPilot.Global.touch.start=!1,e.preventDefault(),l.coords=c.Hh(e),c.Ih=l.Jh()},t));l.coords=c.Hh(e)}},c.Og=function(e){if(c.Gh(),DayPilot.Global.touch.start=!1,n.gg)return e.preventDefault(),void c.Kh();if(DayPilot.Global.touch.active){if(e.preventDefault(),l.coords=c.Hh(e),n.Pe)return void c.Lh();if(c.Ih){var t=c.Ih;t.end={x:Math.floor(l.coords.x/l.cellWidth),"time":l.getDate(l.coords.x,!0)},l.zf(t)}}},c.debug=function(){},c.Pg=function(e){c.Gh();if(DayPilot.Global.touch.active){if(n.Pe){e.preventDefault();var t=n.ng;if(l!==n.og.calendar)return;var a=n.og.start,i=n.og.end,r=n.og.row.id;DayPilot.Util.removeClass(n.Pe,l.L("_event_moving_source")),DayPilot.de(n.og),n.og.calendar=null,o().style.cursor="",n.Pe=null,n.ng=null,n.og=null,l.M(t,a,i,r)}if(c.Ih){var s=c.Ih;c.Ih=null;var d=l.elements.range2;d&&d.overlapping?l.clearSelection():l.vf(s)}}else if(DayPilot.Global.touch.start){if(l.coords.x<l.getScrollX())return;var s=l.Jh();l.zf(s);var d=l.elements.range2;d&&d.overlapping?l.clearSelection():l.vf(s)}setTimeout(function(){DayPilot.Global.touch.start=!1,DayPilot.Global.touch.active=!1},500)},c.Gh=function(){for(var e=0;e<c.Hf.length;e++)clearTimeout(c.Hf[e]);c.Hf=[]},c.Hh=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=l.he,a=e.touches?e.touches[0]:e;return t(a.pageX,a.pageY,n)},c.Dh=function(e,t){n.Pe=e,n.ng=e.event,n.Ch=t;var a=DayPilot.abs(e);n.Fh=t.x-a.x,n.fg=l.getDate(l.coords.x,!0),n.og=l.ca(e),l.mg()},c.Kh=function(){if(!n.jg){var e=n.gg;n.jg=l.ca(e)}l.lg()},c.Lh=function(){if(!n.og){var e=n.Pe;n.og=l.ca(e)}n.og.calendar.mg()},this.Bh=function(e,t){var a=this.eventResizeMargin,i=e;if("undefined"!=typeof n){var r=DayPilot.mo3(e,t);if(r&&(l.eventOffset=r,!n.gg&&!n.Pe)){var o=i.event.part.start.toString()===i.event.start().toString(),s=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()?s?(e.style.cursor="e-resize",e.dpBorder="right"):e.style.cursor="not-allowed":n.gg||n.Pe||(i.event.client.clickEnabled()?e.style.cursor="pointer":e.style.cursor="default")}}},this.Af=function(){var e=l.Me();return l.days*(1440/e)},this.wf=function(e){if(e=e||n.Ih||l.yf,!e)return null;var t=l.rowlist[e.start.y];if(!t)return null;var a,i,r=e,o=r.end.time>r.start.time,s=t.id,d=o?r.start.x:r.end.x,c=o?r.end.x:r.start.x,u=l.snapToGrid;u?(a=l.Je(d).start,i=l.Je(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,s,l);return h.allowed=!e.div||!e.div.overlapping,h},this.Ze=function(){this.yb.timeHeader={},l.elements.timeHeader.length>0&&(l.elements.timeHeader=[]);var e=s();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.Mh(a,t);var i=this.divNorth;1===i.childNodes.length?i.replaceChild(e,i.childNodes[0]):(i.innerHTML="",i.appendChild(e));var r=this.Ae();i.style.width=r+5e3+"px",r>0&&(this.divStretch.style.width=r+"px")},this.He=function(e,t){var n=null,a=this.R.Ge();t=t||this.cellGroupBy;var i=e.start;switch(t){case"Minute":n=i.toString("m");break;case"Hour":n="Clock12Hours"===l.R.Nh()?i.toString("h tt",a):i.toString("H",a);break;case"Day":n=i.toString(a.datePattern);break;case"Week":n=1===d.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.Oh(i,r);break;default:throw new DayPilot.Exception("Invalid groupBy value: "+t)}return n},this.Oh=function(e,t){var n=this.R.Ge();return t=t||this.cellDuration,t<1?e.toString("ss"):t<60?e.toString("mm"):t<1440?"Clock12Hours"===l.R.Nh()?e.toString("h tt",n):e.toString("H",n):t<10080?e.toString("d"):10080===t?1===d.ea()?e.weekNumberISO():e.weekNumber():e.toString("MMMM yyyy",n)},this.Fe=function(e,t,n){var a,i=l.startDate.addDays(l.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()!==d.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 s=this.Le(e);s.current&&(a=s.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.Mh=function(e,t){var n=this.nav.timeHeader,a=this.timeHeader[t][e],i=t<this.timeHeader.length-1,r=a.left,o=a.width,d=t*l.headerHeight,c=l.headerHeight,u=s();u.style.position="absolute",u.style.top=d+"px",u.style.left=r+"px",u.style.width=o+"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.Bg,u.oncontextmenu=this.Cg,DayPilot.re(u,DayPilot.touch.start,function(e){e.stopPropagation()}),u.style.overflow="hidden",l.timeHeaderTextWrappingEnabled||(u.style.whiteSpace="nowrap");var h=s();h.innerHTML=l._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,l.L("_timeheader_cell")),DayPilot.Util.addClass(h,l.L("_timeheader_cell_inner")),u.appendChild(h),DayPilot.Areas.attach(u,a,{areas:a.areas}),this.yb.timeHeader[e+"_"+t]=u,this.elements.timeHeader.push(u),n.appendChild(u)},this.ag=function(){l.rowlist.forEach(function(e){var t=e.getHeight()+l.rowMarginTop+l.rowMarginBottom;e.height!==t&&(l.lf=!0),e.height=t}),l.lf&&(l.yb.drawArea=null)},this.$e=function(){l.rowlist.forEach(function(e){var t=l.divHeader;if(t){var n=e.index;if(t.rows[n]){var a=t.rows[n];l.sg&&(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")}}}),l.sg&&l.nav.resScrollSpace&&(l.nav.resScrollSpace.style.top=l.ae+"px")},this.bh=function(e){if(DayPilot.Global.touch.start||DayPilot.Global.touch.active)return!1;if(l.Re(e),"Disabled"===l.timeRangeSelectedHandling)return!1;var t=DayPilot.Util.mouseButton(e);if(l.Ph())return!1;if(t.middle||t.right)return!1;if(l.Qh(l.coords))return!1;var a=t.left?"left":t.right?"right":t.middle?"middle":"unknown";return l.Rh=a,n.Ih=l.Jh(),n.Ih&&(n.Sh=l),!1},this.Jh=function(){var e={},t=l.Ie(l.coords.x).x,n=l.getDate(l.coords.x,!0);return e.start={y:l.Gf(l.coords.y).i,x:t,"time":n},e.end={x:t,"time":n},e.calendar=l,l.zf(e),e},this.dh=function(e){if(l.Pe={},l.yf){if(DayPilot.Util.mouseButton(e).left){var t=l.yf;if(l.Qh(l.coords)){var a=function(e){return function(){n.Th=null;var t=l.wf(e);if(t){var a={};a.start=t.start,a.end=t.end,a.resource=t.resource,a.preventDefault=function(){a.preventDefault.value=!0},"function"==typeof l.onTimeRangeClick&&l.onTimeRangeClick(a),a.preventDefault.value||"function"==typeof l.onTimeRangeClicked&&l.onTimeRangeClicked(a)}}};"Disabled"!==l.timeRangeClickHandling&&a(t)()}}}},this.Ph=function(){return!!(n.gg||n.Pe||n.Ih)||!!l.Pe.Eh},this.dragInProgress=function(){return l.Ph()},this.Re=function(e){var t=DayPilot.mo3(l.he,e);t=t||{},t.stamp=t.x+"_"+t.y,l.coords&&l.coords.stamp===t.stamp||(l.coords=t)},this.ch=function(e){if(!DayPilot.Global.touch.active){var t=DayPilot.mc(e);if(l.Re(e),l.Pe.Eh){DayPilot.distance(l.Pe.Ch,t)>2&&(DayPilot.Util.copyProps(l.Pe,n),o().style.cursor="move",l.Pe={})}n.gg&&n.kg.calendar===l?(n.gg.event||(n.gg.event=n.kg),l.Uh()):n.ng?l.Vh():n.Ih&&n.Ih.calendar===l&&(n.Ih.moved=!0,l.Wh())}},this.Wh=function(){var e=n.Ih,t=l.Ie(l.coords.x).x,a=l.getDate(l.coords.x,!0);e.end={x:t,"time":a},l.zf(e)},this.Uh=function(){n.jg||(n.jg=l.ca(n.gg)),l.lg()},this.Vh=function(){if(!n.og){DayPilot.Util.addClass(n.Pe,l.L("_event_moving_source"));var e=n.ng;n.og=l.ca(e)}l.mg()},this.eh=function(e){return e.cancelBubble=!0,!1},this.Qh=function(e){var t=l.yf;if(!t||!t.start||!t.end)return!1;var n=this.Jf(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,s=n.bottom;return e.x>=i&&e.x<=r&&e.y>=o&&e.y<=s},this.zf=function(e){function t(e){var t,n,o,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=l.Je(f),m=l.Je(v);t=p.left,n=m.left+m.width}else c?(o=e.start.time,d=e.end.time):(o=e.end.time,d=e.start.time),t=l.getPixels(o).left,n=l.getPixels(d).left;var g=n-t,y=l.elements.range2;if(!y){y=s(),y.style.position="absolute";var b=s();b.className=l.L("_shadow_inner"),a&&(y.style.borderRadius=a,b.style.borderRadius=a),y.appendChild(b),l.divShadow.appendChild(y)}return y.className=l.L("_shadow"),y.firstChild.innerHTML="",y.style.left=t+"px",y.style.top=r[u].top+"px",y.style.width=g+"px",y.style.height=r[u].height-1+"px",y.calendar=l,l.elements.range2=y,y}if(e=e||n.Ih){var a=l.eventBorderRadius;"number"==typeof a&&(a+="px");var i=l.snapToGrid,r=l.rowlist;t(e)}},this.Xh=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(!l.coords)return null;var e={};e.x=l.coords.x,e.y=l.coords.y;var t=l.Gf(e.y,e.grid).element;return e.row=l.Ag(t),e.time=l.getDate(e.x,!0),e},this.Hf={},this.Hf.na=null,this.Hf.drawCells=null,this.Hf.drawRows=null,this.Hf.click=null,this.Hf.resClick=[],this.Hf.updateFloats=null,this.ef=function(){if(!l.Q){l.cf();var e=l.nav.scroll;if(l.jh=e.scrollLeft,l.kh=e.scrollTop,l.lh=e.clientWidth,l.divTimeScroll&&(l.divTimeScroll.scrollLeft=l.jh),t&&n.Wg?a():l.divResScroll.scrollTop=l.kh,l.progressiveRowRendering&&(l.Hf.drawRows&&(clearTimeout(l.Hf.drawRows),l.Hf.drawRows=null),l.scrollDelayRows>0?l.Hf.drawRows=setTimeout(function(){l.vg()},l.scrollDelayRows):l.vg()),l.Hf.drawCells&&(clearTimeout(l.Hf.drawCells),l.Hf.drawCells=null),l.scrollDelayCells>0)l.Hf.drawCells=setTimeout(l.Yh(),l.scrollDelayCells);else{l.Yh()()}l.Hf.na&&(clearTimeout(l.Hf.na),l.Hf.na=null),l.scrollDelayEvents>0?l.Hf.na=setTimeout(l.Zh(),l.scrollDelayEvents):l.na(),l.Hf.updateFloats&&(clearTimeout(l.Hf.updateFloats),l.Hf.updateFloats=null),l.scrollDelayFloats>0?l.Hf.updateFloats=setTimeout(function(){l.oe()},l.scrollDelayFloats):l.oe(),l.onScrollCalled=!0}},this.Yh=function(){return function(){l&&l.df()}},this.Zh=function(){return function(){l&&(l.qh()?setTimeout(function(){l.nh(),setTimeout(function(){l.na(!0)},50)},50):l.pe())}},this.cf=function(){l.yb.drawArea=null},this.show=function(){l.visible=!0,l.be=!0,l.nav.top.style.display="",l.u(),l._g(),l.ef()},this.hide=function(){l.visible=!1,l.be=!1,l.nav.top.style.display="none"},this.Wf=function(e){if(!l.events.list)return null;for(var t=0;t<this.events.list.length;t++){var n=this.events.list[t];if(l.Pf(n,e)){var a={};return a.ex=n,a.index=t,a}}return null},this.$h=function(){var e=this.le(),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.hd(o,l)}this._h(o)}for(var d=this.qg(),l=d.start;l<d.end;l++)this.ai(l)},this.df=function(){if(!l.Q){var e=l.rowlist;if(e&&e.length>0){if(this.cellSweeping){var t=this.cellSweepingCacheSize;this.ph(t)}this.$h()}this.lf=!1}},this.le=function(){if(l.yb.drawArea)return l.yb.drawArea;if(!this.nav.scroll)return null;var e=l.kh,t={},n=null!=this.dynamicEventRenderingMarginX?this.dynamicEventRenderingMarginX:this.dynamicEventRenderingMargin,a=null!=this.dynamicEventRenderingMarginY?this.dynamicEventRenderingMarginY:this.dynamicEventRenderingMargin,i=l.jh-n,r=i+l.lh+2*n,o=0,s=0;o=l.Ie(i).x,s=l.Ie(r,!0).x;var d=this.Af();s=Math.min(s,d-1),o=DayPilot.Util.atLeast(o,0);var c=e-a,u=e+this.nav.scroll.offsetHeight+2*a,h=this.Gf(c).i,f=this.Gf(u).i;f<this.rowlist.length&&f++,t.xStart=o,t.xEnd=s,t.yStart=h,t.yEnd=f;var v=l.nav.scroll;return 0===v.clientWidth&&(v=l.divTimeScroll),t.pixels={},t.pixels.left=v.scrollLeft,t.pixels.right=v.scrollLeft+v.clientWidth,t.pixels.top=v.scrollTop,t.pixels.bottom=v.scrollTop+v.clientHeight,t.pixels.width=v.scrollWidth,t.sw=DayPilot.sw(l.nav.scroll),l.yb.drawArea=t,t},this.Ae=function(){return l.Af()*l.cellWidth},this.ai=function(e){var t=l.rowlist,n=l.divLines,a="y_"+e;if(!this.yb.linesHorizontal[a]){var i=t[e],r=i.height,o=i.top+r-1,d=this.Ae(),c=s();c.style.left="0px",c.style.top=o+"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.yb.linesHorizontal[a]=c}},this._h=function(e){var t=l.Je(e);if(t){var n=l.divLines,a=l.ae,i="x_"+e;if(!this.yb.linesVertical[i]){var r=t.left+t.width-1,o=s();o.style.left=r+"px",o.style.top="0px",o.style.width="1px",o.style.height=a+"px",o.style.fontSize="1px",o.style.lineHeight="1px",o.style.overflow="hidden",o.style.position="absolute",o.className=this.L("_matrix_vertical_line"),n.appendChild(o),this.elements.linesVertical.push(o),this.yb.linesVertical[i]=o}}},this.Xe=function(){l.ae=l.bi(l.rowlist)},this.bi=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.af=function(){l.elements.cells=[],l.yb.cells=[],l.divCells.innerHTML="",l.ci()},this.ci=function(){l.divLines.innerHTML="",l.yb.linesVertical={},l.yb.linesHorizontal={},l.elements.linesVertical=[]},this.pf=function(e){var t=[];for(var n in l.yb.cells)t.push(l.yb.cells[n]);t.filter(function(t){return t&&t.coords&&t.coords.y===e}).forEach(function(e){l.gb(e)})},this.hd=function(e,t){if(this.Ma){var n=l.Je(e);if(n){var a=l.rowlist,i=l.divCells,r=e+"_"+t;if(!this.yb.cells[r]){var o=this.di(e,t),d=l.ei(e,t),c=s();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",o&&o.backColor&&(c.style.backgroundColor=o.backColor),c.className=this.L("_cell"),c.coords={},c.coords.x=e,c.coords.y=t,o){if(o.cssClass&&DayPilot.Util.addClass(c,o.cssClass),c.innerHTML=l._a(o.text,o.html),o.backImage&&(c.style.backgroundImage='url("'+o.backImage+'")'),o.backRepeat&&(c.style.backgroundRepeat=o.backRepeat),o.business&&l.cellsMarkBusiness&&DayPilot.Util.addClass(c,l.L("_cell_business")),o.disabled&&DayPilot.Util.addClass(c,l.L("_cell_disabled")),o.backColor&&(c.style.backgroundColor=o.backColor),o.fontColor&&(c.style.color=o.fontColor),o.horizontalAlignment||o.verticalAlignment){switch(c.style.display="flex",o.horizontalAlignment){case"right":c.style.justifyContent="flex-end";break;case"left":c.style.justifyContent="flex-start";break;case"center":c.style.justifyContent="center"}switch(o.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":o.areas||d.cell.areas})}i.appendChild(c),this.elements.cells.push(c),this.yb.cells[r]=c}}}},this.ei=function(e,t){var n=l.Je(e);if(!n)return null;var a=l.rowlist[t],i=a.id,r=n.start,o=n.end,s={};if(s.cell={x:e,y:t,start:r,end:o,resource:i,row:l.Ag(a),properties:l.di(e,t)},s.control=l,"function"==typeof this.onBeforeCellRender){var d=e+"_"+t;if(l.beforeCellRenderCaching&&l.bf[d])return s;l.bf[d]=!0,this.onBeforeCellRender(s)}return s},this.clearSelection=function(){this.fi()},this.gi=function(e,t,n){e=new DayPilot.Date(e),t=new DayPilot.Date(t);var a=l.je(n),i=l.Le(e);if(!i.current)throw new DayPilot.Exception("Time range selection 'start' out of timeline");var r=l.Le(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=l.gi(e,t,n);l.zf(i),a||setTimeout(function(){l.vf(i)},0)},this.tf=function(){var e=n.og&&n.og.source;e&&DayPilot.Util.removeClass(e,l.L("_event_moving_source")),DayPilot.de(n.og),n.og=null,DayPilot.Global.movingLink&&(DayPilot.Global.movingLink.clear(),DayPilot.Global.movingLink=null)},this.fi=function(){l.divShadow&&(l.divShadow.innerHTML=""),l.elements.range=[],l.elements.range2=null,l.yf=null,l.hi=null},d.Ld=function(){delete l.yb.headerHeight},d.da=function(){return"Disabled"!==l.xssProtection},d.Ge=function(){return DayPilot.Locale.find(l.locale)},d.Nh=function(){return"Auto"!==l.timeFormat?l.timeFormat:d.Ge().timeFormat},d.ea=function(){if("Auto"===l.weekStarts){var e=d.Ge();return e?e.weekStarts:0}return l.weekStarts||0},d.xg=function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("mobile")!==-1||e.indexOf("android")!=-1},d.eg=function(e){return"Always"===l.useEventBoxes||"Never"!==l.useEventBoxes&&e<60*l.Me()*1e3},this.di=function(e,t){var n=e+"_"+t,a=l.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=l.Je(e),s=o.start,d=o.end,c={};c.start=s,c.end=d,c.resource=r;var u={};u.business=l.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&&!(l.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,s=this.businessEndsHour;if(0===s&&(s=24),o===s)return!1;if(!(o<s))return r<s||r>=o;if(r<o)return!1;if(s>=24)return!0;if(r>=s)return!1}return!0},this.u=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.ii=function(e){this.heightSpec="Fixed",this.height=e-(this.Ce()+2),this.ma()},this.setHeight=this.ii,this.je=function(e){return l.Eg(e)[0]},this.xb=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.Ma)throw new DayPilot.Exception("This instance is already initialized. Use update() to change properties.");if(this.xb(),this.nav.top.dp){if(this.nav.top.dp===l)return l;throw new DayPilot.Exception("The target placeholder was already initialized by another DayPilot component instance.")}return this.ji(),this.$g(),this},this.ji=function(){this.Mg(),this.qb(),this.ba(),this.ih(),this.rb();var angular=l.ze.enabled;l.scrollToDate?l.scrollTo(l.scrollToDate):l.scrollX||l.scrollY?l.setScroll(l.scrollX,l.scrollY):angular||l.ef(),l.scrollToResourceId&&(l.scrollToResource(l.scrollToResourceId),l.scrollToResourceId=null);var e=function(){l.scrollY&&l.setScroll(l.scrollX,l.scrollY)};setTimeout(e,200),this.cf(),this.wb(),this.Ma=!0;var t=l.ge;t?l.scrollTo(t):l.ef()},this.vb=null,this.tb=function(e){if(e){var t={"resources":{"preInit":function(){var e=this.data;e&&(l.resources=e)}},"events":{"preInit":function(){var e=this.data;e&&(DayPilot.isArray(e.list)?l.events.list=e.list:l.events.list=e)},"postInit":function(){}},"scrollTo":{"preInit":function(){},"postInit":function(){this.data&&l.fe(this.data)}},"scrollX":{"postInit":function(){this.data&&l.ie(this.data)}},"scrollY":{"postInit":function(){this.data&&l.Be(this.data)}}};l.vb=t,l.ze.scrollToRequested&&(t.scrollTo.data=l.ze.scrollToRequested,l.ze.scrollToRequested=null),l.ze.scrollXRequested&&(t.scrollX.data=l.ze.scrollXRequested,l.ze.scrollXRequested=null),l.ze.scrollYRequested&&(t.scrollY.data=l.ze.scrollYRequested,l.ze.scrollYRequested=null);for(var n in e)t[n]||(l[n]=e[n]);for(var a in e)if(t[a]){var i=t[a];i.data=e[a],i.preInit&&i.preInit()}}},this.wb=function(){var e=l.vb;for(var t in e){var n=e[t];n.postInit&&n.postInit()}l.vb={}},this.Sa={},this.Sa.Ra=null,this.Sa.Mb=function(e,t,n){var a=l.Sa.Ra;if("function"==typeof a.createVNode&&"function"==typeof a.render){var i=a.createVNode(e,n);a.render(i,t)}},this.Sa.Wa=function(e,t){var n=l.Sa.Ra;if("function"==typeof n.render){var a=e;DayPilot.isArray(e)&&(a=n.h("div",null,e)),n.render(a,t)}},this.Sa.Ua=function(e){var t=l.Sa.Ra;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.adjustEndIn=l.qf,this.internal.adjustEndNormalize=l.rf,this.internal.xssTextHtml=l._a,this.internal.touch=l.ce,
20
+ this.internal.skipUpdate=l.ze.skipUpdate,this.internal.skipped=l.ze.skipped,this.internal.loadOptions=l.tb,this.internal.postInit=l.wb,this.internal.enableAngular2=function(){l.ze.enabled=!0},this.internal.eventsFromAttr=function(){l.ze.Uf=!0},this.internal.resourcesFromAttr=function(){l.ze.bg=!0},this.internal.evImmediateRefresh=function(){l.events.uf()},this.internal.enableReact=function(e,t){l.cg.react=e,l.cg.reactDOM=t},this.internal.reactRefs=function(){return DayPilot.Util.copyProps(l.cg,{},["react","reactDOM"])},this.internal.enableVue=function(e){l.Sa.Ra=e},this.internal.vueRef=function(){return l.Sa.Ra},this.internal.vueRendering=function(){return l.Sa.Ta},this.tb(r)},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.ki={};var n=this.ki;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.li=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.li.events.length;t++)e.push(a.li.events[t]);return e},a.events.isEmpty=function(){return 0===a.li.events.length},a.events.forRange=function(e,t){return a.li.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)}},n.Pe=null,n.ng=null,n.Ch=null,n.gg=null,n.kg=null,n.Oe=!1,n.fh=!1,n.Th=null,n.mi=null,n.qc=function(){DayPilot.ue(document,"mouseup",n._d),DayPilot.ue(document,"touchmove",n.gh),DayPilot.ue(document,"touchend",n.hh),n.fh=!1},n.gh=function(e){if(n.gg){var t=n.gg.event.calendar;t.coords=t.ce.Hh(e),t.ce.Kh(),e.preventDefault()}if(n.Pe){e.preventDefault();var t=n.ng.calendar;t.coords=t.ce.Hh(e),t.ce.Lh()}},n.hh=function(e){n.Wg=!1,n._d(e)},n._d=function(e){if(n.gg){var t=function(){var e=n.kg,t=e.calendar;o().style.cursor="",n.gg=null,n.kg=null,DayPilot.de(n.jg),n.jg=null,t&&(t.ni=null)};if(setTimeout(function(){n.Oe=!1}),!n.jg)return void t();var i=n.kg,r=i.calendar,s=n.jg.start,l=n.jg.end,d="left"===n.gg.dpBorder?"start":"end";t(),r.K(i,s,l,d)}else if(n.ng){var t=function(){DayPilot.Global.movingAreaData=null;var e=n.og&&n.og.calendar;n.og&&(DayPilot.de(n.og),n.og.calendar=null),o().style.cursor="",n.Pe=null,n.ng=null,e&&(e.sf=null)};if(!n.og)return void t();var i=n.ng,r=n.og.calendar;if(!r)return void t();if(n.og.source=n.Pe,!n.og.row)return void t();var s=n.og.start,l=n.og.end,c=n.og.row.id;n.og.calendar=null,o().style.cursor="",n.Pe=null,n.ng=null,r.M(i,s,l,c,e),DayPilot.Global.movingAreaData=null}else if(n.Ih){var u=DayPilot.Util.mouseButton(e),h=n.Ih,f=h.calendar,t=function(){};if(f.hi=null,n.Th)return clearTimeout(n.Th),n.Th=null,void t();f.yf=h,n.Ih=null;var v=function(e){return function(){n.Th=null,f.vf(e),"Hold"!==f.timeRangeSelectedHandling&&"HoldForever"!==f.timeRangeSelectedHandling?a():f.yf=e}},p=f.Xh(h);return t(),u.left?(v(p)(),e.cancelBubble=!0,!1):void(n.Th=null)}n.Fh=null,n.fg=null}}}(DayPilot);if (typeof module !== "undefined") {
21
21
  module.exports = {
22
22
  DayPilot: DayPilot,
23
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daypilot/daypilot-lite-javascript",
3
- "version": "4.6.0",
3
+ "version": "4.6.1-sandbox.732",
4
4
  "description": "DayPilot Lite for JavaScript",
5
5
  "homepage": "https://javascript.daypilot.org/",
6
6
  "author": "Annpoint, s.r.o.",