@daypilot/daypilot-lite-javascript 3.17.0 → 3.18.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.
|
@@ -3,16 +3,16 @@ DayPilot Lite
|
|
|
3
3
|
Copyright (c) 2005 - 2023 Annpoint s.r.o.
|
|
4
4
|
https://www.daypilot.org/
|
|
5
5
|
Licensed under Apache Software License 2.0
|
|
6
|
-
Version: 2023.3.
|
|
6
|
+
Version: 2023.3.499-lite
|
|
7
7
|
*/
|
|
8
8
|
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)},DayPilot.isKhtml=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("KHTML")!==-1,DayPilot.isIE=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!==-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={},DayPilot.browser.ie9=function(){var e=document.createElement("div");return e.innerHTML="<!--[if IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}(),DayPilot.browser.ielt9=function(){var e=document.createElement("div");return e.innerHTML="<!--[if lt IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}(),DayPilot.browser.hover=!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||DayPilot.browser.ie?"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:{x:t.pageX,y:t.pageY}},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(){var e=document.createElement("style");e.setAttribute("type","text/css"),e.styleSheet||e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e);var t=!!e.styleSheet,i={};return i.rules=[],i.commit=function(){t&&(e.styleSheet.cssText=this.rules.join("\n"))},i.add=function(i,a,n){return t?void this.rules.push(i+"{"+a+"}"):void(e.sheet.insertRule?("undefined"==typeof n&&(n=e.sheet.cssRules.length),e.sheet.insertRule(i+"{"+a+"}",n)):e.sheet.addRule&&e.sheet.addRule(i,a,n))},i},DayPilot.gs=function(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)||""},DayPilot.StyleReader=function(e){this.get=function(t){return e?DayPilot.gs(e,t):null},this.getPx=function(e){var t=this.get(e);return t.indexOf("px")===-1?void 0:parseInt(t,10)}},function(){if(!DayPilot.Global.defaultCss){var e=DayPilot.sheet();e.add(".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: 0px;bottom: 0px;left: 0px;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.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),"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.G;o&&o.start===n.start&&o.end===n.end&&o.day===n.day&&o.target===n.target||(i.G=n,"function"==typeof i.onChange&&(i.onChange(n),n.preventDefault.value)||"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(n),n.preventDefault.value)||(i.k.q(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.k=null,this.l=DayPilot.Date.today(),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.m=!0,o.n=n.id,o.control=n,o.o=t||{},o.p=function(){n.hide?n.hide():n.nav&&n.nav.top?n.nav.top.style.display="none":n.style.display="none"},o.q=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.s=function(){i.t(),n.show?n.show():n.nav&&n.nav.top?n.nav.top.style.display="":n.style.display=""},o.u=function(){if(o.o.navigatorSelectMode)return o.o.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.z(t);n||(n=this.addView(t));var o={};return o.A=!0,o.B=a,o.n=a.id,o.C=n,o.D=function(e){i.show(o),i.E(o),e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},DayPilot.re(a,"click",o.D),this.i.push(o),o},this.addButton=this.addTrigger,this.select=function(e){var t=this.F(e);t?t.D():this.i.length>0&&this.i[0].D()},this.F=function(e){for(var t=0;t<this.i.length;t++){var i=this.i[t];if(i.n===e)return i}return null},this.E=function(e){if(this.selectedClass){for(var t=0;t<this.i.length;t++){var i=this.i[t];DayPilot.Util.removeClass(i.B,this.selectedClass)}DayPilot.Util.addClass(e.B,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];a=r.start,n=r.end,o=r.day}i.l=o,t(a,n,o)}},this.show=function(e){var a,n;
|
|
10
|
-
if(e.A)n=e,a=n.C;else if(a=e.m?e:this.z(e),this.k===a)return;if(i.onSelect){var o={};o.source=n?n.B:null,o.target=a.control,i.onSelect(o)}this.k=a,a.s();var r=a.u();i.j.updateMode(r),t(i.j.control.selectionStart,i.j.control.selectionEnd.addDays(1),i.j.control.selectionDay)},this.z=function(e){for(var t=0;t<this.f.length;t++)if(this.f[t].control===e)return this.f[t];return null},this.t=function(){for(var e=0;e<this.f.length;e++)this.f[e].p()},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.G=null,this.H=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.H()},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&&!DayPilot.browser.ielt9?(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=DayPilot.ColorUtil.hexToRgb(e);t=t||1;var a=17,n=t*a,o=DayPilot.ColorUtil.adjustLuminance(i,-n);return DayPilot.ColorUtil.rgbToHex(o)},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.I(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.J("_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.K(a,s,o,i)}else if(t.selecting&&null!==t.topSelectedCell){var l=t.selecting.calendar;t.selecting=!1;var d=l.getSelection();l.L(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"},t.Calendar=function(e,i){var a=!1;if(this instanceof t.Calendar&&!this.M&&(a=!0,this.M=!0),!a)throw"DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";var n=this;this.uniqueID=null,this.isCalendar=!0,this.v="2023.3.494-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.columnMarginRight=5,this.columnsLoadMethod="GET",this.contextMenu=null,this.days=1,this.durationBarVisible=!0,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.onBeforeEventRender=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.clearSelection=function(){t.topSelectedCell=null,t.bottomSelectedCell=null,this.N()},this.N=function(){DayPilot.de(n.elements.selection),n.elements.selection=[],n.nav.activeSelection=null},this.O=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!==-1,this.cleanSelection=this.clearSelection,this.P=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.Q();var o="JSON"+DayPilot.JSON.stringify(a);__doPostBack(n.uniqueID,o)},this.R=function(e,t,i){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.callbackTimeout=window.setTimeout(function(){n.loadingStart()},100);var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.Q();var o="JSON"+DayPilot.JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.S,o,this.ajaxError):"function"==typeof WebForm_DoCallback&&WebForm_DoCallback(this.uniqueID,o,this.T,this.clientName,this.onCallbackError,!0)},this.onCallbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.dispose=function(){var e=n;clearInterval(e.U),e.V(),e.nav.scroll.root=null,DayPilot.pu(e.nav.loading),e.W(),e.X(),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.Y=function(){this.nav.top.dispose=this.dispose},this.S=function(e){n.T(e.responseText)},this.Q=function(){var e={};return e.control="dpc",e.id=this.id,e.v=this.v,e.days=n.days,e.startDate=n.startDate,e.heightSpec=n.heightSpec,e.businessBeginsHour=n.businessBeginsHour,e.businessEndsHour=n.businessEndsHour,e.hashes=n.hashes,e.timeFormat=n.timeFormat,e.viewType=n.viewType,e.locale=n.locale,e},this.Z=function(e,t){for(var i=e.parentNode;i&&"TD"!==i.tagName;)i=i.parentNode;var a=document.createElement("div");a.setAttribute("unselectable","on"),a.style.position="absolute",a.style.width=e.offsetWidth+"px",a.style.height=e.offsetHeight+"px",a.style.left=e.offsetLeft+"px",a.style.top=e.offsetTop+"px",a.style.boxSizing="border-box",a.style.zIndex=101,a.className=n.J("_shadow");var o=document.createElement("div");return o.className=n.J("_shadow_inner"),a.appendChild(o),i.firstChild.appendChild(a),a},this._={},this._.locale=function(){var e=DayPilot.Locale.find(n.locale);return e?e:DayPilot.Locale.US},this._.timeFormat=function(){return"Auto"!==n.timeFormat?n.timeFormat:this.locale().timeFormat;
|
|
11
|
-
},this._.aa=function(){return"Disabled"!==n.xssProtection};var o=this._;this.T=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 n.loadingStop(),void n.s();if(n.V(),"Full"===e.UpdateType&&(n.columns=e.Columns,n.days=e.Days,n.startDate=new DayPilot.Date(e.StartDate),n.heightSpec=e.HeightSpec?e.HeightSpec:n.heightSpec,n.businessBeginsHour=e.BusinessBeginsHour?e.BusinessBeginsHour:n.businessBeginsHour,n.businessEndsHour=e.BusinessEndsHour?e.BusinessEndsHour:n.businessEndsHour,n.headerDateFormat=e.HeaderDateFormat?e.HeaderDateFormat:n.headerDateFormat,n.viewType=e.ViewType,n.backColor=e.BackColor?e.BackColor:n.backColor,n.eventHeaderVisible=e.EventHeaderVisible?e.EventHeaderVisible:n.eventHeaderVisible,n.timeFormat=e.TimeFormat?e.TimeFormat:n.timeFormat,n.locale=e.Locale?e.Locale:n.locale,n.ba()),e.Hashes)for(var i in e.Hashes)n.hashes[i]=e.Hashes[i];n.events.list=e.Events,n.ca(),n.da(),"Full"===e.UpdateType&&(n.ea(),n.fa(),n.ga(),n.ha()),n.s(),n.ia(),n.clearSelection(),n.afterRender(e.CallBackData,!0),n.loadingStop()},this.ja=function(){return this.ka()/36e5},this.la=function(){return this.businessBeginsHour>this.businessEndsHour?24-this.businessBeginsHour+this.businessEndsHour:this.businessEndsHour-this.businessBeginsHour},this.ma=function(){return this.ka()/18e5},this.ka=function(){var e=0;return e="BusinessHoursNoScroll"===this.heightSpec?this.la():24,60*e*60*1e3},this.na=function(){return"BusinessHoursNoScroll"===this.heightSpec?this.businessBeginsHour:0},this.oa=function(){return 2===n.api},this.eventClickCallBack=function(e,t){this.R("EventClick",t,e)},this.eventClickPostBack=function(e,t){this.P("EventClick",t,e)},this.pa=function(e){var t=this,i=t.event;if(n.oa()){var a={};if(a.e=i,a.originalEvent=e,a.meta=e.metaKey,a.ctrl=e.ctrlKey,a.control=n,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventClick&&(n.qa.apply(function(){n.onEventClick(a)}),a.preventDefault.value))return;switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"PostBack":n.eventClickPostBack(i);break;case"ContextMenu":var o=i.client.contextMenu();o?o.show(i):n.contextMenu&&n.contextMenu.show(i)}"function"==typeof n.onEventClicked&&n.qa.apply(function(){n.onEventClicked(a)})}else switch(n.eventClickHandling){case"PostBack":n.eventClickPostBack(i);break;case"CallBack":n.eventClickCallBack(i);break;case"JavaScript":n.onEventClick(i)}},this.ra=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 n.onEventRightClick&&(n.onEventRightClick(i),i.preventDefault.value))return!1;switch(n.eventRightClickHandling){case"ContextMenu":var a=t.client.contextMenu();a?a.show(t):n.contextMenu&&n.contextMenu.show(this.event)}return"function"==typeof n.onEventRightClicked&&n.onEventRightClicked(i),e.preventDefault&&e.preventDefault(),!1},this.eventDeleteCallBack=function(e,t){this.R("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.P("EventDelete",t,e)},this.sa=function(e){if(n.oa()){var t={};if(t.e=e,t.control=n,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventDelete&&(n.qa.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.qa.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.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.R("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.P("EventResize",a,n)},this.I=function(e,t,i,a){var o=1,r=new Date,s=new Date,l=e.start(),d=e.end();if("top"===a){var c=l.getDatePart(),u=Math.floor((i-o)/n.cellHeight),h=30*u,f=60*h*1e3,m=60*n.na()*60*1e3;r=c.addTime(f+m),s=e.end()}else if("bottom"===a){var c=d.getDatePart(),u=Math.floor((i+t-o)/n.cellHeight),h=30*u,f=60*h*1e3,m=60*n.na()*60*1e3;r=l,s=c.addTime(f+m)}if(n.oa()){var p={};if(p.e=e,p.control=n,p.newStart=r,p.newEnd=s,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventResize&&(n.qa.apply(function(){n.onEventResize(p)}),p.preventDefault.value))return;switch(n.eventResizeHandling){case"PostBack":n.eventResizePostBack(e,r,s);break;case"CallBack":n.eventResizeCallBack(e,r,s);break;case"Update":e.start(r),e.end(s),n.events.update(e)}"function"==typeof n.onEventResized&&n.qa.apply(function(){n.onEventResized(p)})}else switch(n.eventResizeHandling){case"PostBack":n.eventResizePostBack(e,r,s);break;case"CallBack":n.eventResizeCallBack(e,r,s);break;case"JavaScript":n.onEventResize(e,r,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.P("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.R("EventMove",n,o)},this.K=function(e,t,i,a){var o=1,r=Math.floor((i-o)/n.cellHeight),s=30*r*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.ta[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(n.oa()){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=n,b.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventMove&&(n.qa.apply(function(){n.onEventMove(b)}),b.preventDefault.value))return;switch(n.eventMoveHandling){case"PostBack":n.eventMovePostBack(e,y,g,f.id);break;case"CallBack":n.eventMoveCallBack(e,y,g,f.id);break;case"Update":e.start(y),e.end(g),e.resource(m),n.events.update(e)}"function"==typeof n.onEventMoved&&n.qa.apply(function(){n.onEventMoved(b)})}else switch(n.eventMoveHandling){case"PostBack":n.eventMovePostBack(e,y,g,f.id);break;case"CallBack":n.eventMoveCallBack(e,y,g,f.id);break;case"JavaScript":n.onEventMove(e,y,g,f.id,!1)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,this.P("TimeRangeSelected",a,n)},this.timeRangeSelectedCallBack=function(e,t,i,a){var n={};n.start=e,n.end=t,this.R("TimeRangeSelected",a,n)},this.L=function(e,t,i){if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),this.oa()){var a={};if(a.start=e,a.end=t,a.resource=i,a.control=n,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.qa.apply(function(){n.onTimeRangeSelect(a)}),a.preventDefault.value))return;switch(n.timeRangeSelectedHandling){case"PostBack":n.timeRangeSelectedPostBack(e,t);break;case"CallBack":n.timeRangeSelectedCallBack(e,t)}"function"==typeof n.onTimeRangeSelected&&n.qa.apply(function(){n.onTimeRangeSelected(a)})}else switch(n.timeRangeSelectedHandling){case"PostBack":n.timeRangeSelectedPostBack(e,t);break;case"CallBack":n.timeRangeSelectedCallBack(e,t);break;case"JavaScript":n.onTimeRangeSelected(e,t)}},this.ua=function(e){if(!t.selecting&&"Disabled"!==n.timeRangeSelectedHandling){var i=e.which;if(1===i||0===i)return t.firstMousePos=DayPilot.mc(e),t.selecting={},t.selecting.calendar=n,t.selectedCells&&(n.clearSelection(),t.selectedCells=[]),t.column=t.getColumn(this),t.selectedCells.push(this),t.firstSelected=this,t.topSelectedCell=this,t.bottomSelectedCell=this,n.va(),!1}},this.va=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}(),o=n.ta[a];if(o){var r=o.start,s=n.getPixels(e.start,r).boxTop,l=n.getPixels(i.end,r).boxBottom,d=l-s,c=function(){if(n.nav.activeSelection)return n.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=n.J("_shadow_inner"),e.appendChild(t),n.nav.events.rows[0].cells[a].selection.appendChild(e),n.elements.selection.push(e),n.nav.activeSelection=e,e}();c.className=n.J("_shadow"),c.firstChild.innerHTML="",c.style.top=s+"px",c.style.height=d+"px"}}()},this.wa=function(e){if("undefined"!=typeof t&&t.selecting){var i=DayPilot.mc(e);t.getColumn(this)===t.column&&(n.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]),n.va())}},this.getSelection=function(){var e=t.topSelectedCell.start,i=t.bottomSelectedCell.end,a=t.topSelectedCell.resource;return new DayPilot.Selection(e,i,a,n)},this.xa=function(e){if(e<0)return null;for(var t=0,i=n.nav.events.rows[0].cells,a=0;a<i.length;a++){if(t+=i[a].offsetWidth,e<t)return a}return null},this.ya={},this.ya.getCellCoords=function(){var e={};if(e.x=0,e.y=0,!n.coords)return null;e.x=n.xa(n.coords.x);var t=0,i=Math.floor((n.coords.y-t)/n.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)},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.columns.list=i,n.za&&n.update()}};n.columnsLoadMethod&&"POST"===n.columnsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":o,"error":a}):DayPilot.ajax({"method":"GET","url":e,"success":o,"error":a})},this.ba=function(){var e;e="Resources"!==n.viewType?this.Aa():n.columns.list,this.ta=[];for(var t=0;t<e.length;t++){var i=this.Ba(e[t]);this.ta.push(i)}},this.Ba=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(n.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.Aa=function(){var e=[],t=this.startDate.getDatePart(),i=this.days;switch(this.viewType){case"Day":i=1;break;case"Week":i=7,t=t.firstDayOfWeek(o.locale().weekStarts);break;case"WorkWeek":i=5,t=t.firstDayOfWeek(1)}"BusinessHoursNoScroll"===this.heightSpec&&(t=t.addHours(this.businessBeginsHour));for(var a=0;a<i;a++){var r=n.headerDateFormat?n.headerDateFormat:o.locale().datePattern,s={};s.start=t.addDays(a),s.name=s.start.toString(r,o.locale()),e.push(s)}return e},this.visibleStart=function(){if("Resources"===n.viewType){if(0===n.ta.length)return DayPilot.Date.today();var e=n.ta.map(function(e){return e.start.getTime()}),t=Math.min.apply(null,e);return new DayPilot.Date(t)}return this.ta[0].start},this.visibleEnd=function(){if("Resources"===n.viewType){if(0===n.ta.length)return DayPilot.Date.today().addDays(1);var e=n.ta.map(function(e){return e.start.getTime()}),t=Math.max.apply(null,e);return new DayPilot.Date(t).addDays(1)}var t=this.ta.length-1;return this.ta[t].start.addDays(1)},this.J=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.V=function(){if(this.elements.events)for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e],i=t.event;if(i&&(i.calendar=null),t.onclick=null,t.onclickSave=null,t.onmouseover=null,t.onmouseout=null,t.onmousemove=null,t.onmousedown=null,t.firstChild&&t.firstChild.firstChild&&t.firstChild.firstChild.tagName&&"IMG"===t.firstChild.firstChild.tagName.toUpperCase()){var a=t.firstChild.firstChild;a.onmousedown=null,a.onmousemove=null,a.onclick=null}t.helper=null,t.data=null,t.event=null,DayPilot.de(t)}this.elements.events=[]},this.Ca=function(e){var i=e.cache||e.data,a=this.nav.events,o=document.createElement("div");o.style.position="absolute",o.style.left=e.part.left+"%",o.style.top=e.part.top+"px",o.style.width=e.part.width+"%",o.style.height=Math.max(e.part.height,2)+"px",o.style.overflow="hidden",o.data=e,o.event=e,o.unselectable="on",o.style.MozUserSelect="none",o.style.KhtmlUserSelect="none",o.className=this.J("_event"),i.cssClass&&DayPilot.Util.addClass(o,i.cssClass),n.showToolTip&&e.client.toolTip()&&(o.title=e.client.toolTip()),o.isFirst=e.part.start.getTime()===e.start().getTime(),o.isLast=e.part.end.getTime()===e.end().getTime(),o.onclick=this.pa,DayPilot.re(o,"contextmenu",this.ra),o.onmouseout=function(e){o.deleteIcon&&(o.deleteIcon.style.display="none")},o.onmousemove=function(i){var a=5;if("undefined"!=typeof t){var r=DayPilot.mo3(o,i);if(r&&!t.resizing&&!t.moving){o.deleteIcon&&(o.deleteIcon.style.display="");var s=this.isLast;r.y<=a&&e.client.resizeEnabled()?(this.style.cursor="n-resize",this.dpBorder="top"):this.offsetHeight-r.y<=a&&e.client.resizeEnabled()?s?(this.style.cursor="s-resize",this.dpBorder="bottom"):this.style.cursor="not-allowed":t.resizing||t.moving||("Disabled"!==n.eventClickHandling?this.style.cursor="pointer":this.style.cursor="default")}}},o.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 o=t.moving.helper={};o.oldColumn=n.ta[this.data.part.dayIndex].id,t.originalMouse=DayPilot.mc(i),t.originalTop=this.offsetTop;var r=DayPilot.mo3(this,i);r?t.moveOffsetY=r.y:t.moveOffsetY=0,n.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,n.nav.top.style.cursor=this.style.cursor;return!1};var r=document.createElement("div");if(r.setAttribute("unselectable","on"),r.className=n.J("_event_inner"),r.innerHTML=e.client.html(),"darker"===i.borderColor&&i.backColor?r.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):r.style.borderColor=i.borderColor,i.backColor&&(r.style.background=i.backColor,(DayPilot.browser.ie9||DayPilot.browser.ielt9)&&(r.style.filter="")),i.fontColor&&(r.style.color=i.fontColor),o.appendChild(r),e.client.barVisible()){var s=e.part.height-2,l=100*e.part.barTop/s,d=Math.ceil(100*e.part.barHeight/s),c=document.createElement("div");c.setAttribute("unselectable","on"),c.className=this.J("_event_bar"),c.style.position="absolute",i.barBackColor&&(c.style.backgroundColor=i.barBackColor);var u=document.createElement("div");u.setAttribute("unselectable","on"),u.className=this.J("_event_bar_inner"),u.style.top=l+"%",0<d&&d<=1?u.style.height="1px":u.style.height=d+"%",i.barColor&&(u.style.backgroundColor=i.barColor),c.appendChild(u),o.appendChild(c)}if(e.client.deleteEnabled()){var h=document.createElement("div");h.style.position="absolute",h.style.right="2px",h.style.top="2px",h.style.width="17px",h.style.height="17px",h.className=n.J("_event_delete"),h.onmousedown=function(e){e.stopPropagation()},h.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&n.sa(t)},h.style.display="none",o.deleteIcon=h,o.appendChild(h)}var f=i.areas?DayPilot.Areas.copy(i.areas):[];if(DayPilot.Areas.attach(o,e,{"areas":f}),a.rows[0].cells[e.part.dayIndex]){a.rows[0].cells[e.part.dayIndex].firstChild.appendChild(o),n.Da(o)}if("function"==typeof n.onAfterEventRender){var m={};m.e=o.event,m.div=o,n.onAfterEventRender(m)}n.elements.events.push(o)},this.Da=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.Da(a))}catch(e){}},this.ia=function(){for(var e=0;e<this.ta.length;e++){var t=this.ta[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.Ca(s)}}},this.Ea=function(){this.nav.top.innerHTML="",DayPilot.Util.addClass(this.nav.top,this.J("_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.Fa()+"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.Ga();this.nav.top.appendChild(e),this.nav.scroll.style.zoom=1;var t=this.Ha();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=n.Ia(n.loadingLabelText,n.loadingLabelHtml),this.nav.loading.style.display="none",this.nav.top.appendChild(this.nav.loading)},this.ga=function(){this.fasterDispose||DayPilot.pu(this.nav.hourTable),this.nav.scrollable.rows[0].cells[0].innerHTML="",this.nav.hourTable=this.Ja(),this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable)},this.Ha=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.Ja(),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.Ka()),n.appendChild(this.La()),e.appendChild(t),this.nav.zoom=e,e},this.Ka=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.La=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.ta,i=t.length,a=e.insertRow(-1),o=0;o<i;o++){var r=a.insertCell(-1);r.style.padding="0px",r.style.border="0px none",r.style.height="0px",r.style.overflow="visible",n.rtl||(r.style.textAlign="left");var s=document.createElement("div");s.style.marginRight=n.columnMarginRight+"px",s.style.position="relative",s.style.height="1px",s.style.marginTop="-1px";var l=document.createElement("div");r.selection=l,r.appendChild(s),r.appendChild(l)}return e},this.Ja=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=n.ja(),i=0;i<t;i++)this.Ma(e,i);return e},this.Ma=function(e,t){var i=2*this.cellHeight,a=e.insertRow(-1);a.style.height=i+"px";var r=a.insertCell(-1);r.valign="bottom",r.unselectable="on",r.style.cursor="default",r.style.padding="0px",r.style.border="0px none";var s=document.createElement("div");s.style.position="relative",s.className=this.J("_rowheader"),s.style.width=this.hourWidth+"px",s.style.height=i+"px",s.style.overflow="hidden",s.unselectable="on";var l=document.createElement("div");l.className=this.J("_rowheader_inner"),l.unselectable="on";var d=document.createElement("div");d.unselectable="on";var c=this.startDate.addHours(t).addHours(n.na()),u=c.getHours(),h=u<12,f=o.timeFormat();"Clock12Hours"===f&&(u%=12,0===u&&(u=12)),d.innerHTML=u;var m=document.createElement("span");m.unselectable="on",m.className=this.J("_rowheader_minutes");var p;p="Clock12Hours"===f?h?"AM":"PM":"00",m.innerHTML=p,d.appendChild(m),l.appendChild(d),s.appendChild(l),r.appendChild(s)},this.Fa=function(){switch(this.heightSpec){case"Full":return 48*this.cellHeight;case"BusinessHours":var e=this.la();return e*this.cellHeight*2;case"BusinessHoursNoScroll":var e=this.la();return e*this.cellHeight*2;default:throw"DayPilot.Calendar: Unexpected 'heightSpec' value."}},this.Na=function(){var e=n.nav.corner?n.nav.corner.parentNode:null;if(e){e.innerHTML="";var t=this.Oa();e.appendChild(t),n.nav.corner=t}},this.Ga=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.Oa();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.J("_cornerright");var s=document.createElement("div");s.className=this.J("_cornerright_inner"),r.appendChild(s),a.appendChild(r),this.nav.cornerRight=r}return e.appendChild(t),e},this.Oa=function(){var e=document.createElement("div");e.style.position="relative",e.className=this.J("_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.J("_corner_inner"),e.appendChild(t),e},this.W=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];n.root=null,n.onmousedown=null,n.onmousemove=null,n.onmouseout=null,n.onmouseup=null}this.fasterDispose||DayPilot.pu(e)},this.fa=function(){var e=this.nav.main,i=18e5,a=this.ma(),o=n.ta;for(e&&this.W();e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.tableCreated=!0;for(var r=o.length,s=this.nav.events;s&&s.rows&&s.rows.length>0;)this.fasterDispose||DayPilot.pu(s.rows[0]),s.deleteRow(0);for(var r=o.length,l=s.insertRow(-1),d=0;d<r;d++){var c=l.insertCell(-1);c.style.padding="0px",c.style.border="0px none",c.style.height="0px",c.style.overflow="visible",n.rtl||(c.style.textAlign="left");var u=document.createElement("div");u.style.marginRight=n.columnMarginRight+"px",u.style.position="relative",u.style.height="1px",u.style.marginTop="-1px";var h=document.createElement("div");h.style.position="relative",c.selection=h,c.appendChild(u),c.appendChild(h)}for(var f=0;f<a;f++){var l=e.insertRow(-1);l.style.MozUserSelect="none",l.style.KhtmlUserSelect="none";for(var d=0;d<r;d++){var m=this.ta[d],c=l.insertCell(-1);c.start=m.start.addTime(f*i),c.end=c.start.addTime(i),c.resource=m.id,c.onmousedown=this.ua,c.onmouseup=function(){return!1},c.onclick=function(){return!1},c.root=this,c.style.padding="0px",c.style.border="0px none",c.style.verticalAlign="top",c.style.height=n.cellHeight+"px",c.style.overflow="hidden",c.unselectable="on";var u=document.createElement("div");u.unselectable="on",u.style.height=n.cellHeight+"px",u.style.position="relative",u.className=this.J("_cell");this.Pa(c.start,c.end)&&DayPilot.Util.addClass(u,n.J("_cell_business"));var p=document.createElement("div");p.setAttribute("unselectable","on"),p.className=this.J("_cell_inner"),u.appendChild(p),c.appendChild(u),c.appendChild(u)}}e.root=this,n.nav.scrollable.onmousemove=function(e){var i=n.nav.scrollable;n.coords=DayPilot.mo3(i,e);var a=DayPilot.mc(e);if(t.resizing){t.resizingShadow||(t.resizingShadow=n.Z(t.resizing,!1,n.shadow));var o=n.cellHeight,r=1,s=a.y-t.originalMouse.y;if("bottom"===t.resizing.dpBorder){var l=Math.floor((t.originalHeight+t.originalTop+s+o/2)/o)*o-t.originalTop+r;l<o&&(l=o);var d=n.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-r+o/2)/o)*o+r;c<r&&(c=r),c>t.originalTop+t.originalHeight-o&&(c=t.originalTop+t.originalHeight-o);var l=t.originalHeight-(c-t.originalTop);l<o?l=o:t.resizingShadow.style.top=c+"px",t.resizingShadow.style.height=l+"px"}}else if(t.moving){if(!n.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=n.Z(t.moving,!n.O,n.shadow),t.movingShadow.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"}var o=n.cellHeight,r=1,f=t.moveOffsetY;f||(f=o/2);var c=Math.floor((n.coords.y-f-r+o/2)/o)*o+r;c<r&&(c=r);var m=n.nav.events,d=n.nav.main.clientHeight,p=parseInt(t.movingShadow.style.height);c+p>d&&(c=d-p),DayPilot.Util.addClass(t.moving,n.J("_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((n.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=n.ya.getCellCoords(),b=t.column,D=n.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]),n.va()}},n.nav.scrollable.style.display=""},this.Pa=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.X=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.Qa=function(e){for(var t=e?this.nav.header.insertRow(-1):this.nav.header.rows[0],i=this.ta,a=i.length,o=0;o<a;o++){var r=i[o],s=e?t.insertCell(-1):t.cells[o];s.data=r,s.style.overflow="hidden",s.style.padding="0px",s.style.border="0px none",s.style.height=this.headerHeight+"px",s.onclick=n.Ra;var l=e?document.createElement("div"):s.firstChild;if(e){l.unselectable="on",l.style.MozUserSelect="none",l.style.cursor="default",l.style.position="relative",l.className=n.J("_colheader"),l.style.height=this.headerHeight+"px",n.headerTextWrappingEnabled||(l.style.whiteSpace="nowrap");var d=document.createElement("div");d.className=n.J("_colheader_inner"),d.unselectable="on",l.appendChild(d),s.appendChild(l)}r.toolTip&&(d.title=r.toolTip);var d=l.firstChild;d.innerHTML=n.Ia(r.name,r.html)}},this.Ra=function(e){if("Disabled"!==n.headerClickHandling){var t=this.data,i=n.Sa(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 n.onHeaderClick&&(n.onHeaderClick(a),a.preventDefault.value)||"function"==typeof n.onHeaderClicked&&n.onHeaderClicked(a)}},this.Sa=function(e){return new DayPilot.CalendarColumn(e,n)},this.Ta=function(){return this.width&&this.width.indexOf("px")!==-1?"Pixel":"Percentage"},this.ea=function(){var e=this.nav.header,t=!0,i=this.ta;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.Qa(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.R("Command",t,i)},this.loadingStop=function(e){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.nav.loading.style.display="none"},this.Ua=function(){var e=this.nav.scroll;e.onscroll||(e.onscroll=function(){n.Va()});var t="undefined"!=typeof this.Wa.scrollpos?this.Wa.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.Xa=function(){var e=DayPilot.sw(this.nav.scroll),t=this.nav.cornerRight;t&&(t.style.width=e+"px")},this.Ya=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}n.events.list||(n.events.list=[]),n.events.list.push(t),n.update(),n.qa.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++){
|
|
12
|
-
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.qa.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.qa.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.za&&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.Za=function(){if(n.nav.top.className!==n.J("_main")){n.nav.top.className=n.J("_main");var e=n.nav.corner;e.className=n.J("_corner"),e.firstChild.className=n.J("_corner_inner");var t=n.nav.cornerRight;t&&(t.className=n.J("_cornerright"),t.firstChild.className=n.J("_cornerright_inner"))}},this.update=function(e){if(n.$a(e),this.za){n._a(),n.V(),n.nav.top.style.cursor="auto";n.ba(),n.ea(),n.fa(),n.ga(),n.ha(),n.Na(),n.Za(),n.ab(),n.ca(),n.da(),n.s(),n.ia(),n.clearSelection(),this.visible?this.show():this.hide()}},this.bb=null,this.$a=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}},"columns":{"preInit":function(){n.columns.list=this.data}}};this.bb=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.cb=function(){var e=this.bb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.db=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.eb={},this.eb.events=[],this.fb=function(e){var t=this.eb.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.ca=function(){var e=this.events.list;if(n.eb.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 o=0;o<t;o++){var r=e[o],s=r;if("object"!=typeof s)throw new DayPilot.Exception("Event data item must be an object");if(!s.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!s.end)throw new DayPilot.Exception("Event data item must specify 'end' property");if(s instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.");r.start=new DayPilot.Date(r.start),r.end=new DayPilot.Date(r.end)}if("function"==typeof this.onBeforeEventRender)for(var o=0;o<t;o++)this.fb(o);for(var o=0;o<this.ta.length;o++){var l={};l.minEnd=1e6,l.maxStart=-1,this.scrollLabels.push(l);var d=this.ta[o];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 r=e[m],p=r.start,v=r.end,y=p.getTime(),g=v.getTime();if(!(g<y)){var b=!(g<=u||y>=f);if("Resources"===n.viewType&&(b=b&&d.id===r.resource),b){var D=new DayPilot.Event(r,n);D.part.dayIndex=o,D.part.start=u<y?r.start:c,D.part.end=f>g?r.end:h;var x=this.getPixels(D.part.start,d.start),w=this.getPixels(D.part.end,d.start),C=x.top,P=w.top;if(C===P&&(x.cut||w.cut))continue;var _=w.boxBottom;D.part.top=Math.floor(C/this.cellHeight)*this.cellHeight+1,D.part.height=Math.max(Math.ceil(_/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.eb.events[m]),D.part.start.getTime()===y&&D.part.end.getTime()===g&&(a[m]=!0)}}}}for(var o=0;o<this.ta.length;o++){var d=this.ta[o];d.events.sort(this.gb);for(var m=0;m<d.events.length;m++){var r=d.events[m];d.putIntoBlock(r)}for(var m=0;m<d.blocks.length;m++){var k=d.blocks[m];k.events.sort(this.gb);for(var S=0;S<k.events.length;S++){var r=k.events[S];k.putIntoLine(r)}}}}},this.gb=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&&(n.debugMessages||(n.debugMessages=[]),n.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.hb(r),c.boxTop=this.hb(l),c.boxBottom=this.hb(d),this.cache.pixels[a+"_"+i]=c,c},this.hb=function(e){return Math.floor(this.cellHeight*e/18e5)},this._a=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart()},this.da=function(){this.nav.corner&&(this.nav.corner.style.height=this.headerHeight+"px")},this.ha=function(){var e=this.Fa();this.nav.scroll&&e>0&&(this.nav.scroll.style.height=e+"px")},this.qa={},this.qa.scope=null,this.qa.notify=function(){n.qa.scope&&n.qa.scope["$apply"]()},this.qa.apply=function(e){e()},this.Va=function(){if(n.nav.scroll){var e=n.nav.scroll.scrollTop,t=e/(2*n.cellHeight);n.Wa.scrollHour=t}},this.ab=function(){var e=0;n.Wa.scrollHour?e=2*n.cellHeight*n.Wa.scrollHour:"Auto"===n.initScrollPos&&(e="BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0),n.nav.scroll.scrollTop=e},this.ib=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof n.events.list||!n.events.list)},this.s=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.jb=function(){this._a(),this.ba(),this.Ea(),this.ea(),this.fa(),this.Xa(),this.Ua(),this.Ya(),t.register(this),this.kb(),this.R("Init")},this.Wa={},this.lb=function(){this.Wa.themes=[],this.Wa.themes.push(this.theme||this.cssClassPrefix)},this.mb=function(){for(var e=this.Wa.themes,t=0;t<e.length;t++){var i=e[t];DayPilot.Util.removeClass(this.nav.top,i+"_main")}this.Wa.themes=[]},this.nb=function(){if(this.afterRender(null,!1),"function"==typeof this.onAfterRender){var e={};e.isCallBack=!1,this.onAfterRender(e)}},this.ob=function(){if("function"==typeof this.onInit&&!this.pb){this.pb=!0;var e={};this.onInit(e)}},this.qb=function(){var e=n.nav.top;return!!e&&(e.offsetWidth>0&&e.offsetHeight>0)},this.kb=function(){var e=n.qb;e()||(n.U=setInterval(function(){e()&&(n.Ua(),n.Xa(),clearInterval(n.U))},100))},this.Ia=function(e,t){return n._.aa()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.internal={},this.internal.loadOptions=n.$a,this.internal.xssTextHtml=n.Ia,this.init=function(){this.db();var e=this.ib();return this.lb(),e?void this.jb():(this._a(),this.ba(),this.ca(),this.Ea(),this.ea(),this.fa(),this.s(),this.Xa(),this.Ua(),this.Ya(),t.register(this),this.events&&(this.da(),this.ia()),this.nb(),this.ob(),this.kb(),this.za=!0,this)},this.Init=this.init,this.$a(i)},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.qa.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.ob()},!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="2023.3.494-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._.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.rb();this.resetTarget&&!e?this.sb(this.date):this.resetTarget||(i.date=e);var t=this.B();return t&&t.addEventListener("input",function(){i.date=i.rb(),i.date&&i.navigator.select(i.date,{dontNotify:!0})}),document.addEventListener("mousedown",function(){i.close()}),this},this.close=function(){this.qb&&(this.qb=!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.sb(this.date)},this.rb=function(){var e=this.B();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.sb=function(e){var t=this.B();if(t){var a=e.toString(i.pattern,i.locale);"INPUT"===t.tagName?t.value=a:t.innerHTML=a}},this._={},this._.locale=function(){return DayPilot.Locale.find(i.locale)},this.B=function(){var e=this.target;return e&&e.nodeType&&1===e.nodeType?e:document.getElementById(e)},Object.defineProperty(this,"visible",{get:function(){return i.qb}}),this.show=function(){if(!this.qb){var e=this.B(),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.tb),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.sb(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.rb()||(new DayPilot.Date).getDatePart();if(a.startDate=d,a.tb=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.qb=!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="2023.3.494-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.ub=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.ub.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.vb("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.vb("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.vb("item")),h.items&&(DayPilot.Util.addClass(f,this.vb("item_haschildren")),DayPilot.Util.addClass(d,this.vb("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.vb("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.wb(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.vb("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.vb("item_icon");var x=document.createElement("i");x.className=h.icon,D.appendChild(x),p.appendChild(D)}if(h.symbol){var w="http://www.w3.org/2000/svg",C=document.createElementNS(w,"svg");C.setAttribute("width","100%"),C.setAttribute("height","100%");var P=document.createElementNS(w,"use");P.setAttribute("href",h.symbol),C.appendChild(P);var _=document.createElement("span");_.className=a.vb("item_symbol"),_.style.position="absolute",_.style.top="0px",_.style.left="0px",_.appendChild(C),p.appendChild(_)}var k=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.wb(n,i)},300))}};p.onmouseover=k(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.ub.visible=!0,a.ub.source=i,d.style.display="";var M=d.offsetHeight,T=d.offsetWidth;d.style.display="none";var A=document.documentElement.clientHeight,E=window.innerWidth,H="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)+H;d.style.top=i-r+"px"}else d.style.top=i+"px";if("right"===o.align&&(e-=T),e-n>E-T&&0!==E){var s=e-n-(E-T)+H;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")),z=DayPilot.abs(o.parentLink.parentNode),O=z.x+N.offsetWidth,U=z.y-I;O+T>E&&(O=Math.max(0,z.x-T));var R=document.body.scrollTop+document.documentElement.scrollTop;U+M-R>A&&(U=Math.max(0,A-M+R)),d.style.left=O+"px",d.style.top=U+"px"}d.style.display="",this.addShadow(d),this.ub.div=d,o.submenu||(DayPilot.Menu.active=this)}},this.wb=function(e,t){var i=e,n=t.source;if((!a.ub.submenu||a.ub.submenu.item!==e)&&(a.ub.submenu&&a.ub.submenu.item!==e&&(DayPilot.Util.removeClass(a.ub.submenu.link.parentNode,a.vb("item_haschildren_active")),a.ub.submenu.menu.hide(),a.ub.submenu=null),e.items)){var o=a.cloneOptions();o.items=e.items,a.ub.submenu={},a.ub.submenu.menu=new DayPilot.Menu(o),a.ub.submenu.menu.xb=a,a.ub.submenu.menu.show(n,{"submenu":!0,"parentLink":t,"parentItem":i}),a.ub.submenu.item=e,a.ub.submenu.link=t,DayPilot.Util.addClass(t.parentNode,a.vb("item_haschildren_active"))}},this.vb=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.ub.submenu&&this.ub.submenu.menu.hide();var i=t.waitingSubmenu;if(i&&(t.waitingSubmenu=null,clearTimeout(i.timeout)),this.removeShadow(),this.ub.div&&this.ub.div.parentNode===document.body&&document.body.removeChild(this.ub.div),n&&(DayPilot.de(n),n=null),a.ub.visible=!1,a.ub.source=null,a.xb&&e.hideParent&&a.xb.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.za=!1;for(var a in t)this[a]=t[a];this.yb=function(e){return this.theme+"_"+e},this.s=function(){this.nav.top=document.getElementById(e);var t=this.nav.top;t.className=this.yb("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.yb("item"),e.cssClass&&a.classList.add(e.cssClass),a.data=e,a.onclick=function(t){if(i.active&&i.active.item===e)i.zb();else if(e.children)return void i.Ab(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.Ab(a)},t.appendChild(a),i.elements.items.push(a)})},this.zb=function(){var e=i.yb("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.Bb=function(e){return!!i.active&&i.active.item===e.data},this.Ab=function(e){if(!i.Bb(e)){i.zb();var t=e.data,a=i.active={};a.item=t,a.div=e;var n=i.yb("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.s(),this.za=!0,this},this.dispose=function(){this.za&&(this.nav.top.innerHTML="",this.elements.items=[])}},DayPilot.MenuBar.deactivate=function(){DayPilot.MenuBar.active&&(DayPilot.MenuBar.active.zb(),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.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.ub.source;a&&a.calendar===e.calendar&&t.menuClean()}}else t.menuClean()},t.handlersRegistered||(DayPilot.re(document,"mousemove",t.mouseMove),DayPilot.re(document,"mousedown",t.mouseDown),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(){var e=document.createElement("style");e.setAttribute("type","text/css"),e.styleSheet||e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e);var t=!!e.styleSheet,i={};return i.rules=[],i.commit=function(){try{t&&(e.styleSheet.cssText=this.rules.join("\n"))}catch(e){}},i.add=function(i,a,n){if(t)return void this.rules.push(i+"{"+a+"}");if(e.sheet.insertRule)"undefined"==typeof n&&(n=e.sheet.cssRules.length),e.sheet.insertRule(i+"{"+a+"}",n);else{if(!e.sheet.addRule)throw"No CSS registration method found";e.sheet.addRule(i,a,n)}},i},a="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",n=new i;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=="+")"),
|
|
10
|
+
if(e.A)n=e,a=n.C;else if(a=e.m?e:this.z(e),this.k===a)return;if(i.onSelect){var o={};o.source=n?n.B:null,o.target=a.control,i.onSelect(o)}this.k=a,a.s();var r=a.u();i.j.updateMode(r),t(i.j.control.selectionStart,i.j.control.selectionEnd.addDays(1),i.j.control.selectionDay)},this.z=function(e){for(var t=0;t<this.f.length;t++)if(this.f[t].control===e)return this.f[t];return null},this.t=function(){for(var e=0;e<this.f.length;e++)this.f[e].p()},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.G=null,this.H=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.H()},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&&!DayPilot.browser.ielt9?(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=DayPilot.ColorUtil.hexToRgb(e);t=t||1;var a=17,n=t*a,o=DayPilot.ColorUtil.adjustLuminance(i,-n);return DayPilot.ColorUtil.rgbToHex(o)},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.I(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.J("_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.K(a,s,o,i)}else if(t.selecting&&null!==t.topSelectedCell){var l=t.selecting.calendar;t.selecting=!1;var d=l.getSelection();l.L(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"},t.Calendar=function(e,i){var a=!1;if(this instanceof t.Calendar&&!this.M&&(a=!0,this.M=!0),!a)throw"DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";var n=this;this.uniqueID=null,this.isCalendar=!0,this.v="2023.3.499-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.columnMarginRight=5,this.columnsLoadMethod="GET",this.contextMenu=null,this.days=1,this.durationBarVisible=!0,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.onBeforeEventRender=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.clearSelection=function(){t.topSelectedCell=null,t.bottomSelectedCell=null,this.N()},this.N=function(){DayPilot.de(n.elements.selection),n.elements.selection=[],n.nav.activeSelection=null},this.O=navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!==-1,this.cleanSelection=this.clearSelection,this.P=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.Q();var o="JSON"+DayPilot.JSON.stringify(a);__doPostBack(n.uniqueID,o)},this.R=function(e,t,i){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.callbackTimeout=window.setTimeout(function(){n.loadingStart()},100);var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.Q();var o="JSON"+DayPilot.JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.S,o,this.ajaxError):"function"==typeof WebForm_DoCallback&&WebForm_DoCallback(this.uniqueID,o,this.T,this.clientName,this.onCallbackError,!0)},this.onCallbackError=function(e,t){alert("Error!\r\nResult: "+e+"\r\nContext:"+t)},this.dispose=function(){var e=n;clearInterval(e.U),e.V(),e.nav.scroll.root=null,DayPilot.pu(e.nav.loading),e.W(),e.X(),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.Y=function(){this.nav.top.dispose=this.dispose},this.S=function(e){n.T(e.responseText)},this.Q=function(){var e={};return e.control="dpc",e.id=this.id,e.v=this.v,e.days=n.days,e.startDate=n.startDate,e.heightSpec=n.heightSpec,e.businessBeginsHour=n.businessBeginsHour,e.businessEndsHour=n.businessEndsHour,e.hashes=n.hashes,e.timeFormat=n.timeFormat,e.viewType=n.viewType,e.locale=n.locale,e},this.Z=function(e,t){for(var i=e.parentNode;i&&"TD"!==i.tagName;)i=i.parentNode;var a=document.createElement("div");a.setAttribute("unselectable","on"),a.style.position="absolute",a.style.width=e.offsetWidth+"px",a.style.height=e.offsetHeight+"px",a.style.left=e.offsetLeft+"px",a.style.top=e.offsetTop+"px",a.style.boxSizing="border-box",a.style.zIndex=101,a.className=n.J("_shadow");var o=document.createElement("div");return o.className=n.J("_shadow_inner"),a.appendChild(o),i.firstChild.appendChild(a),a},this._={},this._.locale=function(){var e=DayPilot.Locale.find(n.locale);return e?e:DayPilot.Locale.US},this._.timeFormat=function(){return"Auto"!==n.timeFormat?n.timeFormat:this.locale().timeFormat;
|
|
11
|
+
},this._.aa=function(){return"Disabled"!==n.xssProtection};var o=this._;this.T=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 n.loadingStop(),void n.s();if(n.V(),"Full"===e.UpdateType&&(n.columns=e.Columns,n.days=e.Days,n.startDate=new DayPilot.Date(e.StartDate),n.heightSpec=e.HeightSpec?e.HeightSpec:n.heightSpec,n.businessBeginsHour=e.BusinessBeginsHour?e.BusinessBeginsHour:n.businessBeginsHour,n.businessEndsHour=e.BusinessEndsHour?e.BusinessEndsHour:n.businessEndsHour,n.headerDateFormat=e.HeaderDateFormat?e.HeaderDateFormat:n.headerDateFormat,n.viewType=e.ViewType,n.backColor=e.BackColor?e.BackColor:n.backColor,n.eventHeaderVisible=e.EventHeaderVisible?e.EventHeaderVisible:n.eventHeaderVisible,n.timeFormat=e.TimeFormat?e.TimeFormat:n.timeFormat,n.locale=e.Locale?e.Locale:n.locale,n.ba()),e.Hashes)for(var i in e.Hashes)n.hashes[i]=e.Hashes[i];n.events.list=e.Events,n.ca(),n.da(),"Full"===e.UpdateType&&(n.ea(),n.fa(),n.ga(),n.ha()),n.s(),n.ia(),n.clearSelection(),n.afterRender(e.CallBackData,!0),n.loadingStop()},this.ja=function(){return this.ka()/36e5},this.la=function(){return this.businessBeginsHour>this.businessEndsHour?24-this.businessBeginsHour+this.businessEndsHour:this.businessEndsHour-this.businessBeginsHour},this.ma=function(){return this.ka()/18e5},this.ka=function(){var e=0;return e="BusinessHoursNoScroll"===this.heightSpec?this.la():24,60*e*60*1e3},this.na=function(){return"BusinessHoursNoScroll"===this.heightSpec?this.businessBeginsHour:0},this.oa=function(){return 2===n.api},this.eventClickCallBack=function(e,t){this.R("EventClick",t,e)},this.eventClickPostBack=function(e,t){this.P("EventClick",t,e)},this.pa=function(e){var t=this,i=t.event;if(n.oa()){var a={};if(a.e=i,a.originalEvent=e,a.meta=e.metaKey,a.ctrl=e.ctrlKey,a.control=n,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventClick&&(n.qa.apply(function(){n.onEventClick(a)}),a.preventDefault.value))return;switch(n.eventClickHandling){case"CallBack":n.eventClickCallBack(i);break;case"PostBack":n.eventClickPostBack(i);break;case"ContextMenu":var o=i.client.contextMenu();o?o.show(i):n.contextMenu&&n.contextMenu.show(i)}"function"==typeof n.onEventClicked&&n.qa.apply(function(){n.onEventClicked(a)})}else switch(n.eventClickHandling){case"PostBack":n.eventClickPostBack(i);break;case"CallBack":n.eventClickCallBack(i);break;case"JavaScript":n.onEventClick(i)}},this.ra=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 n.onEventRightClick&&(n.onEventRightClick(i),i.preventDefault.value))return!1;switch(n.eventRightClickHandling){case"ContextMenu":var a=t.client.contextMenu();a?a.show(t):n.contextMenu&&n.contextMenu.show(this.event)}return"function"==typeof n.onEventRightClicked&&n.onEventRightClicked(i),e.preventDefault&&e.preventDefault(),!1},this.eventDeleteCallBack=function(e,t){this.R("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.P("EventDelete",t,e)},this.sa=function(e){if(n.oa()){var t={};if(t.e=e,t.control=n,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventDelete&&(n.qa.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.qa.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.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.R("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.P("EventResize",a,n)},this.I=function(e,t,i,a){var o=1,r=new Date,s=new Date,l=e.start(),d=e.end();if("top"===a){var c=l.getDatePart(),u=Math.floor((i-o)/n.cellHeight),h=30*u,f=60*h*1e3,m=60*n.na()*60*1e3;r=c.addTime(f+m),s=e.end()}else if("bottom"===a){var c=d.getDatePart(),u=Math.floor((i+t-o)/n.cellHeight),h=30*u,f=60*h*1e3,m=60*n.na()*60*1e3;r=l,s=c.addTime(f+m)}if(n.oa()){var p={};if(p.e=e,p.control=n,p.newStart=r,p.newEnd=s,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventResize&&(n.qa.apply(function(){n.onEventResize(p)}),p.preventDefault.value))return;switch(n.eventResizeHandling){case"PostBack":n.eventResizePostBack(e,r,s);break;case"CallBack":n.eventResizeCallBack(e,r,s);break;case"Update":e.start(r),e.end(s),n.events.update(e)}"function"==typeof n.onEventResized&&n.qa.apply(function(){n.onEventResized(p)})}else switch(n.eventResizeHandling){case"PostBack":n.eventResizePostBack(e,r,s);break;case"CallBack":n.eventResizeCallBack(e,r,s);break;case"JavaScript":n.onEventResize(e,r,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.P("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.R("EventMove",n,o)},this.K=function(e,t,i,a){var o=1,r=Math.floor((i-o)/n.cellHeight),s=30*r*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.ta[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(n.oa()){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=n,b.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onEventMove&&(n.qa.apply(function(){n.onEventMove(b)}),b.preventDefault.value))return;switch(n.eventMoveHandling){case"PostBack":n.eventMovePostBack(e,y,g,f.id);break;case"CallBack":n.eventMoveCallBack(e,y,g,f.id);break;case"Update":e.start(y),e.end(g),e.resource(m),n.events.update(e)}"function"==typeof n.onEventMoved&&n.qa.apply(function(){n.onEventMoved(b)})}else switch(n.eventMoveHandling){case"PostBack":n.eventMovePostBack(e,y,g,f.id);break;case"CallBack":n.eventMoveCallBack(e,y,g,f.id);break;case"JavaScript":n.onEventMove(e,y,g,f.id,!1)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,this.P("TimeRangeSelected",a,n)},this.timeRangeSelectedCallBack=function(e,t,i,a){var n={};n.start=e,n.end=t,this.R("TimeRangeSelected",a,n)},this.L=function(e,t,i){if(e=new DayPilot.Date(e),t=new DayPilot.Date(t),this.oa()){var a={};if(a.start=e,a.end=t,a.resource=i,a.control=n,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.qa.apply(function(){n.onTimeRangeSelect(a)}),a.preventDefault.value))return;switch(n.timeRangeSelectedHandling){case"PostBack":n.timeRangeSelectedPostBack(e,t);break;case"CallBack":n.timeRangeSelectedCallBack(e,t)}"function"==typeof n.onTimeRangeSelected&&n.qa.apply(function(){n.onTimeRangeSelected(a)})}else switch(n.timeRangeSelectedHandling){case"PostBack":n.timeRangeSelectedPostBack(e,t);break;case"CallBack":n.timeRangeSelectedCallBack(e,t);break;case"JavaScript":n.onTimeRangeSelected(e,t)}},this.ua=function(e){if(!t.selecting&&"Disabled"!==n.timeRangeSelectedHandling){var i=e.which;if(1===i||0===i)return t.firstMousePos=DayPilot.mc(e),t.selecting={},t.selecting.calendar=n,t.selectedCells&&(n.clearSelection(),t.selectedCells=[]),t.column=t.getColumn(this),t.selectedCells.push(this),t.firstSelected=this,t.topSelectedCell=this,t.bottomSelectedCell=this,n.va(),!1}},this.va=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}(),o=n.ta[a];if(o){var r=o.start,s=n.getPixels(e.start,r).boxTop,l=n.getPixels(i.end,r).boxBottom,d=l-s,c=function(){if(n.nav.activeSelection)return n.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=n.J("_shadow_inner"),e.appendChild(t),n.nav.events.rows[0].cells[a].selection.appendChild(e),n.elements.selection.push(e),n.nav.activeSelection=e,e}();c.className=n.J("_shadow"),c.firstChild.innerHTML="",c.style.top=s+"px",c.style.height=d+"px"}}()},this.wa=function(e){if("undefined"!=typeof t&&t.selecting){var i=DayPilot.mc(e);t.getColumn(this)===t.column&&(n.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]),n.va())}},this.getSelection=function(){var e=t.topSelectedCell.start,i=t.bottomSelectedCell.end,a=t.topSelectedCell.resource;return new DayPilot.Selection(e,i,a,n)},this.xa=function(e){if(e<0)return null;for(var t=0,i=n.nav.events.rows[0].cells,a=0;a<i.length;a++){if(t+=i[a].offsetWidth,e<t)return a}return null},this.ya={},this.ya.getCellCoords=function(){var e={};if(e.x=0,e.y=0,!n.coords)return null;e.x=n.xa(n.coords.x);var t=0,i=Math.floor((n.coords.y-t)/n.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)},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.columns.list=i,n.za&&n.update()}};n.columnsLoadMethod&&"POST"===n.columnsLoadMethod.toUpperCase()?DayPilot.ajax({"method":"POST","url":e,"success":o,"error":a}):DayPilot.ajax({"method":"GET","url":e,"success":o,"error":a})},this.ba=function(){var e;e="Resources"!==n.viewType?this.Aa():n.columns.list,this.ta=[];for(var t=0;t<e.length;t++){var i=this.Ba(e[t]);this.ta.push(i)}},this.Ba=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(n.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.Aa=function(){var e=[],t=this.startDate.getDatePart(),i=this.days;switch(this.viewType){case"Day":i=1;break;case"Week":i=7,t=t.firstDayOfWeek(o.locale().weekStarts);break;case"WorkWeek":i=5,t=t.firstDayOfWeek(1)}"BusinessHoursNoScroll"===this.heightSpec&&(t=t.addHours(this.businessBeginsHour));for(var a=0;a<i;a++){var r=n.headerDateFormat?n.headerDateFormat:o.locale().datePattern,s={};s.start=t.addDays(a),s.name=s.start.toString(r,o.locale()),e.push(s)}return e},this.visibleStart=function(){if("Resources"===n.viewType){if(0===n.ta.length)return DayPilot.Date.today();var e=n.ta.map(function(e){return e.start.getTime()}),t=Math.min.apply(null,e);return new DayPilot.Date(t)}return this.ta[0].start},this.visibleEnd=function(){if("Resources"===n.viewType){if(0===n.ta.length)return DayPilot.Date.today().addDays(1);var e=n.ta.map(function(e){return e.start.getTime()}),t=Math.max.apply(null,e);return new DayPilot.Date(t).addDays(1)}var t=this.ta.length-1;return this.ta[t].start.addDays(1)},this.J=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.V=function(){if(this.elements.events)for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e],i=t.event;if(i&&(i.calendar=null),t.onclick=null,t.onclickSave=null,t.onmouseover=null,t.onmouseout=null,t.onmousemove=null,t.onmousedown=null,t.firstChild&&t.firstChild.firstChild&&t.firstChild.firstChild.tagName&&"IMG"===t.firstChild.firstChild.tagName.toUpperCase()){var a=t.firstChild.firstChild;a.onmousedown=null,a.onmousemove=null,a.onclick=null}t.helper=null,t.data=null,t.event=null,DayPilot.de(t)}this.elements.events=[]},this.Ca=function(e){var i=e.cache||e.data,a=this.nav.events,o=document.createElement("div");o.style.position="absolute",o.style.left=e.part.left+"%",o.style.top=e.part.top+"px",o.style.width=e.part.width+"%",o.style.height=Math.max(e.part.height,2)+"px",o.style.overflow="hidden",o.data=e,o.event=e,o.unselectable="on",o.style.MozUserSelect="none",o.style.KhtmlUserSelect="none",o.className=this.J("_event"),i.cssClass&&DayPilot.Util.addClass(o,i.cssClass),n.showToolTip&&e.client.toolTip()&&(o.title=e.client.toolTip()),o.isFirst=e.part.start.getTime()===e.start().getTime(),o.isLast=e.part.end.getTime()===e.end().getTime(),o.onclick=this.pa,DayPilot.re(o,"contextmenu",this.ra),o.onmouseout=function(e){o.deleteIcon&&(o.deleteIcon.style.display="none")},o.onmousemove=function(i){var a=5;if("undefined"!=typeof t){var r=DayPilot.mo3(o,i);if(r&&!t.resizing&&!t.moving){o.deleteIcon&&(o.deleteIcon.style.display="");var s=this.isLast;r.y<=a&&e.client.resizeEnabled()?(this.style.cursor="n-resize",this.dpBorder="top"):this.offsetHeight-r.y<=a&&e.client.resizeEnabled()?s?(this.style.cursor="s-resize",this.dpBorder="bottom"):this.style.cursor="not-allowed":t.resizing||t.moving||("Disabled"!==n.eventClickHandling?this.style.cursor="pointer":this.style.cursor="default")}}},o.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 o=t.moving.helper={};o.oldColumn=n.ta[this.data.part.dayIndex].id,t.originalMouse=DayPilot.mc(i),t.originalTop=this.offsetTop;var r=DayPilot.mo3(this,i);r?t.moveOffsetY=r.y:t.moveOffsetY=0,n.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,n.nav.top.style.cursor=this.style.cursor;return!1};var r=document.createElement("div");if(r.setAttribute("unselectable","on"),r.className=n.J("_event_inner"),r.innerHTML=e.client.html(),"darker"===i.borderColor&&i.backColor?r.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):r.style.borderColor=i.borderColor,i.backColor&&(r.style.background=i.backColor,(DayPilot.browser.ie9||DayPilot.browser.ielt9)&&(r.style.filter="")),i.fontColor&&(r.style.color=i.fontColor),o.appendChild(r),e.client.barVisible()){var s=e.part.height-2,l=100*e.part.barTop/s,d=Math.ceil(100*e.part.barHeight/s),c=document.createElement("div");c.setAttribute("unselectable","on"),c.className=this.J("_event_bar"),c.style.position="absolute",i.barBackColor&&(c.style.backgroundColor=i.barBackColor);var u=document.createElement("div");u.setAttribute("unselectable","on"),u.className=this.J("_event_bar_inner"),u.style.top=l+"%",0<d&&d<=1?u.style.height="1px":u.style.height=d+"%",i.barColor&&(u.style.backgroundColor=i.barColor),c.appendChild(u),o.appendChild(c)}if(e.client.deleteEnabled()){var h=document.createElement("div");h.style.position="absolute",h.style.right="2px",h.style.top="2px",h.style.width="17px",h.style.height="17px",h.className=n.J("_event_delete"),h.onmousedown=function(e){e.stopPropagation()},h.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&n.sa(t)},h.style.display="none",o.deleteIcon=h,o.appendChild(h)}var f=i.areas?DayPilot.Areas.copy(i.areas):[];if(DayPilot.Areas.attach(o,e,{"areas":f}),a.rows[0].cells[e.part.dayIndex]){a.rows[0].cells[e.part.dayIndex].firstChild.appendChild(o),n.Da(o)}if("function"==typeof n.onAfterEventRender){var m={};m.e=o.event,m.div=o,n.onAfterEventRender(m)}n.elements.events.push(o)},this.Da=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.Da(a))}catch(e){}},this.ia=function(){for(var e=0;e<this.ta.length;e++){var t=this.ta[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.Ca(s)}}},this.Ea=function(){this.nav.top.innerHTML="",DayPilot.Util.addClass(this.nav.top,this.J("_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.Fa()+"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.Ga();this.nav.top.appendChild(e),this.nav.scroll.style.zoom=1;var t=this.Ha();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=n.Ia(n.loadingLabelText,n.loadingLabelHtml),this.nav.loading.style.display="none",this.nav.top.appendChild(this.nav.loading)},this.ga=function(){this.fasterDispose||DayPilot.pu(this.nav.hourTable),this.nav.scrollable.rows[0].cells[0].innerHTML="",this.nav.hourTable=this.Ja(),this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable)},this.Ha=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.Ja(),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.Ka()),n.appendChild(this.La()),e.appendChild(t),this.nav.zoom=e,e},this.Ka=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.La=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.ta,i=t.length,a=e.insertRow(-1),o=0;o<i;o++){var r=a.insertCell(-1);r.style.padding="0px",r.style.border="0px none",r.style.height="0px",r.style.overflow="visible",n.rtl||(r.style.textAlign="left");var s=document.createElement("div");s.style.marginRight=n.columnMarginRight+"px",s.style.position="relative",s.style.height="1px",s.style.marginTop="-1px";var l=document.createElement("div");r.selection=l,r.appendChild(s),r.appendChild(l)}return e},this.Ja=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=n.ja(),i=0;i<t;i++)this.Ma(e,i);return e},this.Ma=function(e,t){var i=2*this.cellHeight,a=e.insertRow(-1);a.style.height=i+"px";var r=a.insertCell(-1);r.valign="bottom",r.unselectable="on",r.style.cursor="default",r.style.padding="0px",r.style.border="0px none";var s=document.createElement("div");s.style.position="relative",s.className=this.J("_rowheader"),s.style.width=this.hourWidth+"px",s.style.height=i+"px",s.style.overflow="hidden",s.unselectable="on";var l=document.createElement("div");l.className=this.J("_rowheader_inner"),l.unselectable="on";var d=document.createElement("div");d.unselectable="on";var c=this.startDate.addHours(t).addHours(n.na()),u=c.getHours(),h=u<12,f=o.timeFormat();"Clock12Hours"===f&&(u%=12,0===u&&(u=12)),d.innerHTML=u;var m=document.createElement("span");m.unselectable="on",m.className=this.J("_rowheader_minutes");var p;p="Clock12Hours"===f?h?"AM":"PM":"00",m.innerHTML=p,d.appendChild(m),l.appendChild(d),s.appendChild(l),r.appendChild(s)},this.Fa=function(){switch(this.heightSpec){case"Full":return 48*this.cellHeight;case"BusinessHours":var e=this.la();return e*this.cellHeight*2;case"BusinessHoursNoScroll":var e=this.la();return e*this.cellHeight*2;default:throw"DayPilot.Calendar: Unexpected 'heightSpec' value."}},this.Na=function(){var e=n.nav.corner?n.nav.corner.parentNode:null;if(e){e.innerHTML="";var t=this.Oa();e.appendChild(t),n.nav.corner=t}},this.Ga=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.Oa();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.J("_cornerright");var s=document.createElement("div");s.className=this.J("_cornerright_inner"),r.appendChild(s),a.appendChild(r),this.nav.cornerRight=r}return e.appendChild(t),e},this.Oa=function(){var e=document.createElement("div");e.style.position="relative",e.className=this.J("_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.J("_corner_inner"),e.appendChild(t),e},this.W=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];n.root=null,n.onmousedown=null,n.onmousemove=null,n.onmouseout=null,n.onmouseup=null}this.fasterDispose||DayPilot.pu(e)},this.fa=function(){var e=this.nav.main,i=18e5,a=this.ma(),o=n.ta;for(e&&this.W();e&&e.rows&&e.rows.length>0;)this.fasterDispose||DayPilot.pu(e.rows[0]),e.deleteRow(0);this.tableCreated=!0;for(var r=o.length,s=this.nav.events;s&&s.rows&&s.rows.length>0;)this.fasterDispose||DayPilot.pu(s.rows[0]),s.deleteRow(0);for(var r=o.length,l=s.insertRow(-1),d=0;d<r;d++){var c=l.insertCell(-1);c.style.padding="0px",c.style.border="0px none",c.style.height="0px",c.style.overflow="visible",n.rtl||(c.style.textAlign="left");var u=document.createElement("div");u.style.marginRight=n.columnMarginRight+"px",u.style.position="relative",u.style.height="1px",u.style.marginTop="-1px";var h=document.createElement("div");h.style.position="relative",c.selection=h,c.appendChild(u),c.appendChild(h)}for(var f=0;f<a;f++){var l=e.insertRow(-1);l.style.MozUserSelect="none",l.style.KhtmlUserSelect="none";for(var d=0;d<r;d++){var m=this.ta[d],c=l.insertCell(-1);c.start=m.start.addTime(f*i),c.end=c.start.addTime(i),c.resource=m.id,c.onmousedown=this.ua,c.onmouseup=function(){return!1},c.onclick=function(){return!1},c.root=this,c.style.padding="0px",c.style.border="0px none",c.style.verticalAlign="top",c.style.height=n.cellHeight+"px",c.style.overflow="hidden",c.unselectable="on";var u=document.createElement("div");u.unselectable="on",u.style.height=n.cellHeight+"px",u.style.position="relative",u.className=this.J("_cell");this.Pa(c.start,c.end)&&DayPilot.Util.addClass(u,n.J("_cell_business"));var p=document.createElement("div");p.setAttribute("unselectable","on"),p.className=this.J("_cell_inner"),u.appendChild(p),c.appendChild(u),c.appendChild(u)}}e.root=this,n.nav.scrollable.onmousemove=function(e){var i=n.nav.scrollable;n.coords=DayPilot.mo3(i,e);var a=DayPilot.mc(e);if(t.resizing){t.resizingShadow||(t.resizingShadow=n.Z(t.resizing,!1,n.shadow));var o=n.cellHeight,r=1,s=a.y-t.originalMouse.y;if("bottom"===t.resizing.dpBorder){var l=Math.floor((t.originalHeight+t.originalTop+s+o/2)/o)*o-t.originalTop+r;l<o&&(l=o);var d=n.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-r+o/2)/o)*o+r;c<r&&(c=r),c>t.originalTop+t.originalHeight-o&&(c=t.originalTop+t.originalHeight-o);var l=t.originalHeight-(c-t.originalTop);l<o?l=o:t.resizingShadow.style.top=c+"px",t.resizingShadow.style.height=l+"px"}}else if(t.moving){if(!n.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=n.Z(t.moving,!n.O,n.shadow),t.movingShadow.style.width=t.movingShadow.parentNode.offsetWidth+1+"px"}var o=n.cellHeight,r=1,f=t.moveOffsetY;f||(f=o/2);var c=Math.floor((n.coords.y-f-r+o/2)/o)*o+r;c<r&&(c=r);var m=n.nav.events,d=n.nav.main.clientHeight,p=parseInt(t.movingShadow.style.height);c+p>d&&(c=d-p),DayPilot.Util.addClass(t.moving,n.J("_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((n.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=n.ya.getCellCoords(),b=t.column,D=n.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]),n.va()}},n.nav.scrollable.style.display=""},this.Pa=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.X=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.Qa=function(e){function t(t){var o=a[t],r=e?i.insertCell(-1):i.cells[t];r.data=o,r.style.overflow="hidden",r.style.padding="0px",r.style.border="0px none",r.style.height=n.headerHeight+"px",r.onclick=n.Ra;var s,l=e?document.createElement("div"):r.firstChild;e?(l.unselectable="on",l.style.MozUserSelect="none",l.style.cursor="default",l.style.position="relative",l.className=n.J("_colheader"),l.style.height=n.headerHeight+"px",n.headerTextWrappingEnabled||(l.style.whiteSpace="nowrap"),s=document.createElement("div"),s.className=n.J("_colheader_inner"),s.unselectable="on",l.appendChild(s),r.appendChild(l)):s=l.firstChild;var d={};d.header={},d.header.cssClass=null,d.header.verticalAlignment="center",d.column=n.Sa(o,n),"function"==typeof n.onBeforeHeaderRender&&(DayPilot.Util.copyProps(o,d.header,["id","start","name","html","backColor","toolTip","areas"]),n.onBeforeHeaderRender(d),DayPilot.Util.copyProps(d.header,o,["html","backColor","toolTip","areas","cssClass","verticalAlignment"])),o.toolTip&&(s.title=o.toolTip),o.cssClass&&DayPilot.Util.addClass(l,o.cssClass),o.backColor&&(s.style.background=o.backColor),o.areas&&DayPilot.Areas.attach(l,o);var c=o.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=n.Ia(o.name,o.html)}for(var i=e?this.nav.header.insertRow(-1):this.nav.header.rows[0],a=this.ta,o=a.length,r=0;r<o;r++)t(r)},this.Ra=function(e){if("Disabled"!==n.headerClickHandling){var t=this.data,i=n.Sa(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 n.onHeaderClick&&(n.onHeaderClick(a),a.preventDefault.value)||"function"==typeof n.onHeaderClicked&&n.onHeaderClicked(a)}},this.Sa=function(e){return new DayPilot.CalendarColumn(e,n)},this.Ta=function(){return this.width&&this.width.indexOf("px")!==-1?"Pixel":"Percentage"},this.ea=function(){var e=this.nav.header,t=!0,i=this.ta;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.Qa(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.R("Command",t,i)},this.loadingStop=function(e){this.callbackTimeout&&window.clearTimeout(this.callbackTimeout),this.nav.loading.style.display="none"},this.Ua=function(){var e=this.nav.scroll;e.onscroll||(e.onscroll=function(){n.Va()});var t="undefined"!=typeof this.Wa.scrollpos?this.Wa.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.Xa=function(){var e=DayPilot.sw(this.nav.scroll),t=this.nav.cornerRight;
|
|
12
|
+
t&&(t.style.width=e+"px")},this.Ya=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}n.events.list||(n.events.list=[]),n.events.list.push(t),n.update(),n.qa.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.qa.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.qa.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.za&&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.Za=function(){if(n.nav.top.className!==n.J("_main")){n.nav.top.className=n.J("_main");var e=n.nav.corner;e.className=n.J("_corner"),e.firstChild.className=n.J("_corner_inner");var t=n.nav.cornerRight;t&&(t.className=n.J("_cornerright"),t.firstChild.className=n.J("_cornerright_inner"))}},this.update=function(e){if(n.$a(e),this.za){n._a(),n.V(),n.nav.top.style.cursor="auto";n.ba(),n.ea(),n.fa(),n.ga(),n.ha(),n.Na(),n.Za(),n.ab(),n.ca(),n.da(),n.s(),n.ia(),n.clearSelection(),this.visible?this.show():this.hide()}},this.bb=null,this.$a=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}},"columns":{"preInit":function(){n.columns.list=this.data}}};this.bb=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.cb=function(){var e=this.bb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.db=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.eb={},this.eb.events=[],this.fb=function(e){var t=this.eb.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.ca=function(){var e=this.events.list;if(n.eb.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 o=0;o<t;o++){var r=e[o],s=r;if("object"!=typeof s)throw new DayPilot.Exception("Event data item must be an object");if(!s.start)throw new DayPilot.Exception("Event data item must specify 'start' property");if(!s.end)throw new DayPilot.Exception("Event data item must specify 'end' property");if(s instanceof DayPilot.Event)throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.");r.start=new DayPilot.Date(r.start),r.end=new DayPilot.Date(r.end)}if("function"==typeof this.onBeforeEventRender)for(var o=0;o<t;o++)this.fb(o);for(var o=0;o<this.ta.length;o++){var l={};l.minEnd=1e6,l.maxStart=-1,this.scrollLabels.push(l);var d=this.ta[o];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 r=e[m],p=r.start,v=r.end,y=p.getTime(),g=v.getTime();if(!(g<y)){var b=!(g<=u||y>=f);if("Resources"===n.viewType&&(b=b&&d.id===r.resource),b){var D=new DayPilot.Event(r,n);D.part.dayIndex=o,D.part.start=u<y?r.start:c,D.part.end=f>g?r.end:h;var x=this.getPixels(D.part.start,d.start),w=this.getPixels(D.part.end,d.start),C=x.top,P=w.top;if(C===P&&(x.cut||w.cut))continue;var _=w.boxBottom;D.part.top=Math.floor(C/this.cellHeight)*this.cellHeight+1,D.part.height=Math.max(Math.ceil(_/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.eb.events[m]),D.part.start.getTime()===y&&D.part.end.getTime()===g&&(a[m]=!0)}}}}for(var o=0;o<this.ta.length;o++){var d=this.ta[o];d.events.sort(this.gb);for(var m=0;m<d.events.length;m++){var r=d.events[m];d.putIntoBlock(r)}for(var m=0;m<d.blocks.length;m++){var k=d.blocks[m];k.events.sort(this.gb);for(var S=0;S<k.events.length;S++){var r=k.events[S];k.putIntoLine(r)}}}}},this.gb=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&&(n.debugMessages||(n.debugMessages=[]),n.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.hb(r),c.boxTop=this.hb(l),c.boxBottom=this.hb(d),this.cache.pixels[a+"_"+i]=c,c},this.hb=function(e){return Math.floor(this.cellHeight*e/18e5)},this._a=function(){this.startDate=new DayPilot.Date(this.startDate).getDatePart()},this.da=function(){this.nav.corner&&(this.nav.corner.style.height=this.headerHeight+"px")},this.ha=function(){var e=this.Fa();this.nav.scroll&&e>0&&(this.nav.scroll.style.height=e+"px")},this.qa={},this.qa.scope=null,this.qa.notify=function(){n.qa.scope&&n.qa.scope["$apply"]()},this.qa.apply=function(e){e()},this.Va=function(){if(n.nav.scroll){var e=n.nav.scroll.scrollTop,t=e/(2*n.cellHeight);n.Wa.scrollHour=t}},this.ab=function(){var e=0;n.Wa.scrollHour?e=2*n.cellHeight*n.Wa.scrollHour:"Auto"===n.initScrollPos&&(e="BusinessHours"===this.heightSpec?2*this.cellHeight*this.businessBeginsHour:0),n.nav.scroll.scrollTop=e},this.ib=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof n.events.list||!n.events.list)},this.s=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.jb=function(){this._a(),this.ba(),this.Ea(),this.ea(),this.fa(),this.Xa(),this.Ua(),this.Ya(),t.register(this),this.kb(),this.R("Init")},this.Wa={},this.lb=function(){this.Wa.themes=[],this.Wa.themes.push(this.theme||this.cssClassPrefix)},this.mb=function(){for(var e=this.Wa.themes,t=0;t<e.length;t++){var i=e[t];DayPilot.Util.removeClass(this.nav.top,i+"_main")}this.Wa.themes=[]},this.nb=function(){if(this.afterRender(null,!1),"function"==typeof this.onAfterRender){var e={};e.isCallBack=!1,this.onAfterRender(e)}},this.ob=function(){if("function"==typeof this.onInit&&!this.pb){this.pb=!0;var e={};this.onInit(e)}},this.qb=function(){var e=n.nav.top;return!!e&&(e.offsetWidth>0&&e.offsetHeight>0)},this.kb=function(){var e=n.qb;e()||(n.U=setInterval(function(){e()&&(n.Ua(),n.Xa(),clearInterval(n.U))},100))},this.Ia=function(e,t){return n._.aa()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.internal={},this.internal.loadOptions=n.$a,this.internal.xssTextHtml=n.Ia,this.init=function(){this.db();var e=this.ib();return this.lb(),e?void this.jb():(this._a(),this.ba(),this.ca(),this.Ea(),this.ea(),this.fa(),this.s(),this.Xa(),this.Ua(),this.Ya(),t.register(this),this.events&&(this.da(),this.ia()),this.nb(),this.ob(),this.kb(),this.za=!0,this)},this.Init=this.init,this.$a(i)},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.qa.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.ob()},!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="2023.3.499-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._.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.rb();this.resetTarget&&!e?this.sb(this.date):this.resetTarget||(i.date=e);var t=this.B();return t&&t.addEventListener("input",function(){i.date=i.rb(),i.date&&i.navigator.select(i.date,{dontNotify:!0})}),document.addEventListener("mousedown",function(){i.close()}),this},this.close=function(){this.qb&&(this.qb=!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.sb(this.date)},this.rb=function(){var e=this.B();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.sb=function(e){var t=this.B();if(t){var a=e.toString(i.pattern,i.locale);"INPUT"===t.tagName?t.value=a:t.innerHTML=a}},this._={},this._.locale=function(){return DayPilot.Locale.find(i.locale)},this.B=function(){var e=this.target;return e&&e.nodeType&&1===e.nodeType?e:document.getElementById(e)},Object.defineProperty(this,"visible",{get:function(){return i.qb}}),this.show=function(){if(!this.qb){var e=this.B(),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.tb),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.sb(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.rb()||(new DayPilot.Date).getDatePart();if(a.startDate=d,a.tb=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.qb=!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="2023.3.499-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.ub=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.ub.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.vb("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.vb("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.vb("item")),h.items&&(DayPilot.Util.addClass(f,this.vb("item_haschildren")),DayPilot.Util.addClass(d,this.vb("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.vb("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.wb(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.vb("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.vb("item_icon");var x=document.createElement("i");x.className=h.icon,D.appendChild(x),p.appendChild(D)}if(h.symbol){var w="http://www.w3.org/2000/svg",C=document.createElementNS(w,"svg");C.setAttribute("width","100%"),C.setAttribute("height","100%");var P=document.createElementNS(w,"use");P.setAttribute("href",h.symbol),C.appendChild(P);var _=document.createElement("span");_.className=a.vb("item_symbol"),_.style.position="absolute",_.style.top="0px",_.style.left="0px",_.appendChild(C),p.appendChild(_)}var k=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.wb(n,i)},300))}};p.onmouseover=k(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.ub.visible=!0,a.ub.source=i,d.style.display="";var M=d.offsetHeight,T=d.offsetWidth;d.style.display="none";var A=document.documentElement.clientHeight,E=window.innerWidth,H="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)+H;d.style.top=i-r+"px"}else d.style.top=i+"px";if("right"===o.align&&(e-=T),e-n>E-T&&0!==E){var s=e-n-(E-T)+H;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")),z=DayPilot.abs(o.parentLink.parentNode),O=z.x+N.offsetWidth,U=z.y-I;O+T>E&&(O=Math.max(0,z.x-T));var R=document.body.scrollTop+document.documentElement.scrollTop;U+M-R>A&&(U=Math.max(0,A-M+R)),d.style.left=O+"px",d.style.top=U+"px"}d.style.display="",this.addShadow(d),this.ub.div=d,o.submenu||(DayPilot.Menu.active=this)}},this.wb=function(e,t){var i=e,n=t.source;if((!a.ub.submenu||a.ub.submenu.item!==e)&&(a.ub.submenu&&a.ub.submenu.item!==e&&(DayPilot.Util.removeClass(a.ub.submenu.link.parentNode,a.vb("item_haschildren_active")),a.ub.submenu.menu.hide(),a.ub.submenu=null),e.items)){var o=a.cloneOptions();o.items=e.items,a.ub.submenu={},a.ub.submenu.menu=new DayPilot.Menu(o),a.ub.submenu.menu.xb=a,a.ub.submenu.menu.show(n,{"submenu":!0,"parentLink":t,"parentItem":i}),a.ub.submenu.item=e,a.ub.submenu.link=t,DayPilot.Util.addClass(t.parentNode,a.vb("item_haschildren_active"))}},this.vb=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.ub.submenu&&this.ub.submenu.menu.hide();var i=t.waitingSubmenu;if(i&&(t.waitingSubmenu=null,clearTimeout(i.timeout)),this.removeShadow(),this.ub.div&&this.ub.div.parentNode===document.body&&document.body.removeChild(this.ub.div),n&&(DayPilot.de(n),n=null),a.ub.visible=!1,a.ub.source=null,a.xb&&e.hideParent&&a.xb.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.za=!1;for(var a in t)this[a]=t[a];this.yb=function(e){return this.theme+"_"+e},this.s=function(){this.nav.top=document.getElementById(e);var t=this.nav.top;t.className=this.yb("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.yb("item"),e.cssClass&&a.classList.add(e.cssClass),a.data=e,a.onclick=function(t){if(i.active&&i.active.item===e)i.zb();else if(e.children)return void i.Ab(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.Ab(a)},t.appendChild(a),i.elements.items.push(a)})},this.zb=function(){var e=i.yb("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.Bb=function(e){return!!i.active&&i.active.item===e.data},this.Ab=function(e){if(!i.Bb(e)){i.zb();var t=e.data,a=i.active={};a.item=t,a.div=e;var n=i.yb("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.s(),this.za=!0,this},this.dispose=function(){this.za&&(this.nav.top.innerHTML="",this.elements.items=[])}},DayPilot.MenuBar.deactivate=function(){DayPilot.MenuBar.active&&(DayPilot.MenuBar.active.zb(),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.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.ub.source;a&&a.calendar===e.calendar&&t.menuClean()}}else t.menuClean()},t.handlersRegistered||(DayPilot.re(document,"mousemove",t.mouseMove),DayPilot.re(document,"mousedown",t.mouseDown),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(){var e=document.createElement("style");e.setAttribute("type","text/css"),e.styleSheet||e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e);var t=!!e.styleSheet,i={};return i.rules=[],i.commit=function(){try{t&&(e.styleSheet.cssText=this.rules.join("\n"))}catch(e){}},i.add=function(i,a,n){if(t)return void this.rules.push(i+"{"+a+"}");if(e.sheet.insertRule)"undefined"==typeof n&&(n=e.sheet.cssRules.length),e.sheet.insertRule(i+"{"+a+"}",n);else{if(!e.sheet.addRule)throw"No CSS registration method found";e.sheet.addRule(i,a,n)}},i},a="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",n=new i;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=="+")"),
|
|
13
13
|
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.Cb=!1,this.Db=null,this.Eb=null,this.showHtml=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.div||this.Fb(),this.Gb(),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.Gb(),this.Hb(),this.Ib()},this.showUrl=function(e){if(DayPilot.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.useIframe){this.div||this.Fb();var i=this.loadingHtml;i&&(this.iframe.src="about:blank",this.setInnerHTML(this.id+"iframe",i)),this.re(this.iframe,"load",this.Jb),this.iframe.src=e,this.Gb(),this.Hb(),this.Ib()}else t.Kb({"url":e,"success":function(e){var i=e.request.responseText;t.showHtml(i)},"error":function(e){t.showHtml("Error loading the modal dialog")}})},this.Ib=function(){if("function"==typeof t.onShow){var e={};e.root=t.Lb(),e.modal=t,t.onShow(e)}},this.Lb=function(){return t.iframe?t.iframe.contentWindow.document:t.div},this.Kb=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.Gb=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.Nb(),DayPilot.ModalStatic.remove(this),DayPilot.ModalStatic.list.push(this)},this.Jb=function(){t.iframe.contentWindow.modal=t,t.autoStretch&&t.stretch()},this.stretch=function(){var e=function(){return t.Mb().y},i=function(){return t.Mb().x};if(this.useIframe){for(var a=i()-40,n=this.width;n<a&&this.Ob();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.Pb();r+=10)this.iframe.style.height=r+"px",this.div.style.height=r+"px";this.autoStretchFirstLoadOnly&&this.ue(this.iframe,"load",this.Jb)}else this.div.style.height=""},this.Ob=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.Pb=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.Mb=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.Hb=function(){this.Cb||(this.re(window,"resize",this.Qb),this.re(window,"scroll",this.Rb),this.dragDrop&&(this.re(document,"mousemove",this.Sb),this.re(document,"mouseup",this.Tb)),this.Cb=!0)},this.Ub=function(){this.ue(window,"resize",this.Qb),this.ue(window,"scroll",this.Rb),this.dragDrop&&(this.ue(document,"mousemove",this.Sb),this.ue(document,"mouseup",this.Tb)),this.Cb=!1},this.Vb=function(e){e.target===t.div&&(e.preventDefault(),t.div.style.cursor="move",t.Wb(),t.Eb=t.mc(e||window.event),t.Db={x:t.div.offsetLeft,y:t.div.offsetTop})},this.Sb=function(e){if(t.Eb){var e=e||window.event,i=t.mc(e),a=i.x-t.Eb.x,n=i.y-t.Eb.y;t.div.style.marginLeft="0px",t.div.style.top=t.Db.y+n+"px",t.div.style.left=t.Db.x+a+"px"}},this.Tb=function(e){t.Eb&&(t.Xb(),t.div.style.cursor=null,t.Eb=null)},this.Wb=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.Xb=function(){this.useIframe&&(this.div.removeChild(this.mask),this.mask=null)},this.Qb=function(){t.Yb(),t.Nb()},this.Rb=function(){t.Yb()},this.Nb=function(){if(!t.left&&t.div){var e=t.div.offsetWidth;t.div.style.marginLeft="-"+Math.floor(e/2)+"px"}},this.Yb=function(){if(t.hideDiv&&t.div&&"none"!==t.hideDiv.style.display&&"none"!==t.div.style.display){var e=t.Zb.scrollY();t.scrollWithPage||(t.div.style.top=e+t.top+"px")}},this.Zb={},this.Zb.container=function(){return t.container||document.body},this.Zb.scrollY=function(){var e=t.Zb.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.Fb=function(){var e=t.Zb.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.Vb),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.$b||(t.stretch(),t.$b=!0))},this.close=function(e){this.result=e,this.hide()},this.closeSerialized=function(){for(var e=t.Lb(),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.Ub(),t._b(t.div),t._b(t.hideDiv),t.div=null,t.hideDiv=null,t.iframe=null))},this._b=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},this.bc=function(){if(e)for(var t in e)this[t]=e[t]},this.bc()},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 x=h.firstFocusable();o.autoFocus&&x?x.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.cc=[],this.dc=null,this.canceling=!1,this.ec=[],this.f=[],this.fc=null,e=e||{};for(var t in e)this[t]=e[t]};r.prototype.create=function(){return this.load(),this.render(),this.fc},r.prototype.render=function(){var e=this;this.fc=document.createElement("div"),this.cc.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.gc(o,{"debounce":!e.immediate}),"function"==typeof i.onChange){var t={};t.result=i.serialize(),i.onChange(t)}},o.onBlur=function(){i.canceling||i.gc(o)},o.apply(e),o.fc=a,o.row=e,o.element&&a.appendChild(o.element),this.f.push(o),this.fc.appendChild(a)},r.prototype.validate=function(){var e=this,t=!0;return this.f.forEach(function(i){var a=e.gc(i);t=t&&a}),t},r.prototype.gc=function(e,t){function i(){e.hc&&(e.hc.remove(),e.hc=null),e.fc.classList.add(u);var t=document.createElement("div");t.classList.add(h),t.innerText=c.message,e.hc=t,e.fc.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.ec[o.field]),e.hc&&(e.hc.remove(),e.hc=null),e.fc.classList.remove(u);else if(!n)if(a){var f=1e3;clearTimeout(this.ec[o.field]),this.ec[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.cc.forEach(function(i){i.applyValue(e,t)})},r.prototype.updateDependentState=function(){var e=this,t=[!0];(this.dc?this.dc:this.cc).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.cc.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.cc.push(r),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.cc.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.cc.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.cc.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.cc.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.cc.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.ic(e)},"datetime":function(){return t.jc(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.kc=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.kc&&(t=a.kc);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.kc=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.kc,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.kc=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]();
|
|
14
|
-
},r.prototype.ic=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.jc=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.cc.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.dc?this.dc:this.cc,a=i.indexOf(e);return this.dc=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.dc[a]},r.prototype.updateInteractive=function(e){var t=this.dc.indexOf(e);this.f[t].apply(e)},r.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.dc){this.dc.filter(function(t,i){return e.cc[i]!==t}).forEach(function(t){e.updateInteractive(t)}),this.cc=this.dc,this.dc=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.lc=!1,this.listZIndex=1e5,this.onSelect=null,this.nc=null,this.oc=null,this.pc=!1,this.qc=null,this.rc=null,this.o=[],this.sc=null,e=e||{};var t=this,i={"selected":{post:function(e){"object"==typeof e&&e.id?t.nc=e:"string"!=typeof e&&"number"!=typeof e||t.select(e)}}};Object.defineProperty(this,"selected",{get:function(){return this.nc}}),Object.defineProperty(this,"disabled",{get:function(){return this.lc},set:function(e){this.lc=e,this.qc&&(this.qc.disabled=e,e&&this.tc())}});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.nc=this.data.find(function(t){return t.id===e}),this.uc(!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.oc=null,l.o=[];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.nc&&(l.oc=r),n||(n=r),r.addEventListener("mousedown",function(e){a(r),e.preventDefault()}),r.addEventListener("mousemove",function(e){l.oc!==r&&(l.oc=r,t({dontScroll:!0}))}),h.appendChild(r),l.o.push(r)}),l.oc||(l.oc=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.oc&&(l.oc.className+=" "+l.theme+"_list_item_highlight",t&&!i(l.oc,h)&&l.oc.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.nc=t,l.uc(!0),o(),r()}function n(){l.tc()}function o(){l.p()}function r(){l.pc=!0,m.setAttribute("readonly","readonly"),m.focus()}function s(){l.pc=!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.pc?(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.sc=f;var m=document.createElement("input");return m.type="text",m.className=this.theme+"_input",m.disabled=this.lc,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.pc){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;s()}if("ArrowDown"===e.key){var i=d.o.indexOf(d.oc);i+1<d.o.length&&(d.oc=d.o[i+1]),t()}else if("ArrowUp"===e.key){var i=d.o.indexOf(d.oc);i-1>=0&&(d.oc=d.o[i-1]),t()}else"Enter"===e.key?l.oc?(e.stopPropagation(),a(l.oc)):(e.stopPropagation(),n(),r()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),n(),r())}),this.qc=m,this.rc=h,this.nc||(this.nc=this.data[0],this.nc&&(m.value=this.nc.name)),c.appendChild(m),c.appendChild(u),c.appendChild(f),c.appendChild(h),c},d.prototype.tc=function(){this.p(),this.nc?this.qc.value=this.nc.name:(this.qc.value="",this.uc(!0))},d.prototype.focus=function(){this.pc=!0,this.qc.setAttribute("readonly","readonly"),this.qc.focus(),this.tc()},d.prototype.p=function(){this.rc.style.display="none"},d.prototype.uc=function(e){if(this.sc.value=this.selected?this.selected.id:null,this.nc?this.qc.value=this.nc.name:this.qc.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.vc=null,this.cc=[],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.wc();a.appendChild(n);var o=e.xc({});o.spacer=!0;var r=this.yc(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.xc(a);e.cc.push(o),e.zc(),e.Ac()}}),this.nav.plus=c,d.appendChild(c),t.appendChild(d),t},c.prototype.wc=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.Bc=function(){var e=this.item.max||0;return!!(e&&this.cc.length>=e)},c.prototype.save=function(){var e=this,t=[];return e.cc.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.Cc(),this.zc()},c.prototype.Dc=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.Bc()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},c.prototype.Cc=function(){var e=this;this.cc=[],this.data.forEach(function(t){var i=e.xc(t);e.cc.push(i)})},c.prototype.Ec=function(e){var t=this,i=t.cc.indexOf(e);t.cc.splice(i,1)},c.prototype.xc=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.Fc(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.Fc=function(e){var t=e.type;return t||(t=e.options?"select":"text"),t},c.prototype.zc=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.cc.forEach(function(t){var i=e.yc(t);e.nav.body.appendChild(i)}),0===this.cc.length){var t=e.Gc();e.nav.after.appendChild(t)}this.Dc()},c.prototype.Gc=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},c.prototype.yc=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.Hc(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.Ec(e),t.zc(),t.Ac())}),e.spacer||a.appendChild(n),i.appendChild(a),i},c.prototype.Ac=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},c.prototype.Hc=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.Ac()}),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.kc=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.kc&&(e.value=a.kc),t.Ac()}),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={};e.Month=function(t,i){this.v="2023.3.494-lite",this.nav={};var a=this;this.id=t,this.isMonth=!0,this.api=2,this.backendUrl=null,this.cellHeaderHeight=24,this.cellHeight=100,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=1,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.cellEvents=[],this.elements={},this.elements.events=[],this.cache={},this.T=function(e,t){var e=JSON.parse(e);return e.CallBackRedirect?void(document.location.href=e.CallBackRedirect):"None"===e.UpdateType?void a.fireAfterRenderDetached(e.CallBackData,!0):(a.events.list=e.Events,"Full"===e.UpdateType&&(a.startDate=e.StartDate,a.timeFormat=e.TimeFormat?e.TimeFormat:a.timeFormat,"undefined"!=typeof e.WeekStarts&&(a.weekStarts=e.WeekStarts),a.hashes=e.Hashes),a.V(),a.Ic(),a.ca(),"Full"===e.UpdateType&&(a.Jc(),a.Kc()),a.ha(),a.show(),a.ia(),void a.fireAfterRenderDetached(e.CallBackData,!0))},this.fireAfterRenderDetached=function(e,t){var i=function(e,t){return function(){a.afterRender&&a.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}a.events.list||(a.events.list=[]),a.events.list.push(t),a.update(),a.qa.notify()},this.events.find=function(e){if(!a.events.list)return null;if("function"==typeof e){for(var t=e,i=0;i<a.events.list.length;i++){var n=new DayPilot.Event(a.events.list[i],a);if(t(n))return n}return null}for(var i=0;i<a.events.list.length;i++){var o=a.events.list[i];if(o.id===e)return new DayPilot.Event(o,a)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=a.events.find(e.id);if(t){var i=DayPilot.indexOf(a.events.list,t.data);a.events.list.splice(i,1,e)}}a.update(),a.qa.notify()},this.events.remove=function(e){var t=DayPilot.indexOf(a.events.list,e.data);a.events.list.splice(t,1),a.update(),a.qa.notify()},this.events.load=function(e,t,i){var n=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 n(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;a.events.list=i,a.za&&a.update()}};if(a.eventsLoadMethod&&"POST"===a.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":a.visibleStart().toString(),"end":a.visibleEnd().toString()},"url":e,"success":o,"error":n});else{var r=e,s="start="+a.visibleStart().toString()+"&end="+a.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":r,"success":o,"error":n})}},this.update=function(e){if(a.$a(e),this.za&&this.cells){a.V(),a.Ic(),a.ca(),a.Jc(),a.Kc(),a.ha(),a.s(),a.ia(),this.visible?this.show():this.hide()}},this.bb=null,this.$a=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?a.events.list=e.list:a.events.list=e}}};this.bb=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.cb=function(){var e=this.bb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.eb={},this.eb.events=[],this.fb=function(e){var t=this.eb.events,i=this.events.list[e],n={};for(var o in i)n[o]=i[o];if("function"==typeof this.onBeforeEventRender){var r={};r.control=a,r.data=n,this.onBeforeEventRender(r)}t[e]=n},this.ca=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.fb(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.eb.events[i]))}}for(var l=0;l<this.rows.length;l++){var r=this.rows[l];r.events.sort(this.gb);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.V=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];t.event=null,t.click=null,t.parentNode.removeChild(t)}this.elements.events=[]},this.ia=function(){this.Lc()},this.Lc=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.Ca(a[n])},this.gb=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,n,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(a.J("_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(a.J("_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.Ca=function(t){var i=t.cache||t.data,n=t.part.row,o=t.part.line,r=t.part.colStart,s=t.part.colWidth,l=this.getCellWidth()*r,d=this.getCellWidth()*s,c=this.getEventTop(n,o),u=document.createElement("div");u.setAttribute("unselectable","on"),u.style.height=this.eventHeight+"px",u.className=this.J("_event"),i.cssClass&&DayPilot.Util.addClass(u,i.cssClass),t.part.startsHere||DayPilot.Util.addClass(u,this.J("_event_continueleft")),t.part.endsHere||DayPilot.Util.addClass(u,this.J("_event_continueright")),u.event=t,u.style.width=d+"%",u.style.position="absolute",u.style.left=l+"%",u.style.top=c+"px",this.showToolTip&&t.client.toolTip()&&(u.title=t.client.toolTip()),u.onclick=a.pa,u.oncontextmenu=a.Mc,u.onmousedown=function(i){i=i||window.event;var l=i.which||i.button;if(i.cancelBubble=!0,i.stopPropagation&&i.stopPropagation(),1===l)if(e.movingEvent=null,"w-resize"===this.style.cursor||"e-resize"===this.style.cursor){var d={};d.start={},d.start.x=r,d.start.y=n,d.event=u.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||t.client.moveEnabled()){a.clearShadow();var c=DayPilot.mo2(a.nav.top,i);if(!c)return;var h=a.getCellBelowPoint(c.x,c.y),f=DayPilot.DateUtil.daysDiff(t.start(),a.rows[n].start),m=7*h.y+h.x-(7*n+r);f&&(m+=f);var p={};p.start={},p.start.x=r,p.start.y=n,p.start.line=o,p.offset=a.eventMoveToPosition?0:m,p.colWidth=s,p.event=u.event,p.coords=c,e.movingEvent=p}},u.onmousemove=function(i){if("undefined"!=typeof e&&!e.movingEvent&&!e.resizingEvent){var a=DayPilot.mo3(u,i);if(a){u.deleteIcon&&(u.deleteIcon.style.display="");var n=6;a.x<=n&&t.client.resizeEnabled()?t.part.startsHere?(u.style.cursor="w-resize",u.dpBorder="left"):u.style.cursor="not-allowed":u.clientWidth-a.x<=n&&t.client.resizeEnabled()?t.part.endsHere?(u.style.cursor="e-resize",u.dpBorder="right"):u.style.cursor="not-allowed":t.client.clickEnabled()?u.style.cursor="pointer":u.style.cursor="default"}}},u.onmouseleave=function(e){u.deleteIcon&&(u.deleteIcon.style.display="none"),u.style.cursor=""},u.onmouseenter=function(e){u.deleteIcon&&(u.deleteIcon.style.display="")};var h=document.createElement("div");if(h.setAttribute("unselectable","on"),h.className=this.J("_event_inner"),"darker"===i.borderColor&&i.backColor?h.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):h.style.borderColor=i.borderColor,i.backColor&&(h.style.background=i.backColor,(DayPilot.browser.ie9||DayPilot.browser.ielt9)&&(h.style.filter="")),i.fontColor&&(h.style.color=i.fontColor),h.innerHTML=t.client.html(),u.appendChild(h),t.client.barVisible()){var f=document.createElement("div");f.setAttribute("unselectable","on"),f.className=this.J("_event_bar"),f.style.position="absolute";var m=document.createElement("div");m.setAttribute("unselectable","on"),m.className=this.J("_event_bar_inner"),m.style.top="0%",m.style.height="100%",i.barColor&&(m.style.backgroundColor=i.barColor),f.appendChild(m),u.appendChild(f)}if(t.client.deleteEnabled()){var p=Math.floor(a.eventHeight/2-9),v=document.createElement("div");v.style.position="absolute",v.style.right="2px",v.style.top=p+"px",v.style.width="18px",v.style.height="18px",v.className=a.J("_event_delete"),v.onmousedown=function(e){e.stopPropagation()},v.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&a.sa(t)},v.style.display="none",u.deleteIcon=v,u.appendChild(v)}var y=i.areas?DayPilot.Areas.copy(i.areas):[];if(DayPilot.Areas.attach(u,t,{"areas":y}),"function"==typeof a.onAfterEventRender){var g={};g.e=u.event,g.div=u,a.onAfterEventRender(g)}this.elements.events.push(u),this.nav.events.appendChild(u)},this.lastVisibleDayOfMonth=function(){return this.startDate.lastDayOfMonth()},this.Ic=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 n=0;n<e;n++){var o={};o.start=this.firstDate.addDays(7*n),o.end=o.start.addDays(this.getColCount()),o.events=[],o.lines=[],o.index=n,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<a.rows.length&&t<this.index;t++)e+=a.rows[t].getHeight()},o.getHeight=function(){return Math.max(this.lines.length*a.lineHeight()+a.cellHeaderHeight,this.calendar.cellHeight)},this.rows.push(o)}this.endDate=this.firstDate.addDays(7*e)},this.visibleStart=function(){return a.firstDate},this.visibleEnd=function(){return a.endDate},this.getHeight=function(){for(var e=this.headerHeight,t=0;t<this.rows.length;t++)e+=this.rows[t].getHeight();return e},this.getWidth=function(e,t){return 7*t.y+t.x-(7*e.y+e.x)+1},this.getMinCoords=function(e,t){return 7*e.y+e.x<7*t.y+t.x?e:t},this.J=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Ea=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.J("_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 n=document.createElement("div");this.nav.events=n,n.style.position="absolute",n.style.left="0px",n.style.right="0px",n.setAttribute("unselectable","on"),t.appendChild(n),t.onmousemove=function(t){if(e.resizingEvent){var i=DayPilot.mo2(a.nav.top,t);if(!i)return;var n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var o,r,s=e.resizingEvent;s.start;if("w-resize"===s.direction){r=n;var l=s.event.end();l.getDatePart()===l&&(l=l.addDays(-1));var d=a.getCellFromDate(l);o=a.getWidth(n,d)}else r=a.getCellFromDate(s.event.start()),o=a.getWidth(r,n);o<1&&(o=1),a.drawShadow(r.x,r.y,0,o)}else if(e.movingEvent){var i=DayPilot.mo2(a.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 n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var h=e.movingEvent.event,f=e.movingEvent.offset,o=a.cellMode?1:DayPilot.DateUtil.daysSpan(h.start(),h.end())+1;o<1&&(o=1),a.drawShadow(n.x,n.y,0,o,f,h)}else if(e.timeRangeSelecting){var i=DayPilot.mo2(a.nav.top,t);if(!i)return;var n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var r=e.timeRangeSelecting,m=7*r.y+r.x,p=7*n.y+n.x,o=Math.abs(p-m)+1;o<1&&(o=1);var v=m<p?r:n;e.timeRangeSelecting.from={x:v.x,y:v.y},e.timeRangeSelecting.width=o,e.timeRangeSelecting.moved=!0,a.drawShadow(v.x,v.y,0,o,0,null)}}},this.ha=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.Kc=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.J("_header");var o=document.createElement("div");o.setAttribute("unselectable","on"),o.innerHTML=n.locale().dayNames[a],i.appendChild(o),o.style.position="absolute",o.style.top="0px",o.style.bottom="0px",o.style.left="0px",o.style.right="0px",o.className=this.J("_header_inner"),o.innerHTML=n.locale().dayNames[a],e.appendChild(i);for(var r=0;r<this.rows.length;r++)this.Nc(t,r,e)}},this.Jc=function(){for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++)this.cells[e][t].onclick=null;this.nav.cells.innerHTML=""},this.oa=function(){return 2===a.api;
|
|
15
|
-
},this.Nc=function(t,i,o){var r=this.rows[i],s=this.firstDate.addDays(7*i+t),l=document.createElement("div");if(l.setAttribute("unselectable","on"),l.style.position="absolute",l.style.cursor="default",l.style.left=this.getCellWidth()*t+"%",l.style.width=this.getCellWidth()+"%",l.style.top=this.getRowTop(i)+"px",l.style.height=r.getHeight()+"px",l.className=this.J("_cell"),!this.isWeekend(s)){var d=this.J("_cell_business");DayPilot.Util.addClass(l,d)}var c=(this.startDate.addMonths(-1).getMonth(),this.startDate.addMonths(1).getMonth(),this.startDate.getMonth(),document.createElement("div"));c.setAttribute("unselectable","on"),l.appendChild(c),c.style.position="absolute",c.style.left="0px",c.style.right="0px",c.style.top="0px",c.style.bottom="0px",c.className=this.J("_cell_inner"),l.onmousedown=function(n){"Disabled"!==a.timeRangeSelectedHandling&&(a.clearShadow(),e.timeRangeSelecting={"root":a,"x":t,"y":i,"from":{x:t,y:i},"width":1})},l.onclick=function(){var e=function(e){var t=new DayPilot.Date(e),i=t.addDays(1);a.L(t,i)};if("Disabled"!==a.timeRangeSelectedHandling)return void e(s)};var u=document.createElement("div");u.setAttribute("unselectable","on"),u.style.height=this.cellHeaderHeight+"px",u.className=this.J("_cell_header"),u.onclick=function(e){if("Enabled"===a.cellHeaderClickHandling){e.stopPropagation();var t={};t.control=a,t.start=s,t.end=s.addDays(1),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onCellHeaderClick&&(a.onCellHeaderClick(t),t.preventDefault.value)||"function"==typeof a.onCellHeaderClicked&&a.onCellHeaderClicked(t)}};var h=s.getDay();1===h?u.innerHTML=n.locale().monthNames[s.getMonth()]+" "+h:u.innerHTML=h,c.appendChild(u),this.cells[t][i]=l,o.appendChild(l)},this.getWeekStart=function(){return n.locale().weekStarts},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.R=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.Q();var n="JSON"+DayPilot.JSON.stringify(a);this.backendUrl&&DayPilot.request(this.backendUrl,this.S,n,this.ajaxError)},this.S=function(e){a.T(e.responseText)},this.Q=function(){var e={};return e.control="dpm",e.id=this.id,e.v=this.v,e.visibleStart=new DayPilot.Date(this.firstDate),e.visibleEnd=e.visibleStart.addDays(this.days),e.startDate=a.startDate,e.timeFormat=this.timeFormat,e.weekStarts=this.weekStarts,e},this.eventClickCallBack=function(e,t){this.R("EventClick",t,e)},this.pa=function(t){e.movingEvent=null,e.resizingEvent=null;var i=this,t=t||window.event;t.ctrlKey;t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),a.eventClickSingle(i,t)},this.eventClickSingle=function(e,t){var i=e.event;if(i&&i.client.clickEnabled())if(a.oa()){var n={};if(n.e=i,n.control=a,n.div=e,n.originalEvent=t,n.meta=t.metaKey,n.ctrl=t.ctrlKey,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventClick&&(a.qa.apply(function(){a.onEventClick(n)}),n.preventDefault.value))return;switch(a.eventClickHandling){case"CallBack":a.eventClickCallBack(i);break;case"ContextMenu":var o=i.client.contextMenu();o?o.show(i):a.contextMenu&&a.contextMenu.show(i)}"function"==typeof a.onEventClicked&&a.qa.apply(function(){a.onEventClicked(n)})}else switch(a.eventClickHandling){case"CallBack":a.eventClickCallBack(i);break;case"JavaScript":a.onEventClick(i)}},this.Mc=function(){var e=this;return a.ra(e.event),!1},this.ra=function(e){if(this.event=e,!e.client.rightClickEnabled())return!1;var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},"function"!=typeof a.onEventRightClick||(a.onEventRightClick(t),!t.preventDefault.value)){switch(a.eventRightClickHandling){case"ContextMenu":var i=e.client.contextMenu();i?i.show(e):a.contextMenu&&a.contextMenu.show(this.event)}return"function"==typeof a.onEventRightClicked&&a.onEventRightClicked(t),!1}},this.sa=function(e){if(a.oa()){var t={};if(t.e=e,t.control=a,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventDelete&&(a.qa.apply(function(){a.onEventDelete(t)}),t.preventDefault.value))return;switch(a.eventDeleteHandling){case"CallBack":a.eventDeleteCallBack(e);break;case"PostBack":a.eventDeletePostBack(e);break;case"Update":a.events.remove(e)}"function"==typeof a.onEventDeleted&&a.qa.apply(function(){a.onEventDeleted(t)})}else switch(a.eventDeleteHandling){case"PostBack":a.eventDeletePostBack(e);break;case"CallBack":a.eventDeleteCallBack(e);break;case"JavaScript":a.onEventDelete(e)}},this.eventDeleteCallBack=function(e,t){this.R("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.P("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.R("EventMove",a,o)},this.K=function(e,t,i,n,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(-n);var u=DayPilot.DateUtil.daysSpan(e.start(),e.end())+1,h=c.addDays(u),f=c.addTime(s),m=h.addTime(d);if(a.oa()){var p={};if(p.e=e,p.control=a,p.newStart=f,p.newEnd=m,p.ctrl=o.ctrlKey,p.shift=o.shiftKey,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventMove&&(a.qa.apply(function(){a.onEventMove(p)}),p.preventDefault.value))return;switch(a.eventMoveHandling){case"CallBack":a.eventMoveCallBack(e,f,m);break;case"Update":e.start(f),e.end(m),a.events.update(e)}"function"==typeof a.onEventMoved&&a.qa.apply(function(){a.onEventMoved(p)})}else switch(a.eventMoveHandling){case"CallBack":a.eventMoveCallBack(e,f,m);break;case"JavaScript":a.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.R("EventResize",a,n)},this.I=function(e,t,i){var n=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(n),c=l.addTime(r);if(a.oa()){var u={};if(u.e=e,u.control=a,u.newStart=d,u.newEnd=c,u.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventResize&&(a.qa.apply(function(){a.onEventResize(u)}),u.preventDefault.value))return;switch(a.eventResizeHandling){case"CallBack":a.eventResizeCallBack(e,d,c);break;case"Update":e.start(d),e.end(c),a.events.update(e)}"function"==typeof a.onEventResized&&a.qa.apply(function(){a.onEventResized(u)})}else switch(a.eventResizeHandling){case"CallBack":a.eventResizeCallBack(e,d,c);break;case"JavaScript":a.onEventResize(e,d,c)}},this.timeRangeSelectedCallBack=function(e,t,i){var a={};a.start=e,a.end=t,this.R("TimeRangeSelected",i,a)},this.L=function(e,t){if(this.oa()){var i={};if(i.control=a,i.start=e,i.end=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onTimeRangeSelect&&(a.qa.apply(function(){a.onTimeRangeSelect(i)}),i.preventDefault.value))return;switch(a.timeRangeSelectedHandling){case"CallBack":a.timeRangeSelectedCallBack(e,t)}"function"==typeof a.onTimeRangeSelected&&a.qa.apply(function(){a.onTimeRangeSelected(i)})}else switch(a.timeRangeSelectedHandling){case"CallBack":a.timeRangeSelectedCallBack(e,t);break;case"JavaScript":a.onTimeRangeSelected(e,t)}},this.qa={},this.qa.scope=null,this.qa.notify=function(){a.qa.scope&&a.qa.scope["$apply"]()},this.qa.apply=function(e){e()},this.clearSelection=function(){a.clearShadow()},this.commandCallBack=function(e,t){var i={};i.command=e,this.R("Command",t,i)},this.isWeekend=function(e){return e=new DayPilot.Date(e),0===e.dayOfWeek()||6===e.dayOfWeek()},this._={},this._.locale=function(){var e=DayPilot.Locale.find(a.locale);return e?e:DayPilot.Locale.US},this._.aa=function(){return"Disabled"!==a.xssProtection};var n=this._;this.debug=function(e,t){this.debuggingEnabled&&(a.debugMessages||(a.debugMessages=[]),a.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.dispose=function(){var e=a;e.nav.top&&(e.V(),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.Ya=function(){e.globalHandlers||(e.globalHandlers=!0,DayPilot.re(document,"mouseup",e.gMouseUp))},this.loadFromServer=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof a.events.list||!a.events.list)},this.s=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){a.visible=!0,a.nav.top.style.display=""},this.hide=function(){a.visible=!1,a.nav.top.style.display="none"},this.db=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.jb=function(){this.Ic(),this.Ea(),this.Kc(),this.Ya(),this.R("Init")},this.Ia=function(e,t){return a._.aa()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.internal={},this.internal.loadOptions=this.$a,this.internal.xssTextHtml=a.Ia,this.init=function(){return this.db(),this.loadFromServer()?void this.jb():(this.Ic(),this.ca(),this.Ea(),this.Kc(),this.s(),this.ia(),this.Ya(),this.fireAfterRenderDetached(null,!1),this.za=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return a.eventBarVisible}}),this.$a(i)},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.K(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.I(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.L(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.qa.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(){if("undefined"==typeof DayPilot.Navigator||!DayPilot.Navigator.nav){DayPilot.Navigator=function(e,t){this.v="2023.3.494-lite";var i=this;this.id=e,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.eb={},this.Oc=function(){this.root.dp=this,this.root.className=this.J("_main"),"Horizontal"===this.orientation?(this.root.style.width=this.showMonths*(7*o.cellWidth()+this.Pc())+"px",this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):this.root.style.width=7*o.cellWidth()+this.Pc()+"px",this.rtl&&(this.root.style.direction="rtl"),this.root.style.position="relative",this.visible||(this.root.style.display="none");var e=document.createElement("input");e.type="hidden",e.name=i.id+"_state",e.id=e.name,this.root.appendChild(e),this.state=e,this.startDate?this.startDate=new DayPilot.Date(this.startDate).firstDayOfMonth():this.startDate=DayPilot.Date.fromYearMonthDay(this.year,this.month),this.calendars=[],this.selected=[],this.months=[]},this.oa=function(){return 2===i.api},this.Jc=function(){this.root.innerHTML=""},this.J=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Qc=function(e,t){var i=this.J("_"+t);DayPilot.Util.addClass(e,i)},this.Rc=function(e,t){var i=this.J("_"+t);DayPilot.Util.removeClass(e,i)},this.Kc=function(e,t){var a={};a.cells=[],a.days=[],a.weeks=[];var n=this.startDate.addMonths(e),r=t.before,s=t.after,l=n.firstDayOfMonth(),d=l.firstDayOfWeek(o.weekStarts()),c=l.addMonths(1),u=DayPilot.DateUtil.daysDiff(d,c),h="Auto"===this.rowsPerMonth?Math.ceil(u/7):6;a.rowCount=h;var f=(new DayPilot.Date).getDatePart(),m=7*o.cellWidth()+this.Pc();a.width=m;var p=this.cellHeight*h+this.titleHeight+this.dayHeaderHeight;a.height=p;var v=document.createElement("div");if(v.style.width=m+"px",v.style.height=p+"px","Horizontal"===this.orientation)v.style.position="absolute",v.style.left=m*e+"px",v.style.top="0px",a.top=0,a.left=m*e;else{v.style.position="relative";var y=e>0?i.months[e-1].top+i.months[e-1].height:0;a.top=y,a.left=0}v.className=this.J("_month"),v.style.cursor="default",v.style.MozUserSelect="none",v.style.KhtmlUserSelect="none",v.style.WebkitUserSelect="none",v.month=a,this.root.appendChild(v);var g=this.titleHeight+this.dayHeaderHeight,b=document.createElement("div");b.style.position="absolute",b.style.left="0px",b.style.right="0px",b.style.top="0px",b.style.width=o.cellWidth()+"px",b.style.height=this.titleHeight+"px",b.style.lineHeight=this.titleHeight+"px",b.setAttribute("unselectable","on"),b.className=this.J("_titleleft"),t.left&&(b.style.cursor="pointer",b.innerHTML="<span><</span>",b.onclick=this.Sc),v.appendChild(b),this.tl=b;var D=document.createElement("div");D.style.position="absolute",D.style.left=o.cellWidth()+"px",D.style.top="0px",D.style.width=5*o.cellWidth()+this.Pc()+"px",D.style.height=this.titleHeight+"px",D.style.lineHeight=this.titleHeight+"px",D.setAttribute("unselectable","on"),D.className=this.J("_title"),D.innerHTML=o.locale().monthNames[n.getMonth()]+" "+n.getYear(),v.appendChild(D),this.ti=D;var x=document.createElement("div");x.style.position="absolute",x.style.left=6*o.cellWidth()+this.Pc()+"px",x.style.right=6*o.cellWidth()+this.Pc()+"px",x.style.top="0px",x.style.width=o.cellWidth()+"px",x.style.height=this.titleHeight+"px",x.style.lineHeight=this.titleHeight+"px",x.setAttribute("unselectable","on"),x.className=this.J("_titleright"),t.right&&(x.style.cursor="pointer",x.innerHTML="<span>></span>",x.onclick=this.Tc),v.appendChild(x),this.tr=x;var w=this.Pc();if(this.showWeekNumbers)for(var C=0;C<h;C++){var P=d.addDays(7*C),_=null;switch(this.weekNumberAlgorithm){case"Auto":_=1===o.weekStarts()?P.weekNumberISO():P.weekNumber();break;case"US":_=P.weekNumber();break;case"ISO8601":_=P.weekNumberISO();break;default:throw"Unknown weekNumberAlgorithm value."}var k=document.createElement("div");k.style.position="absolute",k.style.left="0px",k.style.right="0px",k.style.top=C*this.cellHeight+g+"px",k.style.width=o.cellWidth()+"px",k.style.height=this.cellHeight+"px",k.style.lineHeight=this.cellHeight+"px",k.setAttribute("unselectable","on"),k.className=this.J("_weeknumber"),k.innerHTML="<span>"+_+"</span>",v.appendChild(k),a.weeks.push(k)}for(var S=0;S<7;S++){a.cells[S]=[];var k=document.createElement("div");k.style.position="absolute",k.style.left=S*o.cellWidth()+w+"px",k.style.right=S*o.cellWidth()+w+"px",k.style.top=this.titleHeight+"px",k.style.width=o.cellWidth()+"px",k.style.height=this.dayHeaderHeight+"px",k.style.lineHeight=this.dayHeaderHeight+"px",k.setAttribute("unselectable","on"),k.className=this.J("_dayheader"),k.innerHTML="<span>"+this.Uc(S)+"</span>",v.appendChild(k),a.days.push(k);for(var C=0;C<h;C++){var P=d.addDays(7*C+S),M=this.Vc(P)&&"none"!==this.Wc(),T=P.firstDayOfMonth()===n,A=P<n,E=P>=n.addMonths(1);if("month"===this.Wc())M=M&&T;else if("day"===this.Wc())M=M&&(T||r&&A||s&&E);else if("week"===this.Wc()){var H=P.firstDayOfMonth()===n;M=M&&(H||r&&A||s&&E)}var N=document.createElement("div");a.cells[S][C]=N;var I=i.Xc(S,C),z=I.x,O=I.y;N.day=P,N.x=S,N.y=C,N.left=z,N.top=O,N.isCurrentMonth=T,N.isNextMonth=E,N.isPrevMonth=A,N.showBefore=r,N.showAfter=s,N.className=this.J(T?"_day":"_dayother"),i.Qc(N,"cell"),P.getTime()===f.getTime()&&T&&this.Qc(N,"today"),0!==P.dayOfWeek()&&6!==P.dayOfWeek()||this.Qc(N,"weekend"),N.style.position="absolute",N.style.left=z+"px",N.style.right=z+"px",N.style.top=O+"px",N.style.width=o.cellWidth()+"px",N.style.height=this.cellHeight+"px",N.style.lineHeight=this.cellHeight+"px";var U=document.createElement("div");U.style.position="absolute",U.className=P.getTime()===f.getTime()&&T?this.J("_todaybox"):this.J("_daybox"),i.Qc(U,"cell_box"),U.style.left="0px",U.style.top="0px",U.style.right="0px",U.style.bottom="0px",N.appendChild(U);var R=null;if(this.cells&&this.cells[P.toStringSortable()]&&(R=this.cells[P.toStringSortable()]),"function"==typeof i.onBeforeCellRender){var L={};L.cell=R||{},L.cell.day=P,L.cell.isCurrentMonth=T,L.cell.isToday=P.getTime()===f.getTime()&&T,L.cell.isWeekend=0===P.dayOfWeek()||6===P.dayOfWeek(),R?(L.cell.html=R.html||P.getDay(),L.cell.cssClass=R.css):(L.cell.html=P.getDay(),L.cell.cssClass=null),i.onBeforeCellRender(L),R=L.cell}if(R&&DayPilot.Util.addClass(N,R.cssClass||R.css),T||r&&A||s&&E){var j=document.createElement("div");j.innerHTML=P.getDay(),j.style.position="absolute",j.style.left="0px",j.style.top="0px",j.style.right="0px",j.style.bottom="0px",i.Qc(j,"cell_text"),N.isClickable=!0,R&&R.html&&(j.innerHTML=R.html),N.appendChild(j)}N.setAttribute("unselectable","on"),N.onclick=this.Yc,v.appendChild(N),M&&(i.Zc(v,S,C),this.selected.push(N))}}var B=document.createElement("div");B.style.position="absolute",B.style.left="0px",B.style.top=g-2+"px",B.style.width=7*o.cellWidth()+this.Pc()+"px",B.style.height="1px",B.style.fontSize="1px",B.style.lineHeight="1px",B.className=this.J("_line"),v.appendChild(B),this.months.push(a)},this.Xc=function(e,t){var i=this.titleHeight+this.dayHeaderHeight,a=this.Pc();return{"x":e*o.cellWidth()+a,"y":t*this.cellHeight+i}},this.Zc=function(e,t,a){var n=e.month.cells[t][a];i.Qc(n,"select")},this.$c=function(e,t,a){var n=e.month.cells[t][a];i.Rc(n,"select")},this.Pc=function(){return this.showWeekNumbers?o.cellWidth():0},this._c=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.Qc(a,"busy"),this.Rc(a,"free")):(this.Rc(a,"busy"),this.Qc(a,"free")))}},this.ad=function(){var e={};e.startDate=i.startDate,e.selectionStart=i.selectionStart,e.selectionEnd=i.selectionEnd.addDays(1),i.state.value=JSON.stringify(e)},this.Wc=function(){return(this.selectMode||"").toLowerCase()},this.bd=function(){var e=this.selectionDay||this.selectionStart;switch(e||(e=DayPilot.Date.today()),e=new DayPilot.Date(e),this.Wc()){case"day":this.selectionStart=e,this.selectionDay=e,this.selectionEnd=e;break;case"week":this.selectionDay=e,this.selectionStart=e.firstDayOfWeek(o.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.cd=null,this.select=function(e,t,a){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:a;if(!this.za)return void(this.cd={"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.dd()||this.selectionStart>=this.ed())&&(m=this.selectionStart.firstDayOfMonth()),m.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=m}s&&i.freeHandSelectionEnabled?i.selectionEnd=new DayPilot.Date(s):this.bd(),this.Jc(),this.Oc(),this.fd(),this._c(),this.ad(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.L(),f&&this.gd()},this.update=function(e){if(i.$a(e),this.za){if(i.hd)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");i.jd();var t={"day":i.selectionDay,"start":i.selectionStart,"end":i.selectionEnd};i.Gb(),t.start===i.selectionStart&&t.end==i.selectionEnd&&t.day===i.selectionDay||i.L()}},this.Gb=function(){this.Jc(),this.Oc(),this.bd(),this.fd(),this.ca(),this._c(),this.ad(),this.visible?this.show():this.hide()},this.jd=function(){i.eb={}},this.bb=null,this.$a=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?i.events.list=e.list:i.events.list=e}}};this.bb=t;for(var a in e)if(t[a]){var n=t[a];n.data=e[a],n.preInit&&n.preInit()}else i[a]=e[a]}},this.cb=function(){var e=this.bb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.R=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.Q();var n="JSON"+JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.S,n,this.kd):WebForm_DoCallback(this.uniqueID,n,this.T,null,this.callbackError,!0)},this.kd=function(e){if("function"==typeof i.onAjaxError){var t={};t.request=e,i.onAjaxError(t)}else"function"==typeof i.ajaxError&&i.ajaxError(e)},this.S=function(e){i.T(e.responseText)},this.P=function(e,t,a){var n={};n.action=e,n.parameters=a,n.data=t,n.header=this.Q();var o="JSON"+JSON.stringify(n);__doPostBack(i.uniqueID,o)},this.Q=function(){var e={};return e.v=this.v,e.startDate=this.startDate,e.selectionStart=this.selectionStart,e.showMonths=this.showMonths,e},this.ld=function(e,t){"refresh"===e&&this.gd()},this.Uc=function(e){var t=e+o.weekStarts();return t>6&&(t-=7),o.locale().dayNamesShort[t]},this.Vc=function(e){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=e.getTime()&&e.getTime()<=this.selectionEnd.getTime())},this.md=function(e){for(var t=0;t<i.months.length;t++){var a=i.months[t];if(!a)return null;if(e.x<a.left||a.width<e.x)return null;i.months[t].height;if(a.top<=e.y&&e.y<a.top+a.height)return t}return null},this.nd=function(e){var t=DayPilot.mo3(i.nav.top,e),a=i.md(t);if(null===a)return null;var n=i.months[a],o=this.titleHeight+this.dayHeaderHeight;if(n.top<=t.y&&t.y<n.top+o)return{"month":a,"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+i.cellWidth&&d<=t.y&&t.y<d+i.cellHeight)return{"month":a,"x":r,"y":s,"coords":t}}return null},this.od=function(e){if(i.freeHandSelectionEnabled){var t=i.nd(e);t&&!t.header&&(a.start=t),i.months[t.month].cells[t.x][t.y],e.preventDefault()}},this.pd=function(e){if(a.start){var t=i.nd(e);if(a.end)a.end=t;else if(t){var n=3,o=DayPilot.distance(a.start.coords,t.coords);o>n&&(a.end=t)}a.end&&(a.clear(),a.draw())}},this.qd={};var a=this.qd;a.start=null,a.drawCell=function(e){var t=i.months[e.month],n=i.Xc(e.x,e.y),o=t.top+n.y,r=t.left+n.x,s=document.createElement("div");s.style.position="absolute",s.style.left=r+"px",s.style.top=o+"px",s.style.height=i.cellHeight+"px",s.style.width=i.cellWidth+"px",s.style.backgroundColor="#ccc",s.style.opacity=.5,s.style.cursor="default",i.nav.preselection.appendChild(s),a.cells.push(s)},a.clear=function(){if(a.cells){for(var e=0;e<a.cells.length;e++)i.nav.preselection.removeChild(a.cells[e]);a.cells=[]}},a.draw=function(){var e=a.ordered(),t=new n(e.start),o=e.end;if(o){if(o===a.end&&o.header&&o.month>0){o.month-=1;var r=i.months[o.month];o.x=6,o.y=r.rowCount-1}for(a.cells=[];!t.is(o);){a.drawCell(t);var s=new n(t).next();if(!s)return;t.month=s.month,t.x=s.x,t.y=s.y}a.drawCell(t)}},a.ordered=function(){var e=a.start,t=a.end,i={};return!t||new n(e).before(t)?(i.start=e,i.end=t):(i.start=t,i.end=e),i};var n=function(e,t,a){if(e instanceof n)return e;if("object"==typeof e){var o=e;this.month=o.month,this.x=o.x,this.y=o.y}else this.month=e,this.x=t,this.y=a;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=i.months[e.month];return e.y<t.rowCount-1?{"month":e.month,"x":0,"y":e.y+1}:e.month<i.months.length-1?{"month":e.month+1,"x":0,"y":0}:null},this.visible=function(){var e=this.cell();return!!e.isCurrentMonth||(!(!e.isPrevMonth||!e.showBefore)||!(!e.isNextMonth||!e.showAfter))},this.nextVisible=function(){for(var e=this;!e.visible();){var t=e.next();if(!t)return null;e=new n(t)}return e},this.previous=function(){var e=this;if(e.x>0)return{"month":e.month,"x":e.x-1,"y":e.y};i.months[e.month];if(e.y>0)return{"month":e.month,"x":6,"y":e.y-1};if(e.month>0){var t=i.months[e.month-1];return{"month":e.month-1,"x":6,"y":t.rowCount-1}}return null},this.previousVisible=function(){for(var e=this;!e.visible();){var t=e.previous();if(!t)return null;e=new n(t)}return e},this.cell=function(){return i.months[this.month].cells[this.x][this.y]},this.date=function(){return this.cell().day},this.before=function(e){return this.date()<new n(e).date()}};this.Yc=function(e){var t=this.parentNode,a=this.parentNode.month,n=this.x,o=this.y,r=a.cells[n][o].day;if(a.cells[n][o].isClickable){i.clearSelection(),i.selectionDay=r;var r=i.selectionDay;switch(i.Wc()){case"none":i.selectionStart=r,i.selectionEnd=r;break;case"day":if(i.autoFocusOnClick){var s=r;if(r<i.dd()||r>=i.ed())return void i.select(r)}var l=a.cells[n][o];i.Zc(t,n,o),i.selected.push(l),i.selectionStart=l.day,i.selectionEnd=l.day;break;case"week":if(i.autoFocusOnClick){var s=a.cells[0][o].day,d=a.cells[6][o].day;if(s.firstDayOfMonth()===d.firstDayOfMonth()&&(s<i.dd()||d>=i.ed()))return void i.select(r)}for(var c=0;c<7;c++)i.Zc(t,c,o),i.selected.push(a.cells[c][o]);i.selectionStart=a.cells[0][o].day,i.selectionEnd=a.cells[6][o].day;break;case"month":if(i.autoFocusOnClick){var s=r;if(r<i.dd()||r>=i.ed())return void i.select(r)}for(var s=null,d=null,o=0;o<6;o++)for(var n=0;n<7;n++){var l=a.cells[n][o];l&&l.day.getYear()===r.getYear()&&l.day.getMonth()===r.getMonth()&&(i.Zc(t,n,o),i.selected.push(l),null===s&&(s=l.day),d=l.day)}i.selectionStart=s,i.selectionEnd=d;break;default:throw"unknown selectMode"}i.ad(),i.L()}},this.L=function(e){var t=i.selectionStart,a=i.selectionEnd.addDays(1),n=DayPilot.DateUtil.daysDiff(t,a),o=i.selectionDay;if(e=e||{},i.oa()){var r={};if(r.start=t,r.end=a,r.day=o,r.days=n,r.mode=e.mode||i.selectMode,r.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(r),r.preventDefault.value))return;switch(i.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=a,s.days=n,s.day=o,bound.commandCallBack(i.command,s)}break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(t,a,o)}"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(r)}else switch(i.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=a,s.days=n,s.day=o,bound.commandCallBack(i.command,s)}break;case"JavaScript":i.onTimeRangeSelected(t,a,o);break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(t,a,o)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,n.day=a,this.P("TimeRangeSelected",i,n)},this.Tc=function(e){i.rd(i.skipMonths)},this.Sc=function(e){i.rd(-i.skipMonths)},this.rd=function(e){this.startDate=this.startDate.addMonths(e),this.Jc(),this.Oc(),this.fd(),this.ad(),this.gd(),this._c()},this.dd=function(){return i.startDate.firstDayOfMonth()},this.ed=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths)},this.visibleStart=function(){return i.startDate.firstDayOfMonth().firstDayOfWeek(o.weekStarts())},this.visibleEnd=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(o.weekStarts()).addDays(42)},this.gd=function(){var e=this.visibleStart(),t=this.visibleEnd();if(i.oa()){var a={};if(a.start=e,a.end=t,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onVisibleRangeChange&&(i.onVisibleRangeChange(a),a.preventDefault.value))return;switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"Disabled":}"function"==typeof i.onVisibleRangeChanged&&i.onVisibleRangeChanged(a)}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.R("Visible",e,t)},this.visibleRangeChangedPostBack=function(e){var t={};this.P("Visible",e,t)},this.T=function(e,t){var e=JSON.parse(e);i.items=e.Items,i.cells=e.Cells,i.cells?i.update():i._c()},this.fd=function(){for(var e=0;e<this.showMonths;e++){var t=this.sd(e);this.Kc(e,t)}this.root.style.height=this.td()+"px",this.nav.preselection=document.createElement("div"),this.nav.preselection.style.position="absolute",this.nav.preselection.style.left="0px",this.nav.preselection.style.top="0px",this.root.appendChild(this.nav.preselection)},this.td=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.sd=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.qa={},this.qa.scope=null,this.qa.notify=function(){i.qa.scope&&i.qa.scope["$apply"]()},this.internal={},this.internal.loadOptions=i.$a,this.internal.initialized=function(){return i.za},this._={};var o=this._;o.locale=function(){return DayPilot.Locale.find(i.locale)},o.weekStarts=function(){if("Auto"===i.weekStarts){
|
|
14
|
+
},r.prototype.ic=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.jc=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.cc.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.dc?this.dc:this.cc,a=i.indexOf(e);return this.dc=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.dc[a]},r.prototype.updateInteractive=function(e){var t=this.dc.indexOf(e);this.f[t].apply(e)},r.prototype.applyState=function(){var e=this;if(this.updateDependentState(),this.dc){this.dc.filter(function(t,i){return e.cc[i]!==t}).forEach(function(t){e.updateInteractive(t)}),this.cc=this.dc,this.dc=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.lc=!1,this.listZIndex=1e5,this.onSelect=null,this.nc=null,this.oc=null,this.pc=!1,this.qc=null,this.rc=null,this.o=[],this.sc=null,e=e||{};var t=this,i={"selected":{post:function(e){"object"==typeof e&&e.id?t.nc=e:"string"!=typeof e&&"number"!=typeof e||t.select(e)}}};Object.defineProperty(this,"selected",{get:function(){return this.nc}}),Object.defineProperty(this,"disabled",{get:function(){return this.lc},set:function(e){this.lc=e,this.qc&&(this.qc.disabled=e,e&&this.tc())}});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.nc=this.data.find(function(t){return t.id===e}),this.uc(!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.oc=null,l.o=[];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.nc&&(l.oc=r),n||(n=r),r.addEventListener("mousedown",function(e){a(r),e.preventDefault()}),r.addEventListener("mousemove",function(e){l.oc!==r&&(l.oc=r,t({dontScroll:!0}))}),h.appendChild(r),l.o.push(r)}),l.oc||(l.oc=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.oc&&(l.oc.className+=" "+l.theme+"_list_item_highlight",t&&!i(l.oc,h)&&l.oc.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.nc=t,l.uc(!0),o(),r()}function n(){l.tc()}function o(){l.p()}function r(){l.pc=!0,m.setAttribute("readonly","readonly"),m.focus()}function s(){l.pc=!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.pc?(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.sc=f;var m=document.createElement("input");return m.type="text",m.className=this.theme+"_input",m.disabled=this.lc,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.pc){if("Enter"===e.key)return;if("Esc"===e.key||"Escape"===e.key)return;s()}if("ArrowDown"===e.key){var i=d.o.indexOf(d.oc);i+1<d.o.length&&(d.oc=d.o[i+1]),t()}else if("ArrowUp"===e.key){var i=d.o.indexOf(d.oc);i-1>=0&&(d.oc=d.o[i-1]),t()}else"Enter"===e.key?l.oc?(e.stopPropagation(),a(l.oc)):(e.stopPropagation(),n(),r()):"Esc"!==e.key&&"Escape"!==e.key||(e.stopPropagation(),n(),r())}),this.qc=m,this.rc=h,this.nc||(this.nc=this.data[0],this.nc&&(m.value=this.nc.name)),c.appendChild(m),c.appendChild(u),c.appendChild(f),c.appendChild(h),c},d.prototype.tc=function(){this.p(),this.nc?this.qc.value=this.nc.name:(this.qc.value="",this.uc(!0))},d.prototype.focus=function(){this.pc=!0,this.qc.setAttribute("readonly","readonly"),this.qc.focus(),this.tc()},d.prototype.p=function(){this.rc.style.display="none"},d.prototype.uc=function(e){if(this.sc.value=this.selected?this.selected.id:null,this.nc?this.qc.value=this.nc.name:this.qc.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.vc=null,this.cc=[],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.wc();a.appendChild(n);var o=e.xc({});o.spacer=!0;var r=this.yc(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.xc(a);e.cc.push(o),e.zc(),e.Ac()}}),this.nav.plus=c,d.appendChild(c),t.appendChild(d),t},c.prototype.wc=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.Bc=function(){var e=this.item.max||0;return!!(e&&this.cc.length>=e)},c.prototype.save=function(){var e=this,t=[];return e.cc.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.Cc(),this.zc()},c.prototype.Dc=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.Bc()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},c.prototype.Cc=function(){var e=this;this.cc=[],this.data.forEach(function(t){var i=e.xc(t);e.cc.push(i)})},c.prototype.Ec=function(e){var t=this,i=t.cc.indexOf(e);t.cc.splice(i,1)},c.prototype.xc=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.Fc(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.Fc=function(e){var t=e.type;return t||(t=e.options?"select":"text"),t},c.prototype.zc=function(){var e=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.cc.forEach(function(t){var i=e.yc(t);e.nav.body.appendChild(i)}),0===this.cc.length){var t=e.Gc();e.nav.after.appendChild(t)}this.Dc()},c.prototype.Gc=function(){var e=document.createElement("div");return e.className=this.theme+"_empty",e},c.prototype.yc=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.Hc(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.Ec(e),t.zc(),t.Ac())}),e.spacer||a.appendChild(n),i.appendChild(a),i},c.prototype.Ac=function(){var e=this;if("function"==typeof e.onInput){var t={};e.onInput(t)}},c.prototype.Hc=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.Ac()}),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.kc=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.kc&&(e.value=a.kc),t.Ac()}),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={};e.Month=function(t,i){this.v="2023.3.499-lite",this.nav={};var a=this;this.id=t,this.isMonth=!0,this.api=2,this.backendUrl=null,this.cellHeaderHeight=24,this.cellHeight=100,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=1,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.cellEvents=[],this.elements={},this.elements.events=[],this.cache={},this.T=function(e,t){var e=JSON.parse(e);return e.CallBackRedirect?void(document.location.href=e.CallBackRedirect):"None"===e.UpdateType?void a.fireAfterRenderDetached(e.CallBackData,!0):(a.events.list=e.Events,"Full"===e.UpdateType&&(a.startDate=e.StartDate,a.timeFormat=e.TimeFormat?e.TimeFormat:a.timeFormat,"undefined"!=typeof e.WeekStarts&&(a.weekStarts=e.WeekStarts),a.hashes=e.Hashes),a.V(),a.Ic(),a.ca(),"Full"===e.UpdateType&&(a.Jc(),a.Kc()),a.ha(),a.show(),a.ia(),void a.fireAfterRenderDetached(e.CallBackData,!0))},this.fireAfterRenderDetached=function(e,t){var i=function(e,t){return function(){a.afterRender&&a.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}a.events.list||(a.events.list=[]),a.events.list.push(t),a.update(),a.qa.notify()},this.events.find=function(e){if(!a.events.list)return null;if("function"==typeof e){for(var t=e,i=0;i<a.events.list.length;i++){var n=new DayPilot.Event(a.events.list[i],a);if(t(n))return n}return null}for(var i=0;i<a.events.list.length;i++){var o=a.events.list[i];if(o.id===e)return new DayPilot.Event(o,a)}return null},this.events.update=function(e){if(e instanceof DayPilot.Event)e.commit();else if("object"==typeof e){var t=a.events.find(e.id);if(t){var i=DayPilot.indexOf(a.events.list,t.data);a.events.list.splice(i,1,e)}}a.update(),a.qa.notify()},this.events.remove=function(e){var t=DayPilot.indexOf(a.events.list,e.data);a.events.list.splice(t,1),a.update(),a.qa.notify()},this.events.load=function(e,t,i){var n=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 n(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;a.events.list=i,a.za&&a.update()}};if(a.eventsLoadMethod&&"POST"===a.eventsLoadMethod.toUpperCase())DayPilot.Http.ajax({"method":"POST","data":{"start":a.visibleStart().toString(),"end":a.visibleEnd().toString()},"url":e,"success":o,"error":n});else{var r=e,s="start="+a.visibleStart().toString()+"&end="+a.visibleEnd().toString();r+=r.indexOf("?")>-1?"&"+s:"?"+s,DayPilot.Http.ajax({"method":"GET","url":r,"success":o,"error":n})}},this.update=function(e){if(a.$a(e),this.za&&this.cells){a.V(),a.Ic(),a.ca(),a.Jc(),a.Kc(),a.ha(),a.s(),a.ia(),this.visible?this.show():this.hide()}},this.bb=null,this.$a=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?a.events.list=e.list:a.events.list=e}}};this.bb=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.cb=function(){var e=this.bb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.eb={},this.eb.events=[],this.fb=function(e){var t=this.eb.events,i=this.events.list[e],n={};for(var o in i)n[o]=i[o];if("function"==typeof this.onBeforeEventRender){var r={};r.control=a,r.data=n,this.onBeforeEventRender(r)}t[e]=n},this.ca=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.fb(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.eb.events[i]))}}for(var l=0;l<this.rows.length;l++){var r=this.rows[l];r.events.sort(this.gb);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.V=function(){for(var e=0;e<this.elements.events.length;e++){var t=this.elements.events[e];t.event=null,t.click=null,t.parentNode.removeChild(t)}this.elements.events=[]},this.ia=function(){this.Lc()},this.Lc=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.Ca(a[n])},this.gb=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,n,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(a.J("_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(a.J("_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.Ca=function(t){var i=t.cache||t.data,n=t.part.row,o=t.part.line,r=t.part.colStart,s=t.part.colWidth,l=this.getCellWidth()*r,d=this.getCellWidth()*s,c=this.getEventTop(n,o),u=document.createElement("div");u.setAttribute("unselectable","on"),u.style.height=this.eventHeight+"px",u.className=this.J("_event"),i.cssClass&&DayPilot.Util.addClass(u,i.cssClass),t.part.startsHere||DayPilot.Util.addClass(u,this.J("_event_continueleft")),t.part.endsHere||DayPilot.Util.addClass(u,this.J("_event_continueright")),u.event=t,u.style.width=d+"%",u.style.position="absolute",u.style.left=l+"%",u.style.top=c+"px",this.showToolTip&&t.client.toolTip()&&(u.title=t.client.toolTip()),u.onclick=a.pa,u.oncontextmenu=a.Mc,u.onmousedown=function(i){i=i||window.event;var l=i.which||i.button;if(i.cancelBubble=!0,i.stopPropagation&&i.stopPropagation(),1===l)if(e.movingEvent=null,"w-resize"===this.style.cursor||"e-resize"===this.style.cursor){var d={};d.start={},d.start.x=r,d.start.y=n,d.event=u.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||t.client.moveEnabled()){a.clearShadow();var c=DayPilot.mo2(a.nav.top,i);if(!c)return;var h=a.getCellBelowPoint(c.x,c.y),f=DayPilot.DateUtil.daysDiff(t.start(),a.rows[n].start),m=7*h.y+h.x-(7*n+r);f&&(m+=f);var p={};p.start={},p.start.x=r,p.start.y=n,p.start.line=o,p.offset=a.eventMoveToPosition?0:m,p.colWidth=s,p.event=u.event,p.coords=c,e.movingEvent=p}},u.onmousemove=function(i){if("undefined"!=typeof e&&!e.movingEvent&&!e.resizingEvent){var a=DayPilot.mo3(u,i);if(a){u.deleteIcon&&(u.deleteIcon.style.display="");var n=6;a.x<=n&&t.client.resizeEnabled()?t.part.startsHere?(u.style.cursor="w-resize",u.dpBorder="left"):u.style.cursor="not-allowed":u.clientWidth-a.x<=n&&t.client.resizeEnabled()?t.part.endsHere?(u.style.cursor="e-resize",u.dpBorder="right"):u.style.cursor="not-allowed":t.client.clickEnabled()?u.style.cursor="pointer":u.style.cursor="default"}}},u.onmouseleave=function(e){u.deleteIcon&&(u.deleteIcon.style.display="none"),u.style.cursor=""},u.onmouseenter=function(e){u.deleteIcon&&(u.deleteIcon.style.display="")};var h=document.createElement("div");if(h.setAttribute("unselectable","on"),h.className=this.J("_event_inner"),"darker"===i.borderColor&&i.backColor?h.style.borderColor=DayPilot.ColorUtil.darker(i.backColor,2):h.style.borderColor=i.borderColor,i.backColor&&(h.style.background=i.backColor,(DayPilot.browser.ie9||DayPilot.browser.ielt9)&&(h.style.filter="")),i.fontColor&&(h.style.color=i.fontColor),h.innerHTML=t.client.html(),u.appendChild(h),t.client.barVisible()){var f=document.createElement("div");f.setAttribute("unselectable","on"),f.className=this.J("_event_bar"),f.style.position="absolute";var m=document.createElement("div");m.setAttribute("unselectable","on"),m.className=this.J("_event_bar_inner"),m.style.top="0%",m.style.height="100%",i.barColor&&(m.style.backgroundColor=i.barColor),f.appendChild(m),u.appendChild(f)}if(t.client.deleteEnabled()){var p=Math.floor(a.eventHeight/2-9),v=document.createElement("div");v.style.position="absolute",v.style.right="2px",v.style.top=p+"px",v.style.width="18px",v.style.height="18px",v.className=a.J("_event_delete"),v.onmousedown=function(e){e.stopPropagation()},v.onclick=function(e){e.stopPropagation();var t=this.parentNode.event;t&&a.sa(t)},v.style.display="none",u.deleteIcon=v,u.appendChild(v)}var y=i.areas?DayPilot.Areas.copy(i.areas):[];if(DayPilot.Areas.attach(u,t,{"areas":y}),"function"==typeof a.onAfterEventRender){var g={};g.e=u.event,g.div=u,a.onAfterEventRender(g)}this.elements.events.push(u),this.nav.events.appendChild(u)},this.lastVisibleDayOfMonth=function(){return this.startDate.lastDayOfMonth()},this.Ic=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 n=0;n<e;n++){var o={};o.start=this.firstDate.addDays(7*n),o.end=o.start.addDays(this.getColCount()),o.events=[],o.lines=[],o.index=n,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<a.rows.length&&t<this.index;t++)e+=a.rows[t].getHeight()},o.getHeight=function(){return Math.max(this.lines.length*a.lineHeight()+a.cellHeaderHeight,this.calendar.cellHeight)},this.rows.push(o)}this.endDate=this.firstDate.addDays(7*e)},this.visibleStart=function(){return a.firstDate},this.visibleEnd=function(){return a.endDate},this.getHeight=function(){for(var e=this.headerHeight,t=0;t<this.rows.length;t++)e+=this.rows[t].getHeight();return e},this.getWidth=function(e,t){return 7*t.y+t.x-(7*e.y+e.x)+1},this.getMinCoords=function(e,t){return 7*e.y+e.x<7*t.y+t.x?e:t},this.J=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Ea=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.J("_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 n=document.createElement("div");this.nav.events=n,n.style.position="absolute",n.style.left="0px",n.style.right="0px",n.setAttribute("unselectable","on"),t.appendChild(n),t.onmousemove=function(t){if(e.resizingEvent){var i=DayPilot.mo2(a.nav.top,t);if(!i)return;var n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var o,r,s=e.resizingEvent;s.start;if("w-resize"===s.direction){r=n;var l=s.event.end();l.getDatePart()===l&&(l=l.addDays(-1));var d=a.getCellFromDate(l);o=a.getWidth(n,d)}else r=a.getCellFromDate(s.event.start()),o=a.getWidth(r,n);o<1&&(o=1),a.drawShadow(r.x,r.y,0,o)}else if(e.movingEvent){var i=DayPilot.mo2(a.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 n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var h=e.movingEvent.event,f=e.movingEvent.offset,o=a.cellMode?1:DayPilot.DateUtil.daysSpan(h.start(),h.end())+1;o<1&&(o=1),a.drawShadow(n.x,n.y,0,o,f,h)}else if(e.timeRangeSelecting){var i=DayPilot.mo2(a.nav.top,t);if(!i)return;var n=a.getCellBelowPoint(i.x,i.y);a.clearShadow();var r=e.timeRangeSelecting,m=7*r.y+r.x,p=7*n.y+n.x,o=Math.abs(p-m)+1;o<1&&(o=1);var v=m<p?r:n;e.timeRangeSelecting.from={x:v.x,y:v.y},e.timeRangeSelecting.width=o,e.timeRangeSelecting.moved=!0,a.drawShadow(v.x,v.y,0,o,0,null)}}},this.ha=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.Kc=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.J("_header");var o=document.createElement("div");o.setAttribute("unselectable","on"),o.innerHTML=n.locale().dayNames[a],i.appendChild(o),o.style.position="absolute",o.style.top="0px",o.style.bottom="0px",o.style.left="0px",o.style.right="0px",o.className=this.J("_header_inner"),o.innerHTML=n.locale().dayNames[a],e.appendChild(i);for(var r=0;r<this.rows.length;r++)this.Nc(t,r,e)}},this.Jc=function(){for(var e=0;e<this.cells.length;e++)for(var t=0;t<this.cells[e].length;t++)this.cells[e][t].onclick=null;this.nav.cells.innerHTML=""},this.oa=function(){return 2===a.api;
|
|
15
|
+
},this.Nc=function(t,i,o){var r=this.rows[i],s=this.firstDate.addDays(7*i+t),l=document.createElement("div");if(l.setAttribute("unselectable","on"),l.style.position="absolute",l.style.cursor="default",l.style.left=this.getCellWidth()*t+"%",l.style.width=this.getCellWidth()+"%",l.style.top=this.getRowTop(i)+"px",l.style.height=r.getHeight()+"px",l.className=this.J("_cell"),!this.isWeekend(s)){var d=this.J("_cell_business");DayPilot.Util.addClass(l,d)}var c=(this.startDate.addMonths(-1).getMonth(),this.startDate.addMonths(1).getMonth(),this.startDate.getMonth(),document.createElement("div"));c.setAttribute("unselectable","on"),l.appendChild(c),c.style.position="absolute",c.style.left="0px",c.style.right="0px",c.style.top="0px",c.style.bottom="0px",c.className=this.J("_cell_inner"),l.onmousedown=function(n){"Disabled"!==a.timeRangeSelectedHandling&&(a.clearShadow(),e.timeRangeSelecting={"root":a,"x":t,"y":i,"from":{x:t,y:i},"width":1})},l.onclick=function(){var e=function(e){var t=new DayPilot.Date(e),i=t.addDays(1);a.L(t,i)};if("Disabled"!==a.timeRangeSelectedHandling)return void e(s)};var u=document.createElement("div");u.setAttribute("unselectable","on"),u.style.height=this.cellHeaderHeight+"px",u.className=this.J("_cell_header"),u.onclick=function(e){if("Enabled"===a.cellHeaderClickHandling){e.stopPropagation();var t={};t.control=a,t.start=s,t.end=s.addDays(1),t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onCellHeaderClick&&(a.onCellHeaderClick(t),t.preventDefault.value)||"function"==typeof a.onCellHeaderClicked&&a.onCellHeaderClicked(t)}};var h=s.getDay();1===h?u.innerHTML=n.locale().monthNames[s.getMonth()]+" "+h:u.innerHTML=h,c.appendChild(u),this.cells[t][i]=l,o.appendChild(l)},this.getWeekStart=function(){return n.locale().weekStarts},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.R=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.Q();var n="JSON"+DayPilot.JSON.stringify(a);this.backendUrl&&DayPilot.request(this.backendUrl,this.S,n,this.ajaxError)},this.S=function(e){a.T(e.responseText)},this.Q=function(){var e={};return e.control="dpm",e.id=this.id,e.v=this.v,e.visibleStart=new DayPilot.Date(this.firstDate),e.visibleEnd=e.visibleStart.addDays(this.days),e.startDate=a.startDate,e.timeFormat=this.timeFormat,e.weekStarts=this.weekStarts,e},this.eventClickCallBack=function(e,t){this.R("EventClick",t,e)},this.pa=function(t){e.movingEvent=null,e.resizingEvent=null;var i=this,t=t||window.event;t.ctrlKey;t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),a.eventClickSingle(i,t)},this.eventClickSingle=function(e,t){var i=e.event;if(i&&i.client.clickEnabled())if(a.oa()){var n={};if(n.e=i,n.control=a,n.div=e,n.originalEvent=t,n.meta=t.metaKey,n.ctrl=t.ctrlKey,n.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventClick&&(a.qa.apply(function(){a.onEventClick(n)}),n.preventDefault.value))return;switch(a.eventClickHandling){case"CallBack":a.eventClickCallBack(i);break;case"ContextMenu":var o=i.client.contextMenu();o?o.show(i):a.contextMenu&&a.contextMenu.show(i)}"function"==typeof a.onEventClicked&&a.qa.apply(function(){a.onEventClicked(n)})}else switch(a.eventClickHandling){case"CallBack":a.eventClickCallBack(i);break;case"JavaScript":a.onEventClick(i)}},this.Mc=function(){var e=this;return a.ra(e.event),!1},this.ra=function(e){if(this.event=e,!e.client.rightClickEnabled())return!1;var t={};if(t.e=e,t.preventDefault=function(){this.preventDefault.value=!0},"function"!=typeof a.onEventRightClick||(a.onEventRightClick(t),!t.preventDefault.value)){switch(a.eventRightClickHandling){case"ContextMenu":var i=e.client.contextMenu();i?i.show(e):a.contextMenu&&a.contextMenu.show(this.event)}return"function"==typeof a.onEventRightClicked&&a.onEventRightClicked(t),!1}},this.sa=function(e){if(a.oa()){var t={};if(t.e=e,t.control=a,t.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventDelete&&(a.qa.apply(function(){a.onEventDelete(t)}),t.preventDefault.value))return;switch(a.eventDeleteHandling){case"CallBack":a.eventDeleteCallBack(e);break;case"PostBack":a.eventDeletePostBack(e);break;case"Update":a.events.remove(e)}"function"==typeof a.onEventDeleted&&a.qa.apply(function(){a.onEventDeleted(t)})}else switch(a.eventDeleteHandling){case"PostBack":a.eventDeletePostBack(e);break;case"CallBack":a.eventDeleteCallBack(e);break;case"JavaScript":a.onEventDelete(e)}},this.eventDeleteCallBack=function(e,t){this.R("EventDelete",t,e)},this.eventDeletePostBack=function(e,t){this.P("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.R("EventMove",a,o)},this.K=function(e,t,i,n,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(-n);var u=DayPilot.DateUtil.daysSpan(e.start(),e.end())+1,h=c.addDays(u),f=c.addTime(s),m=h.addTime(d);if(a.oa()){var p={};if(p.e=e,p.control=a,p.newStart=f,p.newEnd=m,p.ctrl=o.ctrlKey,p.shift=o.shiftKey,p.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventMove&&(a.qa.apply(function(){a.onEventMove(p)}),p.preventDefault.value))return;switch(a.eventMoveHandling){case"CallBack":a.eventMoveCallBack(e,f,m);break;case"Update":e.start(f),e.end(m),a.events.update(e)}"function"==typeof a.onEventMoved&&a.qa.apply(function(){a.onEventMoved(p)})}else switch(a.eventMoveHandling){case"CallBack":a.eventMoveCallBack(e,f,m);break;case"JavaScript":a.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.R("EventResize",a,n)},this.I=function(e,t,i){var n=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(n),c=l.addTime(r);if(a.oa()){var u={};if(u.e=e,u.control=a,u.newStart=d,u.newEnd=c,u.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onEventResize&&(a.qa.apply(function(){a.onEventResize(u)}),u.preventDefault.value))return;switch(a.eventResizeHandling){case"CallBack":a.eventResizeCallBack(e,d,c);break;case"Update":e.start(d),e.end(c),a.events.update(e)}"function"==typeof a.onEventResized&&a.qa.apply(function(){a.onEventResized(u)})}else switch(a.eventResizeHandling){case"CallBack":a.eventResizeCallBack(e,d,c);break;case"JavaScript":a.onEventResize(e,d,c)}},this.timeRangeSelectedCallBack=function(e,t,i){var a={};a.start=e,a.end=t,this.R("TimeRangeSelected",i,a)},this.L=function(e,t){if(this.oa()){var i={};if(i.control=a,i.start=e,i.end=t,i.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof a.onTimeRangeSelect&&(a.qa.apply(function(){a.onTimeRangeSelect(i)}),i.preventDefault.value))return;switch(a.timeRangeSelectedHandling){case"CallBack":a.timeRangeSelectedCallBack(e,t)}"function"==typeof a.onTimeRangeSelected&&a.qa.apply(function(){a.onTimeRangeSelected(i)})}else switch(a.timeRangeSelectedHandling){case"CallBack":a.timeRangeSelectedCallBack(e,t);break;case"JavaScript":a.onTimeRangeSelected(e,t)}},this.qa={},this.qa.scope=null,this.qa.notify=function(){a.qa.scope&&a.qa.scope["$apply"]()},this.qa.apply=function(e){e()},this.clearSelection=function(){a.clearShadow()},this.commandCallBack=function(e,t){var i={};i.command=e,this.R("Command",t,i)},this.isWeekend=function(e){return e=new DayPilot.Date(e),0===e.dayOfWeek()||6===e.dayOfWeek()},this._={},this._.locale=function(){var e=DayPilot.Locale.find(a.locale);return e?e:DayPilot.Locale.US},this._.aa=function(){return"Disabled"!==a.xssProtection};var n=this._;this.debug=function(e,t){this.debuggingEnabled&&(a.debugMessages||(a.debugMessages=[]),a.debugMessages.push(e),"undefined"!=typeof console&&console.log(e))},this.dispose=function(){var e=a;e.nav.top&&(e.V(),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.Ya=function(){e.globalHandlers||(e.globalHandlers=!0,DayPilot.re(document,"mouseup",e.gMouseUp))},this.loadFromServer=function(){return!(!this.backendUrl&&"function"!=typeof WebForm_DoCallback)&&("undefined"==typeof a.events.list||!a.events.list)},this.s=function(){"hidden"===this.nav.top.style.visibility&&(this.nav.top.style.visibility="visible")},this.show=function(){a.visible=!0,a.nav.top.style.display=""},this.hide=function(){a.visible=!1,a.nav.top.style.display="none"},this.db=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.jb=function(){this.Ic(),this.Ea(),this.Kc(),this.Ya(),this.R("Init")},this.Ia=function(e,t){return a._.aa()?DayPilot.Util.escapeTextHtml(e,t):DayPilot.Util.isNullOrUndefined(t)?DayPilot.Util.isNullOrUndefined(e)?"":e:t},this.internal={},this.internal.loadOptions=this.$a,this.internal.xssTextHtml=a.Ia,this.init=function(){return this.db(),this.loadFromServer()?void this.jb():(this.Ic(),this.ca(),this.Ea(),this.Kc(),this.s(),this.ia(),this.Ya(),this.fireAfterRenderDetached(null,!1),this.za=!0,this)},this.Init=this.init,Object.defineProperty(this,"durationBarVisible",{get:function(){return a.eventBarVisible}}),this.$a(i)},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.K(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.I(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.L(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.qa.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(){if("undefined"==typeof DayPilot.Navigator||!DayPilot.Navigator.nav){DayPilot.Navigator=function(e,t){this.v="2023.3.499-lite";var i=this;this.id=e,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.eb={},this.Oc=function(){this.root.dp=this,this.root.className=this.J("_main"),"Horizontal"===this.orientation?(this.root.style.width=this.showMonths*(7*o.cellWidth()+this.Pc())+"px",this.root.style.height=6*this.cellHeight+this.titleHeight+this.dayHeaderHeight+"px"):this.root.style.width=7*o.cellWidth()+this.Pc()+"px",this.rtl&&(this.root.style.direction="rtl"),this.root.style.position="relative",this.visible||(this.root.style.display="none");var e=document.createElement("input");e.type="hidden",e.name=i.id+"_state",e.id=e.name,this.root.appendChild(e),this.state=e,this.startDate?this.startDate=new DayPilot.Date(this.startDate).firstDayOfMonth():this.startDate=DayPilot.Date.fromYearMonthDay(this.year,this.month),this.calendars=[],this.selected=[],this.months=[]},this.oa=function(){return 2===i.api},this.Jc=function(){this.root.innerHTML=""},this.J=function(e){var t=this.theme||this.cssClassPrefix;return t?t+e:""},this.Qc=function(e,t){var i=this.J("_"+t);DayPilot.Util.addClass(e,i)},this.Rc=function(e,t){var i=this.J("_"+t);DayPilot.Util.removeClass(e,i)},this.Kc=function(e,t){var a={};a.cells=[],a.days=[],a.weeks=[];var n=this.startDate.addMonths(e),r=t.before,s=t.after,l=n.firstDayOfMonth(),d=l.firstDayOfWeek(o.weekStarts()),c=l.addMonths(1),u=DayPilot.DateUtil.daysDiff(d,c),h="Auto"===this.rowsPerMonth?Math.ceil(u/7):6;a.rowCount=h;var f=(new DayPilot.Date).getDatePart(),m=7*o.cellWidth()+this.Pc();a.width=m;var p=this.cellHeight*h+this.titleHeight+this.dayHeaderHeight;a.height=p;var v=document.createElement("div");if(v.style.width=m+"px",v.style.height=p+"px","Horizontal"===this.orientation)v.style.position="absolute",v.style.left=m*e+"px",v.style.top="0px",a.top=0,a.left=m*e;else{v.style.position="relative";var y=e>0?i.months[e-1].top+i.months[e-1].height:0;a.top=y,a.left=0}v.className=this.J("_month"),v.style.cursor="default",v.style.MozUserSelect="none",v.style.KhtmlUserSelect="none",v.style.WebkitUserSelect="none",v.month=a,this.root.appendChild(v);var g=this.titleHeight+this.dayHeaderHeight,b=document.createElement("div");b.style.position="absolute",b.style.left="0px",b.style.right="0px",b.style.top="0px",b.style.width=o.cellWidth()+"px",b.style.height=this.titleHeight+"px",b.style.lineHeight=this.titleHeight+"px",b.setAttribute("unselectable","on"),b.className=this.J("_titleleft"),t.left&&(b.style.cursor="pointer",b.innerHTML="<span><</span>",b.onclick=this.Sc),v.appendChild(b),this.tl=b;var D=document.createElement("div");D.style.position="absolute",D.style.left=o.cellWidth()+"px",D.style.top="0px",D.style.width=5*o.cellWidth()+this.Pc()+"px",D.style.height=this.titleHeight+"px",D.style.lineHeight=this.titleHeight+"px",D.setAttribute("unselectable","on"),D.className=this.J("_title"),D.innerHTML=o.locale().monthNames[n.getMonth()]+" "+n.getYear(),v.appendChild(D),this.ti=D;var x=document.createElement("div");x.style.position="absolute",x.style.left=6*o.cellWidth()+this.Pc()+"px",x.style.right=6*o.cellWidth()+this.Pc()+"px",x.style.top="0px",x.style.width=o.cellWidth()+"px",x.style.height=this.titleHeight+"px",x.style.lineHeight=this.titleHeight+"px",x.setAttribute("unselectable","on"),x.className=this.J("_titleright"),t.right&&(x.style.cursor="pointer",x.innerHTML="<span>></span>",x.onclick=this.Tc),v.appendChild(x),this.tr=x;var w=this.Pc();if(this.showWeekNumbers)for(var C=0;C<h;C++){var P=d.addDays(7*C),_=null;switch(this.weekNumberAlgorithm){case"Auto":_=1===o.weekStarts()?P.weekNumberISO():P.weekNumber();break;case"US":_=P.weekNumber();break;case"ISO8601":_=P.weekNumberISO();break;default:throw"Unknown weekNumberAlgorithm value."}var k=document.createElement("div");k.style.position="absolute",k.style.left="0px",k.style.right="0px",k.style.top=C*this.cellHeight+g+"px",k.style.width=o.cellWidth()+"px",k.style.height=this.cellHeight+"px",k.style.lineHeight=this.cellHeight+"px",k.setAttribute("unselectable","on"),k.className=this.J("_weeknumber"),k.innerHTML="<span>"+_+"</span>",v.appendChild(k),a.weeks.push(k)}for(var S=0;S<7;S++){a.cells[S]=[];var k=document.createElement("div");k.style.position="absolute",k.style.left=S*o.cellWidth()+w+"px",k.style.right=S*o.cellWidth()+w+"px",k.style.top=this.titleHeight+"px",k.style.width=o.cellWidth()+"px",k.style.height=this.dayHeaderHeight+"px",k.style.lineHeight=this.dayHeaderHeight+"px",k.setAttribute("unselectable","on"),k.className=this.J("_dayheader"),k.innerHTML="<span>"+this.Uc(S)+"</span>",v.appendChild(k),a.days.push(k);for(var C=0;C<h;C++){var P=d.addDays(7*C+S),M=this.Vc(P)&&"none"!==this.Wc(),T=P.firstDayOfMonth()===n,A=P<n,E=P>=n.addMonths(1);if("month"===this.Wc())M=M&&T;else if("day"===this.Wc())M=M&&(T||r&&A||s&&E);else if("week"===this.Wc()){var H=P.firstDayOfMonth()===n;M=M&&(H||r&&A||s&&E)}var N=document.createElement("div");a.cells[S][C]=N;var I=i.Xc(S,C),z=I.x,O=I.y;N.day=P,N.x=S,N.y=C,N.left=z,N.top=O,N.isCurrentMonth=T,N.isNextMonth=E,N.isPrevMonth=A,N.showBefore=r,N.showAfter=s,N.className=this.J(T?"_day":"_dayother"),i.Qc(N,"cell"),P.getTime()===f.getTime()&&T&&this.Qc(N,"today"),0!==P.dayOfWeek()&&6!==P.dayOfWeek()||this.Qc(N,"weekend"),N.style.position="absolute",N.style.left=z+"px",N.style.right=z+"px",N.style.top=O+"px",N.style.width=o.cellWidth()+"px",N.style.height=this.cellHeight+"px",N.style.lineHeight=this.cellHeight+"px";var U=document.createElement("div");U.style.position="absolute",U.className=P.getTime()===f.getTime()&&T?this.J("_todaybox"):this.J("_daybox"),i.Qc(U,"cell_box"),U.style.left="0px",U.style.top="0px",U.style.right="0px",U.style.bottom="0px",N.appendChild(U);var R=null;if(this.cells&&this.cells[P.toStringSortable()]&&(R=this.cells[P.toStringSortable()]),"function"==typeof i.onBeforeCellRender){var L={};L.cell=R||{},L.cell.day=P,L.cell.isCurrentMonth=T,L.cell.isToday=P.getTime()===f.getTime()&&T,L.cell.isWeekend=0===P.dayOfWeek()||6===P.dayOfWeek(),R?(L.cell.html=R.html||P.getDay(),L.cell.cssClass=R.css):(L.cell.html=P.getDay(),L.cell.cssClass=null),i.onBeforeCellRender(L),R=L.cell}if(R&&DayPilot.Util.addClass(N,R.cssClass||R.css),T||r&&A||s&&E){var j=document.createElement("div");j.innerHTML=P.getDay(),j.style.position="absolute",j.style.left="0px",j.style.top="0px",j.style.right="0px",j.style.bottom="0px",i.Qc(j,"cell_text"),N.isClickable=!0,R&&R.html&&(j.innerHTML=R.html),N.appendChild(j)}N.setAttribute("unselectable","on"),N.onclick=this.Yc,v.appendChild(N),M&&(i.Zc(v,S,C),this.selected.push(N))}}var B=document.createElement("div");B.style.position="absolute",B.style.left="0px",B.style.top=g-2+"px",B.style.width=7*o.cellWidth()+this.Pc()+"px",B.style.height="1px",B.style.fontSize="1px",B.style.lineHeight="1px",B.className=this.J("_line"),v.appendChild(B),this.months.push(a)},this.Xc=function(e,t){var i=this.titleHeight+this.dayHeaderHeight,a=this.Pc();return{"x":e*o.cellWidth()+a,"y":t*this.cellHeight+i}},this.Zc=function(e,t,a){var n=e.month.cells[t][a];i.Qc(n,"select")},this.$c=function(e,t,a){var n=e.month.cells[t][a];i.Rc(n,"select")},this.Pc=function(){return this.showWeekNumbers?o.cellWidth():0},this._c=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.Qc(a,"busy"),this.Rc(a,"free")):(this.Rc(a,"busy"),this.Qc(a,"free")))}},this.ad=function(){var e={};e.startDate=i.startDate,e.selectionStart=i.selectionStart,e.selectionEnd=i.selectionEnd.addDays(1),i.state.value=JSON.stringify(e)},this.Wc=function(){return(this.selectMode||"").toLowerCase()},this.bd=function(){var e=this.selectionDay||this.selectionStart;switch(e||(e=DayPilot.Date.today()),e=new DayPilot.Date(e),this.Wc()){case"day":this.selectionStart=e,this.selectionDay=e,this.selectionEnd=e;break;case"week":this.selectionDay=e,this.selectionStart=e.firstDayOfWeek(o.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.cd=null,this.select=function(e,t,a){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:a;if(!this.za)return void(this.cd={"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.dd()||this.selectionStart>=this.ed())&&(m=this.selectionStart.firstDayOfMonth()),m.toStringSortable()!==this.startDate.toStringSortable()&&(f=!0),this.startDate=m}s&&i.freeHandSelectionEnabled?i.selectionEnd=new DayPilot.Date(s):this.bd(),this.Jc(),this.Oc(),this.fd(),this._c(),this.ad(),!c||u.equals(this.selectionStart)&&h.equals(this.selectionEnd)||this.L(),f&&this.gd()},this.update=function(e){if(i.$a(e),this.za){if(i.hd)throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");i.jd();var t={"day":i.selectionDay,"start":i.selectionStart,"end":i.selectionEnd};i.Gb(),t.start===i.selectionStart&&t.end==i.selectionEnd&&t.day===i.selectionDay||i.L()}},this.Gb=function(){this.Jc(),this.Oc(),this.bd(),this.fd(),this.ca(),this._c(),this.ad(),this.visible?this.show():this.hide()},this.jd=function(){i.eb={}},this.bb=null,this.$a=function(e){if(e){var t={"events":{"preInit":function(){var e=this.data||[];DayPilot.isArray(e.list)?i.events.list=e.list:i.events.list=e}}};this.bb=t;for(var a in e)if(t[a]){var n=t[a];n.data=e[a],n.preInit&&n.preInit()}else i[a]=e[a]}},this.cb=function(){var e=this.bb;for(var t in e){var i=e[t];i.postInit&&i.postInit()}},this.R=function(e,t,i){var a={};a.action=e,a.parameters=i,a.data=t,a.header=this.Q();var n="JSON"+JSON.stringify(a);this.backendUrl?DayPilot.request(this.backendUrl,this.S,n,this.kd):WebForm_DoCallback(this.uniqueID,n,this.T,null,this.callbackError,!0)},this.kd=function(e){if("function"==typeof i.onAjaxError){var t={};t.request=e,i.onAjaxError(t)}else"function"==typeof i.ajaxError&&i.ajaxError(e)},this.S=function(e){i.T(e.responseText)},this.P=function(e,t,a){var n={};n.action=e,n.parameters=a,n.data=t,n.header=this.Q();var o="JSON"+JSON.stringify(n);__doPostBack(i.uniqueID,o)},this.Q=function(){var e={};return e.v=this.v,e.startDate=this.startDate,e.selectionStart=this.selectionStart,e.showMonths=this.showMonths,e},this.ld=function(e,t){"refresh"===e&&this.gd()},this.Uc=function(e){var t=e+o.weekStarts();return t>6&&(t-=7),o.locale().dayNamesShort[t]},this.Vc=function(e){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=e.getTime()&&e.getTime()<=this.selectionEnd.getTime())},this.md=function(e){for(var t=0;t<i.months.length;t++){var a=i.months[t];if(!a)return null;if(e.x<a.left||a.width<e.x)return null;i.months[t].height;if(a.top<=e.y&&e.y<a.top+a.height)return t}return null},this.nd=function(e){var t=DayPilot.mo3(i.nav.top,e),a=i.md(t);if(null===a)return null;var n=i.months[a],o=this.titleHeight+this.dayHeaderHeight;if(n.top<=t.y&&t.y<n.top+o)return{"month":a,"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+i.cellWidth&&d<=t.y&&t.y<d+i.cellHeight)return{"month":a,"x":r,"y":s,"coords":t}}return null},this.od=function(e){if(i.freeHandSelectionEnabled){var t=i.nd(e);t&&!t.header&&(a.start=t),i.months[t.month].cells[t.x][t.y],e.preventDefault()}},this.pd=function(e){if(a.start){var t=i.nd(e);if(a.end)a.end=t;else if(t){var n=3,o=DayPilot.distance(a.start.coords,t.coords);o>n&&(a.end=t)}a.end&&(a.clear(),a.draw())}},this.qd={};var a=this.qd;a.start=null,a.drawCell=function(e){var t=i.months[e.month],n=i.Xc(e.x,e.y),o=t.top+n.y,r=t.left+n.x,s=document.createElement("div");s.style.position="absolute",s.style.left=r+"px",s.style.top=o+"px",s.style.height=i.cellHeight+"px",s.style.width=i.cellWidth+"px",s.style.backgroundColor="#ccc",s.style.opacity=.5,s.style.cursor="default",i.nav.preselection.appendChild(s),a.cells.push(s)},a.clear=function(){if(a.cells){for(var e=0;e<a.cells.length;e++)i.nav.preselection.removeChild(a.cells[e]);a.cells=[]}},a.draw=function(){var e=a.ordered(),t=new n(e.start),o=e.end;if(o){if(o===a.end&&o.header&&o.month>0){o.month-=1;var r=i.months[o.month];o.x=6,o.y=r.rowCount-1}for(a.cells=[];!t.is(o);){a.drawCell(t);var s=new n(t).next();if(!s)return;t.month=s.month,t.x=s.x,t.y=s.y}a.drawCell(t)}},a.ordered=function(){var e=a.start,t=a.end,i={};return!t||new n(e).before(t)?(i.start=e,i.end=t):(i.start=t,i.end=e),i};var n=function(e,t,a){if(e instanceof n)return e;if("object"==typeof e){var o=e;this.month=o.month,this.x=o.x,this.y=o.y}else this.month=e,this.x=t,this.y=a;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=i.months[e.month];return e.y<t.rowCount-1?{"month":e.month,"x":0,"y":e.y+1}:e.month<i.months.length-1?{"month":e.month+1,"x":0,"y":0}:null},this.visible=function(){var e=this.cell();return!!e.isCurrentMonth||(!(!e.isPrevMonth||!e.showBefore)||!(!e.isNextMonth||!e.showAfter))},this.nextVisible=function(){for(var e=this;!e.visible();){var t=e.next();if(!t)return null;e=new n(t)}return e},this.previous=function(){var e=this;if(e.x>0)return{"month":e.month,"x":e.x-1,"y":e.y};i.months[e.month];if(e.y>0)return{"month":e.month,"x":6,"y":e.y-1};if(e.month>0){var t=i.months[e.month-1];return{"month":e.month-1,"x":6,"y":t.rowCount-1}}return null},this.previousVisible=function(){for(var e=this;!e.visible();){var t=e.previous();if(!t)return null;e=new n(t)}return e},this.cell=function(){return i.months[this.month].cells[this.x][this.y]},this.date=function(){return this.cell().day},this.before=function(e){return this.date()<new n(e).date()}};this.Yc=function(e){var t=this.parentNode,a=this.parentNode.month,n=this.x,o=this.y,r=a.cells[n][o].day;if(a.cells[n][o].isClickable){i.clearSelection(),i.selectionDay=r;var r=i.selectionDay;switch(i.Wc()){case"none":i.selectionStart=r,i.selectionEnd=r;break;case"day":if(i.autoFocusOnClick){var s=r;if(r<i.dd()||r>=i.ed())return void i.select(r)}var l=a.cells[n][o];i.Zc(t,n,o),i.selected.push(l),i.selectionStart=l.day,i.selectionEnd=l.day;break;case"week":if(i.autoFocusOnClick){var s=a.cells[0][o].day,d=a.cells[6][o].day;if(s.firstDayOfMonth()===d.firstDayOfMonth()&&(s<i.dd()||d>=i.ed()))return void i.select(r)}for(var c=0;c<7;c++)i.Zc(t,c,o),i.selected.push(a.cells[c][o]);i.selectionStart=a.cells[0][o].day,i.selectionEnd=a.cells[6][o].day;break;case"month":if(i.autoFocusOnClick){var s=r;if(r<i.dd()||r>=i.ed())return void i.select(r)}for(var s=null,d=null,o=0;o<6;o++)for(var n=0;n<7;n++){var l=a.cells[n][o];l&&l.day.getYear()===r.getYear()&&l.day.getMonth()===r.getMonth()&&(i.Zc(t,n,o),i.selected.push(l),null===s&&(s=l.day),d=l.day)}i.selectionStart=s,i.selectionEnd=d;break;default:throw"unknown selectMode"}i.ad(),i.L()}},this.L=function(e){var t=i.selectionStart,a=i.selectionEnd.addDays(1),n=DayPilot.DateUtil.daysDiff(t,a),o=i.selectionDay;if(e=e||{},i.oa()){var r={};if(r.start=t,r.end=a,r.day=o,r.days=n,r.mode=e.mode||i.selectMode,r.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onTimeRangeSelect&&(i.onTimeRangeSelect(r),r.preventDefault.value))return;switch(i.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=a,s.days=n,s.day=o,bound.commandCallBack(i.command,s)}break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(t,a,o)}"function"==typeof i.onTimeRangeSelected&&i.onTimeRangeSelected(r)}else switch(i.timeRangeSelectedHandling){case"Bind":if("object"==typeof bound){var s={};s.start=t,s.end=a,s.days=n,s.day=o,bound.commandCallBack(i.command,s)}break;case"JavaScript":i.onTimeRangeSelected(t,a,o);break;case"None":break;case"PostBack":i.timeRangeSelectedPostBack(t,a,o)}},this.timeRangeSelectedPostBack=function(e,t,i,a){var n={};n.start=e,n.end=t,n.day=a,this.P("TimeRangeSelected",i,n)},this.Tc=function(e){i.rd(i.skipMonths)},this.Sc=function(e){i.rd(-i.skipMonths)},this.rd=function(e){this.startDate=this.startDate.addMonths(e),this.Jc(),this.Oc(),this.fd(),this.ad(),this.gd(),this._c()},this.dd=function(){return i.startDate.firstDayOfMonth()},this.ed=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths)},this.visibleStart=function(){return i.startDate.firstDayOfMonth().firstDayOfWeek(o.weekStarts())},this.visibleEnd=function(){return i.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(o.weekStarts()).addDays(42)},this.gd=function(){var e=this.visibleStart(),t=this.visibleEnd();if(i.oa()){var a={};if(a.start=e,a.end=t,a.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof i.onVisibleRangeChange&&(i.onVisibleRangeChange(a),a.preventDefault.value))return;switch(this.visibleRangeChangedHandling){case"CallBack":this.visibleRangeChangedCallBack(null);break;case"PostBack":this.visibleRangeChangedPostBack(null);break;case"Disabled":}"function"==typeof i.onVisibleRangeChanged&&i.onVisibleRangeChanged(a)}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.R("Visible",e,t)},this.visibleRangeChangedPostBack=function(e){var t={};this.P("Visible",e,t)},this.T=function(e,t){var e=JSON.parse(e);i.items=e.Items,i.cells=e.Cells,i.cells?i.update():i._c()},this.fd=function(){for(var e=0;e<this.showMonths;e++){var t=this.sd(e);this.Kc(e,t)}this.root.style.height=this.td()+"px",this.nav.preselection=document.createElement("div"),this.nav.preselection.style.position="absolute",this.nav.preselection.style.left="0px",this.nav.preselection.style.top="0px",this.root.appendChild(this.nav.preselection)},this.td=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.sd=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.qa={},this.qa.scope=null,this.qa.notify=function(){i.qa.scope&&i.qa.scope["$apply"]()},this.internal={},this.internal.loadOptions=i.$a,this.internal.initialized=function(){return i.za},this._={};var o=this._;o.locale=function(){return DayPilot.Locale.find(i.locale)},o.weekStarts=function(){if("Auto"===i.weekStarts){
|
|
16
16
|
var e=o.locale();return e?e.weekStarts:0}return i.weekStarts},o.cellWidth=function(){if(i.eb.cellWidth)return i.eb.cellWidth;var e=i.ud("_cell_dimensions").width;return e||(e=i.cellWidth),i.eb.cellWidth=e,e},this.clearSelection=function(){for(var e=0;e<this.selected.length;e++){var t=this.selected[e];i.$c(t.parentNode,t.x,t.y)}this.selected=[]},this.vd=function(){return!!this.backendUrl&&("undefined"==typeof i.items||!i.items)},this.events={},this.ca=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.wd(t);for(var a in i)this.items[a]=1}}}},this.ud=function(e){var t=document.createElement("div");t.style.position="absolute",t.style.top="-2000px",t.style.left="-2000px",t.className=this.J(e);var a=i.root||document.body;a.appendChild(t);var n=t.offsetHeight,o=t.offsetWidth;a.removeChild(t);var r={};return r.height=n,r.width=o,r},this.wd=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(){i.visible=!0,i.root.style.display=""},this.hide=function(){i.visible=!1,i.root.style.display="none"},this.db=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: '"+e+"'."}this.root=this.nav.top},this.init=function(){if(this.db(),!this.root.dp){this.bd(),this.Oc(),this.fd(),this.ca(),this._c(),this.Y(),this.xd(),this.Ya();if(this.vd()&&this.gd(),this.za=!0,this.cb(),this.cd){var e=this.cd;this.select(e.date1,e.date2,e.options),this.cd=null}return this}},this.xd=function(){i.nav.top.onmousedown=this.od,i.nav.top.onmousemove=this.pd},this.Ya=function(){DayPilot.re(document,"mouseup",i.yd)},this.yd=function(e){if(a.start&&a.end){var t=DayPilot.mo3(i.nav.top,e);if(t.x===a.start.coords.x&&t.y===a.start.coords.y)return a.start=null,void a.clear();a.clear();var o=a.ordered();o.start=new n(o.start).nextVisible(),o.end=new n(o.end).previousVisible(),i.selectionDay=new n(o.start).date(),i.selectionStart=i.selectionDay,i.selectionEnd=new n(o.end).date(),a.start=null,a.end=null,i.Jc(),i.Oc(),i.fd(),i._c(),i.ad();i.L({"mode":"FreeHand"})}a.start=null,a.end=null},this.dispose=function(){var e=i;e.root&&(e.root.removeAttribute("style"),e.root.removeAttribute("class"),e.root.dp=null,e.root.innerHTML=null,e.root=null,e.hd=!0)},this.Y=function(){this.root.dispose=this.dispose},this.Init=this.init,this.$a(t)},"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.qa.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.ca(),n._c()},!0)}}}}])}(),"undefined"!=typeof Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded&&Sys.Application.notifyScriptLoaded()}}();if (typeof module !== "undefined") {
|
|
17
17
|
module.exports = {
|
|
18
18
|
DayPilot: DayPilot,
|