@daypilot/daypilot-lite-javascript 3.29.0 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -324,6 +324,7 @@ export module DayPilot {
|
|
|
324
324
|
cellMarginBottom?: number;
|
|
325
325
|
contextMenu?: DayPilot.Menu;
|
|
326
326
|
eventBarVisible?: boolean;
|
|
327
|
+
eventBorderRadius?: string | number;
|
|
327
328
|
eventClickHandling?: "Enabled" | "Disabled" | "CallBack" | "ContextMenu";
|
|
328
329
|
eventRightClickHandling?: "ContextMenu" | "Enabled" | "Disabled";
|
|
329
330
|
eventHeight?: number;
|
|
@@ -3,17 +3,17 @@ DayPilot Lite
|
|
|
3
3
|
Copyright (c) 2005 - 2024 Annpoint s.r.o.
|
|
4
4
|
https://www.daypilot.org/
|
|
5
5
|
Licensed under Apache Software License 2.0
|
|
6
|
-
Version: 2024.4.
|
|
6
|
+
Version: 2024.4.622-lite
|
|
7
7
|
*/
|
|
8
8
|
var DayPilot={};if("undefined"==typeof DayPilot)var DayPilot={};if(function(){function e(e){var t=DayPilot.Date.Cache.Ticks;if(t[e])return DayPilot.Stats.cacheHitsTicks+=1,t[e];var i,a=new Date(e),n=a.getUTCMilliseconds();i=0===n?"":n<10?".00"+n:n<100?".0"+n:"."+n;var o=a.getUTCSeconds();o<10&&(o="0"+o);var r=a.getUTCMinutes();r<10&&(r="0"+r);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+":"+r+":"+o+i;return t[e]=u,u}function t(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.mo2=function(e,t){if(t=t||window.event,"undefined"!=typeof t.offsetX){var i={x:t.offsetX+1,y:t.offsetY+1};if(!e)return i;for(var a=t.srcElement;a&&a!==e;)"SPAN"!==a.tagName&&(i.x+=a.offsetLeft,a.offsetTop>0&&(i.y+=a.offsetTop-a.scrollTop)),a=a.offsetParent;return a?i:null}if("undefined"!=typeof t.layerX){var i={x:t.layerX,y:t.layerY,src:t.target};if(!e)return i;for(var a=t.target;a&&"absolute"!==a.style.position&&"relative"!==a.style.position;)a=a.parentNode,DayPilot.isKhtml&&(i.y+=a.scrollTop);for(;a&&a!==e;)i.x+=a.offsetLeft,i.y+=a.offsetTop-a.scrollTop,a=a.offsetParent;return a?i:null}return null},DayPilot.mo3=function(e,t){var i,a=DayPilot.page(t);if(a)if(e){var n=DayPilot.abs(e);if(!n)throw new Error("no abs");i={x:a.x-n.x,y:a.y-n.y}}else i={x:a.x,y:a.y};else if(i=DayPilot.mo2(e,t),!i)return null;return i.shift=t.shiftKey,i.meta=t.metaKey,i.ctrl=t.ctrlKey,i.alt=t.altKey,i},DayPilot.browser={},Object.defineProperty(DayPilot.browser,"hover",{get:function(){return!window.matchMedia("(any-hover: none)").matches}}),DayPilot.touch={},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 i=DayPilot.absBoundingClientBased(e);if(t){var a=DayPilot.absOffsetBased(e,!1),t=DayPilot.absOffsetBased(e,!0);i.x+=t.x-a.x,i.y+=t.y-a.y,i.w=t.w,i.h=t.h}return i}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 i={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,i.x-=e.scrollLeft,i.y-=e.scrollTop,t&&(i.x<0&&(i.w+=i.x,i.x=0),i.y<0&&(i.h+=i.y,i.y=0),e.scrollLeft>0&&i.x+i.w>e.clientWidth&&(i.w-=i.x+i.w-e.clientWidth),e.scrollTop&&i.y+i.h>e.clientHeight&&(i.h-=i.y+i.h-e.clientHeight)),i.x+=e.offsetLeft,i.y+=e.offsetTop;var a=DayPilot.pageOffset();return i.x+=a.x,i.y+=a.y,i},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(){if("undefined"==typeof window){var e={};return e.add=function(){},e.commit=function(){},e}var t=document.createElement("style");t.setAttribute("type","text/css"),t.styleSheet||t.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(t);var i=!!t.styleSheet,e={};return e.rules=[],e.commit=function(){i&&(t.styleSheet.cssText=this.rules.join("\n"))},e.add=function(e,a,n){return i?void this.rules.push(e+"{"+a+"}"):void(t.sheet.insertRule?("undefined"==typeof n&&(n=t.sheet.cssRules.length),t.sheet.insertRule(e+"{"+a+"}",n)):t.sheet.addRule&&t.sheet.addRule(e,a,n))},e},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(".calendar_default_main","border: 1px solid #c0c0c0; font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;"),e.add(".calendar_default_main *, .calendar_default_main *:before, .calendar_default_main *:after","box-sizing: content-box;"),e.add(".calendar_default_rowheader_inner,.calendar_default_cornerright_inner,.calendar_default_corner_inner,.calendar_default_colheader_inner,.calendar_default_alldayheader_inner","color: #333;background: #f3f3f3;"),e.add(".calendar_default_cornerright_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\tborder-bottom: 1px solid #c0c0c0;"),e.add(".calendar_default_direction_rtl .calendar_default_cornerright_inner","border-right: 1px solid #c0c0c0;"),e.add(".calendar_default_rowheader_inner","font-size: 16pt;text-align: right; position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0; padding: 3px;"),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 #c0c0c0;border-bottom: 1px solid #c0c0c0;"),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;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0; display: flex; align-items: center; justify-content: center; font-size: 13px;"),e.add(".calendar_default_cell_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #ddd;border-bottom: 1px solid #ddd; background: #f9f9f9;"),e.add(".calendar_default_cell_business .calendar_default_cell_inner","background: #fff"),e.add(".calendar_default_alldayheader_inner","text-align: center;position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"),e.add(".calendar_default_message","opacity: 0.9; padding: 10px; color: #ffffff;background: #ffa216;"),e.add(".calendar_default_alldayevent_inner,.calendar_default_event_inner","color: #333; border: 1px solid #999;"),e.add(".calendar_default_event_bar","top: 0px;bottom: 0px;left: 0px;width: 6px;background-color: #9dc8e8;"),e.add(".calendar_default_event_bar_inner","position: absolute;width: 6px;background-color: #1066a8;"),e.add(".calendar_default_alldayevent_inner,.calendar_default_event_inner",'background: #fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".calendar_default_selected .calendar_default_event_inner","background: #ddd;"),e.add(".calendar_default_alldayevent_inner","position: absolute;top: 2px;bottom: 2px;left: 2px;right: 2px;overflow:hidden;padding: 2px;margin-right: 1px; font-size: 13px;"),e.add(".calendar_default_event_withheader .calendar_default_event_inner","padding-top: 15px;"),e.add(".calendar_default_event","cursor: default;"),e.add(".calendar_default_event_inner","position: absolute;overflow: hidden;top: 0px;bottom: 0px;left: 0px;right: 0px;padding: 2px 2px 2px 8px; font-size: 13px;"),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: red;"),e.add(".calendar_default_now:before","content: ''; top: -5px; border-width: 5px; border-color: transparent transparent transparent red; 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 #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".calendar_default_shadow_bottom",'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),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: #f3f3f3;"),e.add(".calendar_default_event_moving_source","opacity: 0.5;"),e.add(".calendar_default_shadow_inner","box-sizing: border-box; background-color: #bbbbbb;border: 1px solid #888888;opacity: 0.5;height: 100%;"),e.add(".calendar_default_shadow","box-shadow: 0 2px 5px rgba(0,0,0,.2);"),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(".scheduler_default_selected .scheduler_default_event_inner","background: #ddd;"),e.add(".scheduler_default_main","border: 1px solid #c0c0c0;font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;"),e.add(".scheduler_default_timeheader","cursor: default;color: #333;"),e.add(".scheduler_default_message","opacity: 0.9;filter: alpha(opacity=90);padding: 10px; color: #ffffff;background: #ffa216;"),e.add(".scheduler_default_timeheadergroup,.scheduler_default_timeheadercol","color: #333;background: #f3f3f3;"),e.add(".scheduler_default_rowheader,.scheduler_default_corner","color: #333;background: #f3f3f3;"),e.add(".scheduler_default_rowheader_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #eee;padding: 2px;"),e.add(".scheduler_default_timeheadergroup, .scheduler_default_timeheadercol","text-align: center;"),e.add(".scheduler_default_timeheadergroup_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"),e.add(".scheduler_default_timeheadercol_inner","position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;"),e.add(".scheduler_default_divider","background-color: #c0c0c0;"),e.add(".scheduler_default_divider_horizontal","background-color: #c0c0c0;"),e.add(".scheduler_default_matrix_vertical_line","background-color: #eee;"),e.add(".scheduler_default_matrix_vertical_break","background-color: #000;"),e.add(".scheduler_default_matrix_horizontal_line","background-color: #eee;"),e.add(".scheduler_default_resourcedivider","background-color: #c0c0c0;"),e.add(".scheduler_default_shadow_inner","background-color: #666666;opacity: 0.5;filter: alpha(opacity=50);height: 100%;xborder-radius: 5px;"),e.add(".scheduler_default_event","color:#333; font-size: 13px;"),e.add(".scheduler_default_event_inner","position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:5px 2px 2px 2px;overflow:hidden;border:1px solid #ccc;"),e.add(".scheduler_default_event_bar","top:0px;left:0px;right:0px;height:4px;background-color:#9dc8e8;"),e.add(".scheduler_default_event_bar_inner","position:absolute;height:4px;background-color:#1066a8;"),e.add(".scheduler_default_event_inner",'background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),e.add(".scheduler_default_event_float_inner","padding:6px 2px 2px 8px;"),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:8px;left:-4px;'),e.add(".scheduler_default_columnheader_inner","font-weight: bold;"),e.add(".scheduler_default_columnheader_splitter","background-color: #666;opacity: 0.5;filter: alpha(opacity=50);"),e.add(".scheduler_default_columnheader_cell_inner","padding: 2px;"),e.add(".scheduler_default_cell","background-color: #f9f9f9;"),e.add(".scheduler_default_cell.scheduler_default_cell_business","background-color: #fff;"),e.add(".navigator_default_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;"),e.add(".navigator_default_main *, .navigator_default_main *:before, .navigator_default_main *:after","box-sizing: content-box;"),e.add(".navigator_default_month","font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 12px;"),e.add(".navigator_default_day","color: black;"),e.add(".navigator_default_weekend","background-color: #f0f0f0;"),e.add(".navigator_default_dayheader","color: black;"),e.add(".navigator_default_line","border-bottom: 1px solid #c0c0c0;"),e.add(".navigator_default_dayother","color: gray;"),e.add(".navigator_default_todaybox","border: 1px solid red;"),e.add(".navigator_default_title, .navigator_default_titleleft, .navigator_default_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),e.add(".navigator_default_busy","font-weight: bold;"),e.add(".navigator_default_cell","text-align: center;"),e.add(".navigator_default_select .navigator_default_cell_box","background-color: #FFE794; opacity: 0.5;"),e.add(".navigator_default_title","text-align: center;"),e.add(".navigator_default_titleleft, .navigator_default_titleright","text-align: center;"),e.add(".navigator_default_dayheader","text-align: center;"),e.add(".navigator_default_weeknumber","text-align: center; color: #999;"),e.add(".navigator_default_cell_text","cursor: pointer;"),e.add(".month_default_main","border: 1px solid #c0c0c0;font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; font-size: 13px;color: #333;"),e.add(".month_default_main *, .month_default_main *:before, .month_default_main *:after","box-sizing: content-box;"),e.add(".month_default_cell_inner","border-right: 1px solid #ddd;border-bottom: 1px solid #ddd;position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;background-color: #f9f9f9;"),e.add(".month_default_cell_business .month_default_cell_inner","background-color: #fff;"),e.add(".month_default_cell_header","text-align: right; padding: 4px; box-sizing: border-box;"),e.add(".month_default_header_inner","position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;cursor: default;color: #333;background: #f3f3f3; overflow:hidden; display: flex; align-items: center; justify-content: center;"),e.add(".month_default_message","padding: 10px;opacity: 0.9; color: #ffffff;background: #ffa216;"),e.add(".month_default_event_inner","position: absolute;top: 0px;bottom: 0px;left: 1px;right: 1px;overflow:hidden;padding: 2px;padding-left: 10px;color: #333;background: #fff;background: linear-gradient(to bottom, #ffffff 0%, #eeeeee);border: 1px solid #999;border-radius: 0px;display: flex; align-items: center; font-size: 13px;"),e.add(".month_default_event_continueright .month_default_event_inner","border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-right-style: dotted;"),e.add(".month_default_event_continueleft .month_default_event_inner","border-top-left-radius: 0px;border-bottom-left-radius: 0px;border-left-style: dotted;"),e.add(".month_default_event_bar","top: 1px;bottom: 1px;left: 2px;width: 6px;"),e.add(".month_default_event_bar_inner","position: absolute;width: 6px;background-color: #1066a8;"),e.add(".month_default_event_continueleft .month_default_event_bar","display: none;"),e.add(".month_default_selected .month_default_event_inner","background: #ddd;"),e.add(".month_default_event_delete","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; cursor: pointer;"),e.add(".month_default_event_delete:hover","opacity: 1;-ms-filter: none;"),e.add(".month_default_event_timeleft","color: #ccc; font-size: 8pt"),e.add(".month_default_event_timeright","color: #ccc; font-size: 8pt; text-align: right;"),e.add(".month_default_loading","background-color: orange; color: white; padding: 2px;"),e.add(".month_default_shadow_inner","box-sizing: border-box; background-color: #bbbbbb;border: 1px solid #888888;opacity: 0.5;height: 100%;"),e.add(".month_default_shadow","box-shadow: 0 2px 5px rgba(0,0,0,.2);"),e.commit(),DayPilot.Global.defaultCss=!0}}(),DayPilot.doc=function(){var e=document.documentElement;return e&&e.clientHeight?e:document.body},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.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 i=0;i<e.length;i++)if(e[i]===t)return i;return-1},DayPilot.ac=function(e,t){if(!t)var t=[];for(var i=0;e.children&&i<e.children.length;i++)t.push(e.children[i]),DayPilot.ac(e.children[i],t);return t},DayPilot.rfa=function(e,t){var i=DayPilot.indexOf(e,t);i!==-1&&e.splice(i,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,i){i&&t&&e&&e.addEventListener(t,i,!1)},DayPilot.rePassive=function(e,t,i){i&&t&&e&&e.addEventListener(t,i,{"passive":!0})},DayPilot.reNonPassive=function(e,t,i){i&&t&&e&&e.addEventListener(t,i,{"passive":!1})},DayPilot.pu=function(e){var t,i,a,n=e.attributes;if(n)for(i=n.length,t=0;t<i;t+=1)n[t]&&(a=n[t].name,"function"==typeof e[a]&&(e[a]=null));if(n=e.childNodes)for(i=n.length,t=0;t<i;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.parentNode&&e.parentNode.removeChild(e)},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,i,a){this.type="selection",this.start=e.isDayPilotDate?e:new DayPilot.Date(e),this.end=t.isDayPilotDate?t:new DayPilot.Date(t),this.resource=i,this.root=a,this.toJSON=function(e){var t={};return t.start=this.start,t.end=this.end,t.resource=this.resource,t}},DayPilot.request=function(e,t,i,a){var n=DayPilot.createXmlHttp();n&&(n.open("POST",e,!0),n.setRequestHeader("Content-type","text/plain"),n.onreadystatechange=function(){if(4===n.readyState)return 200!==n.status&&304!==n.status?void(a?a(n):window.console&&console.log("HTTP error "+n.status)):void t(n)},4!==n.readyState&&("object"==typeof i&&(i=JSON.stringify(i)),n.send(i)))},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 i="object"==typeof e.data,a=e.data,n=e.method||(e.data?"POST":"GET"),o=e.success||function(){},r=e.error||function(){},s=e.url,l=e.contentType||(i?"application/json":"text/plain"),d=e.headers||{};t.open(n,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)),o(e)}else if(r){var e={};e.request=t,r(e)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&(i&&(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(i,a){var n={};n.url=e,n.method="GET",n.success=function(e){i(e)},n.error=function(e){a(e)},n.contentType=t.contentType,n.headers=t.headers,DayPilot.ajax(n)})},DayPilot.Http.post=function(e,t,i){return i=i||{},new Promise(function(a,n){var o={};o.url=e,o.method="POST",o.data=t,o.success=function(e){a(e)},o.error=function(e){n(e)},o.contentType=i.contentType,o.headers=i.headers,DayPilot.ajax(o)})},DayPilot.Http.put=function(e,t,i){return i=i||{},new Promise(function(a,n){var o={};o.url=e,o.method="PUT",o.data=t,o.success=function(e){a(e)},o.error=function(e){n(e)},o.contentType=i.contentType,o.headers=i.headers,DayPilot.ajax(o)})},DayPilot.Http.delete=function(e,t){return t=t||{},new Promise(function(i,a){var n={};n.url=e,n.method="DELETE",n.success=function(e){i(e)},n.error=function(e){a(e)},n.contentType=t.contentType,n.headers=t.headers,DayPilot.ajax(n)})},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 i=new RegExp("(^|\\s)"+t+"($|\\s)");e.className=e.className.replace(i," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}},DayPilot.Util.copyProps=function(e,t,i){if(t||(t={}),!e)return t;if("undefined"==typeof i)for(var a in e)e.hasOwnProperty(a)&&"undefined"!=typeof e[a]&&(t[a]=e[a]);else for(var n=0;n<i.length;n++){var a=i[n];"undefined"!=typeof e[a]&&(t[a]=e[a])}return t},DayPilot.Util.ownPropsAsArray=function(e){var t=[];if(!e)return t;for(var i in e)if(e.hasOwnProperty(i)){var a={};a.key=i,a.val=e[i],t.push(a)}return t},DayPilot.Util.replaceCharAt=function(e,t,i){return e.substr(0,t)+i+e.substr(t+i.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.overlaps=function(e,t,i,a){return!(t<=i||e>=a)},DayPilot.Util.isVueVNode=function(e){return!!e&&(DayPilot.isArray(e)?DayPilot.Util.isVueVNode(e[0]):e["__v_isVNode"])},DayPilot.Areas={},DayPilot.Areas.attach=function(e,t,i){var i=i||{},n=i.areas,o=i.allowed||function(){return!0},r=i.offsetX||0;n=a(t,n),n&&DayPilot.isArray(n)&&0!==n.length&&(DayPilot.re(e,"mousemove",function(a){e.active||e.areasDisabled||!o()||DayPilot.Areas.showAreas(e,t,a,n,{"offsetX":r,"eventDiv":i.eventDiv})}),DayPilot.re(e,"mouseleave",function(t){DayPilot.Areas.hideAreas(e,t)}),n.forEach(function(a){if(DayPilot.Areas.isVisible(a)){var n=DayPilot.Areas.createArea(e,t,a,{"offsetX":r,"eventDiv":i.eventDiv});e.appendChild(n)}}))},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,{})}):[]};var a=function(e,t){return DayPilot.isArray(t)||(t=e.areas,t||(e.cache?t=e.cache.areas:e.data&&(t=e.data.areas))),t};DayPilot.Areas.showAreas=function(e,t,i,a,n){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 o=0;o<DayPilot.Areas.all.length;o++){var r=DayPilot.Areas.all[o];r!==e&&DayPilot.Areas.hideAreas(r,i)}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 o=0;o<a.length;o++){var s=a[o];if(!DayPilot.Areas.isVisible(s)){var l=DayPilot.Areas.createArea(e,t,s,n);e.areas.push(l),e.appendChild(l),DayPilot.Areas.all.push(e)}}e.active.children=DayPilot.ac(e)}}},DayPilot.Areas.createArea=function(e,t,i,a){function n(e,t,i){var a={};return a.area=e,a.source=t,a.originalEvent=i,a.preventDefault=function(){a.preventDefault.value=!0},"function"==typeof e.onClick&&e.onClick(a),a}function o(e,t,i){DayPilot.Bubble&&DayPilot.Bubble.touchPosition(i),e.calendar.bubble&&e.calendar.bubble.showEvent(e,!0)}function r(e,t,i,a){DayPilot.Menu&&DayPilot.Menu.touchPosition(a);var n=i.contextMenu||i.menu;if(n instanceof DayPilot.Menu||(t.isEvent&&t.client.contextMenu()?n=t.client.contextMenu():t.isEvent&&t.calendar.contextMenu&&(n=t.calendar.contextMenu)),
|
|
9
9
|
n&&n.show){var o={"type":"area","div":e,"e":t,"area":i,"a":d};n.show(t,{"initiator":o})}}function s(e){return"string"==typeof e&&isNaN(e)?e:"undefined"!=typeof e?e+"px":void 0}var a=a||{},l=(a.offsetX||0,a.eventDiv||e),d=document.createElement("div");d.isActiveArea=!0,d.area=i,d.setAttribute("unselectable","on");var c=i.w||i.width,u=i.h||i.height,h=i.cssClass||i.css||i.className;if("undefined"!=typeof i.style&&d.setAttribute("style",i.style),d.style.position="absolute",d.style.width=s(c),d.style.height=s(u),d.style.right=s(i.right),d.style.top=s(i.top),d.style.left=s(i.left),d.style.bottom=s(i.bottom),d.style.borderRadius=s(i.borderRadius),"undefined"!=typeof i.html||"undefined"!=typeof i.text)d.innerHTML=DayPilot.Util.escapeTextHtml(i.text,i.html);else if(i.icon){var f=document.createElement("i");f.className=i.icon,d.appendChild(f)}else if(i.image){var m=document.createElement("img");m.src=i.image,d.appendChild(m)}else if(i.symbol){var p="http://www.w3.org/2000/svg",v=document.createElementNS(p,"svg");v.setAttribute("width","100%"),v.setAttribute("height","100%");var y=document.createElementNS(p,"use");y.setAttribute("href",i.symbol),v.appendChild(y),d.appendChild(v)}if(h&&(d.className=h),i.toolTip&&d.setAttribute("title",i.toolTip),i.backColor&&(d.style.background=i.backColor),i.background&&(d.style.background=i.background),i.fontColor&&(d.style.color=i.fontColor),i.padding&&(d.style.padding=i.padding+"px",d.style.boxSizing="border-box"),i.verticalAlignment)switch(d.style.display="flex",i.verticalAlignment){case"center":d.style.alignItems="center";break;case"top":d.style.alignItems="flex-start";break;case"bottom":d.style.alignItems="flex-end"}if(i.horizontalAlignment)switch(d.style.display="flex",i.horizontalAlignment){case"right":d.style.justifyContent="flex-end";break;case"left":d.style.justifyContent="flex-start";break;case"center":d.style.justifyContent="center"}if("ResizeEnd"===i.action||"ResizeStart"===i.action||"Move"===i.action){if(t.calendar.isCalendar)switch(i.action){case"ResizeEnd":i.cursor="s-resize",i.dpBorder="bottom";break;case"ResizeStart":i.cursor="n-resize",i.dpBorder="top";break;case"Move":i.cursor="move"}if(t.calendar.isScheduler||t.calendar.isMonth)switch(i.action){case"ResizeEnd":i.cursor="e-resize",i.dpBorder="right";break;case"ResizeStart":i.cursor="w-resize",i.dpBorder="left";break;case"Move":i.cursor="move"}d.onmousemove=function(e,t,i){return function(a){t.calendar.internal&&t.calendar.internal.dragInProgress&&t.calendar.internal.dragInProgress()||(a.cancelBubble=!0,e.style.cursor=i.cursor,i.dpBorder&&(e.dpBorder=i.dpBorder))}}(l,t,i),d.onmouseout=function(e,t,i){return function(t){e.style.cursor=""}}(l,t,i)}if(("ResizeEnd"===i.action||"ResizeStart"===i.action)&&t.isEvent&&t.calendar.internal.touch){var g=function(e,t,i){return function(a){a.cancelBubble=!0;var n=t.calendar.internal.touch,o=a.touches?a.touches[0]:a,r={x:o.pageX,y:o.pageY};t.calendar.coords=n.relativeCoords(a),n.preventEventTap=!0,t.calendar.isScheduler?n.startResizing(e,"ResizeEnd"===i.action?"right":"left"):t.calendar.isCalendar&&n.startResizing(e,"ResizeEnd"===i.action?"bottom":"top",r)}}(l,t,i);DayPilot.rePassive(d,DayPilot.touch.start,g)}if("ContextMenu"===i.action&&t.isEvent&&t.calendar.internal.touch){var g=function(e,t,i){return function(a){a.cancelBubble=!0,a.preventDefault(),r(e,t,i,a),t.calendar.internal.touch.preventEventTap=!0}}(l,t,i),b=function(e,t,i){return function(e){e.cancelBubble=!0,e.preventDefault()}}(l,t,i);DayPilot.reNonPassive(d,DayPilot.touch.start,g),DayPilot.reNonPassive(d,DayPilot.touch.end,b)}if("Bubble"===i.action&&t.isEvent&&t.calendar.internal.touch){var g=function(e,t,i){return function(e){e.cancelBubble=!0,e.preventDefault();var a=n(i,t,e);if(!a.preventDefault.value){o(t,i,e);t.calendar.internal.touch.preventEventTap=!0,"function"==typeof i.onClicked&&i.onClicked(a)}}}(l,t,i),b=function(e,t,i){return function(e){e.cancelBubble=!0,e.preventDefault()}}(l,t,i);DayPilot.reNonPassive(d,DayPilot.touch.start,g),DayPilot.reNonPassive(d,DayPilot.touch.end,b)}if("Move"===i.action&&t.isEvent&&t.calendar.internal.touch){var g=function(e,t,i){return function(i){i.cancelBubble=!0;var a=t.calendar.internal.touch,n=i.touches?i.touches[0]:i,o={x:n.pageX,y:n.pageY};t.calendar.coords=a.relativeCoords(i),DayPilot.Global&&DayPilot.Global.touch&&(DayPilot.Global.touch.active=!0),a.preventEventTap=!0,a.startMoving(e,o)}}(l,t,i);DayPilot.rePassive(d,DayPilot.touch.start,g)}if("Bubble"===i.action&&t.isEvent?(d.onmousemove=function(e,t,i){return function(e){i.bubble?i.bubble.showEvent(t,!0):t.calendar.bubble&&t.calendar.bubble.showEvent(t,!0)}}(e,t,i),d.onmouseout=function(e,t,i){return function(e){"undefined"!=typeof DayPilot.Bubble&&(i.bubble?i.bubble.hideOnMouseOut():t.calendar.bubble&&t.calendar.bubble.hideOnMouseOut())}}(e,t,i)):"Bubble"===i.action&&t.isRow?(d.onmousemove=function(e,t,i){return function(e){i.bubble?i.bubble.showResource(t,!0):t.calendar.resourceBubble&&t.calendar.resourceBubble.showResource(t,!0)}}(e,t,i),d.onmouseout=function(e,t,i){return function(e){"undefined"!=typeof DayPilot.Bubble&&(i.bubble?i.bubble.hideOnMouseOut():t.calendar.resourceBubble&&t.calendar.resourceBubble.hideOnMouseOut())}}(e,t,i)):"Bubble"===i.action&&"undefined"!=typeof DayPilot.Bubble&&i.bubble instanceof DayPilot.Bubble&&(d.onmousemove=function(e,t,i){return function(e){i.bubble.showHtml(null,null)}}(e,t,i),d.onmouseout=function(e,t,i){return function(e){"undefined"!=typeof DayPilot.Bubble&&i.bubble&&i.bubble.hideOnMouseOut()}}(e,t,i)),"HoverMenu"===i.action&&(d.onmousemove=function(e,t,i){return function(e){var a=i.menu;a&&a.show&&(a.visible?a.source&&"undefined"!=typeof a.source.id&&a.source.id!==t.id&&a.show(t):a.show(t),a.cancelHideTimeout())}}(e,t,i),d.onmouseout=function(e,t,i){return function(e){var t=i.menu;t&&t.hideOnMouseOver&&t.delayedHide()}}(e,t,i)),"None"===i.action){var g=function(e,t,i){return function(e){var a=n(i,t,e);"function"==typeof i.onClicked&&i.onClicked(a),e.preventDefault(),e.stopPropagation()}}(l,t,i);DayPilot.reNonPassive(d,DayPilot.touch.start,g)}return d.onmousedown=function(e,t,i){return function(a){if("function"==typeof i.onmousedown&&i.onmousedown(a),"function"==typeof i.mousedown){var n={};n.area=i,n.div=e,n.originalEvent=a,n.source=t,i.mousedown(n)}if("Move"===i.action&&t.isRow){var o=t.$.row;(0,t.calendar.internal.rowStartMoving)(o)}"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),"Move"===i.action&&(DayPilot.Global.movingAreaData=i.data),"Move"===i.action&&t.isEvent&&t.calendar.internal&&t.calendar.internal.startMoving&&t.calendar.internal.startMoving(e,a);"Move"!==i.action&&"ResizeEnd"!==i.action&&"ResizeStart"!==i.action&&i.action&&"Default"!==i.action&&(a.preventDefault(),a.cancelBubble=!0)}}(e,t,i),d.onclick=function(e,t,i){return function(a){var o=n(i,t,a);if(!o.preventDefault.value){switch(i.action){case"ContextMenu":r(e,t,i,a),a.cancelBubble=!0;break;case"None":a.cancelBubble=!0}"function"==typeof i.onClicked&&i.onClicked(o)}}}(e,t,i),"function"==typeof i.onMouseEnter&&d.addEventListener("mouseenter",function(e,t,i){return function(e){var a={};a.area=i,a.source=t,a.originalEvent=e,i.onMouseEnter(a)}}(e,t,i)),"function"==typeof i.onMouseLeave&&d.addEventListener("mouseleave",function(e,t,i){return function(e){var a={};a.area=i,a.source=t,a.originalEvent=e,i.onMouseLeave(a)}}(e,t,i)),d},DayPilot.Areas.all=[],DayPilot.Areas.hideAreas=function(e,t){if(e&&e&&e.active){var i=e.active,a=e.areas;if(i&&i.children&&t){var n=t.toElement||t.relatedTarget;if(~DayPilot.indexOf(i.children,n))return}if(!a||0===a.length)return void(e.active=null);DayPilot.de(a),e.active=null,e.areas=[],DayPilot.rfa(DayPilot.Areas.all,e),i.children=null}},DayPilot.Areas.hideAll=function(e){if(DayPilot.Areas.all&&0!==DayPilot.Areas.all.length)for(var t=0;t<DayPilot.Areas.all.length;t++)DayPilot.Areas.hideAreas(DayPilot.Areas.all[t],e)},DayPilot.Exception=function(e){return new Error(e)},DayPilot.Locale=function(e,t){if(this.id=e,this.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.dayNamesShort=["Su","Mo","Tu","We","Th","Fr","Sa"],this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this.datePattern="M/d/yyyy",this.timePattern="H:mm",this.dateTimePattern="M/d/yyyy H:mm",this.timeFormat="Clock12Hours",this.weekStarts=0,t)for(var i in t)this[i]=t[i]},DayPilot.Locale.all={},DayPilot.Locale.find=function(e){if(!e)return null;var t=e.toLowerCase();return t.length>2&&(t=DayPilot.Util.replaceCharAt(t,2,"-")),DayPilot.Locale.all[t]},DayPilot.Locale.register=function(e){DayPilot.Locale.all[e.id]=e},DayPilot.Locale.register(new DayPilot.Locale("ca-es",{"dayNames":["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],"dayNamesShort":["dg","dl","dt","dc","dj","dv","ds"],"monthNames":["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],"monthNamesShort":["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("cs-cz",{"dayNames":["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],"dayNamesShort":["ne","po","út","st","čt","pá","so"],"monthNames":["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],"monthNamesShort":["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""],"timePattern":"H:mm","datePattern":"d. M. yyyy","dateTimePattern":"d. M. yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("da-dk",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"dd-MM-yyyy","dateTimePattern":"dd-MM-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-at",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-ch",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-de",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("de-lu",{"dayNames":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dayNamesShort":["So","Mo","Di","Mi","Do","Fr","Sa"],"monthNames":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],"monthNamesShort":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-au",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-ca",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("en-gb",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("en-us",{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Su","Mo","Tu","We","Th","Fr","Sa"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"monthNamesShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"timePattern":"h:mm tt","datePattern":"M/d/yyyy","dateTimePattern":"M/d/yyyy h:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("es-es",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["D","L","M","X","J","V","S"],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("es-mx",{"dayNames":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dayNamesShort":["do.","lu.","ma.","mi.","ju.","vi.","sá."],"monthNames":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],"monthNamesShort":["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],"timePattern":"hh:mm tt","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy hh:mm tt","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("eu-es",{"dayNames":["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],"dayNamesShort":["ig","al","as","az","og","or","lr"],"monthNames":["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],"monthNamesShort":["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fi-fi",{"dayNames":["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],"dayNamesShort":["su","ma","ti","ke","to","pe","la"],"monthNames":["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],"monthNamesShort":["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-be",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd-MM-yy","dateTimePattern":"dd-MM-yy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-ch",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-fr",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("fr-lu",{"dayNames":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dayNamesShort":["di","lu","ma","me","je","ve","sa"],"monthNames":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],"monthNamesShort":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("gl-es",{"dayNames":["domingo","luns","martes","mércores","xoves","venres","sábado"],"dayNamesShort":["do","lu","ma","mé","xo","ve","sá"],"monthNames":["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],"monthNamesShort":["xan","feb","mar","abr","maio","xuño","xul","ago","set","out","nov","dec",""],"timePattern":"H:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-it",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("it-ch",{"dayNames":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dayNamesShort":["do","lu","ma","me","gi","ve","sa"],"monthNames":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],"monthNamesShort":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ja-jp",{"dayNames":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"dayNamesShort":["日","月","火","水","木","金","土"],"monthNames":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"yyyy/MM/dd","dateTimePattern":"yyyy/MM/dd H:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("nb-no",{"dayNames":["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],"dayNamesShort":["sø","ma","ti","on","to","fr","lø"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-nl",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"d-M-yyyy","dateTimePattern":"d-M-yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nl-be",{"dayNames":["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],"dayNamesShort":["zo","ma","di","wo","do","vr","za"],"monthNames":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"H:mm","datePattern":"d/MM/yyyy","dateTimePattern":"d/MM/yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("nn-no",{"dayNames":["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],"dayNamesShort":["sø","må","ty","on","to","fr","la"],"monthNames":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],"monthNamesShort":["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],"timePattern":"HH:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-br",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("pl-pl",{"dayNames":["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],"dayNamesShort":["N","Pn","Wt","Śr","Cz","Pt","So"],"monthNames":["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],"monthNamesShort":["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("pt-pt",{"dayNames":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"dayNamesShort":["D","S","T","Q","Q","S","S"],"monthNames":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],"monthNamesShort":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],"timePattern":"HH:mm","datePattern":"dd/MM/yyyy","dateTimePattern":"dd/MM/yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":0})),DayPilot.Locale.register(new DayPilot.Locale("ro-ro",{"dayNames":["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"],"dayNamesShort":["D","L","Ma","Mi","J","V","S"],"monthNames":["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],"monthNamesShort":["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("ru-ru",{"dayNames":["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],"dayNamesShort":["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],"monthNamesShort":["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sk-sk",{"dayNames":["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],"dayNamesShort":["ne","po","ut","st","št","pi","so"],"monthNames":["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],"monthNamesShort":["1","2","3","4","5","6","7","8","9","10","11","12",""],"timePattern":"H:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("sv-se",{"dayNames":["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],"dayNamesShort":["sö","må","ti","on","to","fr","lö"],"monthNames":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],"monthNamesShort":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],"timePattern":"HH:mm","datePattern":"yyyy-MM-dd","dateTimePattern":"yyyy-MM-dd HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("tr-tr",{"dayNames":["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],"dayNamesShort":["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],"monthNames":["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],"monthNamesShort":["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""],"timePattern":"HH:mm","datePattern":"d.M.yyyy","dateTimePattern":"d.M.yyyy HH:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("uk-ua",{"dayNames":["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],"dayNamesShort":["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],"monthNames":["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень",""],"monthNamesShort":["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""],"timePattern":"H:mm","datePattern":"dd.MM.yyyy","dateTimePattern":"dd.MM.yyyy H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("zh-cn",{"dayNames":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dayNamesShort":["日","一","二","三","四","五","六"],"monthNames":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"monthNamesShort":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],"timePattern":"H:mm","datePattern":"yyyy/M/d","dateTimePattern":"yyyy/M/d H:mm","timeFormat":"Clock24Hours","weekStarts":1})),DayPilot.Locale.register(new DayPilot.Locale("zh-tw",{"dayNames":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"dayNamesShort":["日","一","二","三","四","五","六"],"monthNames":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"monthNamesShort":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],"timePattern":"tt hh:mm","datePattern":"yyyy/M/d","dateTimePattern":"yyyy/M/d tt hh:mm","timeFormat":"Clock12Hours","weekStarts":0})),DayPilot.Locale.US=DayPilot.Locale.find("en-us"),DayPilot.Switcher=function(e){function t(e,t,a){var n={};n.start=e,n.end=t,n.day=a,n.target=i.k.control,n.preventDefault=function(){this.preventDefault.value=!0};var o=i.H;o&&o.start===n.start&&o.end===n.end&&o.day===n.day&&o.target===n.target||(i.H=n,"function"==typeof i.onChange&&(i.onChange(n),n.preventDefault.value)||"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(n),n.preventDefault.value)||(i.k.s(i.l),"function"==typeof i.onChanged&&i.onChanged(n),"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(n)))}var i=this;this.f=[],this.i=[],this.j={},this.selectedClass=null,this.syncScrollbar=!0,this.k=null,this.l=DayPilot.Date.today(),this.m=null,this.onChange=null,this.onChanged=null,this.onSelect=null,this.j.updateMode=function(e){var t=i.j.control;t&&(t.selectMode=e,t.select(i.l))},this.addView=function(e,t){var a;if("string"==typeof e){if(a=document.getElementById(e),!a)throw"Element not found: "+e}else a=e;var n=a,o={};return o.n=!0,o.o=n.id,o.control=n,o.p=t||{},o.q=function(){n.hide?n.hide():n.nav&&n.nav.top?n.nav.top.style.display="none":n.style.display="none"},o.s=function(e){(function(){return!!n.backendUrl||!("function"!=typeof WebForm_DoCallback||!n.uniqueID)})()?n.commandCallBack&&n.commandCallBack("navigate",{"day":e}):(n.startDate=e,n.update())},o.t=function(){i.u(),n.show?n.show():n.nav&&n.nav.top?n.nav.top.style.display="":n.style.display=""},o.z=function(){if(o.p.navigatorSelectMode)return o.p.navigatorSelectMode;if(n.isCalendar)switch(n.viewType){case"Day":return"day";case"Week":return"week";case"WorkWeek":return"week";default:return"day"}else if(n.isMonth)switch(n.viewType){case"Month":return"month";case"Weeks":return"week";default:return"day"}return"day"},this.f.push(o),o},this.addTrigger=function(e,t){var a;if("string"==typeof e){if(a=document.getElementById(e),!a)throw"Element not found: "+e}else a=e;var n=this.A(t);n||(n=this.addView(t));var o={};return o.B=!0,o.C=a,o.o=a.id,o.D=n,o.E=function(e){i.show(o),i.F(o),e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},DayPilot.re(a,"click",o.E),this.i.push(o),o},this.addButton=this.addTrigger,this.select=function(e){var t=this.G(e);t?t.E():this.i.length>0&&this.i[0].E()},this.G=function(e){for(var t=0;t<this.i.length;t++){var i=this.i[t];if(i.o===e)return i}return null},this.F=function(e){if(this.selectedClass){for(var t=0;t<this.i.length;t++){var i=this.i[t];DayPilot.Util.removeClass(i.C,this.selectedClass)}DayPilot.Util.addClass(e.C,this.selectedClass)}},this.addNavigator=function(e){i.j.control=e,e.timeRangeSelectedHandling="JavaScript",e.onTimeRangeSelected=function(){var a,n,o;if(1===e.api)a=arguments[0],n=arguments[1],o=arguments[2];else{var r=arguments[0];
|
|
10
|
-
a=r.start,n=r.end,o=r.day}i.l=o,t(a,n,o)}},this.show=function(e){var a,n;if(e.B)n=e,a=n.D;else if(a=e.n?e:this.A(e),this.k===a)return;if(i.onSelect){var o={};o.source=n?n.C:null,o.target=a.control,i.onSelect(o)}if(i.syncScrollbar){var r=this.k&&this.k.control;r&&r.isCalendar&&(i.m=r.getScrollY())}this.k=a,a.t(),null!==i.m&&a.control.isCalendar&&a.control.setScrollY(i.m);var s=a.z();i.j.updateMode(s),t(i.j.control.selectionStart,i.j.control.selectionEnd.addDays(1),i.j.control.selectionDay)},this.A=function(e){for(var t=0;t<this.f.length;t++)if(this.f[t].control===e)return this.f[t];return null},this.u=function(){for(var e=0;e<this.f.length;e++)this.f[e].q()},Object.defineProperty(this,"active",{get:function(){return i.k}}),this.events={},this.events.load=function(e,t,a){if(!i.k||!i.k.control)throw"DayPilot.Switcher.events.load(): Active view not found";i.k.control.events.load(e,t,a)},this.H=null,this.I=function(){if(e)for(var t in e)if("triggers"===t){var a=e.triggers||[];a.forEach(function(e){i.addTrigger(e.id,e.view)})}else"navigator"===t?i.addNavigator(e.navigator):i[t]=e[t]},this.I()},DayPilot.Duration=function(e){var t=this,i=864e5,a=36e5,n=6e4,o=1e3;if(2===arguments.length){var r=arguments[0],s=arguments[1];if(!(r instanceof DayPilot.Date)&&"string"!=typeof r)throw"DayPilot.Duration(): Invalid start argument, DayPilot.Date expected";if(!(s instanceof DayPilot.Date)&&"string"!=typeof s)throw"DayPilot.Duration(): Invalid end argument, DayPilot.Date expected";"string"==typeof r&&(r=new DayPilot.Date(r)),"string"==typeof s&&(s=new DayPilot.Date(s)),e=s.getTime()-r.getTime()}return this.ticks=e,DayPilot.Date.Cache.DurationCtor[""+e]?DayPilot.Date.Cache.DurationCtor[""+e]:(DayPilot.Date.Cache.DurationCtor[""+e]=this,this.toString=function(e){if(!e)return t.days()+"."+t.hours()+":"+t.minutes()+":"+t.seconds()+"."+t.milliseconds();var i=t.minutes();i=(i<10?"0":"")+i;var a=e;return a=a.replace("mm",i),a=a.replace("m",t.minutes()),a=a.replace("H",t.hours()),a=a.replace("h",t.hours()),a=a.replace("d",t.days()),a=a.replace("s",t.seconds())},this.totalHours=function(){return t.ticks/a},this.totalDays=function(){return t.ticks/i},this.totalMinutes=function(){return t.ticks/n},this.totalSeconds=function(){return t.ticks/o},this.days=function(){return Math.floor(t.totalDays())},this.hours=function(){var e=t.ticks-t.days()*i;return Math.floor(e/a)},this.minutes=function(){var e=t.ticks-Math.floor(t.totalHours())*a;return Math.floor(e/n)},this.seconds=function(){var e=t.ticks-Math.floor(t.totalMinutes())*n;return Math.floor(e/o)},void(this.milliseconds=function(){return t.ticks%o}))},DayPilot.Duration.weeks=function(e){return new DayPilot.Duration(1e3*e*60*60*24*7)},DayPilot.Duration.days=function(e){return new DayPilot.Duration(1e3*e*60*60*24)},DayPilot.Duration.hours=function(e){return new DayPilot.Duration(1e3*e*60*60)},DayPilot.Duration.minutes=function(e){return new DayPilot.Duration(1e3*e*60)},DayPilot.Duration.seconds=function(e){return new DayPilot.Duration(1e3*e)},DayPilot.TimeSpan=function(){throw"Please use DayPilot.Duration class instead of DayPilot.TimeSpan."};try{DayPilot.TimeSpan.prototype=Object.create(DayPilot.Duration.prototype)}catch(e){}DayPilot.Date=function(t,i){if(t instanceof DayPilot.Date)return t;var a;DayPilot.Util.isNullOrUndefined(t)&&(a=DayPilot.DateUtil.fromLocal().getTime(),t=a);var n=DayPilot.Date.Cache.Ctor;if(n[t])return DayPilot.Stats.cacheHitsCtor+=1,n[t];var o=!1;if("string"==typeof t)a=DayPilot.DateUtil.fromStringSortable(t,i).getTime(),o=!0;else if("number"==typeof t){if(isNaN(t))throw"Cannot create DayPilot.Date from NaN";a=t}else{if(!(t instanceof Date))throw"Unrecognized parameter: use Date, number or string in ISO 8601 format";a=i?DayPilot.DateUtil.fromLocal(t).getTime():t.getTime()}var r=e(a);return n[r]?n[r]:(n[r]=this,n[a]=this,o&&r!==t&&DayPilot.DateUtil.hasTzSpec(t)&&(n[t]=this),Object.defineProperty?(Object.defineProperty(this,"ticks",{get:function(){return a}}),Object.defineProperty(this,"value",{"value":r,"writable":!1,"enumerable":!0})):(this.ticks=a,this.value=r),DayPilot.Date.Config.legacyShowD&&(this.d=new Date(a)),void(DayPilot.Stats.dateObjects+=1))},DayPilot.Date.Config={},DayPilot.Date.Config.legacyShowD=!1,DayPilot.Date.Cache={},DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={},DayPilot.Date.Cache.clear=function(){DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={}},DayPilot.Date.prototype.addDays=function(e){return e?new DayPilot.Date(this.ticks+24*e*60*60*1e3):this},DayPilot.Date.prototype.addHours=function(e){return e?this.addTime(60*e*60*1e3):this},DayPilot.Date.prototype.addMilliseconds=function(e){return e?this.addTime(e):this},DayPilot.Date.prototype.addMinutes=function(e){return e?this.addTime(60*e*1e3):this},DayPilot.Date.prototype.addMonths=function(e){if(!e)return this;var t=new Date(this.ticks),i=t.getUTCFullYear(),a=t.getUTCMonth()+1;if(e>0){for(;e>=12;)e-=12,i++;e>12-a?(i++,a=e-(12-a)):a+=e}else{for(;e<=-12;)e+=12,i--;a+e<=0?(i--,a=12+a+e):a+=e}var n=new Date(t.getTime());n.setUTCDate(1),n.setUTCFullYear(i),n.setUTCMonth(a-1);var o=new DayPilot.Date(n).daysInMonth();return n.setUTCDate(Math.min(o,t.getUTCDate())),new DayPilot.Date(n)},DayPilot.Date.prototype.addSeconds=function(e){return e?this.addTime(1e3*e):this},DayPilot.Date.prototype.addTime=function(e){return e?(e instanceof DayPilot.Duration&&(e=e.ticks),new DayPilot.Date(this.ticks+e)):this},DayPilot.Date.prototype.addYears=function(e){var t=new Date(this.ticks),i=new Date(this.ticks),a=this.getYear()+e,n=this.getMonth();i.setUTCDate(1),i.setUTCFullYear(a),i.setUTCMonth(n);var o=new DayPilot.Date(i).daysInMonth();return i.setUTCDate(Math.min(o,t.getUTCDate())),new DayPilot.Date(i)},DayPilot.Date.prototype.dayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfYear=function(){var e=this.firstDayOfYear();return DayPilot.DateUtil.daysDiff(e,this)+1},DayPilot.Date.prototype.daysInMonth=function(){var e=new Date(this.ticks),t=e.getUTCMonth()+1,i=e.getUTCFullYear(),a=[31,28,31,30,31,30,31,31,30,31,30,31];return 2!==t?a[t-1]:i%4!==0?a[1]:i%100===0&&i%400!==0?a[1]:a[1]+1},DayPilot.Date.prototype.daysInYear=function(){var e=this.getYear();return e%4!==0?365:e%100===0&&e%400!==0?365:366},DayPilot.Date.prototype.dayOfYear=function(){return Math.ceil((this.getDatePart().getTime()-this.firstDayOfYear().getTime())/864e5)+1},DayPilot.Date.prototype.equals=function(e){if(null===e)return!1;if(e instanceof DayPilot.Date)return this===e;throw"The parameter must be a DayPilot.Date object (DayPilot.Date.equals())"},DayPilot.Date.prototype.firstDayOfMonth=function(){var e=new Date;return e.setUTCFullYear(this.getYear(),this.getMonth(),1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.firstDayOfYear=function(){var e=this.getYear(),t=new Date;return t.setUTCFullYear(e,0,1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),new DayPilot.Date(t)},DayPilot.Date.prototype.firstDayOfWeek=function(e){var t=this;if(e instanceof DayPilot.Locale)e=e.weekStarts;else if("string"==typeof e&&DayPilot.Locale.find(e)){var i=DayPilot.Locale.find(e);e=i.weekStarts}else e=e||0;for(var a=t.dayOfWeek();a!==e;)t=t.addDays(-1),a=t.dayOfWeek();return new DayPilot.Date(t)},DayPilot.Date.prototype.getDay=function(){return new Date(this.ticks).getUTCDate()},DayPilot.Date.prototype.getDatePart=function(){var e=new Date(this.ticks);return e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.getYear=function(){return new Date(this.ticks).getUTCFullYear()},DayPilot.Date.prototype.getHours=function(){return new Date(this.ticks).getUTCHours()},DayPilot.Date.prototype.getMilliseconds=function(){return new Date(this.ticks).getUTCMilliseconds()},DayPilot.Date.prototype.getMinutes=function(){return new Date(this.ticks).getUTCMinutes()},DayPilot.Date.prototype.getMonth=function(){return new Date(this.ticks).getUTCMonth()},DayPilot.Date.prototype.getSeconds=function(){return new Date(this.ticks).getUTCSeconds()},DayPilot.Date.prototype.getTotalTicks=function(){return this.getTime()},DayPilot.Date.prototype.getTime=function(){return this.ticks},DayPilot.Date.prototype.getTimePart=function(){var e=this.getDatePart();return DayPilot.DateUtil.diff(this,e)},DayPilot.Date.prototype.lastDayOfMonth=function(){var e=new Date(this.firstDayOfMonth().getTime()),t=this.daysInMonth();return e.setUTCDate(t),new DayPilot.Date(e)},DayPilot.Date.prototype.weekNumber=function(){var e=this.firstDayOfYear(),t=(this.getTime()-e.getTime())/864e5;return Math.ceil((t+e.dayOfWeek()+1)/7)},DayPilot.Date.prototype.weekNumberISO=function(){var e=!1,t=this.dayOfYear(),i=this.firstDayOfYear().dayOfWeek(),a=this.firstDayOfYear().addYears(1).addDays(-1).dayOfWeek();0===i&&(i=7),0===a&&(a=7);var n=8-i;4!==i&&4!==a||(e=!0);var o=Math.ceil((t-n)/7),r=o;return n>=4&&(r+=1),r>52&&!e&&(r=1),0===r&&(r=this.firstDayOfYear().addDays(-1).weekNumberISO()),r},DayPilot.Date.prototype.toDateLocal=function(){var e=new Date(this.ticks),t=new Date;return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours()),t.setMinutes(e.getUTCMinutes()),t.setSeconds(e.getUTCSeconds()),t.setMilliseconds(e.getUTCMilliseconds()),t},DayPilot.Date.prototype.toDate=function(){return new Date(this.ticks)},DayPilot.Date.prototype.toJSON=function(){return this.value},DayPilot.Date.prototype.toString=function(e,t){return e?new n(e,t).print(this):this.toStringSortable()},DayPilot.Date.prototype.toStringSortable=function(){return e(this.ticks)},DayPilot.Date.parse=function(e,t,i){return new n(t,i).parse(e)};DayPilot.Date.today=function(){return new DayPilot.Date(DayPilot.DateUtil.localToday(),!0)},DayPilot.Date.now=function(){return new DayPilot.Date},DayPilot.Date.fromYearMonthDay=function(e,t,i){t=t||1,i=i||1;var a=new Date(0);return a.setUTCFullYear(e),a.setUTCMonth(t-1),a.setUTCDate(i),new DayPilot.Date(a)},DayPilot.DateUtil={},DayPilot.DateUtil.fromStringSortable=function(e,t){if(!e)throw"Can't create DayPilot.Date from an empty string";var i=e.length,a=10===i,n=19===i,o=i>19;if(!a&&!n&&!o)throw"Invalid string format (use '2010-01-01' or '2010-01-01T00:00:00'): "+e;if(DayPilot.Date.Cache.Parsing[e]&&!t)return DayPilot.Stats.cacheHitsParsing+=1,DayPilot.Date.Cache.Parsing[e];var r=e.substring(0,4),s=e.substring(5,7),l=e.substring(8,10),d=new Date(0);if(d.setUTCFullYear(r,s-1,l),a)return DayPilot.Date.Cache.Parsing[e]=d,d;var c=e.substring(11,13),u=e.substring(14,16),h=e.substring(17,19);if(d.setUTCHours(c),d.setUTCMinutes(u),d.setUTCSeconds(h),n)return DayPilot.Date.Cache.Parsing[e]=d,d;var f=e[19],m=0;if("."===f){var p=parseInt(e.substring(20,23));d.setUTCMilliseconds(p),m=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(23))}else m=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(19));var v=new DayPilot.Date(d);return t||(v=v.addMinutes(-m)),d=v.toDate(),DayPilot.Date.Cache.Parsing[e]=d,d},DayPilot.DateUtil.getTzOffsetMinutes=function(e){if(DayPilot.Util.isNullOrUndefined(e)||""===e)return 0;if("Z"===e)return 0;var t=e[0],i=parseInt(e.substring(1,3)),a=parseInt(e.substring(4)),n=60*i+a;if("-"===t)return-n;if("+"===t)return n;throw"Invalid timezone spec: "+e},DayPilot.DateUtil.hasTzSpec=function(e){return!!e.indexOf("+")||!!e.indexOf("-")},DayPilot.DateUtil.daysDiff=function(e,t){if(e&&t||function(){throw"two parameters required"}(),e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()>t.getTime())return null;for(var i=0,a=e.getDatePart(),n=t.getDatePart();a<n;)a=a.addDays(1),i++;return i},DayPilot.DateUtil.daysSpan=function(e,t){if(e&&t||function(){throw"two parameters required"}(),e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()===t.getTime())return 0;var i=DayPilot.DateUtil.daysDiff(e,t);return t.getTime()==t.getDatePart().getTime()&&i--,i},DayPilot.DateUtil.diff=function(e,t){if(!(e&&t&&e.getTime&&t.getTime))throw"Both compared objects must be Date objects (DayPilot.Date.diff).";return e.getTime()-t.getTime()},DayPilot.DateUtil.fromLocal=function(e){e||(e=new Date);var t=new Date;return t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours()),t.setUTCMinutes(e.getMinutes()),t.setUTCSeconds(e.getSeconds()),t.setUTCMilliseconds(e.getMilliseconds()),t},DayPilot.DateUtil.localToday=function(){var e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e},DayPilot.DateUtil.hours=function(e,t){var i=e.getUTCMinutes();i<10&&(i="0"+i);var a=e.getUTCHours();if(t){var n=a<12,a=a%12;0===a&&(a=12);return a+":"+i+" "+(n?"AM":"PM")}return a+":"+i},DayPilot.DateUtil.max=function(e,t){return e.getTime()>t.getTime()?e:t},DayPilot.DateUtil.min=function(e,t){return e.getTime()<t.getTime()?e:t};var n=function(e,i){"string"==typeof i&&(i=DayPilot.Locale.find(i));var i=i||DayPilot.Locale.US,a=[{"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}},{"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=t%12;0===t&&(t=12);var i=t;return i<10?"0"+i:i}},{"seq":"h","expr":"[0-9]{1,2}","str":function(e){var t=e.getHours(),t=t%12;return 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 i.monthNames[e.getMonth()]},"transform":function(e){var a=DayPilot.indexOf(i.monthNames,e,t);return a<0?null:a+1}},{"seq":"MMM","expr":"[^\\s0-9]*","str":function(e){return i.monthNamesShort[e.getMonth()]},"transform":function(e){var a=DayPilot.indexOf(i.monthNamesShort,e,t);return a<0?null:a+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 i.dayNames[e.getDayOfWeek()]}},{"seq":"ddd","expr":"[^\\s0-9]*","str":function(e){return i.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()}}],n=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};this.init=function(){this.year=this.findSequence("yyyy"),this.month=this.findSequence("MMMM")||this.findSequence("MMM")||this.findSequence("MM")||this.findSequence("M"),this.day=this.findSequence("dd")||this.findSequence("d"),this.hours=this.findSequence("HH")||this.findSequence("H"),this.minutes=this.findSequence("mm")||this.findSequence("m"),this.seconds=this.findSequence("ss")||this.findSequence("s"),this.ampm=this.findSequence("tt"),this.hours12=this.findSequence("hh")||this.findSequence("h")},this.findSequence=function(t){function i(e){return parseInt(e)}return e.indexOf(t)===-1?null:{"findValue":function(o){for(var r=n(e),s=null,l=0;l<a.length;l++){var d=(a[l].length,t===a[l].seq),c=a[l].expr;d&&(c="("+c+")",s=a[l].transform),r=r.replace(a[l].seq,c)}r="^"+r+"$";try{var u=new RegExp(r),h=u.exec(o);return h?(s=s||i)(h[1]):null}catch(e){throw"unable to create regex from: "+r}}}},this.print=function(t){for(var i=function(e){for(var t=0;t<a.length;t++)if(a[t]&&a[t].seq===e)return a[t];return null},n=e.length<=0,o=0,r=[];!n;){var s=e.substring(o),l=/%?(.)\1*/.exec(s);if(l&&l.length>0){var d=l[0],c=i(d);c?r.push(c):r.push(d),o+=d.length,n=e.length<=o}else n=!0}for(var u=0;u<r.length;u++){var h=r[u];"string"!=typeof h&&(r[u]=h.str(t))}return r.join("")},this.parse=function(e){var t=this.year.findValue(e);if(!t)return null;var i=this.month.findValue(e);if(DayPilot.Util.isNullOrUndefined(i))return null;if(i>12||i<1)return null;var a=this.day.findValue(e),n=DayPilot.Date.fromYearMonthDay(t,i).daysInMonth();if(a<1||a>n)return null;var o=this.hours?this.hours.findValue(e):0,r=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;o="PM"===l?12===d?12:d+12:12===d?0:d}if(o<0||o>23)return null;if(r<0||r>59)return null;if(s<0||s>59)return null;var c=new Date;return c.setUTCFullYear(t,i-1,a),c.setUTCHours(o),c.setUTCMinutes(r),c.setUTCSeconds(s),c.setUTCMilliseconds(0),new DayPilot.Date(c)},this.init()};DayPilot.ColorUtil={},DayPilot.ColorUtil.hexToRgb=function(e){if(!/^#[0-9a-f]{6}$/i.test(e))throw new DayPilot.Exception("Invalid color, only full hex color string accepted, eg. '#ffaaff'.");return e=e.replace("#",""),{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16)}},DayPilot.ColorUtil.rgbToHex=function(e){return"#"+i(e.r)+i(e.g)+i(e.b)},DayPilot.ColorUtil.adjustLuminance=function(e,t){return{r:e.r+t,g:e.g+t,b:e.b+t}},DayPilot.ColorUtil.darker=function(e,t){var i="";9===e.length&&(i=e.slice(7,9),e=e.slice(0,7));var a=DayPilot.ColorUtil.hexToRgb(e);"number"!=typeof t&&(t=1);var n=17,o=Math.round(t*n),r=DayPilot.ColorUtil.adjustLuminance(a,-o);return DayPilot.ColorUtil.rgbToHex(r)+i},DayPilot.ColorUtil.lighter=function(e,t){return"number"!=typeof t&&(t=1),DayPilot.ColorUtil.darker(e,-t)},DayPilot.ColorUtil.pl=function(e){var t=DayPilot.ColorUtil.hexToRgb(e),i=t.r/255,a=t.g/255,n=t.b/255;return Math.sqrt(.299*i*i+.587*a*a+.114*n*n)},DayPilot.ColorUtil.contrasting=function(e,t,i){var a=DayPilot.ColorUtil.pl(e);return t=t||"#ffffff",i=i||"#000000",a>.5?i:t},DayPilot.Event=function(e,t,i){var a=this;this.calendar=t,this.data=e?e:{},this.part=i?i:{},"undefined"==typeof this.data.id&&(this.data.id=this.data.value);var n={},o=["id","text","start","end","resource"];this.isEvent=!0,this.temp=function(){if(n.dirty)return n;for(var e=0;e<o.length;e++)n[o[e]]=a.data[o[e]];return n.dirty=!0,n},this.copy=function(){for(var e={},t=0;t<o.length;t++)e[o[t]]=a.data[o[t]];return e},this.commit=function(){if(n.dirty){for(var e=0;e<o.length;e++)a.data[o[e]]=n[o[e]];n.dirty=!1}},this.dirty=function(){return n.dirty},this.id=function(e){return"undefined"==typeof e?a.data.id:void(this.temp().id=e)},this.value=function(e){return"undefined"==typeof e?a.id():void a.id(e)},this.text=function(e){return"undefined"==typeof e?a.data.text:(this.temp().text=e,void this.client.innerHTML(e))},this.start=function(e){return"undefined"==typeof e?new DayPilot.Date(a.data.start):void(this.temp().start=new DayPilot.Date(e))},this.end=function(e){return"undefined"==typeof e?new DayPilot.Date(a.data.end):void(this.temp().end=new DayPilot.Date(e))},this.resource=function(e){return"undefined"==typeof e?a.data.resource:void(this.temp().resource=e)},this.partStart=function(){return new DayPilot.Date(this.part.start)},this.partEnd=function(){return new DayPilot.Date(this.part.end)},this.tag=function(e){var t=a.data.tag;if(!t)return null;if("undefined"==typeof e)return a.data.tag;for(var i=a.calendar.tagFields,n=-1,o=0;o<i.length;o++)e===i[o]&&(n=o);if(n===-1)throw"Field name not found.";return t[n]},this.client={},this.client.innerHTML=function(e){if("undefined"==typeof e){var t=a.cache||a.data,i=a.calendar&&a.calendar.internal&&a.calendar.internal.xssTextHtml;return i?i(t.text,t.html):DayPilot.Util.escapeTextHtml(t.text,t.html)}a.data.html=e},this.client.html=this.client.innerHTML,this.client.header=function(e){return"undefined"==typeof e?a.data.header:void(a.data.header=e)},this.client.cssClass=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.cssClass?a.cache.cssClass:a.data.cssClass:void(a.data.cssClass=e)},this.client.toolTip=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.toolTip?a.cache.toolTip:"undefined"!=typeof a.data.toolTip?a.data.toolTip:a.data.text:void(a.data.toolTip=e)},this.client.barVisible=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.barHidden?!a.cache.barHidden:a.calendar.durationBarVisible&&!a.data.barHidden:void(a.data.barHidden=!e)},this.client.backColor=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.backColor?a.cache.backColor:"undefined"!=typeof a.data.backColor?a.data.backColor:a.calendar.eventBackColor:void(a.data.backColor=e)},this.client.borderColor=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.borderColor?a.cache.borderColor:"undefined"!=typeof a.data.borderColor?a.data.borderColor:a.calendar.eventBorderColor:void(a.data.borderColor=e)},this.client.contextMenu=function(e){if("undefined"==typeof e){if(a.oContextMenu)return a.oContextMenu;a.cache?a.cache.contextMenu:a.data.contextMenu}else a.oContextMenu=e},this.client.moveEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.moveDisabled?!a.cache.moveDisabled:"Disabled"!==a.calendar.eventMoveHandling&&!a.data.moveDisabled:void(a.data.moveDisabled=!e)},this.client.resizeEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.resizeDisabled?!a.cache.resizeDisabled:"Disabled"!==a.calendar.eventResizeHandling&&!a.data.resizeDisabled:void(a.data.resizeDisabled=!e)},this.client.clickEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.clickDisabled?!a.cache.clickDisabled:"Disabled"!==a.calendar.eventClickHandling&&!a.data.clickDisabled:void(a.data.clickDisabled=!e)},this.client.rightClickEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.rightClickDisabled?!a.cache.rightClickDisabled:"Disabled"!==a.calendar.eventRightClickHandling&&!a.data.rightClickDisabled:void(a.data.rightClickDisabled=!e)},this.client.deleteEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.deleteDisabled?!a.cache.deleteDisabled:"Disabled"!==a.calendar.eventDeleteHandling&&!a.data.deleteDisabled:void(a.data.deleteDisabled=!e)},this.toJSON=function(e){var t={};if(t.value=this.id(),t.id=this.id(),t.text=this.text(),t.start=this.start(),t.end=this.end(),t.tag={},a.calendar&&a.calendar.tagFields)for(var i=a.calendar.tagFields,n=0;n<i.length;n++)t.tag[i[n]]=this.tag(i[n]);return t}}}}(),DayPilot.JSON={},function(){function e(e){return e<10?"0"+e:e}function t(e){return r.lastIndex=0,r.test(e)?'"'+e.replace(r,function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function i(e,r){var s,l,d,c,u,h=a,f=r[e];switch(f&&"object"==typeof f&&"function"==typeof f.toJSON2?f=f.toJSON2(e):f&&"object"==typeof f&&"function"==typeof f.toJSON&&!f.ignoreToJSON&&(f=f.toJSON(e)),"function"==typeof o&&(f=o.call(r,e,f)),typeof f){case"string":return t(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(a+=n,u=[],"number"==typeof f.length&&!f.propertyIsEnumerable("length")){for(c=f.length,s=0;s<c;s+=1)u[s]=i(s,f)||"null";return d=0===u.length?"[]":a?"[\n"+a+u.join(",\n"+a)+"\n"+h+"]":"["+u.join(",")+"]",a=h,d}if(o&&"object"==typeof o)for(c=o.length,s=0;s<c;s+=1)l=o[s],"string"==typeof l&&(d=i(l,f),d&&u.push(t(l)+(a?": ":":")+d));else for(l in f)Object.hasOwnProperty.call(f,l)&&(d=i(l,f),d&&u.push(t(l)+(a?": ":":")+d));return d=0===u.length?"{}":a?"{\n"+a+u.join(",\n"+a)+"\n"+h+"}":"{"+u.join(",")+"}",a=h,d}}"function"!=typeof Date.prototype.toJSON2&&(Date.prototype.toJSON2=function(t){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var a,n,o,r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};"function"!=typeof DayPilot.JSON.stringify&&(DayPilot.JSON.stringify=function(e,t,r){var s;if(a="",n="","number"==typeof r)for(s=0;s<r;s+=1)n+=" ";else"string"==typeof r&&(n=r);if(o=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return i("",{"":e})})}(),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){var e=function(){};if("undefined"==typeof DayPilot.Calendar||!DayPilot.Calendar.events){var t={};t.selectedCells=[],t.topSelectedCell=null,t.bottomSelectedCell=null,t.selecting=!1,t.column=null,t.firstSelected=null,t.firstMousePos=null,t.originalMouse=null,t.originalHeight=null,t.originalTop=null,t.resizing=null,t.globalHandlers=!1,t.moving=null,t.register=function(e){t.registered||(t.registered=[]);for(var i=t.registered,a=0;a<i.length;a++)if(i[a]===e)return;i.push(e)},t.unregister=function(e){var i=t.registered;if(i){var a=DayPilot.indexOf(i,e);a!==-1&&i.splice(a,1)}},t.getCellsAbove=function(e){for(var i=[],a=t.getColumn(e),n=e.parentNode,o=null;n&&o!==t.firstSelected;)for(o=n.getElementsByTagName("td")[a],i.push(o),n=n.previousSibling;n&&"TR"!==n.tagName;)n=n.previousSibling;return i},t.getCellsBelow=function(e){for(var i=[],a=t.getColumn(e),n=e.parentNode,o=null;n&&o!==t.firstSelected;)for(o=n.getElementsByTagName("td")[a],i.push(o),n=n.nextSibling;n&&"TR"!==n.tagName;)n=n.nextSibling;return i},t.getColumn=function(e){for(var t=0;e.previousSibling;)e=e.previousSibling,"TD"===e.tagName&&t++;return t},t.gUnload=function(e){if(t.registered)for(var i=t.registered,a=0;a<i.length;a++){var n=i[a];n.dispose(),t.unregister(n)}},t.gMouseUp=function(i){if(t.resizing){if(!t.resizingShadow)return t.resizing.style.cursor="default",document.body.style.cursor="default",t.resizing=null,void(DayPilot.Global.resizing=null);var a=t.resizing.event,n=t.resizingShadow.clientHeight+4,o=t.resizingShadow.offsetTop,r=t.resizing.dpBorder;t.deleteShadow(t.resizingShadow),t.resizingShadow=null,t.resizing.style.cursor="default",a.calendar.nav.top.style.cursor="auto",t.resizing.onclick=null,t.resizing=null,DayPilot.Global.resizing=null,a.calendar.J(a,n,o,r)}else if(t.moving){if(!t.movingShadow)return t.moving=null,DayPilot.Global.moving=null,void(document.body.style.cursor="default");var o=t.movingShadow.offsetTop,a=t.moving.event;t.deleteShadow(t.movingShadow),DayPilot.Util.removeClass(t.moving,a.calendar.K("_event_moving_source"));var s=t.movingShadow.column;t.moving=null,DayPilot.Global.moving=null,t.movingShadow=null,a.calendar.nav.top.style.cursor="auto",a.calendar.L(a,s,o,i)}else if(t.selecting&&null!==t.topSelectedCell){var l=t.selecting.calendar;t.selecting=!1;var d=l.getSelection();l.M(d.start,d.end,d.resource),"Hold"!==l.timeRangeSelectedHandling&&"HoldForever"!==l.timeRangeSelectedHandling&&e()}else t.selecting=!1},t.deleteShadow=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},t.moveShadow=function(e){var i=t.movingShadow,a=i.parentNode;a.style.display="none",i.parentNode.removeChild(i),e.firstChild.appendChild(i),i.style.left="0px",a.style.display="",i.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"};var i=DayPilot.Util.isVueVNode,a=DayPilot.Util.overlaps;t.Calendar=function(e,n){var o=!1;if(this instanceof t.Calendar&&!this.N&&(o=!0,this.N=!0),!o)throw"DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";var r=this;this.uniqueID=null,this.isCalendar=!0,this.v="2024.4.609-lite",this.id=e,this.clientName=e,this.cache={},this.cache.pixels={},this.elements={},this.elements.events=[],this.elements.selection=[],this.nav={},this.afterRender=function(){},this.fasterDispose=!0,this.angularAutoApply=!1,this.api=2,this.businessBeginsHour=9,this.businessEndsHour=18,this.cellHeight=30,this.columnMarginLeft=0,this.columnMarginRight=5,this.columnsLoadMethod="GET",this.contextMenu=null,this.days=1,this.durationBarVisible=!0,this.eventBorderRadius=null,this.eventsLoadMethod="GET",this.headerDateFormat=null,this.headerHeight=30,this.headerTextWrappingEnabled=!1,this.height=300,this.heightSpec="BusinessHours",this.hideUntilInit=!0,this.hourWidth=60,this.initScrollPos="Auto",this.loadingLabelHtml=null,this.loadingLabelText="Loading...",this.loadingLabelVisible=!0,this.locale="en-us",this.showToolTip=!0,this.startDate=(new DayPilot.Date).getDatePart(),this.cssClassPrefix="calendar_default",this.theme=null,this.timeFormat="Auto",this.viewType="Days",this.visible=!0,this.xssProtection="Enabled",this.headerClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.eventMoveHandling="Update",this.eventDeleteHandling="Disabled",this.timeRangeSelectedHandling="Enabled",this.onBeforeCellRender=null,this.onBeforeEventRender=null,this.onBeforeHeaderRender=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onHeaderClick=null,this.onHeaderClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.O=!1,this.clearSelection=function(){t.topSelectedCell=null,t.bottomSelectedCell=null,this.P()},this.P=function(){DayPilot.de(r.elements.selection),r.elements.selection=[],r.nav.activeSelection=null},this.cleanSelection=this.clearSelection,this.Q=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.R();var n="JSON"+DayPilot.JSON.stringify(a);__doPostBack(r.uniqueID,n)},this.S=function(e,t,i){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.callbackTimeout=window.setTimeout(function(){r.loadingStart()},100);var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.R();var n="JSON"+DayPilot.JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.T,n,this.ajaxError):"function"==typeof WebForm_DoCallback&&WebForm_DoCallback(this.uniqueID,n,this.U,this.clientName,this.onCallbackError,!0)},this.onCallbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.dispose=function(){var e=r;e.O||(e.O=!0,clearInterval(e.V),e.W(),e.nav.scroll.root=null,DayPilot.pu(e.nav.loading),e.X(),e.Y(),e.nav.select=null,e.nav.cornerRight=null,e.nav.scrollable=null,e.nav.zoom=null,e.nav.loading=null,e.nav.header=null,e.nav.hourTable=null,e.nav.scrolltop=null,e.nav.scroll.onscroll=null,e.nav.scroll=null,e.nav.main=null,e.nav.message=null,e.nav.messageClose=null,e.nav.top=null,t.unregister(e))},this.disposed=function(){return this.O},this.Z=function(){this.nav.top.dispose=this.dispose},this.T=function(e){r.U(e.responseText)},this.R=function(){var e={};return e.control="dpc",e.id=this.id,e.v=this.v,e.days=r.days,e.startDate=r.startDate,e.heightSpec=r.heightSpec,e.businessBeginsHour=r.businessBeginsHour,e.businessEndsHour=r.businessEndsHour,e.hashes=r.hashes,e.timeFormat=r.timeFormat,e.viewType=r.viewType,e.locale=r.locale,e},this._=function(e,t){for(var i=e.parentNode;i&&"TD"!==i.tagName;)i=i.parentNode;var a=r.eventBorderRadius;"number"==typeof a&&(a+="px");var n=document.createElement("div");n.setAttribute("unselectable","on"),n.style.position="absolute",n.style.width=e.offsetWidth+"px",
|
|
10
|
+
a=r.start,n=r.end,o=r.day}i.l=o,t(a,n,o)}},this.show=function(e){var a,n;if(e.B)n=e,a=n.D;else if(a=e.n?e:this.A(e),this.k===a)return;if(i.onSelect){var o={};o.source=n?n.C:null,o.target=a.control,i.onSelect(o)}if(i.syncScrollbar){var r=this.k&&this.k.control;r&&r.isCalendar&&(i.m=r.getScrollY())}this.k=a,a.t(),null!==i.m&&a.control.isCalendar&&a.control.setScrollY(i.m);var s=a.z();i.j.updateMode(s),t(i.j.control.selectionStart,i.j.control.selectionEnd.addDays(1),i.j.control.selectionDay)},this.A=function(e){for(var t=0;t<this.f.length;t++)if(this.f[t].control===e)return this.f[t];return null},this.u=function(){for(var e=0;e<this.f.length;e++)this.f[e].q()},Object.defineProperty(this,"active",{get:function(){return i.k}}),this.events={},this.events.load=function(e,t,a){if(!i.k||!i.k.control)throw"DayPilot.Switcher.events.load(): Active view not found";i.k.control.events.load(e,t,a)},this.H=null,this.I=function(){if(e)for(var t in e)if("triggers"===t){var a=e.triggers||[];a.forEach(function(e){i.addTrigger(e.id,e.view)})}else"navigator"===t?i.addNavigator(e.navigator):i[t]=e[t]},this.I()},DayPilot.Duration=function(e){var t=this,i=864e5,a=36e5,n=6e4,o=1e3;if(2===arguments.length){var r=arguments[0],s=arguments[1];if(!(r instanceof DayPilot.Date)&&"string"!=typeof r)throw"DayPilot.Duration(): Invalid start argument, DayPilot.Date expected";if(!(s instanceof DayPilot.Date)&&"string"!=typeof s)throw"DayPilot.Duration(): Invalid end argument, DayPilot.Date expected";"string"==typeof r&&(r=new DayPilot.Date(r)),"string"==typeof s&&(s=new DayPilot.Date(s)),e=s.getTime()-r.getTime()}return this.ticks=e,DayPilot.Date.Cache.DurationCtor[""+e]?DayPilot.Date.Cache.DurationCtor[""+e]:(DayPilot.Date.Cache.DurationCtor[""+e]=this,this.toString=function(e){if(!e)return t.days()+"."+t.hours()+":"+t.minutes()+":"+t.seconds()+"."+t.milliseconds();var i=t.minutes();i=(i<10?"0":"")+i;var a=e;return a=a.replace("mm",i),a=a.replace("m",t.minutes()),a=a.replace("H",t.hours()),a=a.replace("h",t.hours()),a=a.replace("d",t.days()),a=a.replace("s",t.seconds())},this.totalHours=function(){return t.ticks/a},this.totalDays=function(){return t.ticks/i},this.totalMinutes=function(){return t.ticks/n},this.totalSeconds=function(){return t.ticks/o},this.days=function(){return Math.floor(t.totalDays())},this.hours=function(){var e=t.ticks-t.days()*i;return Math.floor(e/a)},this.minutes=function(){var e=t.ticks-Math.floor(t.totalHours())*a;return Math.floor(e/n)},this.seconds=function(){var e=t.ticks-Math.floor(t.totalMinutes())*n;return Math.floor(e/o)},void(this.milliseconds=function(){return t.ticks%o}))},DayPilot.Duration.weeks=function(e){return new DayPilot.Duration(1e3*e*60*60*24*7)},DayPilot.Duration.days=function(e){return new DayPilot.Duration(1e3*e*60*60*24)},DayPilot.Duration.hours=function(e){return new DayPilot.Duration(1e3*e*60*60)},DayPilot.Duration.minutes=function(e){return new DayPilot.Duration(1e3*e*60)},DayPilot.Duration.seconds=function(e){return new DayPilot.Duration(1e3*e)},DayPilot.TimeSpan=function(){throw"Please use DayPilot.Duration class instead of DayPilot.TimeSpan."};try{DayPilot.TimeSpan.prototype=Object.create(DayPilot.Duration.prototype)}catch(e){}DayPilot.Date=function(t,i){if(t instanceof DayPilot.Date)return t;var a;DayPilot.Util.isNullOrUndefined(t)&&(a=DayPilot.DateUtil.fromLocal().getTime(),t=a);var n=DayPilot.Date.Cache.Ctor;if(n[t])return DayPilot.Stats.cacheHitsCtor+=1,n[t];var o=!1;if("string"==typeof t)a=DayPilot.DateUtil.fromStringSortable(t,i).getTime(),o=!0;else if("number"==typeof t){if(isNaN(t))throw"Cannot create DayPilot.Date from NaN";a=t}else{if(!(t instanceof Date))throw"Unrecognized parameter: use Date, number or string in ISO 8601 format";a=i?DayPilot.DateUtil.fromLocal(t).getTime():t.getTime()}var r=e(a);return n[r]?n[r]:(n[r]=this,n[a]=this,o&&r!==t&&DayPilot.DateUtil.hasTzSpec(t)&&(n[t]=this),Object.defineProperty?(Object.defineProperty(this,"ticks",{get:function(){return a}}),Object.defineProperty(this,"value",{"value":r,"writable":!1,"enumerable":!0})):(this.ticks=a,this.value=r),DayPilot.Date.Config.legacyShowD&&(this.d=new Date(a)),void(DayPilot.Stats.dateObjects+=1))},DayPilot.Date.Config={},DayPilot.Date.Config.legacyShowD=!1,DayPilot.Date.Cache={},DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={},DayPilot.Date.Cache.clear=function(){DayPilot.Date.Cache.Parsing={},DayPilot.Date.Cache.Ctor={},DayPilot.Date.Cache.Ticks={},DayPilot.Date.Cache.DurationCtor={}},DayPilot.Date.prototype.addDays=function(e){return e?new DayPilot.Date(this.ticks+24*e*60*60*1e3):this},DayPilot.Date.prototype.addHours=function(e){return e?this.addTime(60*e*60*1e3):this},DayPilot.Date.prototype.addMilliseconds=function(e){return e?this.addTime(e):this},DayPilot.Date.prototype.addMinutes=function(e){return e?this.addTime(60*e*1e3):this},DayPilot.Date.prototype.addMonths=function(e){if(!e)return this;var t=new Date(this.ticks),i=t.getUTCFullYear(),a=t.getUTCMonth()+1;if(e>0){for(;e>=12;)e-=12,i++;e>12-a?(i++,a=e-(12-a)):a+=e}else{for(;e<=-12;)e+=12,i--;a+e<=0?(i--,a=12+a+e):a+=e}var n=new Date(t.getTime());n.setUTCDate(1),n.setUTCFullYear(i),n.setUTCMonth(a-1);var o=new DayPilot.Date(n).daysInMonth();return n.setUTCDate(Math.min(o,t.getUTCDate())),new DayPilot.Date(n)},DayPilot.Date.prototype.addSeconds=function(e){return e?this.addTime(1e3*e):this},DayPilot.Date.prototype.addTime=function(e){return e?(e instanceof DayPilot.Duration&&(e=e.ticks),new DayPilot.Date(this.ticks+e)):this},DayPilot.Date.prototype.addYears=function(e){var t=new Date(this.ticks),i=new Date(this.ticks),a=this.getYear()+e,n=this.getMonth();i.setUTCDate(1),i.setUTCFullYear(a),i.setUTCMonth(n);var o=new DayPilot.Date(i).daysInMonth();return i.setUTCDate(Math.min(o,t.getUTCDate())),new DayPilot.Date(i)},DayPilot.Date.prototype.dayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfWeek=function(){return new Date(this.ticks).getUTCDay()},DayPilot.Date.prototype.getDayOfYear=function(){var e=this.firstDayOfYear();return DayPilot.DateUtil.daysDiff(e,this)+1},DayPilot.Date.prototype.daysInMonth=function(){var e=new Date(this.ticks),t=e.getUTCMonth()+1,i=e.getUTCFullYear(),a=[31,28,31,30,31,30,31,31,30,31,30,31];return 2!==t?a[t-1]:i%4!==0?a[1]:i%100===0&&i%400!==0?a[1]:a[1]+1},DayPilot.Date.prototype.daysInYear=function(){var e=this.getYear();return e%4!==0?365:e%100===0&&e%400!==0?365:366},DayPilot.Date.prototype.dayOfYear=function(){return Math.ceil((this.getDatePart().getTime()-this.firstDayOfYear().getTime())/864e5)+1},DayPilot.Date.prototype.equals=function(e){if(null===e)return!1;if(e instanceof DayPilot.Date)return this===e;throw"The parameter must be a DayPilot.Date object (DayPilot.Date.equals())"},DayPilot.Date.prototype.firstDayOfMonth=function(){var e=new Date;return e.setUTCFullYear(this.getYear(),this.getMonth(),1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.firstDayOfYear=function(){var e=this.getYear(),t=new Date;return t.setUTCFullYear(e,0,1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),new DayPilot.Date(t)},DayPilot.Date.prototype.firstDayOfWeek=function(e){var t=this;if(e instanceof DayPilot.Locale)e=e.weekStarts;else if("string"==typeof e&&DayPilot.Locale.find(e)){var i=DayPilot.Locale.find(e);e=i.weekStarts}else e=e||0;for(var a=t.dayOfWeek();a!==e;)t=t.addDays(-1),a=t.dayOfWeek();return new DayPilot.Date(t)},DayPilot.Date.prototype.getDay=function(){return new Date(this.ticks).getUTCDate()},DayPilot.Date.prototype.getDatePart=function(){var e=new Date(this.ticks);return e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new DayPilot.Date(e)},DayPilot.Date.prototype.getYear=function(){return new Date(this.ticks).getUTCFullYear()},DayPilot.Date.prototype.getHours=function(){return new Date(this.ticks).getUTCHours()},DayPilot.Date.prototype.getMilliseconds=function(){return new Date(this.ticks).getUTCMilliseconds()},DayPilot.Date.prototype.getMinutes=function(){return new Date(this.ticks).getUTCMinutes()},DayPilot.Date.prototype.getMonth=function(){return new Date(this.ticks).getUTCMonth()},DayPilot.Date.prototype.getSeconds=function(){return new Date(this.ticks).getUTCSeconds()},DayPilot.Date.prototype.getTotalTicks=function(){return this.getTime()},DayPilot.Date.prototype.getTime=function(){return this.ticks},DayPilot.Date.prototype.getTimePart=function(){var e=this.getDatePart();return DayPilot.DateUtil.diff(this,e)},DayPilot.Date.prototype.lastDayOfMonth=function(){var e=new Date(this.firstDayOfMonth().getTime()),t=this.daysInMonth();return e.setUTCDate(t),new DayPilot.Date(e)},DayPilot.Date.prototype.weekNumber=function(){var e=this.firstDayOfYear(),t=(this.getTime()-e.getTime())/864e5;return Math.ceil((t+e.dayOfWeek()+1)/7)},DayPilot.Date.prototype.weekNumberISO=function(){var e=!1,t=this.dayOfYear(),i=this.firstDayOfYear().dayOfWeek(),a=this.firstDayOfYear().addYears(1).addDays(-1).dayOfWeek();0===i&&(i=7),0===a&&(a=7);var n=8-i;4!==i&&4!==a||(e=!0);var o=Math.ceil((t-n)/7),r=o;return n>=4&&(r+=1),r>52&&!e&&(r=1),0===r&&(r=this.firstDayOfYear().addDays(-1).weekNumberISO()),r},DayPilot.Date.prototype.toDateLocal=function(){var e=new Date(this.ticks),t=new Date;return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours()),t.setMinutes(e.getUTCMinutes()),t.setSeconds(e.getUTCSeconds()),t.setMilliseconds(e.getUTCMilliseconds()),t},DayPilot.Date.prototype.toDate=function(){return new Date(this.ticks)},DayPilot.Date.prototype.toJSON=function(){return this.value},DayPilot.Date.prototype.toString=function(e,t){return e?new n(e,t).print(this):this.toStringSortable()},DayPilot.Date.prototype.toStringSortable=function(){return e(this.ticks)},DayPilot.Date.parse=function(e,t,i){return new n(t,i).parse(e)};DayPilot.Date.today=function(){return new DayPilot.Date(DayPilot.DateUtil.localToday(),!0)},DayPilot.Date.now=function(){return new DayPilot.Date},DayPilot.Date.fromYearMonthDay=function(e,t,i){t=t||1,i=i||1;var a=new Date(0);return a.setUTCFullYear(e),a.setUTCMonth(t-1),a.setUTCDate(i),new DayPilot.Date(a)},DayPilot.DateUtil={},DayPilot.DateUtil.fromStringSortable=function(e,t){if(!e)throw"Can't create DayPilot.Date from an empty string";var i=e.length,a=10===i,n=19===i,o=i>19;if(!a&&!n&&!o)throw"Invalid string format (use '2010-01-01' or '2010-01-01T00:00:00'): "+e;if(DayPilot.Date.Cache.Parsing[e]&&!t)return DayPilot.Stats.cacheHitsParsing+=1,DayPilot.Date.Cache.Parsing[e];var r=e.substring(0,4),s=e.substring(5,7),l=e.substring(8,10),d=new Date(0);if(d.setUTCFullYear(r,s-1,l),a)return DayPilot.Date.Cache.Parsing[e]=d,d;var c=e.substring(11,13),u=e.substring(14,16),h=e.substring(17,19);if(d.setUTCHours(c),d.setUTCMinutes(u),d.setUTCSeconds(h),n)return DayPilot.Date.Cache.Parsing[e]=d,d;var f=e[19],m=0;if("."===f){var p=parseInt(e.substring(20,23));d.setUTCMilliseconds(p),m=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(23))}else m=DayPilot.DateUtil.getTzOffsetMinutes(e.substring(19));var v=new DayPilot.Date(d);return t||(v=v.addMinutes(-m)),d=v.toDate(),DayPilot.Date.Cache.Parsing[e]=d,d},DayPilot.DateUtil.getTzOffsetMinutes=function(e){if(DayPilot.Util.isNullOrUndefined(e)||""===e)return 0;if("Z"===e)return 0;var t=e[0],i=parseInt(e.substring(1,3)),a=parseInt(e.substring(4)),n=60*i+a;if("-"===t)return-n;if("+"===t)return n;throw"Invalid timezone spec: "+e},DayPilot.DateUtil.hasTzSpec=function(e){return!!e.indexOf("+")||!!e.indexOf("-")},DayPilot.DateUtil.daysDiff=function(e,t){if(e&&t||function(){throw"two parameters required"}(),e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()>t.getTime())return null;for(var i=0,a=e.getDatePart(),n=t.getDatePart();a<n;)a=a.addDays(1),i++;return i},DayPilot.DateUtil.daysSpan=function(e,t){if(e&&t||function(){throw"two parameters required"}(),e=new DayPilot.Date(e),t=new DayPilot.Date(t),e.getTime()===t.getTime())return 0;var i=DayPilot.DateUtil.daysDiff(e,t);return t.getTime()==t.getDatePart().getTime()&&i--,i},DayPilot.DateUtil.diff=function(e,t){if(!(e&&t&&e.getTime&&t.getTime))throw"Both compared objects must be Date objects (DayPilot.Date.diff).";return e.getTime()-t.getTime()},DayPilot.DateUtil.fromLocal=function(e){e||(e=new Date);var t=new Date;return t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours()),t.setUTCMinutes(e.getMinutes()),t.setUTCSeconds(e.getSeconds()),t.setUTCMilliseconds(e.getMilliseconds()),t},DayPilot.DateUtil.localToday=function(){var e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e},DayPilot.DateUtil.hours=function(e,t){var i=e.getUTCMinutes();i<10&&(i="0"+i);var a=e.getUTCHours();if(t){var n=a<12,a=a%12;0===a&&(a=12);return a+":"+i+" "+(n?"AM":"PM")}return a+":"+i},DayPilot.DateUtil.max=function(e,t){return e.getTime()>t.getTime()?e:t},DayPilot.DateUtil.min=function(e,t){return e.getTime()<t.getTime()?e:t};var n=function(e,i){"string"==typeof i&&(i=DayPilot.Locale.find(i));var i=i||DayPilot.Locale.US,a=[{"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}},{"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=t%12;0===t&&(t=12);var i=t;return i<10?"0"+i:i}},{"seq":"h","expr":"[0-9]{1,2}","str":function(e){var t=e.getHours(),t=t%12;return 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 i.monthNames[e.getMonth()]},"transform":function(e){var a=DayPilot.indexOf(i.monthNames,e,t);return a<0?null:a+1}},{"seq":"MMM","expr":"[^\\s0-9]*","str":function(e){return i.monthNamesShort[e.getMonth()]},"transform":function(e){var a=DayPilot.indexOf(i.monthNamesShort,e,t);return a<0?null:a+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 i.dayNames[e.getDayOfWeek()]}},{"seq":"ddd","expr":"[^\\s0-9]*","str":function(e){return i.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()}}],n=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};this.init=function(){this.year=this.findSequence("yyyy"),this.month=this.findSequence("MMMM")||this.findSequence("MMM")||this.findSequence("MM")||this.findSequence("M"),this.day=this.findSequence("dd")||this.findSequence("d"),this.hours=this.findSequence("HH")||this.findSequence("H"),this.minutes=this.findSequence("mm")||this.findSequence("m"),this.seconds=this.findSequence("ss")||this.findSequence("s"),this.ampm=this.findSequence("tt"),this.hours12=this.findSequence("hh")||this.findSequence("h")},this.findSequence=function(t){function i(e){return parseInt(e)}return e.indexOf(t)===-1?null:{"findValue":function(o){for(var r=n(e),s=null,l=0;l<a.length;l++){var d=(a[l].length,t===a[l].seq),c=a[l].expr;d&&(c="("+c+")",s=a[l].transform),r=r.replace(a[l].seq,c)}r="^"+r+"$";try{var u=new RegExp(r),h=u.exec(o);return h?(s=s||i)(h[1]):null}catch(e){throw"unable to create regex from: "+r}}}},this.print=function(t){for(var i=function(e){for(var t=0;t<a.length;t++)if(a[t]&&a[t].seq===e)return a[t];return null},n=e.length<=0,o=0,r=[];!n;){var s=e.substring(o),l=/%?(.)\1*/.exec(s);if(l&&l.length>0){var d=l[0],c=i(d);c?r.push(c):r.push(d),o+=d.length,n=e.length<=o}else n=!0}for(var u=0;u<r.length;u++){var h=r[u];"string"!=typeof h&&(r[u]=h.str(t))}return r.join("")},this.parse=function(e){var t=this.year.findValue(e);if(!t)return null;var i=this.month.findValue(e);if(DayPilot.Util.isNullOrUndefined(i))return null;if(i>12||i<1)return null;var a=this.day.findValue(e),n=DayPilot.Date.fromYearMonthDay(t,i).daysInMonth();if(a<1||a>n)return null;var o=this.hours?this.hours.findValue(e):0,r=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;o="PM"===l?12===d?12:d+12:12===d?0:d}if(o<0||o>23)return null;if(r<0||r>59)return null;if(s<0||s>59)return null;var c=new Date;return c.setUTCFullYear(t,i-1,a),c.setUTCHours(o),c.setUTCMinutes(r),c.setUTCSeconds(s),c.setUTCMilliseconds(0),new DayPilot.Date(c)},this.init()};DayPilot.ColorUtil={},DayPilot.ColorUtil.hexToRgb=function(e){if(!/^#[0-9a-f]{6}$/i.test(e))throw new DayPilot.Exception("Invalid color, only full hex color string accepted, eg. '#ffaaff'.");return e=e.replace("#",""),{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16)}},DayPilot.ColorUtil.rgbToHex=function(e){return"#"+i(e.r)+i(e.g)+i(e.b)},DayPilot.ColorUtil.adjustLuminance=function(e,t){return{r:e.r+t,g:e.g+t,b:e.b+t}},DayPilot.ColorUtil.darker=function(e,t){var i="";9===e.length&&(i=e.slice(7,9),e=e.slice(0,7));var a=DayPilot.ColorUtil.hexToRgb(e);"number"!=typeof t&&(t=1);var n=17,o=Math.round(t*n),r=DayPilot.ColorUtil.adjustLuminance(a,-o);return DayPilot.ColorUtil.rgbToHex(r)+i},DayPilot.ColorUtil.lighter=function(e,t){return"number"!=typeof t&&(t=1),DayPilot.ColorUtil.darker(e,-t)},DayPilot.ColorUtil.pl=function(e){var t=DayPilot.ColorUtil.hexToRgb(e),i=t.r/255,a=t.g/255,n=t.b/255;return Math.sqrt(.299*i*i+.587*a*a+.114*n*n)},DayPilot.ColorUtil.contrasting=function(e,t,i){var a=DayPilot.ColorUtil.pl(e);return t=t||"#ffffff",i=i||"#000000",a>.5?i:t},DayPilot.Event=function(e,t,i){var a=this;this.calendar=t,this.data=e?e:{},this.part=i?i:{},"undefined"==typeof this.data.id&&(this.data.id=this.data.value);var n={},o=["id","text","start","end","resource"];this.isEvent=!0,this.temp=function(){if(n.dirty)return n;for(var e=0;e<o.length;e++)n[o[e]]=a.data[o[e]];return n.dirty=!0,n},this.copy=function(){for(var e={},t=0;t<o.length;t++)e[o[t]]=a.data[o[t]];return e},this.commit=function(){if(n.dirty){for(var e=0;e<o.length;e++)a.data[o[e]]=n[o[e]];n.dirty=!1}},this.dirty=function(){return n.dirty},this.id=function(e){return"undefined"==typeof e?a.data.id:void(this.temp().id=e)},this.value=function(e){return"undefined"==typeof e?a.id():void a.id(e)},this.text=function(e){return"undefined"==typeof e?a.data.text:(this.temp().text=e,void this.client.innerHTML(e))},this.start=function(e){return"undefined"==typeof e?new DayPilot.Date(a.data.start):void(this.temp().start=new DayPilot.Date(e))},this.end=function(e){return"undefined"==typeof e?new DayPilot.Date(a.data.end):void(this.temp().end=new DayPilot.Date(e))},this.resource=function(e){return"undefined"==typeof e?a.data.resource:void(this.temp().resource=e)},this.partStart=function(){return new DayPilot.Date(this.part.start)},this.partEnd=function(){return new DayPilot.Date(this.part.end)},this.tag=function(e){var t=a.data.tag;if(!t)return null;if("undefined"==typeof e)return a.data.tag;for(var i=a.calendar.tagFields,n=-1,o=0;o<i.length;o++)e===i[o]&&(n=o);if(n===-1)throw"Field name not found.";return t[n]},this.client={},this.client.innerHTML=function(e){if("undefined"==typeof e){var t=a.cache||a.data,i=a.calendar&&a.calendar.internal&&a.calendar.internal.xssTextHtml;return i?i(t.text,t.html):DayPilot.Util.escapeTextHtml(t.text,t.html)}a.data.html=e},this.client.html=this.client.innerHTML,this.client.header=function(e){return"undefined"==typeof e?a.data.header:void(a.data.header=e)},this.client.cssClass=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.cssClass?a.cache.cssClass:a.data.cssClass:void(a.data.cssClass=e)},this.client.toolTip=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.toolTip?a.cache.toolTip:"undefined"!=typeof a.data.toolTip?a.data.toolTip:a.data.text:void(a.data.toolTip=e)},this.client.barVisible=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.barHidden?!a.cache.barHidden:a.calendar.durationBarVisible&&!a.data.barHidden:void(a.data.barHidden=!e)},this.client.backColor=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.backColor?a.cache.backColor:"undefined"!=typeof a.data.backColor?a.data.backColor:a.calendar.eventBackColor:void(a.data.backColor=e)},this.client.borderColor=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.borderColor?a.cache.borderColor:"undefined"!=typeof a.data.borderColor?a.data.borderColor:a.calendar.eventBorderColor:void(a.data.borderColor=e)},this.client.contextMenu=function(e){if("undefined"==typeof e){if(a.oContextMenu)return a.oContextMenu;a.cache?a.cache.contextMenu:a.data.contextMenu}else a.oContextMenu=e},this.client.moveEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.moveDisabled?!a.cache.moveDisabled:"Disabled"!==a.calendar.eventMoveHandling&&!a.data.moveDisabled:void(a.data.moveDisabled=!e)},this.client.resizeEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.resizeDisabled?!a.cache.resizeDisabled:"Disabled"!==a.calendar.eventResizeHandling&&!a.data.resizeDisabled:void(a.data.resizeDisabled=!e)},this.client.clickEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.clickDisabled?!a.cache.clickDisabled:"Disabled"!==a.calendar.eventClickHandling&&!a.data.clickDisabled:void(a.data.clickDisabled=!e)},this.client.rightClickEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.rightClickDisabled?!a.cache.rightClickDisabled:"Disabled"!==a.calendar.eventRightClickHandling&&!a.data.rightClickDisabled:void(a.data.rightClickDisabled=!e)},this.client.deleteEnabled=function(e){return"undefined"==typeof e?a.cache&&"undefined"!=typeof a.cache.deleteDisabled?!a.cache.deleteDisabled:"Disabled"!==a.calendar.eventDeleteHandling&&!a.data.deleteDisabled:void(a.data.deleteDisabled=!e)},this.toJSON=function(e){var t={};if(t.value=this.id(),t.id=this.id(),t.text=this.text(),t.start=this.start(),t.end=this.end(),t.tag={},a.calendar&&a.calendar.tagFields)for(var i=a.calendar.tagFields,n=0;n<i.length;n++)t.tag[i[n]]=this.tag(i[n]);return t}}}}(),DayPilot.JSON={},function(){function e(e){return e<10?"0"+e:e}function t(e){return r.lastIndex=0,r.test(e)?'"'+e.replace(r,function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function i(e,r){var s,l,d,c,u,h=a,f=r[e];switch(f&&"object"==typeof f&&"function"==typeof f.toJSON2?f=f.toJSON2(e):f&&"object"==typeof f&&"function"==typeof f.toJSON&&!f.ignoreToJSON&&(f=f.toJSON(e)),"function"==typeof o&&(f=o.call(r,e,f)),typeof f){case"string":return t(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(a+=n,u=[],"number"==typeof f.length&&!f.propertyIsEnumerable("length")){for(c=f.length,s=0;s<c;s+=1)u[s]=i(s,f)||"null";return d=0===u.length?"[]":a?"[\n"+a+u.join(",\n"+a)+"\n"+h+"]":"["+u.join(",")+"]",a=h,d}if(o&&"object"==typeof o)for(c=o.length,s=0;s<c;s+=1)l=o[s],"string"==typeof l&&(d=i(l,f),d&&u.push(t(l)+(a?": ":":")+d));else for(l in f)Object.hasOwnProperty.call(f,l)&&(d=i(l,f),d&&u.push(t(l)+(a?": ":":")+d));return d=0===u.length?"{}":a?"{\n"+a+u.join(",\n"+a)+"\n"+h+"}":"{"+u.join(",")+"}",a=h,d}}"function"!=typeof Date.prototype.toJSON2&&(Date.prototype.toJSON2=function(t){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var a,n,o,r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};"function"!=typeof DayPilot.JSON.stringify&&(DayPilot.JSON.stringify=function(e,t,r){var s;if(a="",n="","number"==typeof r)for(s=0;s<r;s+=1)n+=" ";else"string"==typeof r&&(n=r);if(o=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return i("",{"":e})})}(),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){var e=function(){};if("undefined"==typeof DayPilot.Calendar||!DayPilot.Calendar.events){var t={};t.selectedCells=[],t.topSelectedCell=null,t.bottomSelectedCell=null,t.selecting=!1,t.column=null,t.firstSelected=null,t.firstMousePos=null,t.originalMouse=null,t.originalHeight=null,t.originalTop=null,t.resizing=null,t.globalHandlers=!1,t.moving=null,t.register=function(e){t.registered||(t.registered=[]);for(var i=t.registered,a=0;a<i.length;a++)if(i[a]===e)return;i.push(e)},t.unregister=function(e){var i=t.registered;if(i){var a=DayPilot.indexOf(i,e);a!==-1&&i.splice(a,1)}},t.getCellsAbove=function(e){for(var i=[],a=t.getColumn(e),n=e.parentNode,o=null;n&&o!==t.firstSelected;)for(o=n.getElementsByTagName("td")[a],i.push(o),n=n.previousSibling;n&&"TR"!==n.tagName;)n=n.previousSibling;return i},t.getCellsBelow=function(e){for(var i=[],a=t.getColumn(e),n=e.parentNode,o=null;n&&o!==t.firstSelected;)for(o=n.getElementsByTagName("td")[a],i.push(o),n=n.nextSibling;n&&"TR"!==n.tagName;)n=n.nextSibling;return i},t.getColumn=function(e){for(var t=0;e.previousSibling;)e=e.previousSibling,"TD"===e.tagName&&t++;return t},t.gUnload=function(e){if(t.registered)for(var i=t.registered,a=0;a<i.length;a++){var n=i[a];n.dispose(),t.unregister(n)}},t.gMouseUp=function(i){if(t.resizing){if(!t.resizingShadow)return t.resizing.style.cursor="default",document.body.style.cursor="default",t.resizing=null,void(DayPilot.Global.resizing=null);var a=t.resizing.event,n=t.resizingShadow.clientHeight+4,o=t.resizingShadow.offsetTop,r=t.resizing.dpBorder;t.deleteShadow(t.resizingShadow),t.resizingShadow=null,t.resizing.style.cursor="default",a.calendar.nav.top.style.cursor="auto",t.resizing.onclick=null,t.resizing=null,DayPilot.Global.resizing=null,a.calendar.J(a,n,o,r)}else if(t.moving){if(!t.movingShadow)return t.moving=null,DayPilot.Global.moving=null,void(document.body.style.cursor="default");var o=t.movingShadow.offsetTop,a=t.moving.event;t.deleteShadow(t.movingShadow),DayPilot.Util.removeClass(t.moving,a.calendar.K("_event_moving_source"));var s=t.movingShadow.column;t.moving=null,DayPilot.Global.moving=null,t.movingShadow=null,a.calendar.nav.top.style.cursor="auto",a.calendar.L(a,s,o,i)}else if(t.selecting&&null!==t.topSelectedCell){var l=t.selecting.calendar;t.selecting=!1;var d=l.getSelection();l.M(d.start,d.end,d.resource),"Hold"!==l.timeRangeSelectedHandling&&"HoldForever"!==l.timeRangeSelectedHandling&&e()}else t.selecting=!1},t.deleteShadow=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},t.moveShadow=function(e){var i=t.movingShadow,a=i.parentNode;a.style.display="none",i.parentNode.removeChild(i),e.firstChild.appendChild(i),i.style.left="0px",a.style.display="",i.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"};var i=DayPilot.Util.isVueVNode,a=DayPilot.Util.overlaps;t.Calendar=function(e,n){var o=!1;if(this instanceof t.Calendar&&!this.N&&(o=!0,this.N=!0),!o)throw"DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";var r=this;this.uniqueID=null,this.isCalendar=!0,this.v="2024.4.622-lite",this.id=e,this.clientName=e,this.cache={},this.cache.pixels={},this.elements={},this.elements.events=[],this.elements.selection=[],this.nav={},this.afterRender=function(){},this.fasterDispose=!0,this.angularAutoApply=!1,this.api=2,this.businessBeginsHour=9,this.businessEndsHour=18,this.cellHeight=30,this.columnMarginLeft=0,this.columnMarginRight=5,this.columnsLoadMethod="GET",this.contextMenu=null,this.days=1,this.durationBarVisible=!0,this.eventBorderRadius=null,this.eventsLoadMethod="GET",this.headerDateFormat=null,this.headerHeight=30,this.headerTextWrappingEnabled=!1,this.height=300,this.heightSpec="BusinessHours",this.hideUntilInit=!0,this.hourWidth=60,this.initScrollPos="Auto",this.loadingLabelHtml=null,this.loadingLabelText="Loading...",this.loadingLabelVisible=!0,this.locale="en-us",this.showToolTip=!0,this.startDate=(new DayPilot.Date).getDatePart(),this.cssClassPrefix="calendar_default",this.theme=null,this.timeFormat="Auto",this.viewType="Days",this.visible=!0,this.xssProtection="Enabled",this.headerClickHandling="Enabled",this.eventClickHandling="Enabled",this.eventResizeHandling="Update",this.eventRightClickHandling="ContextMenu",this.eventMoveHandling="Update",this.eventDeleteHandling="Disabled",this.timeRangeSelectedHandling="Enabled",this.onBeforeCellRender=null,this.onBeforeEventRender=null,this.onBeforeHeaderRender=null,this.onEventClick=null,this.onEventClicked=null,this.onEventDelete=null,this.onEventDeleted=null,this.onEventMove=null,this.onEventMoved=null,this.onEventResize=null,this.onEventResized=null,this.onEventRightClick=null,this.onEventRightClicked=null,this.onHeaderClick=null,this.onHeaderClicked=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.O=!1,this.clearSelection=function(){t.topSelectedCell=null,t.bottomSelectedCell=null,this.P()},this.P=function(){DayPilot.de(r.elements.selection),r.elements.selection=[],r.nav.activeSelection=null},this.cleanSelection=this.clearSelection,this.Q=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.R();var n="JSON"+DayPilot.JSON.stringify(a);__doPostBack(r.uniqueID,n)},this.S=function(e,t,i){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.callbackTimeout=window.setTimeout(function(){r.loadingStart()},100);var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.R();var n="JSON"+DayPilot.JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.T,n,this.ajaxError):"function"==typeof WebForm_DoCallback&&WebForm_DoCallback(this.uniqueID,n,this.U,this.clientName,this.onCallbackError,!0)},this.onCallbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.dispose=function(){var e=r;e.O||(e.O=!0,clearInterval(e.V),e.W(),e.nav.scroll.root=null,DayPilot.pu(e.nav.loading),e.X(),e.Y(),e.nav.select=null,e.nav.cornerRight=null,e.nav.scrollable=null,e.nav.zoom=null,e.nav.loading=null,e.nav.header=null,e.nav.hourTable=null,e.nav.scrolltop=null,e.nav.scroll.onscroll=null,e.nav.scroll=null,e.nav.main=null,e.nav.message=null,e.nav.messageClose=null,e.nav.top=null,t.unregister(e))},this.disposed=function(){return this.O},this.Z=function(){this.nav.top.dispose=this.dispose},this.T=function(e){r.U(e.responseText)},this.R=function(){var e={};return e.control="dpc",e.id=this.id,e.v=this.v,e.days=r.days,e.startDate=r.startDate,e.heightSpec=r.heightSpec,e.businessBeginsHour=r.businessBeginsHour,e.businessEndsHour=r.businessEndsHour,e.hashes=r.hashes,e.timeFormat=r.timeFormat,e.viewType=r.viewType,e.locale=r.locale,e},this._=function(e,t){for(var i=e.parentNode;i&&"TD"!==i.tagName;)i=i.parentNode;var a=r.eventBorderRadius;"number"==typeof a&&(a+="px");var n=document.createElement("div");n.setAttribute("unselectable","on"),n.style.position="absolute",n.style.width=e.offsetWidth+"px",
|
|
11
11
|
n.style.height=e.offsetHeight+"px",n.style.left=e.offsetLeft+"px",n.style.top=e.offsetTop+"px",n.style.boxSizing="border-box",n.style.zIndex=101,n.className=r.K("_shadow");var o=document.createElement("div");return o.className=r.K("_shadow_inner"),a&&(o.style.borderRadius=a,n.style.borderRadius=a),n.appendChild(o),i.firstChild.appendChild(n),n},this.aa={},this.aa.locale=function(){var e=DayPilot.Locale.find(r.locale);return e?e:DayPilot.Locale.US},this.aa.timeFormat=function(){return"Auto"!==r.timeFormat?r.timeFormat:this.locale().timeFormat},this.aa.ba=function(){return"Disabled"!==r.xssProtection},this.aa.ca=function(){if("Auto"===r.weekStarts){var e=s.locale();return e?e.weekStarts:0}return r.weekStarts||0};var s=this.aa;this.U=function(e,t){if(e&&0===e.indexOf("$$$")){if(!window.console)throw"Error received from the server side: "+e;return void console.log("Error received from the server side: "+e)}var e=JSON.parse(e);if(e.CallBackRedirect)return void(document.location.href=e.CallBackRedirect);if("None"===e.UpdateType)return r.loadingStop(),void r.t();if(r.W(),"Full"===e.UpdateType&&(r.columns=e.Columns,r.days=e.Days,r.startDate=new DayPilot.Date(e.StartDate),r.heightSpec=e.HeightSpec?e.HeightSpec:r.heightSpec,r.businessBeginsHour=e.BusinessBeginsHour?e.BusinessBeginsHour:r.businessBeginsHour,r.businessEndsHour=e.BusinessEndsHour?e.BusinessEndsHour:r.businessEndsHour,r.headerDateFormat=e.HeaderDateFormat?e.HeaderDateFormat:r.headerDateFormat,r.viewType=e.ViewType,r.backColor=e.BackColor?e.BackColor:r.backColor,r.eventHeaderVisible=e.EventHeaderVisible?e.EventHeaderVisible:r.eventHeaderVisible,r.timeFormat=e.TimeFormat?e.TimeFormat:r.timeFormat,r.locale=e.Locale?e.Locale:r.locale,r.da()),e.Hashes)for(var i in e.Hashes)r.hashes[i]=e.Hashes[i];r.events.list=e.Events,r.ea(),r.fa(),"Full"===e.UpdateType&&(r.ga(),r.ha(),r.ia(),r.ja()),r.t(),r.ka(),r.clearSelection(),r.afterRender(e.CallBackData,!0),r.loadingStop()},this.la=function(){return this.ma()/36e5},this.na=function(){return this.businessBeginsHour>this.businessEndsHour?24-this.businessBeginsHour+this.businessEndsHour:this.businessEndsHour-this.businessBeginsHour},this.oa=function(){return this.ma()/18e5},this.ma=function(){var e=0;return e="BusinessHoursNoScroll"===this.heightSpec?this.na():24,60*e*60*1e3},this.pa=function(){return"BusinessHoursNoScroll"===this.heightSpec?this.businessBeginsHour:0},this.qa=function(){return 2===r.api},this.eventClickCallBack=function(e,t){this.S("EventClick",t,e)},this.eventClickPostBack=function(e,t){this.Q("EventClick",t,e)},this.ra=function(e){var t=this,i=t.event;if(i.client.clickEnabled())if(r.qa()){var a={};if(a.e=i,a.originalEvent=e,a.meta=e.metaKey,a.ctrl=e.ctrlKey,a.control=r,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof r.onEventClick&&(r.sa.apply(function(){r.onEventClick(a)}),a.preventDefault.value))return;switch(r.eventClickHandling){case"CallBack":r.eventClickCallBack(i);break;case"PostBack":r.eventClickPostBack(i);break;case"ContextMenu":var n=i.client.contextMenu();n?n.show(i):r.contextMenu&&r.contextMenu.show(i)}"function"==typeof r.onEventClicked&&r.sa.apply(function(){r.onEventClicked(a)})}else switch(r.eventClickHandling){case"PostBack":r.eventClickPostBack(i);break;case"CallBack":r.eventClickCallBack(i);break;case"JavaScript":r.onEventClick(i)}},this.ta=function(e){var t=this.event;if(e.stopPropagation&&e.stopPropagation(),!t.client.rightClickEnabled())return!1;var i={};if(i.e=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof r.onEventRightClick&&(r.onEventRightClick(i),i.preventDefault.value))return!1;switch(r.eventRightClickHandling){case"ContextMenu":var a=t.client.contextMenu();a?a.show(t):r.contextMenu&&r.contextMenu.show(this.event)}return"function"==typeof r.onEventRightClicked&&r.onEventRightClicked(i),e.preventDefault&&e.preventDefault(),!1},this.eventDeleteCallBack=function(e,t){this.S("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.Q("EventDelete",t,e)},this.ua=function(e){if(r.qa()){var t={};if(t.e=e,t.control=r,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof r.onEventDelete&&(r.sa.apply(function(){r.onEventDelete(t)}),t.preventDefault.value))return;switch(r.eventDeleteHandling){case"CallBack":r.eventDeleteCallBack(e);break;case"PostBack":r.eventDeletePostBack(e);break;case"Update":r.events.remove(e)}"function"==typeof r.onEventDeleted&&r.sa.apply(function(){r.onEventDeleted(t)})}else switch(r.eventDeleteHandling){case"PostBack":r.eventDeletePostBack(e);break;case"CallBack":r.eventDeleteCallBack(e);break;case"JavaScript":r.onEventDelete(e)}},this.eventResizeCallBack=function(e,t,i,a){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var n={};n.e=e,n.newStart=t,n.newEnd=i,this.S("EventResize",a,n)},this.eventResizePostBack=function(e,t,i,a){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var n={};n.e=e,n.newStart=t,n.newEnd=i,this.Q("EventResize",a,n)},this.J=function(e,t,i,a){var n=1,o=new Date,s=new Date,l=e.start(),d=e.end();if("top"===a){var c=l.getDatePart(),u=Math.floor((i-n)/r.cellHeight),h=30*u,f=60*h*1e3,m=60*r.pa()*60*1e3;o=c.addTime(f+m),s=e.end()}else if("bottom"===a){var c=d.getDatePart(),u=Math.floor((i+t-n)/r.cellHeight),h=30*u,f=60*h*1e3,m=60*r.pa()*60*1e3;o=l,s=c.addTime(f+m)}if(r.qa()){var p={};if(p.e=e,p.control=r,p.newStart=o,p.newEnd=s,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof r.onEventResize&&(r.sa.apply(function(){r.onEventResize(p)}),p.preventDefault.value))return;switch(r.eventResizeHandling){case"PostBack":r.eventResizePostBack(e,o,s);break;case"CallBack":r.eventResizeCallBack(e,o,s);break;case"Update":e.start(o),e.end(s),r.events.update(e)}"function"==typeof r.onEventResized&&r.sa.apply(function(){r.onEventResized(p)})}else switch(r.eventResizeHandling){case"PostBack":r.eventResizePostBack(e,o,s);break;case"CallBack":r.eventResizeCallBack(e,o,s);break;case"JavaScript":r.onEventResize(e,o,s)}},this.eventMovePostBack=function(e,t,i,a,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var o={};o.e=e,o.newStart=t,o.newEnd=i,this.Q("EventMove",n,o)},this.eventMoveCallBack=function(e,t,i,a,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var o={};o.e=e,o.newStart=t,o.newEnd=i,this.S("EventMove",n,o)},this.L=function(e,t,i,a){var n=1,o=Math.floor((i-n)/r.cellHeight),s=30*o*60*1e3,l=e.start(),d=e.end(),c=new Date;l instanceof DayPilot.Date&&(l=l.toDate()),c.setTime(Date.UTC(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()));var u=l.getTime()-(c.getTime()+3600*l.getUTCHours()*1e3+30*Math.floor(l.getUTCMinutes()/30)*60*1e3),h=d.getTime()-l.getTime(),f=this.va[t],m=f.id,p=f.start.getTime(),v=new Date;v.setTime(p+s+u);var y=new DayPilot.Date(v),g=y.addTime(h);if(r.qa()){var b={};if(b.e=e,b.newStart=y,b.newEnd=g,b.newResource=m,b.ctrl=a.ctrlKey,b.shift=a.shiftKey,b.control=r,b.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof r.onEventMove&&(r.sa.apply(function(){r.onEventMove(b)}),b.preventDefault.value))return;switch(r.eventMoveHandling){case"PostBack":r.eventMovePostBack(e,y,g,f.id);break;case"CallBack":r.eventMoveCallBack(e,y,g,f.id);break;case"Update":e.start(y),e.end(g),e.resource(m),r.events.update(e)}"function"==typeof r.onEventMoved&&r.sa.apply(function(){r.onEventMoved(b)})}else switch(r.eventMoveHandling){case"PostBack":r.eventMovePostBack(e,y,g,f.id);break;case"CallBack":r.eventMoveCallBack(e,y,g,f.id);break;case"JavaScript":r.onEventMove(e,y,g,f.id,!1)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,this.Q("TimeRangeSelected",a,n)},this.timeRangeSelectedCallBack=function(e,t,i,a){var n={};n.start=e,n.end=t,this.S("TimeRangeSelected",a,n)},this.M=function(e,t,i){if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),this.qa()){var a={};if(a.start=e,a.end=t,a.resource=i,a.control=r,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof r.onTimeRangeSelect&&(r.sa.apply(function(){r.onTimeRangeSelect(a)}),a.preventDefault.value))return;switch(r.timeRangeSelectedHandling){case"PostBack":r.timeRangeSelectedPostBack(e,t);break;case"CallBack":r.timeRangeSelectedCallBack(e,t)}"function"==typeof r.onTimeRangeSelected&&r.sa.apply(function(){r.onTimeRangeSelected(a)})}else switch(r.timeRangeSelectedHandling){case"PostBack":r.timeRangeSelectedPostBack(e,t);break;case"CallBack":r.timeRangeSelectedCallBack(e,t);break;case"JavaScript":r.onTimeRangeSelected(e,t)}},this.wa=function(e){if(!t.selecting&&"Disabled"!==r.timeRangeSelectedHandling){var i=e.which;if(1===i||0===i)return t.firstMousePos=DayPilot.mc(e),t.selecting={},t.selecting.calendar=r,t.selectedCells&&(r.clearSelection(),t.selectedCells=[]),t.column=t.getColumn(this),t.selectedCells.push(this),t.firstSelected=this,t.topSelectedCell=this,t.bottomSelectedCell=this,r.xa(),!1}},this.xa=function(){this.getSelection();!function(){var e=t.topSelectedCell,i=t.bottomSelectedCell,a=function(){if(e.data)return e.data.x;for(var t=e.parentNode.cells,i=0;i<t.length;i++)if(t[i]===e)return i;return-1}(),n=r.va[a];if(n){var o=n.start,s=r.getPixels(e.start,o).boxTop,l=r.getPixels(i.end,o).boxBottom,d=l-s,c=r.eventBorderRadius;"number"==typeof c&&(c+="px");var u=function(){if(r.nav.activeSelection)return r.nav.activeSelection;var e=document.createElement("div");e.setAttribute("unselectable","on"),e.style.position="absolute",e.style.left="0px",e.style.width="100%";var t=document.createElement("div");return t.setAttribute("unselectable","on"),t.className=r.K("_shadow_inner"),c&&(t.style.borderRadius=c,e.style.borderRadius=c),e.appendChild(t),r.nav.events.rows[0].cells[a].selection.appendChild(e),r.elements.selection.push(e),r.nav.activeSelection=e,e}();u.className=r.K("_shadow"),u.firstChild.innerHTML="",u.style.top=s+"px",u.style.height=d+"px"}}()},this.ya=function(e){if("undefined"!=typeof t&&t.selecting){var i=DayPilot.mc(e);t.getColumn(this)===t.column&&(r.clearSelection(),i.y<t.firstMousePos.y?(t.selectedCells=t.getCellsBelow(this),t.topSelectedCell=t.selectedCells[0],t.bottomSelectedCell=t.firstSelected):(t.selectedCells=t.getCellsAbove(this),t.topSelectedCell=t.firstSelected,t.bottomSelectedCell=t.selectedCells[0]),r.xa())}},this.getSelection=function(){var e=t.topSelectedCell.start,i=t.bottomSelectedCell.end,a=t.topSelectedCell.resource;return new DayPilot.Selection(e,i,a,r)},this.za=function(e){if(e<0)return null;for(var t=0,i=r.nav.events.rows[0].cells,a=0;a<i.length;a++){if(t+=i[a].offsetWidth,e<t)return a}return null},this.Aa={},this.Aa.getCellCoords=function(){var e={};if(e.x=0,e.y=0,!r.coords)return null;e.x=r.za(r.coords.x);var t=0,i=Math.floor((r.coords.y-t)/r.cellHeight);return e.y=i,e.x<0?null:e},this.columns={},this.columns.list=[],this.columns.load=function(e,t,i){if(!e)throw new DayPilot.Exception("columns.load(): 'url' parameter required");var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},n=function(e){var i,n=e.request;try{i=JSON.parse(n.responseText)}catch(e){var o={};return o.exception=e,void a(o)}if(DayPilot.isArray(i)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=i,"function"==typeof t&&t(s),s.preventDefault.value)return;r.columns.list=i,r.Ba&&r.update()}};r.columnsLoadMethod&&"POST"===r.columnsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":n,"error":a}):DayPilot.ajax({"method":"GET","url":e,"success":n,"error":a})},this.da=function(){var e;e="Resources"!==r.viewType?this.Ca():r.columns.list,this.va=[];for(var t=0;t<e.length;t++){var i=this.Da(e[t]);this.va.push(i)}},this.Da=function(e){var t={};return t.name=e.name,t.html=e.html,t.id=e.id,t.toolTip=e.toolTip,t.data=e,e.start?t.start=new DayPilot.Date(e.start):t.start=new DayPilot.Date(r.startDate),t.putIntoBlock=function(e){for(var t=0;t<this.blocks.length;t++){var i=this.blocks[t];if(i.overlapsWith(e.part.top,e.part.height))return i.events.push(e),i.min=Math.min(i.min,e.part.top),i.max=Math.max(i.max,e.part.top+e.part.height),t}var i=[];return i.lines=[],i.events=[],i.overlapsWith=function(e,t){return!(e+t-1<this.min||e>this.max-1)},i.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var i=this.lines[t];if(i.isFree(e.part.top,e.part.height))return i.push(e),t}var i=[];return i.isFree=function(e,t){for(var i=e+t-1,a=this.length,n=0;n<a;n++){var o=this[n];if(!(i<o.part.top||e>o.part.top+o.part.height-1))return!1}return!0},i.push(e),this.lines.push(i),this.lines.length-1},i.events.push(e),i.min=e.part.top,i.max=e.part.top+e.part.height,this.blocks.push(i),this.blocks.length-1},t.putIntoLine=function(e){for(var t=0;t<this.lines.length;t++){var i=this.lines[t];if(i.isFree(e.part.top,e.part.height))return i.push(e),t}var i=[];return i.isFree=function(e,t){for(var i=e+t-1,a=this.length,n=0;n<a;n++){var o=this[n];if(!(i<o.part.top||e>o.part.top+o.part.height-1))return!1}return!0},i.push(e),this.lines.push(i),this.lines.length-1},t},this.Ca=function(){var e=[],t=this.startDate.getDatePart(),i=this.days;switch(this.viewType){case"Day":i=1;break;case"Week":i=7;var a=s.ca();t=t.firstDayOfWeek(a);break;case"WorkWeek":i=5,t=t.firstDayOfWeek(1)}"BusinessHoursNoScroll"===this.heightSpec&&(t=t.addHours(this.businessBeginsHour));for(var n=0;n<i;n++){var o=r.headerDateFormat?r.headerDateFormat:s.locale().datePattern,l={};l.start=t.addDays(n),l.name=l.start.toString(o,s.locale()),e.push(l)}return e},this.visibleStart=function(){if("Resources"===r.viewType){if(0===r.va.length)return DayPilot.Date.today();var e=r.va.map(function(e){return e.start.getTime()}),t=Math.min.apply(null,e);return new DayPilot.Date(t)}return this.va[0].start},this.visibleEnd=function(){if("Resources"===r.viewType){if(0===r.va.length)return DayPilot.Date.today().addDays(1);var e=r.va.map(function(e){return e.start.getTime()}),t=Math.max.apply(null,e);return new DayPilot.Date(t).addDays(1)}var t=this.va.length-1;return this.va[t].start.addDays(1)},this.K=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.W=function(){if(this.elements.events)for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];r.Ea(t)}this.elements.events=[]},this.Ea=function(e){!function(){var t=e.domArgs;if(e.domArgs=null,t&&"function"==typeof r.onBeforeEventDomRemove&&r.onBeforeEventDomRemove(t),t&&"function"==typeof r.onBeforeEventDomAdd){var a=t&&t.Fa;if(a){r.Ha.Ga&&i(t.element)&&(r.Ha.Ia=!0,r.Ha.Ja(a),r.Ha.Ia=!1)}}}();var t=e.event;if(t&&(t.calendar=null),e.onclick=null,e.onclickSave=null,e.onmouseover=null,e.onmouseout=null,e.onmousemove=null,e.onmousedown=null,e.firstChild&&e.firstChild.firstChild&&e.firstChild.firstChild.tagName&&"IMG"===e.firstChild.firstChild.tagName.toUpperCase()){var a=e.firstChild.firstChild;a.onmousedown=null,a.onmousemove=null,a.onclick=null}e.helper=null,e.data=null,e.event=null,DayPilot.de(e)},this.Ka=function(e){var a=e.cache||e.data,n=this.nav.events,o=a.borderRadius||r.eventBorderRadius;"number"==typeof o&&(o+="px");var s=document.createElement("div");s.style.position="absolute",s.style.left=e.part.left+"%",s.style.top=e.part.top+"px",s.style.width=e.part.width+"%",s.style.height=Math.max(e.part.height,2)+"px",s.style.overflow="hidden",s.data=e,s.event=e,s.unselectable="on",s.style.MozUserSelect="none",s.style.KhtmlUserSelect="none",s.className=this.K("_event"),a.cssClass&&DayPilot.Util.addClass(s,a.cssClass),r.showToolTip&&e.client.toolTip()&&(s.title=e.client.toolTip()),s.isFirst=e.part.start.getTime()===e.start().getTime(),s.isLast=e.part.end.getTime()===e.end().getTime(),s.onclick=this.ra,DayPilot.re(s,"contextmenu",this.ta),s.onmouseout=function(e){s.deleteIcon&&(s.deleteIcon.style.display="none")},s.onmousemove=function(i){var a=5;if("undefined"!=typeof t){var n=DayPilot.mo3(s,i);if(n&&!t.resizing&&!t.moving){s.deleteIcon&&(s.deleteIcon.style.display="");var o=this.isLast;n.y<=a&&e.client.resizeEnabled()?(this.style.cursor="n-resize",this.dpBorder="top"):this.offsetHeight-n.y<=a&&e.client.resizeEnabled()?o?(this.style.cursor="s-resize",this.dpBorder="bottom"):this.style.cursor="not-allowed":t.resizing||t.moving||("Disabled"!==r.eventClickHandling?this.style.cursor="pointer":this.style.cursor="default")}}},s.onmousedown=function(i){var a=i.which||i.button;if("n-resize"!==this.style.cursor&&"s-resize"!==this.style.cursor||1!==a){if(1===a&&e.client.moveEnabled()){t.moving=this,DayPilot.Global.moving=this,t.moving.event=this.event;var n=t.moving.helper={};n.oldColumn=r.va[this.data.part.dayIndex].id,t.originalMouse=DayPilot.mc(i),t.originalTop=this.offsetTop;var o=DayPilot.mo3(this,i);o?t.moveOffsetY=o.y:t.moveOffsetY=0,r.nav.top.style.cursor="move"}}else t.resizing=this,DayPilot.Global.resizing=this,t.originalMouse=DayPilot.mc(i),t.originalHeight=this.offsetHeight,t.originalTop=this.offsetTop,r.nav.top.style.cursor=this.style.cursor;return!1};var l=document.createElement("div");if(l.setAttribute("unselectable","on"),l.className=r.K("_event_inner"),"darker"===a.borderColor&&a.backColor?l.style.borderColor=DayPilot.ColorUtil.darker(a.backColor,2):l.style.borderColor=a.borderColor,a.backColor&&(l.style.background=a.backColor),a.fontColor&&(l.style.color=a.fontColor),o&&(s.style.borderRadius=o,l.style.borderRadius=o),s.appendChild(l),e.client.barVisible()){var d=e.part.height-2,c=100*e.part.barTop/d,u=Math.ceil(100*e.part.barHeight/d),h=document.createElement("div");h.setAttribute("unselectable","on"),h.className=this.K("_event_bar"),h.style.position="absolute",a.barBackColor&&(h.style.backgroundColor=a.barBackColor);var f=document.createElement("div");f.setAttribute("unselectable","on"),f.className=this.K("_event_bar_inner"),f.style.top=c+"%",0<u&&u<=1?f.style.height="1px":f.style.height=u+"%",a.barColor&&(f.style.backgroundColor=a.barColor),h.appendChild(f),s.appendChild(h)}if(e.client.deleteEnabled()){var m=document.createElement("div");m.style.position="absolute",m.style.right="2px",m.style.top="2px",m.style.width="17px",m.style.height="17px",m.className=r.K("_event_delete"),m.onmousedown=function(e){e.stopPropagation()},m.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&r.ua(t)},m.style.display="none",s.deleteIcon=m,s.appendChild(m)}var p=a.areas?DayPilot.Areas.copy(a.areas):[];if(DayPilot.Areas.attach(s,e,{"areas":p}),"function"==typeof r.onAfterEventRender){var v={};v.e=s.event,v.div=s,r.onAfterEventRender(v)}if(function(){var t={};if(t.control=r,t.e=e,t.element=null,s.domArgs=t,"function"==typeof r.onBeforeEventDomAdd&&r.onBeforeEventDomAdd(t),t.element){var a=l;if(a){t.Fa=a;if(i(t.element)){if(!r.Ha.Ga)throw new DayPilot.Exception("Can't reach Vue");r.Ha.Ia=!0,r.Ha.La(t.element,a),r.Ha.Ia=!1}else a.appendChild(t.element)}}else l.innerHTML=e.client.innerHTML()}(),n.rows[0].cells[e.part.dayIndex]){n.rows[0].cells[e.part.dayIndex].firstChild.appendChild(s),r.Ma(s)}r.elements.events.push(s)},this.Ma=function(e){for(var t=e&&e.childNodes?e.childNodes.length:0,i=0;i<t;i++)try{var a=e.childNodes[i];1===a.nodeType&&(a.unselectable="on",this.Ma(a))}catch(e){}},this.ka=function(){for(var e=0;e<this.va.length;e++){var t=this.va[e];if(t.blocks)for(var i=0;i<t.blocks.length;i++)for(var a=t.blocks[i],n=0;n<a.lines.length;n++)for(var o=a.lines[n],r=0;r<o.length;r++){var s=o[r];s.part.width=100/a.lines.length,s.part.left=s.part.width*n;var l=n===a.lines.length-1;l||(s.part.width=1.5*s.part.width),this.Ka(s)}}},this.Na=function(){this.nav.top.innerHTML="",DayPilot.Util.addClass(this.nav.top,this.K("_main")),this.nav.top.style.MozUserSelect="none",this.nav.top.style.KhtmlUserSelect="none",this.nav.top.style.position="relative",this.nav.top.style.width=this.width?this.width:"100%",this.hideUntilInit&&(this.nav.top.style.visibility="hidden"),this.visible||(this.nav.top.style.display="none"),this.nav.scroll=document.createElement("div"),this.nav.scroll.style.height=this.Oa()+"px","BusinessHours"===this.heightSpec?this.nav.scroll.style.overflow="auto":this.nav.scroll.style.overflow="hidden",this.nav.scroll.style.position="relative";var e=this.Pa();this.nav.top.appendChild(e),this.nav.scroll.style.zoom=1;var t=this.Qa();this.nav.scrollable=t.firstChild,this.nav.scroll.appendChild(t),this.nav.top.appendChild(this.nav.scroll),this.nav.scrollLayer=document.createElement("div"),this.nav.scrollLayer.style.position="absolute",this.nav.scrollLayer.style.top="0px",this.nav.scrollLayer.style.left="0px",this.nav.top.appendChild(this.nav.scrollLayer),this.nav.loading=document.createElement("div"),this.nav.loading.style.position="absolute",this.nav.loading.style.top="0px",this.nav.loading.style.left=this.hourWidth+5+"px",this.nav.loading.innerHTML=r.Ra(r.loadingLabelText,r.loadingLabelHtml),this.nav.loading.style.display="none",this.nav.top.appendChild(this.nav.loading)},this.ia=function(){this.fasterDispose||DayPilot.pu(this.nav.hourTable),this.nav.scrollable.rows[0].cells[0].innerHTML="",this.nav.hourTable=this.Sa(),this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable)},this.Qa=function(){var e=document.createElement("div");e.style.zoom=1,e.style.position="relative";var t=document.createElement("table");t.cellSpacing="0",t.cellPadding="0",t.border="0",t.style.border="0px none",t.style.width="100%",t.style.position="absolute";var i,a=t.insertRow(-1);i=a.insertCell(-1),i.valign="top",i.style.padding="0px",i.style.border="0px none",this.nav.hourTable=this.Sa(),i.appendChild(this.nav.hourTable),i=a.insertCell(-1),i.valign="top",i.width="100%",i.style.padding="0px",i.style.border="0px none";var n=document.createElement("div");return n.style.position="relative",i.appendChild(n),n.appendChild(this.Ta()),n.appendChild(this.Ua()),e.appendChild(t),this.nav.zoom=e,e},this.Ta=function(){var e=document.createElement("table");return e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.main=e,this.nav.events=e,e},this.Ua=function(){var e=document.createElement("table");e.style.top="0px",e.cellPadding="0",e.cellSpacing="0",e.border="0",e.style.position="absolute",e.style.width="100%",e.style.border="0px none",e.style.tableLayout="fixed",this.nav.events=e;for(var t=this.va,i=t.length,a=e.insertRow(-1),n=0;n<i;n++){var o=a.insertCell(-1);o.style.padding="0px",o.style.border="0px none",o.style.height="0px",o.style.overflow="visible",r.rtl||(o.style.textAlign="left");var s=document.createElement("div");s.style.marginRight=r.columnMarginRight+"px",s.style.marginLeft=r.columnMarginLeft+"px",s.style.position="relative",s.style.height="1px",s.style.marginTop="-1px";var l=document.createElement("div");o.selection=l,o.appendChild(s),o.appendChild(l)}return e},this.Sa=function(){var e=document.createElement("table");e.cellSpacing="0",e.cellPadding="0",e.border="0",e.style.border="0px none",e.style.width=this.hourWidth+"px",e.oncontextmenu=function(){return!1};for(var t=r.la(),i=0;i<t;i++)this.Va(e,i);return e},this.Va=function(e,t){var i=2*this.cellHeight,a=e.insertRow(-1);a.style.height=i+"px";var n=a.insertCell(-1);n.valign="bottom",n.unselectable="on",n.style.cursor="default",n.style.padding="0px",n.style.border="0px none";var o=document.createElement("div");o.style.position="relative",o.className=this.K("_rowheader"),o.style.width=this.hourWidth+"px",o.style.height=i+"px",o.style.overflow="hidden",o.unselectable="on";var l=document.createElement("div");l.className=this.K("_rowheader_inner"),l.unselectable="on";var d=document.createElement("div");d.unselectable="on";var c=this.startDate.addHours(t).addHours(r.pa()),u=c.getHours(),h=u<12,f=s.timeFormat();"Clock12Hours"===f&&(u%=12,0===u&&(u=12)),d.innerHTML=u;var m=document.createElement("span");m.unselectable="on",m.className=this.K("_rowheader_minutes");var p;p="Clock12Hours"===f?h?"AM":"PM":"00",m.innerHTML=p,d.appendChild(m),l.appendChild(d),o.appendChild(l),n.appendChild(o)},this.Oa=function(){switch(this.heightSpec){case"Full":return 48*this.cellHeight;case"BusinessHours":var e=this.na();return e*this.cellHeight*2;case"BusinessHoursNoScroll":var e=this.na();return e*this.cellHeight*2;default:throw"DayPilot.Calendar: Unexpected 'heightSpec' value."}},this.Wa=function(){var e=r.nav.corner?r.nav.corner.parentNode:null;if(e){e.innerHTML="";var t=this.Xa();e.appendChild(t),r.nav.corner=t}},this.Pa=function(){var e=document.createElement("div");e.style.overflow="auto";var t=document.createElement("table");t.cellPadding="0",t.cellSpacing="0",t.border="0",t.style.width="100%",t.style.borderCollapse="separate",t.style.border="0px none";var i=t.insertRow(-1),a=i.insertCell(-1);a.style.padding="0px",a.style.border="0px none";var n=this.Xa();a.appendChild(n),this.nav.corner=n,a=i.insertCell(-1),a.style.width="100%",a.valign="top",a.style.position="relative",a.style.padding="0px",a.style.border="0px none",this.nav.header=document.createElement("table"),this.nav.header.cellPadding="0",this.nav.header.cellSpacing="0",this.nav.header.border="0",this.nav.header.width="100%",this.nav.header.style.tableLayout="fixed",this.nav.header.oncontextmenu=function(){return!1};var o="hidden"!==this.nav.scroll.style.overflow;if(a.appendChild(this.nav.header),o){a=i.insertCell(-1),a.unselectable="on";var r=document.createElement("div");r.unselectable="on",r.style.position="relative",r.style.width="16px",r.style.height=this.headerHeight+"px",r.className=this.K("_cornerright");var s=document.createElement("div");s.className=this.K("_cornerright_inner"),r.appendChild(s),a.appendChild(r),this.nav.cornerRight=r}return e.appendChild(t),e},this.Xa=function(){var e=document.createElement("div");e.style.position="relative",e.className=this.K("_corner"),e.style.width=this.hourWidth+"px",e.style.height=this.headerHeight+"px",e.oncontextmenu=function(){return!1};var t=document.createElement("div");return t.unselectable="on",t.className=this.K("_corner_inner"),e.appendChild(t),e},this.X=function(){var e=this.nav.main;e.root=null,e.onmouseup=null;for(var t=0;t<e.rows.length;t++)for(var i=e.rows[t],a=0;a<i.cells.length;a++){var n=i.cells[a];r.Ya(n)}this.fasterDispose||DayPilot.pu(e)},this.Ya=function(e){e&&(!function(){var t=e,a=t.domArgs;if(t.domArgs=null,a&&"function"==typeof r.onBeforeCellDomRemove&&r.onBeforeCellDomRemove(a),a&&"function"==typeof r.onBeforeCellDomAdd){var n=a&&a.Fa;if(n){r.Ha.Ga&&i(a.element)&&(r.Ha.Ia=!0,r.Ha.Ja(n),r.Ha.Ia=!1)}}}(),e.root=null,e.onmousedown=null,e.onmousemove=null,e.onmouseout=null,e.onmouseup=null)},this.ha=function(){var e=this.nav.main,a=18e5,n=this.oa(),o=r.va;for(e&&this.X();e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.tableCreated=!0;for(var s=o.length,l=this.nav.events;l&&l.rows&&l.rows.length>0;)this.fasterDispose||DayPilot.pu(l.rows[0]),l.deleteRow(0);for(var s=o.length,d=l.insertRow(-1),c=0;c<s;c++){var u=d.insertCell(-1);u.style.padding="0px",u.style.border="0px none",u.style.height="0px",u.style.overflow="visible",r.rtl||(u.style.textAlign="left");var h=document.createElement("div");h.style.marginRight=r.columnMarginRight+"px",h.style.marginLeft=r.columnMarginLeft+"px",h.style.position="relative",h.style.height="1px",h.style.marginTop="-1px";var f=document.createElement("div");f.style.position="relative",u.selection=f,u.appendChild(h),u.appendChild(f)}for(var m=0;m<n;m++){var d=e.insertRow(-1);d.style.MozUserSelect="none",d.style.KhtmlUserSelect="none";for(var c=0;c<s;c++){var p=this.va[c],u=d.insertCell(-1);u.start=p.start.addTime(m*a),u.end=u.start.addTime(a),u.resource=p.id,u.onmousedown=this.wa,u.onmouseup=function(){return!1},u.onclick=function(){return!1},u.root=this,u.style.padding="0px",u.style.border="0px none",u.style.verticalAlign="top",u.style.height=r.cellHeight+"px",u.style.overflow="hidden",u.unselectable="on";var h=document.createElement("div");h.unselectable="on",h.style.height=r.cellHeight+"px",h.style.position="relative",h.className=this.K("_cell");var v=this.Za(u.start,u.end),y={"business":v,"text":null,"html":null,"cssClass":null,"backColor":null,"backImage":null,"backRepeat":null},g={"start":u.start,"end":u.end,"resource":u.resource,"properties":y};!function(){if("function"==typeof r.onBeforeCellRender){var e={};e.cell=g,r.onBeforeCellRender(e)}}(),y.business&&DayPilot.Util.addClass(h,r.K("_cell_business")),y.cssClass&&DayPilot.Util.addClass(h,y.cssClass);var b=document.createElement("div");b.setAttribute("unselectable","on"),b.className=this.K("_cell_inner");var D=DayPilot.Util.escapeTextHtml(y.text,y.html);D&&(b.innerHTML=D),y.backColor&&(b.style.backgroundColor=y.backColor),y.backImage&&(b.style.backgroundImage="url("+y.backImage+")"),y.backRepeat&&(b.style.backgroundRepeat=y.backRepeat),h.appendChild(b),function(){if("function"==typeof r.onBeforeCellDomAdd||"function"==typeof r.onBeforeCellDomRemove){var e={};if(e.control=r,e.cell=g,e.element=null,u.domArgs=e,"function"==typeof r.onBeforeCellDomAdd&&r.onBeforeCellDomAdd(e),e.element){var t=b;if(t){e.Fa=t;if(i(e.element)){if(!r.Ha.Ga)throw new DayPilot.Exception("Can't reach Vue");r.Ha.Ia=!0,r.Ha.La(e.element,t),r.Ha.Ia=!1}else t.appendChild(e.element)}}}}(),u.appendChild(h)}}e.root=this,r.nav.scrollable.onmousemove=function(e){var i=r.nav.scrollable;r.coords=DayPilot.mo3(i,e);var a=DayPilot.mc(e);if(t.resizing){t.resizingShadow||(t.resizingShadow=r._(t.resizing,!1,r.shadow));var n=r.cellHeight,o=1,s=a.y-t.originalMouse.y;if("bottom"===t.resizing.dpBorder){var l=Math.floor((t.originalHeight+t.originalTop+s+n/2)/n)*n-t.originalTop+o;l<n&&(l=n);var d=r.nav.main.clientHeight;t.originalTop+l>d&&(l=d-t.originalTop),t.resizingShadow.style.height=l+"px"}else if("top"===t.resizing.dpBorder){var c=Math.floor((t.originalTop+s-o+n/2)/n)*n+o;c<o&&(c=o),c>t.originalTop+t.originalHeight-n&&(c=t.originalTop+t.originalHeight-n);var l=t.originalHeight-(c-t.originalTop);l<n?l=n:t.resizingShadow.style.top=c+"px",t.resizingShadow.style.height=l+"px"}}else if(t.moving){if(!r.coords)return;if(!t.movingShadow){var u=3,a=DayPilot.mc(e),h=Math.abs(a.x-t.originalMouse.x)+Math.abs(a.y-t.originalMouse.y);if(h<=u)return;t.movingShadow=r._(t.moving,!0,r.shadow),t.movingShadow.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"}var n=r.cellHeight,o=1,f=t.moveOffsetY;f||(f=n/2);var c=Math.floor((r.coords.y-f-o+n/2)/n)*n+o;c<o&&(c=o);var m=r.nav.events,d=r.nav.main.clientHeight+o,p=parseInt(t.movingShadow.style.height);c+p>d&&(c=d-p),DayPilot.Util.addClass(t.moving,r.K("_event_moving_source")),t.movingShadow.parentNode.style.display="none",t.movingShadow.style.top=c+"px",t.movingShadow.parentNode.style.display="";var v=m.clientWidth/m.rows[0].cells.length,y=Math.floor((r.coords.x-45)/v);y<0&&(y=0),y<m.rows[0].cells.length&&y>=0&&t.movingShadow.column!==y&&(t.movingShadow.column=y,t.moveShadow(m.rows[0].cells[y]))}else if(t.selecting){var a=DayPilot.mc(e),g=r.Aa.getCellCoords(),b=t.column,D=r.nav.main.rows[g.y].cells[b];a.y<t.firstMousePos.y?(t.selectedCells=t.getCellsBelow(D),t.topSelectedCell=t.selectedCells[0],t.bottomSelectedCell=t.firstSelected):(t.selectedCells=t.getCellsAbove(D),t.topSelectedCell=t.firstSelected,t.bottomSelectedCell=t.selectedCells[0]),r.xa()}},r.nav.scrollable.style.display=""},this.Za=function(e,t){return this.businessBeginsHour<this.businessEndsHour?!(e.getHours()<this.businessBeginsHour||e.getHours()>=this.businessEndsHour||6===e.getDayOfWeek()||0===e.getDayOfWeek()):e.getHours()>=this.businessBeginsHour||e.getHours()<this.businessEndsHour},this.Y=function(){var e=this.nav.header;if(e&&e.rows)for(var t=0;t<e.rows.length;t++)for(var i=e.rows[t],a=0;a<i.cells.length;a++){var n=i.cells[a];n.onclick=null,n.onmousemove=null,n.onmouseout=null}this.fasterDispose||DayPilot.pu(e)},this.$a=function(e){function t(t){var n=a[t],o=e?i.insertCell(-1):i.cells[t];o.data=n,o.style.overflow="hidden",o.style.padding="0px",o.style.border="0px none",o.style.height=r.headerHeight+"px",o.onclick=r._a;var s,l=e?document.createElement("div"):o.firstChild;e?(l.unselectable="on",l.style.MozUserSelect="none",l.style.cursor="default",l.style.position="relative",
|
|
12
|
-
l.className=r.K("_colheader"),l.style.height=r.headerHeight+"px",r.headerTextWrappingEnabled||(l.style.whiteSpace="nowrap"),s=document.createElement("div"),s.className=r.K("_colheader_inner"),s.unselectable="on",l.appendChild(s),o.appendChild(l)):s=l.firstChild;var d={};d.header={},d.header.cssClass=null,d.header.verticalAlignment="center",d.column=r.ab(n,r),"function"==typeof r.onBeforeHeaderRender&&(DayPilot.Util.copyProps(n,d.header,["id","start","name","html","backColor","toolTip","areas"]),r.onBeforeHeaderRender(d),DayPilot.Util.copyProps(d.header,n,["html","backColor","toolTip","areas","cssClass","verticalAlignment"])),n.toolTip&&(s.title=n.toolTip),n.cssClass&&DayPilot.Util.addClass(l,n.cssClass),n.backColor&&(s.style.background=n.backColor),n.areas&&DayPilot.Areas.attach(l,n);var c=n.verticalAlignment;if(c)switch(s.style.display="flex",c){case"center":s.style.alignItems="center";break;case"top":s.style.alignItems="flex-start";break;case"bottom":s.style.alignItems="flex-end"}l.firstChild.innerHTML=r.Ra(n.name,n.html)}for(var i=e?this.nav.header.insertRow(-1):this.nav.header.rows[0],a=this.va,n=a.length,o=0;o<n;o++)t(o)},this._a=function(e){if("Disabled"!==r.headerClickHandling){var t=this.data,i=r.ab(t),a={};a.header={},a.header.id=t.id,a.header.name=t.name,a.header.start=t.start,a.column=i,a.originalEvent=e,a.shift=e.shiftKey,a.ctrl=e.ctrlKey,a.meta=e.metaKey,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof r.onHeaderClick&&(r.onHeaderClick(a),a.preventDefault.value)||"function"==typeof r.onHeaderClicked&&r.onHeaderClicked(a)}},this.ab=function(e){return new DayPilot.CalendarColumn(e,r)},this.bb=function(){return this.width&&this.width.indexOf("px")!==-1?"Pixel":"Percentage"},this.ga=function(){var e=this.nav.header,t=!0,i=this.va;for(i.length;this.headerCreated&&e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.headerCreated=!0;this.$a(t)},this.loadingStart=function(){this.loadingLabelVisible&&(this.nav.loading.innerHTML=this.loadingLabelText,this.nav.loading.style.top=this.headerHeight+5+"px",this.nav.loading.style.display="")},this.commandCallBack=function(e,t){var i={};i.command=e,this.S("Command",t,i)},this.loadingStop=function(e){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.nav.loading.style.display="none"},this.cb=function(){var e=this.nav.scroll;e.onscroll||(e.onscroll=function(){r.db()});var t="undefined"!=typeof this.eb.scrollpos?this.eb.scrollpos:this.initScrollPos;t&&("Auto"===t&&(t="BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0),e.root=this,0===e.scrollTop&&(e.scrollTop=t))},this.callbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.fb=function(){var e=DayPilot.sw(this.nav.scroll),t=this.nav.cornerRight;t&&(t.style.width=e+"px")},this.gb=function(){t.globalHandlers||(t.globalHandlers=!0,DayPilot.re(document,"mouseup",t.gMouseUp),DayPilot.re(window,"unload",t.gUnload))},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";t=e}r.events.list||(r.events.list=[]),r.events.list.push(t),r.hb({"eventsOnly":!0}),r.sa.notify()},this.events.find=function(e){if(!r.events.list)return null;if("function"==typeof e){for(var t=e,i=0;i<r.events.list.length;i++){var a=new DayPilot.Event(r.events.list[i],r);if(t(a))return a}return null}for(var i=0;i<r.events.list.length;i++){var n=r.events.list[i];if(n.id===e)return new DayPilot.Event(n,r)}return null},this.events.forRange=function(e,t){return e=new DayPilot.Date(e),t=new DayPilot.Date(t),(r.events.list||[]).filter(function(i){return a(e,t,new DayPilot.Date(i.start),new DayPilot.Date(i.end))}).map(function(e){return new DayPilot.Event(e,r)})},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=r.events.find(e.id);if(t){var i=DayPilot.indexOf(r.events.list,t.data);r.events.list.splice(i,1,e)}}r.hb({"eventsOnly":!0}),r.sa.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var i=r.events.find(e.id);i&&(t=i.data)}else if("string"==typeof e||"number"==typeof e){var i=r.events.find(e);i&&(t=i.data)}var a=DayPilot.indexOf(r.events.list,t);r.events.list.splice(a,1),r.hb({"eventsOnly":!0}),r.sa.notify()},this.events.load=function(e,t,i){var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},n=function(e){var i,n=e.request;try{i=JSON.parse(n.responseText)}catch(e){var o={};return o.exception=e,void a(o)}if(DayPilot.isArray(i)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=i,"function"==typeof t&&t(s),s.preventDefault.value)return;r.events.list=i,r.Ba&&r.hb({"eventsOnly":!0})}};if(r.eventsLoadMethod&&"POST"===r.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":r.visibleStart().toString(),"end":r.visibleEnd().toString()},"url":e,"success":n,"error":a});else{var o=e,s="start="+r.visibleStart().toString()+"&end="+r.visibleEnd().toString();o+=o.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":o,"success":n,"error":a})}},this.ib=function(){if(r.nav.top.className!==r.K("_main")){r.nav.top.className=r.K("_main");var e=r.nav.corner;e.className=r.K("_corner"),e.firstChild.className=r.K("_corner_inner");var t=r.nav.cornerRight;t&&(t.className=r.K("_cornerright"),t.firstChild.className=r.K("_cornerright_inner"))}},this.update=function(e){if(r.O)throw new DayPilot.Exception("You are trying to update a DayPilot.Calendar instance that has been disposed.");r.jb(e),r.hb()},this.hb=function(e){if(this.Ba){var e=e||{},t=!e.eventsOnly;r.kb(),r.W(),r.nav.top.style.cursor="auto",t&&(r.da(),r.ga(),r.ha(),r.ia(),r.ja(),r.Wa(),r.fb(),r.ib(),r.lb()),r.ea(),r.fa(),r.ka(),r.clearSelection(),this.visible?this.show():this.hide()}},this.mb=null,this.jb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?r.events.list=e.list:r.events.list=e}},"columns":{"preInit":function(){r.columns.list=this.data}}};this.mb=t;for(var i in e)if(t[i]){var a=t[i];a.data=e[i],a.preInit&&a.preInit()}else r[i]=e[i]}},this.nb=function(){var e=this.mb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.ob=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Calendar() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Calendar: The placeholder element not found: '"+e+"'."}},this.pb={},this.pb.events=[],this.qb=function(e){var t=this.pb.events,i=this.events.list[e],a={};for(var n in i)a[n]=i[n];if(a.start=new DayPilot.Date(i.start),a.end=new DayPilot.Date(i.end),"function"==typeof this.onBeforeEventRender){var o={};o.control=r,o.data=a,this.onBeforeEventRender(o)}t[e]=a},this.ea=function(){var e=this.events.list;if(r.pb.events=[],e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: "+typeof e);var t=e.length,i=864e5;this.cache.pixels={};var a=[];this.scrollLabels=[],this.minStart=1e4,this.maxEnd=0;for(var n=0;n<t;n++){var o=e[n],s=o;if("object"!=typeof s)throw new DayPilot.Exception("Event data item must be an object");if(!s.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!s.end)throw new DayPilot.Exception("Event data item must specify 'end' property");if(s instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.")}if("function"==typeof this.onBeforeEventRender)for(var n=0;n<t;n++)this.qb(n);for(var n=0;n<this.va.length;n++){var l={};l.minEnd=1e6,l.maxStart=-1,this.scrollLabels.push(l);var d=this.va[n];d.events=[],d.lines=[],d.blocks=[];for(var c=new DayPilot.Date(d.start),u=c.getTime(),h=c.addTime(i),f=h.getTime(),m=0;m<t;m++)if(!a[m]){var o=e[m],p=new DayPilot.Date(o.start),v=new DayPilot.Date(o.end),y=p.getTime(),g=v.getTime();if(!(g<y)){var b=!(g<=u||y>=f);if("Resources"===r.viewType&&(b=b&&d.id===o.resource),b){var D=new DayPilot.Event(o,r);D.part.dayIndex=n,D.part.start=u<y?p:c,D.part.end=f>g?v:h;var w=this.getPixels(D.part.start,d.start),x=this.getPixels(D.part.end,d.start),C=w.top,P=x.top;if(C===P&&(w.cut||x.cut))continue;var k=x.boxBottom;D.part.top=Math.floor(C/this.cellHeight)*this.cellHeight+1,D.part.height=Math.max(Math.ceil(k/this.cellHeight)*this.cellHeight-D.part.top,this.cellHeight-1)+1,D.part.barTop=Math.max(C-D.part.top-1,0),D.part.barHeight=Math.max(P-C-2,1);var p=D.part.top,v=D.part.top+D.part.height;p>l.maxStart&&(l.maxStart=p),v<l.minEnd&&(l.minEnd=v),p<this.minStart&&(this.minStart=p),v>this.maxEnd&&(this.maxEnd=v),d.events.push(D),"function"==typeof this.onBeforeEventRender&&(D.cache=this.pb.events[m]),D.part.start.getTime()===y&&D.part.end.getTime()===g&&(a[m]=!0)}}}}for(var n=0;n<this.va.length;n++){var d=this.va[n];d.events.sort(this.rb);for(var m=0;m<d.events.length;m++){var o=d.events[m];d.putIntoBlock(o)}for(var m=0;m<d.blocks.length;m++){var _=d.blocks[m];_.events.sort(this.rb);for(var S=0;S<_.events.length;S++){var o=_.events[S];_.putIntoLine(o)}}}}},this.rb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var i=e.start().getTime()-t.start().getTime();return 0!==i?i:t.end().getTime()-e.end().getTime()},this.debug=function(e,t){this.debuggingEnabled&&(r.debugMessages||(r.debugMessages=[]),r.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.getPixels=function(e,t){t||(t=this.startDate);var i=t.getTime(),a=e.getTime(),n=this.cache.pixels[a+"_"+i];if(n)return n;i=t.getTime();var o=18e5,r=a-i,s=r%o,l=r-s,d=l+o;0===s&&(d=l);var c={};return c.cut=!1,c.top=this.sb(r),c.boxTop=this.sb(l),c.boxBottom=this.sb(d),this.cache.pixels[a+"_"+i]=c,c},this.sb=function(e){return Math.floor(this.cellHeight*e/18e5)},this.kb=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart()},this.fa=function(){this.nav.corner&&(this.nav.corner.style.height=this.headerHeight+"px")},this.ja=function(){var e=this.Oa();this.nav.scroll&&e>0&&(this.nav.scroll.style.height=e+"px")},this.sa={},this.sa.scope=null,this.sa.notify=function(){r.sa.scope&&r.sa.scope["$apply"]()},this.sa.apply=function(e){e()},this.db=function(){if(r.nav.scroll){var e=r.nav.scroll.scrollTop,t=e/(2*r.cellHeight);r.eb.scrollHour=t}},this.lb=function(){var e=0;"number"==typeof r.eb.scrollHour?e=2*r.cellHeight*r.eb.scrollHour:"Auto"===r.initScrollPos&&(e="BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0),r.nav.scroll.scrollTop=e},this.getScrollY=function(){return r.nav.scroll.scrollTop},this.setScrollY=function(e){r.nav.scroll.scrollTop=e,r.db()},this.tb=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof r.events.list||!r.events.list)},this.t=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){r.visible=!0,r.nav.top.style.display="",this.fb()},this.hide=function(){r.visible=!1,r.nav.top.style.display="none"},this.ub=function(){this.kb(),this.da(),this.Na(),this.ga(),this.ha(),this.fb(),this.cb(),this.gb(),t.register(this),this.vb(),this.S("Init")},this.eb={},this.wb=function(){this.eb.themes=[],this.eb.themes.push(this.theme||this.cssClassPrefix)},this.xb=function(){for(var e=this.eb.themes,t=0;t<e.length;t++){var i=e[t];DayPilot.Util.removeClass(this.nav.top,i+"_main")}this.eb.themes=[]},this.yb=function(){if(this.afterRender(null,!1),"function"==typeof this.onAfterRender){var e={};e.isCallBack=!1,this.onAfterRender(e)}},this.zb=function(){if("function"==typeof this.onInit&&!this.Ab){this.Ab=!0;var e={};this.onInit(e)}},this.Bb=function(){var e=r.nav.top;return!!e&&(e.offsetWidth>0&&e.offsetHeight>0)},this.vb=function(){var e=r.Bb;e()||(r.V=setInterval(function(){e()&&(r.cb(),r.fb(),clearInterval(r.V))},100))},this.Ra=function(e,t){return r.aa.ba()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ha={},this.Ha.Ga=null,this.Ha.Cb=function(e,t,i){var a=r.Ha.Ga;if("function"==typeof a.createVNode&&"function"==typeof a.render){var n=a.createVNode(e,i);a.render(n,t)}},this.Ha.La=function(e,t){var i=r.Ha.Ga;if("function"==typeof i.render){var a=e;DayPilot.isArray(e)&&(a=i.h("div",null,e)),i.render(a,t)}},this.Ha.Ja=function(e){var t=r.Ha.Ga;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=r.jb,this.internal.xssTextHtml=r.Ra,this.internal.enableVue=function(e){r.Ha.Ga=e},this.internal.vueRef=function(){return r.Ha.Ga},this.internal.vueRendering=function(){return r.Ha.Ia},this.init=function(){this.ob();var e=this.tb();return this.wb(),e?void this.ub():(this.kb(),this.da(),this.ea(),this.Na(),this.ga(),this.ha(),this.t(),this.fb(),this.cb(),this.gb(),t.register(this),this.events&&(this.fa(),this.ka()),this.yb(),this.zb(),this.vb(),this.Ba=!0,this)},this.Init=this.init,this.jb(n)},DayPilot.CalendarColumn=function(e,t){var i=this;i.id=e.id,i.name=e.name,i.data=e.data,i.start=new DayPilot.Date(e.start),i.calendar=t,i.toJSON=function(){var e={};return e.id=this.id,this.start&&(e.start=this.start.toString()),e.name=this.name,e}},DayPilot.Calendar=t.Calendar,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotCalendar=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Calendar(this.id);this.daypilot=i;for(name in e)i[name]=e[name];i.init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotCalendar",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,i,a){var n=new DayPilot.Calendar(i[0]);n.sa.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)0===s.indexOf("on")&&!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(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)n[t]=e[t];n.update(),n.zb()},!0),l.call(t,c,function(e){n.events.list=e,n.update()},!0)}}}])}()}}(),"undefined"==typeof DayPilot)var DayPilot={};if(function(){"undefined"!=typeof DayPilot.DatePicker&&DayPilot.DatePicker.close||(DayPilot.DatePicker=function(e){this.v="2024.4.609-lite";var t="navigator_"+(new Date).getTime(),i=this;this.onShow=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.prepare=function(){if(this.locale="en-us",this.target=null,this.targetAlignment="left",this.resetTarget=!0,this.pattern=this.aa.locale().datePattern,this.theme="navigator_default",this.patterns=[],this.zIndex=null,e)for(var t in e)this[t]=e[t]},this.init=function(){this.date=new DayPilot.Date(this.date);var e=this.Db();this.resetTarget&&!e?this.Eb(this.date):this.resetTarget||(i.date=e);var t=this.C();return t&&t.addEventListener("input",function(){i.date=i.Db(),i.date&&i.navigator.select(i.date,{dontNotify:!0})}),document.addEventListener("mousedown",function(){i.close()}),this},this.close=function(){this.Bb&&(this.Bb=!1,this.navigator&&this.navigator.dispose(),this.div.innerHTML="",this.div&&this.div.parentNode===document.body&&document.body.removeChild(this.div))},this.setDate=function(e){this.date=new DayPilot.Date(e),this.Eb(this.date)},this.Db=function(){var e=this.C();if(!e)return this.date;var t=null;if(t="INPUT"===e.tagName?e.value:e.innerText,!t)return null;for(var a=DayPilot.Date.parse(t,i.pattern),n=0;n<i.patterns.length;n++){if(a)return a;a=DayPilot.Date.parse(t,i.patterns[n])}return a},this.Eb=function(e){var t=this.C();if(t){var a=e.toString(i.pattern,i.locale);"INPUT"===t.tagName?t.value=a:t.innerHTML=a}},this.aa={},this.aa.locale=function(){return DayPilot.Locale.find(i.locale)},this.C=function(){var e=this.target;return e&&e.nodeType&&1===e.nodeType?e:document.getElementById(e)},Object.defineProperty(this,"visible",{get:function(){return i.Bb}}),this.show=function(){if(!this.Bb){var e=this.C(),a=this.navigator,a=new DayPilot.Navigator(t);a.api=2,a.cssOnly=!0,a.theme=i.theme,a.weekStarts="Auto",a.locale=i.locale,a.onTimeRangeSelected=function(e){i.date=e.start;var t=e.start.addTime(a.Fb),n=t.toString(i.pattern,i.locale),e={};e.start=t,e.date=t,e.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(e),e.preventDefault.value)||(i.Eb(n),i.close(),"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(e))},this.navigator=a;var n=DayPilot.abs(e),o=e.offsetHeight,r=i.targetAlignment,s=document.createElement("div");s.style.position="absolute","left"===r&&(s.style.left=n.x+"px"),s.style.top=n.y+o+"px",i.zIndex&&(s.style.zIndex=i.zIndex);var l=document.createElement("div");l.id=t,s.appendChild(l),s.addEventListener("mousedown",function(e){var e=e||window.event;e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}),document.body.appendChild(s),this.div=s;var d=i.Db()||(new DayPilot.Date).getDatePart();if(a.startDate=d,a.Fb=d.getTimePart(),a.selectionDay=d.getDatePart(),a.init(),"right"===r){var c=n.x+e.offsetWidth-a.nav.top.offsetWidth;s.style.left=c+"px"}this.Bb=!0,this.onShow&&this.onShow()}},this.prepare(),this.init()})}(),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(DayPilot){"use strict";if("undefined"==typeof DayPilot.Menu||!DayPilot.Menu.def){var e=function(){},t={};t.mouse=null,t.menu=null,t.handlersRegistered=!1,t.hideTimeout=null,t.waitingSubmenu=null,DayPilot.Menu=function(i){var a=this,n=null;this.v="2024.4.609-lite",this.zIndex=120,this.cssClassPrefix="menu_default",this.cssOnly=!0,this.menuTitle=null,this.showMenuTitle=!1,this.hideOnMouseOut=!1,this.hideAfter=200,this.theme=null,this.onShow=null,this.Gb=function(){},i&&DayPilot.isArray(i)&&(this.items=i),this.toJSON=function(){return null},this.show=function(i,o){o=o||{};var r=null;if(i?"string"==typeof i.id||"number"==typeof i.id?r=i.id:"function"==typeof i.id?r=i.id():"function"==typeof i.value&&(r=i.value()):r=null,"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),o.submenu||t.menuClean(),this.Gb.submenu=null,null!==t.mouse){a.cssOnly||(a.cssOnly=!0);var s=null;if(i&&i.isRow&&i.$.row.task?(s=new DayPilot.Task(i.$.row.task,i.calendar),s.menuType="resource"):s=i&&i.isEvent&&i.data.task?new DayPilot.Task(i,i.calendar):i,"function"==typeof a.onShow){var l={};if(l.source=s,l.menu=a,l.preventDefault=function(){l.preventDefault.value=!0},a.onShow(l),l.preventDefault.value)return}var d=document.createElement("div");if(d.style.position="absolute",d.style.top="0px",d.style.left="0px",d.style.display="none",d.style.overflow="hidden",d.style.zIndex=this.zIndex+1,d.className=this.Hb("main"),d.onclick=function(e){e.cancelBubble=!0,this.parentNode.removeChild(this)},this.hideOnMouseOut&&(d.onmousemove=function(e){clearTimeout(t.hideTimeout)},d.onmouseleave=function(e){a.delayedHide({"hideParent":!0})}),!this.items||0===this.items.length)throw"No menu items defined.";if(this.showMenuTitle){var c=document.createElement("div");c.innerHTML=this.menuTitle,c.className=this.Hb("title"),d.appendChild(c)}for(var u=0;u<this.items.length;u++){var h=this.items[u],f=document.createElement("div");if(DayPilot.Util.addClass(f,this.Hb("item")),h.items&&(DayPilot.Util.addClass(f,this.Hb("item_haschildren")),DayPilot.Util.addClass(d,this.Hb("withchildren"))),"undefined"!=typeof h&&!h.hidden){if("-"===h.text){var m=document.createElement("div");m.addEventListener("click",function(e){e.stopPropagation()}),f.appendChild(m)}else{var p=document.createElement("a");if(p.style.position="relative",p.style.display="block",h.cssClass&&DayPilot.Util.addClass(p,h.cssClass),h.disabled)DayPilot.Util.addClass(p,a.Hb("item_disabled"));else{if(h.onclick||h.onClick){p.item=h,p.onclick=function(e,t){return function(i){if("function"==typeof e.onClick){var a={};if(a.item=e,a.source=t.source,a.originalEvent=i,a.preventDefault=function(){a.preventDefault.value=!0},e.onClick(a),a.preventDefault.value)return}e.onclick&&e.onclick.call(t,i)}}(h,p);var v=function(e,i){return function(a){a.stopPropagation(),a.preventDefault();var n=function(){window.setTimeout(function(){i.source.calendar.internal.touch.active=!1},500)};if("function"==typeof e.onClick){var o={};if(o.item=e,o.source=i.source,o.originalEvent=a,o.preventDefault=function(){o.preventDefault.value=!0},e.onClick(o),o.preventDefault.value)return void n()}e.onclick&&e.onclick.call(i,a),t.menuClean(),n()}};DayPilot.reNonPassive(p,"touchstart",function(e){e.stopPropagation(),e.preventDefault(),p.source.calendar.internal.touch.active=!0}),DayPilot.reNonPassive(p,"touchend",v(h,p))}if(h.items&&!h.disabled){var y=function(e,t){return function(i){i.preventDefault(),i.stopPropagation(),a.Ib(e,t)}};p.ontouchend=y(h,p)}if(h.onclick)e();else if(h.href)p.href=h.href.replace(/\x7B0\x7D/gim,r),h.target&&p.setAttribute("target",h.target);else if(h.command){var y=function(e,t){return function(i){var a=t.source,n=e;n.action=n.action?n.action:"CallBack";var o=a.calendar||a.root;if(a instanceof DayPilot.Link)return void o.internal.linkMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Selection)return void o.internal.timeRangeMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Event)return void o.internal.eventMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Selection)return void o.internal.timeRangeMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Task)return void("resource"===a.menuType?o.internal.resourceHeaderMenuClick(n.command,t.menuSource,n.action):o.internal.eventMenuClick(n.command,t.menuSource,n.action));switch(a.menuType){case"resource":return void o.internal.resourceHeaderMenuClick(n.command,a,n.action);case"selection":return void o.internal.timeRangeMenuClick(n.command,a,n.action);default:return void o.internal.eventMenuClick(n.command,a,n.action)}i.preventDefault()}};p.onclick=y(h,p),p.ontouchend=y(h,p)}}h.items&&p.addEventListener("click",function(e){e.stopPropagation()}),p.source=s,p.menuSource=i;var g=document.createElement("span");if(g.className=a.Hb("item_text"),g.innerHTML=DayPilot.Util.escapeTextHtml(h.text,h.html),p.appendChild(g),h.image){var b=document.createElement("img");b.src=h.image,b.style.position="absolute",b.style.top="0px",b.style.left="0px",p.appendChild(b)}if(h.icon){var D=document.createElement("span");D.className=a.Hb("item_icon");var w=document.createElement("i");w.className=h.icon,D.appendChild(w),p.appendChild(D)}if(h.symbol){var x="http://www.w3.org/2000/svg",C=document.createElementNS(x,"svg");C.setAttribute("width","100%"),C.setAttribute("height","100%");var P=document.createElementNS(x,"use");P.setAttribute("href",h.symbol),C.appendChild(P);var k=document.createElement("span");k.className=a.Hb("item_symbol"),k.style.position="absolute",k.style.top="0px",k.style.left="0px",k.appendChild(C),p.appendChild(k)}var _=function(e,i){return function(){var n=(i.source,e),o=t.waitingSubmenu;if(o){if(o.parent===n)return;clearTimeout(o.timeout),t.waitingSubmenu=null}e.disabled||(t.waitingSubmenu={},t.waitingSubmenu.parent=n,t.waitingSubmenu.timeout=setTimeout(function(){t.waitingSubmenu=null,a.Ib(n,i)},300))}};p.onmouseover=_(h,p),f.appendChild(p)}d.appendChild(f)}}var S=function(e){window.setTimeout(function(){t.menuClean(),DayPilot.MenuBar.deactivate()},100)};d.onclick=S,d.ontouchend=S,d.onmousedown=function(e){e=e||window.event,e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()},d.oncontextmenu=function(){return!1},document.body.appendChild(d),a.Gb.visible=!0,a.Gb.source=i,d.style.display="";var M=d.offsetHeight,H=d.offsetWidth;d.style.display="none";var A=document.documentElement.clientHeight,T=window.innerWidth,E="number"==typeof o.windowMargin?o.windowMargin:5;if(function(){var e=o.initiator;if(e){var t=e.div,i=e.e,a=e.area,r=a.visibility||a.v||"Visible",s=e.a;if("Visible"!==r&&(s=DayPilot.Areas.createArea(t,i,a),t.appendChild(s),n=s),s){var l=DayPilot.abs(s);o.x=l.x,o.y=l.y+l.h+2}}}(),function(){var e="number"==typeof o.x?o.x:t.mouse.x+1,i="number"==typeof o.y?o.y:t.mouse.y+1,a=document.body.scrollTop||document.documentElement.scrollTop,n=document.body.scrollLeft||document.documentElement.scrollLeft;if(i-a>A-M&&0!==A){var r=i-a-(A-M)+E;d.style.top=i-r+"px"}else d.style.top=i+"px";if("right"===o.align&&(e-=H),e-n>T-H&&0!==T){var s=e-n-(T-H)+E;d.style.left=e-s+"px"}else d.style.left=e+"px"}(),o.parentLink){var N=o.parentLink,I=parseInt(new DayPilot.StyleReader(d).get("border-top-width")),R=DayPilot.abs(o.parentLink.parentNode),B=R.x+N.offsetWidth,z=R.y-I;B+H>T&&(B=Math.max(0,R.x-H));var O=document.body.scrollTop+document.documentElement.scrollTop;z+M-O>A&&(z=Math.max(0,A-M+O)),d.style.left=B+"px",d.style.top=z+"px"}d.style.display="",this.addShadow(d),this.Gb.div=d,o.submenu||(DayPilot.Menu.active=this)}},this.Ib=function(e,t){var i=e,n=t.source;if((!a.Gb.submenu||a.Gb.submenu.item!==e)&&(a.Gb.submenu&&a.Gb.submenu.item!==e&&(DayPilot.Util.removeClass(a.Gb.submenu.link.parentNode,a.Hb("item_haschildren_active")),a.Gb.submenu.menu.hide(),a.Gb.submenu=null),e.items)){var o=a.cloneOptions();o.items=e.items,a.Gb.submenu={},a.Gb.submenu.menu=new DayPilot.Menu(o),a.Gb.submenu.menu.Jb=a,a.Gb.submenu.menu.show(n,{"submenu":!0,"parentLink":t,"parentItem":i}),a.Gb.submenu.item=e,a.Gb.submenu.link=t,DayPilot.Util.addClass(t.parentNode,a.Hb("item_haschildren_active"))}},this.Hb=function(e){var t=this.theme||this.cssClassPrefix,i=this.cssOnly?"_":"";return t?t+i+e:""},this.cloneOptions=function(){return DayPilot.Util.copyProps(o,{},["cssClassPrefix","theme","hideAfter","hideOnMouseOut","zIndex"])},this.hide=function(e){e=e||{},this.Gb.submenu&&this.Gb.submenu.menu.hide();var i=t.waitingSubmenu;if(i&&(t.waitingSubmenu=null,clearTimeout(i.timeout)),this.removeShadow(),this.Gb.div&&this.Gb.div.parentNode===document.body&&document.body.removeChild(this.Gb.div),n&&(DayPilot.de(n),n=null),a.Gb.visible=!1,a.Gb.source=null,a.Jb&&e.hideParent&&a.Jb.hide(e),DayPilot.Menu.active===a&&(DayPilot.Menu.active=null),"function"==typeof this.onHide){var o={};this.onHide(o)}},this.delayedHide=function(e){t.hideTimeout=setTimeout(function(){a.hide(e)},a.hideAfter)},this.cancelHideTimeout=function(){clearTimeout(t.hideTimeout)},this.init=function(e){return t.mouseMove(e),this},this.addShadow=function(e){},this.removeShadow=function(){};var o=DayPilot.isArray(i)?null:i;if(o)for(var r in o)this[r]=o[r]},DayPilot.MenuBar=function(e,t){var i=this;t=t||{},this.items=[],this.theme="menubar_default",this.windowMargin=0,this.nav={},this.elements={},this.elements.items=DayPilot.list(),this.k=null,this.Ba=!1;for(var a in t)this[a]=t[a];this.Kb=function(e){return this.theme+"_"+e},this.t=function(){this.nav.top=document.getElementById(e);var t=this.nav.top;t.className=this.Kb("main"),DayPilot.list(i.items).forEach(function(e){var a=document.createElement("span");a.innerHTML=DayPilot.Util.escapeTextHtml(e.text,e.html),a.className=i.Kb("item"),e.cssClass&&a.classList.add(e.cssClass),a.data=e,a.onclick=function(t){if(i.active&&i.active.item===e)i.Lb();else if(e.children)return void i.Mb(a);if("function"==typeof e.onClick){var n={};n.item=e,n.originalEvent=t,e.onClick(n)}},a.onmousedown=function(e){e.stopPropagation()},a.onmouseover=function(){i.active&&i.active.item!==e&&i.Mb(a)},t.appendChild(a),i.elements.items.push(a)})},this.Lb=function(){var e=i.Kb("item_active");i.elements.items.forEach(function(t){DayPilot.Util.removeClass(t,e)}),i.active&&i.active.menu&&i.active.menu.hide(),i.active=null},this.Nb=function(e){return!!i.active&&i.active.item===e.data},this.Mb=function(e){if(!i.Nb(e)){i.Lb();var t=e.data,a=i.active={};a.item=t,a.div=e;var n=i.Kb("item_active");DayPilot.Util.addClass(e,n);var o=DayPilot.abs(e);if(t.children){a.menu=new DayPilot.Menu({"items":t.children});var r=o.x;"right"===t.align&&(r+=o.w),a.menu.show(null,{"x":r,"y":o.y+o.h,"align":t.align,"windowMargin":i.windowMargin})}DayPilot.MenuBar.active=i}},this.init=function(){return this.t(),this.Ba=!0,this},this.dispose=function(){this.Ba&&(this.nav.top.innerHTML="",this.elements.items=[])}},DayPilot.MenuBar.deactivate=function(){DayPilot.MenuBar.active&&(DayPilot.MenuBar.active.Lb(),DayPilot.MenuBar.active=null)},t.menuClean=function(){"undefined"!=typeof DayPilot.Menu.active&&DayPilot.Menu.active&&(DayPilot.Menu.active.hide(),DayPilot.Menu.active=null)},t.mouseDown=function(e){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.wheel=function(e){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.mouseMove=function(e){"undefined"!=typeof t&&(t.mouse=t.mousePosition(e))},t.touchMove=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchStart=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchEnd=function(e){},t.touchPosition=function(e){if(!e||!e.touches)return null;var t=e.touches[0],i={};return i.x=t.pageX,i.y=t.pageY,i},t.mousePosition=function(e){return DayPilot.mo3(null,e)},DayPilot.Menu.touchPosition=function(e){e.touches&&(t.mouse=t.touchPosition(e))},DayPilot.Menu.hide=function(e){if(e=e||{},e.calendar){var i=DayPilot.Menu.active;if(i){var a=i.Gb.source;a&&a.calendar===e.calendar&&t.menuClean()}}else t.menuClean()},t.handlersRegistered||"undefined"==typeof document||(DayPilot.re(document,"mousemove",t.mouseMove),DayPilot.re(document,"mousedown",t.mouseDown),DayPilot.re(document,"wheel",t.wheel),DayPilot.re(document,"touchmove",t.touchMove),DayPilot.re(document,"touchstart",t.touchStart),DayPilot.re(document,"touchend",t.touchEnd),t.handlersRegistered=!0),DayPilot.Menu.def={}}}(DayPilot),"undefined"==typeof DayPilot&&(DayPilot={}),function(DayPilot){"use strict";function e(t,i,a){var n=i.indexOf(".");if(n===-1)return void("__proto__"!==i&&"constructor"!==i&&(t[i]=a));var o=i.substring(0,n);if("__proto__"!==o&&"constructor"!==o){var r=i.substring(n+1),s=t[o];"object"==typeof s&&null!==s||(t[o]={},s=t[o]),e(s,r,a)}}function t(e,i,a){i=i||{},a=a||"";for(var n in e){var o=e[n];"object"==typeof o?"[object Array]"===Object.prototype.toString.call(o)?i[a+n]=o:o&&o.toJSON?i[a+n]=o.toJSON():t(o,i,a+n+"."):i[a+n]=o}return i}if(!DayPilot.ModalStatic){DayPilot.ModalStatic={},DayPilot.ModalStatic.list=[],DayPilot.ModalStatic.hide=function(){if(this.list.length>0){var e=this.list.pop();e&&e.hide()}},DayPilot.ModalStatic.remove=function(e){for(var t=DayPilot.ModalStatic.list,i=0;i<t.length;i++)if(t[i]===e)return void t.splice(i,1)},DayPilot.ModalStatic.close=function(e){DayPilot.ModalStatic.result(e),DayPilot.ModalStatic.hide()},DayPilot.ModalStatic.result=function(e){var t=DayPilot.ModalStatic.list;t.length>0&&(t[t.length-1].result=e)},DayPilot.ModalStatic.displayed=function(e){for(var t=DayPilot.ModalStatic.list,i=0;i<t.length;i++)if(t[i]===e)return!0;return!1},DayPilot.ModalStatic.stretch=function(){if(this.list.length>0){var e=this.list[this.list.length-1];e&&e.stretch()}},DayPilot.ModalStatic.last=function(){var e=DayPilot.ModalStatic.list;return e.length>0?e[e.length-1]:null};var i=function(){if("undefined"==typeof window){var e={};return e.add=function(){},e.commit=function(){},e}var t=document.createElement("style");t.setAttribute("type","text/css"),t.styleSheet||t.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(t);var i=!!t.styleSheet,e={};return e.rules=[],e.commit=function(){try{i&&(t.styleSheet.cssText=this.rules.join("\n"))}catch(e){}},e.add=function(e,a,n){if(i)return void this.rules.push(e+"{"+a+"}");if(t.sheet.insertRule)"undefined"==typeof n&&(n=t.sheet.cssRules.length),t.sheet.insertRule(e+"{"+a+"}",n);else{if(!t.sheet.addRule)throw"No CSS registration method found";t.sheet.addRule(e,a,n)}},e},a="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",n=new i;
|
|
12
|
+
l.className=r.K("_colheader"),l.style.height=r.headerHeight+"px",r.headerTextWrappingEnabled||(l.style.whiteSpace="nowrap"),s=document.createElement("div"),s.className=r.K("_colheader_inner"),s.unselectable="on",l.appendChild(s),o.appendChild(l)):s=l.firstChild;var d={};d.header={},d.header.cssClass=null,d.header.verticalAlignment="center",d.column=r.ab(n,r),"function"==typeof r.onBeforeHeaderRender&&(DayPilot.Util.copyProps(n,d.header,["id","start","name","html","backColor","toolTip","areas"]),r.onBeforeHeaderRender(d),DayPilot.Util.copyProps(d.header,n,["html","backColor","toolTip","areas","cssClass","verticalAlignment"])),n.toolTip&&(s.title=n.toolTip),n.cssClass&&DayPilot.Util.addClass(l,n.cssClass),n.backColor&&(s.style.background=n.backColor),n.areas&&DayPilot.Areas.attach(l,n);var c=n.verticalAlignment;if(c)switch(s.style.display="flex",c){case"center":s.style.alignItems="center";break;case"top":s.style.alignItems="flex-start";break;case"bottom":s.style.alignItems="flex-end"}l.firstChild.innerHTML=r.Ra(n.name,n.html)}for(var i=e?this.nav.header.insertRow(-1):this.nav.header.rows[0],a=this.va,n=a.length,o=0;o<n;o++)t(o)},this._a=function(e){if("Disabled"!==r.headerClickHandling){var t=this.data,i=r.ab(t),a={};a.header={},a.header.id=t.id,a.header.name=t.name,a.header.start=t.start,a.column=i,a.originalEvent=e,a.shift=e.shiftKey,a.ctrl=e.ctrlKey,a.meta=e.metaKey,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof r.onHeaderClick&&(r.onHeaderClick(a),a.preventDefault.value)||"function"==typeof r.onHeaderClicked&&r.onHeaderClicked(a)}},this.ab=function(e){return new DayPilot.CalendarColumn(e,r)},this.bb=function(){return this.width&&this.width.indexOf("px")!==-1?"Pixel":"Percentage"},this.ga=function(){var e=this.nav.header,t=!0,i=this.va;for(i.length;this.headerCreated&&e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.headerCreated=!0;this.$a(t)},this.loadingStart=function(){this.loadingLabelVisible&&(this.nav.loading.innerHTML=this.loadingLabelText,this.nav.loading.style.top=this.headerHeight+5+"px",this.nav.loading.style.display="")},this.commandCallBack=function(e,t){var i={};i.command=e,this.S("Command",t,i)},this.loadingStop=function(e){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.nav.loading.style.display="none"},this.cb=function(){var e=this.nav.scroll;e.root=this,r.db(),e.onscroll||(e.onscroll=function(){r.eb()})},this.callbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.fb=function(){var e=DayPilot.sw(this.nav.scroll),t=this.nav.cornerRight;t&&(t.style.width=e+"px")},this.gb=function(){t.globalHandlers||(t.globalHandlers=!0,DayPilot.re(document,"mouseup",t.gMouseUp),DayPilot.re(window,"unload",t.gUnload))},this.events={},this.events.add=function(e){var t=null;if(e instanceof DayPilot.Event)t=e.data;else{if("object"!=typeof e)throw"DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";t=e}r.events.list||(r.events.list=[]),r.events.list.push(t),r.hb({"eventsOnly":!0}),r.sa.notify()},this.events.find=function(e){if(!r.events.list)return null;if("function"==typeof e){for(var t=e,i=0;i<r.events.list.length;i++){var a=new DayPilot.Event(r.events.list[i],r);if(t(a))return a}return null}for(var i=0;i<r.events.list.length;i++){var n=r.events.list[i];if(n.id===e)return new DayPilot.Event(n,r)}return null},this.events.forRange=function(e,t){return e=new DayPilot.Date(e),t=new DayPilot.Date(t),(r.events.list||[]).filter(function(i){return a(e,t,new DayPilot.Date(i.start),new DayPilot.Date(i.end))}).map(function(e){return new DayPilot.Event(e,r)})},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=r.events.find(e.id);if(t){var i=DayPilot.indexOf(r.events.list,t.data);r.events.list.splice(i,1,e)}}r.hb({"eventsOnly":!0}),r.sa.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var i=r.events.find(e.id);i&&(t=i.data)}else if("string"==typeof e||"number"==typeof e){var i=r.events.find(e);i&&(t=i.data)}var a=DayPilot.indexOf(r.events.list,t);r.events.list.splice(a,1),r.hb({"eventsOnly":!0}),r.sa.notify()},this.events.load=function(e,t,i){var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},n=function(e){var i,n=e.request;try{i=JSON.parse(n.responseText)}catch(e){var o={};return o.exception=e,void a(o)}if(DayPilot.isArray(i)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=i,"function"==typeof t&&t(s),s.preventDefault.value)return;r.events.list=i,r.Ba&&r.hb({"eventsOnly":!0})}};if(r.eventsLoadMethod&&"POST"===r.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":r.visibleStart().toString(),"end":r.visibleEnd().toString()},"url":e,"success":n,"error":a});else{var o=e,s="start="+r.visibleStart().toString()+"&end="+r.visibleEnd().toString();o+=o.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":o,"success":n,"error":a})}},this.ib=function(){if(r.nav.top.className!==r.K("_main")){r.nav.top.className=r.K("_main");var e=r.nav.corner;e.className=r.K("_corner"),e.firstChild.className=r.K("_corner_inner");var t=r.nav.cornerRight;t&&(t.className=r.K("_cornerright"),t.firstChild.className=r.K("_cornerright_inner"))}},this.update=function(e){if(r.O)throw new DayPilot.Exception("You are trying to update a DayPilot.Calendar instance that has been disposed.");r.jb(e),r.hb()},this.hb=function(e){if(this.Ba){var e=e||{},t=!e.eventsOnly;r.kb(),r.W(),r.nav.top.style.cursor="auto",t&&(r.da(),r.ga(),r.ha(),r.ia(),r.ja(),r.Wa(),r.fb(),r.ib(),r.db()),r.ea(),r.fa(),r.ka(),r.clearSelection(),this.visible?this.show():this.hide()}},this.lb=null,this.jb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?r.events.list=e.list:r.events.list=e}},"columns":{"preInit":function(){r.columns.list=this.data}}};this.lb=t;for(var i in e)if(t[i]){var a=t[i];a.data=e[i],a.preInit&&a.preInit()}else r[i]=e[i]}},this.mb=function(){var e=this.lb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.nb=function(){if(this.id&&this.id.tagName)this.nav.top=this.id;else{if("string"!=typeof this.id)throw"DayPilot.Calendar() constructor requires the target element or its ID as a parameter";if(this.nav.top=document.getElementById(this.id),!this.nav.top)throw"DayPilot.Calendar: The placeholder element not found: '"+e+"'."}},this.ob={},this.ob.events=[],this.pb=function(e){var t=this.ob.events,i=this.events.list[e],a={};for(var n in i)a[n]=i[n];if(a.start=new DayPilot.Date(i.start),a.end=new DayPilot.Date(i.end),"function"==typeof this.onBeforeEventRender){var o={};o.control=r,o.data=a,this.onBeforeEventRender(o)}t[e]=a},this.ea=function(){var e=this.events.list;if(r.ob.events=[],e){if(!DayPilot.isArray(e))throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: "+typeof e);var t=e.length,i=864e5;this.cache.pixels={};var a=[];this.scrollLabels=[],this.minStart=1e4,this.maxEnd=0;for(var n=0;n<t;n++){var o=e[n],s=o;if("object"!=typeof s)throw new DayPilot.Exception("Event data item must be an object");if(!s.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!s.end)throw new DayPilot.Exception("Event data item must specify 'end' property");if(s instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.")}if("function"==typeof this.onBeforeEventRender)for(var n=0;n<t;n++)this.pb(n);for(var n=0;n<this.va.length;n++){var l={};l.minEnd=1e6,l.maxStart=-1,this.scrollLabels.push(l);var d=this.va[n];d.events=[],d.lines=[],d.blocks=[];for(var c=new DayPilot.Date(d.start),u=c.getTime(),h=c.addTime(i),f=h.getTime(),m=0;m<t;m++)if(!a[m]){var o=e[m],p=new DayPilot.Date(o.start),v=new DayPilot.Date(o.end),y=p.getTime(),g=v.getTime();if(!(g<y)){var b=!(g<=u||y>=f);if("Resources"===r.viewType&&(b=b&&d.id===o.resource),b){var D=new DayPilot.Event(o,r);D.part.dayIndex=n,D.part.start=u<y?p:c,D.part.end=f>g?v:h;var w=this.getPixels(D.part.start,d.start),x=this.getPixels(D.part.end,d.start),C=w.top,P=x.top;if(C===P&&(w.cut||x.cut))continue;var k=x.boxBottom;D.part.top=Math.floor(C/this.cellHeight)*this.cellHeight+1,D.part.height=Math.max(Math.ceil(k/this.cellHeight)*this.cellHeight-D.part.top,this.cellHeight-1)+1,D.part.barTop=Math.max(C-D.part.top-1,0),D.part.barHeight=Math.max(P-C-2,1);var p=D.part.top,v=D.part.top+D.part.height;p>l.maxStart&&(l.maxStart=p),v<l.minEnd&&(l.minEnd=v),p<this.minStart&&(this.minStart=p),v>this.maxEnd&&(this.maxEnd=v),d.events.push(D),"function"==typeof this.onBeforeEventRender&&(D.cache=this.ob.events[m]),D.part.start.getTime()===y&&D.part.end.getTime()===g&&(a[m]=!0)}}}}for(var n=0;n<this.va.length;n++){var d=this.va[n];d.events.sort(this.qb);for(var m=0;m<d.events.length;m++){var o=d.events[m];d.putIntoBlock(o)}for(var m=0;m<d.blocks.length;m++){var _=d.blocks[m];_.events.sort(this.qb);for(var S=0;S<_.events.length;S++){var o=_.events[S];_.putIntoLine(o)}}}}},this.qb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var i=e.start().getTime()-t.start().getTime();return 0!==i?i:t.end().getTime()-e.end().getTime()},this.debug=function(e,t){this.debuggingEnabled&&(r.debugMessages||(r.debugMessages=[]),r.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.getPixels=function(e,t){t||(t=this.startDate);var i=t.getTime(),a=e.getTime(),n=this.cache.pixels[a+"_"+i];if(n)return n;i=t.getTime();var o=18e5,r=a-i,s=r%o,l=r-s,d=l+o;0===s&&(d=l);var c={};return c.cut=!1,c.top=this.rb(r),c.boxTop=this.rb(l),c.boxBottom=this.rb(d),this.cache.pixels[a+"_"+i]=c,c},this.rb=function(e){return Math.floor(this.cellHeight*e/18e5)},this.kb=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart()},this.fa=function(){this.nav.corner&&(this.nav.corner.style.height=this.headerHeight+"px")},this.ja=function(){var e=this.Oa();this.nav.scroll&&e>0&&(this.nav.scroll.style.height=e+"px")},this.sa={},this.sa.scope=null,this.sa.notify=function(){r.sa.scope&&r.sa.scope["$apply"]()},this.sa.apply=function(e){e()},this.eb=function(){if(r.nav.scroll&&r.sb()){var e=r.nav.scroll.scrollTop,t=e/(2*r.cellHeight);r.tb.scrollHour=t}},this.db=function(){var e=0;e="number"==typeof r.tb.scrollHour?2*r.cellHeight*r.tb.scrollHour:"Auto"===r.initScrollPos?"BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0:this.initScrollPos;var t=r.nav.top;"none"===t.style.display?(t.style.display="",r.nav.scroll.scrollTop=e,t.style.display="none"):r.nav.scroll.scrollTop=e},this.getScrollY=function(){return r.nav.scroll.scrollTop},this.setScrollY=function(e){r.nav.scroll.scrollTop=e,r.eb()},this.ub=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof r.events.list||!r.events.list)},this.t=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){r.visible=!0,r.nav.top.style.display="",this.fb()},this.hide=function(){r.visible=!1,r.nav.top.style.display="none"},this.vb=function(){this.kb(),this.da(),this.Na(),this.ga(),this.ha(),this.fb(),this.cb(),this.gb(),t.register(this),this.wb(),this.S("Init")},this.tb={},this.xb=function(){this.tb.themes=[],this.tb.themes.push(this.theme||this.cssClassPrefix)},this.yb=function(){for(var e=this.tb.themes,t=0;t<e.length;t++){var i=e[t];DayPilot.Util.removeClass(this.nav.top,i+"_main")}this.tb.themes=[]},this.zb=function(){if(this.afterRender(null,!1),"function"==typeof this.onAfterRender){var e={};e.isCallBack=!1,this.onAfterRender(e)}},this.Ab=function(){if("function"==typeof this.onInit&&!this.Bb){this.Bb=!0;var e={};this.onInit(e)}},this.sb=function(){var e=r.nav.top;return!!e&&(e.offsetWidth>0&&e.offsetHeight>0)},this.wb=function(){var e=r.sb;e()||(r.V=setInterval(function(){e()&&(r.cb(),r.fb(),clearInterval(r.V))},100))},this.Ra=function(e,t){return r.aa.ba()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ha={},this.Ha.Ga=null,this.Ha.Cb=function(e,t,i){var a=r.Ha.Ga;if("function"==typeof a.createVNode&&"function"==typeof a.render){var n=a.createVNode(e,i);a.render(n,t)}},this.Ha.La=function(e,t){var i=r.Ha.Ga;if("function"==typeof i.render){var a=e;DayPilot.isArray(e)&&(a=i.h("div",null,e)),i.render(a,t)}},this.Ha.Ja=function(e){var t=r.Ha.Ga;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=r.jb,this.internal.xssTextHtml=r.Ra,this.internal.enableVue=function(e){r.Ha.Ga=e},this.internal.vueRef=function(){return r.Ha.Ga},this.internal.vueRendering=function(){return r.Ha.Ia},this.init=function(){this.nb();var e=this.ub();return this.xb(),e?void this.vb():(this.kb(),this.da(),this.ea(),this.Na(),this.ga(),this.ha(),this.t(),this.fb(),this.cb(),this.gb(),t.register(this),this.events&&(this.fa(),this.ka()),this.zb(),this.Ab(),this.wb(),this.Ba=!0,this)},this.Init=this.init,this.jb(n)},DayPilot.CalendarColumn=function(e,t){var i=this;i.id=e.id,i.name=e.name,i.data=e.data,i.start=new DayPilot.Date(e.start),i.calendar=t,i.toJSON=function(){var e={};return e.id=this.id,this.start&&(e.start=this.start.toString()),e.name=this.name,e}},DayPilot.Calendar=t.Calendar,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotCalendar=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Calendar(this.id);this.daypilot=i;for(name in e)i[name]=e[name];i.init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotCalendar",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,i,a){var n=new DayPilot.Calendar(i[0]);n.sa.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)0===s.indexOf("on")&&!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(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)n[t]=e[t];n.update(),n.Ab()},!0),l.call(t,c,function(e){n.events.list=e,n.update()},!0)}}}])}()}}(),"undefined"==typeof DayPilot)var DayPilot={};if(function(){"undefined"!=typeof DayPilot.DatePicker&&DayPilot.DatePicker.close||(DayPilot.DatePicker=function(e){this.v="2024.4.622-lite";var t="navigator_"+(new Date).getTime(),i=this;this.onShow=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.prepare=function(){if(this.locale="en-us",this.target=null,this.targetAlignment="left",this.resetTarget=!0,this.pattern=this.aa.locale().datePattern,this.theme="navigator_default",this.patterns=[],this.zIndex=null,e)for(var t in e)this[t]=e[t]},this.init=function(){this.date=new DayPilot.Date(this.date);var e=this.Db();this.resetTarget&&!e?this.Eb(this.date):this.resetTarget||(i.date=e);var t=this.C();return t&&t.addEventListener("input",function(){i.date=i.Db(),i.date&&i.navigator.select(i.date,{dontNotify:!0})}),document.addEventListener("mousedown",function(){i.close()}),this},this.close=function(){this.sb&&(this.sb=!1,this.navigator&&this.navigator.dispose(),this.div.innerHTML="",this.div&&this.div.parentNode===document.body&&document.body.removeChild(this.div))},this.setDate=function(e){this.date=new DayPilot.Date(e),this.Eb(this.date)},this.Db=function(){var e=this.C();if(!e)return this.date;var t=null;if(t="INPUT"===e.tagName?e.value:e.innerText,!t)return null;for(var a=DayPilot.Date.parse(t,i.pattern),n=0;n<i.patterns.length;n++){if(a)return a;a=DayPilot.Date.parse(t,i.patterns[n])}return a},this.Eb=function(e){var t=this.C();if(t){var a=e.toString(i.pattern,i.locale);"INPUT"===t.tagName?t.value=a:t.innerHTML=a}},this.aa={},this.aa.locale=function(){return DayPilot.Locale.find(i.locale)},this.C=function(){var e=this.target;return e&&e.nodeType&&1===e.nodeType?e:document.getElementById(e)},Object.defineProperty(this,"visible",{get:function(){return i.sb}}),this.show=function(){if(!this.sb){var e=this.C(),a=this.navigator,a=new DayPilot.Navigator(t);a.api=2,a.cssOnly=!0,a.theme=i.theme,a.weekStarts="Auto",a.locale=i.locale,a.onTimeRangeSelected=function(e){i.date=e.start;var t=e.start.addTime(a.Fb),n=t.toString(i.pattern,i.locale),e={};e.start=t,e.date=t,e.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(e),e.preventDefault.value)||(i.Eb(n),i.close(),"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(e))},this.navigator=a;var n=DayPilot.abs(e),o=e.offsetHeight,r=i.targetAlignment,s=document.createElement("div");s.style.position="absolute","left"===r&&(s.style.left=n.x+"px"),s.style.top=n.y+o+"px",i.zIndex&&(s.style.zIndex=i.zIndex);var l=document.createElement("div");l.id=t,s.appendChild(l),s.addEventListener("mousedown",function(e){var e=e||window.event;e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}),document.body.appendChild(s),this.div=s;var d=i.Db()||(new DayPilot.Date).getDatePart();if(a.startDate=d,a.Fb=d.getTimePart(),a.selectionDay=d.getDatePart(),a.init(),"right"===r){var c=n.x+e.offsetWidth-a.nav.top.offsetWidth;s.style.left=c+"px"}this.sb=!0,this.onShow&&this.onShow()}},this.prepare(),this.init()})}(),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(DayPilot){"use strict";if("undefined"==typeof DayPilot.Menu||!DayPilot.Menu.def){var e=function(){},t={};t.mouse=null,t.menu=null,t.handlersRegistered=!1,t.hideTimeout=null,t.waitingSubmenu=null,DayPilot.Menu=function(i){var a=this,n=null;this.v="2024.4.622-lite",this.zIndex=120,this.cssClassPrefix="menu_default",this.cssOnly=!0,this.menuTitle=null,this.showMenuTitle=!1,this.hideOnMouseOut=!1,this.hideAfter=200,this.theme=null,this.onShow=null,this.Gb=function(){},i&&DayPilot.isArray(i)&&(this.items=i),this.toJSON=function(){return null},this.show=function(i,o){o=o||{};var r=null;if(i?"string"==typeof i.id||"number"==typeof i.id?r=i.id:"function"==typeof i.id?r=i.id():"function"==typeof i.value&&(r=i.value()):r=null,"undefined"!=typeof DayPilot.Bubble&&DayPilot.Bubble.hideActive(),o.submenu||t.menuClean(),this.Gb.submenu=null,null!==t.mouse){a.cssOnly||(a.cssOnly=!0);var s=null;if(i&&i.isRow&&i.$.row.task?(s=new DayPilot.Task(i.$.row.task,i.calendar),s.menuType="resource"):s=i&&i.isEvent&&i.data.task?new DayPilot.Task(i,i.calendar):i,"function"==typeof a.onShow){var l={};if(l.source=s,l.menu=a,l.preventDefault=function(){l.preventDefault.value=!0},a.onShow(l),l.preventDefault.value)return}var d=document.createElement("div");if(d.style.position="absolute",d.style.top="0px",d.style.left="0px",d.style.display="none",d.style.overflow="hidden",d.style.zIndex=this.zIndex+1,d.className=this.Hb("main"),d.onclick=function(e){e.cancelBubble=!0,this.parentNode.removeChild(this)},this.hideOnMouseOut&&(d.onmousemove=function(e){clearTimeout(t.hideTimeout)},d.onmouseleave=function(e){a.delayedHide({"hideParent":!0})}),!this.items||0===this.items.length)throw"No menu items defined.";if(this.showMenuTitle){var c=document.createElement("div");c.innerHTML=this.menuTitle,c.className=this.Hb("title"),d.appendChild(c)}for(var u=0;u<this.items.length;u++){var h=this.items[u],f=document.createElement("div");if(DayPilot.Util.addClass(f,this.Hb("item")),h.items&&(DayPilot.Util.addClass(f,this.Hb("item_haschildren")),DayPilot.Util.addClass(d,this.Hb("withchildren"))),"undefined"!=typeof h&&!h.hidden){if("-"===h.text){var m=document.createElement("div");m.addEventListener("click",function(e){e.stopPropagation()}),f.appendChild(m)}else{var p=document.createElement("a");if(p.style.position="relative",p.style.display="block",h.cssClass&&DayPilot.Util.addClass(p,h.cssClass),h.disabled)DayPilot.Util.addClass(p,a.Hb("item_disabled"));else{if(h.onclick||h.onClick){p.item=h,p.onclick=function(e,t){return function(i){if("function"==typeof e.onClick){var a={};if(a.item=e,a.source=t.source,a.originalEvent=i,a.preventDefault=function(){a.preventDefault.value=!0},e.onClick(a),a.preventDefault.value)return}e.onclick&&e.onclick.call(t,i)}}(h,p);var v=function(e,i){return function(a){a.stopPropagation(),a.preventDefault();var n=function(){window.setTimeout(function(){i.source.calendar.internal.touch.active=!1},500)};if("function"==typeof e.onClick){var o={};if(o.item=e,o.source=i.source,o.originalEvent=a,o.preventDefault=function(){o.preventDefault.value=!0},e.onClick(o),o.preventDefault.value)return void n()}e.onclick&&e.onclick.call(i,a),t.menuClean(),n()}};DayPilot.reNonPassive(p,"touchstart",function(e){e.stopPropagation(),e.preventDefault(),p.source.calendar.internal.touch.active=!0}),DayPilot.reNonPassive(p,"touchend",v(h,p))}if(h.items&&!h.disabled){var y=function(e,t){return function(i){i.preventDefault(),i.stopPropagation(),a.Ib(e,t)}};p.ontouchend=y(h,p)}if(h.onclick)e();else if(h.href)p.href=h.href.replace(/\x7B0\x7D/gim,r),h.target&&p.setAttribute("target",h.target);else if(h.command){var y=function(e,t){return function(i){var a=t.source,n=e;n.action=n.action?n.action:"CallBack";var o=a.calendar||a.root;if(a instanceof DayPilot.Link)return void o.internal.linkMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Selection)return void o.internal.timeRangeMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Event)return void o.internal.eventMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Selection)return void o.internal.timeRangeMenuClick(n.command,a,n.action);if(a instanceof DayPilot.Task)return void("resource"===a.menuType?o.internal.resourceHeaderMenuClick(n.command,t.menuSource,n.action):o.internal.eventMenuClick(n.command,t.menuSource,n.action));switch(a.menuType){case"resource":return void o.internal.resourceHeaderMenuClick(n.command,a,n.action);case"selection":return void o.internal.timeRangeMenuClick(n.command,a,n.action);default:return void o.internal.eventMenuClick(n.command,a,n.action)}i.preventDefault()}};p.onclick=y(h,p),p.ontouchend=y(h,p)}}h.items&&p.addEventListener("click",function(e){e.stopPropagation()}),p.source=s,p.menuSource=i;var g=document.createElement("span");if(g.className=a.Hb("item_text"),g.innerHTML=DayPilot.Util.escapeTextHtml(h.text,h.html),p.appendChild(g),h.image){var b=document.createElement("img");b.src=h.image,b.style.position="absolute",b.style.top="0px",b.style.left="0px",p.appendChild(b)}if(h.icon){var D=document.createElement("span");D.className=a.Hb("item_icon");var w=document.createElement("i");w.className=h.icon,D.appendChild(w),p.appendChild(D)}if(h.symbol){var x="http://www.w3.org/2000/svg",C=document.createElementNS(x,"svg");C.setAttribute("width","100%"),C.setAttribute("height","100%");var P=document.createElementNS(x,"use");P.setAttribute("href",h.symbol),C.appendChild(P);var k=document.createElement("span");k.className=a.Hb("item_symbol"),k.style.position="absolute",k.style.top="0px",k.style.left="0px",k.appendChild(C),p.appendChild(k)}var _=function(e,i){return function(){var n=(i.source,e),o=t.waitingSubmenu;if(o){if(o.parent===n)return;clearTimeout(o.timeout),t.waitingSubmenu=null}e.disabled||(t.waitingSubmenu={},t.waitingSubmenu.parent=n,t.waitingSubmenu.timeout=setTimeout(function(){t.waitingSubmenu=null,a.Ib(n,i)},300))}};p.onmouseover=_(h,p),f.appendChild(p)}d.appendChild(f)}}var S=function(e){window.setTimeout(function(){t.menuClean(),DayPilot.MenuBar.deactivate()},100)};d.onclick=S,d.ontouchend=S,d.onmousedown=function(e){e=e||window.event,e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()},d.oncontextmenu=function(){return!1},document.body.appendChild(d),a.Gb.visible=!0,a.Gb.source=i,d.style.display="";var M=d.offsetHeight,H=d.offsetWidth;d.style.display="none";var T=document.documentElement.clientHeight,A=window.innerWidth,E="number"==typeof o.windowMargin?o.windowMargin:5;if(function(){var e=o.initiator;if(e){var t=e.div,i=e.e,a=e.area,r=a.visibility||a.v||"Visible",s=e.a;if("Visible"!==r&&(s=DayPilot.Areas.createArea(t,i,a),t.appendChild(s),n=s),s){var l=DayPilot.abs(s);o.x=l.x,o.y=l.y+l.h+2}}}(),function(){var e="number"==typeof o.x?o.x:t.mouse.x+1,i="number"==typeof o.y?o.y:t.mouse.y+1,a=document.body.scrollTop||document.documentElement.scrollTop,n=document.body.scrollLeft||document.documentElement.scrollLeft;if(i-a>T-M&&0!==T){var r=i-a-(T-M)+E;d.style.top=i-r+"px"}else d.style.top=i+"px";if("right"===o.align&&(e-=H),e-n>A-H&&0!==A){var s=e-n-(A-H)+E;d.style.left=e-s+"px"}else d.style.left=e+"px"}(),o.parentLink){var N=o.parentLink,I=parseInt(new DayPilot.StyleReader(d).get("border-top-width")),R=DayPilot.abs(o.parentLink.parentNode),B=R.x+N.offsetWidth,z=R.y-I;B+H>A&&(B=Math.max(0,R.x-H));var O=document.body.scrollTop+document.documentElement.scrollTop;z+M-O>T&&(z=Math.max(0,T-M+O)),d.style.left=B+"px",d.style.top=z+"px"}d.style.display="",this.addShadow(d),this.Gb.div=d,o.submenu||(DayPilot.Menu.active=this)}},this.Ib=function(e,t){var i=e,n=t.source;if((!a.Gb.submenu||a.Gb.submenu.item!==e)&&(a.Gb.submenu&&a.Gb.submenu.item!==e&&(DayPilot.Util.removeClass(a.Gb.submenu.link.parentNode,a.Hb("item_haschildren_active")),a.Gb.submenu.menu.hide(),a.Gb.submenu=null),e.items)){var o=a.cloneOptions();o.items=e.items,a.Gb.submenu={},a.Gb.submenu.menu=new DayPilot.Menu(o),a.Gb.submenu.menu.Jb=a,a.Gb.submenu.menu.show(n,{"submenu":!0,"parentLink":t,"parentItem":i}),a.Gb.submenu.item=e,a.Gb.submenu.link=t,DayPilot.Util.addClass(t.parentNode,a.Hb("item_haschildren_active"))}},this.Hb=function(e){var t=this.theme||this.cssClassPrefix,i=this.cssOnly?"_":"";return t?t+i+e:""},this.cloneOptions=function(){return DayPilot.Util.copyProps(o,{},["cssClassPrefix","theme","hideAfter","hideOnMouseOut","zIndex"])},this.hide=function(e){e=e||{},this.Gb.submenu&&this.Gb.submenu.menu.hide();var i=t.waitingSubmenu;if(i&&(t.waitingSubmenu=null,clearTimeout(i.timeout)),this.removeShadow(),this.Gb.div&&this.Gb.div.parentNode===document.body&&document.body.removeChild(this.Gb.div),n&&(DayPilot.de(n),n=null),a.Gb.visible=!1,a.Gb.source=null,a.Jb&&e.hideParent&&a.Jb.hide(e),DayPilot.Menu.active===a&&(DayPilot.Menu.active=null),"function"==typeof this.onHide){var o={};this.onHide(o)}},this.delayedHide=function(e){t.hideTimeout=setTimeout(function(){a.hide(e)},a.hideAfter)},this.cancelHideTimeout=function(){clearTimeout(t.hideTimeout)},this.init=function(e){return t.mouseMove(e),this},this.addShadow=function(e){},this.removeShadow=function(){};var o=DayPilot.isArray(i)?null:i;if(o)for(var r in o)this[r]=o[r]},DayPilot.MenuBar=function(e,t){var i=this;t=t||{},this.items=[],this.theme="menubar_default",this.windowMargin=0,this.nav={},this.elements={},this.elements.items=DayPilot.list(),this.k=null,this.Ba=!1;for(var a in t)this[a]=t[a];this.Kb=function(e){return this.theme+"_"+e},this.t=function(){this.nav.top=document.getElementById(e);var t=this.nav.top;t.className=this.Kb("main"),DayPilot.list(i.items).forEach(function(e){var a=document.createElement("span");a.innerHTML=DayPilot.Util.escapeTextHtml(e.text,e.html),a.className=i.Kb("item"),e.cssClass&&a.classList.add(e.cssClass),a.data=e,a.onclick=function(t){if(i.active&&i.active.item===e)i.Lb();else if(e.children)return void i.Mb(a);if("function"==typeof e.onClick){var n={};n.item=e,n.originalEvent=t,e.onClick(n)}},a.onmousedown=function(e){e.stopPropagation()},a.onmouseover=function(){i.active&&i.active.item!==e&&i.Mb(a)},t.appendChild(a),i.elements.items.push(a)})},this.Lb=function(){var e=i.Kb("item_active");i.elements.items.forEach(function(t){DayPilot.Util.removeClass(t,e)}),i.active&&i.active.menu&&i.active.menu.hide(),i.active=null},this.Nb=function(e){return!!i.active&&i.active.item===e.data},this.Mb=function(e){if(!i.Nb(e)){i.Lb();var t=e.data,a=i.active={};a.item=t,a.div=e;var n=i.Kb("item_active");DayPilot.Util.addClass(e,n);var o=DayPilot.abs(e);if(t.children){a.menu=new DayPilot.Menu({"items":t.children});var r=o.x;"right"===t.align&&(r+=o.w),a.menu.show(null,{"x":r,"y":o.y+o.h,"align":t.align,"windowMargin":i.windowMargin})}DayPilot.MenuBar.active=i}},this.init=function(){return this.t(),this.Ba=!0,this},this.dispose=function(){this.Ba&&(this.nav.top.innerHTML="",this.elements.items=[])}},DayPilot.MenuBar.deactivate=function(){DayPilot.MenuBar.active&&(DayPilot.MenuBar.active.Lb(),DayPilot.MenuBar.active=null)},t.menuClean=function(){"undefined"!=typeof DayPilot.Menu.active&&DayPilot.Menu.active&&(DayPilot.Menu.active.hide(),DayPilot.Menu.active=null)},t.mouseDown=function(e){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.wheel=function(e){"undefined"!=typeof t&&(t.menuClean(),DayPilot.MenuBar.deactivate())},t.mouseMove=function(e){"undefined"!=typeof t&&(t.mouse=t.mousePosition(e))},t.touchMove=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchStart=function(e){"undefined"!=typeof t&&(t.mouse=t.touchPosition(e))},t.touchEnd=function(e){},t.touchPosition=function(e){if(!e||!e.touches)return null;var t=e.touches[0],i={};return i.x=t.pageX,i.y=t.pageY,i},t.mousePosition=function(e){return DayPilot.mo3(null,e)},DayPilot.Menu.touchPosition=function(e){e.touches&&(t.mouse=t.touchPosition(e))},DayPilot.Menu.hide=function(e){if(e=e||{},e.calendar){var i=DayPilot.Menu.active;if(i){var a=i.Gb.source;a&&a.calendar===e.calendar&&t.menuClean()}}else t.menuClean()},t.handlersRegistered||"undefined"==typeof document||(DayPilot.re(document,"mousemove",t.mouseMove),DayPilot.re(document,"mousedown",t.mouseDown),DayPilot.re(document,"wheel",t.wheel),DayPilot.re(document,"touchmove",t.touchMove),DayPilot.re(document,"touchstart",t.touchStart),DayPilot.re(document,"touchend",t.touchEnd),t.handlersRegistered=!0),DayPilot.Menu.def={}}}(DayPilot),"undefined"==typeof DayPilot&&(DayPilot={}),function(DayPilot){"use strict";function e(t,i,a){var n=i.indexOf(".");if(n===-1)return void("__proto__"!==i&&"constructor"!==i&&(t[i]=a));var o=i.substring(0,n);if("__proto__"!==o&&"constructor"!==o){var r=i.substring(n+1),s=t[o];"object"==typeof s&&null!==s||(t[o]={},s=t[o]),e(s,r,a)}}function t(e,i,a){i=i||{},a=a||"";for(var n in e){var o=e[n];"object"==typeof o?"[object Array]"===Object.prototype.toString.call(o)?i[a+n]=o:o&&o.toJSON?i[a+n]=o.toJSON():t(o,i,a+n+"."):i[a+n]=o}return i}if(!DayPilot.ModalStatic){DayPilot.ModalStatic={},DayPilot.ModalStatic.list=[],DayPilot.ModalStatic.hide=function(){if(this.list.length>0){var e=this.list.pop();e&&e.hide()}},DayPilot.ModalStatic.remove=function(e){for(var t=DayPilot.ModalStatic.list,i=0;i<t.length;i++)if(t[i]===e)return void t.splice(i,1)},DayPilot.ModalStatic.close=function(e){DayPilot.ModalStatic.result(e),DayPilot.ModalStatic.hide()},DayPilot.ModalStatic.result=function(e){var t=DayPilot.ModalStatic.list;t.length>0&&(t[t.length-1].result=e)},DayPilot.ModalStatic.displayed=function(e){for(var t=DayPilot.ModalStatic.list,i=0;i<t.length;i++)if(t[i]===e)return!0;return!1},DayPilot.ModalStatic.stretch=function(){if(this.list.length>0){var e=this.list[this.list.length-1];e&&e.stretch()}},DayPilot.ModalStatic.last=function(){var e=DayPilot.ModalStatic.list;return e.length>0?e[e.length-1]:null};var i=function(){if("undefined"==typeof window){var e={};return e.add=function(){},e.commit=function(){},e}var t=document.createElement("style");t.setAttribute("type","text/css"),t.styleSheet||t.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(t);var i=!!t.styleSheet,e={};return e.rules=[],e.commit=function(){try{i&&(t.styleSheet.cssText=this.rules.join("\n"))}catch(e){}},e.add=function(e,a,n){if(i)return void this.rules.push(e+"{"+a+"}");if(t.sheet.insertRule)"undefined"==typeof n&&(n=t.sheet.cssRules.length),t.sheet.insertRule(e+"{"+a+"}",n);else{if(!t.sheet.addRule)throw"No CSS registration method found";t.sheet.addRule(e,a,n)}},e},a="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",n=new i;
|
|
13
13
|
n.add(".modal_default_main","border: 10px solid #ccc; max-width: 90%;"),n.add(".modal_default_main:focus","outline: none;"),n.add(".modal_default_content","padding: 10px 0px;"),n.add(".modal_default_inner","padding: 20px;"),n.add(".modal_default_input","padding: 10px 0px;"),n.add(".modal_default_buttons","margin-top: 10px;"),n.add(".modal_default_buttons","padding: 10px 0px;"),n.add(".modal_default_form_item","padding: 10px 0px; position: relative;"),n.add(".modal_default_form_item_level1","border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"),n.add(".modal_default_form_item.modal_default_form_title","font-size: 1.5rem; font-weight: bold;"),n.add(".modal_default_form_item input[type=text]","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item textarea","width: 100%; height: 200px; box-sizing: border-box;"),n.add(".modal_default_form_item input[type=select]","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item label","display: block;"),n.add(".modal_default_form_item select","width: 100%; box-sizing: border-box;"),n.add(".modal_default_form_item_label","margin: 2px 0px;"),n.add(".modal_default_form_item_image img","max-width: 100%; height: auto;"),n.add(".modal_default_form_item_invalid",""),n.add(".modal_default_form_item_invalid_message","position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"),n.add(".modal_default_background","opacity: 0.5; background-color: #000;"),n.add(".modal_default_ok","padding: 3px; width: 80px;"),n.add(".modal_default_cancel","padding: 3px; width: 80px;"),n.add(".modal_default_form_item_date","position: relative;"),n.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&&n.add(".modal_default_form_item_date input::-ms-clear","display: none;"),n.add(".modal_default_form_item_scrollable_scroll","width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"),n.add(".modal_default_form_item_scrollable_scroll_content","padding: 5px;"),n.add(".modal_default_form_item_searchable","position: relative;"),n.add(".modal_default_form_item_searchable_icon",""),n.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("+a+");"),n.add(".modal_default_form_item_searchable_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),n.add(".modal_default_form_item_searchable_list_item","background: white; padding: 2px; cursor: default;"),n.add(".modal_default_form_item_searchable_list_item_highlight","background: #ccc;"),n.add(".modal_default_form_item_time","position: relative;"),n.add(".modal_default_form_item_time_icon",""),n.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("+a+");"),n.add(".modal_default_form_item_time_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),n.add(".modal_default_form_item_time_list_item","background: white; padding: 2px; cursor: default;"),n.add(".modal_default_form_item_time_list_item_highlight","background: #ccc;"),n.add(".modal_default_form_item_datetime_parent","display: flex;"),n.add(".modal_default_form_item_datetime .modal_default_form_item_time_main","margin-left: 5px;"),n.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ",""),n.add(".modal_default_form_item_tabular_main","margin-top: 10px;"),n.add(".modal_default_form_item_tabular_table","display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"),n.add(".modal_default_form_item_tabular_tbody","display: table-row-group;"),n.add(".modal_default_form_item_tabular_row","display: table-row;"),n.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header",""),n.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction","padding: 0px; width: 23px;"),n.add(".modal_default_form_item_tabular_cell","display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"),n.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell","padding-left: 0px; padding-bottom: 0px;"),n.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;"),n.add(".modal_default_form_item_tabular_table select","width:100%; height:100%; box-sizing: border-box;"),n.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;"),n.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==\")"),n.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;"),n.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==\")"),n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus","display: none;"),n.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus","display: none;"),n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete","visibility: hidden;"),n.add(".modal_default_form_item_tabular_empty","height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"),n.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell","padding: 0px;"),n.add(".modal_min_main","border: 1px solid #ccc; max-width: 90%;"),n.add(".modal_min_background","opacity: 0.5; background-color: #000;"),n.add(".modal_min_ok","padding: 3px 10px;"),n.add(".modal_min_cancel","padding: 3px 10px;"),n.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;"),n.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after","box-sizing: content-box;"),n.add(".navigator_modal_month","font-size: 11px;"),n.add(".navigator_modal_day","color: black;"),n.add(".navigator_modal_weekend","background-color: #f0f0f0;"),n.add(".navigator_modal_dayheader","color: black;"),n.add(".navigator_modal_line","border-bottom: 1px solid #c0c0c0;"),n.add(".navigator_modal_dayother","color: gray;"),n.add(".navigator_modal_todaybox","border: 1px solid red;"),n.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),n.add(".navigator_modal_busy","font-weight: bold;"),n.add(".navigator_modal_cell","text-align: center;"),n.add(".navigator_modal_select .navigator_modal_cell_box","background-color: #FFE794; opacity: 0.5;"),n.add(".navigator_modal_title","text-align: center;"),n.add(".navigator_modal_titleleft, .navigator_modal_titleright","text-align: center;"),n.add(".navigator_modal_dayheader","text-align: center;"),n.add(".navigator_modal_weeknumber","text-align: center;"),n.add(".navigator_modal_cell_text","cursor: pointer;"),n.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.Ob=!1,this.Pb=null,this.Qb=null,this.showHtml=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.div||this.Rb(),this.hb(),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.hb(),this.Sb(),this.Tb()},this.showUrl=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.useIframe){this.div||this.Rb();var i=this.loadingHtml;i&&(this.iframe.src="about:blank",this.setInnerHTML(this.id+"iframe",i)),this.re(this.iframe,"load",this.Ub),this.iframe.src=e,this.hb(),this.Sb(),this.Tb()}else t.Vb({"url":e,"success":function(e){var i=e.request.responseText;t.showHtml(i)},"error":function(e){t.showHtml("Error loading the modal dialog")}})},this.Tb=function(){if("function"==typeof t.onShow){var e={};e.root=t.Wb(),e.modal=t,t.onShow(e)}},this.Wb=function(){return t.iframe?t.iframe.contentWindow.document:t.div},this.Vb=function(e){var t=new XMLHttpRequest;if(t){var i=e.method||"GET",a=e.success||function(){},n=e.error||function(){},o=e.data,r=e.url;t.open(i,r,!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(n){var e={};e.request=t,n(e)}else window.console&&console.log("HTTP error "+t.status)},4!==t.readyState&&("object"==typeof o&&(o=JSON.stringify(o)),t.send(o))}},this.hb=function(){delete this.result;var e=window,i=document,a=e.pageYOffset?e.pageYOffset:i.documentElement&&i.documentElement.scrollTop?i.documentElement.scrollTop:i.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.Yb(),DayPilot.ModalStatic.remove(this),DayPilot.ModalStatic.list.push(this)},this.Ub=function(){t.iframe.contentWindow.modal=t,t.autoStretch&&t.stretch()},this.stretch=function(){var e=function(){return t.Xb().y},i=function(){return t.Xb().x};if(this.useIframe){for(var a=i()-40,n=this.width;n<a&&this.Zb();n+=10)this.div.style.width=n+"px",this.div.style.marginLeft="-"+Math.floor(n/2)+"px";for(var o=this.maxHeight||e()-2*this.top,r=this.height;r<o&&this.$b();r+=10)this.iframe.style.height=r+"px",this.div.style.height=r+"px";this.autoStretchFirstLoadOnly&&this.ue(this.iframe,"load",this.Ub)}else this.div.style.height=""},this.Zb=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,i=t.scrollWidth,a=e.body.children,n=0;n<a.length;n++){var o=a[n].offsetLeft+a[n].offsetWidth;i=Math.max(i,o)}return i>t.clientWidth},this.$b=function(){for(var e=this.iframe.contentWindow.document,t="BackCompat"===e.compatMode?e.body:e.documentElement,i=t.scrollHeight,a=e.body.children,n=0;n<a.length;n++){var o=a[n].offsetTop+a[n].offsetHeight;i=Math.max(i,o)}return i>t.clientHeight},this.Xb=function(){var e=document;if("CSS1Compat"===e.compatMode&&e.documentElement&&e.documentElement.clientWidth){var t=e.documentElement.clientWidth,i=e.documentElement.clientHeight;return{x:t,y:i}}var t=e.body.clientWidth,i=e.body.clientHeight;return{x:t,y:i}},this.Sb=function(){this.Ob||(this.re(window,"resize",this._b),this.re(window,"scroll",this.bc),this.dragDrop&&(this.re(document,"mousemove",this.cc),this.re(document,"mouseup",this.dc)),this.Ob=!0)},this.ec=function(){this.ue(window,"resize",this._b),this.ue(window,"scroll",this.bc),this.dragDrop&&(this.ue(document,"mousemove",this.cc),this.ue(document,"mouseup",this.dc)),this.Ob=!1},this.fc=function(e){e.target===t.div&&(e.preventDefault(),t.div.style.cursor="move",t.gc(),t.Qb=t.mc(e||window.event),t.Pb={x:t.div.offsetLeft,y:t.div.offsetTop})},this.cc=function(e){if(t.Qb){var e=e||window.event,i=t.mc(e),a=i.x-t.Qb.x,n=i.y-t.Qb.y;t.div.style.marginLeft="0px",t.div.style.top=t.Pb.y+n+"px",t.div.style.left=t.Pb.x+a+"px"}},this.dc=function(e){t.Qb&&(t.hc(),t.div.style.cursor=null,t.Qb=null)},this.gc=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.hc=function(){this.useIframe&&(this.div.removeChild(this.mask),this.mask=null)},this._b=function(){t.ic(),t.Yb()},this.bc=function(){t.ic()},this.Yb=function(){if(!t.left&&t.div){var e=t.div.offsetWidth;t.div.style.marginLeft="-"+Math.floor(e/2)+"px"}},this.ic=function(){if(t.hideDiv&&t.div&&"none"!==t.hideDiv.style.display&&"none"!==t.div.style.display){var e=t.jc.scrollY();t.scrollWithPage||(t.div.style.top=e+t.top+"px")}},this.jc={},this.jc.container=function(){return t.container||document.body},this.jc.scrollY=function(){var e=t.jc.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,i){e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i)},this.ue=function(e,t,i){e.removeEventListener?e.removeEventListener(t,i,!1):e.detachEvent&&e.detachEvent("on"+t,i)},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.Rb=function(){var e=t.jc.container(),i=e===document.body,a=i?"fixed":"absolute",n=document.createElement("div");n.id=this.id+"hide",n.style.position=a,n.style.left="0px",n.style.top="0px",n.style.right="0px",n.style.bottom="0px",n.oncontextmenu=function(){return!1},n.onmousedown=function(){return!1},e.appendChild(n);var o=document.createElement("div");o.id=this.id+"popup",o.style.position=a,o.style.left="50%",o.style.top="0px",o.style.backgroundColor="white",o.style.width="50px",o.style.height="50px",this.dragDrop&&(o.onmousedown=this.fc),o.addEventListener("keydown",function(e){e.stopPropagation()});var r=null;this.useIframe&&(r=document.createElement("iframe"),r.id=this.id+"iframe",r.name=this.id+"iframe",r.frameBorder="0",r.style.width="100%",r.style.height="50px",o.appendChild(r)),e.appendChild(o),this.div=o,this.iframe=r,this.hideDiv=n},this.setInnerHTML=function(e,i){var a=window.frames[e],n=a.contentWindow||a.document||a.contentDocument;n.document&&(n=n.document),null==n.body&&n.write("<body></body>"),i.nodeType?n.body.appendChild(i):n.body.innerHTML=i,t.autoStretch&&(t.autoStretchFirstLoadOnly&&t.kc||(t.stretch(),t.kc=!0))},this.close=function(e){this.result=e,this.hide()},this.closeSerialized=function(){for(var e=t.Wb(),i=e.querySelectorAll("input, textarea, select"),a={},n=0;n<i.length;n++){var o=i[n],r=o.name;if(r){var s=o.value;a[r]=s}}t.close(a)},this.hide=function(e){e=e||{};var i={};i.backgroundClick=!!e.backgroundClick,i.result=this.result,i.canceled="undefined"==typeof this.result,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof this.onClose&&(this.onClose(i),i.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(i):this.closed&&this.closed(),delete this.result,this.disposeOnClose&&(t.ec(),t.lc(t.div),t.lc(t.hideDiv),t.div=null,t.hideDiv=null,t.iframe=null))},this.lc=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},this.nc=function(){if(e)for(var t in e)this[t]=e[t]},this.nc()},DayPilot.Modal.alert=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var i=t.okText||"OK";t.cancelText||"Cancel";return DayPilot.getPromise(function(a,n){t.onClosed=function(e){a(e)};var o=new DayPilot.Modal(t),r=document.createElement("div");r.className=o.theme+"_inner";var s=document.createElement("div");s.className=o.theme+"_content",s.innerHTML=e;var l=document.createElement("div");l.className=o.theme+"_buttons";var d=document.createElement("button");d.innerText=i,d.className=o.theme+"_ok",d.onclick=function(e){DayPilot.ModalStatic.close("OK")},l.appendChild(d),r.appendChild(s),r.appendChild(l),o.showHtml(r),o.autoFocus&&d.focus()})},DayPilot.Modal.confirm=function(e,t){t=t||{},t.height=t.height||40,t.useIframe=!1;var i=t.okText||"OK",a=t.cancelText||"Cancel";return DayPilot.getPromise(function(n,o){t.onClosed=function(e){n(e)};var r=new DayPilot.Modal(t),s=document.createElement("div");s.className=r.theme+"_inner";var l=document.createElement("div");l.className=r.theme+"_content",l.innerHTML=e;var d=document.createElement("div");d.className=r.theme+"_buttons";var c=document.createElement("button");c.innerText=i,c.className=r.theme+"_ok",c.onclick=function(e){DayPilot.ModalStatic.close("OK")};var u=document.createTextNode(" "),h=document.createElement("button");h.innerText=a,h.className=r.theme+"_cancel",h.onclick=function(e){DayPilot.ModalStatic.close()},d.appendChild(c),d.appendChild(u),d.appendChild(h),s.appendChild(l),s.appendChild(d),r.showHtml(s),r.autoFocus&&c.focus()})},DayPilot.Modal.prompt=function(e,t,i){"object"==typeof t&&(i=t,t=""),i=i||{},i.height=i.height||40,i.useIframe=!1;var a=i.okText||"OK",n=i.cancelText||"Cancel",o=t||"";return DayPilot.getPromise(function(t,r){i.onClosed=function(e){t(e)};var s=new DayPilot.Modal(i),l=document.createElement("div");l.className=s.theme+"_inner";var d=document.createElement("div");d.className=s.theme+"_content",d.innerHTML=e;var c=document.createElement("div");c.className=s.theme+"_input";var u=document.createElement("input");u.value=o,u.style.width="100%",u.onkeydown=function(e){var t=!1;switch(e.keyCode){case 13:s.close(this.value);break;case 27:s.close();break;default:t=!0}t||(e.preventDefault(),e.stopPropagation())},c.appendChild(u);var h=document.createElement("div");h.className=s.theme+"_buttons";var f=document.createElement("button");f.innerText=a,f.className=s.theme+"_ok",f.onclick=function(e){s.close(u.value)};var m=document.createTextNode(" "),p=document.createElement("button");p.innerText=n,p.className=s.theme+"_cancel",p.onclick=function(e){s.close()},h.appendChild(f),h.appendChild(m),h.appendChild(p),l.appendChild(d),l.appendChild(c),l.appendChild(h),s.showHtml(l),s.autoFocus&&u.focus()})};var o=function(e){return"[object Array]"===Object.prototype.toString.call(e)};DayPilot.Modal.form=function(t,i,a){if(1===arguments.length){var n=t;if(o(n))i={};else{if("object"!=typeof n)throw"Invalid DayPilot.Modal.form() parameter";i=t,t=[];for(var s in i){var l={};l.name=s,l.id=s,t.push(l)}}}var d={};for(var s in a)d[s]=a[s];d.height=d.height||40,d.useIframe=!1;var c=d.okText||"OK",u=d.cancelText||"Cancel";return DayPilot.getPromise(function(a,n){d.onClosed=function(t){if(t.result){var n=JSON.parse(JSON.stringify(i));for(var o in t.result)e(n,o,t.result[o]);t.result=n}a(t)};var o=new DayPilot.Modal(d),s=document.createElement("div");s.className=o.theme+"_inner";var l=document.createElement("div");l.className=o.theme+"_input";var h=new r({theme:o.theme,form:t,data:i,zIndex:o.zIndex,locale:o.locale,plugins:o.plugins,onKey:function(e){switch(e.key){case"Enter":h.validate()&&o.close(h.serialize());break;case"Escape":o.close()}},onChange:function(e){"function"==typeof o.onChange&&o.onChange(e)}}),f=h.create();l.append(f);var m=document.createElement("div");m.className=o.theme+"_buttons";var p=document.createElement("button");p.innerText=c,p.className=o.theme+"_ok",d.okDisabled&&(p.disabled=!0),p.onclick=function(e){h.validate()&&o.close(h.serialize())};var v=document.createTextNode(" "),y=document.createElement("button");if(y.innerText=u,y.className=o.theme+"_cancel",y.onclick=function(e){o.close()},y.onmousedown=function(e){h.canceling=!0},m.appendChild(p),m.appendChild(v),m.appendChild(y),s.appendChild(l),s.appendChild(m),o.showHtml(s),o.div.setAttribute("tabindex","-1"),o.div.addEventListener("keydown",function(e){switch(e.keyCode){case 27:o.close();break;case 13:h.validate()&&o.close(h.serialize())}}),o.focus){var g=null;if("object"==typeof o.focus){var b=o.focus.id,D=o.focus.value;g=h.findViewById(b,D)}else"string"==typeof o.focus&&(g=h.findViewById(o.focus));g&&g.focus()}else{var w=h.firstFocusable();o.autoFocus&&w?w.focus():o.div.focus()}})},DayPilot.Modal.close=function(e){var t=DayPilot.Modal.opener();t&&t.close(e)},DayPilot.Modal.stretch=function(e){var t=DayPilot.Modal.opener();if(!t)throw"Unable to find the opener DayPilot.Modal instance.";t.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]},DayPilot.Modal.Experimental={},DayPilot.Modal.Experimental.Form=r,"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,i){return t=t||function(){},i=i||function(){},e(t,i),DayPilot.getPromise(e)},this["catch"]=function(i){return t.then(null,i),DayPilot.getPromise(e)}},new DayPilot.Promise(e))});var r=function(e){this.form=[],this.data={},this.theme="form_default",this.zIndex=99999,this.locale="en-us",this.plugins={},this.onKey=null,this.oc=[],this.pc=null,this.canceling=!1,this.qc=[],this.f=[],this.rc=null,e=e||{};for(var t in e)this[t]=e[t]};r.prototype.create=function(){return this.load(),this.render(),this.rc},r.prototype.render=function(){var e=this;this.rc=document.createElement("div"),this.oc.forEach(function(t){e.createView(t)}),this.applyState()},r.prototype.createView=function(e){var t=this.theme,i=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 n=document.createElement("div");n.className=t+"_form_item_label",n.innerText=e.text,a.appendChild(n)}var o=this.createInteractive(e);o.onInput=function(e){if(e=e||{},i.sc(o,{"debounce":!e.immediate}),"function"==typeof i.onChange){var t={};t.result=i.serialize(),i.onChange(t)}},o.onBlur=function(){i.canceling||i.sc(o)},o.apply(e),o.rc=a,o.row=e,o.element&&a.appendChild(o.element),this.f.push(o),this.rc.appendChild(a)},r.prototype.validate=function(){var e=this,t=!0;return this.f.forEach(function(i){var a=e.sc(i);t=t&&a}),t},r.prototype.sc=function(e,t){function i(){e.tc&&(e.tc.remove(),e.tc=null),e.rc.classList.add(u);var t=document.createElement("div");t.classList.add(h),t.innerText=c.message,e.tc=t,e.rc.appendChild(t)}t=t||{};var a=t.debounce,n=t.silent,o=e.row,r=!0,s="function"==typeof o.data.onValidate?o.data.onValidate:null,l="function"==typeof o.data.validate?o.data.validate:null,d=s||l;if(d){var c={};c.valid=!0,c.value=e.save()[o.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.qc[o.field]),e.tc&&(e.tc.remove(),e.tc=null),e.rc.classList.remove(u);else if(!n)if(a){var f=1e3;clearTimeout(this.qc[o.field]),this.qc[o.field]=setTimeout(function(){i()},f)}else i();r=c.valid}return r},r.prototype.load=function(){var e=this;this.form.forEach(function(t){e.processFormItem(t,0)});var i;try{var a=JSON.stringify(this.data);i=t(JSON.parse(a))}catch(e){throw new Error("The 'data' object is not serializable (it may contain circular dependencies): "+e)}for(var n in i)this.setValue(n,i[n])},r.prototype.setValue=function(e,t){this.oc.forEach(function(i){i.applyValue(e,t)})},r.prototype.updateDependentState=function(){var e=this,t=[!0];(this.pc?this.pc:this.oc).forEach(function(i){var a=e.updateState(i,{enabled:t[i.level]&&!i.data.disabled});a.isValue&&(t[a.level+1]=a.enabled&&a.checked)})},r.prototype.processFormItem=function(e,t){var i=this,a=this.getFieldType(e),n=[];if("radio"===a){if(e.name){var o=new s;o.field=e.id,o.data=e,o.level=t,o.type="label",o.interactive=!1,o.text=e.name,i.oc.push(o),n.push(o)}e.options.forEach(function(o){var r=new s;r.field=e.id,r.data=o,r.level=t,r.type=a,r.isValue=!0,r.text=o.name,r.resolved=o.id,i.oc.push(r),
|
|
14
|
-
n.push(r),o.children&&o.children.forEach(function(e){var a=i.processFormItem(e,t+1);n=n.concat(a)})})}else if("title"===a){var o=new s;o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=e.name,i.oc.push(o),n.push(o)}else if("image"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.oc.push(o),n.push(o)}else if("html"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.oc.push(o),n.push(o)}else if("scrollable"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.oc.push(o),n.push(o)}else{var o=new s;o.field=e.id,o.data=e,o.level=t,o.type=a,o.text=e.name,o.children=[],i.oc.push(o),n.push(o)}return"checkbox"===a&&(o.isValue=!0,o.resolved=!0,e.children&&e.children.forEach(function(e){var a=i.processFormItem(e,t+1);n=n.concat(a)})),n},r.prototype.doOnKey=function(e){if("function"==typeof this.onKey){var t={key:e};this.onKey(t)}},r.prototype.createInteractive=function(e){var t=this,i={"label":function(){return new l},"title":function(){return new l},"image":function(){var t=new l,i=document.createElement("img");return i.src=e.data.image,t.element=i,t},"html":function(){var t=new l,i=document.createElement("div");return"string"==typeof e.data.text?i.innerText=e.data.text:"string"==typeof e.data.html&&(i.innerHTML=e.data.html),t.element=i,t},"scrollable":function(){var i=new l,a=document.createElement("div");a.className=t.theme+"_form_item_scrollable_scroll",e.data.height&&(a.style.height=e.data.height+"px");var n=document.createElement("div");return n.className=t.theme+"_form_item_scrollable_scroll_content","string"==typeof e.data.text?n.innerText=e.data.text:"string"==typeof e.data.html&&(n.innerHTML=e.data.html),a.appendChild(n),i.element=a,i},"text":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.element;t.value=e.value,t.disabled=!e.enabled};var a=document.createElement("input");return a.name=e.field,a.type="text",a.autocomplete="off",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:t.doOnKey("Enter");break;case 27:t.doOnKey("Escape");break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus(),i.element.setSelectionRange(0,i.element.value.length)},i.save=function(){var t={};return t[e.field]=a.value,t},i},"textarea":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.element;t.value=e.value,t.disabled=!e.enabled};var a=document.createElement("textarea");return a.name=e.field,e.data.height&&(a.style.height=e.data.height+"px"),a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:(e.ctrlKey||e.metaKey)&&t.doOnKey("Enter"),i=!1;break;case 27:t.doOnKey("Escape");break;default:i=!0}i||e.stopPropagation()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus(),i.element.setSelectionRange(0,0)},i.save=function(){var t={};return t[e.field]=a.value,t},i},"date":function(){var i=new l;i.apply=function(e){i.row=e;var a=i.element,n=i.picker;e.data.dateFormat&&(n.pattern=e.data.dateFormat);var o=e.data.locale||t.locale;o&&(n.locale=o),a.disabled=!e.enabled,n.date=new DayPilot.Date(e.value);var r=new DayPilot.Date(e.value).toString(e.data.dateFormat||n.pattern,n.locale);a.value=r};var a=document.createElement("input");a.name=e.field;var n=new DayPilot.DatePicker({target:a,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(e){i.onInput({"immediate":!0})}});return a.picker=n,a.className=t.theme+"_input_date",a.type="text",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:n.visible?n.close():t.doOnKey("Enter");break;case 27:n.visible?n.close():t.doOnKey("Escape");break;case 9:n.close(),i=!0;break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.onfocus=function(){n.show()},a.onclick=function(){n.show()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.picker=n,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus()},i.save=function(){var t=n.date?n.date.toString():null,i={};return i[e.field]=t,i},i},"time":function(){return t.uc(e)},"datetime":function(){return t.vc(e)},"select":function(){var t=new l;t.apply=function(e){t.row=e;var i=t.element;i.value=e.value,i.disabled=!e.enabled};var i=document.createElement("select");return i.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.wc=e.id,i.appendChild(t)}),i.onchange=function(e){t.onInput({"immediate":!0})},i.onblur=function(e){t.onBlur()},t.element=i,t.canFocus=function(){return!t.element.disabled},t.focus=function(){t.element.focus()},t.save=function(){var t=null,a=i.options[i.selectedIndex];a&&"undefined"!=typeof a.wc&&(t=a.wc);var n={};return n[e.field]=t,n},t},"searchable":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.searchable;t.disabled=!e.enabled,t.select(e.value)};var a=new d({data:e.data.options||[],name:e.field,theme:t.theme+"_form_item_searchable",listZIndex:t.zIndex+1,onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}}),n=a.create();return i.element=n,i.searchable=a,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.searchable.focus()},i.save=function(){var t=a.selected&&a.selected.id,i={};return i[e.field]=t,i},i},"radio":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.radio;t.checked=e.checked,t.disabled=!e.enabled};var a=document.createElement("label"),n=document.createElement("input");n.type="radio",n.name=e.field,n.wc=e.resolved,n.onchange=function(e){var a=i.row;t.findRowsByField(a.field).forEach(function(e){t.updateState(e,{checked:!1})}),t.updateState(a,{checked:!0}),t.applyState(),i.onInput({"immediate":!0})},n.onblur=function(e){i.onBlur()},a.appendChild(n);var o=document.createTextNode(e.text);return a.append(o),i.element=a,i.radio=n,i.canFocus=function(){return!1},i.focus=function(){i.radio.focus()},i.save=function(){if(!n.checked)return{};var t=n.wc,i={};return i[e.field]=t,i},i},"checkbox":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.checkbox;t.checked=e.checked,t.disabled=!e.enabled};var a=document.createElement("label"),n=document.createElement("input");n.type="checkbox",n.name=e.field,n.wc=e.resolved,n.onchange=function(e){var a=i.row;t.updateState(a,{checked:this.checked}),t.applyState(),i.onInput({"immediate":!0})},n.onblur=function(e){i.onBlur()},a.appendChild(n);var o=document.createTextNode(e.text);return a.append(o),i.element=a,i.checkbox=n,i.canFocus=function(){return!1},i.focus=function(){i.checkbox.focus()},i.save=function(){var t=n.checked,i={};return i[e.field]=t,i},i},"table":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.table;t.disabled=!e.enabled,t.load(e.value||[])};var a=new c({name:e.field,form:t,theme:t.theme+"_form_item_tabular",item:e.data,onInput:function(e){i.onInput()}}),n=a.create();return i.element=n,i.table=a,i.canFocus=function(){return!1},i.focus=function(){i.table.focus()},i.save=function(){var t=a.save(),i={};return i[e.field]=t,i},i}};return t.plugins&&t.plugins[e.type]?t.plugins[e.type](e):i[e.type]()},r.prototype.uc=function(e){var t=this,i=new l;i.apply=function(e){i.row=e;var t=i.searchable;t.disabled=!e.enabled,t.select(e.value)};var a=[],n=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(n)||(n=15);for(var o=60/n,r=e.data.locale||t.locale,s=DayPilot.Locale.find(r)||DayPilot.Locale.US,c=DayPilot.Date.today(),u=0;u<24*o;u++){var h=c.addMinutes(n*u),f={};f.name=h.toString(e.data.timeFormat||s.timePattern,s),f.id=h.toString("HH:mm"),a.push(f)}var m=new d({data:a,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}}),p=m.create();return i.element=p,i.searchable=m,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.searchable.focus()},i.save=function(){var t=m.selected&&m.selected.id,i={};return i[e.field]=t,i},i},r.prototype.vc=function(e){var t=this,i=new l;i.apply=function(e){i.row=e;var a=i.searchable;a.disabled=!e.enabled;var n=new DayPilot.Date(e.value).toString("HH:mm");a.select(n);var o=i.dateInput,r=i.picker;e.data.dateFormat&&(r.pattern=e.data.dateFormat);var s=e.data.locale||t.locale;if(s){var l=DayPilot.Locale.find(s)||DayPilot.Locale.US;r.locale=s,r.pattern=l.datePattern}o.disabled=!e.enabled,r.date=new DayPilot.Date(e.value);var d=new DayPilot.Date(e.value).toString(e.data.dateFormat||r.pattern,r.locale);o.value=d};var a=function(){var a=document.createElement("input");a.name=e.field;var n=new DayPilot.DatePicker({target:a,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(e){i.onInput({"immediate":!0})}});return a.picker=n,a.className=t.theme+"_input_date",a.type="text",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:n.visible?n.close():t.doOnKey("Enter");break;case 27:n.visible?n.close():t.doOnKey("Escape");break;case 9:n.close(),i=!0;break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.onfocus=function(){n.show()},a.onclick=function(){n.show()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.dateInput=a,i.picker=n,a}(),n=function(){var a=[],n=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(n)||(n=15);for(var o=60/n,r=e.data.locale||t.locale,s=DayPilot.Locale.find(r)||DayPilot.Locale.US,l=DayPilot.Date.today(),c=0;c<24*o;c++){var u=l.addMinutes(n*c),h={};h.name=u.toString(e.data.timeFormat||s.timePattern,s),h.id=u.toString("HH:mm"),a.push(h)}var f=new d({data:a,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}});return i.searchable=f,f.create()}(),o=document.createElement("div");return o.className=t.theme+"_form_item_datetime_parent",o.appendChild(a),o.appendChild(n),i.element=o,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.dateInput.focus()},i.save=function(){var t=i.searchable.selected&&i.searchable.selected.id,a=i.picker.date?i.picker.date.toString():null,n=new DayPilot.Date(a).getDatePart(),o=DayPilot.Date.parse(n.toString("yyyy-dd-MM ")+t,"yyyy-dd-MM HH:mm"),r={};return r[e.field]=o,r},i},r.prototype.findRowsByField=function(e){return this.oc.filter(function(t){return t.field===e})},r.prototype.findViewById=function(e,t){return this.f.find(function(i){return i.row.field===e&&("radio"!==i.row.type||i.row.resolved===t)})},r.prototype.firstFocusable=function(){return this.f.find(function(e){return e.canFocus&&e.canFocus()})},r.prototype.updateState=function(e,t){var i=this.pc?this.pc:this.oc,a=i.indexOf(e);return this.pc=i.map(function(i){if(i!==e)return i;if(e.propsEqual(t))return e;var a=e.clone();for(var n in t)a[n]=t[n];return a}),this.pc[a]},r.prototype.updateInteractive=function(e){var t=this.pc.indexOf(e);this.f[t].apply(e)},r.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.pc){this.pc.filter(function(t,i){return e.oc[i]!==t}).forEach(function(t){e.updateInteractive(t)}),this.oc=this.pc,this.pc=null}},r.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"},r.prototype.serialize=function(){var e={};return this.f.forEach(function(t){var i=t.save();for(var a in i)e[a]=i[a]}),e};var s=function(){this.id=this.guid(),this.field=null,this.data=null,this.type=null,this.level=0,this.enabled=!0,this.value=null,this.text=null,this.interactive=!0,this.isValue=!1,this.checked=!1,this.resolved=null};s.prototype.clone=function(){var e=new s;for(var t in this)"id"!==t&&(e[t]=this[t]);return e},s.prototype.propsEqual=function(e){for(var t in e)if(this[t]!==e[t])return!1;return!0},s.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()},s.prototype.applyValue=function(e,t){this.field===e&&(this.value=t,this.isValue&&t===this.resolved&&(this.checked=!0))};var l=function(){this.element=null,this.canFocus=function(){return!1},this.apply=function(e){},this.focus=function(){},this.save=function(){return{}}},d=function(e){this.data=[],this.name=null,this.theme="searchable_default",this.xc=!1,this.listZIndex=1e5,this.onSelect=null,this.yc=null,this.zc=null,this.Ac=!1,this.Bc=null,this.Cc=null,this.p=[],this.Dc=null,e=e||{};var t=this,i={"selected":{post:function(e){"object"==typeof e&&e.id?t.yc=e:"string"!=typeof e&&"number"!=typeof e||t.select(e)}}};Object.defineProperty(this,"selected",{get:function(){return this.yc}}),Object.defineProperty(this,"disabled",{get:function(){return this.xc},set:function(e){this.xc=e,this.Bc&&(this.Bc.disabled=e,e&&this.Ec())}});for(var a in e)i[a]||(this[a]=e[a]);for(var a in e)i[a]&&i[a].post(e[a])};d.prototype.select=function(e){return this.yc=this.data.find(function(t){return t.id===e}),this.Fc(!1),this},d.prototype.create=function(){function e(e){var i=l.strategy;"includes"!==l.strategy&&"startsWith"!==l.strategy&&(i="includes"),e=e||i||"includes",h.style.display="",h.style.top=m.offsetHeight+"px",h.style.left="0px",h.style.width=m.offsetWidth+"px",h.innerHTML="",h.addEventListener("mousedown",function(e){e.preventDefault()}),l.zc=null,l.p=[];var n=null;l.data.forEach(function(i){var o=i.name||i.id;if("includes"===e){if(o.toLowerCase().indexOf(m.value.toLowerCase())===-1)return}else if("startsWith"===e&&0!==o.toLowerCase().indexOf(m.value.toLowerCase()))return;var r=document.createElement("div");r.className=l.theme+"_list_item",r.innerText=o,r.item=i,i===l.yc&&(l.zc=r),n||(n=r),r.addEventListener("mousedown",function(e){a(r),e.preventDefault()}),r.addEventListener("mousemove",function(e){l.zc!==r&&(l.zc=r,t({dontScroll:!0}))}),h.appendChild(r),l.p.push(r)}),l.zc||(l.zc=n),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.zc&&(l.zc.className+=" "+l.theme+"_list_item_highlight",t&&!i(l.zc,h)&&l.zc.scrollIntoView())}function i(e,t){var i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return i.top>=a.top&&i.bottom<=a.bottom}function a(e){var t=e.item;l.yc=t,l.Fc(!0),o(),r()}function n(){l.Ec()}function o(){l.q()}function r(){l.Ac=!0,m.setAttribute("readonly","readonly"),m.focus()}function s(){l.Ac=!1,m.removeAttribute("readonly"),m.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.Ac?(l.focus(),s()):(n(),r())});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.Dc=f;var m=document.createElement("input");return m.type="text",m.className=this.theme+"_input",m.disabled=this.xc,m.addEventListener("click",function(e){s()}),m.addEventListener("focus",function(t){e("all")}),m.addEventListener("input",function(t){e()}),m.addEventListener("blur",function(e){m.removeAttribute("readonly"),n()}),m.addEventListener("keydown",function(e){if(l.Ac){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;s()}if("ArrowDown"===e.key){var i=d.p.indexOf(d.zc);i+1<d.p.length&&(d.zc=d.p[i+1]),t()}else if("ArrowUp"===e.key){var i=d.p.indexOf(d.zc);i-1>=0&&(d.zc=d.p[i-1]),t()}else"Enter"===e.key?l.zc?(e.stopPropagation(),a(l.zc)):(e.stopPropagation(),n(),r()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),n(),r())}),this.Bc=m,this.Cc=h,this.yc||(this.yc=this.data[0],this.yc&&(m.value=this.yc.name)),c.appendChild(m),c.appendChild(u),c.appendChild(f),c.appendChild(h),c},d.prototype.Ec=function(){this.q(),this.yc?this.Bc.value=this.yc.name:(this.Bc.value="",this.Fc(!0))},d.prototype.focus=function(){this.Ac=!0,this.Bc.setAttribute("readonly","readonly"),this.Bc.focus(),this.Ec()},d.prototype.q=function(){this.Cc.style.display="none"},d.prototype.Fc=function(e){if(this.Dc.value=this.selected?this.selected.id:null,this.yc?this.Bc.value=this.yc.name:this.Bc.value="","function"==typeof this.onSelect){var t={control:this,ui:e};this.onSelect(t)}};var c=function(e){this.form=null,this.item=null,this.data=null,this.name=null,this.theme="edit_table_default",this.onInput=null,this.nav={},this.Gc=null,this.oc=[],e=e||{};for(var t in e)this[t]=e[t]};c.prototype.create=function(){var e=this,t=document.createElement("div");t.className=this.theme+"_main",t.style.position="relative";var i=document.createElement("input");i.type="hidden",i.name=e.name,i.table=this,t.appendChild(i);var a=document.createElement("div");a.className=this.theme+"_table";var n=this.Hc();a.appendChild(n);var o=e.Ic({});o.spacer=!0;var r=this.Jc(o);r.classList.add(e.theme+"_spacer"),a.appendChild(r);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(t){if(!e.disabled){var i=e.item.onNewRow,a={};if("function"==typeof i){var n={};n.result=e.form.serialize(),n.value={},i(n),a=n.value}var o=e.Ic(a);e.oc.push(o),e.Kc(),e.Lc()}}),this.nav.plus=c,d.appendChild(c),t.appendChild(d),t},c.prototype.Hc=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(i){var a=document.createElement("div");a.classList.add(e.theme+"_cell"),a.innerText=i.name,t.appendChild(a)}),t},c.prototype.Mc=function(){var e=this.item.max||0;return!!(e&&this.oc.length>=e)},c.prototype.save=function(){var e=this,t=[];return e.oc.forEach(function(e){var i={};e.cells.forEach(function(e){i[e.id]=e.value}),t.push(i)}),t},c.prototype.load=function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Array expected");this.data=e,this.Nc(),this.Kc()},c.prototype.Oc=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.Mc()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},c.prototype.Nc=function(){var e=this;this.oc=[],this.data.forEach(function(t){var i=e.Ic(t);e.oc.push(i)})},c.prototype.Pc=function(e){var t=this,i=t.oc.indexOf(e);t.oc.splice(i,1)},c.prototype.Ic=function(e){var t=this,i={};return i.data=e,i.cells=[],t.item.columns.forEach(function(a){var n=a.id,o=e[n],r=t.Qc(a);if("undefined"==typeof o)if("text"===r)o="";else if("number"===r)o=0;else if("select"===r){var s=a.options;o=s&&s[0].id}var l={};l.id=n,l.value=o,l.type=r,l.data=a,i.cells.push(l)}),i},c.prototype.Qc=function(e){var t=e.type;return t||(t=e.options?"select":"text"),t},c.prototype.Kc=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.oc.forEach(function(t){var i=e.Jc(t);e.nav.body.appendChild(i)}),0===this.oc.length){var t=e.Rc();e.nav.after.appendChild(t)}this.Oc()},c.prototype.Rc=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},c.prototype.Jc=function(e){var t=this,i=document.createElement("div");i.className=t.theme+"_row",e.cells.forEach(function(a){var n=document.createElement("div");n.className=t.theme+"_cell";var o=t.Sc(a);if(e.spacer){var r=document.createElement("div");r.style.height="0px",r.style.overflow="hidden",r.appendChild(o),n.appendChild(r)}else n.appendChild(o);i.appendChild(n)});var a=document.createElement("div");a.classList.add(t.theme+"_cell"),a.classList.add(t.theme+"_rowaction");var n=document.createElement("span");return n.className=this.theme+"_delete",n.addEventListener("click",function(i){t.disabled||(t.Pc(e),t.Kc(),t.Lc())}),e.spacer||a.appendChild(n),i.appendChild(a),i},c.prototype.Lc=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},c.prototype.Sc=function(e){var t=this,i=e.type;if("text"===i||"number"===i){var a=document.createElement("input");return a.type=i,t.disabled&&(a.disabled=!0),e.value&&(a.value=e.value),a.addEventListener("keyup",function(a){"number"===i?e.value=Number(this.value):e.value=this.value,t.Lc()}),a}if("select"===i){var n=document.createElement("select");return t.disabled&&(n.disabled=!0),e.data.options.forEach(function(t){var i=document.createElement("option");i.innerText=t.name,i.value=t.id,i.wc=t.id,n.appendChild(i),e.value===t.id&&i.setAttribute("selected",!0)}),n.addEventListener("change",function(i){var a=n.options[n.selectedIndex];a&&"undefined"!=typeof a.wc&&(e.value=a.wc),t.Lc()}),n}throw new Error("Unsupported item type: "+i)},c.prototype.focus=function(){}}}(DayPilot),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){if("undefined"==typeof DayPilot.Month||!DayPilot.Month.events){var e={},t=DayPilot.Util.isVueVNode;e.Month=function(i,a){this.v="2024.4.609-lite",this.nav={};var n=this;this.id=i,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.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.O=!1,this.U=function(e,t){var e=JSON.parse(e);return e.CallBackRedirect?void(document.location.href=e.CallBackRedirect):"None"===e.UpdateType?void n.fireAfterRenderDetached(e.CallBackData,!0):(n.events.list=e.Events,"Full"===e.UpdateType&&(n.startDate=e.StartDate,n.timeFormat=e.TimeFormat?e.TimeFormat:n.timeFormat,"undefined"!=typeof e.WeekStarts&&(n.weekStarts=e.WeekStarts),n.hashes=e.Hashes),n.W(),n.Tc(),n.ea(),"Full"===e.UpdateType&&(n.Uc(),n.Vc()),n.ja(),n.show(),n.ka(),void n.fireAfterRenderDetached(e.CallBackData,!0))},this.fireAfterRenderDetached=function(e,t){var i=function(e,t){return function(){n.afterRender&&n.afterRender(e,t)}};window.setTimeout(i(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}n.events.list||(n.events.list=[]),n.events.list.push(t),n.update(),n.sa.notify()},this.events.find=function(e){if(!n.events.list)return null;if("function"==typeof e){for(var t=e,i=0;i<n.events.list.length;i++){var a=new DayPilot.Event(n.events.list[i],n);if(t(a))return a}return null}for(var i=0;i<n.events.list.length;i++){var o=n.events.list[i];if(o.id===e)return new DayPilot.Event(o,n)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=n.events.find(e.id);if(t){var i=DayPilot.indexOf(n.events.list,t.data);n.events.list.splice(i,1,e)}}n.update(),n.sa.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var i=n.events.find(e.id);i&&(t=i.data)}else if("string"==typeof e||"number"==typeof e){var i=n.events.find(e);i&&(t=i.data)}var a=DayPilot.indexOf(n.events.list,t);n.events.list.splice(a,1),n.update(),n.sa.notify()},this.events.load=function(e,t,i){var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},o=function(e){var i,o=e.request;try{i=JSON.parse(o.responseText)}catch(e){var r={};return r.exception=e,void a(r)}if(DayPilot.isArray(i)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=i,"function"==typeof t&&t(s),s.preventDefault.value)return;n.events.list=i,n.Ba&&n.update()}};if(n.eventsLoadMethod&&"POST"===n.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":n.visibleStart().toString(),"end":n.visibleEnd().toString()},"url":e,"success":o,"error":a});else{var r=e,s="start="+n.visibleStart().toString()+"&end="+n.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":r,"success":o,"error":a})}},this.events.forRange=function(e,t){e=new DayPilot.Date(e),t=new DayPilot.Date(t);var i=(n.events.list||[]).map(function(e){return new DayPilot.Event(e)});return i.sort(n.rb),i.filter(function(i){var a=i.start(),n=i.end();return a===n&&a===e||DayPilot.Util.overlaps(e,t,a,n)})},this.update=function(e){if(n.jb(e),this.Ba){if(n.O)throw new DayPilot.Exception("You are trying to update a DayPilot.Month instance that has been disposed.");if(this.cells){n.W(),n.Tc(),n.ea(),n.Uc(),n.Vc(),n.ja(),n.t(),n.ka(),this.visible?this.show():this.hide()}}},this.mb=null,this.jb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?n.events.list=e.list:n.events.list=e}}};this.mb=t;for(var i in e)if(t[i]){var a=t[i];a.data=e[i],a.preInit&&a.preInit()}else n[i]=e[i]}},this.nb=function(){var e=this.mb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.pb={},this.pb.events=[],this.qb=function(e){var t=this.pb.events,i=this.events.list[e],a={};for(var o in i)a[o]=i[o];if("function"==typeof this.onBeforeEventRender){var r={};r.control=n,r.data=a,this.onBeforeEventRender(r)}t[e]=a},this.ea=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.qb(t);for(var i=0;i<e.length;i++){var a=e[i];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 n=new DayPilot.Date(a.start),o=new DayPilot.Date(a.end);if(!(n.getTime()>o.getTime()))for(var t=0;t<this.rows.length;t++){var r=this.rows[t],s=new DayPilot.Event(a,this);r.belongsHere(s)&&(r.events.push(s),"function"==typeof this.onBeforeEventRender&&(s.cache=this.pb.events[i]))}}for(var l=0;l<this.rows.length;l++){var r=this.rows[l];r.events.sort(this.rb);for(var d=0;d<this.rows[l].events.length;d++){var c=r.events[d],u=r.getStartColumn(c),h=r.getWidth(c);r.putIntoLine(c,u,h,l)}}}},this.W=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];n.Ea(t)}this.elements.events=[]},this.Ea=function(e){!function(){var i=e.domArgs;if(e.domArgs=null,i&&"function"==typeof n.onBeforeEventDomRemove&&n.onBeforeEventDomRemove(i),i&&"function"==typeof n.onBeforeEventDomAdd){var a=i&&i.Fa;if(a){n.Ha.Ga&&t(i.element)&&(n.Ha.Ia=!0,n.Ha.Ja(a),n.Ha.Ia=!1)}}}(),e.event=null,e.click=null,e.parentNode.removeChild(e)},this.ka=function(){this.Wc()},this.Wc=function(){this.elements.events=[];for(var e=0;e<this.rows.length;e++)for(var t=this.rows[e],i=0;i<t.lines.length;i++)for(var a=t.lines[i],n=0;n<a.length;n++)this.Ka(a[n])},this.rb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var i=e.start().getTime()-t.start().getTime();return 0!==i?i:t.end().getTime()-e.end().getTime()},this.drawShadow=function(t,i,a,o,r,s){r||(r=0);var l=o;this.shadow={},this.shadow.list=[],this.shadow.start={x:t,y:i},this.shadow.width=o;var d=7*i+t-r;d<0&&(l+=d,t=0,i=0);for(var c=r;c>=7;)i--,c-=7;if(c>t){c>t+(7-this.getColCount())?(i--,t=t+7-c):(l=l-c+t,t=0)}else t-=c;i<0&&(i=0,t=0);var u=null;for(e.resizingEvent?u="w-resize":e.movingEvent&&(u="move"),this.nav.top.style.cursor=u;l>0&&i<this.rows.length;){var h=Math.min(this.getColCount()-t,l),f=this.rows[i],m=this.getRowTop(i),p=f.getHeight(),v=document.createElement("div");v.setAttribute("unselectable","on"),v.style.position="absolute",v.style.left=this.getCellWidth()*t+"%",v.style.width=this.getCellWidth()*h+"%",v.style.top=m+"px",v.style.height=p+"px",v.style.cursor=u,v.classList.add(n.K("_shadow"));var y=document.createElement("div");y.setAttribute("unselectable","on"),v.appendChild(y),y.style.position="absolute",y.style.top="0px",y.style.right="0px",y.style.left="0px",y.style.bottom="0px",y.classList.add(n.K("_shadow_inner")),this.nav.top.appendChild(v),this.shadow.list.push(v),l-=h+7-this.getColCount(),t=0,i++}},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 i=this.headerHeight,a=0;a<e;a++)i+=this.rows[a].getHeight();return i+=this.cellHeaderHeight,i+=t*this.lineHeight()},this.getDateFromCell=function(e,t){return this.firstDate.addDays(7*t+e)},this.Ka=function(i){var a=i.cache||i.data,o=i.part.row,r=i.part.line,s=i.part.colStart,l=i.part.colWidth,d=this.getCellWidth()*s,c=this.getCellWidth()*l,u=this.getEventTop(o,r),h=document.createElement("div");h.setAttribute("unselectable","on"),h.style.height=this.eventHeight+"px",h.className=this.K("_event"),a.cssClass&&DayPilot.Util.addClass(h,a.cssClass),i.part.startsHere||DayPilot.Util.addClass(h,this.K("_event_continueleft")),i.part.endsHere||DayPilot.Util.addClass(h,this.K("_event_continueright")),h.event=i,h.style.width=c+"%",h.style.position="absolute",h.style.left=d+"%",h.style.top=u+"px",this.showToolTip&&i.client.toolTip()&&(h.title=i.client.toolTip()),h.onclick=n.ra,h.oncontextmenu=n.Xc,h.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 d={};d.start={},d.start.x=s,d.start.y=o,d.event=h.event,d.width=DayPilot.DateUtil.daysSpan(d.event.start(),d.event.end())+1,d.direction=this.style.cursor,e.resizingEvent=d}else if("move"===this.style.cursor||i.client.moveEnabled()){n.clearShadow();var c=DayPilot.mo3(n.nav.top,t);if(!c)return;var u=n.getCellBelowPoint(c.x,c.y),f=DayPilot.DateUtil.daysDiff(i.start(),n.rows[o].start),m=7*u.y+u.x-(7*o+s);f&&(m+=f);var p={};p.start={},p.start.x=s,p.start.y=o,p.start.line=r,p.offset=n.eventMoveToPosition?0:m,p.colWidth=l,p.event=h.event,p.coords=c,e.movingEvent=p;
|
|
15
|
-
}},h.onmousemove=function(t){if("undefined"!=typeof e&&!e.movingEvent&&!e.resizingEvent){var a=DayPilot.mo3(h,t);if(a){h.deleteIcon&&(h.deleteIcon.style.display="");var n=6;a.x<=n&&i.client.resizeEnabled()?i.part.startsHere?(h.style.cursor="w-resize",h.dpBorder="left"):h.style.cursor="not-allowed":h.clientWidth-a.x<=n&&i.client.resizeEnabled()?i.part.endsHere?(h.style.cursor="e-resize",h.dpBorder="right"):h.style.cursor="not-allowed":i.client.clickEnabled()?h.style.cursor="pointer":h.style.cursor="default"}}},h.onmouseleave=function(e){h.deleteIcon&&(h.deleteIcon.style.display="none"),h.style.cursor=""},h.onmouseenter=function(e){h.deleteIcon&&(h.deleteIcon.style.display="")};var f=document.createElement("div");if(f.setAttribute("unselectable","on"),f.className=this.K("_event_inner"),"darker"===a.borderColor&&a.backColor?f.style.borderColor=DayPilot.ColorUtil.darker(a.backColor,2):f.style.borderColor=a.borderColor,a.backColor&&(f.style.background=a.backColor),a.fontColor&&(f.style.color=a.fontColor),h.appendChild(f),i.client.barVisible()){var m=document.createElement("div");m.setAttribute("unselectable","on"),m.className=this.K("_event_bar"),m.style.position="absolute";var p=document.createElement("div");p.setAttribute("unselectable","on"),p.className=this.K("_event_bar_inner"),p.style.top="0%",p.style.height="100%",a.barColor&&(p.style.backgroundColor=a.barColor),m.appendChild(p),h.appendChild(m)}if(i.client.deleteEnabled()){var v=Math.floor(n.eventHeight/2-9),y=document.createElement("div");y.style.position="absolute",y.style.right="2px",y.style.top=v+"px",y.style.width="18px",y.style.height="18px",y.className=n.K("_event_delete"),y.onmousedown=function(e){e.stopPropagation()},y.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&n.ua(t)},y.style.display="none",h.deleteIcon=y,h.appendChild(y)}var g=a.areas?DayPilot.Areas.copy(a.areas):[];if(DayPilot.Areas.attach(h,i,{"areas":g}),"function"==typeof n.onAfterEventRender){var b={};b.e=h.event,b.div=h,n.onAfterEventRender(b)}!function(){var e={};if(e.control=n,e.e=a,e.element=null,h.domArgs=e,"function"==typeof n.onBeforeEventDomAdd&&n.onBeforeEventDomAdd(e),e.element){var o=f;if(o){e.Fa=o;if(t(e.element)){if(!n.Ha.Ga)throw new DayPilot.Exception("Can't reach Vue");n.Ha.Ia=!0,n.Ha.La(e.element,o),n.Ha.Ia=!1}else o.appendChild(e.element)}}else f.innerHTML=i.client.innerHTML()}(),this.elements.events.push(h),this.nav.events.appendChild(h)},this.lastVisibleDayOfMonth=function(){return this.startDate.lastDayOfMonth()},this.Tc=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,t=(this.startDate,this.lastVisibleDayOfMonth()),i=DayPilot.DateUtil.daysDiff(this.firstDate,t)+1;e=Math.ceil(i/7),this.days=7*e,this.rows=[];for(var a=0;a<e;a++){var o={};o.start=this.firstDate.addDays(7*a),o.end=o.start.addDays(this.getColCount()),o.events=[],o.lines=[],o.index=a,o.minHeight=this.cellHeight,o.calendar=this,o.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())},o.getPartStart=function(e){return DayPilot.DateUtil.max(this.start,e.start())},o.getPartEnd=function(e){return DayPilot.DateUtil.min(this.end,e.end())},o.getStartColumn=function(e){var t=this.getPartStart(e);return DayPilot.DateUtil.daysDiff(this.start,t)},o.getWidth=function(e){return DayPilot.DateUtil.daysSpan(this.getPartStart(e),this.getPartEnd(e))+1},o.putIntoLine=function(e,t,i,a){for(var n=this,o=0;o<this.lines.length;o++){var r=this.lines[o];if(r.isFree(t,i))return r.addEvent(e,t,i,a,o),o}var r=[];return r.isFree=function(e,t){for(var i=!0,a=0;a<this.length;a++)e+t-1<this[a].part.colStart||e>this[a].part.colStart+this[a].part.colWidth-1||(i=!1);return i},r.addEvent=function(e,t,i,a,o){e.part.colStart=t,e.part.colWidth=i,e.part.row=a,e.part.line=o,e.part.startsHere=n.start.getTime()<=e.start().getTime(),e.part.endsHere=n.end.getTime()>=e.end().getTime(),this.push(e)},r.addEvent(e,t,i,a,this.lines.length),this.lines.push(r),this.lines.length-1},o.getStart=function(){for(var e=0,t=0;t<n.rows.length&&t<this.index;t++)e+=n.rows[t].getHeight()},o.getHeight=function(){return Math.max(this.lines.length*n.lineHeight()+n.cellHeaderHeight+n.cellMarginBottom,this.calendar.cellHeight)},this.rows.push(o)}this.endDate=this.firstDate.addDays(7*e)},this.visibleStart=function(){return n.firstDate},this.visibleEnd=function(){return n.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.K=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Na=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(e){return!1},this.hideUntilInit&&(t.style.visibility="hidden"),this.visible||(t.style.display="none"),t.className=this.K("_main");var i=document.createElement("div");this.nav.cells=i,i.style.position="absolute",i.style.left="0px",i.style.right="0px",i.setAttribute("unselectable","on"),t.appendChild(i);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 i=DayPilot.mo3(n.nav.top,t);if(!i)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var o,r,s=e.resizingEvent;s.start;if("w-resize"===s.direction){r=a;var l=s.event.end();l.getDatePart()===l&&(l=l.addDays(-1));var d=n.getCellFromDate(l);o=n.getWidth(a,d)}else r=n.getCellFromDate(s.event.start()),o=n.getWidth(r,a);o<1&&(o=1),n.drawShadow(r.x,r.y,0,o)}else if(e.movingEvent){var i=DayPilot.mo3(n.nav.top,t);if(!i)return;if(i.x===e.movingEvent.coords.x&&i.y===e.movingEvent.coords.y)return;var c=3,u=Math.abs(i.x-e.movingEvent.coords.x)+Math.abs(i.y-e.movingEvent.coords.y);if(u<=c)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var h=e.movingEvent.event,f=e.movingEvent.offset,o=n.cellMode?1:DayPilot.DateUtil.daysSpan(h.start(),h.end())+1;o<1&&(o=1),n.drawShadow(a.x,a.y,0,o,f,h)}else if(e.timeRangeSelecting){var i=DayPilot.mo3(n.nav.top,t);if(!i)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var r=e.timeRangeSelecting,m=7*r.y+r.x,p=7*a.y+a.x,o=Math.abs(p-m)+1;o<1&&(o=1);var v=m<p?r:a;e.timeRangeSelecting.from={x:v.x,y:v.y},e.timeRangeSelecting.width=o,e.timeRangeSelecting.moved=!0,n.drawShadow(v.x,v.y,0,o,0,null)}}},this.ja=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 i=Math.floor(this.nav.top.clientWidth/this.getColCount()),a=Math.min(Math.floor(e/i),this.getColCount()-1),n=null,o=this.headerHeight,r=0,s=0;s<this.rows.length;s++){var l=o;if(o+=this.rows[s].getHeight(),t<o){r=t-l,n=s;break}}null===n&&(n=this.rows.length-1);var d={};return d.x=a,d.y=n,d.relativeY=r,d},this.getCellFromDate=function(e){for(var t=DayPilot.DateUtil.daysDiff(this.firstDate,e),i={x:0,y:0};t>=7;)i.y++,t-=7;return i.x=t,i},this.Vc=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 i=document.createElement("div");i.setAttribute("unselectable","on"),i.style.position="absolute",i.style.left=this.getCellWidth()*t+"%",i.style.width=this.getCellWidth()+"%",i.style.top="0px",i.style.height=this.headerHeight+"px";var a=t+this.getWeekStart();a>6&&(a-=7),i.className=this.K("_header");var n=document.createElement("div");n.setAttribute("unselectable","on"),n.innerHTML=o.locale().dayNames[a],i.appendChild(n),n.style.position="absolute",n.style.top="0px",n.style.bottom="0px",n.style.left="0px",n.style.right="0px",n.className=this.K("_header_inner"),n.innerHTML=o.locale().dayNames[a],e.appendChild(i);for(var r=0;r<this.rows.length;r++)this.Yc(t,r,e)}},this.Uc=function(){for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++){var i=n.cells[e][t];n.Ya(i)}this.nav.cells.innerHTML=""},this.Ya=function(e){!function(){var i=e.domArgs;if(e.domArgs=null,i&&"function"==typeof n.onBeforeCellDomRemove&&n.onBeforeCellDomRemove(i),i&&"function"==typeof n.onBeforeCellDomAdd){var a=i&&i.Fa;if(a){var o=n.Zc.reactDOM&&isReactCmp(i.element),r=n.Ha.Ga&&(isVueCmp(i.element)||t(i.element));o?n.Zc.$c(a):r&&(n.Ha.Ia=!0,n.Ha.Ja(a),n.Ha.Ia=!1)}}}(),e.onclick=null},this.qa=function(){return 2===n.api},this.Yc=function(i,a,r){var s=this.rows[a],l=this.firstDate.addDays(7*a+i),d=l.getDay(),c=null;c=1===d?o.locale().monthNames[l.getMonth()]+" "+d:""+d;var u=!n.isWeekend(l),h={"start":l,"end":l.addDays(1),"properties":{"headerHtml":c,"backColor":null,"business":u,"html":null}},f={};f.control=n,f.cell=h,"function"==typeof n.onBeforeCellRender&&n.onBeforeCellRender(f);var m=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()*i+"%",p.style.width=this.getCellWidth()+"%",p.style.top=this.getRowTop(a)+"px",p.style.height=s.getHeight()+"px",p.className=this.K("_cell"),m.business){var u=this.K("_cell_business");DayPilot.Util.addClass(p,u)}var v=(this.startDate.addMonths(-1).getMonth(),this.startDate.addMonths(1).getMonth(),this.startDate.getMonth(),document.createElement("div"));v.setAttribute("unselectable","on"),p.appendChild(v),v.style.position="absolute",v.style.left="0px",v.style.right="0px",v.style.top="0px",v.style.bottom="0px",v.className=this.K("_cell_inner"),m.backColor&&(v.style.backgroundColor=f.cell.properties.backColor),p.onmousedown=function(t){"Disabled"!==n.timeRangeSelectedHandling&&(n.clearShadow(),e.timeRangeSelecting={"root":n,"x":i,"y":a,"from":{x:i,y:a},"width":1})},p.onclick=function(){var e=function(e){var t=new DayPilot.Date(e),i=t.addDays(1);n.M(t,i)};if("Disabled"!==n.timeRangeSelectedHandling)return void e(l)};var y=document.createElement("div");if(y.setAttribute("unselectable","on"),y.style.height=this.cellHeaderHeight+"px",y.className=this.K("_cell_header"),y.onclick=function(e){if("Enabled"===n.cellHeaderClickHandling){e.stopPropagation();var t={};t.control=n,t.start=l,t.end=l.addDays(1),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onCellHeaderClick&&(n.onCellHeaderClick(t),t.preventDefault.value)||"function"==typeof n.onCellHeaderClicked&&n.onCellHeaderClicked(t)}},y.innerHTML=m.headerHtml,v.appendChild(y),m.html){var g=document.createElement("div");g.style.height=s.getHeight()-this.cellHeaderHeight+"px",g.style.overflow="hidden",g.innerHTML=m.html,v.appendChild(g)}!function(){if("function"==typeof n.onBeforeCellDomAdd||"function"==typeof n.onBeforeCellDomRemove){var e={};if(e.control=n,e.cell=h,e.element=null,p.domArgs=e,"function"==typeof n.onBeforeCellDomAdd&&n.onBeforeCellDomAdd(e),e.element){var i=v;if(i){e.Fa=i;if(t(e.element)){if(!n.Ha.Ga)throw new DayPilot.Exception("Can't reach Vue");n.Ha.Ia=!0,n.Ha.La(e.element,i),n.Ha.Ia=!1}else i.appendChild(e.element)}}}}(),this.cells[i][a]=p,r.appendChild(p)},this.getWeekStart=function(){if("Auto"===n.weekStarts){var e=o.locale();return e?e.weekStarts:0}return n.weekStarts||0},this.getColCount=function(){return 7},this.getCellWidth=function(){return 14.285},this.getRowTop=function(e){for(var t=this.headerHeight,i=0;i<e;i++)t+=this.rows[i].getHeight();return t},this.S=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.R();var n="JSON"+DayPilot.JSON.stringify(a);this.backendUrl&&DayPilot.request(this.backendUrl,this.T,n,this.ajaxError)},this.T=function(e){n.U(e.responseText)},this.R=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=n.startDate,e.timeFormat=this.timeFormat,e.weekStarts=this.weekStarts,e},this.eventClickCallBack=function(e,t){this.S("EventClick",t,e)},this.ra=function(t){e.movingEvent=null,e.resizingEvent=null;var i=this,t=t||window.event;t.ctrlKey;t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),n.eventClickSingle(i,t)},this.eventClickSingle=function(e,t){var i=e.event;if(i&&i.client.clickEnabled())if(n.qa()){var a={};if(a.e=i,a.control=n,a.div=e,a.originalEvent=t,a.meta=t.metaKey,a.ctrl=t.ctrlKey,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventClick&&(n.sa.apply(function(){n.onEventClick(a)}),a.preventDefault.value))return;switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"ContextMenu":var o=i.client.contextMenu();o?o.show(i):n.contextMenu&&n.contextMenu.show(i)}"function"==typeof n.onEventClicked&&n.sa.apply(function(){n.onEventClicked(a)})}else switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"JavaScript":n.onEventClick(i)}},this.Xc=function(){var e=this;return n.ta(e.event),!1},this.ta=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 n.onEventRightClick||(n.onEventRightClick(t),!t.preventDefault.value)){switch(n.eventRightClickHandling){case"ContextMenu":var i=e.client.contextMenu();i?i.show(e):n.contextMenu&&n.contextMenu.show(this.event)}return"function"==typeof n.onEventRightClicked&&n.onEventRightClicked(t),!1}},this.ua=function(e){if(n.qa()){var t={};if(t.e=e,t.control=n,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventDelete&&(n.sa.apply(function(){n.onEventDelete(t)}),t.preventDefault.value))return;switch(n.eventDeleteHandling){case"CallBack":n.eventDeleteCallBack(e);break;case"PostBack":n.eventDeletePostBack(e);break;case"Update":n.events.remove(e)}"function"==typeof n.onEventDeleted&&n.sa.apply(function(){n.onEventDeleted(t)})}else switch(n.eventDeleteHandling){case"PostBack":n.eventDeletePostBack(e);break;case"CallBack":n.eventDeleteCallBack(e);break;case"JavaScript":n.onEventDelete(e)}},this.eventDeleteCallBack=function(e,t){this.S("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.Q("EventDelete",t,e)},this.eventMoveCallBack=function(e,t,i,a,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var o={};o.e=e,o.newStart=t,o.newEnd=i,o.position=n,this.S("EventMove",a,o)},this.L=function(e,t,i,a,o,r){var s=e.start().getTimePart(),l=e.end().getDatePart();l.getTime()!==e.end().getTime()&&(l=l.addDays(1));var d=DayPilot.DateUtil.diff(e.end(),l),c=this.getDateFromCell(t,i);c=c.addDays(-a);var u=DayPilot.DateUtil.daysSpan(e.start(),e.end())+1,h=c.addDays(u),f=c.addTime(s),m=h.addTime(d);if(n.qa()){var p={};if(p.e=e,p.control=n,p.newStart=f,p.newEnd=m,p.ctrl=o.ctrlKey,p.shift=o.shiftKey,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventMove&&(n.sa.apply(function(){n.onEventMove(p)}),p.preventDefault.value))return;switch(n.eventMoveHandling){case"CallBack":n.eventMoveCallBack(e,f,m);break;case"Update":e.start(f),e.end(m),n.events.update(e)}"function"==typeof n.onEventMoved&&n.sa.apply(function(){n.onEventMoved(p)})}else switch(n.eventMoveHandling){case"CallBack":n.eventMoveCallBack(e,f,m);break;case"JavaScript":n.onEventMove(e,f,m)}},this.eventResizeCallBack=function(e,t,i,a){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var n={};n.e=e,n.newStart=t,n.newEnd=i,this.S("EventResize",a,n)},this.J=function(e,t,i){var a=e.start().getTimePart(),o=e.end().getDatePart();o.getTime()!==e.end().getTime()&&(o=o.addDays(1));var r=DayPilot.DateUtil.diff(e.end(),o),s=this.getDateFromCell(t.x,t.y),l=s.addDays(i),d=s.addTime(a),c=l.addTime(r);if(n.qa()){var u={};if(u.e=e,u.control=n,u.newStart=d,u.newEnd=c,u.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventResize&&(n.sa.apply(function(){n.onEventResize(u)}),u.preventDefault.value))return;switch(n.eventResizeHandling){case"CallBack":n.eventResizeCallBack(e,d,c);break;case"Update":e.start(d),e.end(c),n.events.update(e)}"function"==typeof n.onEventResized&&n.sa.apply(function(){n.onEventResized(u)})}else switch(n.eventResizeHandling){case"CallBack":n.eventResizeCallBack(e,d,c);break;case"JavaScript":n.onEventResize(e,d,c)}},this.timeRangeSelectedCallBack=function(e,t,i){var a={};a.start=e,a.end=t,this.S("TimeRangeSelected",i,a)},this.M=function(e,t){if(this.qa()){var i={};if(i.control=n,i.start=e,i.end=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.sa.apply(function(){n.onTimeRangeSelect(i)}),i.preventDefault.value))return;switch(n.timeRangeSelectedHandling){case"CallBack":n.timeRangeSelectedCallBack(e,t)}"function"==typeof n.onTimeRangeSelected&&n.sa.apply(function(){n.onTimeRangeSelected(i)})}else switch(n.timeRangeSelectedHandling){case"CallBack":n.timeRangeSelectedCallBack(e,t);break;case"JavaScript":n.onTimeRangeSelected(e,t)}},this.sa={},this.sa.scope=null,this.sa.notify=function(){n.sa.scope&&n.sa.scope["$apply"]()},this.sa.apply=function(e){e()},this.clearSelection=function(){n.clearShadow()},this.commandCallBack=function(e,t){var i={};i.command=e,this.S("Command",t,i)},this.isWeekend=function(e){return e=new DayPilot.Date(e),0===e.dayOfWeek()||6===e.dayOfWeek()},this.aa={},this.aa.locale=function(){var e=DayPilot.Locale.find(n.locale);return e?e:DayPilot.Locale.US},this.aa.ba=function(){return"Disabled"!==n.xssProtection};var o=this.aa;this.debug=function(e,t){this.debuggingEnabled&&(n.debugMessages||(n.debugMessages=[]),n.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.dispose=function(){var e=n;e.O||(e.O=!0,e.Uc(),e.W(),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.O},this.gb=function(){e.globalHandlers||(e.globalHandlers=!0,DayPilot.re(document,"mouseup",e.gMouseUp))},this.loadFromServer=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof n.events.list||!n.events.list)},this.t=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){n.visible=!0,n.nav.top.style.display=""},this.hide=function(){n.visible=!1,n.nav.top.style.display="none"},this.ob=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: '"+id+"'."}},this.ub=function(){this.Tc(),this.Na(),this.Vc(),this.gb(),this.S("Init")},this.Ra=function(e,t){return n.aa.ba()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ha={},this.Ha.Ga=null,this.Ha.Cb=function(e,t,i){var a=n.Ha.Ga;if("function"==typeof a.createVNode&&"function"==typeof a.render){var o=a.createVNode(e,i);a.render(o,t)}},this.Ha.La=function(e,t){var i=n.Ha.Ga;if("function"==typeof i.render){var a=e;DayPilot.isArray(e)&&(a=i.h("div",null,e)),i.render(a,t)}},this.Ha.Ja=function(e){var t=n.Ha.Ga;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=this.jb,this.internal.xssTextHtml=n.Ra,this.internal.enableVue=function(e){n.Ha.Ga=e},this.internal.vueRef=function(){return n.Ha.Ga},this.internal.vueRendering=function(){return n.Ha.Ia},this.init=function(){return this.ob(),this.loadFromServer()?void this.ub():(this.Tc(),this.ea(),this.Na(),this.Vc(),this.t(),this.ka(),this.gb(),this.fireAfterRenderDetached(null,!1),this.Ba=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return n.eventBarVisible}}),this.jb(a)},e.gMouseUp=function(t){if(e.movingEvent){var i=e.movingEvent;if(!i.event)return;if(!i.event.calendar)return;if(!i.event.calendar.shadow)return;if(!i.event.calendar.shadow.start)return;var a=e.movingEvent.event.calendar,n=e.movingEvent.event,o=a.shadow.start,r=a.shadow.position,s=e.movingEvent.offset;a.clearShadow(),e.movingEvent=null;var t=t||window.event;return a.L(n,o.x,o.y,s,t,r),t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),e.movingEvent=null,!1}if(e.resizingEvent){var i=e.resizingEvent;if(!i.event)return;if(!i.event.calendar)return;if(!i.event.calendar.shadow)return;if(!i.event.calendar.shadow.start)return;var a=e.resizingEvent.event.calendar,n=e.resizingEvent.event,o=a.shadow.start,l=a.shadow.width;return a.clearShadow(),e.resizingEvent=null,a.J(n,o,l),t.cancelBubble=!0,e.resizingEvent=null,!1}if(e.timeRangeSelecting){if(e.timeRangeSelecting.moved){var d=e.timeRangeSelecting,a=d.root,o=new DayPilot.Date(a.getDateFromCell(d.from.x,d.from.y)),c=o.addDays(d.width);a.M(o,c),a.clearShadow()}e.timeRangeSelecting=null}},DayPilot.Month=e.Month,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotMonth=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Month(this.id);this.daypilot=i;for(name in e)i[name]=e[name];i.Init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotMonth",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,i,a){var n=new DayPilot.Month(i[0]);n.sa.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)0===s.indexOf("on")&&!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(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)n[t]=e[t];n.update()},!0),l.call(t,c,function(e){n.events.list=e,n.update()},!0)}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(),"undefined"==typeof DayPilot)var DayPilot={};"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(DayPilot){"use strict";if("undefined"==typeof DayPilot.Navigator||!DayPilot.Navigator.def){var e=DayPilot.Util.isVueVNode;DayPilot.Navigator=function(t,i){this.v="2024.4.609-lite";var a=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.showWeekNumbers=!1,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.nav={},this.pb={},this._c=function(){this.root.dp=this,this.root.className=this.K("_main"),"Horizontal"===this.orientation?(r.ad()||(this.root.style.width=this.showMonths*(7*r.cellWidth()+this.bd())+"px"),this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):r.ad()||(this.root.style.width=7*r.cellWidth()+this.bd()+"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=a.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.qa=function(){return 2===a.api},this.Uc=function(){this.root.innerHTML=""},this.K=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.cd=function(e,t){var i=this.K("_"+t);DayPilot.Util.addClass(e,i)},this.dd=function(e,t){var i=this.K("_"+t);DayPilot.Util.removeClass(e,i)},this.ed=function(){if(!r.ad())return null;var e=7;return this.showWeekNumbers&&e++,100/e},this.fd=function(){return r.ad()?null:r.cellWidth()},this.gd=function(e){return"number"!=typeof e&&(e=1),r.ad()?this.ed()*e:this.fd()*e},this.hd=function(e){var t=r.ad()?"%":"px";return this.gd(e)+t},this.Vc=function(t,i){var n={};n.cells=[],n.days=[],n.weeks=[];var o=this.startDate.addMonths(t),s=i.before,l=i.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;n.rowCount=f;var m=(new DayPilot.Date).getDatePart(),p=7*r.cellWidth()+this.bd();n.width=p;var v=this.cellHeight*f+this.titleHeight+this.dayHeaderHeight;n.height=v;var y=document.createElement("div");if(r.ad()?"Horizontal"===this.orientation&&(y.style.width=100/a.showMonths+"%"):y.style.width=p+"px",y.style.height=v+"px","Horizontal"===this.orientation)y.style.position="absolute",r.ad()?(y.style.left=100/a.showMonths*t+"%",n.leftPct=100/a.showMonths*t):y.style.left=p*t+"px",y.style.top="0px",n.top=0,n.left=p*t;else{y.style.position="relative";var g=t>0?a.months[t-1].top+a.months[t-1].height:0;n.top=g,n.left=0,n.leftPct=0}y.className=this.K("_month"),y.style.cursor="default",y.style.MozUserSelect="none",y.style.KhtmlUserSelect="none",y.style.WebkitUserSelect="none",y.month=n,n.div=y,this.root.appendChild(y);var b=this.titleHeight+this.dayHeaderHeight,D=document.createElement("div");D.style.position="absolute",D.style.left="0px",D.style.right="0px",D.style.top="0px",D.style.width=a.hd(),D.style.height=this.titleHeight+"px",D.style.lineHeight=this.titleHeight+"px",D.setAttribute("unselectable","on"),D.className=this.K("_titleleft"),i.left&&(D.style.cursor="pointer",D.innerHTML="<span><</span>",D.onclick=this.jd),y.appendChild(D),this.tl=D;var w=document.createElement("div");w.style.position="absolute",w.style.left=a.hd(),w.style.top="0px",w.style.width=a.hd(a.showWeekNumbers?6:5),w.style.height=this.titleHeight+"px",w.style.lineHeight=this.titleHeight+"px",w.setAttribute("unselectable","on"),w.className=this.K("_title"),w.innerHTML=r.locale().monthNames[o.getMonth()]+" "+o.getYear(),y.appendChild(w),this.ti=w;var x=document.createElement("div");x.style.position="absolute",x.style.left=a.hd(a.showWeekNumbers?7:6),x.style.right=a.hd(a.showWeekNumbers?7:6),x.style.top="0px",x.style.width=a.hd(),x.style.height=this.titleHeight+"px",x.style.lineHeight=this.titleHeight+"px",x.setAttribute("unselectable","on"),x.className=this.K("_titleright"),i.right&&(x.style.cursor="pointer",x.innerHTML="<span>></span>",x.onclick=this.kd),y.appendChild(x),this.tr=x;var C=(this.bd(),a.showWeekNumbers?1:0);if(this.showWeekNumbers)for(var P=0;P<f;P++){var k=c.addDays(7*P),_=null;switch(this.weekNumberAlgorithm){case"Auto":_=1===r.weekStarts()?k.weekNumberISO():k.weekNumber();break;case"US":_=k.weekNumber();break;case"ISO8601":_=k.weekNumberISO();break;default:throw"Unknown weekNumberAlgorithm value."}var S=document.createElement("div");S.style.position="absolute",S.style.left="0px",S.style.right="0px",S.style.top=P*this.cellHeight+b+"px",S.style.width=a.hd(),S.style.height=this.cellHeight+"px",S.style.lineHeight=this.cellHeight+"px",S.setAttribute("unselectable","on"),S.className=this.K("_weeknumber"),S.innerHTML="<span>"+_+"</span>",y.appendChild(S),n.weeks.push(S)}for(var M=0;M<7;M++){n.cells[M]=[];var S=document.createElement("div");S.style.position="absolute",S.style.left=a.hd(M+C),S.style.right=a.hd(M+C),S.style.top=this.titleHeight+"px",S.style.width=a.hd(),S.style.height=this.dayHeaderHeight+"px",S.style.lineHeight=this.dayHeaderHeight+"px",S.setAttribute("unselectable","on"),S.className=this.K("_dayheader"),S.innerHTML="<span>"+this.ld(M)+"</span>",y.appendChild(S),n.days.push(S);for(var P=0;P<f;P++){var k=c.addDays(7*P+M),H=this.md(k)&&"none"!==this.nd(),A=k.firstDayOfMonth()===o,T=k<o,E=k>=o.addMonths(1);if("month"===this.nd())H=H&&A;else if("day"===this.nd())H=H&&(A||s&&T||l&&E);else if("week"===this.nd()){var N=k.firstDayOfMonth()===o;H=H&&(N||s&&T||l&&E)}var I=document.createElement("div");n.cells[M][P]=I;var R=a.od(M,P),B=R.x,z=R.y,O=r.ad()?"%":"px";I.day=k,I.x=M,I.y=P,I.left=B,I.top=z,I.isCurrentMonth=A,I.isNextMonth=E,I.isPrevMonth=T,I.showBefore=s,I.showAfter=l,I.className=this.K(A?"_day":"_dayother"),a.cd(I,"cell"),k.getTime()===m.getTime()&&A&&this.cd(I,"today"),0!==k.dayOfWeek()&&6!==k.dayOfWeek()||this.cd(I,"weekend"),I.style.position="absolute",I.style.left=B+O,I.style.right=B+O,I.style.top=z+"px",I.style.width=a.hd(),I.style.height=this.cellHeight+"px",I.style.lineHeight=this.cellHeight+"px";var U=document.createElement("div");U.style.position="absolute",U.className=k.getTime()===m.getTime()&&A?this.K("_todaybox"):this.K("_daybox"),a.cd(U,"cell_box"),U.style.left="0px",U.style.top="0px",U.style.right="0px",U.style.bottom="0px",I.appendChild(U);var L=null;this.cells&&this.cells[k.toStringSortable()]&&(L=this.cells[k.toStringSortable()]);var j=L||{};if(j.day=k,j.isCurrentMonth=A,j.isToday=k.getTime()===m.getTime()&&A,j.isWeekend=0===k.dayOfWeek()||6===k.dayOfWeek(),L?(j.html=L.html||k.getDay(),j.cssClass=L.css):(j.html=k.getDay(),j.cssClass=null),"function"==typeof a.onBeforeCellRender){var W={};W.cell=j,a.onBeforeCellRender(W),L=W.cell}if(L&&DayPilot.Util.addClass(I,L.cssClass||L.css),A||s&&T||l&&E){var F=document.createElement("div");F.innerHTML=k.getDay(),F.style.position="absolute",F.style.left="0px",F.style.top="0px",F.style.right="0px",F.style.bottom="0px",a.cd(F,"cell_text"),I.isClickable=!0,L&&L.html&&(F.innerHTML=L.html),I.appendChild(F)}I.setAttribute("unselectable","on"),I.onclick=this.pd,function(){if("function"==typeof a.onBeforeCellDomAdd||"function"==typeof a.onBeforeCellDomRemove){var t={};if(t.control=a,t.cell=j,t.element=null,I.domArgs=t,"function"==typeof a.onBeforeCellDomAdd&&a.onBeforeCellDomAdd(t),t.element){var i=U;if(i){t.Fa=i;if(e(t.element)){if(!a.Ha.Ga)throw new DayPilot.Exception("Can't reach Vue");a.Ha.Ia=!0,a.Ha.La(t.element,i),a.Ha.Ia=!1}else i.appendChild(t.element)}}}}(),y.appendChild(I),H&&(a.qd(y,M,P),this.selected.push(I))}}var J=document.createElement("div");J.style.position="absolute",J.style.left="0px",J.style.top=b-2+"px",J.style.width=a.hd(7+C),J.style.height="1px",J.style.fontSize="1px",J.style.lineHeight="1px",J.className=this.K("_line"),y.appendChild(J),this.months.push(n)},this.od=function(e,t){var i=this.titleHeight+this.dayHeaderHeight,n=(this.bd(),this.showWeekNumbers?1:0);return{"x":a.gd(e+n),"y":t*this.cellHeight+i}},this.qd=function(e,t,i){var n=e.month.cells[t][i];a.cd(n,"select")},this.rd=function(e,t,i){var n=e.month.cells[t][i];a.dd(n,"select")},this.bd=function(){return this.showWeekNumbers?r.cellWidth():0},this.sd=function(){if(this.items)for(var e=0;e<this.showMonths;e++)for(var t=0;t<7;t++)for(var i=0;i<6;i++){var a=this.months[e].cells[t][i];a&&(1===this.items[a.day.toStringSortable()]?(this.cd(a,"busy"),this.dd(a,"free")):(this.dd(a,"busy"),this.cd(a,"free")))}},this.td=function(){var e={};e.startDate=a.startDate,e.selectionStart=a.selectionStart,e.selectionEnd=a.selectionEnd.addDays(1),
|
|
16
|
-
a.state.value=JSON.stringify(e)},this.nd=function(){return(this.selectMode||"").toLowerCase()},this.ud=function(){var e=this.selectionDay||this.selectionStart;switch(e||(e=DayPilot.Date.today()),e=new DayPilot.Date(e),this.nd()){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.vd=null,this.select=function(e,t,i){var n=t&&(t instanceof DayPilot.Date||"string"==typeof t),o=t&&"object"==typeof t||"boolean"==typeof t,r=e,s=n?t:null,l=o?t:i;if(!this.Ba)return void(this.vd={"date1":r,"date2":s,"options":l});var d=!0,c=!0;l&&"object"==typeof l?(l.dontFocus&&(d=!1),l.dontNotify&&(c=!1)):"boolean"==typeof l&&(d=!l);var u=this.selectionStart,h=this.selectionEnd;this.selectionStart=new DayPilot.Date(r).getDatePart(),this.selectionDay=this.selectionStart;var f=!1;if(d){var m=this.startDate;(this.selectionStart<this.wd()||this.selectionStart>=this.xd())&&(m=this.selectionStart.firstDayOfMonth()),m.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=m}s&&a.freeHandSelectionEnabled?a.selectionEnd=new DayPilot.Date(s):this.ud(),this.Uc(),this._c(),this.yd(),this.sd(),this.td(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.M(),f&&this.zd()},this.update=function(e){if(a.jb(e),this.Ba){if(a.O)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");a.Ad();var t={"day":a.selectionDay,"start":a.selectionStart,"end":a.selectionEnd};a.hb(),t.start===a.selectionStart&&t.end===a.selectionEnd&&t.day===a.selectionDay||a.M()}},this.hb=function(){this.Uc(),this._c(),this.ud(),this.yd(),this.ea(),this.sd(),this.td(),this.visible?this.show():this.hide()},this.Ad=function(){a.pb={}},this.mb=null,this.jb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data;e&&(DayPilot.isArray(e.list)?a.events.list=e.list:a.events.list=e)}}};this.mb=t;for(var i in e)if(t[i]){var n=t[i];n.data=e[i],n.preInit&&n.preInit()}else a[i]=e[i]}},this.nb=function(){var e=this.mb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.S=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.R();var n="JSON"+JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.T,n,this.Bd):WebForm_DoCallback(this.uniqueID,n,this.U,null,this.callbackError,!0)},this.Bd=function(e){if("function"==typeof a.onAjaxError){var t={};t.request=e,a.onAjaxError(t)}else"function"==typeof a.ajaxError&&a.ajaxError(e)},this.T=function(e){a.U(e.responseText)},this.Q=function(e,t,i){var n={};n.action=e,n.parameters=i,n.data=t,n.header=this.R();var o="JSON"+JSON.stringify(n);__doPostBack(a.uniqueID,o)},this.R=function(){var e={};return e.v=this.v,e.startDate=this.startDate,e.selectionStart=this.selectionStart,e.showMonths=this.showMonths,e},this.Cd=function(e,t){"refresh"===e&&this.zd()},this.ld=function(e){var t=e+r.weekStarts();return t>6&&(t-=7),r.locale().dayNamesShort[t]},this.md=function(e){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=e.getTime()&&e.getTime()<=this.selectionEnd.getTime())},this.Dd=function(e){for(var t=0;t<a.months.length;t++){var i=a.months[t];if(!i)return null;if(e.x<i.left)return null;if(!(i.left+i.width<e.x)){a.months[t].height;if(i.top<=e.y&&e.y<i.top+i.height)return t}}return null},this.Ed=function(e){},this.Fd=function(){if(!r.ad())return void(a.Gd=a.cellWidth);var e=a.months[0].cells[0][0],t=e.clientWidth;a.Gd=t,a.months.forEach(function(e){e.width=e.div.clientWidth,"Horizontal"===a.orientation&&(e.left=e.div.offsetLeft),e.cells.forEach(function(e,i){e.forEach(function(e,a){e.width=t,e.left=i*t})})})},this.Hd=function(e){a.Fd();var t=DayPilot.mo3(a.nav.top,e),i=a.Dd(t);if(null===i)return null;var n=a.months[i],o=this.titleHeight+this.dayHeaderHeight;if(n.top<=t.y&&t.y<n.top+o)return{"month":i,"x":0,"y":0,"coords":t,"header":!0};for(var r=0;r<n.cells.length;r++)for(var s=0;s<n.cells[r].length;s++){var l=n.cells[r][s],d=l.top+n.top,c=l.left+n.left;if(c<=t.x&&t.x<c+a.Gd&&d<=t.y&&t.y<d+a.cellHeight)return{"month":i,"x":r,"y":s,"coords":t}}return null},this.Id=function(e){if(a.freeHandSelectionEnabled){var t=a.Hd(e);t&&!t.header&&(n.start=t),a.months[t.month].cells[t.x][t.y],e.preventDefault()}},this.Jd=function(e){if(n.start){var t=a.Hd(e);if(n.end)n.end=t;else if(t){var i=3,o=DayPilot.distance(n.start.coords,t.coords);o>i&&(n.end=t)}n.end&&(n.clear(),n.draw())}},this.Kd={};var n=this.Kd;n.start=null,n.drawCell=function(e){var t=a.months[e.month],i=a.od(e.x,e.y),o=t.top+i.y,s=t.left+i.x,l="px",d=a.hd();if(r.ad()){var c="Horizontal"===a.orientation?a.showMonths:1;s=t.leftPct+i.x/c,l="%",d=a.hd(1/c)}var u=document.createElement("div");u.style.position="absolute",u.style.left=s+l,u.style.top=o+"px",u.style.height=a.cellHeight+"px",u.style.width=d,u.style.backgroundColor="#ccc",u.style.opacity=.5,u.style.cursor="default",a.nav.preselection.appendChild(u),n.cells.push(u)},n.clear=function(){if(n.cells){for(var e=0;e<n.cells.length;e++)a.nav.preselection.removeChild(n.cells[e]);n.cells=[]}},n.draw=function(){var e=n.ordered(),t=new o(e.start),i=e.end;if(i){if(i===n.end&&i.header&&i.month>0){i.month-=1;var r=a.months[i.month];i.x=6,i.y=r.rowCount-1}for(n.cells=[];!t.is(i);){t.visible()&&n.drawCell(t);var s=new o(t).next();if(!s)return;t.month=s.month,t.x=s.x,t.y=s.y}t.visible()&&n.drawCell(t)}},n.ordered=function(){var e=n.start,t=n.end,i={};return!t||new o(e).before(t)?(i.start=e,i.end=t):(i.start=t,i.end=e),i};var o=function(e,t,i){if(e instanceof o)return e;if("object"==typeof e){var n=e;this.month=n.month,this.x=n.x,this.y=n.y}else this.month=e,this.x=t,this.y=i;this.is=function(e){return this.month===e.month&&this.x===e.x&&this.y===e.y},this.next=function(){var e=this;if(e.x<6)return{"month":e.month,"x":e.x+1,"y":e.y};var t=a.months[e.month];return e.y<t.rowCount-1?{"month":e.month,"x":0,"y":e.y+1}:e.month<a.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=this;!e.visible();){var t=e.next();if(!t)return null;e=new o(t)}return e},this.previous=function(){var e=this;if(e.x>0)return{"month":e.month,"x":e.x-1,"y":e.y};a.months[e.month];if(e.y>0)return{"month":e.month,"x":6,"y":e.y-1};if(e.month>0){var t=a.months[e.month-1];return{"month":e.month-1,"x":6,"y":t.rowCount-1}}return null},this.previousVisible=function(){for(var e=this;!e.visible();){var t=e.previous();if(!t)return null;e=new o(t)}return e},this.cell=function(){return a.months[this.month].cells[this.x][this.y]},this.date=function(){return this.cell().day},this.before=function(e){return this.date()<new o(e).date()}};this.pd=function(e){var t=this.parentNode,i=this.parentNode.month,n=this.x,o=this.y,r=i.cells[n][o].day;if(i.cells[n][o].isClickable){a.clearSelection(),a.selectionDay=r;var r=a.selectionDay;switch(a.nd()){case"none":a.selectionStart=r,a.selectionEnd=r;break;case"day":if(a.autoFocusOnClick){var s=r;if(r<a.wd()||r>=a.xd())return void a.select(r)}var l=i.cells[n][o];a.qd(t,n,o),a.selected.push(l),a.selectionStart=l.day,a.selectionEnd=l.day;break;case"week":if(a.autoFocusOnClick){var s=i.cells[0][o].day,d=i.cells[6][o].day;if(s.firstDayOfMonth()===d.firstDayOfMonth()&&(s<a.wd()||d>=a.xd()))return void a.select(r)}for(var c=0;c<7;c++)a.qd(t,c,o),a.selected.push(i.cells[c][o]);a.selectionStart=i.cells[0][o].day,a.selectionEnd=i.cells[6][o].day;break;case"month":if(a.autoFocusOnClick){var s=r;if(r<a.wd()||r>=a.xd())return void a.select(r)}for(var s=null,d=null,o=0;o<6;o++)for(var n=0;n<7;n++){var l=i.cells[n][o];l&&l.day.getYear()===r.getYear()&&l.day.getMonth()===r.getMonth()&&(a.qd(t,n,o),a.selected.push(l),null===s&&(s=l.day),d=l.day)}a.selectionStart=s,a.selectionEnd=d;break;default:throw"unknown selectMode"}a.td(),a.M()}},this.M=function(e){var t=a.selectionStart,i=a.selectionEnd.addDays(1),n=DayPilot.DateUtil.daysDiff(t,i),o=a.selectionDay;if(e=e||{},a.qa()){var r={};if(r.start=t,r.end=i,r.day=o,r.days=n,r.mode=e.mode||a.selectMode,r.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onTimeRangeSelect&&(a.onTimeRangeSelect(r),r.preventDefault.value))return;switch(a.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=i,s.days=n,s.day=o,bound.commandCallBack(a.command,s)}break;case"None":break;case"PostBack":a.timeRangeSelectedPostBack(t,i,o)}"function"==typeof a.onTimeRangeSelected&&a.onTimeRangeSelected(r)}else switch(a.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=i,s.days=n,s.day=o,bound.commandCallBack(a.command,s)}break;case"JavaScript":a.onTimeRangeSelected(t,i,o);break;case"None":break;case"PostBack":a.timeRangeSelectedPostBack(t,i,o)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,n.day=a,this.Q("TimeRangeSelected",i,n)},this.kd=function(e){a.Ld(a.skipMonths)},this.jd=function(e){a.Ld(-a.skipMonths)},this.Ld=function(e){this.startDate=this.startDate.addMonths(e),this.Uc(),this._c(),this.yd(),this.td(),this.zd(),this.sd()},this.wd=function(){return a.startDate.firstDayOfMonth()},this.xd=function(){return a.startDate.firstDayOfMonth().addMonths(this.showMonths)},this.visibleStart=function(){return a.startDate.firstDayOfMonth().firstDayOfWeek(r.weekStarts())},this.visibleEnd=function(){return a.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(r.weekStarts()).addDays(42)},this.zd=function(){var e=this.visibleStart(),t=this.visibleEnd();if(a.qa()){var i={};if(i.start=e,i.end=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onVisibleRangeChange&&(a.onVisibleRangeChange(i),i.preventDefault.value))return;switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"Disabled":}"function"==typeof a.onVisibleRangeChanged&&a.onVisibleRangeChanged(i)}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.S("Visible",e,t)},this.visibleRangeChangedPostBack=function(e){var t={};this.Q("Visible",e,t)},this.U=function(e,t){var e=JSON.parse(e);a.items=e.Items,a.cells=e.Cells,a.cells?a.update():a.sd()},this.yd=function(){for(var e=0;e<this.showMonths;e++){var t=this.Md(e);this.Vc(e,t)}this.root.style.height=this.Nd()+"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.Nd=function(){if("Horizontal"===this.orientation){for(var e=0,t=0;t<this.months.length;t++){var i=this.months[t];i.height>e&&(e=i.height)}return e}for(var a=0,t=0;t<this.months.length;t++){var i=this.months[t];a+=i.height}return a},this.Md=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.sa={},this.sa.scope=null,this.sa.notify=function(){a.sa.scope&&a.sa.scope["$apply"]()},this.Ha={},this.Ha.Ga=null,this.Ha.Cb=function(e,t,i){var n=a.Ha.Ga;if("function"==typeof n.createVNode&&"function"==typeof n.render){var o=n.createVNode(e,i);n.render(o,t)}},this.Ha.La=function(e,t){var i=a.Ha.Ga;if("function"==typeof i.render){var n=e;DayPilot.isArray(e)&&(n=i.h("div",null,e)),i.render(n,t)}},this.Ha.Ja=function(e){var t=a.Ha.Ga;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=a.jb,this.internal.initialized=function(){return a.Ba},this.internal.vueRendering=function(){return!1},this.internal.enableVue=function(e){a.Ha.Ga=e},this.internal.vueRef=function(){return a.Ha.Ga},this.internal.vueRendering=function(){return a.Ha.Ia},this.aa={};var r=this.aa;r.locale=function(){return DayPilot.Locale.find(a.locale)},r.weekStarts=function(){if("Auto"===a.weekStarts){var e=r.locale();return e?e.weekStarts:0}return a.weekStarts},r.cellWidth=function(){if(a.pb.cellWidth)return a.pb.cellWidth;var e=a.Od("_cell_dimensions").width;return e||(e=a.cellWidth),a.pb.cellWidth=e,e},r.ad=function(){return"Auto"===a.aa.cellWidth()},this.clearSelection=function(){for(var e=0;e<this.selected.length;e++){var t=this.selected[e];a.rd(t.parentNode,t.x,t.y)}this.selected=[]},this.Pd=function(){return!!this.backendUrl&&("undefined"==typeof a.items||!a.items)},this.events={},this.ea=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 i=this.Qd(t);for(var a in i)this.items[a]=1}}}},this.Od=function(e){var t=document.createElement("div");t.style.position="absolute",t.style.top="-2000px",t.style.left="-2000px",t.className=this.K(e);var i=a.root||document.body;i.appendChild(t);var n=t.offsetHeight,o=t.offsetWidth;i.removeChild(t);var r={};return r.height=n,r.width=o,r},this.Qd=function(e){for(var t=new DayPilot.Date(e.start),i=new DayPilot.Date(e.end),a={},n=t.getDatePart();n.getTime()<=i.getTime();)a[n.toStringSortable()]=1,n=n.addDays(1);return a},this.show=function(){a.visible=!0,a.root.style.display=""},this.hide=function(){a.visible=!1,a.root.style.display="none"},this.ob=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.ob(),!this.root.dp){this.ud(),this._c(),this.yd(),this.ea(),this.sd(),this.Z(),this.Rd(),this.gb();if(this.Pd()&&this.zd(),this.Ba=!0,this.nb(),this.vd){var e=this.vd;this.select(e.date1,e.date2,e.options),this.vd=null}return this}},this.Rd=function(){a.nav.top.onmousedown=this.Id,a.nav.top.onmousemove=this.Jd},this.gb=function(){DayPilot.re(document,"mouseup",a.Sd)},this.Sd=function(e){if(n.start&&n.end){var t=DayPilot.mo3(a.nav.top,e);if(t.x===n.start.coords.x&&t.y===n.start.coords.y)return n.start=null,void n.clear();n.clear();var i=n.ordered();i.start=new o(i.start).nextVisible(),i.end=new o(i.end).previousVisible(),a.selectionDay=new o(i.start).date(),a.selectionStart=a.selectionDay,a.selectionEnd=new o(i.end).date(),n.start=null,n.end=null,a.Uc(),a._c(),a.yd(),a.sd(),a.td();a.M({"mode":"FreeHand"})}n.start=null,n.end=null},this.dispose=function(){var e=a;e.root&&(e.root.removeAttribute("style"),e.root.removeAttribute("class"),e.root.dp=null,e.root.innerHTML=null,e.root=null,e.O=!0)},this.Z=function(){this.root.dispose=this.dispose},this.Init=this.init,this.jb(i)},"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotNavigator=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Navigator(this.id);this.daypilot=i;for(var a in e)i[a]=e[a];i.Init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotNavigator",["$parse",function(e){return{"restrict":"E","template":"<div id='{{id}}'></div>","compile":function(t,i){return t.replaceWith(this["template"].replace("{{id}}",i["id"])),function(t,i,a){var n=new DayPilot.Navigator(i[0]);n.sa.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)if(0===s.indexOf("on")){var l=DayPilot.Util.shouldApply(s);l?!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(s):!function(i){n[i]=function(n){e(a[i])(t,{"args":n})}}(s)}var d=t["$watch"],c=a["config"]||a["daypilotConfig"],u=a["events"]||a["daypilotEvents"];d.call(t,c,function(e,t){for(var i in e)n[i]=e[i];n.update()},!0),d.call(t,u,function(e){n.events.list=e,n.ea(),n.sd()},!0)}}}}])}(),DayPilot.Navigator.def={},"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(DayPilot);if (typeof module !== "undefined") {
|
|
14
|
+
n.push(r),o.children&&o.children.forEach(function(e){var a=i.processFormItem(e,t+1);n=n.concat(a)})})}else if("title"===a){var o=new s;o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=e.name,i.oc.push(o),n.push(o)}else if("image"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.oc.push(o),n.push(o)}else if("html"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.oc.push(o),n.push(o)}else if("scrollable"===a){var o=new s;o.isValue=!0,o.field=e.id,o.data=e,o.level=t,o.type=a,o.interactive=!1,o.text=null,i.oc.push(o),n.push(o)}else{var o=new s;o.field=e.id,o.data=e,o.level=t,o.type=a,o.text=e.name,o.children=[],i.oc.push(o),n.push(o)}return"checkbox"===a&&(o.isValue=!0,o.resolved=!0,e.children&&e.children.forEach(function(e){var a=i.processFormItem(e,t+1);n=n.concat(a)})),n},r.prototype.doOnKey=function(e){if("function"==typeof this.onKey){var t={key:e};this.onKey(t)}},r.prototype.createInteractive=function(e){var t=this,i={"label":function(){return new l},"title":function(){return new l},"image":function(){var t=new l,i=document.createElement("img");return i.src=e.data.image,t.element=i,t},"html":function(){var t=new l,i=document.createElement("div");return"string"==typeof e.data.text?i.innerText=e.data.text:"string"==typeof e.data.html&&(i.innerHTML=e.data.html),t.element=i,t},"scrollable":function(){var i=new l,a=document.createElement("div");a.className=t.theme+"_form_item_scrollable_scroll",e.data.height&&(a.style.height=e.data.height+"px");var n=document.createElement("div");return n.className=t.theme+"_form_item_scrollable_scroll_content","string"==typeof e.data.text?n.innerText=e.data.text:"string"==typeof e.data.html&&(n.innerHTML=e.data.html),a.appendChild(n),i.element=a,i},"text":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.element;t.value=e.value,t.disabled=!e.enabled};var a=document.createElement("input");return a.name=e.field,a.type="text",a.autocomplete="off",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:t.doOnKey("Enter");break;case 27:t.doOnKey("Escape");break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus(),i.element.setSelectionRange(0,i.element.value.length)},i.save=function(){var t={};return t[e.field]=a.value,t},i},"textarea":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.element;t.value=e.value,t.disabled=!e.enabled};var a=document.createElement("textarea");return a.name=e.field,e.data.height&&(a.style.height=e.data.height+"px"),a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:(e.ctrlKey||e.metaKey)&&t.doOnKey("Enter"),i=!1;break;case 27:t.doOnKey("Escape");break;default:i=!0}i||e.stopPropagation()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus(),i.element.setSelectionRange(0,0)},i.save=function(){var t={};return t[e.field]=a.value,t},i},"date":function(){var i=new l;i.apply=function(e){i.row=e;var a=i.element,n=i.picker;e.data.dateFormat&&(n.pattern=e.data.dateFormat);var o=e.data.locale||t.locale;o&&(n.locale=o),a.disabled=!e.enabled,n.date=new DayPilot.Date(e.value);var r=new DayPilot.Date(e.value).toString(e.data.dateFormat||n.pattern,n.locale);a.value=r};var a=document.createElement("input");a.name=e.field;var n=new DayPilot.DatePicker({target:a,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(e){i.onInput({"immediate":!0})}});return a.picker=n,a.className=t.theme+"_input_date",a.type="text",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:n.visible?n.close():t.doOnKey("Enter");break;case 27:n.visible?n.close():t.doOnKey("Escape");break;case 9:n.close(),i=!0;break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.onfocus=function(){n.show()},a.onclick=function(){n.show()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.element=a,i.picker=n,i.canFocus=function(){return!i.element.disabled},i.focus=function(){i.element.focus()},i.save=function(){var t=n.date?n.date.toString():null,i={};return i[e.field]=t,i},i},"time":function(){return t.uc(e)},"datetime":function(){return t.vc(e)},"select":function(){var t=new l;t.apply=function(e){t.row=e;var i=t.element;i.value=e.value,i.disabled=!e.enabled};var i=document.createElement("select");return i.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.wc=e.id,i.appendChild(t)}),i.onchange=function(e){t.onInput({"immediate":!0})},i.onblur=function(e){t.onBlur()},t.element=i,t.canFocus=function(){return!t.element.disabled},t.focus=function(){t.element.focus()},t.save=function(){var t=null,a=i.options[i.selectedIndex];a&&"undefined"!=typeof a.wc&&(t=a.wc);var n={};return n[e.field]=t,n},t},"searchable":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.searchable;t.disabled=!e.enabled,t.select(e.value)};var a=new d({data:e.data.options||[],name:e.field,theme:t.theme+"_form_item_searchable",listZIndex:t.zIndex+1,onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}}),n=a.create();return i.element=n,i.searchable=a,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.searchable.focus()},i.save=function(){var t=a.selected&&a.selected.id,i={};return i[e.field]=t,i},i},"radio":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.radio;t.checked=e.checked,t.disabled=!e.enabled};var a=document.createElement("label"),n=document.createElement("input");n.type="radio",n.name=e.field,n.wc=e.resolved,n.onchange=function(e){var a=i.row;t.findRowsByField(a.field).forEach(function(e){t.updateState(e,{checked:!1})}),t.updateState(a,{checked:!0}),t.applyState(),i.onInput({"immediate":!0})},n.onblur=function(e){i.onBlur()},a.appendChild(n);var o=document.createTextNode(e.text);return a.append(o),i.element=a,i.radio=n,i.canFocus=function(){return!1},i.focus=function(){i.radio.focus()},i.save=function(){if(!n.checked)return{};var t=n.wc,i={};return i[e.field]=t,i},i},"checkbox":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.checkbox;t.checked=e.checked,t.disabled=!e.enabled};var a=document.createElement("label"),n=document.createElement("input");n.type="checkbox",n.name=e.field,n.wc=e.resolved,n.onchange=function(e){var a=i.row;t.updateState(a,{checked:this.checked}),t.applyState(),i.onInput({"immediate":!0})},n.onblur=function(e){i.onBlur()},a.appendChild(n);var o=document.createTextNode(e.text);return a.append(o),i.element=a,i.checkbox=n,i.canFocus=function(){return!1},i.focus=function(){i.checkbox.focus()},i.save=function(){var t=n.checked,i={};return i[e.field]=t,i},i},"table":function(){var i=new l;i.apply=function(e){i.row=e;var t=i.table;t.disabled=!e.enabled,t.load(e.value||[])};var a=new c({name:e.field,form:t,theme:t.theme+"_form_item_tabular",item:e.data,onInput:function(e){i.onInput()}}),n=a.create();return i.element=n,i.table=a,i.canFocus=function(){return!1},i.focus=function(){i.table.focus()},i.save=function(){var t=a.save(),i={};return i[e.field]=t,i},i}};return t.plugins&&t.plugins[e.type]?t.plugins[e.type](e):i[e.type]()},r.prototype.uc=function(e){var t=this,i=new l;i.apply=function(e){i.row=e;var t=i.searchable;t.disabled=!e.enabled,t.select(e.value)};var a=[],n=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(n)||(n=15);for(var o=60/n,r=e.data.locale||t.locale,s=DayPilot.Locale.find(r)||DayPilot.Locale.US,c=DayPilot.Date.today(),u=0;u<24*o;u++){var h=c.addMinutes(n*u),f={};f.name=h.toString(e.data.timeFormat||s.timePattern,s),f.id=h.toString("HH:mm"),a.push(f)}var m=new d({data:a,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}}),p=m.create();return i.element=p,i.searchable=m,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.searchable.focus()},i.save=function(){var t=m.selected&&m.selected.id,i={};return i[e.field]=t,i},i},r.prototype.vc=function(e){var t=this,i=new l;i.apply=function(e){i.row=e;var a=i.searchable;a.disabled=!e.enabled;var n=new DayPilot.Date(e.value).toString("HH:mm");a.select(n);var o=i.dateInput,r=i.picker;e.data.dateFormat&&(r.pattern=e.data.dateFormat);var s=e.data.locale||t.locale;if(s){var l=DayPilot.Locale.find(s)||DayPilot.Locale.US;r.locale=s,r.pattern=l.datePattern}o.disabled=!e.enabled,r.date=new DayPilot.Date(e.value);var d=new DayPilot.Date(e.value).toString(e.data.dateFormat||r.pattern,r.locale);o.value=d};var a=function(){var a=document.createElement("input");a.name=e.field;var n=new DayPilot.DatePicker({target:a,theme:"navigator_modal",zIndex:t.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(e){i.onInput({"immediate":!0})}});return a.picker=n,a.className=t.theme+"_input_date",a.type="text",a.onkeydown=function(e){var i=!1;switch(e.keyCode){case 13:n.visible?n.close():t.doOnKey("Enter");break;case 27:n.visible?n.close():t.doOnKey("Escape");break;case 9:n.close(),i=!0;break;default:i=!0}i||(e.preventDefault(),e.stopPropagation())},a.onfocus=function(){n.show()},a.onclick=function(){n.show()},a.oninput=function(e){i.onInput()},a.onblur=function(e){i.onBlur()},i.dateInput=a,i.picker=n,a}(),n=function(){var a=[],n=e.data.timeInterval||15;[1,5,10,15,20,30,60].includes(n)||(n=15);for(var o=60/n,r=e.data.locale||t.locale,s=DayPilot.Locale.find(r)||DayPilot.Locale.US,l=DayPilot.Date.today(),c=0;c<24*o;c++){var u=l.addMinutes(n*c),h={};h.name=u.toString(e.data.timeFormat||s.timePattern,s),h.id=u.toString("HH:mm"),a.push(h)}var f=new d({data:a,name:e.field,theme:t.theme+"_form_item_time",listZIndex:t.zIndex+1,strategy:"startsWith",onSelect:function(e){e.ui&&i.onInput({"immediate":!0})}});return i.searchable=f,f.create()}(),o=document.createElement("div");return o.className=t.theme+"_form_item_datetime_parent",o.appendChild(a),o.appendChild(n),i.element=o,i.canFocus=function(){return!i.searchable.disabled},i.focus=function(){i.dateInput.focus()},i.save=function(){var t=i.searchable.selected&&i.searchable.selected.id,a=i.picker.date?i.picker.date.toString():null,n=new DayPilot.Date(a).getDatePart(),o=DayPilot.Date.parse(n.toString("yyyy-dd-MM ")+t,"yyyy-dd-MM HH:mm"),r={};return r[e.field]=o,r},i},r.prototype.findRowsByField=function(e){return this.oc.filter(function(t){return t.field===e})},r.prototype.findViewById=function(e,t){return this.f.find(function(i){return i.row.field===e&&("radio"!==i.row.type||i.row.resolved===t)})},r.prototype.firstFocusable=function(){return this.f.find(function(e){return e.canFocus&&e.canFocus()})},r.prototype.updateState=function(e,t){var i=this.pc?this.pc:this.oc,a=i.indexOf(e);return this.pc=i.map(function(i){if(i!==e)return i;if(e.propsEqual(t))return e;var a=e.clone();for(var n in t)a[n]=t[n];return a}),this.pc[a]},r.prototype.updateInteractive=function(e){var t=this.pc.indexOf(e);this.f[t].apply(e)},r.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.pc){this.pc.filter(function(t,i){return e.oc[i]!==t}).forEach(function(t){e.updateInteractive(t)}),this.oc=this.pc,this.pc=null}},r.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"},r.prototype.serialize=function(){var e={};return this.f.forEach(function(t){var i=t.save();for(var a in i)e[a]=i[a]}),e};var s=function(){this.id=this.guid(),this.field=null,this.data=null,this.type=null,this.level=0,this.enabled=!0,this.value=null,this.text=null,this.interactive=!0,this.isValue=!1,this.checked=!1,this.resolved=null};s.prototype.clone=function(){var e=new s;for(var t in this)"id"!==t&&(e[t]=this[t]);return e},s.prototype.propsEqual=function(e){for(var t in e)if(this[t]!==e[t])return!1;return!0},s.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()},s.prototype.applyValue=function(e,t){this.field===e&&(this.value=t,this.isValue&&t===this.resolved&&(this.checked=!0))};var l=function(){this.element=null,this.canFocus=function(){return!1},this.apply=function(e){},this.focus=function(){},this.save=function(){return{}}},d=function(e){this.data=[],this.name=null,this.theme="searchable_default",this.xc=!1,this.listZIndex=1e5,this.onSelect=null,this.yc=null,this.zc=null,this.Ac=!1,this.Bc=null,this.Cc=null,this.p=[],this.Dc=null,e=e||{};var t=this,i={"selected":{post:function(e){"object"==typeof e&&e.id?t.yc=e:"string"!=typeof e&&"number"!=typeof e||t.select(e)}}};Object.defineProperty(this,"selected",{get:function(){return this.yc}}),Object.defineProperty(this,"disabled",{get:function(){return this.xc},set:function(e){this.xc=e,this.Bc&&(this.Bc.disabled=e,e&&this.Ec())}});for(var a in e)i[a]||(this[a]=e[a]);for(var a in e)i[a]&&i[a].post(e[a])};d.prototype.select=function(e){return this.yc=this.data.find(function(t){return t.id===e}),this.Fc(!1),this},d.prototype.create=function(){function e(e){var i=l.strategy;"includes"!==l.strategy&&"startsWith"!==l.strategy&&(i="includes"),e=e||i||"includes",h.style.display="",h.style.top=m.offsetHeight+"px",h.style.left="0px",h.style.width=m.offsetWidth+"px",h.innerHTML="",h.addEventListener("mousedown",function(e){e.preventDefault()}),l.zc=null,l.p=[];var n=null;l.data.forEach(function(i){var o=i.name||i.id;if("includes"===e){if(o.toLowerCase().indexOf(m.value.toLowerCase())===-1)return}else if("startsWith"===e&&0!==o.toLowerCase().indexOf(m.value.toLowerCase()))return;var r=document.createElement("div");r.className=l.theme+"_list_item",r.innerText=o,r.item=i,i===l.yc&&(l.zc=r),n||(n=r),r.addEventListener("mousedown",function(e){a(r),e.preventDefault()}),r.addEventListener("mousemove",function(e){l.zc!==r&&(l.zc=r,t({dontScroll:!0}))}),h.appendChild(r),l.p.push(r)}),l.zc||(l.zc=n),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.zc&&(l.zc.className+=" "+l.theme+"_list_item_highlight",t&&!i(l.zc,h)&&l.zc.scrollIntoView())}function i(e,t){var i=e.getBoundingClientRect(),a=t.getBoundingClientRect();return i.top>=a.top&&i.bottom<=a.bottom}function a(e){var t=e.item;l.yc=t,l.Fc(!0),o(),r()}function n(){l.Ec()}function o(){l.q()}function r(){l.Ac=!0,m.setAttribute("readonly","readonly"),m.focus()}function s(){l.Ac=!1,m.removeAttribute("readonly"),m.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.Ac?(l.focus(),s()):(n(),r())});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.Dc=f;var m=document.createElement("input");return m.type="text",m.className=this.theme+"_input",m.disabled=this.xc,m.addEventListener("click",function(e){s()}),m.addEventListener("focus",function(t){e("all")}),m.addEventListener("input",function(t){e()}),m.addEventListener("blur",function(e){m.removeAttribute("readonly"),n()}),m.addEventListener("keydown",function(e){if(l.Ac){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;s()}if("ArrowDown"===e.key){var i=d.p.indexOf(d.zc);i+1<d.p.length&&(d.zc=d.p[i+1]),t()}else if("ArrowUp"===e.key){var i=d.p.indexOf(d.zc);i-1>=0&&(d.zc=d.p[i-1]),t()}else"Enter"===e.key?l.zc?(e.stopPropagation(),a(l.zc)):(e.stopPropagation(),n(),r()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),n(),r())}),this.Bc=m,this.Cc=h,this.yc||(this.yc=this.data[0],this.yc&&(m.value=this.yc.name)),c.appendChild(m),c.appendChild(u),c.appendChild(f),c.appendChild(h),c},d.prototype.Ec=function(){this.q(),this.yc?this.Bc.value=this.yc.name:(this.Bc.value="",this.Fc(!0))},d.prototype.focus=function(){this.Ac=!0,this.Bc.setAttribute("readonly","readonly"),this.Bc.focus(),this.Ec()},d.prototype.q=function(){this.Cc.style.display="none"},d.prototype.Fc=function(e){if(this.Dc.value=this.selected?this.selected.id:null,this.yc?this.Bc.value=this.yc.name:this.Bc.value="","function"==typeof this.onSelect){var t={control:this,ui:e};this.onSelect(t)}};var c=function(e){this.form=null,this.item=null,this.data=null,this.name=null,this.theme="edit_table_default",this.onInput=null,this.nav={},this.Gc=null,this.oc=[],e=e||{};for(var t in e)this[t]=e[t]};c.prototype.create=function(){var e=this,t=document.createElement("div");t.className=this.theme+"_main",t.style.position="relative";var i=document.createElement("input");i.type="hidden",i.name=e.name,i.table=this,t.appendChild(i);var a=document.createElement("div");a.className=this.theme+"_table";var n=this.Hc();a.appendChild(n);var o=e.Ic({});o.spacer=!0;var r=this.Jc(o);r.classList.add(e.theme+"_spacer"),a.appendChild(r);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(t){if(!e.disabled){var i=e.item.onNewRow,a={};if("function"==typeof i){var n={};n.result=e.form.serialize(),n.value={},i(n),a=n.value}var o=e.Ic(a);e.oc.push(o),e.Kc(),e.Lc()}}),this.nav.plus=c,d.appendChild(c),t.appendChild(d),t},c.prototype.Hc=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(i){var a=document.createElement("div");a.classList.add(e.theme+"_cell"),a.innerText=i.name,t.appendChild(a)}),t},c.prototype.Mc=function(){var e=this.item.max||0;return!!(e&&this.oc.length>=e)},c.prototype.save=function(){var e=this,t=[];return e.oc.forEach(function(e){var i={};e.cells.forEach(function(e){i[e.id]=e.value}),t.push(i)}),t},c.prototype.load=function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Array expected");this.data=e,this.Nc(),this.Kc()},c.prototype.Oc=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.Mc()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},c.prototype.Nc=function(){var e=this;this.oc=[],this.data.forEach(function(t){var i=e.Ic(t);e.oc.push(i)})},c.prototype.Pc=function(e){var t=this,i=t.oc.indexOf(e);t.oc.splice(i,1)},c.prototype.Ic=function(e){var t=this,i={};return i.data=e,i.cells=[],t.item.columns.forEach(function(a){var n=a.id,o=e[n],r=t.Qc(a);if("undefined"==typeof o)if("text"===r)o="";else if("number"===r)o=0;else if("select"===r){var s=a.options;o=s&&s[0].id}var l={};l.id=n,l.value=o,l.type=r,l.data=a,i.cells.push(l)}),i},c.prototype.Qc=function(e){var t=e.type;return t||(t=e.options?"select":"text"),t},c.prototype.Kc=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.oc.forEach(function(t){var i=e.Jc(t);e.nav.body.appendChild(i)}),0===this.oc.length){var t=e.Rc();e.nav.after.appendChild(t)}this.Oc()},c.prototype.Rc=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},c.prototype.Jc=function(e){var t=this,i=document.createElement("div");i.className=t.theme+"_row",e.cells.forEach(function(a){var n=document.createElement("div");n.className=t.theme+"_cell";var o=t.Sc(a);if(e.spacer){var r=document.createElement("div");r.style.height="0px",r.style.overflow="hidden",r.appendChild(o),n.appendChild(r)}else n.appendChild(o);i.appendChild(n)});var a=document.createElement("div");a.classList.add(t.theme+"_cell"),a.classList.add(t.theme+"_rowaction");var n=document.createElement("span");return n.className=this.theme+"_delete",n.addEventListener("click",function(i){t.disabled||(t.Pc(e),t.Kc(),t.Lc())}),e.spacer||a.appendChild(n),i.appendChild(a),i},c.prototype.Lc=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},c.prototype.Sc=function(e){var t=this,i=e.type;if("text"===i||"number"===i){var a=document.createElement("input");return a.type=i,t.disabled&&(a.disabled=!0),e.value&&(a.value=e.value),a.addEventListener("keyup",function(a){"number"===i?e.value=Number(this.value):e.value=this.value,t.Lc()}),a}if("select"===i){var n=document.createElement("select");return t.disabled&&(n.disabled=!0),e.data.options.forEach(function(t){var i=document.createElement("option");i.innerText=t.name,i.value=t.id,i.wc=t.id,n.appendChild(i),e.value===t.id&&i.setAttribute("selected",!0)}),n.addEventListener("change",function(i){var a=n.options[n.selectedIndex];a&&"undefined"!=typeof a.wc&&(e.value=a.wc),t.Lc()}),n}throw new Error("Unsupported item type: "+i)},c.prototype.focus=function(){}}}(DayPilot),"undefined"==typeof DayPilot)var DayPilot={};if("undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(){if("undefined"==typeof DayPilot.Month||!DayPilot.Month.events){var e={},t=DayPilot.Util.isVueVNode;e.Month=function(i,a){this.v="2024.4.622-lite",this.nav={};var n=this;this.id=i,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.O=!1,this.U=function(e,t){var e=JSON.parse(e);return e.CallBackRedirect?void(document.location.href=e.CallBackRedirect):"None"===e.UpdateType?void n.fireAfterRenderDetached(e.CallBackData,!0):(n.events.list=e.Events,"Full"===e.UpdateType&&(n.startDate=e.StartDate,n.timeFormat=e.TimeFormat?e.TimeFormat:n.timeFormat,"undefined"!=typeof e.WeekStarts&&(n.weekStarts=e.WeekStarts),n.hashes=e.Hashes),n.W(),n.Tc(),n.ea(),"Full"===e.UpdateType&&(n.Uc(),n.Vc()),n.ja(),n.show(),n.ka(),void n.fireAfterRenderDetached(e.CallBackData,!0))},this.fireAfterRenderDetached=function(e,t){var i=function(e,t){return function(){n.afterRender&&n.afterRender(e,t)}};window.setTimeout(i(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}n.events.list||(n.events.list=[]),n.events.list.push(t),n.update(),n.sa.notify()},this.events.find=function(e){if(!n.events.list)return null;if("function"==typeof e){for(var t=e,i=0;i<n.events.list.length;i++){var a=new DayPilot.Event(n.events.list[i],n);if(t(a))return a}return null}for(var i=0;i<n.events.list.length;i++){var o=n.events.list[i];if(o.id===e)return new DayPilot.Event(o,n)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=n.events.find(e.id);if(t){var i=DayPilot.indexOf(n.events.list,t.data);n.events.list.splice(i,1,e)}}n.update(),n.sa.notify()},this.events.remove=function(e){var t;if(e instanceof DayPilot.Event)t=e.data;else if("object"==typeof e){var i=n.events.find(e.id);i&&(t=i.data)}else if("string"==typeof e||"number"==typeof e){var i=n.events.find(e);i&&(t=i.data)}var a=DayPilot.indexOf(n.events.list,t);n.events.list.splice(a,1),n.update(),n.sa.notify()},this.events.load=function(e,t,i){var a=function(e){var t={};t.exception=e.exception,t.request=e.request,"function"==typeof i&&i(t)},o=function(e){var i,o=e.request;try{i=JSON.parse(o.responseText)}catch(e){var r={};return r.exception=e,void a(r)}if(DayPilot.isArray(i)){var s={};if(s.preventDefault=function(){this.preventDefault.value=!0},s.data=i,"function"==typeof t&&t(s),s.preventDefault.value)return;n.events.list=i,n.Ba&&n.update()}};if(n.eventsLoadMethod&&"POST"===n.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":n.visibleStart().toString(),"end":n.visibleEnd().toString()},"url":e,"success":o,"error":a});else{var r=e,s="start="+n.visibleStart().toString()+"&end="+n.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":r,"success":o,"error":a})}},this.events.forRange=function(e,t){e=new DayPilot.Date(e),t=new DayPilot.Date(t);var i=(n.events.list||[]).map(function(e){return new DayPilot.Event(e)});return i.sort(n.qb),i.filter(function(i){var a=i.start(),n=i.end();return a===n&&a===e||DayPilot.Util.overlaps(e,t,a,n)})},this.update=function(e){if(n.jb(e),this.Ba){if(n.O)throw new DayPilot.Exception("You are trying to update a DayPilot.Month instance that has been disposed.");if(this.cells){n.W(),n.Tc(),n.ea(),n.Uc(),n.Vc(),n.ja(),n.t(),n.ka(),this.visible?this.show():this.hide()}}},this.lb=null,this.jb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?n.events.list=e.list:n.events.list=e}}};this.lb=t;for(var i in e)if(t[i]){var a=t[i];a.data=e[i],a.preInit&&a.preInit()}else n[i]=e[i]}},this.mb=function(){var e=this.lb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.ob={},this.ob.events=[],this.pb=function(e){var t=this.ob.events,i=this.events.list[e],a={};for(var o in i)a[o]=i[o];if("function"==typeof this.onBeforeEventRender){var r={};r.control=n,r.data=a,this.onBeforeEventRender(r)}t[e]=a},this.ea=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.pb(t);for(var i=0;i<e.length;i++){var a=e[i];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 n=new DayPilot.Date(a.start),o=new DayPilot.Date(a.end);if(!(n.getTime()>o.getTime()))for(var t=0;t<this.rows.length;t++){var r=this.rows[t],s=new DayPilot.Event(a,this);r.belongsHere(s)&&(r.events.push(s),"function"==typeof this.onBeforeEventRender&&(s.cache=this.ob.events[i]))}}for(var l=0;l<this.rows.length;l++){var r=this.rows[l];r.events.sort(this.qb);for(var d=0;d<this.rows[l].events.length;d++){var c=r.events[d],u=r.getStartColumn(c),h=r.getWidth(c);r.putIntoLine(c,u,h,l)}}}},this.W=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];n.Ea(t)}this.elements.events=[]},this.Ea=function(e){!function(){var i=e.domArgs;if(e.domArgs=null,i&&"function"==typeof n.onBeforeEventDomRemove&&n.onBeforeEventDomRemove(i),i&&"function"==typeof n.onBeforeEventDomAdd){var a=i&&i.Fa;if(a){n.Ha.Ga&&t(i.element)&&(n.Ha.Ia=!0,n.Ha.Ja(a),n.Ha.Ia=!1)}}}(),e.event=null,e.click=null,e.parentNode.removeChild(e)},this.ka=function(){this.Wc()},this.Wc=function(){this.elements.events=[];for(var e=0;e<this.rows.length;e++)for(var t=this.rows[e],i=0;i<t.lines.length;i++)for(var a=t.lines[i],n=0;n<a.length;n++)this.Ka(a[n])},this.qb=function(e,t){if(!(e&&t&&e.start&&t.start))return 0;var i=e.start().getTime()-t.start().getTime();return 0!==i?i:t.end().getTime()-e.end().getTime()},this.drawShadow=function(t,i,a,o,r,s){r||(r=0);var l=o;this.shadow={},this.shadow.list=[],this.shadow.start={x:t,y:i},this.shadow.width=o;var d=7*i+t-r;d<0&&(l+=d,t=0,i=0);for(var c=r;c>=7;)i--,c-=7;if(c>t){c>t+(7-this.getColCount())?(i--,t=t+7-c):(l=l-c+t,t=0)}else t-=c;i<0&&(i=0,t=0);var u=null;e.resizingEvent?u="w-resize":e.movingEvent&&(u="move"),this.nav.top.style.cursor=u;var h=n.eventBorderRadius;for("number"==typeof h&&(h+="px");l>0&&i<this.rows.length;){var f=Math.min(this.getColCount()-t,l),m=this.rows[i],p=this.getRowTop(i),v=m.getHeight(),y=document.createElement("div");y.setAttribute("unselectable","on"),y.style.position="absolute",y.style.left=this.getCellWidth()*t+"%",y.style.width=this.getCellWidth()*f+"%",y.style.top=p+"px",y.style.height=v+"px",y.style.cursor=u,y.classList.add(n.K("_shadow"));var g=document.createElement("div");g.setAttribute("unselectable","on"),y.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(n.K("_shadow_inner")),h&&(l===o&&(y.style.borderTopLeftRadius=h,y.style.borderBottomLeftRadius=h,g.style.borderTopLeftRadius=h,g.style.borderBottomLeftRadius=h),l<=f&&(y.style.borderTopRightRadius=h,y.style.borderBottomRightRadius=h,g.style.borderTopRightRadius=h,g.style.borderBottomRightRadius=h)),this.nav.top.appendChild(y),this.shadow.list.push(y),l-=f+7-this.getColCount(),t=0,i++}},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 i=this.headerHeight,a=0;a<e;a++)i+=this.rows[a].getHeight();return i+=this.cellHeaderHeight,i+=t*this.lineHeight()},this.getDateFromCell=function(e,t){return this.firstDate.addDays(7*t+e)},this.Ka=function(i){var a=i.cache||i.data,o=a.borderRadius||n.eventBorderRadius;"number"==typeof o&&(o+="px");var r=i.part.row,s=i.part.line,l=i.part.colStart,d=i.part.colWidth,c=this.getCellWidth()*l,u=this.getCellWidth()*d,h=this.getEventTop(r,s),f=document.createElement("div");f.setAttribute("unselectable","on"),f.style.height=this.eventHeight+"px",f.style.overflow="hidden",f.className=this.K("_event"),a.cssClass&&DayPilot.Util.addClass(f,a.cssClass),i.part.startsHere||DayPilot.Util.addClass(f,this.K("_event_continueleft")),i.part.endsHere||DayPilot.Util.addClass(f,this.K("_event_continueright")),f.event=i,f.style.width=u+"%",f.style.position="absolute",f.style.left=c+"%",f.style.top=h+"px",this.showToolTip&&i.client.toolTip()&&(f.title=i.client.toolTip()),f.onclick=n.ra,f.oncontextmenu=n.Xc,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 o={};o.start={},o.start.x=l,o.start.y=r,o.event=f.event,o.width=DayPilot.DateUtil.daysSpan(o.event.start(),o.event.end())+1,
|
|
15
|
+
o.direction=this.style.cursor,e.resizingEvent=o}else if("move"===this.style.cursor||i.client.moveEnabled()){n.clearShadow();var c=DayPilot.mo3(n.nav.top,t);if(!c)return;var u=n.getCellBelowPoint(c.x,c.y),h=DayPilot.DateUtil.daysDiff(i.start(),n.rows[r].start),m=7*u.y+u.x-(7*r+l);h&&(m+=h);var p={};p.start={},p.start.x=l,p.start.y=r,p.start.line=s,p.offset=n.eventMoveToPosition?0:m,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 n=6;a.x<=n&&i.client.resizeEnabled()?i.part.startsHere?(f.style.cursor="w-resize",f.dpBorder="left"):f.style.cursor="not-allowed":f.clientWidth-a.x<=n&&i.client.resizeEnabled()?i.part.endsHere?(f.style.cursor="e-resize",f.dpBorder="right"):f.style.cursor="not-allowed":i.client.clickEnabled()?f.style.cursor="pointer":f.style.cursor="default"}}},f.onmouseleave=function(e){f.deleteIcon&&(f.deleteIcon.style.display="none"),f.style.cursor=""},f.onmouseenter=function(e){f.deleteIcon&&(f.deleteIcon.style.display="")};var m=document.createElement("div");if(m.setAttribute("unselectable","on"),m.className=this.K("_event_inner"),"darker"===a.borderColor&&a.backColor?m.style.borderColor=DayPilot.ColorUtil.darker(a.backColor,2):m.style.borderColor=a.borderColor,a.backColor&&(m.style.background=a.backColor),a.fontColor&&(m.style.color=a.fontColor),o&&(f.style.borderRadius=o,m.style.borderRadius=o),f.appendChild(m),i.client.barVisible()){var p=document.createElement("div");p.setAttribute("unselectable","on"),p.className=this.K("_event_bar"),p.style.position="absolute";var v=document.createElement("div");v.setAttribute("unselectable","on"),v.className=this.K("_event_bar_inner"),v.style.top="0%",v.style.height="100%",a.barColor&&(v.style.backgroundColor=a.barColor),p.appendChild(v),f.appendChild(p)}if(i.client.deleteEnabled()){var y=Math.floor(n.eventHeight/2-9),g=document.createElement("div");g.style.position="absolute",g.style.right="2px",g.style.top=y+"px",g.style.width="18px",g.style.height="18px",g.className=n.K("_event_delete"),g.onmousedown=function(e){e.stopPropagation()},g.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&n.ua(t)},g.style.display="none",f.deleteIcon=g,f.appendChild(g)}var b=a.areas?DayPilot.Areas.copy(a.areas):[];if(DayPilot.Areas.attach(f,i,{"areas":b}),"function"==typeof n.onAfterEventRender){var D={};D.e=f.event,D.div=f,n.onAfterEventRender(D)}!function(){var e={};if(e.control=n,e.e=i,e.element=null,f.domArgs=e,"function"==typeof n.onBeforeEventDomAdd&&n.onBeforeEventDomAdd(e),e.element){var a=m;if(a){e.Fa=a;if(t(e.element)){if(!n.Ha.Ga)throw new DayPilot.Exception("Can't reach Vue");n.Ha.Ia=!0,n.Ha.La(e.element,a,{"style":{"flexGrow":1}}),n.Ha.Ia=!1}else a.appendChild(e.element)}}else m.innerHTML=i.client.innerHTML()}(),this.elements.events.push(f),this.nav.events.appendChild(f)},this.lastVisibleDayOfMonth=function(){return this.startDate.lastDayOfMonth()},this.Tc=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,t=(this.startDate,this.lastVisibleDayOfMonth()),i=DayPilot.DateUtil.daysDiff(this.firstDate,t)+1;e=Math.ceil(i/7),this.days=7*e,this.rows=[];for(var a=0;a<e;a++){var o={};o.start=this.firstDate.addDays(7*a),o.end=o.start.addDays(this.getColCount()),o.events=[],o.lines=[],o.index=a,o.minHeight=this.cellHeight,o.calendar=this,o.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())},o.getPartStart=function(e){return DayPilot.DateUtil.max(this.start,e.start())},o.getPartEnd=function(e){return DayPilot.DateUtil.min(this.end,e.end())},o.getStartColumn=function(e){var t=this.getPartStart(e);return DayPilot.DateUtil.daysDiff(this.start,t)},o.getWidth=function(e){return DayPilot.DateUtil.daysSpan(this.getPartStart(e),this.getPartEnd(e))+1},o.putIntoLine=function(e,t,i,a){for(var n=this,o=0;o<this.lines.length;o++){var r=this.lines[o];if(r.isFree(t,i))return r.addEvent(e,t,i,a,o),o}var r=[];return r.isFree=function(e,t){for(var i=!0,a=0;a<this.length;a++)e+t-1<this[a].part.colStart||e>this[a].part.colStart+this[a].part.colWidth-1||(i=!1);return i},r.addEvent=function(e,t,i,a,o){e.part.colStart=t,e.part.colWidth=i,e.part.row=a,e.part.line=o,e.part.startsHere=n.start.getTime()<=e.start().getTime(),e.part.endsHere=n.end.getTime()>=e.end().getTime(),this.push(e)},r.addEvent(e,t,i,a,this.lines.length),this.lines.push(r),this.lines.length-1},o.getStart=function(){for(var e=0,t=0;t<n.rows.length&&t<this.index;t++)e+=n.rows[t].getHeight()},o.getHeight=function(){return Math.max(this.lines.length*n.lineHeight()+n.cellHeaderHeight+n.cellMarginBottom,this.calendar.cellHeight)},this.rows.push(o)}this.endDate=this.firstDate.addDays(7*e)},this.visibleStart=function(){return n.firstDate},this.visibleEnd=function(){return n.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.K=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Na=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(e){return!1},this.hideUntilInit&&(t.style.visibility="hidden"),this.visible||(t.style.display="none"),t.className=this.K("_main");var i=document.createElement("div");this.nav.cells=i,i.style.position="absolute",i.style.left="0px",i.style.right="0px",i.setAttribute("unselectable","on"),t.appendChild(i);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 i=DayPilot.mo3(n.nav.top,t);if(!i)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var o,r,s=e.resizingEvent;s.start;if("w-resize"===s.direction){r=a;var l=s.event.end();l.getDatePart()===l&&(l=l.addDays(-1));var d=n.getCellFromDate(l);o=n.getWidth(a,d)}else r=n.getCellFromDate(s.event.start()),o=n.getWidth(r,a);o<1&&(o=1),n.drawShadow(r.x,r.y,0,o)}else if(e.movingEvent){var i=DayPilot.mo3(n.nav.top,t);if(!i)return;if(i.x===e.movingEvent.coords.x&&i.y===e.movingEvent.coords.y)return;var c=3,u=Math.abs(i.x-e.movingEvent.coords.x)+Math.abs(i.y-e.movingEvent.coords.y);if(u<=c)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var h=e.movingEvent.event,f=e.movingEvent.offset,o=n.cellMode?1:DayPilot.DateUtil.daysSpan(h.start(),h.end())+1;o<1&&(o=1),n.drawShadow(a.x,a.y,0,o,f,h)}else if(e.timeRangeSelecting){var i=DayPilot.mo3(n.nav.top,t);if(!i)return;var a=n.getCellBelowPoint(i.x,i.y);n.clearShadow();var r=e.timeRangeSelecting,m=7*r.y+r.x,p=7*a.y+a.x,o=Math.abs(p-m)+1;o<1&&(o=1);var v=m<p?r:a;e.timeRangeSelecting.from={x:v.x,y:v.y},e.timeRangeSelecting.width=o,e.timeRangeSelecting.moved=!0,n.drawShadow(v.x,v.y,0,o,0,null)}}},this.ja=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 i=Math.floor(this.nav.top.clientWidth/this.getColCount()),a=Math.min(Math.floor(e/i),this.getColCount()-1),n=null,o=this.headerHeight,r=0,s=0;s<this.rows.length;s++){var l=o;if(o+=this.rows[s].getHeight(),t<o){r=t-l,n=s;break}}null===n&&(n=this.rows.length-1);var d={};return d.x=a,d.y=n,d.relativeY=r,d},this.getCellFromDate=function(e){for(var t=DayPilot.DateUtil.daysDiff(this.firstDate,e),i={x:0,y:0};t>=7;)i.y++,t-=7;return i.x=t,i},this.Vc=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 i=document.createElement("div");i.setAttribute("unselectable","on"),i.style.position="absolute",i.style.left=this.getCellWidth()*t+"%",i.style.width=this.getCellWidth()+"%",i.style.top="0px",i.style.height=this.headerHeight+"px";var a=t+this.getWeekStart();a>6&&(a-=7),i.className=this.K("_header");var n=document.createElement("div");n.setAttribute("unselectable","on"),n.innerHTML=o.locale().dayNames[a],i.appendChild(n),n.style.position="absolute",n.style.top="0px",n.style.bottom="0px",n.style.left="0px",n.style.right="0px",n.className=this.K("_header_inner"),n.innerHTML=o.locale().dayNames[a],e.appendChild(i);for(var r=0;r<this.rows.length;r++)this.Yc(t,r,e)}},this.Uc=function(){for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++){var i=n.cells[e][t];n.Ya(i)}this.nav.cells.innerHTML=""},this.Ya=function(e){!function(){var i=e.domArgs;if(e.domArgs=null,i&&"function"==typeof n.onBeforeCellDomRemove&&n.onBeforeCellDomRemove(i),i&&"function"==typeof n.onBeforeCellDomAdd){var a=i&&i.Fa;if(a){var o=n.Zc.reactDOM&&isReactCmp(i.element),r=n.Ha.Ga&&(isVueCmp(i.element)||t(i.element));o?n.Zc.$c(a):r&&(n.Ha.Ia=!0,n.Ha.Ja(a),n.Ha.Ia=!1)}}}(),e.onclick=null},this.qa=function(){return 2===n.api},this.Yc=function(i,a,r){var s=this.rows[a],l=this.firstDate.addDays(7*a+i),d=l.getDay(),c=null;c=1===d?o.locale().monthNames[l.getMonth()]+" "+d:""+d;var u=!n.isWeekend(l),h={"start":l,"end":l.addDays(1),"properties":{"headerHtml":c,"backColor":null,"business":u,"html":null}},f={};f.control=n,f.cell=h,"function"==typeof n.onBeforeCellRender&&n.onBeforeCellRender(f);var m=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()*i+"%",p.style.width=this.getCellWidth()+"%",p.style.top=this.getRowTop(a)+"px",p.style.height=s.getHeight()+"px",p.className=this.K("_cell"),m.business){var u=this.K("_cell_business");DayPilot.Util.addClass(p,u)}var v=(this.startDate.addMonths(-1).getMonth(),this.startDate.addMonths(1).getMonth(),this.startDate.getMonth(),document.createElement("div"));v.setAttribute("unselectable","on"),p.appendChild(v),v.style.position="absolute",v.style.left="0px",v.style.right="0px",v.style.top="0px",v.style.bottom="0px",v.className=this.K("_cell_inner"),m.backColor&&(v.style.backgroundColor=f.cell.properties.backColor),p.onmousedown=function(t){"Disabled"!==n.timeRangeSelectedHandling&&(n.clearShadow(),e.timeRangeSelecting={"root":n,"x":i,"y":a,"from":{x:i,y:a},"width":1})},p.onclick=function(){var e=function(e){var t=new DayPilot.Date(e),i=t.addDays(1);n.M(t,i)};if("Disabled"!==n.timeRangeSelectedHandling)return void e(l)};var y=document.createElement("div");if(y.setAttribute("unselectable","on"),y.style.height=this.cellHeaderHeight+"px",y.className=this.K("_cell_header"),y.onclick=function(e){if("Enabled"===n.cellHeaderClickHandling){e.stopPropagation();var t={};t.control=n,t.start=l,t.end=l.addDays(1),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onCellHeaderClick&&(n.onCellHeaderClick(t),t.preventDefault.value)||"function"==typeof n.onCellHeaderClicked&&n.onCellHeaderClicked(t)}},y.innerHTML=m.headerHtml,v.appendChild(y),m.html){var g=document.createElement("div");g.style.height=s.getHeight()-this.cellHeaderHeight+"px",g.style.overflow="hidden",g.innerHTML=m.html,v.appendChild(g)}!function(){if("function"==typeof n.onBeforeCellDomAdd||"function"==typeof n.onBeforeCellDomRemove){var e={};if(e.control=n,e.cell=h,e.element=null,p.domArgs=e,"function"==typeof n.onBeforeCellDomAdd&&n.onBeforeCellDomAdd(e),e.element){var i=v;if(i){e.Fa=i;if(t(e.element)){if(!n.Ha.Ga)throw new DayPilot.Exception("Can't reach Vue");n.Ha.Ia=!0,n.Ha.La(e.element,i),n.Ha.Ia=!1}else i.appendChild(e.element)}}}}(),this.cells[i][a]=p,r.appendChild(p)},this.getWeekStart=function(){if("Auto"===n.weekStarts){var e=o.locale();return e?e.weekStarts:0}return n.weekStarts||0},this.getColCount=function(){return 7},this.getCellWidth=function(){return 14.285},this.getRowTop=function(e){for(var t=this.headerHeight,i=0;i<e;i++)t+=this.rows[i].getHeight();return t},this.S=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.R();var n="JSON"+DayPilot.JSON.stringify(a);this.backendUrl&&DayPilot.request(this.backendUrl,this.T,n,this.ajaxError)},this.T=function(e){n.U(e.responseText)},this.R=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=n.startDate,e.timeFormat=this.timeFormat,e.weekStarts=this.weekStarts,e},this.eventClickCallBack=function(e,t){this.S("EventClick",t,e)},this.ra=function(t){e.movingEvent=null,e.resizingEvent=null;var i=this,t=t||window.event;t.ctrlKey;t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),n.eventClickSingle(i,t)},this.eventClickSingle=function(e,t){var i=e.event;if(i&&i.client.clickEnabled())if(n.qa()){var a={};if(a.e=i,a.control=n,a.div=e,a.originalEvent=t,a.meta=t.metaKey,a.ctrl=t.ctrlKey,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventClick&&(n.sa.apply(function(){n.onEventClick(a)}),a.preventDefault.value))return;switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"ContextMenu":var o=i.client.contextMenu();o?o.show(i):n.contextMenu&&n.contextMenu.show(i)}"function"==typeof n.onEventClicked&&n.sa.apply(function(){n.onEventClicked(a)})}else switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"JavaScript":n.onEventClick(i)}},this.Xc=function(){var e=this;return n.ta(e.event),!1},this.ta=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 n.onEventRightClick||(n.onEventRightClick(t),!t.preventDefault.value)){switch(n.eventRightClickHandling){case"ContextMenu":var i=e.client.contextMenu();i?i.show(e):n.contextMenu&&n.contextMenu.show(this.event)}return"function"==typeof n.onEventRightClicked&&n.onEventRightClicked(t),!1}},this.ua=function(e){if(n.qa()){var t={};if(t.e=e,t.control=n,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventDelete&&(n.sa.apply(function(){n.onEventDelete(t)}),t.preventDefault.value))return;switch(n.eventDeleteHandling){case"CallBack":n.eventDeleteCallBack(e);break;case"PostBack":n.eventDeletePostBack(e);break;case"Update":n.events.remove(e)}"function"==typeof n.onEventDeleted&&n.sa.apply(function(){n.onEventDeleted(t)})}else switch(n.eventDeleteHandling){case"PostBack":n.eventDeletePostBack(e);break;case"CallBack":n.eventDeleteCallBack(e);break;case"JavaScript":n.onEventDelete(e)}},this.eventDeleteCallBack=function(e,t){this.S("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.Q("EventDelete",t,e)},this.eventMoveCallBack=function(e,t,i,a,n){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var o={};o.e=e,o.newStart=t,o.newEnd=i,o.position=n,this.S("EventMove",a,o)},this.L=function(e,t,i,a,o,r){var s=e.start().getTimePart(),l=e.end().getDatePart();l.getTime()!==e.end().getTime()&&(l=l.addDays(1));var d=DayPilot.DateUtil.diff(e.end(),l),c=this.getDateFromCell(t,i);c=c.addDays(-a);var u=DayPilot.DateUtil.daysSpan(e.start(),e.end())+1,h=c.addDays(u),f=c.addTime(s),m=h.addTime(d);if(n.qa()){var p={};if(p.e=e,p.control=n,p.newStart=f,p.newEnd=m,p.ctrl=o.ctrlKey,p.shift=o.shiftKey,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventMove&&(n.sa.apply(function(){n.onEventMove(p)}),p.preventDefault.value))return;switch(n.eventMoveHandling){case"CallBack":n.eventMoveCallBack(e,f,m);break;case"Update":e.start(f),e.end(m),n.events.update(e)}"function"==typeof n.onEventMoved&&n.sa.apply(function(){n.onEventMoved(p)})}else switch(n.eventMoveHandling){case"CallBack":n.eventMoveCallBack(e,f,m);break;case"JavaScript":n.onEventMove(e,f,m)}},this.eventResizeCallBack=function(e,t,i,a){if(!t)throw"newStart is null";if(!i)throw"newEnd is null";var n={};n.e=e,n.newStart=t,n.newEnd=i,this.S("EventResize",a,n)},this.J=function(e,t,i){var a=e.start().getTimePart(),o=e.end().getDatePart();o.getTime()!==e.end().getTime()&&(o=o.addDays(1));var r=DayPilot.DateUtil.diff(e.end(),o),s=this.getDateFromCell(t.x,t.y),l=s.addDays(i),d=s.addTime(a),c=l.addTime(r);if(n.qa()){var u={};if(u.e=e,u.control=n,u.newStart=d,u.newEnd=c,u.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventResize&&(n.sa.apply(function(){n.onEventResize(u)}),u.preventDefault.value))return;switch(n.eventResizeHandling){case"CallBack":n.eventResizeCallBack(e,d,c);break;case"Update":e.start(d),e.end(c),n.events.update(e)}"function"==typeof n.onEventResized&&n.sa.apply(function(){n.onEventResized(u)})}else switch(n.eventResizeHandling){case"CallBack":n.eventResizeCallBack(e,d,c);break;case"JavaScript":n.onEventResize(e,d,c)}},this.timeRangeSelectedCallBack=function(e,t,i){var a={};a.start=e,a.end=t,this.S("TimeRangeSelected",i,a)},this.M=function(e,t){if(this.qa()){var i={};if(i.control=n,i.start=e,i.end=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.sa.apply(function(){n.onTimeRangeSelect(i)}),i.preventDefault.value))return;switch(n.timeRangeSelectedHandling){case"CallBack":n.timeRangeSelectedCallBack(e,t)}"function"==typeof n.onTimeRangeSelected&&n.sa.apply(function(){n.onTimeRangeSelected(i)})}else switch(n.timeRangeSelectedHandling){case"CallBack":n.timeRangeSelectedCallBack(e,t);break;case"JavaScript":n.onTimeRangeSelected(e,t)}},this.sa={},this.sa.scope=null,this.sa.notify=function(){n.sa.scope&&n.sa.scope["$apply"]()},this.sa.apply=function(e){e()},this.clearSelection=function(){n.clearShadow()},this.commandCallBack=function(e,t){var i={};i.command=e,this.S("Command",t,i)},this.isWeekend=function(e){return e=new DayPilot.Date(e),0===e.dayOfWeek()||6===e.dayOfWeek()},this.aa={},this.aa.locale=function(){var e=DayPilot.Locale.find(n.locale);return e?e:DayPilot.Locale.US},this.aa.ba=function(){return"Disabled"!==n.xssProtection};var o=this.aa;this.debug=function(e,t){this.debuggingEnabled&&(n.debugMessages||(n.debugMessages=[]),n.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.dispose=function(){var e=n;e.O||(e.O=!0,e.Uc(),e.W(),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.O},this.gb=function(){e.globalHandlers||(e.globalHandlers=!0,DayPilot.re(document,"mouseup",e.gMouseUp))},this.loadFromServer=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof n.events.list||!n.events.list)},this.t=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){n.visible=!0,n.nav.top.style.display=""},this.hide=function(){n.visible=!1,n.nav.top.style.display="none"},this.nb=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: '"+id+"'."}},this.vb=function(){this.Tc(),this.Na(),this.Vc(),this.gb(),this.S("Init")},this.Ra=function(e,t){return n.aa.ba()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.Ha={},this.Ha.Ga=null,this.Ha.Cb=function(e,t,i){var a=n.Ha.Ga;if("function"==typeof a.createVNode&&"function"==typeof a.render){var o=a.createVNode(e,i);a.render(o,t)}},this.Ha.La=function(e,t,i){var a=n.Ha.Ga;if("function"==typeof a.render){var o=e;DayPilot.isArray(e)&&(o=a.h("div",i,e)),a.render(o,t)}},this.Ha.Ja=function(e){var t=n.Ha.Ga;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=this.jb,this.internal.xssTextHtml=n.Ra,this.internal.enableVue=function(e){n.Ha.Ga=e},this.internal.vueRef=function(){return n.Ha.Ga},this.internal.vueRendering=function(){return n.Ha.Ia},this.init=function(){return this.nb(),this.loadFromServer()?void this.vb():(this.Tc(),this.ea(),this.Na(),this.Vc(),this.t(),this.ka(),this.gb(),this.fireAfterRenderDetached(null,!1),this.Ba=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return n.eventBarVisible}}),this.jb(a)},e.gMouseUp=function(t){if(e.movingEvent){var i=e.movingEvent;if(!i.event)return;if(!i.event.calendar)return;if(!i.event.calendar.shadow)return;if(!i.event.calendar.shadow.start)return;var a=e.movingEvent.event.calendar,n=e.movingEvent.event,o=a.shadow.start,r=a.shadow.position,s=e.movingEvent.offset;a.clearShadow(),e.movingEvent=null;var t=t||window.event;return a.L(n,o.x,o.y,s,t,r),t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),e.movingEvent=null,!1}if(e.resizingEvent){var i=e.resizingEvent;if(!i.event)return;if(!i.event.calendar)return;if(!i.event.calendar.shadow)return;if(!i.event.calendar.shadow.start)return;var a=e.resizingEvent.event.calendar,n=e.resizingEvent.event,o=a.shadow.start,l=a.shadow.width;return a.clearShadow(),e.resizingEvent=null,a.J(n,o,l),t.cancelBubble=!0,e.resizingEvent=null,!1}if(e.timeRangeSelecting){if(e.timeRangeSelecting.moved){var d=e.timeRangeSelecting,a=d.root,o=new DayPilot.Date(a.getDateFromCell(d.from.x,d.from.y)),c=o.addDays(d.width);a.M(o,c),a.clearShadow()}e.timeRangeSelecting=null}},DayPilot.Month=e.Month,"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotMonth=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Month(this.id);this.daypilot=i;for(name in e)i[name]=e[name];i.Init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotMonth",["$parse",function(e){return{"restrict":"E","template":"<div></div>","replace":!0,"link":function(t,i,a){var n=new DayPilot.Month(i[0]);n.sa.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)0===s.indexOf("on")&&!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(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)n[t]=e[t];n.update()},!0),l.call(t,c,function(e){n.events.list=e,n.update()},!0)}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(),"undefined"==typeof DayPilot)var DayPilot={};"undefined"==typeof DayPilot.Global&&(DayPilot.Global={}),function(DayPilot){"use strict";if("undefined"==typeof DayPilot.Navigator||!DayPilot.Navigator.def){var e=DayPilot.Util.isVueVNode;DayPilot.Navigator=function(t,i){this.v="2024.4.622-lite";var a=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.showWeekNumbers=!1,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.nav={},this.ob={},this._c=function(){this.root.dp=this,this.root.className=this.K("_main"),"Horizontal"===this.orientation?(r.ad()||(this.root.style.width=this.showMonths*(7*r.cellWidth()+this.bd())+"px"),this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):r.ad()||(this.root.style.width=7*r.cellWidth()+this.bd()+"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=a.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.qa=function(){return 2===a.api},this.Uc=function(){this.root.innerHTML=""},this.K=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.cd=function(e,t){var i=this.K("_"+t);DayPilot.Util.addClass(e,i)},this.dd=function(e,t){var i=this.K("_"+t);DayPilot.Util.removeClass(e,i)},this.ed=function(){if(!r.ad())return null;var e=7;return this.showWeekNumbers&&e++,100/e},this.fd=function(){return r.ad()?null:r.cellWidth()},this.gd=function(e){return"number"!=typeof e&&(e=1),r.ad()?this.ed()*e:this.fd()*e},this.hd=function(e){var t=r.ad()?"%":"px";return this.gd(e)+t},this.Vc=function(t,i){var n={};n.cells=[],n.days=[],n.weeks=[];var o=this.startDate.addMonths(t),s=i.before,l=i.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;n.rowCount=f;var m=(new DayPilot.Date).getDatePart(),p=7*r.cellWidth()+this.bd();n.width=p;var v=this.cellHeight*f+this.titleHeight+this.dayHeaderHeight;n.height=v;var y=document.createElement("div");if(r.ad()?"Horizontal"===this.orientation&&(y.style.width=100/a.showMonths+"%"):y.style.width=p+"px",y.style.height=v+"px","Horizontal"===this.orientation)y.style.position="absolute",r.ad()?(y.style.left=100/a.showMonths*t+"%",n.leftPct=100/a.showMonths*t):y.style.left=p*t+"px",y.style.top="0px",n.top=0,n.left=p*t;else{y.style.position="relative";var g=t>0?a.months[t-1].top+a.months[t-1].height:0;n.top=g,n.left=0,n.leftPct=0}y.className=this.K("_month"),y.style.cursor="default",y.style.MozUserSelect="none",y.style.KhtmlUserSelect="none",y.style.WebkitUserSelect="none",y.month=n,n.div=y,this.root.appendChild(y);var b=this.titleHeight+this.dayHeaderHeight,D=document.createElement("div");D.style.position="absolute",D.style.left="0px",D.style.right="0px",D.style.top="0px",D.style.width=a.hd(),D.style.height=this.titleHeight+"px",D.style.lineHeight=this.titleHeight+"px",D.setAttribute("unselectable","on"),D.className=this.K("_titleleft"),i.left&&(D.style.cursor="pointer",D.innerHTML="<span><</span>",D.onclick=this.jd),y.appendChild(D),this.tl=D;var w=document.createElement("div");w.style.position="absolute",w.style.left=a.hd(),w.style.top="0px",w.style.width=a.hd(a.showWeekNumbers?6:5),w.style.height=this.titleHeight+"px",w.style.lineHeight=this.titleHeight+"px",w.setAttribute("unselectable","on"),w.className=this.K("_title"),w.innerHTML=r.locale().monthNames[o.getMonth()]+" "+o.getYear(),y.appendChild(w),this.ti=w;var x=document.createElement("div");x.style.position="absolute",x.style.left=a.hd(a.showWeekNumbers?7:6),x.style.right=a.hd(a.showWeekNumbers?7:6),x.style.top="0px",x.style.width=a.hd(),x.style.height=this.titleHeight+"px",x.style.lineHeight=this.titleHeight+"px",x.setAttribute("unselectable","on"),x.className=this.K("_titleright"),i.right&&(x.style.cursor="pointer",x.innerHTML="<span>></span>",x.onclick=this.kd),y.appendChild(x),this.tr=x;var C=(this.bd(),a.showWeekNumbers?1:0);if(this.showWeekNumbers)for(var P=0;P<f;P++){var k=c.addDays(7*P),_=null;switch(this.weekNumberAlgorithm){case"Auto":_=1===r.weekStarts()?k.weekNumberISO():k.weekNumber();break;case"US":_=k.weekNumber();break;case"ISO8601":_=k.weekNumberISO();break;default:throw"Unknown weekNumberAlgorithm value."}var S=document.createElement("div");S.style.position="absolute",S.style.left="0px",S.style.right="0px",S.style.top=P*this.cellHeight+b+"px",S.style.width=a.hd(),S.style.height=this.cellHeight+"px",S.style.lineHeight=this.cellHeight+"px",S.setAttribute("unselectable","on"),S.className=this.K("_weeknumber"),S.innerHTML="<span>"+_+"</span>",y.appendChild(S),n.weeks.push(S)}for(var M=0;M<7;M++){n.cells[M]=[];var S=document.createElement("div");S.style.position="absolute",S.style.left=a.hd(M+C),S.style.right=a.hd(M+C),S.style.top=this.titleHeight+"px",S.style.width=a.hd(),S.style.height=this.dayHeaderHeight+"px",S.style.lineHeight=this.dayHeaderHeight+"px",S.setAttribute("unselectable","on"),S.className=this.K("_dayheader"),S.innerHTML="<span>"+this.ld(M)+"</span>",y.appendChild(S),n.days.push(S);for(var P=0;P<f;P++){var k=c.addDays(7*P+M),H=this.md(k)&&"none"!==this.nd(),T=k.firstDayOfMonth()===o,A=k<o,E=k>=o.addMonths(1);if("month"===this.nd())H=H&&T;else if("day"===this.nd())H=H&&(T||s&&A||l&&E);else if("week"===this.nd()){var N=k.firstDayOfMonth()===o;H=H&&(N||s&&A||l&&E)}var I=document.createElement("div");n.cells[M][P]=I;var R=a.od(M,P),B=R.x,z=R.y,O=r.ad()?"%":"px";I.day=k,I.x=M,I.y=P,I.left=B,I.top=z,I.isCurrentMonth=T,I.isNextMonth=E,I.isPrevMonth=A,I.showBefore=s,I.showAfter=l,I.className=this.K(T?"_day":"_dayother"),a.cd(I,"cell"),k.getTime()===m.getTime()&&T&&this.cd(I,"today"),0!==k.dayOfWeek()&&6!==k.dayOfWeek()||this.cd(I,"weekend"),I.style.position="absolute",I.style.left=B+O,I.style.right=B+O,I.style.top=z+"px",I.style.width=a.hd(),I.style.height=this.cellHeight+"px",I.style.lineHeight=this.cellHeight+"px";var U=document.createElement("div");U.style.position="absolute",U.className=k.getTime()===m.getTime()&&T?this.K("_todaybox"):this.K("_daybox"),a.cd(U,"cell_box"),U.style.left="0px",U.style.top="0px",U.style.right="0px",U.style.bottom="0px",I.appendChild(U);var L=null;this.cells&&this.cells[k.toStringSortable()]&&(L=this.cells[k.toStringSortable()]);var j=L||{};if(j.day=k,j.isCurrentMonth=T,j.isToday=k.getTime()===m.getTime()&&T,j.isWeekend=0===k.dayOfWeek()||6===k.dayOfWeek(),L?(j.html=L.html||k.getDay(),j.cssClass=L.css):(j.html=k.getDay(),j.cssClass=null),"function"==typeof a.onBeforeCellRender){var W={};W.cell=j,a.onBeforeCellRender(W),L=W.cell}if(L&&DayPilot.Util.addClass(I,L.cssClass||L.css),T||s&&A||l&&E){var F=document.createElement("div");F.innerHTML=k.getDay(),F.style.position="absolute",F.style.left="0px",F.style.top="0px",F.style.right="0px",F.style.bottom="0px",a.cd(F,"cell_text"),I.isClickable=!0,L&&L.html&&(F.innerHTML=L.html),I.appendChild(F)}I.setAttribute("unselectable","on"),I.onclick=this.pd,function(){if("function"==typeof a.onBeforeCellDomAdd||"function"==typeof a.onBeforeCellDomRemove){var t={};if(t.control=a,t.cell=j,t.element=null,I.domArgs=t,"function"==typeof a.onBeforeCellDomAdd&&a.onBeforeCellDomAdd(t),t.element){var i=U;if(i){t.Fa=i;if(e(t.element)){if(!a.Ha.Ga)throw new DayPilot.Exception("Can't reach Vue");a.Ha.Ia=!0,a.Ha.La(t.element,i),a.Ha.Ia=!1}else i.appendChild(t.element)}}}}(),y.appendChild(I),H&&(a.qd(y,M,P),this.selected.push(I))}}var J=document.createElement("div");J.style.position="absolute",J.style.left="0px",J.style.top=b-2+"px",J.style.width=a.hd(7+C),J.style.height="1px",J.style.fontSize="1px",J.style.lineHeight="1px",J.className=this.K("_line"),y.appendChild(J),this.months.push(n)},this.od=function(e,t){var i=this.titleHeight+this.dayHeaderHeight,n=(this.bd(),this.showWeekNumbers?1:0);return{"x":a.gd(e+n),"y":t*this.cellHeight+i}},this.qd=function(e,t,i){var n=e.month.cells[t][i];a.cd(n,"select");
|
|
16
|
+
},this.rd=function(e,t,i){var n=e.month.cells[t][i];a.dd(n,"select")},this.bd=function(){return this.showWeekNumbers?r.cellWidth():0},this.sd=function(){if(this.items)for(var e=0;e<this.showMonths;e++)for(var t=0;t<7;t++)for(var i=0;i<6;i++){var a=this.months[e].cells[t][i];a&&(1===this.items[a.day.toStringSortable()]?(this.cd(a,"busy"),this.dd(a,"free")):(this.dd(a,"busy"),this.cd(a,"free")))}},this.td=function(){var e={};e.startDate=a.startDate,e.selectionStart=a.selectionStart,e.selectionEnd=a.selectionEnd.addDays(1),a.state.value=JSON.stringify(e)},this.nd=function(){return(this.selectMode||"").toLowerCase()},this.ud=function(){var e=this.selectionDay||this.selectionStart;switch(e||(e=DayPilot.Date.today()),e=new DayPilot.Date(e),this.nd()){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.vd=null,this.select=function(e,t,i){var n=t&&(t instanceof DayPilot.Date||"string"==typeof t),o=t&&"object"==typeof t||"boolean"==typeof t,r=e,s=n?t:null,l=o?t:i;if(!this.Ba)return void(this.vd={"date1":r,"date2":s,"options":l});var d=!0,c=!0;l&&"object"==typeof l?(l.dontFocus&&(d=!1),l.dontNotify&&(c=!1)):"boolean"==typeof l&&(d=!l);var u=this.selectionStart,h=this.selectionEnd;this.selectionStart=new DayPilot.Date(r).getDatePart(),this.selectionDay=this.selectionStart;var f=!1;if(d){var m=this.startDate;(this.selectionStart<this.wd()||this.selectionStart>=this.xd())&&(m=this.selectionStart.firstDayOfMonth()),m.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=m}s&&a.freeHandSelectionEnabled?a.selectionEnd=new DayPilot.Date(s):this.ud(),this.Uc(),this._c(),this.yd(),this.sd(),this.td(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.M(),f&&this.zd()},this.update=function(e){if(a.jb(e),this.Ba){if(a.O)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");a.Ad();var t={"day":a.selectionDay,"start":a.selectionStart,"end":a.selectionEnd};a.hb(),t.start===a.selectionStart&&t.end===a.selectionEnd&&t.day===a.selectionDay||a.M()}},this.hb=function(){this.Uc(),this._c(),this.ud(),this.yd(),this.ea(),this.sd(),this.td(),this.visible?this.show():this.hide()},this.Ad=function(){a.ob={}},this.lb=null,this.jb=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data;e&&(DayPilot.isArray(e.list)?a.events.list=e.list:a.events.list=e)}}};this.lb=t;for(var i in e)if(t[i]){var n=t[i];n.data=e[i],n.preInit&&n.preInit()}else a[i]=e[i]}},this.mb=function(){var e=this.lb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.S=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.R();var n="JSON"+JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.T,n,this.Bd):WebForm_DoCallback(this.uniqueID,n,this.U,null,this.callbackError,!0)},this.Bd=function(e){if("function"==typeof a.onAjaxError){var t={};t.request=e,a.onAjaxError(t)}else"function"==typeof a.ajaxError&&a.ajaxError(e)},this.T=function(e){a.U(e.responseText)},this.Q=function(e,t,i){var n={};n.action=e,n.parameters=i,n.data=t,n.header=this.R();var o="JSON"+JSON.stringify(n);__doPostBack(a.uniqueID,o)},this.R=function(){var e={};return e.v=this.v,e.startDate=this.startDate,e.selectionStart=this.selectionStart,e.showMonths=this.showMonths,e},this.Cd=function(e,t){"refresh"===e&&this.zd()},this.ld=function(e){var t=e+r.weekStarts();return t>6&&(t-=7),r.locale().dayNamesShort[t]},this.md=function(e){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=e.getTime()&&e.getTime()<=this.selectionEnd.getTime())},this.Dd=function(e){for(var t=0;t<a.months.length;t++){var i=a.months[t];if(!i)return null;if(e.x<i.left)return null;if(!(i.left+i.width<e.x)){a.months[t].height;if(i.top<=e.y&&e.y<i.top+i.height)return t}}return null},this.Ed=function(e){},this.Fd=function(){if(!r.ad())return void(a.Gd=a.cellWidth);var e=a.months[0].cells[0][0],t=e.clientWidth;a.Gd=t,a.months.forEach(function(e){e.width=e.div.clientWidth,"Horizontal"===a.orientation&&(e.left=e.div.offsetLeft),e.cells.forEach(function(e,i){e.forEach(function(e,a){e.width=t,e.left=i*t})})})},this.Hd=function(e){a.Fd();var t=DayPilot.mo3(a.nav.top,e),i=a.Dd(t);if(null===i)return null;var n=a.months[i],o=this.titleHeight+this.dayHeaderHeight;if(n.top<=t.y&&t.y<n.top+o)return{"month":i,"x":0,"y":0,"coords":t,"header":!0};for(var r=0;r<n.cells.length;r++)for(var s=0;s<n.cells[r].length;s++){var l=n.cells[r][s],d=l.top+n.top,c=l.left+n.left;if(c<=t.x&&t.x<c+a.Gd&&d<=t.y&&t.y<d+a.cellHeight)return{"month":i,"x":r,"y":s,"coords":t}}return null},this.Id=function(e){if(a.freeHandSelectionEnabled){var t=a.Hd(e);t&&!t.header&&(n.start=t),a.months[t.month].cells[t.x][t.y],e.preventDefault()}},this.Jd=function(e){if(n.start){var t=a.Hd(e);if(n.end)n.end=t;else if(t){var i=3,o=DayPilot.distance(n.start.coords,t.coords);o>i&&(n.end=t)}n.end&&(n.clear(),n.draw())}},this.Kd={};var n=this.Kd;n.start=null,n.drawCell=function(e){var t=a.months[e.month],i=a.od(e.x,e.y),o=t.top+i.y,s=t.left+i.x,l="px",d=a.hd();if(r.ad()){var c="Horizontal"===a.orientation?a.showMonths:1;s=t.leftPct+i.x/c,l="%",d=a.hd(1/c)}var u=document.createElement("div");u.style.position="absolute",u.style.left=s+l,u.style.top=o+"px",u.style.height=a.cellHeight+"px",u.style.width=d,u.style.backgroundColor="#ccc",u.style.opacity=.5,u.style.cursor="default",a.nav.preselection.appendChild(u),n.cells.push(u)},n.clear=function(){if(n.cells){for(var e=0;e<n.cells.length;e++)a.nav.preselection.removeChild(n.cells[e]);n.cells=[]}},n.draw=function(){var e=n.ordered(),t=new o(e.start),i=e.end;if(i){if(i===n.end&&i.header&&i.month>0){i.month-=1;var r=a.months[i.month];i.x=6,i.y=r.rowCount-1}for(n.cells=[];!t.is(i);){t.visible()&&n.drawCell(t);var s=new o(t).next();if(!s)return;t.month=s.month,t.x=s.x,t.y=s.y}t.visible()&&n.drawCell(t)}},n.ordered=function(){var e=n.start,t=n.end,i={};return!t||new o(e).before(t)?(i.start=e,i.end=t):(i.start=t,i.end=e),i};var o=function(e,t,i){if(e instanceof o)return e;if("object"==typeof e){var n=e;this.month=n.month,this.x=n.x,this.y=n.y}else this.month=e,this.x=t,this.y=i;this.is=function(e){return this.month===e.month&&this.x===e.x&&this.y===e.y},this.next=function(){var e=this;if(e.x<6)return{"month":e.month,"x":e.x+1,"y":e.y};var t=a.months[e.month];return e.y<t.rowCount-1?{"month":e.month,"x":0,"y":e.y+1}:e.month<a.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=this;!e.visible();){var t=e.next();if(!t)return null;e=new o(t)}return e},this.previous=function(){var e=this;if(e.x>0)return{"month":e.month,"x":e.x-1,"y":e.y};a.months[e.month];if(e.y>0)return{"month":e.month,"x":6,"y":e.y-1};if(e.month>0){var t=a.months[e.month-1];return{"month":e.month-1,"x":6,"y":t.rowCount-1}}return null},this.previousVisible=function(){for(var e=this;!e.visible();){var t=e.previous();if(!t)return null;e=new o(t)}return e},this.cell=function(){return a.months[this.month].cells[this.x][this.y]},this.date=function(){return this.cell().day},this.before=function(e){return this.date()<new o(e).date()}};this.pd=function(e){var t=this.parentNode,i=this.parentNode.month,n=this.x,o=this.y,r=i.cells[n][o].day;if(i.cells[n][o].isClickable){a.clearSelection(),a.selectionDay=r;var r=a.selectionDay;switch(a.nd()){case"none":a.selectionStart=r,a.selectionEnd=r;break;case"day":if(a.autoFocusOnClick){var s=r;if(r<a.wd()||r>=a.xd())return void a.select(r)}var l=i.cells[n][o];a.qd(t,n,o),a.selected.push(l),a.selectionStart=l.day,a.selectionEnd=l.day;break;case"week":if(a.autoFocusOnClick){var s=i.cells[0][o].day,d=i.cells[6][o].day;if(s.firstDayOfMonth()===d.firstDayOfMonth()&&(s<a.wd()||d>=a.xd()))return void a.select(r)}for(var c=0;c<7;c++)a.qd(t,c,o),a.selected.push(i.cells[c][o]);a.selectionStart=i.cells[0][o].day,a.selectionEnd=i.cells[6][o].day;break;case"month":if(a.autoFocusOnClick){var s=r;if(r<a.wd()||r>=a.xd())return void a.select(r)}for(var s=null,d=null,o=0;o<6;o++)for(var n=0;n<7;n++){var l=i.cells[n][o];l&&l.day.getYear()===r.getYear()&&l.day.getMonth()===r.getMonth()&&(a.qd(t,n,o),a.selected.push(l),null===s&&(s=l.day),d=l.day)}a.selectionStart=s,a.selectionEnd=d;break;default:throw"unknown selectMode"}a.td(),a.M()}},this.M=function(e){var t=a.selectionStart,i=a.selectionEnd.addDays(1),n=DayPilot.DateUtil.daysDiff(t,i),o=a.selectionDay;if(e=e||{},a.qa()){var r={};if(r.start=t,r.end=i,r.day=o,r.days=n,r.mode=e.mode||a.selectMode,r.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onTimeRangeSelect&&(a.onTimeRangeSelect(r),r.preventDefault.value))return;switch(a.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=i,s.days=n,s.day=o,bound.commandCallBack(a.command,s)}break;case"None":break;case"PostBack":a.timeRangeSelectedPostBack(t,i,o)}"function"==typeof a.onTimeRangeSelected&&a.onTimeRangeSelected(r)}else switch(a.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=i,s.days=n,s.day=o,bound.commandCallBack(a.command,s)}break;case"JavaScript":a.onTimeRangeSelected(t,i,o);break;case"None":break;case"PostBack":a.timeRangeSelectedPostBack(t,i,o)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,n.day=a,this.Q("TimeRangeSelected",i,n)},this.kd=function(e){a.Ld(a.skipMonths)},this.jd=function(e){a.Ld(-a.skipMonths)},this.Ld=function(e){this.startDate=this.startDate.addMonths(e),this.Uc(),this._c(),this.yd(),this.td(),this.zd(),this.sd()},this.wd=function(){return a.startDate.firstDayOfMonth()},this.xd=function(){return a.startDate.firstDayOfMonth().addMonths(this.showMonths)},this.visibleStart=function(){return a.startDate.firstDayOfMonth().firstDayOfWeek(r.weekStarts())},this.visibleEnd=function(){return a.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(r.weekStarts()).addDays(42)},this.zd=function(){var e=this.visibleStart(),t=this.visibleEnd();if(a.qa()){var i={};if(i.start=e,i.end=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onVisibleRangeChange&&(a.onVisibleRangeChange(i),i.preventDefault.value))return;switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"Disabled":}"function"==typeof a.onVisibleRangeChanged&&a.onVisibleRangeChanged(i)}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.S("Visible",e,t)},this.visibleRangeChangedPostBack=function(e){var t={};this.Q("Visible",e,t)},this.U=function(e,t){var e=JSON.parse(e);a.items=e.Items,a.cells=e.Cells,a.cells?a.update():a.sd()},this.yd=function(){for(var e=0;e<this.showMonths;e++){var t=this.Md(e);this.Vc(e,t)}this.root.style.height=this.Nd()+"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.Nd=function(){if("Horizontal"===this.orientation){for(var e=0,t=0;t<this.months.length;t++){var i=this.months[t];i.height>e&&(e=i.height)}return e}for(var a=0,t=0;t<this.months.length;t++){var i=this.months[t];a+=i.height}return a},this.Md=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.sa={},this.sa.scope=null,this.sa.notify=function(){a.sa.scope&&a.sa.scope["$apply"]()},this.Ha={},this.Ha.Ga=null,this.Ha.Cb=function(e,t,i){var n=a.Ha.Ga;if("function"==typeof n.createVNode&&"function"==typeof n.render){var o=n.createVNode(e,i);n.render(o,t)}},this.Ha.La=function(e,t){var i=a.Ha.Ga;if("function"==typeof i.render){var n=e;DayPilot.isArray(e)&&(n=i.h("div",null,e)),i.render(n,t)}},this.Ha.Ja=function(e){var t=a.Ha.Ga;"function"==typeof t.render&&t.render(null,e)},this.internal={},this.internal.loadOptions=a.jb,this.internal.initialized=function(){return a.Ba},this.internal.vueRendering=function(){return!1},this.internal.enableVue=function(e){a.Ha.Ga=e},this.internal.vueRef=function(){return a.Ha.Ga},this.internal.vueRendering=function(){return a.Ha.Ia},this.aa={};var r=this.aa;r.locale=function(){return DayPilot.Locale.find(a.locale)},r.weekStarts=function(){if("Auto"===a.weekStarts){var e=r.locale();return e?e.weekStarts:0}return a.weekStarts},r.cellWidth=function(){if(a.ob.cellWidth)return a.ob.cellWidth;var e=a.Od("_cell_dimensions").width;return e||(e=a.cellWidth),a.ob.cellWidth=e,e},r.ad=function(){return"Auto"===a.aa.cellWidth()},this.clearSelection=function(){for(var e=0;e<this.selected.length;e++){var t=this.selected[e];a.rd(t.parentNode,t.x,t.y)}this.selected=[]},this.Pd=function(){return!!this.backendUrl&&("undefined"==typeof a.items||!a.items)},this.events={},this.ea=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 i=this.Qd(t);for(var a in i)this.items[a]=1}}}},this.Od=function(e){var t=document.createElement("div");t.style.position="absolute",t.style.top="-2000px",t.style.left="-2000px",t.className=this.K(e);var i=a.root||document.body;i.appendChild(t);var n=t.offsetHeight,o=t.offsetWidth;i.removeChild(t);var r={};return r.height=n,r.width=o,r},this.Qd=function(e){for(var t=new DayPilot.Date(e.start),i=new DayPilot.Date(e.end),a={},n=t.getDatePart();n.getTime()<=i.getTime();)a[n.toStringSortable()]=1,n=n.addDays(1);return a},this.show=function(){a.visible=!0,a.root.style.display=""},this.hide=function(){a.visible=!1,a.root.style.display="none"},this.nb=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.nb(),!this.root.dp){this.ud(),this._c(),this.yd(),this.ea(),this.sd(),this.Z(),this.Rd(),this.gb();if(this.Pd()&&this.zd(),this.Ba=!0,this.mb(),this.vd){var e=this.vd;this.select(e.date1,e.date2,e.options),this.vd=null}return this}},this.Rd=function(){a.nav.top.onmousedown=this.Id,a.nav.top.onmousemove=this.Jd},this.gb=function(){DayPilot.re(document,"mouseup",a.Sd)},this.Sd=function(e){if(n.start&&n.end){var t=DayPilot.mo3(a.nav.top,e);if(t.x===n.start.coords.x&&t.y===n.start.coords.y)return n.start=null,void n.clear();n.clear();var i=n.ordered();i.start=new o(i.start).nextVisible(),i.end=new o(i.end).previousVisible(),a.selectionDay=new o(i.start).date(),a.selectionStart=a.selectionDay,a.selectionEnd=new o(i.end).date(),n.start=null,n.end=null,a.Uc(),a._c(),a.yd(),a.sd(),a.td();a.M({"mode":"FreeHand"})}n.start=null,n.end=null},this.dispose=function(){var e=a;e.root&&(e.root.removeAttribute("style"),e.root.removeAttribute("class"),e.root.dp=null,e.root.innerHTML=null,e.root=null,e.O=!0)},this.Z=function(){this.root.dispose=this.dispose},this.Init=this.init,this.jb(i)},"undefined"!=typeof jQuery&&!function(e){e.fn.daypilotNavigator=function(e){var t=null,i=this.each(function(){if(!this.daypilot){var i=new DayPilot.Navigator(this.id);this.daypilot=i;for(var a in e)i[a]=e[a];i.Init(),t||(t=i)}});return 1===this.length?t:i}}(jQuery),function(){var e=DayPilot.am();e&&e.directive("daypilotNavigator",["$parse",function(e){return{"restrict":"E","template":"<div id='{{id}}'></div>","compile":function(t,i){return t.replaceWith(this["template"].replace("{{id}}",i["id"])),function(t,i,a){var n=new DayPilot.Navigator(i[0]);n.sa.scope=t,n.init();var o=a["id"];o&&(t[o]=n);var r=a["publishAs"];if(r){(0,e(r).assign)(t,n)}for(var s in a)if(0===s.indexOf("on")){var l=DayPilot.Util.shouldApply(s);l?!function(i){n[i]=function(n){var o=e(a[i]);t["$apply"](function(){o(t,{"args":n})})}}(s):!function(i){n[i]=function(n){e(a[i])(t,{"args":n})}}(s)}var d=t["$watch"],c=a["config"]||a["daypilotConfig"],u=a["events"]||a["daypilotEvents"];d.call(t,c,function(e,t){for(var i in e)n[i]=e[i];n.update()},!0),d.call(t,u,function(e){n.events.list=e,n.ea(),n.sd()},!0)}}}}])}(),DayPilot.Navigator.def={},"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}(DayPilot);if (typeof module !== "undefined") {
|
|
17
17
|
module.exports = {
|
|
18
18
|
DayPilot: DayPilot,
|
|
19
19
|
};
|