(u,f,y)
| 10 | <span class="undo_popup_text">Event deleted</span> |
| 11 | <button class="undo_button" data-deleted-event-id="${s.id}">Undo</button> |
| 12 | </div>`,expire:1e4,type:"popup_after_delete",callback:function(o){o.target.closest(`[data-deleted-event-id="${s.id}"]`)&&(a.rrule&&a.duration&&(a.end_date=new Date(a.start_date.valueOf()+1e3*a.duration),i.addEvent(a)),i.addEvent(a),i.render())}})})})(e),Mt(e),Nt(e),function(i){i.batchUpdate=Tt(i)}(e),function(i){i.ext||(i.ext={}),i.ext.liveUpdates={RemoteEvents:Ct,remoteUpdates:Ot(i)}}(e)}var $t=Date.now();function Ce(e){return!(!e||typeof e!="object")&&!!(e.getFullYear&&e.getMonth&&e.getDate)}const ne={uid:function(){return $t++},mixin:function(e,i,t){for(var n in i)(e[n]===void 0||t)&&(e[n]=i[n]);return e},copy:function e(i){var t,n,s;if(i&&typeof i=="object")switch(!0){case Ce(i):n=new Date(i);break;case(s=i,Array.isArray?Array.isArray(s):s&&s.length!==void 0&&s.pop&&s.push):for(n=new Array(i.length),t=0;t<i.length;t++)n[t]=e(i[t]);break;case function(a){return a&&typeof a=="object"&&Function.prototype.toString.call(a.constructor)==="function String() { [native code] }"}(i):n=new String(i);break;case function(a){return a&&typeof a=="object"&&Function.prototype.toString.call(a.constructor)==="function Number() { [native code] }"}(i):n=new Number(i);break;case function(a){return a&&typeof a=="object"&&Function.prototype.toString.call(a.constructor)==="function Boolean() { [native code] }"}(i):n=new Boolean(i);break;default:for(t in n={},i){const a=typeof i[t];a==="string"||a==="number"||a==="boolean"?n[t]=i[t]:Ce(i[t])?n[t]=new Date(i[t]):Object.prototype.hasOwnProperty.apply(i,[t])&&(n[t]=e(i[t]))}}return n||i},defined:function(e){return e!==void 0},isDate:Ce,delay:function(e,i){var t,n=function(){n.$cancelTimeout(),n.$pending=!0;var s=Array.prototype.slice.call(arguments);t=setTimeout(function(){e.apply(this,s),n.$pending=!1},i)};return n.$pending=!1,n.$cancelTimeout=function(){clearTimeout(t),n.$pending=!1},n.$execute=function(){var s=Array.prototype.slice.call(arguments);e.apply(this,s),n.$cancelTimeout()},n}};function Ht(e){function i(g){var c=document.createElement("div");return(g||"").split(" ").forEach(function(u){c.classList.add(u)}),c}var t=function(){return i("dhx_cal_navbar_rows_container")},n=function(){return i("dhx_cal_navbar_row")},s=function(g){var c=i("dhx_cal_tab");return c.setAttribute("name",g.view+"_tab"),c.setAttribute("data-tab",g.view),e.config.fix_tab_position&&(g.$firstTab?c.classList.add("dhx_cal_tab_first"):g.$lastTab?c.classList.add("dhx_cal_tab_last"):g.view!=="week"&&c.classList.add("dhx_cal_tab_standalone"),g.$segmentedTab&&c.classList.add("dhx_cal_tab_segmented")),c},a=function(){return i("dhx_cal_date")},o=function(g){return i("dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab")},_=function(g){return i("dhx_cal_"+g.view+"_button dhx_cal_nav_button")},r=function(){return i("dhx_cal_line_spacer")},d=function(g){var c=i("dhx_minical_icon");return g.click||c.$_eventAttached||e.event(c,"click",function(){e.isCalendarVisible()?e.destroyCalendar():e.renderCalendar({position:this,date:e.getState().date,navigation:!0,handler:function(u,f){e.setCurrentView(u),e.destroyCalendar()}})}),c};function l(g){var c=function(y){var w;if(y.view)switch(y.view){case"today":case"next":case"prev":w=_;break;case"date":w=a;break;case"spacer":w=r;break;case"button":w=o;break;case"minicalendar":w=d;break;default:w=s}else y.rows?w=t:y.cols&&(w=n);return w}(g);if(c){var u=c(g);if(g.css&&u.classList.add(g.css),g.width&&((f=g.width)===1*f&&(f+="px"),u.style.width=f),g.height&&((f=g.height)===1*f&&(f+="px"),u.style.height=f),g.click&&e.event(u,"click",g.click),g.html&&(u.innerHTML=g.html),g.align){var f="";g.align=="right"?f="flex-end":g.align=="left"&&(f="flex-start"),u.style.justifyContent=f}return u}}function h(g){return typeof g=="string"&&(g={view:g}),g.view||g.rows||g.cols||(g.view="button"),g}function p(g){var c,u=document.createDocumentFragment();c=Array.isArray(g)?g:[g];for(var f=0;f<c.length;f++){var y,w=h(c[f]);w.view==="day"&&c[f+1]&&((y=h(c[f+1])).view!=="week"&&y.view!=="month"||(w.$firstTab=!0,w.$segmentedTab=!0)),w.view==="week"&&c[f-1]&&((y=h(c[f+1])).view!=="week"&&y.view!=="month"||(w.$segmentedTab=!0)),w.view==="month"&&c[f-1]&&((y=h(c[f-1])).view!=="week"&&y.view!=="day"||(w.$lastTab=!0,w.$segmentedTab=!0));var D=l(w);u.appendChild(D),(w.cols||w.rows)&&D.appendChild(p(w.cols||w.rows))}return u}e._init_nav_bar=function(g){var c=this.$container.querySelector(".dhx_cal_navline");return c||((c=document.createElement("div")).className="dhx_cal_navline dhx_cal_navline_flex",e._update_nav_bar(g,c),c)};var v=null;e._update_nav_bar=function(g,c){if(g){var u=!1,f=g.height||e.xy.nav_height;v!==null&&v===f||(u=!0),u&&(e.xy.nav_height=f),c.innerHTML="",c.appendChild(p(g)),e.unset_actions(),e._els=[],e.get_elements(),e.set_actions(),c.style.display=f===0?"none":"",v=f}}}function zt(e){function i(a){return a.isConnected!==void 0?a.isConnected:document.body.contains(a)}function t(a){return{w:a.innerWidth||document.documentElement.clientWidth,h:a.innerHeight||document.documentElement.clientHeight}}function n(a,o){var _,r=t(o);a.event(o,"resize",function(){clearTimeout(_),_=setTimeout(function(){if(i(a.$container)&&!a.$destroyed){var d,l,h=t(o);l=h,((d=r).w!=l.w||d.h!=l.h)&&(r=h,s(a))}},150)})}function s(a){a.$initialized&&!a.$destroyed&&a.$root&&i(a.$root)&&a.callEvent("onSchedulerResize",[])&&(a.updateView(),a.callEvent("onAfterSchedulerResize",[]))}(function(a){var o=a.$container;if(window.getComputedStyle(o).getPropertyValue("position")=="static"&&(o.style.position="relative"),window.ResizeObserver){let r=!0;const d=new ResizeObserver(function(l){r?r=!1:s(a)});d.observe(o),a.attachEvent("onDestroy",function(){d.unobserve(o)})}else{var _=document.createElement("iframe");_.className="scheduler_container_resize_watcher",_.tabIndex=-1,a.config.wai_aria_attributes&&(_.setAttribute("role","none"),_.setAttribute("aria-hidden",!0)),window.Sfdc||window.$A||window.Aura?function(r){var d=r.$root.offsetHeight,l=r.$root.offsetWidth;(function h(){r.$destroyed||(r.$root&&(r.$root.offsetHeight==d&&r.$root.offsetWidth==l||s(r),d=r.$root.offsetHeight,l=r.$root.offsetWidth),setTimeout(h,200))})()}(a):(o.appendChild(_),_.contentWindow?n(a,_.contentWindow):(o.removeChild(_),n(a,window)))}})(e)}class qt{constructor(){this._silent_mode=!1,this.listeners={}}_silentStart(){this._silent_mode=!0}_silentEnd(){this._silent_mode=!1}}function Oe(e){const i=new qt;e.attachEvent=function(t,n,s){t="ev_"+t.toLowerCase(),i.listeners[t]||(i.listeners[t]=function(o){let _={},r=0;const d=function(){let l=!0;for(const h in _){const p=_[h].apply(o,arguments);l=l&&p}return l};return d.addEvent=function(l,h){if(typeof l=="function"){let p;if(h&&h.id?p=h.id:(p=r,r++),h&&h.once){const v=l;l=function(){v(),d.removeEvent(p)}}return _[p]=l,p}return!1},d.removeEvent=function(l){delete _[l]},d.clear=function(){_={}},d}(this)),s&&s.thisObject&&(n=n.bind(s.thisObject));let a=t+":"+i.listeners[t].addEvent(n,s);return s&&s.id&&(a=s.id),a},e.attachAll=function(t){this.attachEvent("listen_all",t)},e.callEvent=function(t,n){if(i._silent_mode)return!0;const s="ev_"+t.toLowerCase(),a=i.listeners;return a.ev_listen_all&&a.ev_listen_all.apply(this,[t].concat(n)),!a[s]||a[s].apply(this,n)},e.checkEvent=function(t){return!!i.listeners["ev_"+t.toLowerCase()]},e.detachEvent=function(t){if(t){let n=i.listeners;for(const a in n)n[a].removeEvent(t);const s=t.split(":");if(n=i.listeners,s.length===2){const a=s[0],o=s[1];n[a]&&n[a].removeEvent(o)}}},e.detachAllEvents=function(){for(const t in i.listeners)i.listeners[t].clear()}}const Ge={event:function(e,i,t){e.addEventListener?e.addEventListener(i,t,!1):e.attachEvent&&e.attachEvent("on"+i,t)},eventRemove:function(e,i,t){e.removeEventListener?e.removeEventListener(i,t,!1):e.detachEvent&&e.detachEvent("on"+i,t)}};function jt(e){var i=function(){var t=function(n,s){n=n||Ge.event,s=s||Ge.eventRemove;var a=[],o={attach:function(_,r,d,l){a.push({element:_,event:r,callback:d,capture:l}),n(_,r,d,l)},detach:function(_,r,d,l){s(_,r,d,l);for(var h=0;h<a.length;h++){var p=a[h];p.element===_&&p.event===r&&p.callback===d&&p.capture===l&&(a.splice(h,1),h--)}},detachAll:function(){for(var _=a.slice(),r=0;r<_.length;r++){var d=_[r];o.detach(d.element,d.event,d.callback,d.capture),o.detach(d.element,d.event,d.callback,void 0),o.detach(d.element,d.event,d.callback,!1),o.detach(d.element,d.event,d.callback,!0)}a.splice(0,a.length)},extend:function(){return t(this.event,this.eventRemove)}};return o};return t()}();e.event=i.attach,e.eventRemove=i.detach,e._eventRemoveAll=i.detachAll,e._createDomEventScope=i.extend,e._trim=function(t){return(String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")}).apply(t)},e._isDate=function(t){return!(!t||typeof t!="object")&&!!(t.getFullYear&&t.getMonth&&t.getDate)},e._isObject=function(t){return t&&typeof t=="object"}}function Xe(e){if(!e)return"";var i=e.className||"";return i.baseVal&&(i=i.baseVal),i.indexOf||(i=""),i||""}function Ze(e,i,t){t===void 0&&(t=!0);for(var n=e.target||e.srcElement,s="";n;){if(s=Xe(n)){var a=s.indexOf(i);if(a>=0){if(!t)return n;var o=a===0||!(s.charAt(a-1)||"").trim(),_=a+i.length>=s.length||!s.charAt(a+i.length).trim();if(o&&_)return n}}n=n.parentNode}return null}function It(e){var i=!1,t=!1;if(window.getComputedStyle){var n=window.getComputedStyle(e,null);i=n.display,t=n.visibility}else e.currentStyle&&(i=e.currentStyle.display,t=e.currentStyle.visibility);var s=!1,a=Ze({target:e},"dhx_form_repeat",!1);return a&&(s=a.style.height=="0px"),s=s||!e.offsetHeight,i!="none"&&t!="hidden"&&!s}function Rt(e){return!isNaN(e.getAttribute("tabindex"))&&1*e.getAttribute("tabindex")>=0}function Pt(e){return!{a:!0,area:!0}[e.nodeName.loLowerCase()]||!!e.getAttribute("href")}function Ut(e){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[e.nodeName.toLowerCase()]||!e.hasAttribute("disabled")}function Qe(){return document.head.createShadowRoot||document.head.attachShadow}function et(e,i){if(e.closest)return e.closest(i);if(e.matches||e.msMatchesSelector||e.webkitMatchesSelector){var t=e;if(!document.documentElement.contains(t))return null;do{if((t.matches||t.msMatchesSelector||t.webkitMatchesSelector).call(t,i))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}return console.error("Your browser is not supported"),null}function tt(e){if(!e||!Qe())return document.body;for(;e.parentNode&&(e=e.parentNode);)if(e instanceof ShadowRoot)return e.host;return document.body}const le={getAbsoluteLeft:function(e){return this.getOffset(e).left+(parseInt(window.getComputedStyle(e).paddingLeft,10)||0)},getAbsoluteTop:function(e){return this.getOffset(e).top+(parseInt(window.getComputedStyle(e).paddingTop,10)||0)},getOffsetSum:function(e){for(var i=0,t=0;e;)i+=parseInt(e.offsetTop),t+=parseInt(e.offsetLeft),e=e.offsetParent;return{top:i,left:t}},getOffsetRect:function(e){var i=e.getBoundingClientRect(),t=0,n=0;if(/Mobi/.test(navigator.userAgent)){var s=document.createElement("div");s.style.position="absolute",s.style.left="0px",s.style.top="0px",s.style.width="1px",s.style.height="1px",document.body.appendChild(s);var a=s.getBoundingClientRect();t=i.top-a.top,n=i.left-a.left,s.parentNode.removeChild(s)}else{var o=document.body,_=document.documentElement,r=window.pageYOffset||_.scrollTop||o.scrollTop,d=window.pageXOffset||_.scrollLeft||o.scrollLeft,l=_.clientTop||o.clientTop||0,h=_.clientLeft||o.clientLeft||0;t=i.top+r-l,n=i.left+d-h}return{top:Math.round(t),left:Math.round(n)}},getOffset:function(e){return e.getBoundingClientRect?this.getOffsetRect(e):this.getOffsetSum(e)},closest:function(e,i){return e&&i?et(e,i):null},insertAfter:function(e,i){i.nextSibling?i.parentNode.insertBefore(e,i.nextSibling):i.parentNode.appendChild(e)},remove:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},isChildOf:function(e,i){return i.contains(e)},getFocusableNodes:function(e){for(var i=e.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),t=Array.prototype.slice.call(i,0),n=0;n<t.length;n++)t[n].$position=n;for(t.sort(function(a,o){return a.tabIndex===0&&o.tabIndex!==0?1:a.tabIndex!==0&&o.tabIndex===0?-1:a.tabIndex===o.tabIndex?a.$position-o.$position:a.tabIndex<o.tabIndex?-1:1}),n=0;n<t.length;n++){var s=t[n];(Rt(s)||Ut(s)||Pt(s))&&It(s)||(t.splice(n,1),n--)}return t},getClassName:Xe,locateCss:Ze,getRootNode:tt,hasShadowParent:function(e){return!!tt(e)},isShadowDomSupported:Qe,getActiveElement:function(){var e=document.activeElement;return e.shadowRoot&&(e=e.shadowRoot.activeElement),e===document.body&&document.getSelection&&(e=document.getSelection().focusNode||document.body),e},getRelativeEventPosition:function(e,i){var t=document.documentElement,n=function(s){var a=0,o=0,_=0,r=0;if(s.getBoundingClientRect){var d=s.getBoundingClientRect(),l=document.body,h=document.documentElement||document.body.parentNode||document.body,p=window.pageYOffset||h.scrollTop||l.scrollTop,v=window.pageXOffset||h.scrollLeft||l.scrollLeft,g=h.clientTop||l.clientTop||0,c=h.clientLeft||l.clientLeft||0;a=d.top+p-g,o=d.left+v-c,_=document.body.offsetWidth-d.right,r=document.body.offsetHeight-d.bottom}else{for(;s;)a+=parseInt(s.offsetTop,10),o+=parseInt(s.offsetLeft,10),s=s.offsetParent;_=document.body.offsetWidth-s.offsetWidth-o,r=document.body.offsetHeight-s.offsetHeight-a}return{y:Math.round(a),x:Math.round(o),width:s.offsetWidth,height:s.offsetHeight,right:Math.round(_),bottom:Math.round(r)}}(i);return{x:e.clientX-t.clientLeft-n.x+i.scrollLeft,y:e.clientY-t.clientTop-n.y+i.scrollTop}},getTargetNode:function(e){var i;return e.tagName?i=e:(i=(e=e||window.event).target||e.srcElement).shadowRoot&&e.composedPath&&(i=e.composedPath()[0]),i},getNodePosition:function(e){var i=0,t=0,n=0,s=0;if(e.getBoundingClientRect){var a=e.getBoundingClientRect(),o=document.body,_=document.documentElement||document.body.parentNode||document.body,r=window.pageYOffset||_.scrollTop||o.scrollTop,d=window.pageXOffset||_.scrollLeft||o.scrollLeft,l=_.clientTop||o.clientTop||0,h=_.clientLeft||o.clientLeft||0;i=a.top+r-l,t=a.left+d-h,n=document.body.offsetWidth-a.right,s=document.body.offsetHeight-a.bottom}else{for(;e;)i+=parseInt(e.offsetTop,10),t+=parseInt(e.offsetLeft,10),e=e.offsetParent;n=document.body.offsetWidth-e.offsetWidth-t,s=document.body.offsetHeight-e.offsetHeight-i}return{y:Math.round(i),x:Math.round(t),width:e.offsetWidth,height:e.offsetHeight,right:Math.round(n),bottom:Math.round(s)}},closest:et};var ce=typeof window<"u";const Yt={isIE:ce&&(navigator.userAgent.indexOf("MSIE")>=0||navigator.userAgent.indexOf("Trident")>=0),isOpera:ce&&navigator.userAgent.indexOf("Opera")>=0,isChrome:ce&&navigator.userAgent.indexOf("Chrome")>=0,isKHTML:ce&&(navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0),isFF:ce&&navigator.userAgent.indexOf("Firefox")>=0,isIPad:ce&&navigator.userAgent.search(/iPad/gi)>=0,isEdge:ce&&navigator.userAgent.indexOf("Edge")!=-1,isNode:!ce||typeof navigator>"u"};function Le(e){if(typeof e=="string"||typeof e=="number")return e;var i="";for(var t in e){var n="";e.hasOwnProperty(t)&&(n=t+"="+(n=typeof e[t]=="string"?encodeURIComponent(e[t]):typeof e[t]=="number"?e[t]:encodeURIComponent(JSON.stringify(e[t]))),i.length&&(n="&"+n),i+=n)}return i}function Vt(e){var i=function(a,o){for(var _="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",r=a.match(/%[a-zA-Z]/g),d=0;d<r.length;d++)switch(r[d]){case"%j":case"%d":_+="set[2]=temp["+d+"]||1;";break;case"%n":case"%m":_+="set[1]=(temp["+d+"]||1)-1;";break;case"%y":_+="set[0]=temp["+d+"]*1+(temp["+d+"]>50?1900:2000);";break;case"%g":case"%G":case"%h":case"%H":_+="set[3]=temp["+d+"]||0;";break;case"%i":_+="set[4]=temp["+d+"]||0;";break;case"%Y":_+="set[0]=temp["+d+"]||0;";break;case"%a":case"%A":_+="set[3]=set[3]%12+((temp["+d+"]||'').toLowerCase()=='am'?0:12);";break;case"%s":_+="set[5]=temp["+d+"]||0;";break;case"%M":_+="set[1]=this.locale.date.month_short_hash[temp["+d+"]]||0;";break;case"%F":_+="set[1]=this.locale.date.month_full_hash[temp["+d+"]]||0;"}var l="set[0],set[1],set[2],set[3],set[4],set[5]";return o&&(l=" Date.UTC("+l+")"),new Function("date","var set=[0,0,1,0,0,0]; "+_+" return new Date("+l+");")},t=function(a,o){const _=a.match(/%[a-zA-Z]/g);return function(r){for(var d=[0,0,1,0,0,0],l=r.match(/[a-zA-Z]+|[0-9]+/g),h=0;h<_.length;h++)switch(_[h]){case"%j":case"%d":d[2]=l[h]||1;break;case"%n":case"%m":d[1]=(l[h]||1)-1;break;case"%y":d[0]=1*l[h]+(l[h]>50?1900:2e3);break;case"%g":case"%G":case"%h":case"%H":d[3]=l[h]||0;break;case"%i":d[4]=l[h]||0;break;case"%Y":d[0]=l[h]||0;break;case"%a":case"%A":d[3]=d[3]%12+((l[h]||"").toLowerCase()=="am"?0:12);break;case"%s":d[5]=l[h]||0;break;case"%M":d[1]=e.locale.date.month_short_hash[l[h]]||0;break;case"%F":d[1]=e.locale.date.month_full_hash[l[h]]||0}return o?new Date(Date.UTC(d[0],d[1],d[2],d[3],d[4],d[5])):new Date(d[0],d[1],d[2],d[3],d[4],d[5])}};let n;function s(){var a=!1;return e.config.csp==="auto"?(n===void 0&&(n=function(){try{new Function("cspEnabled = false;"),n=!1}catch{n=!0}return n}()),a=n):a=e.config.csp,a}e.date={init:function(){for(var a=e.locale.date.month_short,o=e.locale.date.month_short_hash={},_=0;_<a.length;_++)o[a[_]]=_;for(a=e.locale.date.month_full,o=e.locale.date.month_full_hash={},_=0;_<a.length;_++)o[a[_]]=_},date_part:function(a){const o=new Date(a);var _=new Date(o);return o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.getHours()&&(o.getDate()<_.getDate()||o.getMonth()<_.getMonth()||o.getFullYear()<_.getFullYear())&&o.setTime(o.getTime()+36e5*(24-o.getHours())),o},time_part:function(a){return(a.valueOf()/1e3-60*a.getTimezoneOffset())%86400},week_start:function(a){var o=a.getDay();return e.config.start_on_monday&&(o===0?o=6:o--),this.date_part(this.add(a,-1*o,"day"))},month_start:function(a){const o=new Date(a);return o.setDate(1),this.date_part(o)},year_start:function(a){const o=new Date(a);return o.setMonth(0),this.month_start(o)},day_start:function(a){const o=new Date(a);return this.date_part(o)},_add_days:function(a,o){var _=new Date(a.valueOf());if(_.setDate(_.getDate()+o),o==Math.round(o)&&o>0){var r=(+_-+a)%864e5;if(r&&a.getTimezoneOffset()==_.getTimezoneOffset()){var d=r/36e5;_.setTime(_.getTime()+60*(24-d)*60*1e3)}}return o>=0&&!a.getHours()&&_.getHours()&&(_.getDate()<a.getDate()||_.getMonth()<a.getMonth()||_.getFullYear()<a.getFullYear())&&_.setTime(_.getTime()+36e5*(24-_.getHours())),_},add:function(a,o,_){var r=new Date(a.valueOf());switch(_){case"day":r=e.date._add_days(r,o);break;case"week":r=e.date._add_days(r,7*o);break;case"month":r.setMonth(r.getMonth()+o);break;case"year":r.setYear(r.getFullYear()+o);break;case"hour":r.setTime(r.getTime()+60*o*60*1e3);break;case"minute":r.setTime(r.getTime()+60*o*1e3);break;default:return e.date["add_"+_](a,o,_)}return r},to_fixed:function(a){return a<10?"0"+a:a},copy:function(a){return new Date(a.valueOf())},date_to_str:function(a,o){return s()?function(_,r){return function(d){return _.replace(/%[a-zA-Z]/g,function(l){switch(l){case"%d":return r?e.date.to_fixed(d.getUTCDate()):e.date.to_fixed(d.getDate());case"%m":return r?e.date.to_fixed(d.getUTCMonth()+1):e.date.to_fixed(d.getMonth()+1);case"%j":return r?d.getUTCDate():d.getDate();case"%n":return r?d.getUTCMonth()+1:d.getMonth()+1;case"%y":return r?e.date.to_fixed(d.getUTCFullYear()%100):e.date.to_fixed(d.getFullYear()%100);case"%Y":return r?d.getUTCFullYear():d.getFullYear();case"%D":return r?e.locale.date.day_short[d.getUTCDay()]:e.locale.date.day_short[d.getDay()];case"%l":return r?e.locale.date.day_full[d.getUTCDay()]:e.locale.date.day_full[d.getDay()];case"%M":return r?e.locale.date.month_short[d.getUTCMonth()]:e.locale.date.month_short[d.getMonth()];case"%F":return r?e.locale.date.month_full[d.getUTCMonth()]:e.locale.date.month_full[d.getMonth()];case"%h":return r?e.date.to_fixed((d.getUTCHours()+11)%12+1):e.date.to_fixed((d.getHours()+11)%12+1);case"%g":return r?(d.getUTCHours()+11)%12+1:(d.getHours()+11)%12+1;case"%G":return r?d.getUTCHours():d.getHours();case"%H":return r?e.date.to_fixed(d.getUTCHours()):e.date.to_fixed(d.getHours());case"%i":return r?e.date.to_fixed(d.getUTCMinutes()):e.date.to_fixed(d.getMinutes());case"%a":return r?d.getUTCHours()>11?"pm":"am":d.getHours()>11?"pm":"am";case"%A":return r?d.getUTCHours()>11?"PM":"AM":d.getHours()>11?"PM":"AM";case"%s":return r?e.date.to_fixed(d.getUTCSeconds()):e.date.to_fixed(d.getSeconds());case"%W":return r?e.date.to_fixed(e.date.getUTCISOWeek(d)):e.date.to_fixed(e.date.getISOWeek(d));default:return l}})}}(a,o):(a=a.replace(/%[a-zA-Z]/g,function(_){switch(_){case"%d":return'"+this.date.to_fixed(date.getDate())+"';case"%m":return'"+this.date.to_fixed((date.getMonth()+1))+"';case"%j":return'"+date.getDate()+"';case"%n":return'"+(date.getMonth()+1)+"';case"%y":return'"+this.date.to_fixed(date.getFullYear()%100)+"';case"%Y":return'"+date.getFullYear()+"';case"%D":return'"+this.locale.date.day_short[date.getDay()]+"';case"%l":return'"+this.locale.date.day_full[date.getDay()]+"';case"%M":return'"+this.locale.date.month_short[date.getMonth()]+"';case"%F":return'"+this.locale.date.month_full[date.getMonth()]+"';case"%h":return'"+this.date.to_fixed((date.getHours()+11)%12+1)+"';case"%g":return'"+((date.getHours()+11)%12+1)+"';case"%G":return'"+date.getHours()+"';case"%H":return'"+this.date.to_fixed(date.getHours())+"';case"%i":return'"+this.date.to_fixed(date.getMinutes())+"';case"%a":return'"+(date.getHours()>11?"pm":"am")+"';case"%A":return'"+(date.getHours()>11?"PM":"AM")+"';case"%s":return'"+this.date.to_fixed(date.getSeconds())+"';case"%W":return'"+this.date.to_fixed(this.date.getISOWeek(date))+"';default:return _}}),o&&(a=a.replace(/date\.get/g,"date.getUTC")),new Function("date",'return "'+a+'";').bind(e))},str_to_date:function(a,o,_){var r=s()?t:i,d=r(a,o),l=/^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,h=/^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/,p=/^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,v=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,g=r("%Y-%m-%d %H:%i:%s",o),c=r("%m/%d/%Y %H:%i:%s",o),u=r("%d-%m-%Y %H:%i:%s",o);return function(f){if(!_&&!e.config.parse_exact_format){if(f&&f.getISOWeek)return new Date(f);if(typeof f=="number")return new Date(f);if(y=f,l.test(String(y)))return g(f);if(function(w){return h.test(String(w))}(f))return c(f);if(function(w){return p.test(String(w))}(f))return u(f);if(function(w){return v.test(w)}(f))return new Date(f)}var y;return d.call(e,f)}},getISOWeek:function(a){if(!a)return!1;var o=(a=this.date_part(new Date(a))).getDay();o===0&&(o=7);var _=new Date(a.valueOf());_.setDate(a.getDate()+(4-o));var r=_.getFullYear(),d=Math.round((_.getTime()-new Date(r,0,1).getTime())/864e5);return 1+Math.floor(d/7)},getUTCISOWeek:function(a){return this.getISOWeek(this.convert_to_utc(a))},convert_to_utc:function(a){return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds())}}}function at(e){return(function(){var i={};for(var t in this._events){var n=this._events[t];n.id.toString().indexOf("#")==-1&&(i[n.id]=n)}return i}).bind(e)}function Ft(e){e._loaded={},e._load=function(t,n){if(t=t||this._load_url){var s;if(t+=(t.indexOf("?")==-1?"?":"&")+"timeshift="+new Date().getTimezoneOffset(),this.config.prevent_cache&&(t+="&uid="+this.uid()),n=n||this._date,this._load_mode){var a=this.templates.load_format;for(n=this.date[this._load_mode+"_start"](new Date(n.valueOf()));n>this._min_date;)n=this.date.add(n,-1,this._load_mode);s=n;for(var o=!0;s<this._max_date;)s=this.date.add(s,1,this._load_mode),this._loaded[a(n)]&&o?n=this.date.add(n,1,this._load_mode):o=!1;var _=s;do s=_,_=this.date.add(s,-1,this._load_mode);while(_>n&&this._loaded[a(_)]);if(s<=n)return!1;for(e.ajax.get(t+"&from="+a(n)+"&to="+a(s),r);n<s;)this._loaded[a(n)]=!0,n=this.date.add(n,1,this._load_mode)}else e.ajax.get(t,r);return this.callEvent("onXLS",[]),this.callEvent("onLoadStart",[]),!0}function r(d){e.on_load(d),e.callEvent("onLoadEnd",[])}},e._parsers={},function(t){t._parsers.xml={canParse:function(n,s){if(s.responseXML&&s.responseXML.firstChild)return!0;try{var a=t.ajax.parse(s.responseText),o=t.ajax.xmltop("data",a);if(o&&o.tagName==="data")return!0}catch{}return!1},parse:function(n){var s;if(n.xmlDoc.responseXML||(n.xmlDoc.responseXML=t.ajax.parse(n.xmlDoc.responseText)),(s=t.ajax.xmltop("data",n.xmlDoc)).tagName!="data")return null;var a=s.getAttribute("dhx_security");a&&(window.dhtmlx&&(window.dhtmlx.security_key=a),t.security_key=a);for(var o=t.ajax.xpath("//coll_options",n.xmlDoc),_=0;_<o.length;_++){var r=o[_].getAttribute("for"),d=t.serverList[r];d||(t.serverList[r]=d=[]),d.splice(0,d.length);for(var l=t.ajax.xpath(".//item",o[_]),h=0;h<l.length;h++){for(var p=l[h].attributes,v={key:l[h].getAttribute("value"),label:l[h].getAttribute("label")},g=0;g<p.length;g++){var c=p[g];c.nodeName!="value"&&c.nodeName!="label"&&(v[c.nodeName]=c.nodeValue)}d.push(v)}}o.length&&t.callEvent("onOptionsLoad",[]);var u=t.ajax.xpath("//userdata",n.xmlDoc);for(_=0;_<u.length;_++){var f=t._xmlNodeToJSON(u[_]);t._userdata[f.name]=f.text}var y=[];for(s=t.ajax.xpath("//event",n.xmlDoc),_=0;_<s.length;_++){var w=y[_]=t._xmlNodeToJSON(s[_]);t._init_event(w)}return y}}}(e),function(t){t.json=t._parsers.json={canParse:function(n){if(n&&typeof n=="object")return!0;if(typeof n=="string")try{var s=JSON.parse(n);return Object.prototype.toString.call(s)==="[object Object]"||Object.prototype.toString.call(s)==="[object Array]"}catch{return!1}return!1},parse:function(n){var s=[];typeof n=="string"&&(n=JSON.parse(n)),Object.prototype.toString.call(n)==="[object Array]"?s=n:n&&(n.events?s=n.events:n.data&&(s=n.data)),s=s||[],n.dhx_security&&(window.dhtmlx&&(window.dhtmlx.security_key=n.dhx_security),t.security_key=n.dhx_security);var a=n&&n.collections?n.collections:{},o=!1;for(var _ in a)if(a.hasOwnProperty(_)){o=!0;var r=a[_],d=t.serverList[_];d||(t.serverList[_]=d=[]),d.splice(0,d.length);for(var l=0;l<r.length;l++){var h=r[l],p={key:h.value,label:h.label};for(var v in h)if(h.hasOwnProperty(v)){if(v=="value"||v=="label")continue;p[v]=h[v]}d.push(p)}}o&&t.callEvent("onOptionsLoad",[]);for(var g=[],c=0;c<s.length;c++){var u=s[c];t._init_event(u),g.push(u)}return g}}}(e),function(t){t.ical=t._parsers.ical={canParse:function(n){return typeof n=="string"&&new RegExp("^BEGIN:VCALENDAR").test(n)},parse:function(n){var s=n.match(RegExp(this.c_start+"[^\f]*"+this.c_end,""));if(s.length){s[0]=s[0].replace(/[\r\n]+ /g,""),s[0]=s[0].replace(/[\r\n]+(?=[a-z \t])/g," "),s[0]=s[0].replace(/;[^:\r\n]*:/g,":");for(var a,o=[],_=RegExp("(?:"+this.e_start+")([^\f]*?)(?:"+this.e_end+")","g");(a=_.exec(s))!==null;){for(var r,d={},l=/[^\r\n]+[\r\n]+/g;(r=l.exec(a[1]))!==null;)this.parse_param(r.toString(),d);d.uid&&!d.id&&(d.id=d.uid),o.push(d)}return o}},parse_param:function(n,s){var a=n.indexOf(":");if(a!=-1){var o=n.substr(0,a).toLowerCase(),_=n.substr(a+1).replace(/\\,/g,",").replace(/[\r\n]+$/,"");o=="summary"?o="text":o=="dtstart"?(o="start_date",_=this.parse_date(_,0,0)):o=="dtend"&&(o="end_date",_=this.parse_date(_,0,0)),s[o]=_}},parse_date:function(n,s,a){var o=n.split("T"),_=!1;o[1]&&(s=o[1].substr(0,2),a=o[1].substr(2,2),_=o[1][6]=="Z");var r=o[0].substr(0,4),d=parseInt(o[0].substr(4,2),10)-1,l=o[0].substr(6,2);return t.config.server_utc||_?new Date(Date.UTC(r,d,l,s,a)):new Date(r,d,l,s,a)},c_start:"BEGIN:VCALENDAR",e_start:"BEGIN:VEVENT",e_end:"END:VEVENT",c_end:"END:VCALENDAR"}}(e),e.on_load=function(t){var n;this.callEvent("onBeforeParse",[]);var s=!1,a=!1;for(var o in this._parsers){var _=this._parsers[o];if(_.canParse(t.xmlDoc.responseText,t.xmlDoc)){try{var r=t.xmlDoc.responseText;o==="xml"&&(r=t),(n=_.parse(r))||(s=!0)}catch{s=!0}a=!0;break}}if(!a)if(this._process&&this[this._process])try{n=this[this._process].parse(t.xmlDoc.responseText)}catch{s=!0}else s=!0;(s||t.xmlDoc.status&&t.xmlDoc.status>=400)&&(this.callEvent("onLoadError",[t.xmlDoc]),n=[]),this._process_loading(n),this.callEvent("onXLE",[]),this.callEvent("onParse",[])},e._process_loading=function(t){this._loading=!0,this._not_render=!0;for(var n=0;n<t.length;n++)this.callEvent("onEventLoading",[t[n]])&&this.addEvent(t[n]);this._not_render=!1,this._render_wait&&this.render_view_data(),this._loading=!1,this._after_call&&this._after_call(),this._after_call=null},e._init_event=function(t){t.text=t.text||t._tagvalue||"",t.start_date=e._init_date(t.start_date),t.end_date=e._init_date(t.end_date)},e._init_date=function(t){return t?typeof t=="string"?e._helpers.parseDate(t):new Date(t):null};const i=at(e);e.serialize=function(){const t=[],n=i();for(var s in n){const _={};var a=n[s];for(var o in a){if(o.charAt(0)=="$"||o.charAt(0)=="_")continue;let r;const d=a[o];r=e.utils.isDate(d)?e.defined(e.templates.xml_format)?e.templates.xml_format(d):e.templates.format_date(d):d,_[o]=r}t.push(_)}return t},e.parse=function(t,n){this._process=n,this.on_load({xmlDoc:{responseText:t}})},e.load=function(t,n){typeof n=="string"&&(this._process=n,n=arguments[2]),this._load_url=t,this._after_call=n,this._load(t,this._date)},e.setLoadMode=function(t){t=="all"&&(t=""),this._load_mode=t},e.serverList=function(t,n){return n?(this.serverList[t]=n.slice(0),this.serverList[t]):(this.serverList[t]=this.serverList[t]||[],this.serverList[t])},e._userdata={},e._xmlNodeToJSON=function(t){for(var n={},s=0;s<t.attributes.length;s++)n[t.attributes[s].name]=t.attributes[s].value;for(s=0;s<t.childNodes.length;s++){var a=t.childNodes[s];a.nodeType==1&&(n[a.tagName]=a.firstChild?a.firstChild.nodeValue:"")}return n.text||(n.text=t.firstChild?t.firstChild.nodeValue:""),n},e.attachEvent("onXLS",function(){var t;this.config.show_loading===!0&&((t=this.config.show_loading=document.createElement("div")).className="dhx_loading",t.style.left=Math.round((this._x-128)/2)+"px",t.style.top=Math.round((this._y-15)/2)+"px",this._obj.appendChild(t))}),e.attachEvent("onXLE",function(){var t=this.config.show_loading;t&&typeof t=="object"&&(t.parentNode&&t.parentNode.removeChild(t),this.config.show_loading=!0)})}function Bt(e){function i(){const t=e.config.csp===!0,n=!!window.Sfdc||!!window.$A||window.Aura||"$shadowResolver$"in document.body;return t||n?e.$root:document.body}e._lightbox_controls={},e.formSection=function(t){for(var n=this.config.lightbox.sections,s=0;s<n.length&&n[s].name!=t;s++);if(s===n.length)return null;var a=n[s];e._lightbox||e.getLightbox();var o=e._lightbox.querySelector(`#${a.id}`),_=o.nextSibling,r={section:a,header:o,node:_,getValue:function(l){return e.form_blocks[a.type].get_value(_,l||{},a)},setValue:function(l,h){return e.form_blocks[a.type].set_value(_,l,h||{},a)}},d=e._lightbox_controls["get_"+a.type+"_control"];return d?d(r):r},e._lightbox_controls.get_template_control=function(t){return t.control=t.node,t},e._lightbox_controls.get_select_control=function(t){return t.control=t.node.getElementsByTagName("select")[0],t},e._lightbox_controls.get_textarea_control=function(t){return t.control=t.node.getElementsByTagName("textarea")[0],t},e._lightbox_controls.get_time_control=function(t){return t.control=t.node.getElementsByTagName("select"),t},e._lightbox_controls.defaults={template:{height:30},textarea:{height:200},select:{height:23},time:{height:20}},e.form_blocks={template:{render:function(t){return`<div class='dhx_cal_ltext dhx_cal_template' ${t.height?`style='height:${t.height}px;'`:""}></div>`},set_value:function(t,n,s,a){t.innerHTML=n||""},get_value:function(t,n,s){return t.innerHTML||""},focus:function(t){}},textarea:{render:function(t){return`<div class='dhx_cal_ltext' ${t.height?`style='height:${t.height}px;'`:""}><textarea ${t.placeholder?`placeholder='${t.placeholder}'`:""}></textarea></div>`},set_value:function(t,n,s){e.form_blocks.textarea._get_input(t).value=n||""},get_value:function(t,n){return e.form_blocks.textarea._get_input(t).value},focus:function(t){var n=e.form_blocks.textarea._get_input(t);e._focus(n,!0)},_get_input:function(t){return t.getElementsByTagName("textarea")[0]}},select:{render:function(t){for(var n=`<div class='dhx_cal_ltext dhx_cal_select' ${t.height?`style='height:${t.height}px;'`:""}><select style='width:100%;'>`,s=0;s<t.options.length;s++)n+="<option value='"+t.options[s].key+"'>"+t.options[s].label+"</option>";return n+="</select></div>"},set_value:function(t,n,s,a){var o=t.firstChild;!o._dhx_onchange&&a.onchange&&(e.event(o,"change",a.onchange),o._dhx_onchange=!0),n===void 0&&(n=(o.options[0]||{}).value),o.value=n||""},get_value:function(t,n){return t.firstChild.value},focus:function(t){var n=t.firstChild;e._focus(n,!0)}},time:{render:function(t){t.time_format||(t.time_format=["%H:%i","%d","%m","%Y"]),t._time_format_order={};var n=t.time_format,s=e.config,a=e.date.date_part(e._currentDate()),o=1440,_=0;e.config.limit_time_select&&(o=60*s.last_hour+1,_=60*s.first_hour,a.setHours(s.first_hour));for(var r="",d=0;d<n.length;d++){var l=n[d];d>0&&(r+=" ");var h="",p="";switch(l){case"%Y":var v,g,c;h="dhx_lightbox_year_select",t._time_format_order[3]=d,t.year_range&&(isNaN(t.year_range)?t.year_range.push&&(g=t.year_range[0],c=t.year_range[1]):v=t.year_range),v=v||10;var u=u||Math.floor(v/2);g=g||a.getFullYear()-u,c=c||g+v;for(var f=g;f<c;f++)p+="<option value='"+f+"'>"+f+"</option>";break;case"%m":for(h="dhx_lightbox_month_select",t._time_format_order[2]=d,f=0;f<12;f++)p+="<option value='"+f+"'>"+this.locale.date.month_full[f]+"</option>";break;case"%d":for(h="dhx_lightbox_day_select",t._time_format_order[1]=d,f=1;f<32;f++)p+="<option value='"+f+"'>"+f+"</option>";break;case"%H:%i":h="dhx_lightbox_time_select",t._time_format_order[0]=d,f=_;var y=a.getDate();for(t._time_values=[];f<o;)p+="<option value='"+f+"'>"+this.templates.time_picker(a)+"</option>",t._time_values.push(f),a.setTime(a.valueOf()+60*this.config.time_step*1e3),f=24*(a.getDate()!=y?1:0)*60+60*a.getHours()+a.getMinutes()}if(p){var w=e._waiAria.lightboxSelectAttrString(l);r+="<select class='"+h+"' "+(t.readonly?"disabled='disabled'":"")+w+">"+p+"</select> "}}return`<div class='dhx_section_time' ${t.height?`style='height:${t.height}px;'`:""}>${r}<span style='font-weight:normal; font-size:10pt;' class='dhx_section_time_spacer'> – </span>${r}</div>`},set_value:function(t,n,s,a){var o,_,r=e.config,d=t.getElementsByTagName("select"),l=a._time_format_order;if(r.full_day){if(!t._full_day){var h="<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> "+e.locale.labels.full_day+" </label></input>";e.config.wide_form||(h=t.previousSibling.innerHTML+h),t.previousSibling.innerHTML=h,t._full_day=!0}var p=t.previousSibling.getElementsByTagName("input")[0];p.checked=e.date.time_part(s.start_date)===0&&e.date.time_part(s.end_date)===0,d[l[0]].disabled=p.checked,d[l[0]+d.length/2].disabled=p.checked,p.$_eventAttached||(p.$_eventAttached=!0,e.event(p,"click",function(){if(p.checked){var u={};e.form_blocks.time.get_value(t,u,a),o=e.date.date_part(u.start_date),(+(_=e.date.date_part(u.end_date))==+o||+_>=+o&&(s.end_date.getHours()!==0||s.end_date.getMinutes()!==0))&&(_=e.date.add(_,1,"day"))}else o=null,_=null;d[l[0]].disabled=p.checked,d[l[0]+d.length/2].disabled=p.checked,c(d,0,o||s.start_date),c(d,4,_||s.end_date)}))}if(r.auto_end_date&&r.event_duration)for(var v=function(){r.auto_end_date&&r.event_duration&&(o=new Date(d[l[3]].value,d[l[2]].value,d[l[1]].value,0,d[l[0]].value),_=new Date(o.getTime()+60*e.config.event_duration*1e3),c(d,4,_))},g=0;g<4;g++)d[g].$_eventAttached||(d[g].$_eventAttached=!0,e.event(d[g],"change",v));function c(u,f,y){for(var w=a._time_values,D=60*y.getHours()+y.getMinutes(),M=D,k=!1,N=0;N<w.length;N++){var m=w[N];if(m===D){k=!0;break}m<D&&(M=m)}u[f+l[0]].value=k?D:M,k||M||(u[f+l[0]].selectedIndex=-1),u[f+l[1]].value=y.getDate(),u[f+l[2]].value=y.getMonth(),u[f+l[3]].value=y.getFullYear()}c(d,0,s.start_date),c(d,4,s.end_date)},get_value:function(t,n,s){var a=t.getElementsByTagName("select"),o=s._time_format_order;if(n.start_date=new Date(a[o[3]].value,a[o[2]].value,a[o[1]].value,0,a[o[0]].value),n.end_date=new Date(a[o[3]+4].value,a[o[2]+4].value,a[o[1]+4].value,0,a[o[0]+4].value),!a[o[3]].value||!a[o[3]+4].value){var _=e.getEvent(e._lightbox_id);_&&(n.start_date=_.start_date,n.end_date=_.end_date)}return n.end_date<=n.start_date&&(n.end_date=e.date.add(n.start_date,e.config.time_step,"minute")),{start_date:new Date(n.start_date),end_date:new Date(n.end_date)}},focus:function(t){e._focus(t.getElementsByTagName("select")[0])}}},e._setLbPosition=function(t){t&&(t.style.top=Math.max(i().offsetHeight/2-t.offsetHeight/2,0)+"px",t.style.left=Math.max(i().offsetWidth/2-t.offsetWidth/2,0)+"px")},e.showCover=function(t){t&&(t.style.display="block",this._setLbPosition(t)),e.config.responsive_lightbox&&(document.documentElement.classList.add("dhx_cal_overflow_container"),i().classList.add("dhx_cal_overflow_container")),this.show_cover(),this._cover.style.display=""},e.showLightbox=function(t){if(t)if(this.callEvent("onBeforeLightbox",[t])){this.showCover(n);var n=this.getLightbox();this._setLbPosition(n),this._fill_lightbox(t,n),this._waiAria.lightboxVisibleAttr(n),this.callEvent("onLightbox",[t])}else this._new_event&&(this._new_event=null,e.getEvent(t)&&delete e.getEvent(t).$new)},e._fill_lightbox=function(t,n){var s=this.getEvent(t),a=n.getElementsByTagName("span"),o=[];if(e.templates.lightbox_header){o.push("");var _=e.templates.lightbox_header(s.start_date,s.end_date,s);o.push(_),a[1].innerHTML="",a[2].innerHTML=_}else{var r=this.templates.event_header(s.start_date,s.end_date,s),d=(this.templates.event_bar_text(s.start_date,s.end_date,s)||"").substr(0,70);o.push(r),o.push(d),a[1].innerHTML=r,a[2].innerHTML=d}this._waiAria.lightboxHeader(n,o.join(" "));for(var l=this.config.lightbox.sections,h=0;h<l.length;h++){var p=l[h],v=e._get_lightbox_section_node(p),g=this.form_blocks[p.type],c=s[p.map_to]!==void 0?s[p.map_to]:p.default_value;g.set_value.call(this,v,c,s,p),l[h].focus&&g.focus.call(this,v)}e._lightbox_id=t},e._get_lightbox_section_node=function(t){return e._lightbox.querySelector(`#${t.id}`).nextSibling},e._lightbox_out=function(t){for(var n=this.config.lightbox.sections,s=0;s<n.length;s++){var a=e._lightbox.querySelector(`#${n[s].id}`);a=a&&a.nextSibling;var o=this.form_blocks[n[s].type].get_value.call(this,a,t,n[s]);n[s].map_to!="auto"&&(t[n[s].map_to]=o)}return t},e._empty_lightbox=function(t){var n=e._lightbox_id,s=this.getEvent(n);s&&(this._lame_copy(s,t),this.setEvent(s.id,s),this._edit_stop_event(s,!0)),this.render_view_data()},e.hide_lightbox=function(t){e.endLightbox(!1,this.getLightbox())},e.hideCover=function(t){t&&(t.style.display="none"),this.hide_cover(),e.config.responsive_lightbox&&(document.documentElement.classList.remove("dhx_cal_overflow_container"),i().classList.remove("dhx_cal_overflow_container"))},e.hide_cover=function(){this._cover&&this._cover.parentNode.removeChild(this._cover),this._cover=null},e.show_cover=function(){this._cover||(this._cover=document.createElement("div"),this._cover.className="dhx_cal_cover",this._cover.style.display="none",e.event(this._cover,"mousemove",e._move_while_dnd),e.event(this._cover,"mouseup",e._finish_dnd),i().appendChild(this._cover))},e.save_lightbox=function(){var t=this._lightbox_out({},this._lame_copy(this.getEvent(this._lightbox_id)));this.checkEvent("onEventSave")&&!this.callEvent("onEventSave",[this._lightbox_id,t,this._new_event])||(this.checkEvent("onRecurringEventSave")&&e.callEvent("onRecurringEventSave",[this._lightbox_id,t,this._new_event]),this._empty_lightbox(t),this.hide_lightbox())},e.startLightbox=function(t,n){this._lightbox_id=t,this._custom_lightbox=!0,this._temp_lightbox=this._lightbox,this._lightbox=n,this.showCover(n)},e.endLightbox=function(t,n){n=n||e.getLightbox();var s=e.getEvent(this._lightbox_id);s&&this._edit_stop_event(s,t),t&&e.render_view_data(),this.hideCover(n),this._custom_lightbox&&(this._lightbox=this._temp_lightbox,this._custom_lightbox=!1),this._temp_lightbox=this._lightbox_id=null,this._waiAria.lightboxHiddenAttr(n),this.resetLightbox(),this.callEvent("onAfterLightbox",[])},e.resetLightbox=function(){e._lightbox&&!e._custom_lightbox&&e._lightbox.parentNode.removeChild(e._lightbox),e._lightbox=null},e.cancel_lightbox=function(){this._lightbox_id&&this.callEvent("onEventCancel",[this._lightbox_id,!!this._new_event]),this.hide_lightbox()},e.hideLightbox=e.cancel_lightbox,e._delete_event_confirm=function({event:t,message:n,title:s,callback:a,ok:o}){e._dhtmlx_confirm({message:n,title:s,callback:a,ok:o})},e._init_lightbox_events=function(){if(this.getLightbox().$_eventAttached)return;const t=this.getLightbox();t.$_eventAttached=!0,e.event(t,"click",function(n){n.target.closest(".dhx_cal_ltitle_close_btn")&&e.cancel_lightbox();const s=e.$domHelpers.closest(n.target,".dhx_btn_set");if(!s){const _=e.$domHelpers.closest(n.target,".dhx_custom_button[data-section-index]");if(_){const r=Number(_.getAttribute("data-section-index"));e.form_blocks[e.config.lightbox.sections[r].type].button_click(e.$domHelpers.closest(_,".dhx_cal_lsection"),_,n)}return}const a=s?s.getAttribute("data-action"):null;switch(a){case"dhx_save_btn":case"save":if(e.config.readonly_active)return;e.save_lightbox();break;case"dhx_delete_btn":case"delete":if(e.config.readonly_active)return;var o=e.locale.labels.confirm_deleting;e._delete_event_confirm({event:e.getEvent(e._lightbox_id),message:o,title:e.locale.labels.title_confirm_deleting,callback:function(){let _=e.getEvent(e._lightbox_id);_._thisAndFollowing?(_._removeFollowing=!0,e.callEvent("onRecurringEventSave",[_.id,_,e._new_event])):e.deleteEvent(e._lightbox_id),e._new_event=null,delete _.$new,e.hide_lightbox()},config:{ok:e.locale.labels.icon_delete}});break;case"dhx_cancel_btn":case"cancel":e.cancel_lightbox();break;default:e.callEvent("onLightboxButton",[a,s,n])}}),e.event(t,"keydown",function(n){var s=n||window.event,a=n.target||n.srcElement,o=a.querySelector("[dhx_button]");switch(o||(o=a.parentNode.querySelector(".dhx_custom_button, .dhx_readonly")),(n||s).keyCode){case 32:if((n||s).shiftKey)return;o&&o.click&&o.click();break;case e.keys.edit_save:if((n||s).shiftKey)return;if(o&&o.click)o.click();else{if(e.config.readonly_active)return;e.save_lightbox()}break;case e.keys.edit_cancel:e.cancel_lightbox()}}),e.event(t,"click",function(n){if(n.target.closest(".dhx_lightbox_day_select")||n.target.closest(".dhx_lightbox_month_select")){const s=t.querySelectorAll(".dhx_lightbox_month_select"),a=t.querySelectorAll(".dhx_lightbox_day_select"),o=t.querySelectorAll(".dhx_lightbox_year_select");s.length&&a.length&&o&&s.forEach((_,r)=>{const d=a[r],l=parseInt(_.value,10);let h=parseInt(o[r].value,10);h||(h=new Date(e.getState().date).getFullYear());const p=function(c,u){return new Date(c,u+1,0).getDate()}(h,l),v=p||31;let g=d.value;d.innerHTML="";for(let c=1;c<=v;c++){const u=document.createElement("option");u.value=c,u.textContent=c,d.appendChild(u)}d.value=Math.min(g,v)})}})},e.setLightboxSize=function(){},e._init_dnd_events=function(){e.event(i(),"mousemove",e._move_while_dnd),e.event(i(),"mouseup",e._finish_dnd),e._init_dnd_events=function(){}},e._move_while_dnd=function(t){if(e._dnd_start_lb){document.dhx_unselectable||(i().classList.add("dhx_unselectable"),document.dhx_unselectable=!0);var n=e.getLightbox(),s=[t.pageX,t.pageY];n.style.top=e._lb_start[1]+s[1]-e._dnd_start_lb[1]+"px",n.style.left=e._lb_start[0]+s[0]-e._dnd_start_lb[0]+"px"}},e._ready_to_dnd=function(t){var n=e.getLightbox();e._lb_start=[n.offsetLeft,n.offsetTop],e._dnd_start_lb=[t.pageX,t.pageY]},e._finish_dnd=function(){e._lb_start&&(e._lb_start=e._dnd_start_lb=!1,i().classList.remove("dhx_unselectable"),document.dhx_unselectable=!1)},e.getLightbox=function(){if(!this._lightbox){var t=document.createElement("div");t.className="dhx_cal_light",e.config.wide_form&&(t.className+=" dhx_cal_light_wide"),e.form_blocks.recurring&&(t.className+=" dhx_cal_light_rec"),e.config.rtl&&(t.className+=" dhx_cal_light_rtl"),e.config.responsive_lightbox&&(t.className+=" dhx_cal_light_responsive"),t.style.visibility="hidden";var n=this._lightbox_template,s=this.config.buttons_right;n+="<div class='dhx_cal_lcontrols'>";for(var a=0;a<s.length;a++)n+="<div "+this._waiAria.lightboxButtonAttrString(s[a])+" data-action='"+s[a]+"' class='dhx_btn_set dhx_"+(e.config.rtl?"right":"left")+"_btn_set "+s[a]+"_set'><div class='dhx_btn_inner "+s[a]+"'></div><div>"+e.locale.labels[s[a]]+"</div></div>";s=this.config.buttons_left;var o=e.config.rtl;for(a=0;a<s.length;a++)n+="<div class='dhx_cal_lcontrols_push_right'></div>",n+="<div "+this._waiAria.lightboxButtonAttrString(s[a])+" data-action='"+s[a]+"' class='dhx_btn_set dhx_"+(o?"left":"right")+"_btn_set "+s[a]+"_set'><div class='dhx_btn_inner "+s[a]+"'></div><div>"+e.locale.labels[s[a]]+"</div></div>";n+="</div>",n+="</div>",t.innerHTML=n,e.config.drag_lightbox&&(e.event(t.firstChild,"mousedown",e._ready_to_dnd),e.event(t.firstChild,"selectstart",function(v){return v.preventDefault(),!1}),t.firstChild.style.cursor="move",e._init_dnd_events()),this._waiAria.lightboxAttr(t),this.show_cover(),this._cover.insertBefore(t,this._cover.firstChild),this._lightbox=t;var _=this.config.lightbox.sections;for(n="",a=0;a<_.length;a++){var r=this.form_blocks[_[a].type];if(r){_[a].id="area_"+this.uid();var d="";_[a].button&&(d="<div "+e._waiAria.lightboxSectionButtonAttrString(this.locale.labels["button_"+_[a].button])+" class='dhx_custom_button' data-section-index='"+a+"' index='"+a+"'><div class='dhx_custom_button_"+_[a].button+"'></div><div>"+this.locale.labels["button_"+_[a].button]+"</div></div>"),this.config.wide_form&&(n+="<div class='dhx_wrap_section'>");var l=this.locale.labels["section_"+_[a].name];typeof l!="string"&&(l=_[a].name),n+="<div id='"+_[a].id+"' class='dhx_cal_lsection dhx_cal_lsection_"+_[a].name+"'>"+d+"<label>"+l+"</label></div>"+r.render.call(this,_[a]),n+="</div>"}}var h=t.getElementsByTagName("div");for(a=0;a<h.length;a++){var p=h[a];if(e._getClassName(p)=="dhx_cal_larea"){p.innerHTML=n;break}}e._bindLightboxLabels(_),this.setLightboxSize(),this._init_lightbox_events(this),t.style.visibility="visible"}return this._lightbox},e._bindLightboxLabels=function(t){for(var n=0;n<t.length;n++){var s=t[n];if(s.id&&e._lightbox.querySelector(`#${s.id}`)){for(var a=e._lightbox.querySelector(`#${s.id}`).querySelector("label"),o=e._get_lightbox_section_node(s);o&&!o.querySelector;)o=o.nextSibling;var _=!0;if(o){var r=o.querySelector("input, select, textarea");r&&(s.inputId=r.id||"input_"+e.uid(),r.id||(r.id=s.inputId),a.setAttribute("for",s.inputId),_=!1)}_&&e.form_blocks[s.type].focus&&e.event(a,"click",function(d){return function(){var l=e.form_blocks[d.type],h=e._get_lightbox_section_node(d);l&&l.focus&&l.focus.call(e,h)}}(s))}}},e.attachEvent("onEventIdChange",function(t,n){this._lightbox_id==t&&(this._lightbox_id=n)}),e._lightbox_template=`<div class='dhx_cal_ltitle'><div class="dhx_cal_ltitle_descr"><span class='dhx_mark'> </span><span class='dhx_time'></span><span class='dhx_title'></span> |
| 13 | </div> |
| 14 | <div class="dhx_cal_ltitle_controls"> |
| 15 | <a class="dhx_cal_ltitle_close_btn scheduler_icon close"></a> |
no test coverage detected