UNPKG

@dlhsoft/ganttcharthyperlibrary

Version:

Gantt Chart library for JavaScript and TypeScript with Angular, React, and Vue extensions

95 lines 106 kB
"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.Data.HTML.Controls",company:"DlhSoft",product:"Data Modern Library",version:"5.2.3.2",copyright:"Copyright \ufffd 2014-2025 DlhSoft",title:"Data HTML Controls",description:"Data related HTML client components"});DlhSoft.buildReleaseDate=function(n,f,o){n=new Date(n,f-1,o);return n>DlhSoft.buildReleaseDate?n:DlhSoft.buildReleaseDate}(2025,6,28);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{"); void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var n=_0x5c25[1],f=_0x5c25[2],o=[],w=[],y=_0x5c25[3],H=function(o,t){if(typeof o!==f||typeof t!==f)return!1;if(t==y)return!0;var w=t[_0x5c25[11]](_0x5c25[10]);if(0<=w){var q=t[_0x5c25[12]](0,w),p,r=q[_0x5c25[11]](_0x5c25[10]);if(0<=r)try{p=new Date(parseInt(q[_0x5c25[12]](r+1)))}catch(k){}typeof p===n&&(p=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>p)return!1;q=q+_0x5c25[10]+o;for(i=p=0;i<q[_0x5c25[5]];i++)r=q[_0x5c25[14]](i),p=(p<<5)- p+r,p&=p;0>p&&(p=Math[_0x5c25[15]](2,32)-p);q=p.toString(16)[_0x5c25[16]]();w=t[_0x5c25[12]](w+1);if(q==w)return!0}return!1},E=function(f,o,y,q,p){var r=_0x5c25[17],k=_0x5c25[18],l=typeof ComponentSource===n||!ComponentSource?k+_0x5c25[19]+q+_0x5c25[20]+p:_0x5c25[21],d=q+_0x5c25[22]+p+_0x5c25[23],a=_0x5c25[24],c=_0x5c25[25],b=_0x5c25[26];setTimeout(function(){var h=f[_0x5c25[27]],e=h[_0x5c25[29]](_0x5c25[28]);e[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var g=h[_0x5c25[29]](_0x5c25[28]);g[_0x5c25[32]](_0x5c25[30], _0x5c25[33]);var m=h[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);g[_0x5c25[35]](m);m[_0x5c25[35]](h[_0x5c25[36]](r));g[_0x5c25[35]](h[_0x5c25[36]](a+_0x5c25[10]));m=h[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](h[_0x5c25[36]](o));g[_0x5c25[35]](m);g[_0x5c25[35]](h[_0x5c25[36]](c+_0x5c25[10]));m=h[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);m[_0x5c25[35]](h[_0x5c25[36]](d));g[_0x5c25[35]](m);g[_0x5c25[35]](h[_0x5c25[36]](b+ _0x5c25[10]));m=h[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var j=h[_0x5c25[29]](_0x5c25[39]);j[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);j[_0x5c25[32]](_0x5c25[41],l);j[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);j[_0x5c25[35]](h[_0x5c25[36]](_0x5c25[44]));m[_0x5c25[35]](j);j=h[_0x5c25[29]](_0x5c25[39]);j[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);j[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);j[_0x5c25[35]](h[_0x5c25[36]](_0x5c25[47]));j[_0x5c25[50]](_0x5c25[48],function(){f[_0x5c25[49]](e);w[_0x5c25[7]](y)}, !1);m[_0x5c25[35]](j);g[_0x5c25[35]](m);e[_0x5c25[35]](g);f[_0x5c25[35]](e)},0);setTimeout(function(){alert(r+_0x5c25[51]+a+_0x5c25[52]+o+_0x5c25[51]+c+_0x5c25[53]+d+_0x5c25[51]+b+_0x5c25[4])},600000)};return{setLicense:function(f,n){o[_0x5c25[7]]({type:f,content:n})},validate:function(y,t,C,q,p,r,k){for(var t=t+_0x5c25[4]+C,l=0;l<w[_0x5c25[5]];l++)if(w[l]==t)return;a:if(typeof r!==f&&typeof k!==n&&(k[_0x5c25[6]]!==n&&(r=k[_0x5c25[6]]),typeof k===f&&(r=k)),typeof r!==f)for(k=0;k<o[_0x5c25[5]];k++)if(l= o[k],l[_0x5c25[8]]==t&&typeof l[_0x5c25[9]]===f){r=l[_0x5c25[9]];break a}H(t,r)?y[_0x5c25[6]]=r:E(y,C,t,q,p)}}}()); var __extends=this&&this.__extends||function(){var n=function(f,o){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,n){f.__proto__=n}||function(f,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(f[o]=n[o])};return n(f,o)};return function(f,o){function w(){this.constructor=f}if("function"!==typeof o&&null!==o)throw new TypeError("Class extends value "+o+" is not a constructor or null");n(f,o);f.prototype=null===o?Object.create(o):(w.prototype=o.prototype,new w)}}(), DlhSoft; (function(n){(function(f){var o;(function(k){k.initialize=function(d,a,c){return new f(d,a,c)};k.get=function(d){return d.component};var f=function(){function d(a,c,b){this.host=a;this.settings=c;this.isInitialized=!1;var h="DlhSoft.Controls ContentControl DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");n[h[5]][h[4]](a,h[0],h[1],h[2],h[3],b,c);this.host.component=this;"undefined"===typeof c&&(c={});this.settings=c;d.initializeSettings(this.settings);c=this.settings.content;if("undefined"===typeof c|| null==c)c=d.getContent(a);this.content=c;this.settings.content=c;this.refresh();this.isInitialized=!0}d.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.containerStyle&&(a.containerStyle="font-family: Arial; font-size: "+("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.contentTemplate&&(a.contentTemplate=function(a,b){if(typeof b==="undefined"||b==null)b="";if(b instanceof HTMLElement)return b;var d=a.createElement("span");d.innerHTML= b.toString();return d})};d.getContent=function(a){var c=a.ownerDocument.createElement("span"),b=[],d;for(d=0;d<a.childNodes.length;d++)b.push(a.childNodes[d]);for(d=a.childNodes.length;0<d--;)a.removeChild(a.childNodes[d]);for(d=0;d<b.length;d++)c.appendChild(b[d]);return c};d.prototype.refresh=function(){for(var a=this.host.ownerDocument,c=this.host.childNodes.length;0<c--;)this.host.removeChild(this.host.childNodes[c]);this.contentContainer=this.settings.contentTemplate(a,this.content);null!=this.settings.containerStyle&& this.contentContainer.setAttribute("style",this.settings.containerStyle);"undefined"!==typeof this.settings.containerClass?this.contentContainer.setAttribute("class",this.settings.containerClass):this.contentContainer.setAttribute("class","dlh-contentcontrol-container");this.host.appendChild(this.contentContainer)};d.prototype.setContent=function(a){this.content=a;this.settings.content=a;this.refresh()};return d}();k.Element=f})(o=f.ContentControl||(f.ContentControl={}));(function(k){k.initialize= function(d,a,c,b){return new f(d,a,c,b)};k.get=function(d){return d.component};var f=function(){function d(a,c,b,h){this.host=a;this.settings=b;this.isInitialized=!1;var e="DlhSoft.Controls ItemsControl DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");n[e[5]][e[4]](a,e[0],e[1],e[2],e[3],h,b);this.host.component=this;"undefined"===typeof b&&(b={});this.settings=b;d.initializeSettings(this.settings);if("undefined"===typeof c||null==c)c=this.settings.items;if("undefined"===typeof c||null== c)c=d.getItems(a);this.items=c;this.settings.items=c;this.refresh();this.isInitialized=!0}d.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.itemContainerStyle&&(a.itemContainerStyle="font-family: Arial; font-size: "+("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.itemTemplate&&(a.itemTemplate=function(a,b){if(typeof b==="undefined"||b==null)b="";if(b instanceof HTMLElement)return b;var d=a.createElement("span");d.innerHTML=b.toString(); return d})};d.getItems=function(a){var c=[],b;for(b=0;b<a.childNodes.length;b++)a.childNodes[b]instanceof HTMLElement&&c.push(a.childNodes[b]);for(b=a.childNodes.length;0<b--;)a.removeChild(a.childNodes[b]);return c};d.prototype.refresh=function(){for(var a=this.host.ownerDocument,c=this.host.childNodes.length;0<c--;)this.host.removeChild(this.host.childNodes[c]);this.itemContainers=[];for(c=0;c<this.items.length;c++){var b=this.settings.itemTemplate(a,this.items[c]);null!=this.settings.itemContainerStyle&& b.setAttribute("style",this.settings.itemContainerStyle);"undefined"!==typeof this.settings.itemContainerClass?b.setAttribute("class",this.settings.itemContainerClass):b.setAttribute("class","dlh-itemscontrol-itemcontainer");this.host.appendChild(b)}};d.prototype.setItems=function(a){this.items=a;this.settings.items=a;this.refresh()};return d}();k.Element=f})(f.ItemsControl||(f.ItemsControl={}));var w;(function(k){k.initialize=function(d,a,c,b){return new f(d,a,c,b)};k.get=function(d){return d.component}; var f=function(){function d(a,c,b,h){void 0===c&&(c=function(){});this.host=a;this.clickHandler=c;this.settings=b;this.isInitialized=!1;c="DlhSoft.Controls Button DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");n[c[5]][c[4]](a,c[0],c[1],c[2],c[3],h,b);this.host.component=this;"undefined"===typeof b&&(b={});this.settings=b;d.initializeSettings(this.settings);var e=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null)e=e.createElement("span"),this.inputHost.parentElement&& this.inputHost.parentElement.insertBefore(e,this.inputHost),this.host=e,n[c[5]][c[4]](e,c[0],c[1],c[2],c[3],h,b),this.host.component=this;if(b=this.host.getAttribute("style"))this.settings.containerStyle=b+";"+this.settings.containerStyle,this.host.setAttribute("style","");if((b=this.host.getAttribute("class"))&&!this.settings.containerClass)this.settings.containerClass=b,this.host.setAttribute("class","");b=this.settings.content;if("undefined"===typeof b||null==b)b=o.Element.getContent(a);this.content= b;this.settings.content=b;this.isEnabled=this.settings.isEnabled;this.isInitialRefresh=!0;this.refresh();this.isInitialized=!0}d.initializeSettings=function(a){o.Element.initializeSettings(a);a.containerStyle+=("Modern"==a.theme?"; color: #505050":"")+"; display: inline-block; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; background-color: #f0f0f0; border: 1px solid #e0e0e0; "+("Modern"==a.theme?"":"; border-radius: 3px"); "undefined"===typeof a.inputType&&(a.inputType="button");"undefined"===typeof a.isEnabled&&(a.isEnabled=!0);"undefined"===typeof a.disabledStyle&&(a.disabledStyle="opacity: 0.5");"undefined"===typeof a.hoveringStyle&&(a.hoveringStyle="background-color: "+("Modern"==a.theme?"#e8e8ff":"#e8e8e8"));"undefined"===typeof a.pressedStyle&&(a.pressedStyle="background-color: "+("Modern"==a.theme?"#d0d0ff":"#e8e8e8"));"undefined"===typeof a.contentStyle&&(a.contentStyle="padding: 4px 8px 4px 8px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default")}; d.prototype.refresh=function(){var a=this;if(this.isInitialRefresh&&(delete this.isInitialRefresh,this instanceof y.Element))return;for(var c=this.host.ownerDocument,b=this.host.childNodes.length;0<b--;)this.host.removeChild(this.host.childNodes[b]);this.inputHost?(this.inputElement=this.inputHost,this.inputElement.value&&(this.content=this.inputElement.value)):this.inputElement=c.createElement("input");this.settings.inputName&&this.inputElement.setAttribute("name",this.settings.inputName);this.inputElement.value|| (this.inputElement.value=this.inputElement.name);this.inputElement.setAttribute("type","toggleButton"!=this.settings.inputType?this.settings.inputType:"checkbox");this.inputElement.style.display="none";this.host.appendChild(this.inputElement);this.contentControlHost=c.createElement("div");this.contentControlHost.setAttribute("style",this.settings.containerStyle);"undefined"!==typeof this.settings.containerClass?this.contentControlHost.setAttribute("class",this.settings.containerClass):this.contentControlHost.setAttribute("class", "dlh-button-container");this.host.appendChild(this.contentControlHost);this.contentControl=new o.Element(this.contentControlHost,{theme:this.settings.theme,containerStyle:null,content:this.content,contentTemplate:function(b,c){if(typeof c==="undefined"||c==null)c="";var d=b.createElement("div");a.contentContainer=d;d.setAttribute("style",a.settings.contentStyle);typeof a.settings.contentClass!=="undefined"?d.setAttribute("class",a.settings.contentClass):d.setAttribute("class","dlh-button-content"); d.appendChild(a.settings.contentTemplate(b,c));var m=b.createElement("div");a.hoverableContainer=m;if(!a.isEnabled){a.hoverableContainer.setAttribute("style",a.settings.disabledStyle);typeof a.settings.disabledClass!=="undefined"?a.hoverableContainer.setAttribute("class",a.settings.disabledClass):a.hoverableContainer.setAttribute("class","dlh-button-disabled")}var j=b.createElement("div");a.pressableContainer=j;j.appendChild(d);m.appendChild(j);m.onmouseenter=function(){if(a.isEnabled&&a.hoverableContainer== m){m.setAttribute("style",a.settings.hoveringStyle);typeof a.settings.hoveringClass!=="undefined"?m.setAttribute("class",a.settings.hoveringClass):m.setAttribute("class","dlh-button-hovering");if(a.settings.inputType!="toggleButton"&&a.isPressed){j.setAttribute("style",a.settings.pressedStyle);typeof a.settings.pressedClass!=="undefined"?j.setAttribute("class",a.settings.pressedClass):j.setAttribute("class","dlh-button-pressed")}a.isHovering=true;a.settings.hoveringHandler&&a.settings.hoveringHandler(a)}}; m.onmouseleave=function(){if(a.isEnabled&&a.hoverableContainer==m){a.isHovering=false;m.setAttribute("style","");m.setAttribute("class","");if(a.settings.inputType!="toggleButton"){j.setAttribute("style","");j.setAttribute("class","")}a.settings.unhoveringHandler&&a.settings.unhoveringHandler(a)}};if(a.settings.inputType!="toggleButton"){j.onmousedown=function(){if(a.isEnabled&&a.pressableContainer==j){j.setAttribute("style",a.settings.pressedStyle);typeof a.settings.pressedClass!=="undefined"?j.setAttribute("class", a.settings.pressedClass):j.setAttribute("class","dlh-button-pressed");a.isPressed=true;a.settings.pressedHandler&&a.settings.pressedHandler(a)}};b.addEventListener("mouseup",function(){if(a.isEnabled&&a.pressableContainer==j){a.isPressed=false;j.setAttribute("style","");j.setAttribute("class","");a.settings.unpressedHandler&&a.settings.unpressedHandler(a)}},false);j.onmouseup=function(){if(a.isEnabled&&a.pressableContainer==j){a.clickHandler&&a.clickHandler();try{var b=a.inputElement.ownerDocument.createEvent("HTMLEvents"); b.initEvent("click",true,true);a.inputElement.dispatchEvent(b)}catch(c){}}}}else j.onmousedown=function(){if(a.isEnabled&&a.pressableContainer==j)if(a.isPressed){a.isPressed=false;j.setAttribute("style","");j.setAttribute("class","");a.settings.unpressedHandler&&a.settings.unpressedHandler(a);a.clickHandler&&a.clickHandler();try{c=a.inputElement.ownerDocument.createEvent("HTMLEvents");c.initEvent("click",true,true);a.inputElement.dispatchEvent(c);d=a.inputElement.ownerDocument.createEvent("HTMLEvents"); d.initEvent("change",true,true);a.inputElement.dispatchEvent(d)}catch(b){}}else{j.setAttribute("style",a.settings.pressedStyle);typeof a.settings.pressedClass!=="undefined"?j.setAttribute("class",a.settings.pressedClass):j.setAttribute("class","dlh-button-pressed");a.isPressed=true;a.settings.pressedHandler&&a.settings.pressedHandler(a);a.clickHandler&&a.clickHandler();try{var c=a.inputElement.ownerDocument.createEvent("HTMLEvents");c.initEvent("click",true,true);a.inputElement.dispatchEvent(c);var d= a.inputElement.ownerDocument.createEvent("HTMLEvents");d.initEvent("change",true,true);a.inputElement.dispatchEvent(d)}catch(h){}}};return m}},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")};d.prototype.setContent=function(a){this.content=a;this.settings.content=a;this.refresh()};d.prototype.enable=function(){this.isEnabled=!0;this.settings.isEnabled=!0;this.refresh()};d.prototype.disable=function(){this.isEnabled= !1;this.settings.isEnabled=!1;this.refresh()};return d}();k.Element=f})(w=f.Button||(f.Button={}));var y;(function(k){k.initialize=function(d,a,c,b){return new f(d,a,c,b)};k.get=function(d){return d.component};var f=function(d){function a(a,b,h,e){var g=d.call(this,a,void 0,h,e)||this;g.toggleHandler=b;g.isInitialized=!1;g.settings.inputType="toggleButton";g.clickHandler=function(){g.toggleHandler&&g.toggleHandler(g.isPressed)};g.refresh();g.isInitialized=!0;return g}__extends(a,d);return a}(w.Element); k.Element=f})(y=f.ToggleButton||(f.ToggleButton={}));(function(k){k.initialize=function(d,a,c){return new f(d,a,c)};k.get=function(d){return d.component};var f=function(){function d(a,c,b){this.host=a;this.settings=c;this.isInitialized=!1;var h="DlhSoft.Controls TextBox DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");n[h[5]][h[4]](a,h[0],h[1],h[2],h[3],b,c);this.host.component=this;"undefined"===typeof c&&(c={});this.settings=c;d.initializeSettings(this.settings);var e=this.host.ownerDocument; if(this.inputHost=a instanceof HTMLInputElement?a:null)a=e.createElement("span"),this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(a,this.inputHost),this.host=a,n[h[5]][h[4]](a,h[0],h[1],h[2],h[3],b,c),this.host.component=this;c=c.value;if("undefined"===typeof c||null==c)c=this.inputHost?this.inputHost.value:this.host.innerText?this.host.innerText:this.host.innerHTML;this.value=c;this.settings.value=c;this.isEnabled=this.settings.isEnabled;this.refresh();this.isInitialized=!0} d.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isEnabled&&(a.isEnabled=!0);"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.inputStyle&&"Modern"==a.theme&&(a.inputStyle="border: 1px solid #e0e0e0; background-color: White; color: #505050; font-family: Arial; font-size: 12px; padding: 4px")};d.prototype.refresh=function(){for(var a=this,c=this.host.ownerDocument,b=this.host.childNodes.length;0<b--;)this.host.removeChild(this.host.childNodes[b]); this.inputElement=!this.inputHost?c.createElement("input"):this.inputHost;this.settings.inputName&&this.inputElement.setAttribute("name",this.settings.inputName);this.inputElement.setAttribute("type","text");"undefined"!==typeof this.settings.inputStyle&&this.inputElement.setAttribute("style",this.settings.inputStyle+(this.inputElement.getAttribute("style")?";"+this.inputElement.getAttribute("style"):""));this.settings.inputClass?this.inputElement.setAttribute("class",this.settings.inputClass):this.inputElement.setAttribute("class", "dlh-textbox-input");this.inputElement.value=this.value;this.settings.isReadOnly?this.inputElement.setAttribute("readonly","readonly"):this.inputElement.removeAttribute("readonly");this.settings.isEnabled?this.inputElement.removeAttribute("disabled"):this.inputElement.setAttribute("disabled","disabled");this.host.appendChild(this.inputElement);this.inputElement.onchange=function(){a.isEnabled&&(a.value=a.inputElement.value,a.settings.changeHandler&&a.settings.changeHandler(a.value))};this.inputElement.onclick= function(){a.settings.clickHandler&&a.settings.clickHandler()}};d.prototype.getValue=function(){return this.value};d.prototype.setValue=function(a){this.value=a;this.settings.value=a;this.refresh()};d.prototype.enable=function(){this.isEnabled=!0;this.settings.isEnabled=!0;this.refresh()};d.prototype.disable=function(){this.isEnabled=!1;this.settings.isEnabled=!1;this.refresh()};return d}();k.Element=f})(f.TextBox||(f.TextBox={}));var H;(function(f){f.initialize=function(d,a,c,b){return new l(d,a, c,b)};f.get=function(d){return d.component};var l=function(){function d(a,c,b,h){this.host=a;this.selectedTime=c;this.settings=b;this.isInitialized=!1;var e="DlhSoft.Controls CalendarSelector DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");n[e[5]][e[4]](a,e[0],e[1],e[2],e[3],h,b);this.host.component=this;"undefined"===typeof b&&(b={});this.settings=b;d.initializeSettings(this.settings);"undefined"===typeof c&&(c=b.minValue);c<b.minValue&&(c=b.minValue);this.selectedTime=c;null==this.settings.displayedTime&& (a=this.settings.rows*this.settings.columns,this.settings.displayedTime=Math.floor(this.selectedTime/a)*a);this.settings.displayedTime<b.minValue&&(this.settings.displayedTime=b.minValue);this.refresh();this.isInitialized=!0}d.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.rows?a.rows=4:0>=a.rows&&(a.rows=1);"undefined"===typeof a.columns?a.columns=3:0>=a.columns&&(a.columns=1);"undefined"===typeof a.headerProvider&&(a.headerProvider=function(c, b){return c.createTextNode(b!=null?b.toString()+" - "+(b+a.rows*a.columns-1).toString():"?")});"undefined"===typeof a.headerStyle&&(a.headerStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; background-color: #f0f0f0; padding: 8px; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.timeStyle&&(a.timeStyle="color: "+("Modern"==a.theme?"#505050": "Black")+"; min-width: "+Math.max(128/a.columns,64)+"px; height: "+Math.max(80/a.rows,20)+"px; padding: 2px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; font-size: "+("Modern"==a.theme?"12px":"small"));"undefined"===typeof a.selectedTimeStyle&&(a.selectedTimeStyle="background-color: #3399ff; color: White; padding: 2px");"undefined"===typeof a.timeFormatter&&(a.timeFormatter=function(a){return a.toString()});"undefined"=== typeof a.invertMatrix&&(a.invertMatrix=!1);"undefined"===typeof a.minValue&&(a.minValue=0);"undefined"===typeof a.scrollingHeight&&(a.scrollingHeight="auto")};d.prototype.refresh=function(){for(var a=this,c,b,d,e,g=this.host.ownerDocument,m=this.host.childNodes.length;0<m--;)this.host.removeChild(this.host.childNodes[m]);m=g.createElement("table");m.cellSpacing="0";m.cellPadding="0";m.setAttribute("style",this.settings.containerStyle);this.settings.containerClass?m.setAttribute("class",this.settings.containerClass): m.setAttribute("class","dlh-calendarselector-container");var j=null!=this.settings.displayedTime?this.settings.displayedTime:0,f=g.createElement("tr");f.setAttribute("style",this.settings.headerStyle);f.setAttribute("class",null!==(c=this.settings.headerClass)&&void 0!==c?c:"dlh-calendarselector-header");c=g.createElement("td");c.setAttribute("style","text-align: left; padding-left: 4px");var k=g.createElement("a");k.setAttribute("href","javascript://");k.setAttribute("style","text-decoration: none; color: Gray; font-size: "+ ("Modern"==this.settings.theme?"10px":"x-small")+"; cursor: pointer");k.appendChild(g.createTextNode("\u25c4"));k.onclick=function(b){a.setDisplayedValue(j-a.settings.rows*a.settings.columns);b.stopPropagation()};c.appendChild(k);f.appendChild(c);c=g.createElement("td");c.setAttribute("style",this.settings.headerStyle);c.setAttribute("class",null!==(b=this.settings.headerClass)&&void 0!==b?b:"dlh-calendarselector-header");b=g.createElement("span");b.appendChild(this.settings.headerProvider(g,this.settings.displayedTime)); c.appendChild(b);f.appendChild(c);b=g.createElement("td");b.setAttribute("style","text-align: right; padding-right: 4px");c=g.createElement("a");c.setAttribute("href","javascript://");c.setAttribute("style","text-decoration: none; color: Gray; font-size: "+("Modern"==this.settings.theme?"10px":"x-small")+"; cursor: pointer");c.appendChild(g.createTextNode("\u25ba"));c.onclick=function(b){a.setDisplayedValue(j+a.settings.rows*a.settings.columns);b.stopPropagation()};b.appendChild(c);f.appendChild(b); m.appendChild(f);b=g.createElement("tr");m.appendChild(b);f=g.createElement("td");f.colSpan=3;b.appendChild(f);b=g.createElement("div");b.setAttribute("style","padding: 2px; max-height: "+this.settings.scrollingHeight+"; overflow-y: auto");f.appendChild(b);f=g.createElement("table");f.cellSpacing="0";f.cellPadding="0";b.appendChild(f);b=null!=this.settings.displayedTime?this.settings.displayedTime:0;c=null!=this.selectedTime?this.selectedTime:0;for(var k=this.settings.rows,s=this.settings.columns, l=0;l<k;l++){for(var n=g.createElement("tr"),o=0;o<s;o++){this.settings.invertMatrix&&(b=j+o*k+l);var p=g.createElement("td");p.setAttribute("style",this.settings.timeStyle);p.setAttribute("class",null!==(d=this.settings.timeClass)&&void 0!==d?d:"dlh-calendarselector-time");var r;try{r=this.settings.timeFormatter(b)}catch(t){r=b.toString()}var q=g.createElement("div");p.appendChild(q);var x=g.createElement("a");x.setAttribute("href","javascript://");x.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit"); x.appendChild(g.createTextNode(r));q.appendChild(x);null!=c&&b==c&&(q.setAttribute("style",this.settings.selectedTimeStyle),q.setAttribute("class",null!==(e=this.settings.selectedTimeClass)&&void 0!==e?e:"dlh-calendarselector-selectedtime"),this.selectedElement=q);x.value=b;x.onclick=function(b){a.setValue(b.currentTarget.value);b.stopPropagation()};n.appendChild(p);b++}f.appendChild(n)}this.host.appendChild(m)};d.prototype.getValue=function(){return this.selectedTime};d.prototype.setValue=function(a){if(!a|| a<this.settings.minValue)a=this.settings.minValue;this.selectedTime=a;this.refresh();this.settings.selectedTimeChangeHandler&&this.settings.selectedTimeChangeHandler(a)};d.prototype.setDisplayedValue=function(a){if(!a||a<this.settings.minValue)a=this.settings.minValue;if(null==this.settings.displayedTime||a!=this.settings.displayedTime)this.settings.displayedTime=a,this.refresh(),this.settings.displayedTimeChangeHandler&&this.settings.displayedTimeChangeHandler(a)};return d}();f.Element=l})(H=f.CalendarSelector|| (f.CalendarSelector={}));var E;(function(f){f.initialize=function(d,a,c,b){return new l(d,a,c,b)};f.get=function(d){return d.component};var l=function(){function d(a,c,b,h){this.host=a;this.selectedDate=c;this.settings=b;this.isInitialized=!1;var e="DlhSoft.Controls Calendar DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");n[e[5]][e[4]](a,e[0],e[1],e[2],e[3],h,b);this.host.component=this;"undefined"===typeof b&&(b={});this.settings=b;d.initializeSettings(this.settings);"undefined"===typeof c&& (c=new Date);c<this.settings.minValue&&(c=this.settings.minValue);this.selectedDates=(this.selectedDate=c)?[this.selectedDate]:[];this.selectedDateRanges=(this.selectedDateRange=this.selectedDate?{start:this.selectedDate,finish:this.selectedDate}:null)?[this.selectedDateRange]:null;null==this.settings.displayedDate&&(this.settings.displayedDate=this.selectedDate);this.settings.displayedDate<this.settings.minValue&&(this.settings.displayedDate=this.settings.minValue);this.refresh();this.isInitialized= !0}d.initializeSettings=function(a){"undefined"===typeof a.theme&&(a.theme="Modern");"undefined"===typeof a.isReadOnly&&(a.isReadOnly=!1);"undefined"===typeof a.isTodayLinkVisible&&(a.isTodayLinkVisible=!1);"undefined"===typeof a.defaultTimeOfDay&&(a.defaultTimeOfDay=0);"undefined"===typeof a.allowMultipleSelection&&(a.allowMultipleSelection=!1);"undefined"===typeof a.allowRangeSelection&&(a.allowRangeSelection=!1);"undefined"===typeof a.monthYearHeaderStyle&&(a.monthYearHeaderStyle="color: "+("Modern"== a.theme?"#505050":"Black")+"; background-color: #f0f0f0; padding: 8px; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.dayOfWeekHeaderStyle&&(a.dayOfWeekHeaderStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; padding: 3px; padding-top: 4px; padding-bottom: 2px; border-bottom: 1px solid "+("Modern"==a.theme?"#e0e0e0":"Silver")+"; font-size: "+ ("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.dayStyle&&(a.dayStyle="color: "+("Modern"==a.theme?"#505050":"Black")+"; min-width: 24px; padding: 2px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default; font-size: "+("Modern"==a.theme?"12px":"small")+(a.allowMultipleSelection|| a.allowRangeSelection?"; height: "+("Modern"==a.theme?"18px":"20px"):""));"undefined"===typeof a.otherMonthDayStyle&&(a.otherMonthDayStyle="color: "+("Modern"==a.theme?"#c0c0c0":"Silver"));"undefined"===typeof a.selectedDayStyle&&(a.selectedDayStyle="background-color: #3399ff; color: White; padding: 2px");"undefined"===typeof a.disabledDayStyle&&(a.disabledDayStyle="color: "+("Modern"==a.theme?"#c0c0c0":"Silver"));"undefined"===typeof a.todayLinkStyle&&(a.todayLinkStyle="color: "+("Modern"==a.theme? "#505050":"Black")+"; padding: 4px; border-top: 1px solid "+("Modern"==a.theme?"#e0e0e0":"Silver")+"; font-size: "+("Modern"==a.theme?"12px":"small")+"; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: default");"undefined"===typeof a.todayString&&(a.todayString="Today");"undefined"===typeof a.months&&(a.months="January February March April May June July August September October November December".split(" "));"undefined"===typeof a.daysOfWeek&& (a.daysOfWeek="Su Mo Tu We Th Fr Sa".split(" "));"undefined"===typeof a.monthRows&&(a.monthRows=1);1>a.monthRows&&(a.monthRows=1);"undefined"===typeof a.monthColumns&&(a.monthColumns=1);1>a.monthColumns&&(a.monthColumns=1);"undefined"===typeof a.monthCellSpacing&&(a.monthCellSpacing="0");"undefined"===typeof a.applyMonthStyleForSingleCell&&(a.applyMonthStyleForSingleCell=!1);"undefined"===typeof a.applyNextMonthButtonToLastColumn&&(a.applyNextMonthButtonToLastColumn=!0);"undefined"===typeof a.applyNextMonthButtonToLastRow&& (a.applyNextMonthButtonToLastRow=!1);"undefined"===typeof a.containerStyle&&(a.containerStyle=("Modern"==a.theme?"":"border: 1px solid #707070; ")+"font-family: Arial"+("undefined"===typeof a.monthCellStyle&&(1<a.monthRows||1<a.monthColumns||a.applyMonthStyleForSingleCell)?"Modern"==a.theme?"; margin: -2px":"; padding: 2px":"Modern"==a.theme?"; border: 1px solid #e0e0e0":""));"undefined"===typeof a.monthCellStyle&&(a.monthCellStyle="margin: 2px; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"Silver")); "undefined"===typeof a.calendarSelectorLevels&&(a.calendarSelectorLevels=0);"undefined"===typeof a.calendarSelectorPopupStyle&&(a.calendarSelectorPopupStyle="background-color: White; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+"; font-family: Arial");"undefined"===typeof a.minValue&&(a.minValue=new Date(101,0,1));"undefined"===typeof a.weekStart&&(a.weekStart=0)};d.prototype.refresh=function(){for(var a=this,c,b,h,e,g,m,j,f,k,s=this.host.ownerDocument,l=this.host.childNodes.length;0< l--;)this.host.removeChild(this.host.childNodes[l]);var l=s.createElement("table"),n,o;l.cellSpacing=this.settings.monthCellSpacing;l.cellPadding="0";l.setAttribute("style",this.settings.containerStyle);this.settings.containerClass?l.setAttribute("class",this.settings.containerClass):l.setAttribute("class","dlh-calendar-container");var p=d.getDate(null!=this.settings.displayedDate?this.settings.displayedDate:null!=this.selectedDate?this.selectedDate:new Date);this.settings.defaultTimeOfDay>=d.dayDuration&& (p=d.subtractDay(p));n=p;for(var q=0;q<this.settings.monthRows;q++){var r=s.createElement("tr");l.appendChild(r);for(var t=0;t<this.settings.monthColumns;t++){var x=s.createElement("td");r.appendChild(x);var z=s.createElement("table");z.cellSpacing="0";z.cellPadding="0";if(1<this.settings.monthRows||1<this.settings.monthColumns||this.settings.applyMonthStyleForSingleCell)z.setAttribute("style",this.settings.monthCellStyle),z.setAttribute("class",null!==(c=this.settings.monthCellClass)&&void 0!==c? c:"dlh-calendar-monthcell");x.appendChild(z);x=s.createElement("tr");x.setAttribute("style",this.settings.monthYearHeaderStyle);x.setAttribute("class",null!==(b=this.settings.monthYearHeaderClass)&&void 0!==b?b:"dlh-calendar-monthyearheader");var u=s.createElement("td");u.setAttribute("style","text-align: left; padding-left: 4px");if(0==q&&0==t){var v=s.createElement("a");v.setAttribute("href","javascript://");v.setAttribute("style","text-decoration: none; color: Gray; font-size: "+("Modern"==this.settings.theme? "10px":"x-small")+"; cursor: pointer");v.appendChild(s.createTextNode("\u25c4"));v.onclick=function(b){for(var c=p;c.getMonth()==p.getMonth();)c=d.subtractDay(c);a.setDisplayedValue(c);b.stopPropagation()};u.appendChild(v)}x.appendChild(u);u=s.createElement("td");u.setAttribute("style",this.settings.monthYearHeaderStyle);u.setAttribute("class",null!==(h=this.settings.monthYearHeaderClass)&&void 0!==h?h:"dlh-calendar-monthyearheader");u.colSpan=5;var v=s.createElement("span"),A=s.createTextNode(this.settings.months[n.getMonth()]+ " "+n.getFullYear());if(1>this.settings.calendarSelectorLevels||0<q||0<t)v.appendChild(A);else{var w=s.createElement("a");w.setAttribute("href","javascript://");w.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit");w.appendChild(A);v.appendChild(w);var I=s.createElement("div");I.setAttribute("style","display: none; position: absolute; margin-left: -40px");w.appendChild(I);var J=s.createElement("div");J.setAttribute("style",this.settings.calendarSelectorPopupStyle); this.settings.calendarSelectorPopupClass?J.setAttribute("class",this.settings.calendarSelectorPopupClass):J.setAttribute("class","dlh-calendar-calendarselectorpopup");I.appendChild(J);w.onclick=function(b){if((b.target||b.srcElement)==w){if("none"!=I.style.display)I.style.display="none";else{var c=12*p.getFullYear()+p.getMonth(),d={theme:a.settings.theme,headerProvider:function(b,c){var d=b.createTextNode(Math.floor(c/12).toString());if(2>a.settings.calendarSelectorLevels)return d;var e=b.createElement("a"); e.setAttribute("href","javascript://");e.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit");e.appendChild(d);var g=b.createElement("div");g.setAttribute("style","display: none; position: absolute; margin-left: -10px");e.appendChild(g);var m=b.createElement("div");m.setAttribute("style",a.settings.calendarSelectorPopupStyle);a.settings.calendarSelectorPopupClass?m.setAttribute("class",a.settings.calendarSelectorPopupClass):m.setAttribute("class","dlh-calendar-calendarselectorpopup"); g.appendChild(m);e.onclick=function(b){if((b.target||b.srcElement)==e){if("none"!=g.style.display)g.style.display="none";else{var d=Math.floor(c/12)-1;g.style.display="block";var j=H.initialize(m,d,{rows:5,columns:2,invertMatrix:!0,headerProvider:function(b,c){var d=b.createTextNode((c+1).toString()+" - "+(c+10).toString());if(3>a.settings.calendarSelectorLevels)return d;var h=b.createElement("a");h.setAttribute("href","javascript://");h.setAttribute("style","text-decoration: none; display: inline-block; cursor: pointer; color: inherit"); h.appendChild(d);var e=b.createElement("div");e.setAttribute("style","display: none; position: absolute; margin-left: -10px");h.appendChild(e);var g=b.createElement("div");g.setAttribute("style",a.settings.calendarSelectorPopupStyle);a.settings.calendarSelectorPopupClass?g.setAttribute("class",a.settings.calendarSelectorPopupClass):g.setAttribute("class","dlh-calendar-calendarselectorpopup");e.appendChild(g);h.onclick=function(a){if((a.target||a.srcElement)==h){if("none"!=e.style.display)e.style.display= "none";else{var b=Math.floor(c/10);e.style.display="block";H.initialize(g,b,{rows:5,columns:2,invertMatrix:!0,headerProvider:function(a,b){return a.createTextNode((10*b+1).toString()+" - "+(10*(b+10)).toString())},timeFormatter:function(a){return(10*a+1).toString()+"-"+(10*a+10).toString().substr((10*a+10).toString().length-2)},minValue:10},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.").settings.selectedTimeChangeHandler= function(a){j.setDisplayedValue(10*a)}}a.stopPropagation()}};return h},timeFormatter:function(a){return(a+1).toString()},minValue:100},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");j.settings.selectedTimeChangeHandler=function(a){h.setDisplayedValue(12*(a+1))}}b.stopPropagation()}};return e},timeFormatter:function(b){return a.settings.months[b-12*Math.floor(b/12)]},minValue:1212};I.style.display="block";var h= H.initialize(J,c,d,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");h.settings.selectedTimeChangeHandler=function(b){a.setDisplayedValue(new Date(Math.floor(b/12),b-12*Math.floor(b/12),1))}}b.stopPropagation()}}}u.appendChild(v);x.appendChild(u);u=s.createElement("td");u.setAttribute("style","text-align: right; padding-right: 4px");if((!this.settings.applyNextMonthButtonToLastRow?0==q:q==this.settings.monthRows- 1)&&(this.settings.applyNextMonthButtonToLastColumn?t==this.settings.monthColumns-1:0==t))v=s.createElement("a"),v.setAttribute("href","javascript://"),v.setAttribute("style","text-decoration: none; color: Gray; font-size: "+("Modern"==this.settings.theme?"10px":"x-small")+"; cursor: pointer"),v.appendChild(s.createTextNode("\u25ba")),v.onclick=function(b){for(var c=p;c.getMonth()==p.getMonth();)c=d.addDay(c);a.setDisplayedValue(c);b.stopPropagation()},u.appendChild(v);x.appendChild(u);z.appendChild(x); v=s.createElement("tr");for(u=x=this.settings.weekStart;u<x+7;u++)o=u%7,A=s.createElement("td"),A.setAttribute("style",this.settings.dayOfWeekHeaderStyle),A.setAttribute("class",null!==(e=this.settings.dayOfWeekHeaderClass)&&void 0!==e?e:"dlh-calendar-dayofweekheader"),A.appendChild(s.createTextNode(this.settings.daysOfWeek[o%7])),v.appendChild(A);z.appendChild(v);v=null!=this.selectedDate?d.getDate(this.selectedDate):null;null!=v&&this.settings.defaultTimeOfDay>=d.dayDuration&&(v=d.subtractDay(v)); var A=n.getMonth(),u=d.getFirstDayOfMonth(n),B=d.getPreviousWeekStart(u,x);for(n=0;6>n;n++){for(var y=s.createElement("tr"),u=x;u<x+7;u++){o=u%7;o=s.createElement("td");o.setAttribute("style",this.settings.dayStyle);o.setAttribute("class",null!==(g=this.settings.dayClass)&&void 0!==g?g:"dlh-calendar-day");var C=B.getDate().toString(),D=s.createElement("span");o.appendChild(D);var G=s.createElement("span");D.appendChild(G);var E="undefined"!==typeof this.settings.disabledDateSelector&&this.settings.disabledDateSelector(B), K=B.getMonth()==A,F=s.createElement("a");F.setAttribute("href","javascript://");F.setAttribute("style","text-decoration: none; display: inline-block; cursor: "+(this.settings.isReadOnly||E||!K&&(this.settings.allowRangeSelection||this.settings.allowMultipleSelection)?"default":"pointer")+"; color: inherit; width: 20px");F.appendChild(s.createTextNode(C));G.appendChild(F);if(E)D.setAttribute("style",this.settings.disabledDayStyle),D.setAttribute("class",null!==(m=this.settings.disabledDayClass)&&void 0!== m?m:"dlh-calendar-disabledday");else if(K){if(C=v&&Math.abs(B.valueOf()-v.valueOf())<=d.hourDuration||this.isValueSelected(B))D.setAttribute("style",this.settings.selectedDayStyle),D.setAttribute("class",null!==(j=this.settings.selectedDayClass)&&void 0!==j?j:"dlh-calendar-selectedday");this.settings.highlightingStyleSelector&&(D=this.settings.highlightingStyleSelector(B,C))&&G.setAttribute("style",D);this.settings.highlightingClassSelector&&((D=this.settings.highlightingClassSelector(B,C))?G.setAttribute("class", D):G.setAttribute("class","dlh-calendar-day"))}else G.setAttribute("style",this.settings.otherMonthDayStyle),G.setAttribute("class",null!==(f=this.settings.otherMonthDayClass)&&void 0!==f?f:"dlh-calendar-othermonthday");!this.settings.isReadOnly&&!E&&(F.value=d.addTimeOfDay(B,this.settings.defaultTimeOfDay),!this.settings.allowMultipleSelection&&!this.settings.allowRangeSelection?F.onclick=function(b){var c=b.currentTarget.value;a.setDisplayedValue(c);a.setValue(c);b.stopPropagation()}:this.settings.allowRangeSelection? K&&(F.onmousedown=function(b){var c=b.currentTarget.value;a.draggingFromDate=c;a.setValue(c);b.preventDefault()},F.onmouseover=function(b){if(a.draggingFromDate&&(b=b.currentTarget.value,!a.draggingToDate||b.valueOf()!=a.draggingToDate.valueOf()))a.draggingToDate=b,a.setValueRange({start:a.draggingFromDate,finish:a.draggingToDate})}):K&&(F.onclick=function(b){a.invertValueSelection(b.currentTarget.value);b.stopPropagation()}));y.appendChild(o);B=d.addDay(B)}z.appendChild(y)}n=B}}!this.settings.isReadOnly&& this.settings.isTodayLinkVisible&&(c=s.createElement("tr"),b=s.createElement("td"),b.colSpan=7,b.setAttribute("style",this.settings.todayLinkStyle),b.setAttribute("class",null!==(k=this.settings.todayLinkClass)&&void 0!==k?k:"dlh-calendar-todaylink"),k=s.createElement("a"),k.setAttribute("href","javascript://"),k.setAttribute("style","text-decoration: none; color: inherit; cursor: pointer"),k.appendChild(s.createTextNode(this.settings.todayString)),b.appendChild(k),k.value=d.addTimeOfDay(d.getDate(new Date), this.settings.defaultTimeOfDay),k.onclick=function(b){var c=b.currentTarget.value;a.setDisplayedValue(c);a.setValue(c);b.stopPropagation()},c.appendChild(b),l.appendChild(c));this.host.appendChild(l);this.isInitialized||s.addEventListener("mouseup",function(){a.draggingToDate&&delete a.draggingToDate;a.draggingFromDate&&delete a.draggingFromDate},!0)};d.prototype.getValue=function(){return this.selectedDate};d.prototype.setValue=function(a){null!=a&&a<this.settings.minValue&&(a=this.settings.minValue); if(null==this.selectedDate&&null!=a||null!=this.selectedDate&&null==a||null!=this.selectedDate&&null!=a&&a.valueOf()!=this.selectedDate.valueOf()||this.settings.forceSetOnClick)this.isDuringInternalSetValue=!0,this.selectedDate=a,this.setValues(null!=a?[a]:[]),delete this.isDuringInternalSetValue,null==this.settings.displayedDate&&null!=a?(this.settings.displayedDate=a,this.refresh(),this.settings.displayedDateChangeHandler&&this.settings.displayedDateChangeHandler(a)):this.refresh(),this.settings.selectedDateChangeHandler&& this.settings.selectedDateChangeHandler(a)};d.prototype.setDisplayedValue=function(a){null!=a&&a<this.settings.minValue&&(a=this.settings.minValue);if(null==this.settings.displayedDate||a.valueOf()!=this.settings.displayedDate.valueOf())this.settings.displayedDate=a,this.refresh(),this.settings.displayedDateChangeHandler&&this.settings.displayedDateChangeHandler(a)};d.prototype.getValues=function(){return this.selectedDates};d.prototype.setValues=function(a){this.selectedDates=a;0<a.length&&(this.isDuringInternalSetValues= !0,this.selectedDate=a[0],this.setValueRanges([{start:this.selectedDate,finish:this.selectedDate}]),delete this.isDuringInternalSetValues)};d.prototype.getValueRange=function(){return this.selectedDateRange};d.prototype.setValueRange=function(a){a.finish||(a.finish=a.start);if(a.finish<a.start){var c=a.finish;a.finish=a.start;a.start=c}this.setValueRanges([a])};d.prototype.getValueRanges=function(){return this.selectedDateRanges};d.prototype.setValueRanges=function(a){this.selectedDateRanges=a;if(0< a.length&&(this.selectedDateRange=a[0],!this.isDuringInternalSetValues)){this.selectedDates=[];for(var c=0;c<a.length;c++){var b=a[c];b.finish||(b.finish=b.start);if(b.finish<b.start){var h=b.finish;b.finish=b.start;b.start=h}for(h=b.start;h<=b.finish;h=d.addDay(h))this.selectedDates.push(h)}this.selectedDate=this.selectedDateRange.start}this.isDuringInternalSetValue||(this.refresh(),this.settings.selectedDateChangeHandler&&this.settings.selectedDateChangeHandler(this.selectedDate));this.settings.selectionChangedHandler&& this.settings.selectionChangedHandler()};d.prototype.isValueSelected=function(a){for(var a=a.valueOf(),c=0;c<this.selectedDates.length;c++)if(this.selectedDates[c].valueOf()==a)return!0;return!1};d.prototype.invertValueSelection=function(a){for(var c=a.valueOf(),b=0;b<this.selectedDates.length;b++)if(this.selectedDates[b].valueOf()==c){1<this.selectedDates.length&&(this.selectedDates.splice(b,1),this.setValues(this.selectedDates));return}this.selectedDates.push(a);this.setValues(this.selectedDates)}; d.getDate=function(a){var c=a.getTimezoneOffset()*d.minuteDuration;return new Date(Math.floor((a.valueOf()-c)/d.dayDuration)*d.dayDuration+c)};d.getPreviousWeekStart=function(a,c){for(var b=d.getDate(a),h=b;b.getDay()!=c;)b=d.subtractDay(b);if(h.valueOf()-b.valueOf()>6.5*d.dayDuration)for(h=0;7>h;h++)b=d.addDay(b);return b};d.addDay=function(a){var c=a.getTimezoneOffset()*d.minuteDuration,a=new Date(a.valueOf()-c+d.dayDuration),c=a.getTimezoneOffset()*d.minuteDuration;return new Date(a.valueOf()+ c)};d.subtractDay=function(a){return d.getDate(new Date(a.valueOf()-d.dayDuration))};d.addTimeOfDay=function(a,c){var b=a.getTimezoneOffset()*d.minuteDuration,a=new Date(a.valueOf()-b+c),b=a.getTimezoneOffset()*d.minuteDuration;return new Date(a.valueOf()+b)};d.getFirstDayOfMonth=function(a){for(a=d.getDate(a);1<a.getDate();)a=d.subtractDay(a);return a};d.secondDuration=1000;d.minuteDuration=60*d.secondDuration;d.hourDuration=60*d.minuteDuration;d.dayDuration=24*d.hourDuration;d.weekDuration=7*d.dayDuration; d.initialSundayDateTimeValue=3*d.dayDuration;return d}();f.Element=l})(E=f.Calendar||(f.Calendar={}));var L;(function(f){f.initialize=function(d,a,c,b){return new l(d,a,c,b)};f.get=function(d){return d.component};var l=function(){function d(a,c,b,h){this.host=a;this.value=c;this.settings=b;this.isInitialized=!1;this.dropDownButtonElement=null;var e="DlhSoft.Controls DatePicker DlhSoft.Data.HTML.Controls 5 validate Licensing".split(" ");n[e[5]][e[4]](a,e[0],e[1],e[2],e[3],h,b);this.host.component= this;"undefined"===typeof b&&(b={});this.settings=b;d.initializeSettings(this.settings);var g=this.host.ownerDocument;if(this.inputHost=a instanceof HTMLInputElement?a:null){if(null==c)try{c=this.settings.dateTimeParser(this.inputHost.value)}catch(m){}a=g.createElement("span");this.inputHost.parentElement&&this.inputHost.parentElement.insertBefore(a,this.inputHost);this.host=a;n[e[5]][e[4]](a,e[0],e[1],e[2],e[3],h,b);this.host.component=this}"undefined"===typeof c&&(c=b.isNullValueAccepted?null:new Date); this.value=c;this.refresh();this.isInitialized=!0}d.initializeSettings=function(a){"undefined"===typeof a.isTodayLinkVisible&&(a.isTodayLinkVisible=!0);"undefined"===typeof a.calendarSelectorLevels&&(a.calendarSelectorLevels=Infinity);"undefined"===typeof a.popupStyle&&(a.popupStyle="background-color: White; border: 1px solid "+("Modern"==a.theme?"#e0e0e0":"#707070")+"; font-family: Arial");"undefined"===typeof a.calendarSelectorPopupStyle&&(a.calendarSelectorPopupStyle=a.popupStyle);"undefined"=== typeof a.calendarSelectorPopupClass&&(a.calendarSelectorPopupClass=a.popupClass);E.Element.initializeSettings(a);"undefined"===typeof a.openDropDownOnInputClick&&(a.openDropDownOnInputClick=!0);"undefined"===typeof a.dateTimeFormatter&&(a.dateTimeFormatter=function(c){if(c==null&&a.isNullValueAccepted)return"";var b=function(a,b){b===void 0&&(b=2);for(var c=a.toString();c.length<b;)c="0"+c;return c},d=c.getFullYear(),e=c.getMonth()+1,g=c.getDate(),m=c.getHours(),c=c.getMinutes();return b(e)+"/"+b(g)+ "/"+b(d,4)+" "+b(m)+":"+b(c)});"undefined"===typeof a.dateTimeParser&&(a.dateTimeParser=function(c){if(typeof c==="undefined"||c==null||c.length==0)return a.isNullValueAccepted?null:new Date;c=new Date(c);return isNaN(c.valueOf())||c.getFullYear()<=0?new Date:c});"undefined"===typeof a.isNullValueAccepted&&(a.isNullValueAccepted=!0);"undefined"===typeof a.isDropDownButtonVisible&&(a.isDropDownButtonVisible=!1);"undefined"===typeof a.dropDownButtonDefinition&&(a.dropDownButtonDefinition="<svg style='display: inline-block; margin-left: 4px; cursor: pointer; vertical-align: middle' width='12' height='12'><rect x='0' y='0' width='12' height='3' style='fill: #707070; stroke: #707070; stroke-width: 0.65'/><rect x='0' y='3' width='12' height='9' style='fill: none; stroke: #707070; stroke-width: 0.65'/><line x1='3' y1='3' x2='3' y2='12' style='stroke: #707070; stroke-width: 0.65'/><line x1='6' y1='3' x2='6' y2='12' style='stroke: #707070; stroke-width: 0.65'/><line x1='9' y1='3' x2='9' y2='12' style='stroke: #707070; stroke-width: 0.65'/><line x1='0' y1='6' x2='12' y2='6' style='stroke: #707070; stroke-width: 0.65'/><line x1='0' y1='9' x2='12' y2='9' style='stroke: #707070; stroke-width: 0.65'/></svg>"); "undefined"===typeof a.inputStyle&&"Modern"==a.theme&&(a.inputStyle="border: 1px solid #e0e0e0; background-color: White; color: #505050; font-family: Arial; font-size: 12px; padding: 4px")};d.prototype.refresh=function(){for(var a=this,c=this.host.ownerDocument,b=this.host.childNodes.length;0<b--;)this.host.removeChild(this.host.childNodes[b]);b=c.createElement("div");b.setAttribute("style","margin-top: -1px");if(this.inputHost)d=c.createElement("span"),d.setAttribute("style","display: inline-block"), d.appendChild(b),this.host.appendChild(d),b=this.host.firstChild,this.popupElement=b.firstChild,this.inputHost.parentElement&&this.inputHost.parentElement.removeChild(this.inputHost),this.popupElement&&this.popupElement.parentElement&&this.popupElement.parentElement.insertBefore(this.inputHost,this.popupElement),this.inputElement=this.inputHost;else{var d=c.createElement("span");d.setAttribute("style","display: inline-block");var e=c.createElement("input");d.appendChild(e);d.appendChild(b)